CN105553588B - A kind of renewal time method and relevant device - Google Patents

A kind of renewal time method and relevant device Download PDF

Info

Publication number
CN105553588B
CN105553588B CN201510580122.7A CN201510580122A CN105553588B CN 105553588 B CN105553588 B CN 105553588B CN 201510580122 A CN201510580122 A CN 201510580122A CN 105553588 B CN105553588 B CN 105553588B
Authority
CN
China
Prior art keywords
ntp server
rate
successfully accessed
mobile terminal
time
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.)
Active
Application number
CN201510580122.7A
Other languages
Chinese (zh)
Other versions
CN105553588A (en
Inventor
温波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yulong Computer Telecommunication Scientific Shenzhen Co Ltd
Original Assignee
Yulong Computer Telecommunication Scientific Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yulong Computer Telecommunication Scientific Shenzhen Co Ltd filed Critical Yulong Computer Telecommunication Scientific Shenzhen Co Ltd
Priority to CN201510580122.7A priority Critical patent/CN105553588B/en
Publication of CN105553588A publication Critical patent/CN105553588A/en
Application granted granted Critical
Publication of CN105553588B publication Critical patent/CN105553588B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Telephonic Communication Services (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The present embodiments relate to mobile communication technology field, a kind of renewal time method and relevant device are disclosed, wherein this method includes:Mobile terminal is successfully accessed from the Network Time Protocol ntp server to prestore in rate dynamic change table, and inquiry is successfully accessed the maximum ntp server mark of rate;Wherein, it includes that at least two ntp servers mark and each ntp server mark corresponding are successfully accessed rate to be successfully accessed rate dynamic change table;Mobile terminal sends renewal time request to the target ntp server belonging to the maximum ntp server mark of the rate that is successfully accessed;Mobile terminal judges whether to receive the standard time that the response renewal time request of target ntp server returns;When receiving the standard time, mobile terminal updates local zone time according to the standard time.Implement the embodiment of the present invention, improves the efficiency of mobile terminal to update time.

Description

A kind of renewal time method and relevant device
Technical field
The present invention relates to mobile communication technology fields, more particularly to a kind of renewal time method and relevant device.
Background technology
Currently, domestic mobile terminal is based primarily upon Network Time Protocol (Network Time Protocol, NTP) Renewal time.In general, a mobile terminal is connected with one or more ntp servers simultaneously.It is based on NTP more in mobile terminal In new time course, first, mobile terminal initiates renewal time request to ntp server, secondly, ntp server from observatory, Universal time is obtained in satellite or Internet, finally, ntp server is by the universal time of acquisition with the side of multi-hop Formula passes to mobile terminal, completes the update of mobile terminal time.
But found in practice, it is above-mentioned be based on NTP renewal times during, when mobile terminal to ntp server send out When playing time request, the phenomenon that no response or response timeout can occur probabilityly in corresponding ntp server, this causes to move Terminal cannot renewal time in time, affect the efficiency of mobile terminal to update time.
Invention content
The embodiment of the invention discloses a kind of renewal time method and relevant devices, can improve the mobile terminal to update time Efficiency.
First aspect of the embodiment of the present invention discloses a kind of renewal time method, including:
From being successfully accessed in rate dynamic change table for the Network Time Protocol ntp server to prestore, inquiry is successfully accessed rate Maximum ntp server mark;Wherein, it is described be successfully accessed rate dynamic change table include at least two ntp servers identify with And each described ntp server mark is corresponding is successfully accessed rate;
It is asked to the target ntp server transmission renewal time being successfully accessed belonging to the maximum ntp server mark of rate It asks;
Judge whether that receiving the target ntp server responds the standard time that the renewal time request returns;
When receiving the standard time, local zone time is updated according to the standard time.
In the first possible realization method of first aspect of the embodiment of the present invention, updated according to the standard time After local zone time, the method further includes:
According to preset incrementss it is corresponding to the target ntp server it is described be successfully accessed rate increase operation with Rate dynamic change table is successfully accessed described in update.
In conjunction with the first possible realization method of first aspect of the embodiment of the present invention, in first aspect of the embodiment of the present invention Second of possible realization method in, the method further includes:
When not receiving the standard time, according to preset decrement to the corresponding institute of the target ntp server It states the rate of being successfully accessed and reduce operation and described be successfully accessed rate dynamic change table to update.
In conjunction with appointing in the first of first aspect of the embodiment of the present invention or first aspect of the embodiment of the present invention to second A kind of possible realization method, in the third possible realization method of first aspect of the embodiment of the present invention, from prestoring Network Time Protocol ntp server is successfully accessed in rate dynamic change table, and inquiry is successfully accessed the maximum ntp server mark of rate Before knowledge, the method further includes:
Obtain the ntp server of input is successfully accessed rate initial table;Wherein, the rate initial table that is successfully accessed includes institute It states at least two ntp servers mark and each described ntp server identifies corresponding initial access success rate;
It is successfully accessed each ntp server mark in rate initial table for described, is periodically serviced to the NTP Ntp server belonging to device mark sends detection instruction;
Judge whether that receiving the ntp server responds the response instruction that the detection instruction returns;
If so, being increased according to the preset incrementss initial access success rate corresponding to the ntp server Operation, if it is not, carrying out reduction behaviour according to the preset decrement initial access success rate corresponding to the ntp server Make, rate dynamic change table is successfully accessed to generate ntp server.
In conjunction with the third possible realization method of first aspect of the embodiment of the present invention, in first aspect of the embodiment of the present invention The 4th kind of possible realization method in, it is described from the Network Time Protocol ntp server to prestore be successfully accessed rate dynamic become To change in table, inquiry is successfully accessed the maximum ntp server mark of rate, including:
Whether the location of detection mobile terminal region changes, if the location of mobile terminal region occurs Variation, from being successfully accessed in rate dynamic change table for the Network Time Protocol ntp server that the mobile terminal prestores, inquiry connects Enter the maximum ntp server mark of success rate.
Second aspect of the embodiment of the present invention discloses a kind of mobile terminal, including:
Query unit is looked into for being successfully accessed in rate dynamic change table from the Network Time Protocol ntp server to prestore Inquiry is successfully accessed the maximum ntp server mark of rate;Wherein, the rate dynamic change table that is successfully accessed includes at least two NTP Server identification and each described ntp server mark is corresponding is successfully accessed rate;
Interactive unit, for being sent out to the target ntp server being successfully accessed belonging to the maximum ntp server mark of rate Renewal time is sent to ask;
Judging unit responds the update for judging whether the interactive unit receives the target ntp server The standard time that time request returns;
Time updating unit, for judging that the interactive unit receives the standard time in the judging unit When, local zone time is updated according to the standard time that the interactive unit receives.
In the first possible realization method of second aspect of the embodiment of the present invention, the mobile terminal further includes:
Dynamic update unit, the standard time for being received according to the interactive unit in the time updating unit After updating local zone time, carried out according to the preset incrementss rate that is successfully accessed corresponding to the target ntp server Increase operation and described is successfully accessed rate dynamic change table to update.
In conjunction with the first possible realization method of second aspect of the embodiment of the present invention, in second aspect of the embodiment of the present invention Second of possible realization method in, the dynamic update unit is additionally operable to judge that the interaction is single in the judging unit When member does not receive the target ntp server and responds the standard time that renewal time request returns, subtracted according to preset The rate that is successfully accessed corresponding to the target ntp server reduce operation described to be successfully accessed rate dynamic to update on a small quantity State changes table.
In conjunction with appointing in the first of second aspect of the embodiment of the present invention or second aspect of the embodiment of the present invention to second A kind of possible realization method, it is described mobile whole in the third possible realization method of second aspect of the embodiment of the present invention End further includes acquiring unit and generation unit, wherein:
The acquiring unit, for the query unit from the access of the Network Time Protocol ntp server to prestore at In power dynamics table, inquiry is successfully accessed before the maximum ntp server mark of rate, obtains the ntp server of input It is successfully accessed rate initial table;Wherein, the rate initial table that is successfully accessed includes at least two ntp server mark and every One ntp server identifies corresponding initial access success rate;
The interactive unit is additionally operable to be successfully accessed each ntp server mark, week in rate initial table for described Detection instruction is sent to the ntp server belonging to ntp server mark to phase property;
The judging unit is additionally operable to judge whether the interactive unit receives the ntp server and respond the inspection Survey the response instruction that instruction returns;
The generation unit, for judging that the interactive unit receives the ntp server and rings in the judging unit It is corresponding to the ntp server described initial according to preset incrementss when the response instruction for answering the detection instruction to return The rate of being successfully accessed carries out increase operation, alternatively, for judging that the interactive unit does not receive the NTP clothes in the judging unit When business device responds the response instruction that the detection instruction returns, according to preset decrement institute corresponding to the ntp server It states and is initially accessed success rate and carries out reduction operation, rate dynamic change table is successfully accessed to generate ntp server.
In conjunction with the third possible realization method of second aspect of the embodiment of the present invention, in second aspect of the embodiment of the present invention The 4th kind of possible realization method in, the query unit is specifically used for whether detection the location of mobile terminal region is sent out Changing, if the location of mobile terminal region changes, the Network Time Protocol NTP that prestores from the mobile terminal Server is successfully accessed in rate dynamic change table, and inquiry is successfully accessed the maximum ntp server mark of rate.
Compared with prior art, the embodiment of the present invention has the advantages that:
In the embodiment of the present invention, rate dynamic change is successfully accessed from the Network Time Protocol ntp server to prestore first In table, inquiry is successfully accessed the maximum ntp server mark of rate, and then identifies institute to the maximum ntp server of the rate that is successfully accessed The target ntp server of category sends renewal time request, is finally asked and is returned in response to renewal time according to target ntp server Standard time update local zone time.As it can be seen that implementing the embodiment of the present invention probabilityly, it is possible to reduce ntp server can occur Without response or the phenomenon that response timeout, so as to improve the efficiency of mobile terminal to update time.
Description of the drawings
It to describe the technical solutions in the embodiments of the present invention more clearly, below will be to embodiment or description of the prior art Needed in attached drawing be briefly described, it should be apparent that, the accompanying drawings in the following description be only the present invention some Embodiment for those of ordinary skill in the art without creative efforts, can also be attached according to these Figure obtains other attached drawings.
Fig. 1 is a kind of flow diagram of renewal time method disclosed by the embodiments of the present invention;
Fig. 2 is the flow diagram of another renewal time method disclosed by the embodiments of the present invention;
Fig. 3 is the flow diagram of another renewal time method disclosed by the embodiments of the present invention;
Fig. 4 is a kind of structural schematic diagram of mobile terminal disclosed by the embodiments of the present invention;
Fig. 5 is the structural schematic diagram of another mobile terminal disclosed by the embodiments of the present invention;
Fig. 6 is the structural schematic diagram of another mobile terminal disclosed by the embodiments of the present invention.
Specific implementation mode
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation describes, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
The embodiment of the invention discloses a kind of renewal time method and relevant devices, improve the mobile terminal to update time Efficiency.It is described in detail separately below.
Fig. 1 is referred to, Fig. 1 is a kind of flow diagram of renewal time method disclosed by the embodiments of the present invention.Such as Fig. 1 institutes Show, which may comprise steps of.
101, mobile terminal being successfully accessed in rate dynamic change table from the Network Time Protocol ntp server to prestore, looks into Inquiry is successfully accessed the maximum ntp server mark of rate.
In the embodiment of the present invention, mobile terminal may include smart mobile phone, tablet computer, palm PC, IPAD and shifting User equipmenies, the embodiment of the present invention such as dynamic internet device (Mobile Internet Device, MID) are not construed as limiting.
In the embodiment of the present invention, moved from the rate that is successfully accessed of the Network Time Protocol ntp server to prestore in mobile terminal State changes in table, and inquiry is successfully accessed before the maximum ntp server mark of rate, and mobile terminal can detect the data network of input Link order, while mobile terminal response data network connection instructs, and connects data network.Wherein, above-mentioned data network connects Instruction is connect to be mainly used for connecting data network.
Wherein, ntp server refers to mobile terminal when carrying out time update based on Network Time Protocol, the NTP for communication Server.
In the embodiment of the present invention, be successfully accessed rate dynamic change table include at least two ntp servers mark and it is each A ntp server mark is corresponding to be successfully accessed rate, wherein ntp server mark is used for identifying a certain specific NTP in network Server, ntp server mark can be indicated with the title of ntp server, such as " ntp server 1 ", " ntp server 2 " ... ..., or indicated with the addresses ip of ntp server, such as " 192.168.1.240 ", " 192.168.1.241 " ... ..., the embodiment of the present invention is not construed as limiting.If being successfully accessed rate is used for indicating that mobile terminal transmission is asked It asks, server can respond the probability of the request.The rate of being successfully accessed can indicate that the letter of grade is indicated with some, such as " A ", " B " ... ..., or indicated with specific numerical value, such as " 97% ", " 80% " ... ..., the embodiment of the present invention is not construed as limiting.
102, mobile terminal is sent more to the target ntp server belonging to the maximum ntp server mark of the rate that is successfully accessed New time request.
In the embodiment of the present invention, the target ntp server belonging to ntp server mark refers to that the ntp server identifies A certain specific entity ntp server in corresponding network.
103, when mobile terminal judges whether to receive the standard that the response renewal time request of target ntp server returns Between, if so, executing step 104;Conversely, terminating this flow.
In the embodiment of the present invention, mobile terminal judges whether that receiving the target ntp server response renewal time asks The standard time of return is asked to refer specifically to:Judge that mobile terminal is being successfully accessed the maximum ntp server mark of rate to above-mentioned Whether affiliated target ntp server is sent receives target ntp server sound in the preset time after renewal time request The standard time for answering renewal time request to return.
104, when mobile terminal receives the standard time, mobile terminal updates local zone time according to the standard time.
In the embodiment of the present invention, when mobile terminal receives the standard time, mobile terminal updates this according to the standard time The ground time still when mobile terminal does not receive the standard time, terminates this flow.
Fig. 1 description method in, mobile terminal first from the access of the Network Time Protocol ntp server to prestore at In power dynamics table, inquiry is successfully accessed rate maximum ntp server mark, and then to the maximum NTP of the rate that is successfully accessed Target ntp server belonging to server identification sends renewal time request, when finally responding update according to target ntp server Between ask and return standard time update local zone time.As it can be seen that implementing the method for Fig. 1 descriptions, mobile terminal is being updated When the time, the efficiency of renewal time is improved.
Fig. 2 is referred to, Fig. 2 is the flow diagram of another renewal time method disclosed by the embodiments of the present invention.Such as Fig. 2 Shown, which may comprise steps of.
Wherein, step 201~step 202 is identical as the step 101 in preceding embodiment~step 102, and the present invention is implemented Example is not repeated herein.
203, when mobile terminal judges whether to receive the standard that the response renewal time request of target ntp server returns Between, if so, executing step 204~step 205;Conversely, executing step 206.
204, when mobile terminal receives the standard time, mobile terminal updates local zone time according to the standard time.
In the embodiment of the present invention, when mobile terminal receives the standard time, mobile terminal updates this according to the standard time The ground time still when mobile terminal does not receive the standard time, executes step 206.
205, mobile terminal carries out increase behaviour according to the preset incrementss rate that is successfully accessed corresponding to target ntp server Make to be successfully accessed rate dynamic change table to update, and terminates this flow.
In the embodiment of the present invention, when step 204 is when mobile terminal receives the standard time, and mobile terminal is according to standard Between update local zone time after, execute step 205 mobile terminal connect according to preset incrementss are corresponding to target ntp server Enter success rate and carry out increasing operation and to update is successfully accessed rate dynamic change table.
For example, set preset time as 5s, preset incrementss are 1%, if mobile terminal to above-mentioned access at After target ntp server transmission renewal time request belonging to prominent ntp server mark target is received in 5s Ntp server responds the standard time that renewal time request returns, then corresponding to target ntp server to be successfully accessed rate increase 1%.
206, when mobile terminal does not receive the standard time, mobile terminal takes target NTP according to preset decrement Business device is corresponding to be successfully accessed rate and carries out reducing operation and to update be successfully accessed rate dynamic change table.
In the embodiment of the present invention, in step 203, judge whether mobile terminal receives the response of target ntp server more After the standard time that new time request returns, execute in step 206 when mobile terminal does not receive the standard time, according to Preset decrement is corresponding to the target ntp server be successfully accessed rate carry out reducing operation it is dynamic to update the rate of being successfully accessed State changes table.
For example, setting preset time as 5s, preset decrement is 1%, if mobile terminal to above-mentioned access at Mesh is not received in 5s after target ntp server transmission renewal time request belonging to prominent ntp server mark The standard time that ntp server response renewal time request returns is marked, then the rate that is successfully accessed corresponding to target ntp server subtracts Few 1%.
In the embodiment of the present invention, by step 205 and step 206, reaches update and is successfully accessed rate dynamic change entry, The operation for executing renewal time again for subsequent movement equipment lays the first stone.
In the method for Fig. 2 descriptions, mobile terminal being successfully accessed from the Network Time Protocol ntp server to prestore first In rate dynamic change table, inquiry is successfully accessed the maximum ntp server mark of rate, and then is taken to the maximum NTP of the rate that is successfully accessed Target ntp server belonging to business device mark sends renewal time request, and is asked according to target ntp server response renewal time The standard time update local zone time asked and returned, finally according to whether the case where receiving the standard time, update are successfully accessed Rate dynamic change table.As it can be seen that implementing the method for Fig. 2 descriptions, mobile terminal has updated and connects while improving renewal time efficiency Enter success rate dynamic change table.
Fig. 3 is referred to, Fig. 3 is the flow diagram of another renewal time method disclosed by the embodiments of the present invention.Such as Fig. 3 Shown, which may comprise steps of.
301, the ntp server of acquisition for mobile terminal input is successfully accessed rate initial table.
In the embodiment of the present invention, it includes at least two ntp servers mark and each NTP to be successfully accessed rate initial table The corresponding initial access success rate of server identification, being initially accessed success rate has preset value, such as 100% or 100 etc., this Inventive embodiments are not construed as limiting.
302, mobile terminal is periodically serviced to NTP for each ntp server mark in rate initial table is successfully accessed Ntp server belonging to device mark sends detection instruction.
In the embodiment of the present invention, detection instruction is a kind of simple instruction, such as simple number or character etc., this hair Bright embodiment is not construed as limiting.Whether detection instruction is used only for detecting two communication equipment to be detected can normal communication.
303, mobile terminal judges whether to receive the response instruction that ntp server response detection instruction returns, if so, holding Row step 304;If it is not, executing step 305.
304, mobile terminal carries out increase behaviour according to preset incrementss initial access success rate corresponding to ntp server Make, is successfully accessed rate dynamic change table to generate ntp server, and execute step 306.
305, mobile terminal carries out reduction behaviour according to preset decrement initial access success rate corresponding to ntp server Make, is successfully accessed rate dynamic change table to generate ntp server, and execute step 306.
306, whether the location of detection mobile terminal region changes, if the location of mobile terminal region It changes, executes step 307;If the location of mobile terminal region does not change, terminate this flow.
307, Network Time Protocol ntp server that mobile terminal prestores from mobile terminal is successfully accessed rate dynamic change In table, inquiry is successfully accessed the maximum ntp server mark of rate.
308, mobile terminal is sent more to the target ntp server belonging to the maximum ntp server mark of the rate that is successfully accessed New time request.
309, when mobile terminal judges whether to receive the standard that the response renewal time request of target ntp server returns Between, if so, executing step 310~step 311;Conversely, executing step 312.
310, when mobile terminal receives the standard time, mobile terminal updates local zone time according to the standard time.
311, mobile terminal carries out increase behaviour according to the preset incrementss rate that is successfully accessed corresponding to target ntp server Make to be successfully accessed rate dynamic change table to update, and terminates this flow.
312, when mobile terminal does not receive the standard time, mobile terminal takes target NTP according to preset decrement Business device is corresponding to be successfully accessed rate and carries out reducing operation and to update be successfully accessed rate dynamic change table.
In the method for Fig. 3 descriptions, what mobile terminal obtained ntp server first is successfully accessed rate initial table, and passes through The mode being periodically detected is updated the rate initial table that is successfully accessed of ntp server, ultimately forms the access of ntp server Success rate dynamic change table;And then, mobile terminal being successfully accessed in rate dynamic change table from ntp server, inquiry access The maximum ntp server mark of success rate, and serviced to the target NTP belonging to the maximum ntp server mark of the rate that is successfully accessed Device sends renewal time request, and the standard time update returned by target ntp server is asked in response to renewal time is local Time;Finally, mobile terminal is according to whether the case where receiving the standard time, update ntp server is successfully accessed rate dynamic Change table.As it can be seen that the method for implementing Fig. 3 description, mobile terminal have updated and are successfully accessed while improving renewal time efficiency Rate dynamic change table.
Fig. 4 is referred to, Fig. 4 is a kind of structural schematic diagram of mobile terminal disclosed by the embodiments of the present invention.Wherein, such as Fig. 4 Shown, which may include:
Query unit 401, for being successfully accessed rate dynamic change table from the Network Time Protocol ntp server to prestore In, inquiry is successfully accessed the maximum ntp server mark of rate.
Interactive unit 402, for being sent out to the target ntp server belonging to the maximum ntp server mark of the rate that is successfully accessed Renewal time is sent to ask.
Judging unit 403, when for judging whether interactive unit 402 receives the response update of target ntp server Between ask return standard time.
Time updating unit 404, for judging that interactive unit 402 receives the standard time in judging unit 403 When, local zone time is updated according to the standard time that interactive unit 402 receives.
In the embodiment of the present invention, the rate dynamic change table that is successfully accessed described in query unit 401 includes at least two NTP Server identification and each described ntp server mark is corresponding is successfully accessed rate.
By implementing the mobile terminal of Fig. 4 descriptions, mobile terminal improves the effect of renewal time when being updated the time Rate.
It is the structural schematic diagram of another mobile terminal disclosed by the embodiments of the present invention please also refer to Fig. 5, Fig. 5.Wherein, Mobile terminal shown in fig. 5 is that mobile terminal as shown in Figure 4 optimizes.Mobile terminal as shown in fig. 4 is compared, Mobile terminal shown in fig. 5 can also include:
Dynamic update unit 405, the standard time for being received according to interactive unit 402 in time updating unit 404 is more After new local zone time, according to preset incrementss it is corresponding to target ntp server be successfully accessed rate increase operation with Update is successfully accessed rate dynamic change table.
Further, dynamic update unit 405 are additionally operable to judge that interactive unit 402 does not receive in judging unit 403 When target ntp server responds the standard time that renewal time request returns, according to preset decrement to target ntp server It is corresponding be successfully accessed rate and carry out reducing operation to update be successfully accessed rate dynamic change table.
By implementing the mobile terminal of Fig. 5 descriptions, mobile terminal has updated access while improving renewal time efficiency Success rate dynamic change table.
Fig. 6 is referred to, Fig. 6 is the structural schematic diagram of another mobile terminal disclosed by the embodiments of the present invention.Wherein, Fig. 6 Shown in mobile terminal optimize to obtain by Fig. 5.Compared with mobile terminal shown in fig. 5, mobile terminal shown in fig. 6 Further include:
Acquiring unit 406, for being successfully accessed from the Network Time Protocol ntp server to prestore in query unit 401 In rate dynamic change table, inquiry is successfully accessed before the maximum ntp server mark of rate, obtains connecing for the ntp server of input Enter success rate initial table.
Can also include generation unit 407, phase as an alternative embodiment, in mobile terminal shown in Fig. 6 Ying Di:
Above-mentioned interactive unit 402 is additionally operable to for being successfully accessed each ntp server mark, period in rate initial table Property to ntp server mark belonging to ntp server send detection instruction.
Above-mentioned judging unit 403 is additionally operable to judge whether interactive unit 402 receives ntp server and respond the inspection Survey the response instruction that instruction returns.
Generation unit 407, for judging that interactive unit 402 receives ntp server response detection and refers in judging unit 403 When enabling the response instruction returned, increase behaviour is carried out according to preset incrementss initial access success rate corresponding to ntp server Make, alternatively, for judging that the interactive unit does not receive the sound that ntp server response detection instruction returns in judging unit 403 When should instruct, reduction operation is carried out according to preset decrement initial access success rate corresponding to ntp server, to generate Ntp server is successfully accessed rate dynamic change table.
In the embodiment of the present invention, the rate initial table that is successfully accessed described in acquiring unit 406 is serviced including at least two NTP Device identifies and each ntp server identifies corresponding initial access success rate.
It needs to illustrate, in the mobile terminal of Fig. 6 descriptions, it is mobile eventually that query unit 401 is specifically used for detection Whether the location of end region changes, pre- from mobile terminal if the location of mobile terminal region changes The Network Time Protocol ntp server deposited is successfully accessed in rate dynamic change table, and inquiry is successfully accessed the maximum NTP services of rate Device identifies.
By implementing the mobile terminal of Fig. 6 descriptions, mobile terminal has updated access while improving renewal time efficiency Success rate dynamic change table.
One of ordinary skill in the art will appreciate that all or part of step in the various methods of above-described embodiment is can It is completed with instructing relevant hardware by program, which can be stored in a computer readable storage medium, storage Medium include read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), programmable read only memory (Programmable Read-only Memory, PROM), erasable programmable is read-only deposits Reservoir (Erasable Programmable Read Only Memory, EPROM), disposable programmable read-only memory (One- Time Programmable Read-Only Memory, OTPROM), the electronics formula of erasing can make carbon copies read-only memory (Electrically-Erasable Programmable Read-Only Memory, EEPROM), CD-ROM (Compact Disc Read-Only Memory, CD-ROM) or other disk storages, magnetic disk storage, magnetic tape storage or can Any other computer-readable medium for carrying or storing data.
A kind of renewal time method disclosed by the embodiments of the present invention and relevant device are described in detail above, herein In apply specific case principle and implementation of the present invention are described, the explanation of above example is only intended to sides Assistant solves the method and its core concept of the present invention;Meanwhile for those of ordinary skill in the art, think of according to the present invention Think, there will be changes in the specific implementation manner and application range, in conclusion the content of the present specification should not be construed as pair The limitation of the present invention.

Claims (6)

1. a kind of renewal time method, which is characterized in that the method includes:
From being successfully accessed in rate dynamic change table for the Network Time Protocol ntp server to prestore, inquiry is successfully accessed rate maximum Ntp server mark;Wherein, the rate dynamic change table that is successfully accessed includes at least two ntp servers mark and every One ntp server mark is corresponding to be successfully accessed rate;
Renewal time request is sent to the target ntp server being successfully accessed belonging to the maximum ntp server mark of rate;
Judge whether that receiving the target ntp server responds the standard time that the renewal time request returns;
When receiving the standard time, local zone time is updated according to the standard time;
After the local zone time according to standard time update, the method further includes:
Increase operation according to the preset incrementss rate that is successfully accessed corresponding to the target ntp server to update It is described to be successfully accessed rate dynamic change table;
The method further includes:
When not receiving the standard time, described connect according to preset decrement is corresponding to the target ntp server Enter success rate and reduce operation and described is successfully accessed rate dynamic change table to update.
2. according to the method described in claim 1, it is characterized in that, in connecing from the Network Time Protocol ntp server to prestore Enter in success rate dynamic change table, inquiry is successfully accessed before the maximum ntp server mark of rate, and the method further includes:
Obtain the ntp server of input is successfully accessed rate initial table;Wherein, it is described be successfully accessed rate initial table include it is described extremely Few two ntp servers mark and each described ntp server identify corresponding initial access success rate;
It is successfully accessed each ntp server mark in rate initial table for described, periodically to the ntp server mark Ntp server belonging to knowing sends detection instruction;
Judge whether that receiving the ntp server responds the response instruction that the detection instruction returns;
If so, increase operation is carried out according to the preset incrementss initial access success rate corresponding to the ntp server, If it is not, reduction operation is carried out according to the preset decrement initial access success rate corresponding to the ntp server, to Generate ntp server is successfully accessed rate dynamic change table.
3. according to the method described in claim 2, it is characterized in that, described from the Network Time Protocol ntp server to prestore It being successfully accessed in rate dynamic change table, inquiry is successfully accessed the maximum ntp server mark of rate, including:
Whether the location of detection mobile terminal region changes, if the location of mobile terminal region becomes Change, from being successfully accessed in rate dynamic change table for the Network Time Protocol ntp server that the mobile terminal prestores, inquiry access The maximum ntp server mark of success rate.
4. a kind of mobile terminal, which is characterized in that the mobile terminal includes:
Query unit, for being successfully accessed in rate dynamic change table from the Network Time Protocol ntp server to prestore, inquiry connects Enter the maximum ntp server mark of success rate;Wherein, the rate dynamic change table that is successfully accessed is serviced including at least two NTP Device identify and each described ntp server mark is corresponding is successfully accessed rate;
Interactive unit, for being sent more to the target ntp server being successfully accessed belonging to the maximum ntp server mark of rate New time request;
Judging unit responds the renewal time for judging whether the interactive unit receives the target ntp server Ask the standard time returned;
Time updating unit, for when the judging unit judges that the interactive unit receives the standard time, root Local zone time is updated according to the standard time that the interactive unit receives;
The mobile terminal further includes:
Dynamic update unit, for being updated according to the standard time that the interactive unit receives in the time updating unit After local zone time, described it be successfully accessed rate according to preset incrementss are corresponding to the target ntp server and increase Operation described is successfully accessed rate dynamic change table to update;
The dynamic update unit is additionally operable to judge that the interactive unit does not receive the target NTP in the judging unit When server responds the standard time that the renewal time request returns, the target NTP is serviced according to preset decrement Device it is corresponding it is described be successfully accessed rate and reduce operation described be successfully accessed rate dynamic change table to update.
5. mobile terminal according to claim 4, which is characterized in that the mobile terminal further includes acquiring unit and generation Unit, wherein:
The acquiring unit, for being successfully accessed rate from the Network Time Protocol ntp server to prestore in the query unit In dynamic change table, inquiry is successfully accessed before the maximum ntp server mark of rate, obtains the access of the ntp server of input Success rate initial table;Wherein, it is described be successfully accessed rate initial table include at least two ntp server mark and each The ntp server identifies corresponding initial access success rate;
The interactive unit is additionally operable to be successfully accessed each ntp server mark in rate initial table for described, periodically Ground sends detection instruction to the ntp server belonging to ntp server mark;
The judging unit is additionally operable to judge whether the interactive unit receives the ntp server response detection and refer to Enable the response instruction returned;
The generation unit, for judging that the interactive unit receives the ntp server and responds institute in the judging unit When stating the response instruction that detection instruction returns, according to the preset incrementss initial access corresponding to the ntp server Success rate carries out increase operation, alternatively, for judging that the interactive unit does not receive the ntp server in the judging unit It is corresponding to the ntp server described first according to preset decrement when responding the response instruction that the detection instruction returns Beginning is successfully accessed rate and carries out reduction operation, and rate dynamic change table is successfully accessed to generate ntp server.
6. mobile terminal according to claim 5, which is characterized in that the query unit is specifically used for detection mobile terminal Whether location region changes, if the location of mobile terminal region changes, from the mobile terminal The Network Time Protocol ntp server to prestore is successfully accessed in rate dynamic change table, and inquiry is successfully accessed the maximum NTP clothes of rate Business device mark.
CN201510580122.7A 2015-09-11 2015-09-11 A kind of renewal time method and relevant device Active CN105553588B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510580122.7A CN105553588B (en) 2015-09-11 2015-09-11 A kind of renewal time method and relevant device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510580122.7A CN105553588B (en) 2015-09-11 2015-09-11 A kind of renewal time method and relevant device

Publications (2)

Publication Number Publication Date
CN105553588A CN105553588A (en) 2016-05-04
CN105553588B true CN105553588B (en) 2018-11-06

Family

ID=55832543

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510580122.7A Active CN105553588B (en) 2015-09-11 2015-09-11 A kind of renewal time method and relevant device

Country Status (1)

Country Link
CN (1) CN105553588B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106453560B (en) * 2016-10-14 2019-12-03 北京小米移动软件有限公司 Time obtaining method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1767520A (en) * 2004-10-26 2006-05-03 华为技术有限公司 Method for obtaining information in communication system
CN102355458A (en) * 2011-09-16 2012-02-15 四川长虹电器股份有限公司 Method for increasing success rate of network access
CN103809427A (en) * 2012-11-14 2014-05-21 展讯通信(上海)有限公司 Method and device for updating time of mobile terminal
CN104639399A (en) * 2015-02-03 2015-05-20 杭州华三通信技术有限公司 Method and device for detecting plurality of primary time servers

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100703490B1 (en) * 2005-04-18 2007-04-03 삼성전자주식회사 Method synchronizing time of mobile terminal based on asynchronous mode and the system therefor
US7925259B2 (en) * 2006-10-03 2011-04-12 Telefonaktiebolaget Lm Ericsson (Publ) System, method, and arrangement for managing access denials in a wireless communication network
FR2951897B1 (en) * 2009-10-23 2016-09-16 Sagem Securite DEVICE AND METHOD FOR MANAGING RIGHTS OF ACCESS TO A WIRELESS NETWORK
CN102739446B (en) * 2012-06-27 2017-08-01 南京中兴新软件有限责任公司 The method and apparatus for selecting Network Time Protocol server
CN103906188A (en) * 2014-04-15 2014-07-02 宇龙计算机通信科技(深圳)有限公司 Network search method and device and terminal
CN104065441A (en) * 2014-06-30 2014-09-24 宇龙计算机通信科技(深圳)有限公司 Device time calibration method and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1767520A (en) * 2004-10-26 2006-05-03 华为技术有限公司 Method for obtaining information in communication system
CN102355458A (en) * 2011-09-16 2012-02-15 四川长虹电器股份有限公司 Method for increasing success rate of network access
CN103809427A (en) * 2012-11-14 2014-05-21 展讯通信(上海)有限公司 Method and device for updating time of mobile terminal
CN104639399A (en) * 2015-02-03 2015-05-20 杭州华三通信技术有限公司 Method and device for detecting plurality of primary time servers

Also Published As

Publication number Publication date
CN105553588A (en) 2016-05-04

Similar Documents

Publication Publication Date Title
CN104065637B (en) Web-game running method and device
CN103593147B (en) A kind of method and device of digital independent
US20160057205A1 (en) Application sharing method and apparatus
CN109451088A (en) A kind of data access method and device
CN106130972B (en) resource access control method and device
CN108390950A (en) A kind of information push method, device and equipment
CN103368986A (en) Information recommendation method and information recommendation device
CN106101022B (en) A kind of data request processing method and system
CN106412078B (en) Accurate information method for pushing, device and system
JP5132825B1 (en) Game management server device, game management server device program, and terminal device program
CN106302122A (en) Virtual objects management method and device
JP2019016042A (en) Data acquisition program, device, and method
CN113722105A (en) Cloud application operation method, device, equipment, medium and product
CN106502808A (en) A kind of method of copied files, device and terminal
EP3570567A1 (en) Method and device for operating instance resources
CN105553588B (en) A kind of renewal time method and relevant device
CN110035133A (en) The method and apparatus of peer device IP address is obtained in Android WiFi-Direct connection
CN109150981B (en) Block chain network networking method, device, equipment and computer readable storage medium
CN117592685A (en) Service processing method, device, electronic equipment and storage medium
CN103312594A (en) Chat room entering method and chat room entering device
CN108540583A (en) Domain name delivery method and device in a kind of CDN system, electronic equipment
CN116756282A (en) Task processing method, server, language prediction system and man-machine interaction system
CN113238860B (en) Task request processing method and device, electronic equipment and storage medium
CN108521598B (en) Method and device for video preview and computer equipment
CN101448136B (en) Method for realizing video on-demand function and system thereof

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant