Time setting method and electronic device

By providing prompt information when the user modifys the time of the electronic device and providing the option to cancel or confirm the modification time, the problem of the user's manual modification of the time has been solved, which improves the user experience.

CN117156038BActive Publication Date: 2025-04-04HONOR DEVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310413802.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-07
Publication Date
2025-04-04
Estimated Expiration
2043-04-07

AI Technical Summary

Technical Problem

When a user manually modifys the time of an electronic device, some functions may not be used normally, and the prior art will find it difficult to effectively solve this problem.

Method used

Provides a time setting method, by displaying prompt information when the user modifies the time, informing the user that some functions may not function normally after modifying the time, and provide the option to cancel or confirm the modification time.

Benefits of technology

It reduces the scenarios where some functions cannot be used normally due to manual modification time, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117156038B_ABST
    Figure CN117156038B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a time setting method and an electronic device. The method includes: at a first moment, in response to an operation of setting the time to a first time, the electronic device sets the time to the first time, and the time difference between the first time and the timing time corresponding to the first moment is less than or equal to a preset threshold; at a second moment, in response to an operation of setting the time to a second time, the electronic device displays a first interface; wherein the first interface includes prompt information, a first button, and a second button; the prompt information is used to prompt that when the time of the electronic device is set to the second time, some functions of the electronic device cannot operate normally; the time difference between the second time and the timing time corresponding to the second moment is greater than a preset threshold; when the electronic device receives a trigger operation for the first button, the electronic device does not set the time of the electronic device to the second time. In this way, the scenario in which the electronic device cannot operate normally due to manual modification of the time by the user is reduced.
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 a time setting method and an electronic device. Background Art

[0002] Electronic devices can provide users with a variety of functions through application programs. For example, the functions may include: displaying weather data, loading web page data, automatically switching display modes and / or automatically updating system versions, etc.

[0003] However, in some cases, when using electronic devices, users may encounter situations where some functions of the electronic devices cannot be implemented normally. For example, the weather data displayed by the weather application is inconsistent with the weather at that time, the browser application cannot load web page data, the settings application switches from normal mode to dark mode during the day, and / or the electronic device cannot update the system version. Summary of the invention

[0004] The embodiments of the present application provide a time setting method and an electronic device, which are applied to the field of terminal technology. When a user manually modifies the time, the electronic device can prompt the user that some functions of the electronic device will be affected after the time is modified, thereby reducing the scenario in which some functions cannot be used normally due to manual time modification.

[0005] In the first aspect, the embodiment of the present application proposes a time setting method. The method includes: at a first moment, the electronic device receives an operation of setting the time to a first time by the user, the electronic device sets the time of the electronic device to the first time, the time difference between the first time and the time service time corresponding to the first moment is less than or equal to a preset threshold; the time service time is related to the time service server; at a second moment, the electronic device receives an operation of setting the time to a second time by the user, and the electronic device displays a first interface; wherein the first interface includes prompt information, a first button and a second button; the prompt information is used to prompt that when the time of the electronic device is set to the second time, some functions of the electronic device cannot operate normally; the time difference between the second time and the time service time corresponding to the second moment is greater than the preset threshold; the second moment is later than the first moment; when the electronic device receives a trigger operation for the first button, the electronic device does not set the time of the electronic device to the second time. In this way, when the time difference between the first time and the time service time corresponding to the first moment is less than or equal to the preset threshold, setting the time of the electronic device to the first time will not affect the running of the application program of the electronic device; when the time difference between the second time and the time service time corresponding to the second moment is greater than the preset threshold, the electronic device can prompt the user, and the user can choose to give up modifying the time, thereby reducing the scene where some functions of the electronic device cannot operate normally.

[0006] The user's operation of setting the time to the first time may correspond to the operation of Figure 6The triggering operation of the first confirmation button 605 in the interface shown in c; the operation of the user setting the time to the second time may correspond to the triggering operation of the first confirmation button 605 in the interface shown in c; Figure 7 The trigger operation of the first confirmation button 705 of the interface shown in c; the first interface may correspond to Figure 7 The first button may be a cancel button 707 , and the second button may be a second confirmation button 708 .

[0007] In a possible implementation, before the electronic device displays the first interface, the electronic device further includes: the electronic device calculates the timing time corresponding to the second moment according to the cached timing time cached in the electronic device before the second moment, and the time difference between the second moment and the moment when the cached timing time is cached. In this way, the electronic device does not need to obtain the timing time corresponding to the second moment from the timing server, thereby reducing the response time of the electronic device and improving the computing efficiency of the electronic device.

[0008] In a possible implementation, the timing time t corresponding to the second moment satisfies the following formula:

[0009] t=(t C -t A )+t B

[0010] Among them, t A The time difference between the time when the electronic device is turned on and the time when the timing is cached; t B t is the cache timing time; C is the time difference between the electronic device being turned on and the second moment. In this way, the electronic device can be based on t C and t A The time difference between the second moment and the moment of caching the timing time is obtained, thereby calculating the timing time corresponding to the second moment.

[0011] In a possible implementation, before the electronic device displays the first interface, the electronic device further includes: receiving the timing time corresponding to the second moment from the timing server. In this way, the electronic device can obtain a relatively accurate timing time from the timing server, so that the electronic device can determine whether to give a prompt based on the time difference between the second time and the timing time corresponding to the second moment.

[0012] In a possible implementation, the electronic device includes a time management service and a time calibration service, and before the electronic device receives the timing time corresponding to the second moment from the timing server, it includes: the time management service checks whether the electronic device is connected to the network; if the electronic device is connected to the network, the time management service notifies the time calibration service to send a timing request to the timing server; the electronic device receives the timing time corresponding to the second moment from the timing server, including: within a preset time, the time calibration service receives the timing time corresponding to the second moment issued by the timing server; the time calibration service synchronizes the timing time corresponding to the second moment to the time management service. In this way, the electronic device can obtain the timing time corresponding to the second moment issued by the timing server in the scenario of accessing the network; at the same time, the accuracy of the timing time corresponding to the second moment is improved by the preset time.

[0013] In one possible implementation, the electronic device includes a time management service, and the method further includes: when the electronic device receives a trigger operation for the second button, the electronic device sets the electronic device time to the second time; and the time management service notifies the application of the second time through a time setting broadcast. In this way, if the user chooses to confirm the time modification, when some functions of the electronic device cannot be operated, the user can understand that the scene may be caused by the custom setting time, not the damage of the electronic device.

[0014] In a possible implementation, the method further includes: at the third moment, the electronic device receives an operation by the user to set the time to the third time, and the electronic device sets the time of the electronic device to the third time; wherein the electronic device does not include a cached timing time, and the electronic device does not obtain the timing time corresponding to the third moment; the electronic device does not obtain the timing time corresponding to the third moment and is related to at least one of the following: the electronic device is not connected to the network, and / or the electronic device does not receive the timing time corresponding to the third moment sent by the timing server within a preset time; the third moment is later than the second moment. In this way, when the electronic device cannot obtain the timing time, the electronic device can also provide the user with a function of modifying the time.

[0015] In a second aspect, an embodiment of the present application provides an electronic device, which may also be referred to as an electronic terminal, a user equipment (UE), a mobile station (MS), a mobile terminal (MT), etc. The electronic device may be a mobile phone, a smart TV, a wearable device, a tablet computer (Pad), a computer with a wireless transceiver function, a virtual reality (VR) electronic device, an augmented reality (AR) electronic device, wireless electronics in industrial control, wireless electronics in self-driving, wireless electronics in remote medical surgery, wireless electronics in smart grid, wireless electronics in transportation safety, wireless electronics in smart city, wireless electronics in smart home, etc.

[0016] The electronic device comprises: a processor and a memory; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory, so that the electronic device executes the method as in the first aspect.

[0017] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the method of the first aspect is implemented.

[0018] In a fourth aspect, an embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is executed, the computer executes the method of the first aspect.

[0019] In a fifth aspect, an embodiment of the present application provides a chip, the chip including a processor, the processor being used to call a computer program in a memory to execute the method of the first aspect.

[0020] It should be understood that the second to fifth aspects of the present application correspond to the technical solutions of the first aspect of the present application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation methods are similar and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1A A flowchart of a time setting method in a possible implementation is shown;

[0022] Figure 1BA schematic diagram of an interface in which some functions of an electronic device cannot be used normally in a possible implementation;

[0023] Figure 2 A schematic diagram of the structure of a terminal device 100 provided in an embodiment of the present application;

[0024] Figure 3 A schematic diagram of the software structure of the terminal device 100 provided in an embodiment of the present application;

[0025] Figure 4 A schematic diagram of an interface of a time setting method provided in an embodiment of the present application;

[0026] Figure 5 A schematic diagram of an interface of a time setting method provided in an embodiment of the present application;

[0027] Figure 6 A schematic diagram of an interface of a time setting method provided in an embodiment of the present application;

[0028] Figure 7 A schematic diagram of an interface of a time setting method provided in an embodiment of the present application;

[0029] Figure 8 A schematic diagram of an interface of a time setting method provided in an embodiment of the present application;

[0030] Fig. 9 A schematic diagram of an interface of a time setting method provided in an embodiment of the present application;

[0031] Fig.10 A schematic diagram of a time setting method provided in an embodiment of the present application;

[0032] Fig.11 A schematic diagram of the calculation principle of a time setting method provided in an embodiment of the present application;

[0033] Fig.12 A schematic diagram of a time setting method provided in an embodiment of the present application;

[0034] Fig.13 A schematic diagram of a time setting method provided in an embodiment of the present application;

[0035] Fig.14 A schematic diagram of a time setting method provided in an embodiment of the present application;

[0036] Fig.15 A schematic diagram of a time setting method provided in an embodiment of the present application;

[0037] Fig.16 A schematic diagram of a time setting method provided in an embodiment of the present application;

[0038] Fig.17 A schematic diagram of a time setting method provided in an embodiment of the present application;

[0039] Fig.18 A schematic diagram of a time setting method provided in an embodiment of the present application;

[0040] Fig.19 A schematic diagram of the structure of a time setting device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0041] In order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "for example" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0042] In the embodiments of the present application, "at least one" refers to one or more, and "plurality" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.

[0043] It should be noted that the "at..." in the embodiment of the present application can be the instant when a certain situation occurs, or a period of time after a certain situation occurs, and the embodiment of the present application does not specifically limit this. In addition, the display interface provided in the embodiment of the present application is only an example, and the display interface can also include more or less content.

[0044] Electronic devices can provide users with a variety of functions through application programs. For example, the functions may include: displaying weather data, loading web page data, automatically switching display modes and / or automatically updating system versions, etc.

[0045] However, in some cases, when using electronic devices, users may encounter situations where some functions of the electronic devices cannot be implemented normally. For example, the weather data displayed by the weather application is inconsistent with the weather at that time, the browser application cannot load web page data, the settings application switches from normal mode to dark mode during the day, and / or the electronic device cannot update the system version.

[0046] The above scenario may be related to the user customizing the time of the electronic device.

[0047] The electronic device may provide the function of automatically setting the time and the function of user-defined time setting. After the electronic device turns on the function of automatically setting the time, the electronic device may obtain the standard time from the timing server, which may also be called the timing time; wherein the timing server may be a server that provides accurate time for the electronic device. After the electronic device turns on the function of user-defined time setting, the electronic device may set the time customized by the user as the time of the electronic device.

[0048] Let's combine Figure 1A In a possible implementation, the process of enabling the electronic device to set the custom time and setting the time to the user-defined time is described, such as Figure 1A As shown:

[0049] S101. The electronic device turns off the function of automatically setting the time of the electronic device.

[0050] In some scenarios, the electronic device starts the function of automatically setting the time. Before the electronic device starts the function of customizing the time setting, the electronic device needs to turn off the function of automatically setting the time.

[0051] S102: The electronic device receives an operation of setting a user-defined time.

[0052] S103: The electronic device sets the time of the electronic device to the time customized by the user.

[0053] S104: The electronic device issues a time setting broadcast.

[0054] After the electronic device modifies the time to the time customized by the user, the electronic device notifies the application of the modified time through a time setting broadcast.

[0055] The application programs of electronic devices can provide corresponding functions for users. For example, electronic devices can provide weather data through weather applications. The operation of some functions is related to the time of the electronic device. After the user customizes the time, if the time of the electronic device is not accurate, when the electronic device runs these applications, it may cause errors in the functions provided by the application.

[0056] S105. Some applications of electronic devices cannot operate normally.

[0057] For example, the following is combined Figure 1B Introduce the possible implementation scenarios where some functions of electronic devices cannot be used normally. Figure 1B As shown:

[0058] For example, a user sets a custom time and changes the time of the electronic device from 9:00 to 8:00. Afterwards, a weather application is running on the foreground of the electronic device, such as Figure 1B The interface shown in a. Figure 1B The interface shown in a in the figure shows the weather conditions corresponding to each time point; for example, at 8:00, the weather data is cloudy and 10℃.

[0059] The weather data obtained by the electronic device when running the weather application is related to the time of the electronic device. For example, the time of the electronic device is 8:00, and the weather data 101 displayed by the electronic device corresponds to 8:00. However, other devices have not customized the time, and the time of other devices is 9:00, and the data displayed by other devices corresponds to 9:00. For example, the weather data displayed by other devices may be light rain and 12℃. After the user customizes the time, the weather data displayed on the electronic device is different from the weather data displayed on other devices that have not modified the time.

[0060] Another example: the user sets a custom time. After that, a browser application runs in the foreground of the electronic device. When the electronic device is loading network data, it may fail to load the web page, such as Figure 1B The interface shown in b or Figure 1B The interface shown in c in the figure. This is because when the electronic device loads a web page, it needs to verify the security certificate of the website. During the verification process, the electronic device will send an access request to the network server, and the access request carries the timestamp of the electronic device. Because the user has modified the time of the electronic device, the timestamp of the electronic device does not match the timestamp required to verify the security certificate, resulting in the failure of the access request verification and the inability of the electronic device to load the page.

[0061] For another example, an electronic device may include display modes such as a dark mode and a normal mode, wherein the dark mode is suitable for scenes with low ambient brightness, and the normal mode is suitable for scenes with bright brightness. The electronic device may enable the function of automatically switching the display mode; for example, Figure 1B In the interface shown in d, the electronic device automatically turns on the dark mode during the period from sunset to sunrise, and switches back to the normal mode during the period from sunrise to sunset; in one implementation, when the time of the electronic device is 18:00-6:00, the electronic device turns on the dark mode; from 6:00 to 18:00, the electronic device turns off the dark mode.

[0062] After the electronic device starts the automatic display mode switching function, the user sets a custom time and changes the time of the electronic device from 12:00 to 3:00. The electronic device determines that 3:00 is within the time period from sunset to sunrise, and the electronic device switches from normal mode to dark mode. However, the current standard time is 12:00, and after the electronic device starts the dark mode, the screen brightness is low, which may not be suitable for users to use during the day.

[0063] The above examples only include some scenarios where the electronic device cannot run the application normally after the user customizes the time. After the user customizes the time, it may also cause the system to be unable to update the version, online payment fails, and other scenarios. It is understandable that the implementation of some functions in the electronic device depends on the time of the electronic device. After the user modifies the time of the electronic device, the above corresponding functions may fail when the electronic device runs the application. The embodiments of the present application will not list the functions related to the time of the electronic device and the scenarios where the functions run incorrectly.

[0064] In view of this, the embodiment of the present application provides a time setting method. When the user customizes the time, if the time customized by the user is significantly different from the standard time, the electronic device can prompt the user that the modified time may affect the operation of some functions of the application. In this way, the user can understand that the time to be set may affect the operation of some functions of the electronic device, and the user can choose to continue to modify or give up the modification according to their own needs, thereby reducing the scenario where the application cannot be used normally due to the user manually setting the time, thereby improving the user's experience.

[0065] In the embodiments of the present application, the electronic device may also be referred to as an electronic terminal, a user equipment (UE), a mobile station (MS), a mobile terminal (MT), etc. The electronic device may be a mobile phone, a smart TV, a wearable device, a tablet computer (Pad), a computer with a wireless transceiver function, a virtual reality (VR) electronic device, an augmented reality (AR) electronic device, wireless electronics in industrial control, wireless electronics in self-driving, wireless electronics in remote medical surgery, wireless electronics in smart grid, wireless electronics in transportation safety, wireless electronics in smart city, wireless electronics in smart home, etc.

[0066] In order to better understand the embodiments of the present application, the structure of the electronic device in the embodiments of the present application is introduced below:

[0067] Figure 2 1 shows a schematic diagram of the structure of the electronic device 100. The electronic 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, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195.

[0068] Among them, the sensor module 180 may include a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, and the like.

[0069] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic 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.

[0070] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0071] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.

[0072] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0073] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuits sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

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

[0075] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. While the charging management module 140 is charging the battery 142, it may also power the electronic device through the power management module 141.

[0076] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.

[0077] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

[0078] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. The antenna in the electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0079] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0080] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.

[0081] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0082] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology, etc. GNSS may include the global positioning system (GPS), the global navigation satellite system (GLONASS), the Beidou navigation satellite system (BDS), the quasi-zenith satellite system (QZSS) and / or the satellite based augmentation system (SBAS).

[0083] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.

[0084] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.

[0085] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.

[0086] ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.

[0087] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.

[0088] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0089] Video codecs are used to compress or decompress digital videos. The electronic device 100 may support one or more video codecs. Thus, the electronic device 100 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

[0090] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.

[0091] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.

[0092] The internal memory 121 can be used to store computer executable program codes, and the executable program codes include instructions. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the electronic device 100 by running instructions stored in the internal memory 121, and / or instructions stored in a memory provided in the processor.

[0093] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0094] Exemplarily, the electronic device 100 may further include one or more of a button 190 , a motor 191 , an indicator 192 , a SIM card interface 195 (eSIM card), and the like.

[0095] The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture, etc. The embodiment of the present application takes the Android system of the layered architecture as an example to exemplify the software structure of the electronic device 100. Figure 3 It is a software structure block diagram of the electronic device 100 according to an embodiment of the present application.

[0096] The layered architecture divides the software into several layers, each with clear roles 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: the application layer, the application framework layer, the Android runtime and system library, and the kernel layer.

[0097] like Figure 3 As shown, the application package may include applications such as camera, calendar, map, phone, weather, settings, mailbox, video, music, social, etc.

[0098] The application framework layer provides API and programming framework for the applications in the application layer. The application framework layer includes some predefined functions.

[0099] like Figure 3 As shown, the application framework layer may include a window manager, a content provider, a resource manager, a view system, a notification manager, an activity manager, a time management service, a time calibration service, and the like.

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

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

[0102] 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.

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

[0104] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.

[0105] The activity manager is responsible for managing the startup, status, life cycle and other activities of the application. Among them, activity is an application component that can provide an interface for users to interact with the electronic device through the interface to complete a task.

[0106] The time management service may be an alarm management service (alarm manager service); the time management service is a service of the framework layer, which provides alarm-related functions, for example: the time management service can be used to wake up the electronic device at a specific time and perform corresponding operations. In some embodiments of the present application, the time management service can be used to determine whether prompting the user of the time to be set will cause some functions of the electronic device to not operate normally.

[0107] The time calibration service may be a network time protocol (NTP); the time calibration service is used to synchronize the clock of the timing server so that the clock of the electronic device is consistent with the clock of the timing server. In some embodiments of the present application, the time calibration service may be used to obtain the timing time from the timing server.

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

[0109] 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.

[0110] 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.

[0111] The system library may 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.

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

[0113] 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.

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

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

[0116] The kernel layer is the layer between hardware and software. The kernel layer can contain display drivers, camera drivers, audio drivers, sensor drivers, etc.

[0117] The time setting method provided in the embodiment of the present application is described in detail below with reference to the accompanying drawings.

[0118] In the embodiment of the present application, the electronic device provides a function of customizing the time setting. The user can set the time in the customizing time setting interface. Figure 4 and Figure 5 A method for an electronic device to enter a custom time setting interface in an embodiment of the present application is described.

[0119] Figure 4 A schematic diagram of an interface for entering a custom time setting interface provided in an embodiment of the present application, such as Figure 4 As shown:

[0120] In one possible implementation, the electronic device may enter a custom time setting interface based on a setting application. For example, after the electronic device starts the setting application, the electronic device may display Figure 4 The interface shown in a. Figure 4 The interface shown in a in FIG. 4 includes a system and update button 401. When the electronic device receives a trigger operation for the system and update button 401, the electronic device can enter Figure 4 The interface shown in b. Figure 4The interface shown in b in FIG. 4 shows buttons related to system settings, such as a date and time button 402. When the electronic device receives a trigger operation for the date and time button 402, the electronic device may display Figure 4 The interface shown in c. Figure 4 The interface shown in c in the figure can be an interface for automatically setting the time. Figure 4 The interface shown in c includes an automatic setting switch button 403. When the automatic setting switch button 403 is turned on, the electronic device can obtain the time of the timing server in an online state and automatically calibrate the time of the electronic device.

[0121] It is understandable that when the user customizes the time of the electronic device, the user can turn off the automatic time setting function and start the custom time setting function; for example, Figure 4 In the interface shown in c, the electronic device receives a trigger operation for the switch button 403 for automatic setting, and in response to the trigger operation, the electronic device enters Figure 4 The interface shown in d. Figure 4 The interface shown in d is a custom time setting interface. Figure 4 The interface shown in d in FIG. 1 includes an automatic setting switch button 404. The automatic setting switch button 404 is in the off state. The user can Figure 4 Manually enter the time in the interface shown in d.

[0122] Figure 5 Another interface diagram for entering a custom time setting interface provided in an embodiment of the present application is shown in FIG. Figure 5 As shown:

[0123] In another possible implementation, the electronic device can enter a custom time setting interface based on a clock application. For example, the electronic device can display the time on the desktop, such as Figure 5 The interface shown in a in FIG. 1 includes an icon 501 for date and time. When the electronic device receives a trigger operation for the icon 501 for date and time, the electronic device may enter Figure 5 The interface shown in b. Figure 5 The interface shown in b in FIG. 1 shows an alarm button, a clock button, a stopwatch button, a timing button, and a button 502 for more time functions. When the electronic device receives a trigger operation for the button 502 for more time functions, the electronic device may display the following: Figure 5 The interface shown in c. Figure 5 The interface shown in c in FIG. 5 includes a setting button 503. When the electronic device receives a trigger operation for the setting button 503, the electronic device enters Figure 5 The interface shown in d. Figure 5 The interface shown in d in FIG. 5 shows a system time setting button 504 .

[0124] When the electronic device receives a trigger operation for the system time setting button 504, the electronic device may display an automatic time setting interface, such as Figure 5 The interface shown in e. Figure 5 The interface shown in e includes an automatic setting switch button 505. When the automatic setting switch button 505 is turned on, the electronic device can obtain the time of the timing server in an online state and automatically calibrate the time of the electronic device.

[0125] It is understandable that when the user customizes the time of the electronic device, the user can turn off the automatic time setting function, for example, Figure 5 In the interface shown in FIG. 5 , the electronic device receives a trigger operation for the switch button 505 for automatic setting, and in response to the trigger operation, the electronic device enters Figure 5 The interface shown in f. Figure 5 The interface shown in f can be a custom time setting interface. Figure 5 The interface shown in f in FIG. 1 includes an automatic setting switch button 506. The automatic setting switch button 506 is in the off state. The user can Figure 5 Manually enter the time in the interface shown in f.

[0126] The above embodiments provide two methods for an electronic device to enter a custom time setting interface. The time setting method in the embodiments of the present application may also use other methods to enter a custom time setting interface.

[0127] An embodiment of the present application provides a time setting method, in which an electronic device compares a time customized by a user with a timing time corresponding to the moment of the time customized by the user, and when the time difference exceeds a preset threshold, the electronic device may prompt the user that the currently modified time will cause some functions to be unavailable, and provide a button for continuing to modify the time and a button for abandoning the time modification; then the electronic device may set the time of the electronic device to the time customized by the user or not modify the time of the electronic device according to the user's choice; and when the time difference does not exceed the preset threshold, the operation of the electronic device may not be affected by the time customized by the user; the electronic device may set the time of the electronic device to the time customized by the user, and at the same time the electronic device will not prompt the user that the currently modified time will cause some functions to be unavailable.

[0128] Combine the following Figure 6-Figure 8 The scenarios to which the time setting method provided in the embodiments of the present application is applicable are described.

[0129] Figure 6 A schematic diagram of an interface of a time setting method provided in an embodiment of the present application is shown. Figure 6It is applicable to the scenario where the time difference between the user-defined time and the time corresponding to the time of the user-defined time does not exceed the preset threshold. Figure 6 As shown:

[0130] The electronic device may provide a function of customizing the time setting, for example, the electronic device may display Figure 6 The interface shown in a, Figure 6 The interface shown in a is the custom time setting interface. Figure 6 The interface shown in a in the figure includes a switch button 601 for automatically setting in the off state, a date setting button 602 and a time setting button 603; the date setting button 602 can be used to set the year, month and / or date, and the time setting button 603 can be used to set the hour, minute and / or second.

[0131] In a possible implementation, taking the example of a user customizing the time through the time setting button 603, when the electronic device receives a trigger operation for the time setting button 603, the electronic device displays Figure 6 The interface shown in b. Figure 6 The interface shown in b in FIG. 6 includes a time setting pop-up window 604, and the user can modify the time by sliding up and down the corresponding am / pm, hour, and minute. For example, the electronic device can modify the time from am, 8:00, 00:00 (such as 00:00) based on the user's sliding operation in the time setting pop-up window 604. Figure 6 b) to morning, 8:00, and 01:00 (as shown in Figure 6 c interface in the figure). Figure 6 In the interface shown in c in FIG. 1 , when the electronic device receives a trigger operation for the first confirmation button 605, the electronic device can set the time to 8:01. After the electronic device returns to the desktop, the electronic device can display Figure 6 The interface shown in d. Figure 6 The interface shown in d shows the date and time set by the user.

[0132] It should be noted that, in order to facilitate understanding of the process of user-defined time setting, the embodiment of the present application uses an electronic device to display a desktop ( Figure 6 Taking the interface shown in d in the figure as an example, the electronic device setting the time to the user-defined time is described. The embodiment of the present application can also indicate that the electronic device has modified the time in other ways, such as: the lock screen interface displays the time, and the status bar also displays the time, and the embodiment of the present application does not limit this.

[0133] A time setting method provided by an embodiment of the present application includes: at a first moment, an electronic device receives an operation by a user to set the time to a first time, the electronic device sets the time of the electronic device to the first time, and the time difference between the first time and the timing time corresponding to the first moment is less than or equal to a preset threshold; the timing time is related to a timing server.

[0134] The user's operation of setting the time to the first time may correspond to the operation of Figure 6 The trigger operation of the first confirmation button 605 in the interface shown in c; the first time can be Figure 6 The time customized by the user in the interface shown in c is 8:01. The timing time can be the accurate time calculated by the electronic device based on the cached timing time, or it can be the accurate time obtained from the timing server; wherein the cached timing time is the timing time cached in the electronic device before receiving the user's operation of setting the time to the customized setting time. The timing time corresponding to the first moment can be understood as the time of the timing server at the first moment. The preset threshold can be customized, for example, the preset threshold can be 5s.

[0135] At the first moment, the electronic device can obtain that the time difference between the first time and the time service time corresponding to the first moment is less than or equal to the preset threshold, and the electronic device sets the time of the electronic device to the first time. For example, the first time obtained by the electronic device is 8:01:00, and the time service time corresponding to the first moment obtained by the electronic device is 8:00:56, and the time difference is 4s. If the time difference is less than the preset threshold, the electronic device can set the first time as the time of the electronic device, and the electronic device will not prompt the user that the currently modified time will cause some functions to be unavailable.

[0136] The time difference between the first time and the timing time corresponding to the first moment is less than or equal to the preset threshold, and the electronic device setting the time to the first time will not affect the operation of the electronic device. This is because the time of the electronic device and the time of the timing server will not be completely consistent. For example, when the electronic device automatically calibrates the time in a networked state, there will be a certain transmission delay from the electronic device sending a time calibration request to the timing server sending the timing time; there may also be delays caused by other reasons. Therefore, when the electronic device runs an application, the time of the electronic device obtained by the application and the timing time are allowed to have a certain range of fault-tolerant time difference. When the time difference is within the range of fault-tolerant time difference, the application of the electronic device will not be affected during operation. Therefore, in the above scenario, the electronic device can set the time of the electronic device to the first time, and the electronic device does not prompt the user that the current modified time will cause some functions to be unavailable.

[0137] An embodiment of the present application provides a time setting method, in which, at a first moment, an electronic device receives an operation by a user to set the time to a first time, and the electronic device sets the time of the electronic device to the first time, and the time difference between the first time and the timing time corresponding to the first moment is less than or equal to a preset threshold. In this way, when the time difference between the first time and the timing time corresponding to the first moment is less than or equal to the preset threshold, the electronic device can set the time of the electronic device to the first time, and the first time will not affect the running of the application program of the electronic device, thereby reducing the situation where the application program cannot be used normally due to the user's custom setting of the time of the electronic device.

[0138] Figure 7 A schematic diagram of an interface of a time setting method provided in an embodiment of the present application is shown. Figure 7 It can be applied to the scenario where the time difference between the user-defined time and the timing time corresponding to the user-defined time exceeds the preset threshold. Figure 7 As shown:

[0139] For example, the electronic device may provide a function of customizing the time setting. For example, the electronic device may display Figure 7 The interface shown in a, Figure 7 The interface shown in a is the custom time setting interface. Figure 7 The interface shown in a in FIG. 1 includes a switch button 701 for automatically setting in an off state, a date setting button 702 and a time setting button 703 .

[0140] In a possible implementation, taking the example of a user customizing a date through the date setting button 702, when the electronic device receives a trigger operation for the date setting button 702, the electronic device displays Figure 7 The interface shown in b. Figure 7 The interface shown in b in FIG. 1 includes a date setting pop-up window 704, and the user can adjust the date by sliding up and down the corresponding year, month or date. For example, the electronic device adjusts the time from March 22, 2023 (such as March 22, 2023) to the corresponding year, month or date based on the user's sliding operation in the date setting pop-up window 704. Figure 7 b) is adjusted to March 21, 2023 (as shown in Figure 7 c interface in the figure).

[0141] Since the time difference between the user-defined time and the time synchronization time is large, the electronic device can remind the user that the current modified time may cause some functions of the electronic device to not operate normally. Figure 7 In the interface shown in c, when the electronic device receives a trigger operation for the first confirmation button 705, the electronic device may display Figure 7 The interface shown in d. Figure 7The interface shown in d in FIG. 1 shows a prompt pop-up box 706, which includes a prompt message, a cancel button 707, and a second confirmation button 708; wherein the prompt message is used to remind the user that after modifying the time of the electronic device, some functions of the electronic device cannot operate normally. The cancel button 707 is used to not modify the time of the electronic device, and the second confirmation button 708 is used to set the time of the electronic device to the user-defined setting time.

[0142] In some embodiments, the user can Figure 7 For example, when the electronic device receives a trigger operation for the cancel button 707, the electronic device does not set the time of the electronic device to the user-defined time. When the electronic device returns to the desktop, the electronic device may display Figure 7 The interface shown in e; Figure 7 The interface shown in FIG. 5 includes a date and time icon 709. The date and time icon 709 is not the time set by the user. For example, the time set by the user is March 21, and the date displayed by the electronic device is March 22.

[0143] In some other embodiments, the user can Figure 7 In the interface shown in d in the figure, select to continue to modify the time of the electronic device. For example, when the electronic device receives a trigger operation for the second confirmation button 708, the electronic device sets the time of the electronic device to the user-defined time. When the electronic device returns to the desktop, the electronic device may display Figure 7 For example, the electronic device sets the time of the electronic device to March 21. After the electronic device exits the setting application, the electronic device may display Figure 7 The interface shown in f. Figure 7 The interface shown in FIG. 7 includes a date and time icon 710. The date and time icon 710 is not the time set by the user. For example, the time set by the user is March 21, and the date displayed by the electronic device is also March 21.

[0144] It is understandable that the electronic device in the embodiment of the present application may also use other forms or other prompt information to remind the user. For example, if the time difference between the user-defined time and the time service time is greater than a preset threshold, when the electronic device receives the user's operation to set the time by the user, the electronic device may remind the user by vibration, voice broadcast, etc. The custom setting time may cause some functions of the electronic device to not operate normally. The prompt method of the electronic device in the embodiment of the present application is not limited.

[0145] A time setting method provided by an embodiment of the present application includes: at a second moment, an electronic device receives an operation by a user to set the time to a second time, and the electronic device displays a first interface; wherein the first interface includes prompt information, a first button, and a second button; the prompt information is used to prompt that when the time of the electronic device is set to the second time, some functions of the electronic device cannot operate normally; the time difference between the second time and the timing time corresponding to the second moment is greater than a preset threshold; the second moment is later than the first moment.

[0146] When the electronic device receives a trigger operation for the first button, the electronic device does not set the time of the electronic device to the second time.

[0147] The user's operation of setting the time to the second time may correspond to the operation of Figure 7 The trigger operation of the first confirmation button 705 in the interface shown in c; the second time can be Figure 7 The date set by the user in the interface c is March 21, 2023, 8:00; the first interface may correspond to Figure 7 the first button may be a cancel button 707, and the second button may be a second confirmation button 708. The timing time corresponding to the second moment may be understood as the time of the timing server at the second moment.

[0148] At the second moment, the time difference between the second time obtained by the electronic device and the time service time corresponding to the second moment is greater than the preset threshold, and the electronic device can prompt the user. For example, the second time obtained by the electronic device is 8:00:00 on March 21, and the time service time corresponding to the second moment obtained by the electronic device is 8:00:00 on March 22, and the time difference is 24 hours. If the time difference is greater than the preset threshold, the electronic device can prompt the user that the currently modified time will cause some functions of the electronic device to be unusable.

[0149] The user can choose to cancel the time modification according to the prompt information. For example, when the electronic device receives the trigger operation for the first button, the electronic device does not set the time of the electronic device to the second time. Figure 7 In the interface shown in e, the time of the electronic device has not been modified.

[0150] The user may also choose to continue modifying the time according to the prompt information. For example, when the electronic device receives a trigger operation for the second button, the electronic device sets the time of the electronic device to the second time. Figure 7 In the interface shown in f, the time of the electronic device has not been modified.

[0151] It should be noted that, for ease of understanding, the above embodiments are described using the time points of the 24-hour system or the 12-hour system as examples. The first time, the second time, and the time service time may be timestamps, and the electronic device may calculate the time difference based on the timestamps. The above embodiments are described using the time difference in seconds as an example, but in actual applications, the time stamp may be in the order of ms, ns, etc. The examples in the above embodiments do not limit the time setting method in the embodiments of the present application.

[0152] A time setting method provided by an embodiment of the present application is that at a second moment, the electronic device receives an operation of setting the time to a second time by the user, and the electronic device displays a first interface; wherein the first interface includes prompt information, a first button, and a second button; the prompt information is used to prompt that when the time of the electronic device is set to the second time, some functions of the electronic device cannot operate normally; the time difference between the second time and the timing time corresponding to the second moment is greater than a preset threshold; the second moment is later than the first moment; when the electronic device receives a trigger operation for the first button, the electronic device does not set the time of the electronic device to the second time; or, when the electronic device receives a trigger operation for the second button, the electronic device sets the time of the electronic device to the second time. In this way, if the user chooses to give up modifying the time, the terminal device can reduce the scenario where some functions of the electronic device cannot operate normally. If the user chooses to confirm the modification of the time, when some functions of the electronic device cannot operate, the user can understand that the scene may be caused by the custom setting time, not the damage of the electronic device.

[0153] In the embodiment of the present application, the electronic device may also customize the first time or the second time in other ways, such as Figure 8 shown.

[0154] For example, taking the user-defined time as the second time as an example, the electronic device may display Figure 8 The interface shown in a, Figure 8 The interface shown in a in FIG. 8 includes a date setting button 801. When the electronic device receives a trigger operation for the date setting button 801, the electronic device may enter Figure 8 The interface shown in b. Figure 8 The interface shown in b in FIG. 8 shows a date input area. For example, the user can enter a second time in the date input area 802. The electronic device can display the user-defined time; for example, the electronic device can display the user-defined time in the date input area based on the user operation. The customized time can be March 21, 2023 (such as Figure 8 c interface in the figure).

[0155] Because the time difference between the user-defined time and the time service time exceeds the preset threshold, the electronic device can prompt the user when receiving the user's operation to set the time. For example: Figure 8 The interface shown in c in FIG. 1 further includes a first confirmation button 803; when the electronic device receives a trigger operation for the first confirmation button 803, the electronic device displays Figure 8 The interface shown in d. Figure 8 The interface shown in d in FIG. 8 shows a prompt pop-up box 804 , which includes a prompt message, a cancel button 805 and a second confirmation button 806 .

[0156] In some embodiments, the user can Figure 8 For example, when the electronic device receives a trigger operation for the cancel button 805, the electronic device does not set the time of the electronic device to the second time. After the electronic device returns to the desktop, the electronic device may display Figure 8 The interface shown in e. Figure 8 The interface shown in FIG. 8 shows a date and time icon 807. The date and time icon 807 is different from the second time set by the user. For example, the time of the electronic device is 8:00 on March 22, and the user-defined time is 8:00 on March 21.

[0157] In some other embodiments, when the electronic device receives a trigger operation for the second confirmation button 806, the electronic device sets the time of the electronic device to the second time. Figure 8 The interface shown in f. Figure 8 The interface shown in FIG. 8 shows a date and time icon 808. The date and time icon 808 is the same as the second time set by the user. For example, the time of the electronic device is 8:00 on March 21, and the user-defined time is 8:00 on March 21.

[0158] In a possible implementation, the electronic device may not be able to obtain the time service time corresponding to the moment when the user customizes the time setting. The embodiment of the present application provides another method for setting the time of an electronic device for this scenario.

[0159] For example, the electronic device may provide a function of customizing the time setting. For example, the electronic device may display Fig. 9 The interface shown in a, Fig. 9 The interface shown in a is the custom time setting interface. Fig. 9The interface shown in a in the figure includes a switch button 901 for automatically setting in the off state, a date setting button 902 and a time setting button 903; the date setting button 902 can be used to set the year, month and / or date, and the time setting button 903 can be used to set the hour, minute and / or second.

[0160] In some embodiments, taking the user-defined time setting as an example, when the electronic device receives a trigger operation for the time setting button 903, the electronic device displays Fig. 9 The interface shown in b. Fig. 9 The interface shown in b in FIG. 1 includes a time setting pop-up window 904, and the user can modify the time by sliding up and down the corresponding am / pm, hour, and minute. For example, the electronic device changes the time from am, 8:00, 00:00 (such as Fig. 9 b) to morning, 8:00, and 05:00 (as shown in Fig. 9 c interface in the figure). Fig. 9 In the interface shown in c in FIG. 1 , when the electronic device receives a trigger operation for the first confirmation button 905, the electronic device can set the time to 8:05. After the electronic device returns to the desktop, the electronic device can display Fig. 9 The interface shown in d. Fig. 9 The interface shown in d shows the user-defined time.

[0161] An embodiment of the present application provides a time setting method, including: at a third moment, the electronic device receives an operation by a user to set the time to a third time, and the electronic device sets the time of the electronic device to the third time; wherein the electronic device does not include a cached timing time, and the electronic device cannot obtain the timing time corresponding to the third moment; the electronic device cannot obtain the timing time corresponding to the third moment is related to at least one of the following: the electronic device is not connected to the network, and / or the electronic device does not receive the timing time corresponding to the third moment issued by the timing server within a preset time.

[0162] The user's operation of setting the time to the third time may correspond to the operation of Fig. 9 The third time may be the triggering operation of the first confirmation button 905 in the interface shown in c. Fig. 9 The time set by the user in the interface shown in c is 8:05.

[0163] When the electronic device receives an operation from the user to set the time to a third time, the electronic device may not be able to obtain the time service time corresponding to the third moment. At this time, the electronic device cannot determine whether the time difference between the third time and the time service time corresponding to the third moment exceeds the preset threshold, and the electronic device cannot determine whether to remind the user through a prompt message. At this time, the electronic device can set the time of the electronic device to the third time, and does not remind the user through a prompt message.

[0164] The electronic device may be unable to obtain the timing time corresponding to the third moment, which may include the following scenarios: the electronic device does not include cached timing time and the electronic device is not connected to the network, and / or the electronic device does not include cached timing time and the electronic device does not receive the timing time corresponding to the third moment issued by the timing server within a preset time.

[0165] It is understandable that the electronic device can calculate the timing time corresponding to the third moment by caching the timing time, or the electronic device can obtain the timing time corresponding to the third moment from the timing server. In one possible implementation, when the electronic device does not include the cached timing time, the electronic device can obtain the timing time corresponding to the third moment from the timing server. However, the information interaction between the electronic device and the timing server depends on the network. If the electronic device is not connected to the network, the electronic device cannot obtain the timing time corresponding to the third moment. In another possible implementation, the electronic device does not include the cached timing time, and the electronic device is connected to the network, and the electronic device can exchange information with the timing server. However, the electronic device has not received the timing time returned by the timing server after issuing the timing request, or the electronic device has not received the timing time returned by the timing server within the preset time. At this time, the electronic device cannot obtain the timing time corresponding to the third moment.

[0166] The embodiments of the present application will later describe in detail the scenario in which the electronic device cannot obtain the timing time corresponding to the third moment, and will not be described in detail here.

[0167] In addition to the scenarios shown in the above embodiments, the time setting method provided in the embodiments of the present application can also be applied to the following scenarios. For example, some applications can automatically set the time of electronic devices. When the electronic device recognizes that the application automatically sets the time of the electronic device, it can prompt the user application to request to modify the time of the electronic device. The electronic device can choose to intercept the application from modifying the time of the electronic device according to the user operation, or agree to the application to modify the time of the electronic device. In this way, it is possible to prevent the application from tampering with the time of the electronic device and improve the security of the electronic device.

[0168] The above embodiments illustrate the application scenarios of the time setting method in the embodiments of the present application. The following describes the process of the time setting method in the embodiments of the present application.

[0169] In the embodiment of the present application, the electronic device can obtain the time difference between the user-defined setting time and the time service time corresponding to the moment of the user-defined setting time, and determine whether to prompt the user according to the relationship between the time difference and the preset threshold. The method for the electronic device to obtain the time service time in the time setting method of the embodiment of the present application is first described below.

[0170] Exemplarily, taking the case where the user sets the time as the second time and the timing time corresponding to the moment of the user setting the time is the timing time corresponding to the second moment as an example. The method for the electronic device to obtain the timing time corresponding to the second moment may include: the electronic device calculates the timing time corresponding to the second moment based on the cached timing time cached in the electronic device before the second moment and the time difference between the second moment and the moment of the cached timing time; or, the electronic device receives the timing time corresponding to the second moment from the timing server.

[0171] In a possible implementation, the time setting method of the embodiment of the present application includes: the electronic device receives the timing time corresponding to the second moment from the timing server.

[0172] In a networked state, upon receiving an operation by a user to set the time to a second time, the electronic device can send a timing request to a timing server and receive a timing time corresponding to the second moment issued by the timing server.

[0173] Combine the following Fig.10 The process of receiving the timing time corresponding to the second moment from the timing server by the electronic device is described as follows: Fig.10 As shown:

[0174] Exemplarily, S1001, the time management service checks whether the electronic device is connected to the network.

[0175] The electronic device includes a time management service, which may be an alarm manager service. The network may be a cellular network and / or a WiFi network, etc. The electronic device may exchange information with a timing server in a networked state. The time management service of the electronic device may check whether the electronic device is connected to the network.

[0176] S1002: If the electronic device is connected to the network, the time management service notifies the time calibration service to send a timing request to the timing server.

[0177] The electronic device also includes a time calibration service, which may be NTP. The timing request is used to instruct the timing server to send the timing time to the electronic device, and the timing request may include the time of the electronic device when the electronic device sends the timing request.

[0178] After the time management service determines that the electronic device is connected to the network, the time management service can notify the time calibration service to obtain the timing time, and the time calibration service sends a timing request to the timing server.

[0179] S1003: Within a preset time, the time calibration service receives the timing time corresponding to the second moment sent by the timing server.

[0180] The preset time may be a custom time, and the preset time is used to evaluate the accuracy of the timing time corresponding to the second moment. After receiving the timing request of the electronic device, the timing server may return the timing time corresponding to the second moment to the electronic device. Within the preset time, the electronic device receives the timing time corresponding to the second moment.

[0181] It is understandable that the timing time corresponding to the second moment should be the standard time. When the network status is poor, the delay between the timing server sending the timing time corresponding to the second moment and the electronic device receiving the timing time corresponding to the second moment is large, and the error between the timing time corresponding to the second moment obtained by the electronic device and the standard time cannot meet the accuracy of the timing time corresponding to the second moment. Therefore, within the preset time, the timing time corresponding to the second moment received by the time calibration service is valid. Beyond the preset time, the accuracy of the timing time corresponding to the second moment received by the time calibration service is low, and the timing time difference corresponding to the second moment obtained by the electronic device cannot be used.

[0182] S1004: The time calibration service synchronizes the timing time corresponding to the second moment to the time management service.

[0183] After the time management service obtains the time service time corresponding to the second moment, the time management service can determine whether to prompt the user based on the time difference between the time service time corresponding to the second moment and the second time. For example, when the time difference is greater than the preset threshold, the electronic device can prompt the user through a pop-up window, vibration, voice broadcast, etc.; when the time difference is less than or equal to the preset threshold, the electronic device does not prompt.

[0184] In some embodiments, there is a time delay between the electronic device sending a timing request and receiving the timing time corresponding to the second moment, and the time delay is related to the network quality. Poor network quality will affect the response time of the electronic device, thereby increasing the time it takes for the electronic device to execute the time setting method. In order to reduce the response time of the electronic device, the embodiment of the present application also provides another possible implementation method.

[0185] In another possible implementation, the electronic device calculates the timing time corresponding to the second moment according to the cached timing time in the electronic device and the time difference between the second moment and the moment of the cached timing time.

[0186] The cached timing time may be the timing time acquired by the electronic device from the timing server before the second moment, and the electronic device stores the cached timing time locally.

[0187] Combine the following Fig.11 The calculation process of the cache time corresponding to the second moment is described. Fig.11 As shown:

[0188] At the moment of caching the cached timing time, the electronic device receives the cached timing time sent by the timing server. At the second moment, the electronic device can calculate the timing time corresponding to the second moment based on the cached timing time.

[0189] This is because the difference between the timing time corresponding to the second moment and the cached timing time is equal to the time difference between the second moment and the cached timing time; the timing time corresponding to the second moment = the time difference between the second moment and the cached timing time + the cached timing time; therefore, the electronic device can calculate the timing time corresponding to the second moment based on the cached timing time cached in the electronic device before the second moment, and the time difference between the second moment and the cached timing time.

[0190] Specifically, a method for an electronic device to obtain a timing time corresponding to a second moment is given below.

[0191] Exemplarily, the timing time t corresponding to the second moment satisfies the following formula:

[0192] t=(t C -t A )+t B

[0193] Among them, t A The time difference between the time when the electronic device is turned on and the time when the timing is cached; t B t is the cache timing time; C It is the time difference between the electronic device being turned on and the second moment.

[0194] At the moment of caching the cached timing time, the electronic device can send a timing request to the timing server, and the electronic device obtains the cached timing time t B , and the electronic device can record the time difference t between the moment when the electronic device is turned on and the moment when the cached timing time is cached A For example, electronic devices can obtain the cached timing time t through SystemClock.currentThreadTimeMilis B ; Electronic devices can use SystemClock.elapsedRealtime to record the time difference between the time when the electronic device is turned on and the time when the cached timing time is cached. A Electronic devices can be used to A and t B Stored locally.

[0195] At the second moment, the electronic device can record the time difference t between power-on and the second moment. CFor example, the electronic device may record the time difference between the electronic device being turned on and the second moment through SystemClock.elapsedRealtime.

[0196] The calculation principle of the formula can be as follows Fig.11 As shown in b:

[0197] The time difference between the second moment and the moment of caching the timing time = the time difference between the electronic device being turned on and the second moment t C - The time difference t between the time when the electronic device is turned on and the time when the cached time is cached A .

[0198] The timing time corresponding to the second moment t = the time difference between the second moment and the moment of caching the timing time (t C -t A )+cache timing time t B

[0199] The embodiment of the present application can also calculate the timing time corresponding to the second moment according to other methods, and the embodiment of the present application is not limited to this.

[0200] The embodiment of the present application provides a time setting method, in which the electronic device calculates the timing time corresponding to the second moment according to the cached timing time cached in the electronic device before the second moment, and the time difference between the second moment and the moment when the cached timing time is cached. In this way, the electronic device calculates the timing time corresponding to the second moment according to the cached timing time, and does not need to obtain the timing time corresponding to the second moment from the timing server side, thereby reducing the response time of the electronic device and improving the computing efficiency of the electronic device.

[0201] The above embodiment describes the method for obtaining the time service time corresponding to the moment of the user-defined setting time in the embodiment of the present application; the following takes the electronic device including the cached time service time as an example, combined with Figure 12-14 The time setting method provided in the embodiment of the present application is described in detail.

[0202] Fig.12 A schematic diagram of a time setting method provided in an embodiment of the present application is shown in FIG. Fig.12 As shown: For ease of explanation, the following takes the example where the electronic device receives a message from the user setting the time to the fourth time at the fourth moment.

[0203] The electronic device may include a time management service, a time calibration service, a memory, and an application program, etc. The time management service may be used to determine whether prompting the user of the time to be set will cause some functions of the electronic device to not operate normally; the time calibration service is used to interact with the timing server to obtain the timing time; the memory may be used to store the cached timing time, etc.; the application program may be used to run time-related functions, for example, the application program may be a weather application, a browser application, etc.

[0204] S1201. Before the fourth moment, the time calibration service sends a timing request to the timing server.

[0205] The time before the fourth moment may be the time when the electronic device accesses the network and is powered on, and / or the time when the electronic device does not update the cached timing time within the time threshold and the network status changes.

[0206] In some embodiments, when the electronic device is connected to the network and powered on, the electronic device may send a timing request to the timing server.

[0207] In other embodiments, when the electronic device does not update the cached timing time within the time threshold and the network status changes, the electronic device may send a timing request to the timing server. The change in network status may include the electronic device changing from not accessing the network to accessing the network, the electronic device switching from the WiFi network to the cellular network, the electronic device switching from the cellular network to the WiFi network, etc. The electronic device does not update the cached timing time within the time threshold, which can be understood as: the electronic device can update the cached timing time, and the time difference between the moment when the electronic device caches the previous cached timing time and the moment when the network status changes exceeds the time threshold, and the time threshold can be 24 hours.

[0208] S1202: The time calibration service receives the cached timing time sent by the timing server.

[0209] The time calibration service can receive the cached timing time returned by the timing server and synchronize the cached timing time to the time management service. For example, the time management service records the cached timing time through SystemClock.currentThreadTimeMilis.

[0210] S1203: The electronic device stores the cached timing time in a memory.

[0211] The electronic device may store the cached timing time, and the storage location may be a memory. In some embodiments, one or more cached timing times may be stored in the electronic device. For example, the electronic device may obtain the cached timing time corresponding to different moments, and the electronic device stores the cached timing time according to the timestamp. For another example, after obtaining the cached timing time with a later timestamp, the electronic device may update the previous cached timing time to the new cached timing time.

[0212] S1204. The time management service records the time difference between the time when the computer is turned on and the time when the timing is cached.

[0213] The time management service records the time difference between the moment when the electronic device is turned on and the moment when the cached timing time is cached through SystemClock.elapsedRealtime.

[0214] It should be noted that, in order to facilitate the description of the scenario in which the electronic device stores the cached timing time, the embodiment of the present application describes steps S1201-S1204 as the process executed by the electronic device at the moment of caching the cached timing time. In actual scenarios, there may be a delay in the process of the electronic device executing steps S1201-S1204, and the moment of caching the cached timing time may also be a period of time including the delay. The description of the moment of caching the cached timing time in the embodiment of the present application does not limit it.

[0215] S1205. At a fourth moment, the electronic device receives an operation by the user to set the time to a fourth time.

[0216] The operation of the user setting the time to the fourth time can be understood as: the user sets the fourth time in the time setting pop-up window or the date setting pop-up window, and clicks the first confirmation button.

[0217] S1206. The time management service records the time difference from power-on to the fourth moment.

[0218] The time management service records the time difference between the electronic device from powering on to the fourth moment through SystemClock.elapsedRealtime

[0219] S1207. The time management service obtains from the memory the time difference between the cached timing time and the time from when the computer is turned on to when the cached timing time is cached.

[0220] S1208. The time management service calculates the timing time corresponding to the fourth moment.

[0221] The calculation principle of the timing time corresponding to the fourth moment can be referred to Fig.11 The calculation principle of the timing time corresponding to the second moment will not be repeated here.

[0222] S1209: The time management service determines whether the time difference between the fourth time and the timing time corresponding to the fourth moment is greater than a preset threshold.

[0223] S1210: If the time difference between the fourth time and the timing time corresponding to the fourth moment is greater than a preset threshold, the electronic device displays a prompt message, a first button, and a second button.

[0224] When the time difference between the user-defined time and the time service time exceeds the preset threshold, the electronic device can remind the user whether to continue to modify the time through a prompt message. Figure 7 The prompt information in the interface shown in d; the first button can correspond to Figure 7 The cancel button 707 in the interface shown in d; the second button may correspond to Figure 7 The second confirmation button 708 in the interface shown in d.

[0225] S1211. The electronic device receives a trigger operation for a first button.

[0226] The trigger operation for the first button may correspond to the trigger operation for Figure 7 The triggering operation of the cancel button 707 in the interface shown in d.

[0227] S1212: In response to the triggering operation on the first button, the time management service does not set the time of the electronic device to the fourth time.

[0228] In the embodiment of the present application, the electronic device can remind the user through a prompt message when the user's customized setting of the time may affect some functions of the electronic device. After viewing the prompt message, the user can choose to cancel the time modification of the electronic device. In this way, the electronic device will not set the time to the fourth time, and the subsequent application will not have the problem of partial function failure when running, thereby improving the user experience.

[0229] Fig.13 The flowchart of another time setting method provided by an embodiment of the present application is shown. Exemplarily, after step S1209, the method further includes:

[0230] S1301: If the time difference between the fourth time and the timing time corresponding to the fourth moment is less than or equal to a preset threshold, the time management service sets the time of the electronic device to the fourth time.

[0231] S1302: The time management service notifies the application of the fourth time through a time setting broadcast.

[0232] S1303: The electronic device runs an application program; wherein some functions of the application program will not be unavailable.

[0233] In an embodiment of the present application, the time difference between the fourth time and the timing time corresponding to the fourth moment is less than or equal to a preset threshold, indicating that the time set by the user is within the fault-tolerant time difference range of the application. The electronic device sets the time to the time set by the user, and the application of the electronic device will not be affected by the time set by the user, thereby reducing the problem of some functions of the application not being able to operate normally.

[0234] Fig.14 A flow chart of another time setting method provided in an embodiment of the present application is shown. Exemplarily, after step S1210, the method further includes:

[0235] S1401: The electronic device receives a trigger operation for a second button.

[0236] The trigger operation for the second button may correspond to the trigger operation for Figure 7 The triggering operation of the second confirmation button 708 in the interface shown in d.

[0237] S1402: In response to a triggering operation on the second button, the time management service sets the time of the electronic device to a fourth time.

[0238] S1403: The time management service notifies the application of the fourth time via a time setting broadcast.

[0239] S1404: The electronic device runs an application.

[0240] The electronic device sets the time to the fourth time, and some functions of the electronic device may become unavailable during operation.

[0241] Optionally, in some embodiments, the electronic device sets the time to a user-defined time, and the user chooses to continue modifying the time after viewing the prompt information.

[0242] At the fifth moment, an application is running in the foreground of the electronic device, and the electronic device sends data information to other devices, where the data information includes the time synchronization time corresponding to the fifth moment.

[0243] When the electronic device interacts with other devices, the electronic device can obtain the timing time corresponding to the fifth moment from the timing server, and send data information carrying the timing time corresponding to the fifth moment to other devices. In this way, the interaction will not fail due to the mismatch between the time of the electronic device and the time of other devices, thereby reducing the scenario where some functions of the electronic device cannot be used due to the user's customized setting of time.

[0244] For example, when an electronic device loads a web page, the electronic device can send a timing request to the timing server. After receiving the timing time, the electronic device sends an access request carrying the timing time to the network server. After the network server successfully verifies the timing time, it establishes a network channel with the electronic device.

[0245] In the embodiment of the present application, the electronic device can remind the user through a prompt message when the user's custom setting of the time may affect some functions of the electronic device. After viewing the prompt message, the user can choose to confirm the time modification of the electronic device. In this way, the electronic device sets the time to the fourth time, and when some functions of the subsequent application fail during operation, the user can understand that the scene may be caused by the manual setting of the time, not the damage of the electronic device.

[0246] In some embodiments, the electronic device may not store cached timing time. For example, after the electronic device is turned on, it has not been connected to the network, and the electronic device cannot obtain the cached timing time from the timing server; for another example, after the electronic device stores the cached timing time, the cached timing time data is lost. In this case, the electronic device can obtain the timing time from the timing server. Figure 15-17 The time setting method provided in the embodiment of the present application is described.

[0247] Fig.15 FIG. 1 is a flow chart of a time setting method provided in an embodiment of the present application. Fig.15 As shown:

[0248] For example, at the fourth moment, the electronic device receives a signal from the user that the time is set to the fourth time.

[0249] S1501. At a fourth moment, the electronic device receives an operation by a user to set the time to a fourth time.

[0250] The operation of the user setting the time to the fourth time can be understood as: the user sets the fourth time in the time setting pop-up window or the date setting pop-up window, and clicks the first confirmation button.

[0251] S1502: In response to the user setting the time to a fourth time, the time management service obtains the fourth time.

[0252] The electronic device may set the time to the fourth time based on the setting application. When the electronic device receives the user's operation to set the time to the fourth time, the setting application may synchronize the fourth time to the time management service through the time setting interface; the time setting interface may be time set.

[0253] S1503: The time management service checks whether the electronic device is connected to the network.

[0254] S1504: If the electronic device is connected to the network, the time management service notifies the time calibration service to send a timing request to the timing server.

[0255] S1505: Within a preset time, the time calibration service receives the timing time corresponding to the second moment sent by the timing server.

[0256] S1506. The time calibration service synchronizes the timing time corresponding to the second moment to the time management service.

[0257] For steps S1503-S1506, reference may be made to the relevant descriptions of steps S1001-S1004, which will not be repeated here.

[0258] S1507: The time management service determines whether the time difference between the fourth time and the timing time corresponding to the fourth moment is greater than a preset threshold.

[0259] S1508: If the time difference between the fourth time and the timing time corresponding to the fourth moment is greater than a preset threshold, the electronic device displays a prompt message, a first button, and a second button.

[0260] S1509: The electronic device receives a trigger operation for the first button.

[0261] S1510: In response to the triggering operation on the first button, the time management service does not set the time of the electronic device to the fourth time.

[0262] For steps S1507-S1510, please refer to the relevant descriptions of steps S1209-S1212, which will not be repeated here.

[0263] In the embodiment of the present application, the electronic device can remind the user through a prompt message when the user's customized setting of the time may affect some functions of the electronic device. After viewing the prompt message, the user can choose to cancel the time modification of the electronic device. In this way, the electronic device will not set the time to the fourth time, and the subsequent application will not have the problem of partial function failure when running, thereby improving the user experience.

[0264] Fig.16 FIG. 1 is a flow chart showing another time setting method provided in an embodiment of the present application.

[0265] Optionally, after the time management service checks whether the electronic device is connected to the network in step S1503, the following further includes:

[0266] S1601: If the electronic device is not connected to the network, the time management service sets the time of the electronic device to the fourth time.

[0267] S1602: The time management service notifies the application of the fourth time through a time setting broadcast.

[0268] S1603: The electronic device runs an application.

[0269] It is understandable that if the electronic device is not connected to the network, it cannot interact with the timing server. The electronic device does not store the cached timing time and cannot obtain the timing time from the timing server. The electronic device cannot obtain the timing time corresponding to the fourth moment, nor can it determine whether to prompt based on the time difference between the fourth time and the timing time corresponding to the fourth moment. At this time, the electronic device can set the time to the user-defined setting time.

[0270] Fig.17 FIG. 1 is a flow chart showing another time setting method provided in an embodiment of the present application.

[0271] Optionally, after step S1504, the method further includes:

[0272] S1701: Within a preset time, the time calibration service does not receive the timing time corresponding to the fourth moment sent by the timing server.

[0273] In one possible implementation, the time calibration service does not receive the timing time corresponding to the fourth moment. It is understandable that when the electronic device is connected to the network but the network quality is poor, after the electronic device sends a timing request, the timing server may not receive the timing request, or the electronic device may not receive the timing time corresponding to the fourth moment issued by the timing server, resulting in the electronic device failing to obtain the timing time corresponding to the fourth moment.

[0274] In another possible implementation, after the preset time has passed, the time calibration service receives the timing time corresponding to the fourth moment from the timing server. It is understandable that the electronic device is connected to the network, but the network quality is poor, and the delay is large when the data packet is transmitted between the electronic device and the timing server. After the preset time, the timing time corresponding to the fourth moment received by the time calibration service is in error and has low accuracy. At this time, the electronic device cannot calculate the timing time corresponding to the fourth moment as the accurate time.

[0275] S1702: The time management service sets the time of the electronic device to the fourth time.

[0276] S1703: The time management service notifies the application of the fourth time via a time setting broadcast.

[0277] S1704. The electronic device runs an application.

[0278] It is understandable that the electronic device cannot obtain the time service time corresponding to the fourth moment, nor can it determine whether to prompt based on the time difference between the fourth time and the time service time corresponding to the fourth moment. At this time, the electronic device can set the time to the time set by the user.

[0279] It should be noted that in the embodiment of the present application, when the electronic device cannot obtain the time service time corresponding to the fourth moment, the electronic device sets the time of the electronic device to the fourth time. In other embodiments, when the electronic device cannot obtain the time service time corresponding to the fourth moment, the electronic device may also remind the user through a prompt message that the currently modified time may affect some functions of the application. The embodiment of the present application does not limit this.

[0280] Combine the following Fig.18 The overall process of a time setting method provided in an embodiment of the present application is described. The following takes the time set by the user as the fourth time as an example. Fig.18 As shown:

[0281] S1801. At a fourth moment, the electronic device receives an operation by a user to set the time to a fourth time.

[0282] S1802: The electronic device determines whether cached timing time is stored in the electronic device.

[0283] The electronic device can store data of the cached timing time and data of the moment of the cached timing time. The electronic device can calculate the timing time corresponding to the fourth moment based on the cached timing time.

[0284] S1803: If the electronic device includes a cached timing time, the electronic device calculates the timing time corresponding to the fourth moment.

[0285] S1804: The electronic device determines whether the time difference between the fourth time and the timing time corresponding to the fourth moment is greater than a preset threshold.

[0286] S1805: If the time difference between the fourth time and the timing time corresponding to the fourth moment is greater than a preset threshold, the electronic device displays a prompt message, a first button, and a second button.

[0287] S1806: The electronic device receives a trigger operation for the first button.

[0288] S1807: In response to the triggering operation on the first button, the electronic device does not set the time of the electronic device to the fourth time.

[0289] Among them, steps S1801-S1807 can refer to the relevant descriptions of steps S1201-S1212, which will not be repeated here.

[0290] Optionally, after step S1804, the method further includes:

[0291] S1808: If the time difference between the fourth time and the timing time corresponding to the fourth moment is less than or equal to the preset threshold, the electronic device sets the time of the electronic device to the fourth time.

[0292] S1809. The electronic device issues a time setting broadcast.

[0293] S1810. The electronic device runs an application.

[0294] Among them, steps S1808-S1810 can refer to the relevant descriptions of steps S1301-S1303, which will not be repeated here.

[0295] Optionally, after step S1805, the method further includes:

[0296] S1811: When the electronic device receives a trigger operation for the second button, the electronic device sets the time of the electronic device to a fourth time.

[0297] Among them, step S1811 can refer to the relevant description of steps S1401-S1404, which will not be repeated here.

[0298] Alternatively, after step S1802, the method further includes:

[0299] S1812: If the electronic device does not include cached timing time, determine whether the electronic device is connected to the network.

[0300] S1813: If the electronic device is connected to the network, the electronic device sends a timing request to the timing server.

[0301] S1814: The electronic device determines whether the timing time corresponding to the fourth moment is received within a preset time.

[0302] S1815: If the electronic device receives the timing time corresponding to the fourth moment within the preset time, the electronic device executes step S1804.

[0303] Among them, steps S1812-S1815 can refer to the relevant descriptions of steps S1501-S1510 and will not be repeated here.

[0304] Optionally, after step S1813, the method further includes:

[0305] S1816: If the electronic device is not connected to the network, the electronic device sets the time of the electronic device to the fourth time.

[0306] Among them, step S1816 can refer to the relevant description of steps S1601-S1603, which will not be repeated here.

[0307] Optionally, after step S1815, the method further includes:

[0308] S1817: If the electronic device does not receive the timing time corresponding to the fourth moment within the preset time, the electronic device sets the time of the electronic device to the fourth time.

[0309] Among them, step S1817 can refer to the relevant description of steps S1701-S1704, which will not be repeated here.

[0310] It should be noted that, in order to facilitate a clear description of the process of executing the time setting method of the electronic device in different scenarios, the time set by the user at different times is defined as the first time, the second time, the third time and the fourth time in the embodiment of the present application. The first time, the second time, the third time and the fourth time can be the same time or different times. When the electronic device obtains any time set by the user, the electronic device can execute the time setting method provided in the embodiment of the present application. The embodiment of the present application does not limit this.

[0311] The time setting method of the embodiment of the present application has been described above, and the device for executing the above time setting method provided by the embodiment of the present application is described below. Those skilled in the art can understand that the method and the device can be combined and referenced with each other, and the relevant device provided by the embodiment of the present application can execute the steps in the above time setting method.

[0312] like Fig.19 As shown, Fig.19 A structural schematic diagram of a time setting device provided in an embodiment of the present application. The time setting device can be a terminal device in an embodiment of the present application, or a chip or chip system in the terminal device.

[0313] like Fig.19 As shown, the time setting device 1900 can be used in a communication device, circuit, hardware component or chip, and the time setting device includes: a display unit 1901 and a processing unit 1902. The display unit 1901 is used to support the display step performed by the time setting device 1900; the processing unit 1902 is used to support the time setting device 1900 to perform information processing steps.

[0314] In a possible implementation, the time setting device 1900 may also include a communication unit 1903. Specifically, the communication unit is used to support the time setting device 1900 to perform the steps of sending and receiving data. The communication unit 1903 may be an input or output interface, a pin or a circuit.

[0315] In a possible embodiment, the time setting device may further include: a storage unit 1904. The processing unit 1902 and the storage unit 1904 are connected via a line. The storage unit 1904 may include one or more memories, and the memory may be a device used to store programs or data in one or more devices or circuits. The storage unit 1904 may exist independently and be connected to the processing unit 1902 of the time setting device via a communication line. The storage unit 1904 may also be integrated with the processing unit 1902.

[0316] The storage unit 1904 can store computer-executable instructions of the method in the terminal device so that the processing unit 1902 executes the method in the above embodiment. The storage unit 1904 can be a register, a cache, or a RAM, etc. The storage unit 1904 can be integrated with the processing unit 1902. The storage unit 1904 can be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, and the storage unit 1904 can be independent of the processing unit 1902.

[0317] The time setting method provided in the embodiment of the present application can be applied to electronic devices with communication functions. The electronic device includes an electronic device, and the specific device form of the electronic device can refer to the above related description, which will not be repeated here.

[0318] An embodiment of the present application provides an electronic device, which includes: a processor and a memory; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory, so that the electronic device executes the above method.

[0319] The embodiment of the present application provides a chip. The chip includes a processor, and the processor is used to call a computer program in a memory to execute the technical solution in the above embodiment. Its implementation principle and technical effect are similar to those of the above related embodiments, and will not be repeated here.

[0320] The embodiments of the present application also provide a computer-readable storage medium. The computer-readable storage medium stores a computer program. The above method is implemented when the computer program is executed by the processor. The method described in the above embodiment can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. If implemented in software, the function can be stored as one or more instructions or codes on a computer-readable medium or transmitted on a computer-readable medium. Computer-readable media can include computer storage media and communication media, and can also include any medium that can transfer a computer program from one place to another. The storage medium can be any target medium that can be accessed by a computer.

[0321] In one possible implementation, a computer-readable medium may include RAM, ROM, compact disc read-only memory (CD-ROM) or other optical disk storage, disk storage or other magnetic storage devices, or any other medium that is intended to carry or store the required program code in the form of instructions or data structures and can be accessed by a computer. Moreover, any connection is appropriately referred to as a computer-readable medium. For example, if a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL) or wireless technology (such as infrared, radio and microwave) is used to transmit software from a website, server or other remote source, the coaxial cable, fiber optic cable, twisted pair, DSL or wireless technology such as infrared, radio and microwave are included in the definition of medium. Disks and optical disks as used herein include optical disks, laser disks, optical disks, digital versatile disks (DVD), floppy disks and Blu-ray disks, where disks usually reproduce data magnetically, while optical disks reproduce data optically using lasers. Combinations of the above should also be included in the scope of computer-readable media.

[0322] An embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is executed, the computer executes the above method.

[0323] The present application embodiment is described with reference to the flowchart and / or block diagram of the method, device (system) and computer program product according to the present application embodiment. It should be understood that each flow process and / or box in the flow chart and / or block diagram and the combination of the flow chart and / or box in the flow chart and / or block diagram can be realized by computer program instructions. These computer program instructions can be provided to the processing unit of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable device to produce a machine, so that the instructions executed by the processing unit of the computer or other programmable data processing device produce a device for realizing the function specified in one flow chart or multiple flows and / or one box or multiple boxes of the block chart.

[0324] The above specific implementation methods further illustrate the purpose, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above are only specific implementation methods of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made on the basis of the technical solutions of the present invention should be included in the scope of protection of the present invention.

Claims

1. A time setting method, characterized in that: The method is applied to an electronic device, the electronic device includes a time management service and a time calibration service, and the method includes: at a first moment, the electronic device receives an operation of a user setting the time to a first time, the electronic device sets the time of the electronic device to the first time, and the time difference between the first time and the timing time corresponding to the first moment is less than or equal to a preset threshold; the timing time is related to a timing server; When the electronic device is connected to the network and powered on, and / or when the electronic device does not update the cached timing time within the time threshold and the network status changes, in response to a timing request sent to the timing server, the time calibration service receives the cached timing time sent by the timing server; At a second moment, the electronic device receives an operation by a user to set the time to a second time; The electronic device calculates the timing time corresponding to the second moment according to the cached timing time and the time difference between the second moment and the moment when the cached timing time is cached; When the time difference between the second time and the timing time corresponding to the second moment is greater than the preset threshold, the electronic device displays a first interface; wherein the first interface includes prompt information, a first button and a second button; the prompt information is used to prompt that when the time of the electronic device is set to the second time, some functions of the electronic device cannot operate normally; the second moment is later than the first moment; When the electronic device receives a trigger operation for the first button, the electronic device does not set the time of the electronic device to the second time; Or, when the electronic device receives a trigger operation for the second button, the electronic device sets the electronic device time to the second time; The time management service in the electronic device notifies the application of the second time through a time setting broadcast, and the application is an application that uses the second time; At a third moment, the electronic device receives an operation by the user to set the time to a third time, and the electronic device sets the time of the electronic device to the third time; wherein, the electronic device does not include a cached timing time, and the electronic device does not obtain the timing time corresponding to the third moment; the electronic device does not obtain the timing time corresponding to the third moment is related to at least one of the following: the electronic device is not connected to the network, and / or the electronic device does not receive the timing time corresponding to the third moment issued by the timing server within a preset time; the third moment is later than the second moment.

2. The method according to claim 1, characterized in that The timing time t corresponding to the second moment satisfies the following formula: in, The time difference between the moment when the electronic device is turned on and the moment when the cached timing time is cached; The cache timing time; is the time difference between the electronic device being turned on and the second moment.

3. An electronic device, characterized in that: include: Processor and memory; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the electronic device performs the method according to claim 1 or 2.

4. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to claim 1 or 2 is implemented.

5. A computer program product, characterized in that The invention comprises a computer program which, when being executed, causes a computer to execute the method as claimed in claim 1 or 2.

Citation Information

Patent Citations

  • Mobile terminal, time setting device and method of mobile terminal

    CN101159945A

  • Time signal compensation method, wireless time signal terminal, electronic device, and storage medium

    WO2022242349A1