CN113760417A - Page countdown display method and device - Google Patents
Page countdown display method and device Download PDFInfo
- Publication number
- CN113760417A CN113760417A CN202010505313.8A CN202010505313A CN113760417A CN 113760417 A CN113760417 A CN 113760417A CN 202010505313 A CN202010505313 A CN 202010505313A CN 113760417 A CN113760417 A CN 113760417A
- Authority
- CN
- China
- Prior art keywords
- time
- countdown
- server
- page
- real
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 59
- 238000004590 computer program Methods 0.000 claims description 9
- 230000004044 response Effects 0.000 claims description 7
- 238000010586 diagram Methods 0.000 description 13
- 230000008569 process Effects 0.000 description 12
- 230000000694 effects Effects 0.000 description 9
- 230000007246 mechanism Effects 0.000 description 8
- 238000004891 communication Methods 0.000 description 7
- 230000006870 function Effects 0.000 description 6
- 238000012545 processing Methods 0.000 description 5
- 230000003287 optical effect Effects 0.000 description 4
- 230000004048 modification Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000008901 benefit Effects 0.000 description 2
- 239000000835 fiber Substances 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 238000010276 construction Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000009191 jumping Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 238000011084 recovery Methods 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/04—Generating or distributing clock signals or signals derived directly therefrom
- G06F1/14—Time supervision arrangements, e.g. real time clock
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention discloses a page countdown display method and device, and relates to the technical field of computers. One embodiment of the method comprises: responding to the starting of the page, and acquiring countdown ending time; acquiring local real-time, and determining the real-time of the server according to the local real-time and the first time difference; and determining countdown time according to the real-time of the server and the countdown ending time, and displaying the countdown time on a terminal interface. The implementation mode obviously reduces the delay condition of page countdown and reduces the load of the server.
Description
Technical Field
The invention relates to the technical field of computers, in particular to a page countdown display method and device.
Background
It is common for countdown effects to be displayed in pages such as: after logging in a certain website, jumping to a home page after a few seconds; counting down a stopwatch; clock effect …, the difference between the countdown ending time and the countdown starting time is gradually reduced mainly by timing call or the like in the prior art, so as to realize the page countdown effect.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art:
in the existing page countdown display method, a timing calling mechanism has a large error in an execution process, so that long time delay exists and the server load is too high.
Disclosure of Invention
In view of this, embodiments of the present invention provide a page countdown display method and apparatus, which can significantly reduce the delay condition of page countdown and reduce the server load.
In order to achieve the above object, according to a first aspect of the embodiments of the present invention, there is provided a page countdown display method, including:
responding to the starting of the page, and acquiring countdown ending time;
acquiring local real-time, and determining the real-time of the server according to the local real-time and the first time difference;
and determining countdown time according to the real-time of the server and the countdown ending time, and displaying the countdown time on a terminal interface.
Further, after the step of obtaining the countdown ending time in response to the page starting, the page countdown display method further includes: a server first time and a local first time are obtained.
Further, the first time difference is determined based on the server first time and the local first time.
Further, the step of obtaining the local real-time and determining the server real-time according to the local real-time and the first time difference comprises: and obtaining local real-time according to the calling period, and determining the real-time of the server according to the local real-time and the first time difference.
Further, before the step of displaying the countdown time on the terminal interface, the page countdown display method further includes determining that the countdown time is not zero.
Further, after the step of displaying the countdown time on the terminal interface, the page countdown displaying method further includes determining whether the first time difference needs to be calibrated.
Further, in a case that the first time difference needs to be calibrated, the page countdown display method further includes: and determining a calibration time threshold according to the countdown time, acquiring the first time of the server and the first local time according to the calibration time threshold, and calibrating the first time difference according to the first time of the server and the first local time.
According to a second aspect of the embodiments of the present invention, there is provided a page countdown display device, including:
the countdown ending time acquiring module is used for responding to the starting of the page and acquiring countdown ending time;
the server real-time determining module is used for acquiring local real-time and determining the server real-time according to the local real-time and the first time difference;
and the countdown display module is used for determining countdown time according to the real-time of the server and the countdown ending time and displaying the countdown time on the terminal interface.
According to a third aspect of embodiments of the present invention, there is provided an electronic apparatus, including:
one or more processors;
a storage device for storing one or more programs,
when executed by one or more processors, cause the one or more processors to implement any of the page countdown displaying methods described above.
According to a fourth aspect of embodiments of the present invention, there is provided a computer readable medium, on which a computer program is stored, which when executed by a processor, implements any one of the page countdown displaying methods described above.
One embodiment of the above invention has the following advantages or benefits: the countdown ending time is acquired by responding to the starting of the page; acquiring local real-time, and determining the real-time of the server according to the local real-time and the first time difference; the technical means of determining the countdown time according to the real-time of the server and the countdown ending time and displaying the countdown time on the terminal interface is adopted, so that the technical problems that a timing calling mechanism in the existing page countdown displaying method has a large error in the execution process and the server load is too high are solved, and the technical effects of remarkably reducing the delay condition of page countdown and reducing the server load are achieved.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
fig. 1 is a schematic diagram of a main flow of a page countdown display method according to a first embodiment of the present invention;
FIG. 2 is a schematic diagram illustrating a main flow of a page countdown displaying method according to a second embodiment of the present invention;
FIG. 3 is a schematic diagram of the main modules of a page countdown display device provided according to an embodiment of the present invention;
FIG. 4 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 5 is a schematic block diagram of a computer system suitable for use in implementing a terminal device or server of an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 is a schematic diagram of a main flow of a page countdown display method according to a first embodiment of the present invention; as shown in fig. 1, the page countdown display method provided by the embodiment of the present invention mainly includes:
step S101, responding to the starting of the page, and acquiring countdown ending time.
Specifically, the countdown ending time is obtained when the page is loaded for the first time, so that the countdown time is determined subsequently to be displayed correspondingly.
According to an embodiment of the present invention, after the step of obtaining the countdown ending time in response to the starting of the page, the page countdown display method further includes: a server first time and a local first time are obtained.
The first time of the server: the current time of the server after the page is started;
local first time: the current time of the local area after the page is started.
It should be noted that after the page is started, since a request for obtaining the current time is sent to the server, a certain duration (a first time difference) is required for the server to return the current time to the process, that is, a certain time difference exists between the obtained local first time and the first time of the server, and in order to accurately calculate the first time difference, the local first time needs to be obtained after the first time of the server is obtained.
Specifically, according to the embodiment of the present invention, the first time difference is determined according to the server first time and the local first time.
According to a specific implementation of the embodiments of the present invention, the first time difference is determined by subtracting the local first time from the server first time.
And S102, acquiring local real-time, and determining the real-time of the server according to the local real-time and the first time difference.
Through the setting, the real-time corresponding to the server can be determined according to the local real-time and the first time difference, so that errors and time delay caused by continuously calling and acquiring the server time at regular time are avoided, and the time delay condition of page countdown and the server load are obviously reduced.
Specifically, according to the embodiment of the present invention, the step of obtaining the local real-time and determining the server real-time according to the local real-time and the first time difference includes: and obtaining local real-time according to the calling period, and determining the real-time of the server according to the local real-time and the first time difference.
The countdown displayed on the page is continuously changed along with the time, so that the local real-time is obtained according to the calling period to determine the real-time of the server, and the subsequent determination of the real-time countdown time is facilitated for displaying. Specifically, according to the embodiment of the present invention, the invoking period may be set to one second, that is, the local real-time is acquired every second (here, the setting of the value of the invoking period is merely an example, and the specific implementation may be set according to actual requirements).
And S103, determining countdown time according to the real-time of the server and the countdown ending time, and displaying the countdown time on a terminal interface.
By the arrangement, the countdown time is determined according to the real-time of the server and the countdown ending time, and the countdown time is remarkably reduced due to the fact that the server real-time is determined to avoid errors, and meanwhile, the server load is remarkably reduced due to the fact that the server real-time is frequently acquired through a timing calling mechanism is avoided.
The terminal interface can be a web-side interface, a server-side interface or a client-side interface. When the terminal is an embedded device, the terminal interface may be a screen of the embedded device.
Specifically, according to the embodiment of the present invention, before the step of displaying the countdown time on the terminal interface, the page countdown displaying method further includes determining that the countdown time is not zero.
And displaying the countdown time on the terminal interface only when the countdown time is not zero, and if the countdown time is zero, namely the countdown is finished, displaying is not needed, and the operation of acquiring the local time can be stopped.
According to the embodiment of the invention, after the step of displaying the countdown time on the terminal interface, the page countdown displaying method further comprises the step of judging whether the first time difference needs to be calibrated or not.
By calibrating the first time difference, the condition that the first time difference is inaccurate when the local time is modified is avoided, and therefore the safety and the accuracy of page countdown are improved.
Further, according to an embodiment of the present invention, in the case that the first time difference needs to be calibrated, the page countdown display method further includes: and determining a calibration time threshold according to the countdown time, acquiring the first time of the server and the first local time according to the calibration time threshold, and calibrating the first time difference according to the first time of the server and the first local time.
According to an embodiment of the present invention, when the countdown time is longer, the value of the calibration time threshold may be set to be relatively smaller, i.e., the calibration frequency is increased.
According to the technical scheme of the embodiment of the invention, the countdown ending time is obtained by responding to the starting of the page; acquiring local real-time, and determining the real-time of the server according to the local real-time and the first time difference; the technical means of determining the countdown time according to the real-time of the server and the countdown ending time and displaying the countdown time on the terminal interface is adopted, so that the technical problems that a timing calling mechanism in the existing page countdown displaying method has a large error in the execution process and the server load is too high are solved, and the technical effects of remarkably reducing the delay condition of page countdown and reducing the server load are achieved.
FIG. 2 is a schematic diagram illustrating a main flow of a page countdown displaying method according to a second embodiment of the present invention; as shown in fig. 2, in the embodiment of the present invention, a countdown display method of a web (web) end page is applied, and the page countdown display method provided in the embodiment of the present invention mainly includes:
in step S201, in response to the start of the page, the countdown ending time is acquired.
Specifically, the countdown ending time is obtained when the page is loaded for the first time, so that the countdown time is determined subsequently to be displayed correspondingly.
Step S202, a first time of the server and a first local time are obtained.
The first time of the server: the current time of the server after the page is started;
local first time: the current time of the local area after the page is started.
It should be noted that after the page is started, since a request for obtaining the current time is sent to the server, a certain duration (a first time difference) is required for the server to return the current time to the process, that is, a certain time difference exists between the obtained local first time and the first time of the server, and in order to accurately calculate the first time difference, the local first time needs to be obtained after the first time of the server is obtained.
Step S203, determining a first time difference according to the first time of the server and the first local time.
According to an embodiment of the invention, the first time difference is equal to the server first time minus the local first time.
And step S204, acquiring local real-time, and determining the real-time of the server according to the local real-time and the first time difference.
According to an embodiment of the invention, the server real time is equal to the local real time plus the first time difference.
According to the embodiment of the present invention, the step of obtaining the local real-time and determining the server real-time according to the local real-time and the first time difference includes: and obtaining local real-time according to the calling period, and determining the real-time of the server according to the local real-time and the first time difference.
The countdown displayed on the page is continuously changed along with the time, so that the local real-time is obtained according to the calling period to determine the real-time of the server, and the subsequent determination of the real-time countdown time is facilitated for displaying. Specifically, according to the embodiment of the present invention, the timer setInterval is executed once every second, and when the content to be executed in the timer needs to be executed, the local real-time, that is, the current time of the time is obtained, and then the server real-time is calculated according to the local real-time by combining the first time difference, so as to calculate the countdown time later.
In step S205, it is determined whether the countdown time is zero. If yes, i.e. the countdown time is zero, go to step S208; if not, i.e. the countdown time is not zero, go to step S206.
Step S206, determining countdown time according to the real-time of the server and the countdown ending time, and displaying the countdown time on the terminal interface.
And displaying the countdown time on the terminal interface only when the countdown time is not zero, and if the countdown time is zero, namely the countdown is finished, displaying is not needed, and the operation of acquiring the local time can be stopped.
Step S207, determining whether the first time difference needs to be calibrated. If yes, i.e. the first time difference needs to be calibrated, go to step S202; if not, i.e. the first time difference does not need to be calibrated, go to step S204.
By calibrating the first time difference, the condition that the first time difference is inaccurate when the local time is modified is avoided, and therefore the safety and the accuracy of page countdown are improved. According to an embodiment of the present invention, when the countdown time is longer, the value of the calibration time threshold may be set to be relatively smaller, i.e., the calibration frequency is increased.
And step S208, ending the countdown and ending the display on the terminal interface.
Through the setting, utilize and directly acquire local real-time and calculate down-timing time, replaced and obtained server real-time through timing device and calculated down-timing time, very big reduction the delay situation of down-timing, can guarantee even that down-timing reaches zero time delay, even under the page hidden state (timing device is out of work this moment), the user calls up the page after the timer restart work, also can guarantee down-timing recovery at once is accurate, thereby effectively avoided because the problem of the time delay of down-timing that user local time and server time inconsistent production.
According to the technical scheme of the embodiment of the invention, the countdown ending time is obtained by responding to the starting of the page; acquiring local real-time, and determining the real-time of the server according to the local real-time and the first time difference; the technical means of determining the countdown time according to the real-time of the server and the countdown ending time and displaying the countdown time on the terminal interface is adopted, so that the technical problems that a timing calling mechanism in the existing page countdown displaying method has a large error in the execution process and the server load is too high are solved, and the technical effects of remarkably reducing the delay condition of page countdown and reducing the server load are achieved.
FIG. 3 is a schematic diagram of the main modules of a page countdown display device provided according to an embodiment of the present invention; as shown in fig. 3, the page countdown displaying device 300 according to the embodiment of the present invention mainly includes:
a countdown ending time obtaining module 301, configured to obtain a countdown ending time in response to the starting of the page.
Specifically, the countdown ending time is obtained when the page is loaded for the first time, so that the countdown time is determined subsequently to be displayed correspondingly.
According to an embodiment of the present invention, the page countdown displaying apparatus 300 further includes a first time obtaining module, and after the step of obtaining the countdown ending time in response to the starting of the page, the first time obtaining module is configured to: a server first time and a local first time are obtained.
The first time of the server: the current time of the server after the page is started;
local first time: the current time of the local area after the page is started.
It should be noted that after the page is started, since a request for obtaining the current time is sent to the server, a certain duration (a first time difference) is required for the server to return the current time to the process, that is, a certain time difference exists between the obtained local first time and the first time of the server, and in order to accurately calculate the first time difference, the local first time needs to be obtained after the first time of the server is obtained.
Specifically, according to the embodiment of the present invention, the first time difference is determined according to the server first time and the local first time.
According to a specific implementation of the embodiments of the present invention, the first time difference is determined by subtracting the local first time from the server first time.
The server real-time determining module 302 is configured to obtain a local real-time, and determine the server real-time according to the local real-time and the first time difference.
Through the setting, the real-time corresponding to the server can be determined according to the local real-time and the first time difference, so that errors and time delay caused by constantly calling and acquiring the server time at regular time are avoided, and the time delay condition of page countdown is remarkably reduced.
Specifically, according to an embodiment of the present invention, the server real-time determining module 302 is further configured to: and obtaining local real-time according to the calling period, and determining the real-time of the server according to the local real-time and the first time difference.
The countdown displayed on the page is continuously changed along with the time, so that the local real-time is obtained according to the calling period to determine the real-time of the server, and the subsequent determination of the real-time countdown time is facilitated for displaying. Specifically, according to the embodiment of the present invention, the invoking period may be set to one second, that is, the local real-time is acquired every second (here, the setting of the value of the invoking period is merely an example, and the specific implementation may be set according to actual requirements).
And the countdown displaying module 303 is configured to determine a countdown time according to the server real-time and the countdown ending time, and display the countdown time on the terminal interface.
By the arrangement, the countdown time is determined according to the real-time of the server and the countdown ending time, and the countdown time is remarkably reduced due to the fact that the server real-time is determined to avoid errors, and meanwhile, the server load is remarkably reduced due to the fact that the server real-time is frequently acquired through a timing calling mechanism is avoided.
Specifically, according to the embodiment of the present invention, the page countdown displaying device 300 further includes a countdown unfinished time determining module, and before the step of displaying the countdown time on the terminal interface, the countdown unfinished time determining module is configured to determine that the countdown time is not zero.
And displaying the countdown time on the terminal interface only when the countdown time is not zero, and if the countdown time is zero, namely the countdown is finished, displaying is not needed, and the operation of acquiring the local time can be stopped.
According to an embodiment of the present invention, the page countdown displaying device 300 further includes a determining module, and after the step of displaying the countdown time on the terminal interface, the determining module is configured to determine whether the first time difference needs to be calibrated.
By calibrating the first time difference, the condition that the first time difference is inaccurate when the local time is modified is avoided, and therefore the safety and the accuracy of page countdown are improved.
Further, according to the embodiment of the present invention, the page countdown displaying device 300 further includes a calibration module, configured to: and determining a calibration time threshold according to the countdown time, acquiring the first time of the server and the first local time according to the calibration time threshold, and calibrating the first time difference according to the first time of the server and the first local time.
According to an embodiment of the present invention, when the countdown time is longer, the value of the calibration time threshold may be set to be relatively smaller, i.e., the calibration frequency is increased.
According to the technical scheme of the embodiment of the invention, the countdown ending time is obtained by responding to the starting of the page; acquiring local real-time, and determining the real-time of the server according to the local real-time and the first time difference; the technical means of determining the countdown time according to the real-time of the server and the countdown ending time and displaying the countdown time on the terminal interface is adopted, so that the technical problems that a timing calling mechanism in the existing page countdown displaying method has a large error in the execution process and the server load is too high are solved, and the technical effects of remarkably reducing the delay condition of page countdown and reducing the server load are achieved.
Fig. 4 illustrates an exemplary system architecture 400 of a page countdown showing method or page countdown showing apparatus to which embodiments of the present invention may be applied.
As shown in fig. 4, the system architecture 400 may include terminal devices 401, 402, 403, a network 404, and a server 405 (this architecture is merely an example, and the components included in a particular architecture may be adapted according to application specific circumstances). The network 404 serves as a medium for providing communication links between the terminal devices 401, 402, 403 and the server 405. Network 404 may include various types of connections, such as wire, wireless communication links, or fiber optic cables, to name a few.
A user may use terminal devices 401, 402, 403 to interact with a server 405 over a network 404 to receive or send messages or the like. The terminal devices 401, 402, 403 may have installed thereon various communication client applications, such as shopping-like applications, web browser applications, search-like applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only).
The terminal devices 401, 402, 403 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 405 may be a server providing various services, such as a background management server (for example only) providing support for shopping websites browsed by users using the terminal devices 401, 402, 403. The background management server may analyze and perform other processing on the received data such as the countdown ending time and the local real-time, and feed back a processing result (for example, the server real-time and the countdown time — only by way of example) to the terminal device.
It should be noted that the page countdown display method provided by the embodiment of the present invention is generally executed by the server 405, and accordingly, the page countdown display apparatus is generally disposed in the server 405.
It should be understood that the number of terminal devices, networks, and servers in fig. 4 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 5, shown is a block diagram of a computer system 500 suitable for use with a terminal device implementing an embodiment of the present invention. The terminal device shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 5, the computer system 500 includes a Central Processing Unit (CPU)501 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data necessary for the operation of the system 500 are also stored. The CPU 501, ROM 502, and RAM 503 are connected to each other via a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
The following components are connected to the I/O interface 505: an input portion 506 including a keyboard, a mouse, and the like; an output portion 507 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The driver 510 is also connected to the I/O interface 505 as necessary. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as necessary, so that a computer program read out therefrom is mounted into the storage section 508 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 509, and/or installed from the removable medium 511. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 501.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor includes a countdown ending time acquisition module, a server real-time determination module, and a countdown display module. The names of these modules do not constitute a limitation to the module itself in some cases, and for example, the countdown ending time acquiring module may also be described as a "module for acquiring a countdown ending time in response to the start of a page".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: responding to the starting of the page, and acquiring countdown ending time; acquiring local real-time, and determining the real-time of the server according to the local real-time and the first time difference; and determining countdown time according to the real-time of the server and the countdown ending time, and displaying the countdown time on a terminal interface.
According to the technical scheme of the embodiment of the invention, the countdown ending time is obtained by responding to the starting of the page; acquiring local real-time, and determining the real-time of the server according to the local real-time and the first time difference; the technical means of determining the countdown time according to the real-time of the server and the countdown ending time and displaying the countdown time on the terminal interface is adopted, so that the technical problems that a timing calling mechanism in the existing page countdown displaying method has a large error in the execution process and the server load is too high are solved, and the technical effects of remarkably reducing the delay condition of page countdown and reducing the server load are achieved.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims (10)
1. A page countdown display method is characterized by comprising the following steps:
responding to the starting of the page, and acquiring countdown ending time;
acquiring local real-time, and determining the real-time of a server according to the local real-time and the first time difference;
and determining countdown time according to the server real-time and the countdown ending time, and displaying the countdown time on a terminal interface.
2. The page countdown displaying method of claim 1, wherein after the step of obtaining a countdown ending time in response to the page starting, the page countdown displaying method further comprises: a server first time and a local first time are obtained.
3. The method for page countdown displaying of claim 2, wherein the first time difference is determined according to a server first time and a local first time.
4. The method for page countdown displaying of claim 1, wherein the step of obtaining the local real-time and determining the server real-time according to the local real-time and the first time difference comprises: and obtaining local real-time according to the calling period, and determining the real-time of the server according to the local real-time and the first time difference.
5. The method for page countdown displaying of claim 1, wherein prior to the step of displaying the countdown time on the terminal interface, the method for page countdown displaying further comprises determining that the countdown time is not zero.
6. The method for page countdown displaying of claim 1, wherein after the step of displaying the countdown time on the terminal interface, the method for page countdown displaying further comprises determining whether the first time difference needs to be calibrated.
7. The page countdown displaying method according to claim 6, wherein when the first time difference needs to be calibrated, the page countdown displaying method further comprises: determining a calibration time threshold according to the countdown time, acquiring a first time of the server and a first local time according to the calibration time threshold, and calibrating the first time difference according to the first time of the server and the first local time.
8. A page countdown display device, comprising:
the countdown ending time acquiring module is used for responding to the starting of the page and acquiring countdown ending time;
the server real-time determining module is used for acquiring local real-time and determining the server real-time according to the local real-time and the first time difference;
and the countdown display module is used for determining countdown time according to the real-time of the server and the countdown ending time and displaying the countdown time on a terminal interface.
9. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-7.
10. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010505313.8A CN113760417A (en) | 2020-06-05 | 2020-06-05 | Page countdown display method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010505313.8A CN113760417A (en) | 2020-06-05 | 2020-06-05 | Page countdown display method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113760417A true CN113760417A (en) | 2021-12-07 |
Family
ID=78784965
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010505313.8A Pending CN113760417A (en) | 2020-06-05 | 2020-06-05 | Page countdown display method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113760417A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114827699A (en) * | 2022-04-25 | 2022-07-29 | 康键信息技术(深圳)有限公司 | Time synchronization method, device, equipment and storage medium for live broadcast activity |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103793228A (en) * | 2014-01-26 | 2014-05-14 | 深圳市东信时代信息技术有限公司 | Counting-down system and method |
CN106886245A (en) * | 2015-12-16 | 2017-06-23 | 天脉聚源(北京)科技有限公司 | A kind of accurate countdown realization method and system |
CN110391861A (en) * | 2018-04-19 | 2019-10-29 | 北京京东尚科信息技术有限公司 | A kind of method and apparatus of check timer |
-
2020
- 2020-06-05 CN CN202010505313.8A patent/CN113760417A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103793228A (en) * | 2014-01-26 | 2014-05-14 | 深圳市东信时代信息技术有限公司 | Counting-down system and method |
CN106886245A (en) * | 2015-12-16 | 2017-06-23 | 天脉聚源(北京)科技有限公司 | A kind of accurate countdown realization method and system |
CN110391861A (en) * | 2018-04-19 | 2019-10-29 | 北京京东尚科信息技术有限公司 | A kind of method and apparatus of check timer |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114827699A (en) * | 2022-04-25 | 2022-07-29 | 康键信息技术(深圳)有限公司 | Time synchronization method, device, equipment and storage medium for live broadcast activity |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109936605B (en) | Method and device for loading interface data | |
CN115309470B (en) | Method, device, equipment and storage medium for loading widget | |
CN112486783B (en) | Progress bar display method and device | |
CN113760417A (en) | Page countdown display method and device | |
CN111783010B (en) | Webpage blank page monitoring method, device, terminal and storage medium | |
CN116545905A (en) | Service health detection method and device, electronic equipment and storage medium | |
CN110391861B (en) | Method, device, equipment and storage medium for correcting timer | |
CN111338928A (en) | Chrome-based browser testing method and device | |
CN113590447B (en) | Buried point processing method and device | |
CN113760487B (en) | Service processing method and device | |
CN115766697A (en) | File downloading method, device, equipment and storage medium | |
CN109087097B (en) | Method and device for updating same identifier of chain code | |
CN114237755A (en) | Application running method and device, electronic equipment and storage medium | |
CN111950232B (en) | Method and device for automatically switching number segments | |
CN113760274A (en) | Front-end component logic injection method and device | |
CN113722193A (en) | Method and device for detecting page abnormity | |
CN113486116A (en) | Data synchronization method and device, electronic equipment and computer readable medium | |
CN115840604B (en) | Data processing method, device, electronic equipment and computer readable storage medium | |
CN110597525A (en) | Method and apparatus for installing applications | |
CN114237752B (en) | Push page display method and device, electronic equipment and storage medium | |
CN113297087A (en) | Test method and device | |
CN114564316A (en) | Message pushing method, device, equipment and storage medium | |
CN116071112A (en) | Advertisement putting service processing method and device, electronic equipment and storage medium | |
CN113612676A (en) | Social group message synchronization method, device, equipment and storage medium | |
CN116028751A (en) | Browser message interaction method, device, equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |