Countdown processing method and related equipment

By calculating the time offset and using a timer to process the countdown, the problem of high system resource consumption under multi-activity pages is solved, the accuracy and efficiency of the countdown are achieved, and the user experience is improved.

CN118535252APending Publication Date: 2024-08-23SHENZHEN QIANHAI BAIDI NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410585175.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-11
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

The existing countdown processing method needs to create multiple timers when using multiple active pages, resulting in large system resource consumption and affecting user experience.

Method used

By detecting the time offset between the system setting time and the standard time, calculating the countdown time of each activity, and using a timer for countdown processing, the number of timers and resource consumption are reduced.

Benefits of technology

It achieves the reduction of system resource consumption while ensuring the accuracy and efficiency of countdown processing, preventing users from missing activities and improving user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118535252A
    Figure CN118535252A
Patent Text Reader

Abstract

The embodiment of the invention discloses a countdown processing method and related equipment, which are used for performing countdown processing under the condition of reducing system resource consumption. The method comprises the steps that if a trigger signal for displaying a first countdown page is detected, system setting time, standard time and activity time of at least one target activity in the first countdown page are obtained, and first time offset between the standard time and the system setting time is determined, based on the first time offset, the system setting time and the activity time corresponding to each target activity in the countdown page, determining countdown time of each target activity in the first countdown page, and creating a first timer of the first countdown page, and calling a first timer to execute countdown processing according to the countdown time of each target activity, and displaying the processed countdown time of each target activity in the position of the corresponding target activity in the first countdown page.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present application relate to the field of countdown processing, and more specifically, to a countdown processing method, a countdown processing apparatus, a countdown processing device, a computer-readable storage medium, and a computer program product including instructions or a computer program. Background Art

[0002] Sometimes businesses will hold some activities, such as promotions, discounts, limited-time free activities, etc., to increase user participation and improve user stickiness to the business. With the increase in activity apps, in order to prevent users from missing the effective time to participate in the activity, these apps often set up activity countdowns. However, since users can modify the system time, if the countdown is not processed, the countdown seen by users may be wrong, thus affecting the user experience.

[0003] The existing countdown processing is: for each activity in each countdown page of the target application (such as an activity app), a timer is created. This will result in a large number of timers when there are multiple activities in the countdown page, and the creation and management of each timer requires a certain amount of memory and CPU resources, resulting in a large consumption of system resources during the countdown processing. Summary of the invention

[0004] Embodiments of the present application provide a countdown processing method, a countdown processing apparatus, a countdown processing device, a computer-readable storage medium, and a computer program product including instructions or a computer program, which can perform countdown processing while reducing system resource consumption.

[0005] In a first aspect, an embodiment of the present application provides a countdown processing method, including:

[0006] If a trigger signal for displaying a first countdown page of the application is detected at a first moment, a system setting time at the first moment, a standard time at the first moment, and an activity time of at least one target activity in the first countdown page are obtained;

[0007] Determining a first time offset between a standard time at the first moment and a system set time at the first moment;

[0008] Determine the countdown time of each target activity in the first countdown page relative to the first moment based on the first time offset, the system setting time of the first moment, and the activity time corresponding to each target activity in the countdown page;

[0009] Creating a first timer of the first countdown page, and calling the first timer to perform countdown processing according to the countdown time of each target activity relative to the first moment, so as to obtain the processed countdown time of each target activity relative to the first moment;

[0010] The processed countdown time of each target activity relative to the first moment is displayed at a position corresponding to the target activity in the first countdown page.

[0011] In a second aspect, an embodiment of the present application provides a countdown processing device, including:

[0012] an obtaining unit, configured to obtain, if a trigger signal for displaying a first countdown page of an application is detected at a first moment, a system setting time at the first moment, a standard time at the first moment, and an activity time of at least one target activity in the first countdown page;

[0013] a determining unit, configured to determine a first time offset between a standard time at the first moment and a system setting time at the first moment;

[0014] The determining unit is further configured to determine the countdown time of each target activity in the first countdown page relative to the first moment based on the first time offset, the system setting time of the first moment, and the activity time corresponding to each target activity in the countdown page;

[0015] A countdown unit, used to create a first timer of the first countdown page, and call the first timer to perform countdown processing according to the countdown time of each target activity relative to the first moment, so as to obtain the processed countdown time of each target activity relative to the first moment;

[0016] A display unit is used to display the processed countdown time of each target activity relative to the first moment at a position corresponding to the target activity in the first countdown page.

[0017] In a third aspect, an embodiment of the present application provides a countdown processing device, including:

[0018] CPU, memory, input and output interfaces, wired or wireless network interfaces, and power supply;

[0019] The memory is a short-term storage memory or a persistent storage memory;

[0020] The central processing unit is configured to communicate with the memory and execute instruction operations in the memory to perform the countdown processing method described above.

[0021] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which includes instructions. When the instructions are executed on a computer, the computer executes the aforementioned countdown processing method.

[0022] In a fifth aspect, an embodiment of the present application provides a computer program product comprising instructions, which, when the computer program product is run on a computer, enables the computer to execute the aforementioned countdown processing method.

[0023] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages: the first time offset between the standard time of the first moment and the system setting time of the first moment can be determined, based on the first time offset, the system setting time of the first moment and the activity time corresponding to each target activity in the countdown page, the countdown time of each target activity in the first countdown page relative to the first moment is determined, the first timer of the first countdown page is created, and the first timer is called to perform countdown processing according to the countdown time of each target activity relative to the first moment to obtain the processed countdown time of each target activity relative to the first moment, all target activities of a countdown page use a timer together, compared with the prior art that each activity creates a timer, reducing the consumption of memory and CPU resources for creating and managing multiple timers. Furthermore, only one time offset needs to be calculated, and the countdown time corresponding to each target activity of the countdown page can be directly calculated based on the time offset and the system setting time and the corresponding activity time, reducing the loss of computing resources for calculating the countdown time corresponding to each target activity, and therefore, the loss of system resources is small. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 A schematic diagram of the architecture of a countdown processing system disclosed in an embodiment of the present application;

[0025] Figure 2 A flowchart of a countdown processing method disclosed in an embodiment of the present application;

[0026] Figure 3 A flowchart of another countdown processing method disclosed in an embodiment of the present application;

[0027] Figure 4 A flow chart of a countdown processing method disclosed in the prior art;

[0028] Figure 5 A flowchart of another countdown processing method disclosed in an embodiment of the present application;

[0029] Figure 6A flowchart of another countdown processing method disclosed in an embodiment of the present application;

[0030] Figure 7 A flowchart of another countdown processing method disclosed in an embodiment of the present application;

[0031] Figure 8 A flowchart of another countdown processing method disclosed in an embodiment of the present application;

[0032] Fig. 9 A schematic diagram of the structure of a countdown processing device disclosed in an embodiment of the present application;

[0033] Fig.10 A schematic diagram of the structure of a countdown processing device disclosed in an embodiment of the present application. DETAILED DESCRIPTION

[0034] Embodiments of the present application provide a countdown processing method, a countdown processing apparatus, a countdown processing device, a computer-readable storage medium, and a computer program product including instructions or a computer program, which can perform countdown processing while reducing system resource consumption.

[0035] See also Figure 1 , the architecture of the countdown processing system in the embodiment of the present application includes:

[0036] Server 101 and countdown processing device 102. When performing countdown processing, server 101 can be connected to countdown processing device 102. If a trigger signal for displaying the first countdown page is detected, countdown processing device 102 can obtain system setting time, standard time and activity time of at least one target activity in the first countdown page from server 101, determine the first time offset between the standard time and the system setting time, determine the countdown time of each target activity in the first countdown page based on the first time offset, system setting time and activity time corresponding to each target activity in the countdown page, call the first timer to perform countdown processing according to the countdown time of each target activity, and display the processed countdown time of each target activity at the position of the corresponding target activity in the first countdown page.

[0037] based on Figure 1 The countdown processing system shown is shown in Figure 2 , Figure 2 This is a flow chart of a countdown processing method disclosed in an embodiment of the present application, the method comprising:

[0038] 201. If a trigger signal for displaying a first countdown page of an application is detected at a first moment, a system setting time at the first moment, a standard time at the first moment, and an activity time of at least one target activity in the first countdown page are obtained.

[0039] In this embodiment, when performing countdown processing, if a trigger signal for displaying the first countdown page of the application is detected at the first moment, the system setting time at the first moment, the standard time at the first moment and the activity time of at least one target activity in the first countdown page can be obtained.

[0040] For details, please refer to Figure 3 , Figure 3 A flow chart of another countdown processing method disclosed in an embodiment of the present application, comprising Figure 3 It can be seen that the data source can be obtained through the interface, that is, the API interface (the interface for obtaining server data) can be called to obtain data related to the target activity (including but not limited to the standard time of the first moment and the activity time of at least one target activity in the first countdown page), and saved in the cache in the form of an array. Secondly, it should be understood that if the application is running in the iOS system, a tag value can be defined for each active cell of the first countdown page (each row of the iOS UI list), such as 1000+index (index is the index value, starting from 0, representing the cell number of the list), so as to correspond this tag value to the index of the data in the data source.

[0041] It is understandable that the activity time includes the activity start time and / or activity end time, which is not specifically limited here.

[0042] To be more specific, for example, if the user changes the system time of the mobile phone, the system setting time obtained at the first moment is 00:00:00 on June 15, 2023, the standard time of the first moment is 00:00:00 on June 17, 2023, and the activity time of target activity A in the first countdown page is "The activity starts on June 18, 2023 and ends on June 28, 2023" (time unit is day), and the activity time of target activity B is "The activity starts at 00:00:00 on June 18, 2023 and ends at 00:00:00 on June 28, 2023" (time unit is second).

[0043] 202. Determine a first time offset between a standard time at a first moment and a system setting time at the first moment.

[0044] After obtaining the system setting time at the first moment, the standard time at the first moment, and the activity time of at least one target activity in the first countdown page, a first time offset between the standard time at the first moment and the system setting time at the first moment may be determined.

[0045] Specifically, a first time offset between the first standard time at the interface and the first system setting time at the first time may be calculated, and the first time offset may be cached.

[0046] To be more specific, continuing with the above example, the system setting time at the first moment is 00:00:00 on June 15, 2023, and the standard time at the first moment is 00:00:00 on June 17, 2023, then the first time offset is 2*24*60*60=172800 (seconds). It can be understood that the first time offset can be in the form of other units besides seconds, which is not limited here.

[0047] It should be understood that the standard time at the first moment and the system setting time at the first moment can be a sufficiently small time unit to ensure that it is less than or equal to the time unit of all target activities, thereby ensuring the accuracy of subsequent calculations to determine the countdown time of each target activity in the first countdown page relative to the first moment.

[0048] 203. Determine the countdown time of each target activity in the first countdown page relative to the first moment based on the first time offset, the system setting time at the first moment, and the activity time corresponding to each target activity in the countdown page.

[0049] After determining the first time offset between the standard time at the first moment and the system setting time at the first moment, the countdown time of each target activity in the first countdown page relative to the first moment can be determined based on the first time offset, the system setting time at the first moment, and the activity time corresponding to each target activity in the countdown page.

[0050] Specifically, you can get the current cell on the screen (corresponding to a target activity), find the corresponding data in the data source (the activity time corresponding to a target activity) according to the tag index value of the cell, and then determine the countdown time of the target activity relative to the first moment based on the first time offset, the system setting time at the first moment, and the activity time corresponding to the target activity.

[0051] To be more specific, continuing with the above example, we can obtain the cell of the current target activity A on the screen, find the activity time of the target activity A in the data source according to the tag index value of the cell of the target activity A, and then based on the first time offset 2*24*60*60=172800 (seconds), the system setting time of the first moment 00:00 on June 15, 2023 and the activity time corresponding to the target activity A "the activity starts on June 18, 2023 and ends on June 28, 2023", determine the countdown time of the target activity A relative to the first moment as "18-(15+2 )=1 day, there are 28-(15+2)=11 days left to the end of the activity", and based on the first time offset 2*24*60*60=172800 (seconds), the system setting time of the first moment June 15, 2023 00:00:00 and the activity time corresponding to the target activity B "the activity starts at 00:00:00 on June 18, 2023, and ends at 00:00:00 on June 28, 2023", determine the countdown time of the target activity B relative to the first moment "there are 1 day 00:00:00 left to the start of the activity, and 11 days 00:00:00 left to the end of the activity".

[0052] It should be understood that by determining the countdown time of each target activity in the first countdown page relative to the first moment based on the first time offset, the system setting time of the first moment, and the activity time corresponding to each target activity in the countdown page, it can prevent the user from tampering with the system time to after or before the activity start time, resulting in incorrect activity time displayed on the first countdown page, causing the user to miss the activity, etc., thereby affecting the user experience.

[0053] It can be understood that the number of days left until the start of the activity can be determined through the "activity start time - (offset + system setting time)", and the number of days left until the end of the activity can be determined through the "activity end time - (offset + system setting time)". In other words, no matter which target activity, no matter whether it is calculating the corresponding countdown time for the start or end, it is necessary to calculate the offset, and the offset is a fixed value calculated by the system setting time and the standard time, which is not affected by the start / end time of the target activity. Therefore, the offset calculation only needs to be performed once, and after the first calculation of the offset, it is saved. Each time the countdown time of the target activity is calculated thereafter, it only needs to be calculated based on the offset, the system setting time and the start / end time of the target activity, and it can be used directly in subsequent countdown calculations without the need to recalculate the offset. This can avoid the waste of system resources caused by repeated calculation of the offset and improve the running efficiency of the program.

[0054] 204. Create a first timer of the first countdown page, and call the first timer to perform countdown processing according to the countdown time of each target activity relative to the first moment, so as to obtain the processed countdown time of each target activity relative to the first moment.

[0055] After determining the countdown time of each target activity in the first countdown page relative to the first moment, a first timer of the first countdown page can be created, and the first timer can be called to perform countdown processing according to the countdown time of each target activity relative to the first moment to obtain the processed countdown time of each target activity relative to the first moment.

[0056] Specifically, for example, the first timer can be called to perform countdown processing according to the countdown time of target activity A relative to the first moment, "1 day from the start of the activity, 11 days from the end of the activity", for example, the processed countdown time of target activity A relative to the first moment can be obtained as "0.5 days from the start of the activity, 10.5 days from the end of the activity". For another example, the first timer can be called to perform countdown processing according to the countdown time of target activity B relative to the first moment, "the activity starts at 00:00:00 on June 18, 2023, and ends at 00:00:00 on June 28, 2023", for example, the processed countdown time of target activity B relative to the first moment can be obtained as "12:00:00 from the start of the activity, 10 days 12:00:00 from the end of the activity".

[0057] It should be understood that the embodiment of the present application only requires one timer (timer), while the prior art requires multiple timers. Figure 4 , Figure 4 A flow chart of a countdown processing method disclosed in the prior art, comprising Figure 4 It can be seen that each activity corresponds to a timer. When there are multiple activities in the countdown page, the number of timers will be large, and the creation and management of each timer requires a certain amount of memory and CPU resources, which leads to a large consumption of system resources during the countdown process. Figure 3 ,Depend on Figure 3 It can be seen that only one timer is needed to implement countdown processing. All target activities of a countdown page share one timer. Compared with the prior art in which a timer is created for each activity, the consumption of memory and CPU resources for creating and managing multiple timers is reduced.

[0058] It can also be understood that, compared with the prior art, the embodiments of the present application can also achieve the following effects:

[0059] (1) Only one timer needs to be created and used, and only one timer switch needs to be processed, which improves the controllability of the timer switch processing and reduces the problem in the prior art that the timer is placed inside the row and the timing of opening and closing is difficult to control;

[0060] (2) Only one timer is created and released, so there will be no situation in the prior art where the memory is not released, resulting in the page closing while the countdown is still running, such as the reference problem involving the timer (such as NSTimer, an iOS system timer), that is, it is not easy to cause memory leak problems.

[0061] Among them, the method of calling the first timer to perform countdown processing according to the countdown time of each target activity relative to the first moment to obtain the processed countdown time of each target activity relative to the first moment can be, calling the first timer according to the countdown time of each target activity relative to the first moment, using timing units for timing, when the timing time accumulates to the time unit corresponding to each target activity, the countdown time of each target activity relative to the first moment is performed countdown processing using the corresponding time unit to obtain the processed countdown time of each target activity relative to the first moment, wherein the timing unit of the first timer is less than or equal to the smallest time unit of the time unit of the activity time of at least one target activity.

[0062] Specifically, continuing with the above example, if the timing unit of the first timer is less than or equal to the smallest time unit of the time unit of the activity time of at least one target activity, such as seconds, the first timer can be called to count down the countdown time of target activity A relative to the first moment, "1 day until the activity starts, 11 days until the activity ends", using the timing unit of seconds. When the timing time accumulates to the time unit of day corresponding to target activity A, the countdown time of target activity A relative to the first moment is counted down using the corresponding time unit of day to obtain the processed countdown time of target activity A relative to the first moment, "0 days until the activity starts, 10 days until the activity ends", where, if the timing time has not accumulated to the time unit of day corresponding to target activity A, it is still "1 day until the activity starts, 11 days until the activity ends". And the first timer can be called to use the countdown time of target activity B relative to the first moment, "the activity starts at 00:00:00 on June 18, 2023, and ends at 00:00:00 on June 28, 2023", to count down using the timing unit of seconds. When the timing time accumulates to the time unit of seconds corresponding to the target activity B, the countdown time of target activity B relative to the first moment is counted down using the corresponding time unit of seconds to obtain the processed countdown time of target activity B relative to the first moment, "11:59:59 from the start of the activity, and 10 days 11:59:59 from the end of the activity". Among them, if the timing time has not accumulated to the time unit of seconds corresponding to the target activity B, it is still "12:00:00 from the start of the activity, and 10 days 12:00:00 from the end of the activity".

[0063] It should be understood that the processed countdown time of each target activity relative to the first moment can still be saved in the cache.

[0064] It is worth mentioning that the countdown time of each target activity relative to the first moment can be processed by using a corresponding time unit to ensure the accuracy of the timing of each target activity.

[0065] It is understandable that the method of calling the first timer to perform countdown processing according to the countdown time of each target activity relative to the first moment to obtain the processed countdown time of each target activity relative to the first moment may also be other reasonable methods, which are not specifically limited here.

[0066] 205. Display the processed countdown time of each target activity relative to the first moment at a position corresponding to the target activity in the first countdown page.

[0067] After obtaining the processed countdown time of each target activity relative to the first moment, the processed countdown time of each target activity relative to the first moment may be displayed at the position of the target activity corresponding to the first countdown page.

[0068] Specifically, each target activity cell displayed on the screen can be obtained, and according to the tag value of each target activity cell, the data corresponding to each target activity in the data source (the processed countdown time of each target activity relative to the first moment) can be read, and the cell can be assigned with the data.

[0069] In the embodiment of the present application, the first time offset between the standard time at the first moment and the system setting time at the first moment can be determined, and based on the first time offset, the system setting time at the first moment and the activity time corresponding to each target activity in the countdown page, the countdown time of each target activity in the first countdown page relative to the first moment is determined, and the first timer of the first countdown page is created, and the first timer is called to perform countdown processing according to the countdown time of each target activity relative to the first moment to obtain the processed countdown time of each target activity relative to the first moment. All target activities of a countdown page share one timer, which is different from the prior art in that each activity creates one timer, thereby reducing the consumption of memory and CPU resources for creating and managing multiple timers. Furthermore, the time offset only needs to be calculated once, and the countdown time corresponding to each target activity of the countdown page can be directly calculated based on the time offset and the system setting time and the corresponding activity time, thereby reducing the loss of computing resources for calculating the countdown time corresponding to each target activity, and therefore, the loss of system resources is relatively small.

[0070] In an embodiment of the present application, during the countdown processing, there is often a situation where the user clicks to enter a countdown page and then clicks to switch to another countdown page. When entering another countdown page, it may involve high consumption of system resources and / or low accuracy. To solve the above problem, it is necessary to perform specific processing on the countdown processing of switching from one countdown page to another countdown page to reduce the consumption of system resources and / or ensure the accuracy of the countdown processing. Specifically, there can be multiple methods of specific processing, which are described below respectively.

[0071] 1. A specific processing method may be to switch from one countdown page to another countdown page, and directly determine the countdown time of each target activity in the second countdown page relative to the second moment based on the first time offset, so as to reduce the loss of system resources.

[0072] In the embodiment of the present application, you can switch from one countdown page to another countdown page, and you can directly determine the countdown time of each target activity in the second countdown page relative to the second moment based on the first time offset. For details, please refer to Figure 5 , Figure 5 This is a flow chart of another countdown processing method disclosed in an embodiment of the present application, the method comprising:

[0073] 501. If a trigger signal for displaying a first countdown page of an application is detected at a first moment, a system setting time at the first moment, a standard time at the first moment, and an activity time of at least one target activity in the first countdown page are obtained.

[0074] 502. Determine a first time offset between a standard time at a first moment and a system setting time at the first moment.

[0075] 503. Determine the countdown time of each target activity in the first countdown page relative to the first moment based on the first time offset, the system setting time at the first moment, and the activity time corresponding to each target activity in the countdown page.

[0076] 504. Create a first timer of the first countdown page, and call the first timer to perform countdown processing according to the countdown time of each target activity relative to the first moment, so as to obtain the processed countdown time of each target activity relative to the first moment.

[0077] 505. Display the processed countdown time of each target activity relative to the first moment at a position corresponding to the target activity in the first countdown page.

[0078] Steps 501 to 505 in this embodiment are similar to those in the previous Figure 2 Steps 201 to 205 in the illustrated embodiment are similar and will not be described in detail here.

[0079] 506. If a trigger signal for displaying a second countdown page of the application is detected at a second moment, the system setting time of the second moment and the activity time of at least one target activity in the second countdown page are obtained, wherein the second moment is any moment later than the first moment, and the second countdown page is any countdown page among the multiple countdown pages except the first countdown page.

[0080] After determining a first time offset between the standard time at the first moment and the system setting time at the first moment, if a trigger signal for displaying a second countdown page of the application is detected at the second moment, the system setting time at the second moment and the activity time of at least one target activity in the second countdown page can be obtained, wherein the second moment is any moment later than the first moment, and the second countdown page is any countdown page among multiple countdown pages except the first countdown page.

[0081] Specifically, for example, the system setting time for the second moment is June 15, 2023 00:00:05, the activity time of target activity A in the second countdown page is "the activity starts on June 18, 2023, and ends on June 28, 2023" (time unit is day), and the activity time of target activity B is "the activity starts at 00:00:00 on June 18, 2023, and ends at 00:00:00 on June 28, 2023" (time unit is second).

[0082] 507. Determine the countdown time of each target activity in the second countdown page relative to the second moment based on the first time offset, the system setting time at the second moment, and the activity time corresponding to each target activity in the second countdown page.

[0083] After obtaining the system setting time of the second moment and the activity time of at least one target activity in the second countdown page, the countdown time of each target activity in the second countdown page relative to the second moment can be determined based on the first time offset, the system setting time of the second moment and the activity time corresponding to each target activity in the second countdown page.

[0084] Specifically, continuing with the above example, based on the first time offset 2*24*60*60=172800 (seconds), the system setting time of the second moment June 15, 2023 00:00:05, and the activity time corresponding to the target activity A "the activity starts on June 18, 2023, and ends on June 28, 2023", the countdown time of the target activity A relative to the second moment is determined to be "18-(15+2)=1 day from the start of the activity, and 28-(15+2)=11 days from the end of the activity". , and based on the first time offset 2*24*60*60=172800 (seconds), the system setting time of the second moment June 15, 2023 00:00:00 and the activity time corresponding to the target activity B "the activity starts at 00:00:00 on June 18, 2023, and ends at 00:00:00 on June 28, 2023", determine the countdown time of the target activity B relative to the second moment "0 days 59:59:55 from the start of the activity, 10 days 59:59:55 from the end of the activity".

[0085] 508. Create a second timer for the second countdown page, and call the second timer to perform countdown processing according to the countdown time of each target activity relative to the second moment, so as to obtain the processed countdown time of each target activity relative to the second moment, wherein the second timer and the first timer are different timers.

[0086] After determining the countdown time of each target activity in the second countdown page relative to the second moment based on the first time offset, the system setting time of the second moment, and the activity time corresponding to each target activity in the second countdown page, a second timer for the second countdown page can be created, and the second timer can be called to perform countdown processing according to the countdown time of each target activity relative to the second moment to obtain the processed countdown time of each target activity relative to the second moment, wherein the second timer and the first timer are different timers.

[0087] Specifically, for example, the second timer can be called to perform countdown processing according to the countdown time of target activity A relative to the second moment, "1 day from the start of the activity, 11 days from the end of the activity", for example, the processed countdown time of target activity A relative to the second moment can be obtained as "0.5 days from the start of the activity, 10.5 days from the end of the activity". For another example, the second timer can be called to perform countdown processing according to the countdown time of target activity B relative to the second moment, "the activity starts at 00:00:00 on June 18, 2023, and ends at 00:00:00 on June 28, 2023", for example, the processed countdown time of target activity B relative to the second moment can be obtained as "11:59:55 from the start of the activity, 10 days 11:59:55 from the end of the activity".

[0088] 509. Display the processed countdown time of each target activity relative to the second moment at a position of the target activity corresponding to the second countdown page.

[0089] After obtaining the processed countdown time of each target activity relative to the second moment, the processed countdown time of each target activity relative to the second moment may be displayed at the position of the target activity corresponding to the second countdown page.

[0090] Specifically, the processed countdown time of target activity A relative to the second moment "0.5 days until the start of the activity, 10.5 days until the end of the activity" can be displayed at the position corresponding to target activity A in the second countdown page, and the processed countdown time of target activity B relative to the second moment "11:59:55 until the start of the activity, 10 days 11:59:55 until the end of the activity" can be displayed at the position corresponding to target activity B in the second countdown page.

[0091] In this embodiment, the first time offset between the standard time at the first moment and the system setting time at the first moment can be determined, based on the first time offset, the system setting time at the first moment and the activity time corresponding to each target activity in the countdown page, the countdown time of each target activity in the first countdown page relative to the first moment is determined, the first timer of the first countdown page is created, and the first timer is called to perform countdown processing according to the countdown time of each target activity relative to the first moment, so as to obtain the processed countdown time of each target activity relative to the first moment, all target activities of a countdown page use a timer in common, compared with the prior art that each activity creates a timer, which reduces the consumption of memory and CPU resources for creating and managing multiple timers. Further, only one time offset needs to be calculated, and the countdown time corresponding to each target activity of the countdown page can be directly calculated based on the time offset and the system setting time and the corresponding activity time, which reduces the calculation resource loss of calculating the countdown time corresponding to each target activity, and therefore, the loss of system resources is small. Secondly, when switching from one countdown page to another countdown page, the countdown time of each target activity in the second countdown page relative to the second moment can be directly determined based on the first time offset, which can reduce the loss of system resources.

[0092] 2. A specific processing method may be to switch from one countdown page to another, and consider whether the time interval is too long. If it is too long, the time offset is recalculated. If it is not long, the countdown time of each target activity in the second countdown page relative to the second moment is directly determined based on the first time offset, so as to reduce the loss of system resources and / or ensure the accuracy of countdown processing.

[0093] In the embodiment of the present application, when switching from one countdown page to another countdown page, consider whether the time interval is too long. If it is too long, recalculate the time offset. If it is not long, directly determine the countdown time of each target activity in the second countdown page relative to the second moment based on the first time offset. For details, please refer to Figure 6 , Figure 6 This is a flow chart of another countdown processing method disclosed in an embodiment of the present application, the method comprising:

[0094] 601. If a trigger signal for displaying a first countdown page of an application is detected at a first moment, a system setting time at the first moment, a standard time at the first moment, and an activity time of at least one target activity in the first countdown page are obtained.

[0095] 602. Determine a first time offset between a standard time at a first moment and a system setting time at the first moment.

[0096] 603. Determine the countdown time of each target activity in the first countdown page relative to the first moment based on the first time offset, the system setting time at the first moment, and the activity time corresponding to each target activity in the countdown page.

[0097] 604. Create a first timer of the first countdown page, and call the first timer to perform countdown processing according to the countdown time of each target activity relative to the first moment, so as to obtain the processed countdown time of each target activity relative to the first moment.

[0098] 605. Display the processed countdown time of each target activity relative to the first moment at a position corresponding to the target activity in the first countdown page.

[0099] Steps 601 to 605 in this embodiment are similar to those in the previous embodiment. Figure 2 Steps 201 to 205 in the illustrated embodiment are similar and will not be described in detail here.

[0100] 606. If a trigger signal for displaying a third countdown page of the application is detected at a third moment, and the time interval between the third moment and the first moment reaches a preset time interval threshold, the system setting time of the third moment, the standard time of the third moment, and the activity time of at least one target activity in the third countdown page are obtained, wherein the third moment is any moment after the first moment, and the third countdown page is any countdown page among the multiple countdown pages except the first countdown page.

[0101] After determining a first time offset between the standard time at the first moment and the system setting time at the first moment, if a trigger signal for displaying a third countdown page of the application is detected at a third moment, and the time interval between the third moment and the first moment reaches a preset time interval threshold, the system setting time at the third moment, as well as the standard time at the third moment and the activity time of at least one target activity in the third countdown page can be obtained, wherein the third moment is any moment after the first moment, and the third countdown page is any countdown page among multiple countdown pages except the first countdown page, if the application includes multiple countdown pages.

[0102] Specifically, for example, if a trigger signal for displaying the third countdown page of the application is detected at the third moment, and the time interval between the third moment and the first moment reaches a preset time interval threshold (for example, one day), the system setting time of the third moment, June 14, 2023 00:00:00, as well as the standard time of the third moment, June 18, 2023 00:00:00, and the activity time of the target activity A in the third countdown page can be obtained as “The activity starts on June 18, 2023 and ends on June 28, 2023” (time unit is day), the activity time of the target activity B is “The activity starts at 00:00:00 on June 18, 2023 and ends at 00:00:00 on June 28, 2023” (time unit is second), and the third countdown page is any countdown page among the multiple countdown pages except the first countdown page.

[0103] 607. Re-determine a third time offset between the standard time at the third moment and the system setting time at the third moment.

[0104] After obtaining the system setting time at the third moment, the standard time at the third moment, and the activity time of at least one target activity in the third countdown page, a third time offset between the standard time at the third moment and the system setting time at the third moment may be re-determined.

[0105] Specifically, the third time offset 4*24*60*60=345600 (seconds) between the standard time of the third moment June 18, 2023 00:00:00 and the system setting time of the third moment June 14, 2023 00:00:00 can be re-determined.

[0106] 608. Determine the countdown time of each target activity in the third countdown page relative to the third moment based on the third time offset, the system setting time at the third moment, and the activity time corresponding to each target activity in the third countdown page.

[0107] After re-determining the third time offset between the standard time of the third moment and the system setting time of the third moment, the countdown time of each target activity in the third countdown page relative to the third moment can be determined based on the third time offset, the system setting time of the third moment, and the activity time corresponding to each target activity in the third countdown page.

[0108] Specifically, based on the third time offset 4*24*60*60=345600 (seconds), the system setting time of the third moment 00:00:00 on June 14, 2023, and the activity time corresponding to the target activity A "the activity starts on June 18, 2023, and ends on June 28, 2023", the countdown time of the target activity A relative to the third moment can be determined as "18-(14+4)=0 days from the start of the activity, and 28-(14+4)=10 days from the end of the activity", and based on The third time offset 4*24*60*60=345600 (seconds), the system setting time of the third moment June 14, 2023 00:00:00 and the activity time corresponding to the target activity B "the activity starts at 00:00:00 on June 18, 2023, and ends at 00:00:00 on June 28, 2023", determine the countdown time of the target activity B relative to the third moment "0 days 00:00:00 from the start of the activity, 10 days 00:00:00 from the end of the activity".

[0109] 609. Create a third timer of the third countdown page, and call the third timer to perform countdown processing according to the countdown time of each target activity relative to the third moment, so as to obtain the processed countdown time of each target activity relative to the third moment.

[0110] After determining the countdown time of each target activity in the third countdown page relative to the third moment based on the third time offset, the system setting time of the third moment, and the activity time corresponding to each target activity in the third countdown page, a third timer for the third countdown page can be created, and the third timer can be called to perform countdown processing according to the countdown time of each target activity relative to the third moment to obtain the processed countdown time of each target activity relative to the third moment.

[0111] Specifically, the third timer can be called to perform countdown processing according to the countdown time of target activity A relative to the third moment, "0 days from the start of the activity, 10 days from the end of the activity", for example, the processed countdown time of target activity A relative to the third moment can be obtained as "0 days from the start of the activity, 9.5 days from the end of the activity". For another example, the third timer can be called to perform countdown processing according to the countdown time of target activity B relative to the third moment, "the activity starts at 00:00:00 on June 18, 2023, and ends at 00:00:00 on June 28, 2023", for example, the processed countdown time of target activity B relative to the third moment can be obtained as "0:00:00 from the start of the activity, 9 days 00:00:00 from the end of the activity".

[0112] 610. Display the processed countdown time of each target activity relative to the third moment at a position corresponding to the target activity in the third countdown page.

[0113] After obtaining the processed countdown time of each target activity relative to the third moment, the processed countdown time of each target activity relative to the third moment may be displayed at the position of the corresponding target activity in the third countdown page.

[0114] Specifically, the processed countdown time of target activity A relative to the third moment "0 days until the start of the activity, 9.5 days until the end of the activity" can be displayed at the position corresponding to target activity A in the third countdown page, and the processed countdown time of target activity B relative to the third moment "0:00:00 until the start of the activity, 9 days 00:00:00 until the end of the activity" can be displayed at the position corresponding to target activity B in the third countdown page.

[0115] In this embodiment, the first time offset between the standard time at the first moment and the system setting time at the first moment can be determined, and based on the first time offset, the system setting time at the first moment, and the activity time corresponding to each target activity in the countdown page, the countdown time of each target activity in the first countdown page relative to the first moment is determined, and the first timer of the first countdown page is created, and the first timer is called to perform countdown processing according to the countdown time of each target activity relative to the first moment to obtain the processed countdown time of each target activity relative to the first moment. All target activities of a countdown page share one timer, which is different from the prior art in that each activity creates one timer, thereby reducing the consumption of memory and CPU resources for creating and managing multiple timers. Furthermore, the time offset only needs to be calculated once, and the countdown time corresponding to each target activity of the countdown page can be directly calculated based on the time offset and the system setting time and the corresponding activity time, thereby reducing the loss of computing resources for calculating the countdown time corresponding to each target activity, and therefore, the loss of system resources is relatively small. Secondly, when switching from one countdown page to another, consider whether the time interval is too long. If it is too long, recalculate the time offset. If it is not long, directly determine the countdown time of each target activity in the second countdown page relative to the second moment based on the first time offset to reduce the loss of system resources and ensure accuracy.

[0116] based on Figure 2In the described embodiment, during the countdown process, when the user pays for the product of the target activity on the first countdown page, there is still a situation where the user modifies the system setting time again. At this time, the countdown time seen by the user when paying will be wrong, and the user may miss the activity, etc., which has a poor user experience. Therefore, in order to solve the above problem, the following provides a detailed embodiment that can be optionally executed during the implementation of this solution. Please refer to Figure 7 , Figure 7 This is a flow chart of another countdown processing method disclosed in an embodiment of the present application. The method of another embodiment of the countdown processing method of the present application includes:

[0117] 701. If a trigger signal for displaying a first countdown page of an application is detected at a first moment, a system setting time at the first moment, a standard time at the first moment, and an activity time of at least one target activity in the first countdown page are obtained.

[0118] 702. Determine a first time offset between a standard time at a first moment and a system setting time at the first moment.

[0119] 703. Determine the countdown time of each target activity in the first countdown page relative to the first moment based on the first time offset, the system setting time at the first moment, and the activity time corresponding to each target activity in the countdown page.

[0120] 704. Create a first timer of the first countdown page, and call the first timer to perform countdown processing according to the countdown time of each target activity relative to the first moment, so as to obtain the processed countdown time of each target activity relative to the first moment.

[0121] 705. Display the processed countdown time of each target activity relative to the first moment at a position corresponding to the target activity in the first countdown page.

[0122] Steps 701 to 705 in this embodiment are similar to those in the previous Figure 2 Steps 201 to 205 in the illustrated embodiment are similar and will not be described in detail here.

[0123] 706. If a trigger signal for performing a target operation on the product corresponding to the target activity selected in the first countdown page is detected at the fourth moment, the system setting time of the fourth moment, the standard time of the fourth moment and the activity time corresponding to the target activity selected in the first countdown page are retrieved, and the fourth moment is any moment after the first moment.

[0124] After displaying the processed countdown time of each target activity relative to the first moment at the position of the corresponding target activity in the first countdown page, if a trigger signal for performing a target operation on the product corresponding to the target activity selected in the first countdown page is detected at the fourth moment, the system setting time of the fourth moment, the standard time of the fourth moment and the activity time corresponding to the target activity selected in the first countdown page can be retrieved, and the fourth moment is any moment after the first moment.

[0125] Specifically, the target operation may include but is not limited to operations such as adding to a shopping cart or making a payment. If a trigger signal for performing a target operation on the commodity corresponding to the target activity (such as target activity A) selected in the first countdown page is detected at the fourth moment, the system setting time of the fourth moment, June 14, 2023 00:00:00, and the standard time of the fourth moment, June 18, 2023 00:00:00 and the activity time corresponding to the target activity selected in the first countdown page, can be retrieved. The activity time of target activity A is "the activity starts on June 18, 2023 and ends on June 28, 2023".

[0126] 707. Determine a fourth time offset between the standard time at a fourth moment and the system setting time at the fourth moment.

[0127] After re-obtaining the system setting time at the fourth moment, the standard time at the fourth moment, and the activity time corresponding to the target activity selected in the first countdown page, a fourth time offset between the standard time at the fourth moment and the system setting time at the fourth moment can be determined.

[0128] Specifically, it can be determined that the fourth time offset 4*24*60*60=345600 (seconds) between the standard time of the fourth moment June 18, 2023 00:00:00 and the system setting time of the fourth moment June 14, 2023 00:00:00 can be determined.

[0129] 708. Determine the countdown time of the target activity selected in the first countdown page relative to the fourth moment based on the fourth time offset, the system setting time at the fourth moment, and the activity time corresponding to the target activity selected in the first countdown page.

[0130] After determining the fourth time offset between the standard time at the fourth moment and the system setting time at the fourth moment, the countdown time of the target activity selected in the first countdown page relative to the fourth moment can be determined based on the fourth time offset, the system setting time at the fourth moment, and the activity time corresponding to the target activity selected in the first countdown page.

[0131] Specifically, based on the fourth time offset 4*24*60*60=345600 (seconds), the system setting time of the fourth moment June 14, 2023 00:00:00 and the activity time corresponding to the target activity A "the activity starts on June 18, 2023, and ends on June 28, 2023", the countdown time of the target activity A relative to the fourth moment can be determined as "18-(14+4)=0 days from the start of the activity, and 28-(14+4)=10 days from the end of the activity".

[0132] 709. If the countdown time of the selected target activity after processing relative to the first moment is inconsistent with the countdown time of the selected target activity relative to the fourth moment, the first timer is called to perform countdown processing according to the countdown time of the selected target activity relative to the fourth moment to obtain the countdown time of the selected target activity after processing relative to the fourth moment.

[0133] After determining the countdown time of the target activity selected in the first countdown page relative to the fourth moment based on the fourth time offset, the system setting time at the fourth moment and the activity time corresponding to the target activity selected in the first countdown page, if the processed countdown time of the selected target activity relative to the first moment is inconsistent with the countdown time of the selected target activity relative to the fourth moment, the first timer can be called to perform countdown processing according to the countdown time of the selected target activity relative to the fourth moment to obtain the processed countdown time of the selected target activity relative to the fourth moment.

[0134] Specifically, continuing with the above example, since the processed countdown time of the selected target activity relative to the first moment "1 day from the start of the activity, 11 days from the end of the activity" is inconsistent with the countdown time of the selected target activity relative to the fourth moment "18-(14+4)=0 days from the start of the activity, 28-(14+4)=10 days from the end of the activity", the first timer is called according to the countdown time of the selected target activity relative to the fourth moment "18-(14+4)=0 days from the start of the activity, 28-(14+4)=10 days from the end of the activity". Days" is used to perform countdown processing to obtain the processed countdown time of the selected target activity relative to the fourth moment. Specifically, when the timing time of the first timer accumulates to 1 time unit of the day corresponding to the target activity A, the processed countdown time of the selected target activity A relative to the fourth moment is "0 days from the start of the activity, 10-1=9 days from the end of the activity"; if the timing time has not accumulated to the time unit of the day corresponding to the target activity A, it is still "18-(14+4)=0 days from the start of the activity, 28-(14+4)=10 days from the end of the activity".

[0135] It should be understood that if the countdown time of the selected target activity after processing relative to the first moment is inconsistent with the countdown time of the selected target activity relative to the fourth moment, it means that the user has modified the system setting time again after the first moment. Therefore, the countdown time corresponding to the latest moment (the fourth moment) shall be taken as the basis to ensure the accuracy of the countdown time of the selected target activity after processing relative to the fourth moment.

[0136] 710. Display the processed countdown time of the selected target activity relative to the fourth moment at the position of the selected target activity in the first countdown page.

[0137] After calling the first timer to perform countdown processing according to the countdown time of the selected target activity relative to the fourth moment to obtain the processed countdown time of the selected target activity relative to the fourth moment, the processed countdown time of the selected target activity relative to the fourth moment can be displayed at the position of the selected target activity in the first countdown page.

[0138] Specifically, when the timing time of the first timer accumulates to 1 time unit of the day corresponding to the target activity A, the countdown time of the selected target activity A relative to the fourth moment after processing will be "0 days left to the start of the activity, 9 days left to the end of the activity". If the timing time has not accumulated to the time unit of the day corresponding to the target activity A, the first countdown page will still display "0 days left to the start of the activity, 10 days left to the end of the activity".

[0139] In this embodiment, the first time offset between the standard time at the first moment and the system setting time at the first moment can be determined, and based on the first time offset, the system setting time at the first moment, and the activity time corresponding to each target activity in the countdown page, the countdown time of each target activity in the first countdown page relative to the first moment is determined, and the first timer of the first countdown page is created, and the first timer is called to perform countdown processing according to the countdown time of each target activity relative to the first moment to obtain the processed countdown time of each target activity relative to the first moment. All target activities of a countdown page share one timer, which is different from the prior art in that each activity creates one timer, thereby reducing the consumption of memory and CPU resources for creating and managing multiple timers. Furthermore, the time offset only needs to be calculated once, and the countdown time corresponding to each target activity of the countdown page can be directly calculated based on the time offset and the system setting time and the corresponding activity time, thereby reducing the loss of computing resources for calculating the countdown time corresponding to each target activity, and therefore, the loss of system resources is relatively small. Secondly, when the user pays for the goods in the target activity on the first countdown page, the countdown time of the target activity selected in the first countdown page relative to the fourth moment can be re-determined, and the processed countdown time of the selected target activity relative to the first moment can be compared with the countdown time of the selected target activity relative to the fourth moment, so as to reduce the possibility of errors in the countdown time seen by the user when paying, thereby improving the user experience.

[0140] based on Figure 2 In the embodiment described, during the countdown process, when exiting the first countdown page and re-entering the first countdown page, there will be a large loss of system resources. To solve the above problem, the following provides a detailed embodiment that can be optionally executed during the implementation of this solution. Please refer to Figure 8 , Figure 8 This is a flow chart of another countdown processing method disclosed in an embodiment of the present application. The method of another embodiment of the countdown processing method of the present application includes:

[0141] 801. If a trigger signal for displaying a first countdown page of an application is detected at a first moment, a system setting time at the first moment, a standard time at the first moment, and an activity time of at least one target activity in the first countdown page are obtained.

[0142] Among them, before obtaining the system setting time at the first moment, the standard time at the first moment and the activity time of at least one target activity in the first countdown page, the visible activity located in the visible area of ​​the screen at the first moment in the first countdown page can be determined first, and then the visible activity can be used as at least one target activity.

[0143] Specifically, the visible activities can be determined by detecting whether the active elements in the countdown page are in the visible area of ​​the screen. The specific implementation method can be achieved by using page scrolling events or element position judgment. For example, if the screen size of a mobile phone is small and the size of the countdown page is large, in order to reduce the number of activities that the timer needs to count down and process, so as to reduce the loss of system resources, only the activities that can be seen on the screen can be counted down. More specifically, assuming that there are multiple active elements in the countdown page, one of which is located in the visible area of ​​the screen, and the other active elements are located in the invisible area of ​​the screen, by detecting the position information of the active elements, it can be determined which active elements are visible on the screen, and then these visible active elements can be used as at least one target activity.

[0144] 802. Determine a first time offset between a standard time at a first moment and a system setting time at the first moment.

[0145] 803. Determine the countdown time of each target activity in the first countdown page relative to the first moment based on the first time offset, the system setting time at the first moment, and the activity time corresponding to each target activity in the countdown page.

[0146] 804. Create a first timer of the first countdown page, and call the first timer to perform countdown processing according to the countdown time of each target activity relative to the first moment, so as to obtain the processed countdown time of each target activity relative to the first moment.

[0147] 805. Display the processed countdown time of each target activity relative to the first moment at a position corresponding to the target activity in the first countdown page.

[0148] Steps 802 to 805 in this embodiment are similar to those in the previous Figure 2 Steps 202 to 205 in the illustrated embodiment are similar and will not be described in detail here.

[0149] 806. If a trigger signal for exiting the first countdown page is detected, destroy the first timer.

[0150] After the first timer of the first countdown page is created, if a trigger signal for exiting the first countdown page is detected, the first timer may be destroyed.

[0151] Specifically, for example, if a trigger signal of exiting the first countdown page / the mobile phone entering the background is detected, the first timer is destroyed.

[0152] 807. If a trigger signal for re-displaying the first countdown page is detected at the fifth moment, the system setting time at the fifth moment is obtained.

[0153] After the first timer is destroyed, if a trigger signal for re-displaying the first countdown page is detected at the fifth moment, the system setting time at the fifth moment can be obtained.

[0154] Specifically, for example, if a trigger signal for re-displaying the first countdown page is detected at the fifth moment (i.e., a trigger signal for re-entering the page or the mobile phone entering the foreground), the interface can be called to obtain the system setting time of the fifth moment, June 15, 2023 00:00:05.

[0155] 808. Determine the countdown time corresponding to each target activity in the first countdown page relative to the fifth moment based on the first time offset, the system setting time at the fifth moment, and the activity time corresponding to each target activity in the first countdown page.

[0156] After obtaining the system setting time at the fifth moment, the corresponding countdown time of each target activity in the first countdown page relative to the fifth moment can be determined based on the first time offset, the system setting time at the fifth moment and the activity time corresponding to each target activity in the first countdown page.

[0157] Specifically, based on the first time offset 2*24*80*80=172800 (seconds), the system setting time of the fifth moment 00:00:05 on June 15, 2023, and the activity time corresponding to the target activity A in the first countdown page "the activity starts on June 18, 2023, and ends on June 28, 2023", the countdown time of the target activity A relative to the fifth moment can be determined as "18-(15+2)=1 day from the start of the activity, and 28-(15+2)=11 days from the end of the activity". , and based on the first time offset 2*24*80*80=172800 (seconds), the system setting time of the fifth moment June 15, 2023 00:00:05 and the activity time corresponding to the target activity B "the activity starts at 00:00:00 on June 18, 2023, and ends at 00:00:00 on June 28, 2023", the countdown time of the target activity B relative to the fifth moment is determined as "0 days 59:59:55 from the start of the activity, and 10 days 59:59:55 from the end of the activity".

[0158] 809. Recreate the fifth timer of the first countdown page, and call the fifth timer to perform countdown processing according to the corresponding countdown time of each target activity relative to the fifth moment, so as to obtain the processed countdown time of each target activity relative to the fifth moment.

[0159] After determining the corresponding countdown time of each target activity in the first countdown page relative to the fifth moment based on the first time offset, the system setting time of the fifth moment and the activity time corresponding to each target activity in the first countdown page, the fifth timer of the first countdown page can be recreated, and the fifth timer can be called to perform countdown processing according to the corresponding countdown time of each target activity relative to the fifth moment to obtain the processed countdown time of each target activity relative to the fifth moment.

[0160] Specifically, the fifth timer of the first countdown page can be recreated, and the fifth timer can be called to perform countdown processing according to the countdown time of target activity A relative to the fifth moment, which is "18-(15+2)=1 day until the start of the activity, and 28-(15+2)=11 days until the end of the activity", so as to obtain the processed countdown time of target activity A relative to the fifth moment. Specifically, when the timing time of the fifth timer accumulates to 1 time unit of the day corresponding to the target activity A, the processed countdown time of the selected target activity A relative to the fifth moment is "0 days until the start of the activity, and 10 days until the end of the activity". If the timing time has not accumulated to the time unit of the day corresponding to the target activity A, the first countdown page will still display "1 day until the start of the activity, and 11 days until the end of the activity". The fifth timer can also be called to perform countdown processing according to the countdown time of the target activity B relative to the fifth moment, which is "0 days 59:59:55 from the start of the activity, and 10 days 59:59:55 from the end of the activity", so as to obtain the processed countdown time of the target activity B relative to the fifth moment. Specifically, when the timing time of the fifth timer accumulates to 1 time unit of seconds corresponding to the target activity B, the processed countdown time of the selected target activity B relative to the fifth moment is "0 days 59:59:54 from the start of the activity, and 10 days 59:59:54 from the end of the activity". If the timing time has not accumulated to the time unit of seconds corresponding to the target activity B, the first countdown page will still display "0 days 59:59:55 from the start of the activity, and 10 days 59:59:55 from the end of the activity".

[0161] It should be understood that if a trigger signal for exiting the first countdown page is detected, the first timer is destroyed, and if a trigger signal for re-displaying the first countdown page is detected at the fifth moment, the fifth timer of the first countdown page is recreated. This ensures that each time a countdown page is entered, only one timer is created and used, thereby reducing the loss of system resources.

[0162] 810. Redisplay the processed countdown time of each target activity relative to the fifth moment at the position of the target activity corresponding to the first countdown page.

[0163] After obtaining the processed countdown time of each target activity relative to the fifth moment, the processed countdown time of each target activity relative to the fifth moment may be redisplayed at the position of the target activity corresponding to the first countdown page.

[0164] In this embodiment, the first time offset between the standard time at the first moment and the system setting time at the first moment can be determined, and based on the first time offset, the system setting time at the first moment, and the activity time corresponding to each target activity in the countdown page, the countdown time of each target activity in the first countdown page relative to the first moment is determined, and the first timer of the first countdown page is created, and the first timer is called to perform countdown processing according to the countdown time of each target activity relative to the first moment to obtain the processed countdown time of each target activity relative to the first moment. All target activities of a countdown page share one timer, which is different from the prior art in that each activity creates one timer, thereby reducing the consumption of memory and CPU resources for creating and managing multiple timers. Furthermore, the time offset only needs to be calculated once, and the countdown time corresponding to each target activity of the countdown page can be directly calculated based on the time offset and the system setting time and the corresponding activity time, thereby reducing the loss of computing resources for calculating the countdown time corresponding to each target activity, and therefore, the loss of system resources is relatively small. Secondly, after exiting the first countdown page, the first timer (timer) can be destroyed, and when re-entering the first countdown page, the second timer (timer) can be re-created, which can ensure that each time a countdown page is entered, only one timer is created and used, thereby reducing the loss of system resources. Furthermore, compared with the design ideas of the prior art, the embodiment of the present application can solve more timing requirements with minimal system overhead, is more efficient and concise, saves CPU resources, and can support more countdown requirements through the embodiment of the present application, with clear logic, convenient maintenance, and easy business expansion.

[0165] The countdown processing method in the embodiment of the present application is described above. The countdown processing device in the embodiment of the present application is described below. Fig. 9 , an embodiment of the countdown processing device in the embodiment of the present application includes:

[0166] The obtaining unit 901 is configured to obtain the system setting time at the first moment, the standard time at the first moment, and the activity time of at least one target activity in the first countdown page if a trigger signal for displaying the first countdown page of the application is detected at the first moment;

[0167] A determining unit 902, configured to determine a first time offset between a standard time at the first moment and a system setting time at the first moment;

[0168] The determining unit 902 is further configured to determine the countdown time of each target activity in the first countdown page relative to the first moment based on the first time offset, the system setting time of the first moment, and the activity time corresponding to each target activity in the countdown page;

[0169] A countdown unit 903 is used to create a first timer of the first countdown page, and call the first timer to perform countdown processing according to the countdown time of each target activity relative to the first moment, so as to obtain the processed countdown time of each target activity relative to the first moment;

[0170] The display unit 904 is configured to display the processed countdown time of each target activity relative to the first moment at a position corresponding to the target activity in the first countdown page.

[0171] In an embodiment of the present application, the time offset between the standard time at the current moment and the system setting time at the current moment can be determined, and based on the time offset, the system setting time at the current moment and the activity time corresponding to each target activity on the countdown page, the countdown time corresponding to each target activity on the countdown page at the current moment is determined, a timer for the countdown page is created, and the timer of the countdown page is called to perform countdown processing on each target activity on the countdown page according to the countdown time corresponding to each target activity on the countdown page at the current moment. All target activities on a countdown page share one timer, which reduces the consumption of memory and CPU resources for creating and managing multiple timers compared to the prior art in which a timer is created for each activity. Furthermore, the countdown page only needs to calculate the time offset once, and the countdown time corresponding to each target activity on the countdown page can be directly calculated based on the time offset and the system setting time and the corresponding activity time, which reduces the loss of computing resources for calculating the countdown time corresponding to each activity, and therefore, the loss of system resources is small.

[0172] See below Fig.10 Another embodiment of the countdown processing device 1000 in the embodiment of the present application includes:

[0173] CPU 1001, memory 1005, input / output interface 1004, wired or wireless network interface 1003 and power supply 1002;

[0174] The memory 1005 is a temporary storage memory or a permanent storage memory;

[0175] The CPU 1001 is configured to communicate with the memory 1005 and execute the instructions in the memory 1005 to perform the aforementioned Figure 2 , Figure 3 , Figures 5 to 8 The method in the illustrated embodiment.

[0176] The embodiment of the present application also provides a computer-readable storage medium, the computer-readable storage medium includes instructions, when the instructions are executed on a computer, the computer executes the aforementioned Figure 2 , Figure 3 , Figures 5 to 8 The method in the illustrated embodiment.

[0177] The present application also provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute the aforementioned Figure 2 , Figure 3 , Figures 5 to 8 The method in the illustrated embodiment.

[0178] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0179] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0180] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0181] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

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

[0183] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, read-only memory), random access memory (RAM, random access memory), disk or optical disk and other media that can store program code.

Claims

1. A countdown processing method, characterized in that: include: If a trigger signal for displaying a first countdown page of the application is detected at a first moment, a system setting time at the first moment, a standard time at the first moment, and an activity time of at least one target activity in the first countdown page are obtained; Determining a first time offset between a standard time at the first moment and a system set time at the first moment; Determine the countdown time of each target activity in the first countdown page relative to the first moment based on the first time offset, the system setting time of the first moment, and the activity time corresponding to each target activity in the countdown page; Creating a first timer of the first countdown page, and calling the first timer to perform countdown processing according to the countdown time of each target activity relative to the first moment, so as to obtain the processed countdown time of each target activity relative to the first moment; The processed countdown time of each target activity relative to the first moment is displayed at a position corresponding to the target activity in the first countdown page.

2. The method according to claim 1, characterized in that The timing unit of the first timer is smaller than or equal to the smallest time unit among the time units of the activity time of the at least one target activity; The calling of the first timer to perform countdown processing according to the countdown time of each target activity relative to the first moment to obtain the processed countdown time of each target activity relative to the first moment includes: The first timer is called to perform timing using the timing unit according to the countdown time of each target activity relative to the first moment. When the timing time accumulates to the time unit corresponding to each target activity, the countdown time of each target activity relative to the first moment is counted down using the corresponding time unit to obtain the processed countdown time of each target activity relative to the first moment.

3. The method according to claim 1, characterized in that If the application includes a plurality of countdown pages, after determining the first time offset between the standard time at the first moment and the system set time at the first moment, the method further includes: If a trigger signal for displaying a second countdown page of the application is detected at a second moment, a system setting time of the second moment and an activity time of at least one target activity in the second countdown page are obtained, wherein the second moment is any moment later than the first moment, and the second countdown page is any countdown page among the multiple countdown pages except the first countdown page; Determine the countdown time of each target activity in the second countdown page relative to the second moment based on the first time offset, the system setting time of the second moment, and the activity time corresponding to each target activity in the second countdown page; Creating a second timer of the second countdown page, and calling the second timer to perform countdown processing according to the countdown time of each target activity relative to the second moment, so as to obtain the processed countdown time of each target activity relative to the second moment, wherein the second timer and the first timer are different timers; The processed countdown time of each target activity relative to the second moment is displayed at a position corresponding to the target activity in the second countdown page.

4. The method according to claim 1, characterized in that: If the application includes a plurality of countdown pages, after determining the first time offset between the standard time at the first moment and the system set time at the first moment, the method further includes: If a trigger signal for displaying a third countdown page of the application is detected at a third moment, and the time interval between the third moment and the first moment reaches a preset time interval threshold, then the system setting time of the third moment, the standard time of the third moment, and the activity time of at least one target activity in the third countdown page are obtained, wherein the third moment is any moment after the first moment, and the third countdown page is any countdown page among the multiple countdown pages except the first countdown page; re-determining a third time offset between the standard time at the third moment and the system setting time at the third moment; Determine the countdown time of each target activity in the third countdown page relative to the third moment based on the third time offset, the system setting time of the third moment, and the activity time corresponding to each target activity in the third countdown page; Creating a third timer of the third countdown page, and calling the third timer to perform countdown processing according to the countdown time of each target activity relative to the third moment, so as to obtain the processed countdown time of each target activity relative to the third moment; The processed countdown time of each target activity relative to the third moment is displayed at a position of the target activity corresponding to the third countdown page.

5. The method according to claim 1, characterized in that The method further comprises: If a trigger signal for performing a target operation on the commodity corresponding to the target activity selected in the first countdown page is detected at a fourth moment, the system setting time of the fourth moment, the standard time of the fourth moment, and the activity time corresponding to the target activity selected in the first countdown page are re-obtained, and the fourth moment is any moment after the first moment; Determine a fourth time offset between the standard time at the fourth moment and the system setting time at the fourth moment; Determine a countdown time of the selected target activity in the first countdown page relative to the fourth moment based on the fourth time offset, the system setting time of the fourth moment, and the activity time corresponding to the selected target activity in the first countdown page; If the processed countdown time of the selected target activity relative to the first moment is inconsistent with the countdown time of the selected target activity relative to the fourth moment, calling the first timer to perform countdown processing according to the countdown time of the selected target activity relative to the fourth moment, so as to obtain the processed countdown time of the selected target activity relative to the fourth moment; The processed countdown time of the selected target activity relative to the fourth moment is displayed at the position of the selected target activity in the first countdown page.

6. The method according to claim 1, characterized in that After creating the first timer of the first countdown page, the method further includes: If a trigger signal for exiting the first countdown page is detected, destroying the first timer; If a trigger signal for re-displaying the first countdown page is detected at the fifth moment, the system setting time of the fifth moment is obtained; Determine a countdown time corresponding to each target activity in the first countdown page relative to the fifth moment based on the first time offset, the system setting time at the fifth moment, and the activity time corresponding to each target activity in the first countdown page; Recreate the fifth timer of the first countdown page, and call the fifth timer to perform countdown processing according to the corresponding countdown time of each target activity relative to the fifth moment, so as to obtain the processed countdown time of each target activity relative to the fifth moment; The processed countdown time of each target activity relative to the fifth moment is redisplayed at the position of the target activity corresponding to the first countdown page.

7. The method according to any one of claims 1 to 6, characterized in that Before obtaining the system setting time at the first moment, the standard time at the first moment, and the activity time of at least one target activity in the first countdown page, the method further includes: Determine a visible activity in the first countdown page that is located in a visible area of ​​the screen at the first moment; The visible activity is used as the at least one target activity.

8. A countdown processing device, characterized in that: include: an obtaining unit, configured to obtain, if a trigger signal for displaying a first countdown page of an application is detected at a first moment, a system setting time at the first moment, a standard time at the first moment, and an activity time of at least one target activity in the first countdown page; a determining unit, configured to determine a first time offset between a standard time at the first moment and a system setting time at the first moment; The determining unit is further configured to determine the countdown time of each target activity in the first countdown page relative to the first moment based on the first time offset, the system setting time of the first moment, and the activity time corresponding to each target activity in the countdown page; A countdown unit, used for creating a first timer of the first countdown page, and calling the first timer to perform countdown processing according to the countdown time of each target activity relative to the first moment, so as to obtain the processed countdown time of each target activity relative to the first moment; A display unit is used to display the processed countdown time of each target activity relative to the first moment at a position corresponding to the target activity in the first countdown page.

9. A countdown processing device, characterized in that: include: CPU and memory; The memory is a short-term storage memory or a persistent storage memory; The central processing unit is configured to communicate with the memory and execute instructions in the memory to perform the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium comprises instructions, and when the instructions are executed on a computer, the computer is caused to perform the method according to any one of claims 1 to 7.

11. A computer program product comprising instructions or a computer program, characterized in that When the computer program product is run on a computer, the computer is caused to execute the method according to any one of claims 1 to 7.