CN103220120A - Time synchronizing method of mobile terminal, mobile terminal and time synchronizing system - Google Patents

Time synchronizing method of mobile terminal, mobile terminal and time synchronizing system Download PDF

Info

Publication number
CN103220120A
CN103220120A CN2012100190651A CN201210019065A CN103220120A CN 103220120 A CN103220120 A CN 103220120A CN 2012100190651 A CN2012100190651 A CN 2012100190651A CN 201210019065 A CN201210019065 A CN 201210019065A CN 103220120 A CN103220120 A CN 103220120A
Authority
CN
China
Prior art keywords
time
standard time
network
local zone
current standard
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
Application number
CN2012100190651A
Other languages
Chinese (zh)
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN2012100190651A priority Critical patent/CN103220120A/en
Publication of CN103220120A publication Critical patent/CN103220120A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention discloses a time synchronizing method of a mobile terminal, the mobile terminal and a time synchronizing system, and belongs to the field of mobile terminals. The time synchronizing method comprises the following steps: acquiring current standard time and network delay; and regulating local time according to the current standard time and the network delay. The mobile terminal comprises a first acquiring module, a second acquiring module and a regulating module. The time synchronizing system comprises a network standard time server and the mobile terminal. According to the time synchronizing method of the mobile terminal, the mobile terminal and the time synchronizing system, the current standard time and the network delay are acquired, delay, in a network transmission process, of current standard time information issued by the network standard time server can be calculated, the local time is regulated finally according to the current standard time and the network delay, the local time of the mobile terminal can be regulated, so that the local time is synchronous with the standard time, and the accuracy of the local time after the local time is regulated is improved.

Description

The method for synchronizing time of portable terminal, portable terminal and clock synchronization system
Technical field
The present invention relates to field of mobile terminals, particularly a kind of method for synchronizing time of portable terminal, portable terminal and clock synchronization system.
Background technology
Portable terminal generally has time clock feature.The user uses this time clock feature, can consult temporal information at any time, and carries out daily life and work with reference to this temporal information.Therefore, the accuracy of the time of portable terminal is extremely important.But, owing to the hardware condition of portable terminal itself limits, for example battery of clock, and other related causes, the time of portable terminal may be asynchronous with the standard time.
For the time and the standard time that make portable terminal synchronous, existing method for synchronous is mainly realized alternately by portable terminal and network standard time server.Wherein, the network standard time server can provide standard time information, and these information can be passed through Network Transmission.Particularly, the user authorizes portable terminal to adjust local zone time after recognizing that the local zone time of portable terminal is inaccurate.Portable terminal sends the request of standard time to the network standard time server; And the standard time information that issues according to network time server, the temporal information of this locality is changed to the standard time, make local zone time and standard time after the change synchronous.
In realizing process of the present invention, the inventor finds that there is following problem at least in prior art:
There is delay in the standard time information that network time server issues in network transmission process, the local zone time after causing changing is still inaccurate.
Summary of the invention
In order to adjust local zone time, make local zone time and standard time synchronously and improve the accuracy of adjusted local zone time, the embodiment of the invention provides a kind of method for synchronizing time, portable terminal and clock synchronization system of portable terminal.Described technical scheme is as follows:
A kind of method for synchronizing time of portable terminal is characterized in that, described method comprises:
Obtain current standard time and network delay;
According to described current standard time and described network delay, adjust local zone time.
Wherein, described obtaining the current standard time specifically comprises:
Read current local zone time, and described current local zone time is sent to the network standard time server; After making described network standard time server receive described current local zone time, read the current standard time, and judge whether the described current standard time is synchronous with described current local zone time; If asynchronous, then described network standard time server returns the described current standard time;
Obtain the described current standard time that described network standard time server returns.
Wherein, described obtaining the current standard time specifically comprises:
Send the standard time request to the network standard time server;
Obtain the described current standard time that described network standard time server returns.
Further, described obtaining after the described current standard time that described network standard time server returns also comprises:
Read current local zone time, judge whether described current local zone time is synchronous with the described current standard time;
If asynchronous, then carry out the step of obtaining described network delay.
Wherein, the described network delay that obtains specifically comprises:
Send the standard time request to the network standard time server, and the transmitting time of record described request;
Obtain the described current standard time that described network standard time server returns, and write down the time of reception of described current standard time;
Calculate the difference between described time of reception and the described transmitting time, and described difference be multiply by 1/2nd, obtain real network and postpone.
Wherein, the described network delay that obtains is specially,
Obtain default network delay threshold value.
Wherein, described according to described current standard time and described network delay, adjust local zone time, specifically comprise:
With described current standard time and described network delay addition, obtain the actual current standard time;
Described local zone time is adjusted into is the current standard time of described reality, make described local zone time and standard time synchronous.
A kind of portable terminal, described portable terminal comprises:
First acquisition module is used to obtain the current standard time;
Second acquisition module is used to obtain network delay;
Adjusting module is used for according to described current standard time and described network delay, adjusts local zone time.
Wherein, described first acquisition module specifically comprises:
First transmitting element is used to read current local zone time, and described current local zone time is sent to the network standard time server; After making described network standard time server receive described current local zone time, read the current standard time, and judge whether the described current standard time is synchronous with described current local zone time; If asynchronous, then described network standard time server returns the described current standard time;
First acquiring unit is used to obtain the described current standard time that described network standard time server returns.
Wherein, described first acquisition module specifically comprises:
Second transmitting element is used for sending the standard time request to the network standard time server;
Second acquisition unit is used to obtain the described current standard time that described network standard time server returns.
Wherein, described first acquisition module also comprises:
Read judging unit, read current local zone time, judge whether described current local zone time is synchronous with the described current standard time;
Correspondingly, described second acquisition module also is used for,
If asynchronous, then obtain described network delay.
Wherein, described second acquisition module specifically comprises:
The 3rd transmitting element is used for sending the standard time request to the network standard time server;
The 3rd acquiring unit is used to obtain the described current standard time that described network standard time server returns;
Record cell is used to write down the transmitting time of described request; And the time of reception of described current standard time of record;
Computing unit is used to calculate the difference between described time of reception and the described transmitting time, and described difference be multiply by 1/2nd, obtains real network and postpones.
Wherein, described second acquisition module specifically is used for, and obtains default network delay threshold value.
Wherein, described adjusting module specifically comprises:
Addition unit is used for described current standard time and described network delay addition are obtained the actual current standard time;
Adjustment unit is used for described local zone time is adjusted into the current standard time of described reality, makes described local zone time and standard time synchronous.
A kind of clock synchronization system, described system comprises: network standard time server and aforesaid portable terminal.
The beneficial effect that the technical scheme that the embodiment of the invention provides is brought is: by obtaining current standard time and network delay; Can calculate the delay of current standard time information in network transmission process that the network standard time server issues; According to described current standard time and described network delay, adjust local zone time at last; Can adjust the local zone time of portable terminal, make local zone time and standard time synchronous, and improve the accuracy of adjusted local zone time.
Description of drawings
In order to be illustrated more clearly in the technical scheme in the embodiment of the invention, the accompanying drawing of required use is done to introduce simply in will describing embodiment below, apparently, accompanying drawing in describing below only is some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 is the flow chart of the method for synchronizing time of a kind of portable terminal of providing in the embodiment of the invention 1;
Fig. 2 is the flow chart of the method for synchronizing time of a kind of portable terminal of providing in the embodiment of the invention 2;
Fig. 3 is the flow chart of the method for synchronizing time of a kind of portable terminal of providing in the embodiment of the invention 3;
Fig. 4 is the flow chart of the method for synchronizing time of a kind of portable terminal of providing in the embodiment of the invention 4;
Fig. 5 is the structural representation of the time synchronism apparatus of a kind of portable terminal of providing in the embodiment of the invention 5;
Fig. 6 is the structural representation of the time synchronism apparatus of a kind of portable terminal of providing in the embodiment of the invention 6;
Fig. 7 is the structural representation of the time synchronism apparatus of a kind of portable terminal of providing in the embodiment of the invention 7;
Fig. 8 is the structural representation of the time synchronism apparatus of a kind of portable terminal of providing in the embodiment of the invention 8;
Fig. 9 is the schematic diagram of a kind of clock synchronization system of providing in the embodiment of the invention 9.
Embodiment
For making the purpose, technical solutions and advantages of the present invention clearer, embodiment of the present invention is described further in detail below in conjunction with accompanying drawing.
Embodiment 1
Referring to Fig. 1, the embodiment of the invention 1 provides a kind of method for synchronizing time of portable terminal, specifically comprises:
101: obtain current standard time and network delay.
102:, adjust local zone time according to this current standard time and this network delay.
The beneficial effect that the technical scheme that the embodiment of the invention provides is brought is: by obtaining current standard time and network delay; Can calculate the delay of current standard time information in network transmission process that the network standard time server issues; Last according to this current standard time and this network delay, adjust local zone time; Can adjust the local zone time of portable terminal, make local zone time and standard time synchronous, and improve the accuracy of adjusted local zone time.
Embodiment 2
Referring to Fig. 2, the embodiment of the invention 2 provides a kind of preference of method for synchronizing time of portable terminal, specifically comprises:
201: obtain the current standard time.
Further, this step comprises:
2011: read current local zone time, and current local zone time is sent to the network standard time server.
Wherein, make the network standard time server receive current local zone time after, read the current standard time, and judge whether the current standard time synchronous with current local zone time; If asynchronous, then the network standard time server returns the current standard time.
Wherein, detect the networking state of portable terminal in real time.When detecting portable terminal connection network, connect the network standard time server.Read current local zone time, this standard time is accurate to second, and current local zone time is sent to the network standard time server.
Wherein, the network standard time server reads the current standard time after receiving this current local zone time, and this standard time is accurate to second.After reading the current standard time, current local zone time and current standard time that the network standard time server will receive make comparisons, and judge whether both are synchronous.If both are asynchronous, then return the current standard time; If both are synchronous, then do not return the current standard time.
2012: obtain this current standard time that the network standard time server returns.
Wherein, get access to this current standard time that the network standard time server returns, can determine that local zone time and standard time are asynchronous, carry out 202.In addition,, determine that then local zone time and standard time are synchronous, withdraw from the flow process of this time synchronized, and continue to carry out 2011 if do not receive the current standard time that the network standard time server returns.
202: obtain network delay.
Wherein, this network delay is meant when portable terminal and network standard time server communicate, and the data message that both send mutually is in time that transmission over networks reality is spent.Further, this step specifically comprises:
2021: send the standard time request, write down the transmitting time of this request simultaneously.
Wherein, send the request of standard time to the network standard time server.Simultaneously, write down the transmitting time of this request, this transmitting time can be as accurate as second.Further, this transmitting time is the local zone time of portable terminal when sending this request.For example, the transmitting time of this request is specially 07:00:40.
What deserves to be explained is that the standard time in the embodiment of the invention is meant standard time of time zone, portable terminal place correspondence.Know easily, if the time zone at portable terminal place changes, so, also corresponding changing of this standard time.
2022: obtain the current standard time that the network standard time server returns, write down the time of reception of current standard time simultaneously.
Wherein, the network standard time server will return the current standard time after receiving the standard time request.Receive and obtain the current standard time that the network standard time server returns.The current standard time of for example, obtaining is 12:02:00.
Simultaneously, write down the time of reception of this current standard time, this time of reception can be as accurate as second.Further, this time of reception is the local zone time of portable terminal when receiving the current standard time return.For example, the time of reception of this current standard time is specially 07:02:00.
2023: calculate the difference between time of reception and the transmitting time, and this difference be multiply by 1/2nd, obtain real network and postpone.
Wherein, the time of reception of record is deducted the difference that obtains after the transmitting time of record between the two, then this difference be multiply by 1/2nd, can obtain actual network delay.For example, the time of reception of current standard time is deducted the transmitting time of the request of obtaining the standard time, promptly 07:02:00 deducts 07:00:40, obtains difference between the two: 00:01:20; Then this difference be multiply by 1/2nd, can obtain real network and postpone: 00:00:40.
What deserves to be explained is owing to influence the factor of network transfer speeds very big uncertainty is arranged, this will cause network transfer speeds is uneven.Therefore, only, may there be error by once asking and replying and calculate actual network delay.In order to address this problem, in actual applications, can calculate repeatedly network delay, and incite somebody to action repeatedly network delay cumulative mean, obtain average latency.
Particularly, can write down the network delay that calculates each time simultaneously by repeatedly circulating 2021~2023; The network delay that adds up then and calculate at every turn, and calculate the mean value of a network delay; With the mean value of this network delay network delay as reality.Preferably, cycle-index is 5~10 times.
In addition, 201 and 202 should carry out simultaneously in the embodiment of the invention 2.That is, read current local zone time after, should current local zone time and the standard time request be sent to the network standard time server in the lump, and write down transmitting time simultaneously; Make the network standard time server judge that whether current local zone time is synchronous with the current standard time, when asynchronous, returns the current standard time; Obtain the current standard time, and the time of current standard time of recorder, network delay obtained.Obviously, when synchronous, make the network standard time server not return the current standard time, also there is no need to obtain network delay in current local zone time and current standard time.Like this, can avoid repeating to obtain the standard time, raise the efficiency.
Further, 201 and 202 also can successively carry out in the embodiment of the invention 2.But it should be noted that current standard time of obtaining should be as the criterion with the current standard time of obtaining once more in 202.
203:, adjust local zone time according to current standard time and network delay.
Further, this step specifically comprises:
2031: the real network of current standard time when obtaining this current standard time postponed addition, obtain the actual current standard time.
Wherein, after obtaining obtaining network delay,, promptly obtain the actual current standard time with current standard time and this network delay addition.For example, 12:02:00 adds 00:00:40, obtains actual current standard time: 12:02:40.
2032: local zone time is adjusted into the actual current standard time, makes local zone time and standard time synchronous.
Wherein, obtain the actual current standard time after, local zone time is adjusted into current standard time of this reality, make that local zone time and standard time are synchronous.Because the actual current standard time has been considered network delay, the local zone time after the change is relatively accurate.
The beneficial effect that the technical scheme that the embodiment of the invention provides is brought is: postpone by obtaining current standard time and computing network; Can calculate the delay of current standard time information in network transmission process that the network standard time server issues; Obtained for the first current standard time then; According to this network delay and this first current standard time and this network delay, adjust local zone time at last; Can adjust the local zone time of portable terminal, make local zone time and standard time synchronous, and improve the accuracy of adjusted local zone time.
Embodiment 3
Referring to Fig. 3, the embodiment of the invention 3 provides a kind of method for synchronizing time preference of portable terminal, specifically comprises:
301: obtain the current standard time.
Further, this step comprises:
3011~3012, with in the embodiment of the invention 2 2021~2022, be not described in detail in this.
3013: read current local zone time, judge whether current local zone time is synchronous with the current standard time.
If asynchronous, then carry out 302; If synchronously, then withdraw from the flow process of this time synchronized, continue to carry out 3011.
Wherein, along with the consumption of the battery electric quantity of clock in the portable terminal or because the change in time zone, portable terminal place, will cause the local zone time of portable terminal may be asynchronous with the standard time.
Wherein, obtain the current standard time after, will read local zone time, this local zone time is accurate to second.And after reading local zone time, current standard time and the local zone time that reads are made comparisons, judge whether both are synchronous.If both are asynchronous, then carry out 302; If both are synchronous, then withdraw from the flow process of this time synchronized, continue to carry out 3011.For example, the local zone time that reads is 08:30:25; Then the local zone time and the current standard time of reading are made comparisons, promptly 08:30:25 compares with 12:02:00; Obviously, the two is asynchronous, carries out 302.
302: obtain network delay.
Wherein, calculate the difference between time of reception and the transmitting time, and this difference be multiply by 1/2nd, obtain real network and postpone.Particularly, with in the embodiment of the invention 2 2023, be not described in detail in this.
303, with in the embodiment of the invention 2 203, be not described in detail in this.
The beneficial effect that the technical scheme that the embodiment of the invention provides is brought is: by obtaining current standard time and network delay; Can calculate the delay of current standard time information in network transmission process that the network standard time server issues; Last according to this current standard time and this network delay, adjust local zone time; Can adjust the local zone time of portable terminal, make local zone time and standard time synchronous, and improve the accuracy of adjusted local zone time.
Embodiment 4
Referring to Fig. 4, the embodiment of the invention 4 provides a kind of method for synchronizing time preference of portable terminal, specifically comprises:
401: obtain the current standard time.
4011: send the standard time request.
Wherein, determine mobile terminal networking after, send the request of standard time to the network standard time server.
What deserves to be explained is that the standard time in the embodiment of the invention is meant standard time of time zone, portable terminal place correspondence.Know easily, if the time zone at portable terminal place changes, so, also corresponding changing of this standard time.
4012: obtain the current standard time that the network standard time server returns.
Wherein, the network standard time server will return the current standard time after receiving the standard time request.Receive and obtain the current standard time that the network standard time server returns.The current standard time of for example, obtaining is 12:02:00.
4013: read current local zone time, judge whether current local zone time is synchronous with the current standard time.
If asynchronous, then carry out 402; If synchronously, then withdraw from the flow process of this time synchronized, continue to carry out 4011.
Particularly, with in the embodiment of the invention 3 3013, be not described in detail in this.
What deserves to be explained is, 401 also can with the embodiment of the invention 3 in 301 identical, or can with the embodiment of the invention 2 in 201 identical; Be not described in detail in this.
402: obtain network delay.
Further, obtain network delay, for obtaining default network delay threshold value.
Wherein, this network delay is the network delay fault value that sets in advance.Default network delay fault value is used to estimate actual network delay.Further, network delay fault value is concrete time value, and unit can be second.For example, this network delay fault value is 00:02:00.Know that easily this network delay fault value need set in advance during local zone time synchronously first.
403:, adjust local zone time according to current standard time and network delay.
Further, this step specifically comprises:
4031:, obtain the actual current standard time with current standard time and the addition of network delay threshold value.
Wherein, obtain obtaining the network delay threshold value after, with current standard time and this network delay threshold value addition, promptly obtain the actual current standard time.For example, the network delay threshold value is 00:00:40; The so actual current standard time is that 12:02:00 adds 00:00:40, i.e. 12:02:40.
4032: local zone time is adjusted into the actual current standard time, makes local zone time and standard time synchronous.
Wherein, obtain the actual current standard time after, local zone time is adjusted into current standard time of this reality, make that local zone time and standard time are synchronous.Because the actual current standard time has been considered network delay, the local zone time after the change is relatively accurate.
The beneficial effect that the technical scheme that the embodiment of the invention provides is brought is: by obtaining current standard time and network delay; Can calculate the delay of current standard time information in network transmission process that the network standard time server issues; Last according to this current standard time and this network delay, adjust local zone time; Can adjust the local zone time of portable terminal, make local zone time and standard time synchronous, and improve the accuracy of adjusted local zone time.
Embodiment 5
Referring to Fig. 5, the embodiment of the invention 5 provides a kind of portable terminal, specifically comprises:
First acquisition module 501 is used to obtain the current standard time.
Second acquisition module 502 is used to obtain network delay.
Adjusting module 503 is used for adjusting local zone time according to this current standard time and this network delay.
The beneficial effect that the technical scheme that the embodiment of the invention provides is brought is: by obtaining current standard time and network delay; Can calculate the delay of current standard time information in network transmission process that the network standard time server issues; Last according to this current standard time and this network delay, adjust local zone time; Can adjust the local zone time of portable terminal, make local zone time and standard time synchronous, and improve the accuracy of adjusted local zone time.
Embodiment 6
Referring to Fig. 6, the embodiment of the invention 6 provides a kind of portable terminal, specifically comprises:
First acquisition module 601 is used to obtain the current standard time.
Wherein, first acquisition module 601 specifically comprises:
First transmitting element 6011 is used to read current local zone time, and current local zone time is sent to the network standard time server; After making the network standard time server receive current local zone time, read the current standard time, and judge whether the current standard time is synchronous with current local zone time; If asynchronous, then the network standard time server returns the current standard time.
First acquiring unit 6012 is used to obtain the current standard time that the network standard time server returns.
Second acquisition module 602 is used to obtain network delay.
Wherein, second acquisition module 602 specifically comprises:
The 3rd transmitting element 6021 is used for sending the standard time request to the network standard time server.
The 3rd acquiring unit 6022 is used to receive the current standard time that the network standard time server returns.
Record cell 6023 is used to write down the transmitting time of this request, and the time of reception of current standard time of record.
Computing unit 6024 is used to calculate the difference between time of reception and the transmitting time, and difference be multiply by 1/2nd, obtains real network and postpones.
What deserves to be explained is that first transmitting element 6011 and the 3rd transmitting element 6021 can integrate; First acquiring unit 6012 and the 3rd acquiring unit 6022 can integrate.
Adjusting module 603 is used for according to current standard time and network delay, adjusts local zone time.
Wherein, adjusting module 603 specifically comprises:
Addition unit 6031 is used for current standard time and network delay addition are obtained the actual current standard time;
Adjustment unit 6032 is used for local zone time is adjusted into the actual current standard time, makes local zone time and current standard time synchronous.
The beneficial effect that the technical scheme that the embodiment of the invention provides is brought is: by obtaining current standard time and network delay; Can calculate the delay of current standard time information in network transmission process that the network standard time server issues; Last according to this current standard time and this network delay, adjust local zone time; Can adjust the local zone time of portable terminal, make local zone time and standard time synchronous, and improve the accuracy of adjusted local zone time.
Embodiment 7
Referring to Fig. 7, the embodiment of the invention 7 provides a kind of portable terminal, specifically comprises:
First acquisition module 701 is used to obtain the current standard time.
Wherein, first acquisition module 701 specifically comprises:
Second transmitting element 7011 is used for sending the standard time request to the network standard time server.
Second acquisition unit 7012 is used to obtain the current standard time that the network standard time server returns.
Second acquisition module 702 is used to obtain network delay.
Wherein, second acquisition module 702 specifically comprises:
Record cell 7021 is used for the transmitting time of record standard time request, and writes down the time of reception of current standard time.
Computing unit 7022 is used to calculate the difference between time of reception and the transmitting time, and difference be multiply by 1/2nd, obtains real network and postpones.
Wherein, first acquisition module 701 also comprises:
Read judging unit 7013, be used to read current local zone time, judge whether current local zone time is synchronous with the current standard time.
Correspondingly, second acquisition module 702 also is used for,
If asynchronous, then obtain network delay.
Adjusting module 703 with adjusting module 603 in the embodiment of the invention 6, is not described in detail in this.
The beneficial effect that the technical scheme that the embodiment of the invention provides is brought is: by obtaining current standard time and network delay; Can calculate the delay of current standard time information in network transmission process that the network standard time server issues; Last according to this current standard time and this network delay, adjust local zone time; Can adjust the local zone time of portable terminal, make local zone time and standard time synchronous, and improve the accuracy of adjusted local zone time.
Embodiment 8
Referring to Fig. 8, the embodiment of the invention 8 provides a kind of portable terminal, specifically comprises:
First acquisition module 801 is used to obtain the current standard time.
Wherein, first acquisition module 801 specifically comprises:
Second transmitting element 8011 is used for sending the standard time request to the network standard time server.
Second acquisition unit 8012 is used to receive the current standard time that the network standard time server returns.
What deserves to be explained is that first acquisition module 801 can be with first acquisition module 601 in the embodiment of the invention 6, or can be with first acquisition module 701 in the embodiment of the invention 7.Be not described in detail in this.
Second acquisition module 802 is used to obtain network delay, and this network delay is default network delay fault value.
Adjusting module 803 with adjusting module 703 in the embodiment of the invention 7, is not described in detail in this.
The beneficial effect that the technical scheme that the embodiment of the invention provides is brought is: by obtaining current standard time and network delay; Can calculate the delay of current standard time information in network transmission process that the network standard time server issues; Last according to this current standard time and this network delay, adjust local zone time; Can adjust the local zone time of portable terminal, make local zone time and standard time synchronous, and improve the accuracy of adjusted local zone time.
Embodiment 9
Referring to Fig. 9, the embodiment of the invention 9 provides a kind of clock synchronization system, specifically comprises: network standard time server 901 and portable terminal 902.
Network standard time server 901 is used for the time request that mobile terminal receive 902 sends, read the current standard time after, the current standard time is returned to portable terminal 902.
Further, network standard time server 901 also is used for,
The current local zone time that mobile terminal receive 902 sends; Read the current standard time, judge whether current local zone time is synchronous with the current standard time; If asynchronous, then return the current standard time.
Portable terminal 902 is the portable terminal of any embodiment description among the embodiment of the invention 6-8.
The beneficial effect that the technical scheme that the embodiment of the invention provides is brought is: by obtaining current standard time and network delay; Can calculate the delay of current standard time information in network transmission process that the network standard time server issues; Last according to this current standard time and this network delay, adjust local zone time; Can adjust the local zone time of portable terminal, make local zone time and standard time synchronous, and improve the accuracy of adjusted local zone time.
The all or part of step that one of ordinary skill in the art will appreciate that realization the foregoing description can be finished by hardware, also can instruct relevant hardware to finish by program, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium of mentioning can be a read-only memory, disk or CD etc.
The above only is preferred embodiment of the present invention, and is in order to restriction the present invention, within the spirit and principles in the present invention not all, any modification of being done, is equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (15)

1. the method for synchronizing time of a portable terminal is characterized in that, described method comprises:
Obtain current standard time and network delay;
According to described current standard time and described network delay, adjust local zone time.
2. the method for claim 1 is characterized in that, described obtaining the current standard time specifically comprises:
Read current local zone time, and described current local zone time is sent to the network standard time server; After making described network standard time server receive described current local zone time, read the current standard time, and judge whether the described current standard time is synchronous with described current local zone time; If asynchronous, then described network standard time server returns the described current standard time;
Obtain the described current standard time that described network standard time server returns.
3. the method for claim 1 is characterized in that, described obtaining the current standard time specifically comprises:
Send the standard time request to the network standard time server;
Obtain the described current standard time that described network standard time server returns.
4. method as claimed in claim 3 is characterized in that, described obtaining after the described current standard time that described network standard time server returns also comprises:
Read current local zone time, judge whether described current local zone time is synchronous with the described current standard time;
If asynchronous, then carry out the step of obtaining described network delay.
5. the method for claim 1 is characterized in that, the described network delay that obtains specifically comprises:
Send the standard time request to the network standard time server, and the transmitting time of record described request;
Obtain the described current standard time that described network standard time server returns, and write down the time of reception of described current standard time;
Calculate the difference between described time of reception and the described transmitting time, and described difference be multiply by 1/2nd, obtain real network and postpone.
6. the method for claim 1 is characterized in that, the described network delay that obtains is specially,
Obtain default network delay threshold value.
7. the method for claim 1 is characterized in that, and is described according to described current standard time and described network delay, adjusts local zone time, specifically comprises:
With described current standard time and described network delay addition, obtain the actual current standard time;
Described local zone time is adjusted into is the current standard time of described reality, make described local zone time and standard time synchronous.
8. a portable terminal is characterized in that, described portable terminal comprises:
First acquisition module is used to obtain the current standard time;
Second acquisition module is used to obtain network delay;
Adjusting module is used for according to described current standard time and described network delay, adjusts local zone time.
9. portable terminal as claimed in claim 8 is characterized in that, described first acquisition module specifically comprises:
First transmitting element is used to read current local zone time, and described current local zone time is sent to the network standard time server; After making described network standard time server receive described current local zone time, read the current standard time, and judge whether the described current standard time is synchronous with described current local zone time; If asynchronous, then described network standard time server returns the described current standard time;
First acquiring unit is used to obtain the described current standard time that described network standard time server returns.
10. portable terminal as claimed in claim 8 is characterized in that, described first acquisition module specifically comprises:
Second transmitting element is used for sending the standard time request to the network standard time server;
Second acquisition unit is used to obtain the described current standard time that described network standard time server returns.
11. portable terminal as claimed in claim 10 is characterized in that, described first acquisition module also comprises:
Read judging unit, read current local zone time, judge whether described current local zone time is synchronous with the described current standard time;
Correspondingly, described second acquisition module also is used for,
If asynchronous, then obtain described network delay.
12. portable terminal as claimed in claim 8 is characterized in that, described second acquisition module specifically comprises:
The 3rd transmitting element is used for sending the standard time request to the network standard time server;
The 3rd acquiring unit is used to obtain the described current standard time that described network standard time server returns;
Record cell is used to write down the transmitting time of described request; And the time of reception of described current standard time of record;
Computing unit is used to calculate the difference between described time of reception and the described transmitting time, and described difference be multiply by 1/2nd, obtains real network and postpones.
13. portable terminal as claimed in claim 8 is characterized in that, described second acquisition module specifically is used for, and obtains default network delay threshold value.
14. portable terminal as claimed in claim 8 is characterized in that, described adjusting module specifically comprises:
Addition unit is used for described current standard time and described network delay addition are obtained the actual current standard time;
Adjustment unit is used for described local zone time is adjusted into the current standard time of described reality, makes described local zone time and standard time synchronous.
15. a clock synchronization system is characterized in that, described system comprises: network standard time server and as each described portable terminal of claim 8~14.
CN2012100190651A 2012-01-20 2012-01-20 Time synchronizing method of mobile terminal, mobile terminal and time synchronizing system Pending CN103220120A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2012100190651A CN103220120A (en) 2012-01-20 2012-01-20 Time synchronizing method of mobile terminal, mobile terminal and time synchronizing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2012100190651A CN103220120A (en) 2012-01-20 2012-01-20 Time synchronizing method of mobile terminal, mobile terminal and time synchronizing system

Publications (1)

Publication Number Publication Date
CN103220120A true CN103220120A (en) 2013-07-24

Family

ID=48817612

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2012100190651A Pending CN103220120A (en) 2012-01-20 2012-01-20 Time synchronizing method of mobile terminal, mobile terminal and time synchronizing system

Country Status (1)

Country Link
CN (1) CN103220120A (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104079957A (en) * 2014-06-25 2014-10-01 广东欧珀移动通信有限公司 Multimedia device synchronous operation method and system
CN104717248A (en) * 2013-12-12 2015-06-17 鸿合科技有限公司 File network sharing methods, server and terminal
CN105141458A (en) * 2015-08-25 2015-12-09 广州酷狗计算机科技有限公司 Remaining duration showing method and device
CN105207768A (en) * 2015-10-23 2015-12-30 上海斐讯数据通信技术有限公司 Reminding method and system for time inconsistency between router side access device and Internet
CN105490798A (en) * 2015-11-25 2016-04-13 尹璐 Synchronization method and synchronization system for standard time and fighting time of cross-platform terminals of multiple types
CN105578399A (en) * 2016-01-29 2016-05-11 刘炳钺 Electronic clock synchronizing method and system
CN105915308A (en) * 2016-07-08 2016-08-31 腾讯科技(深圳)有限公司 Time synchronization method, device and system
CN108709565A (en) * 2018-04-04 2018-10-26 深圳市沃特沃德股份有限公司 Step-recording method and step count set
CN110953682A (en) * 2019-12-17 2020-04-03 珠海格力电器股份有限公司 Air conditioning system and time correction method of GPRS module thereof
CN111224733A (en) * 2020-01-09 2020-06-02 珠海格力电器股份有限公司 Time calibration method, device, computer equipment and storage medium
CN111867046A (en) * 2020-07-23 2020-10-30 上海中通吉网络技术有限公司 Method, system, equipment and storage medium for checking local time of mobile terminal

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1794855A (en) * 2005-06-27 2006-06-28 华为技术有限公司 Method and device synchronous operating time in equipment management
CN101075848A (en) * 2007-07-05 2007-11-21 华为技术有限公司 System and method for synchronizing microcellular network basestation and base station

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1794855A (en) * 2005-06-27 2006-06-28 华为技术有限公司 Method and device synchronous operating time in equipment management
CN101075848A (en) * 2007-07-05 2007-11-21 华为技术有限公司 System and method for synchronizing microcellular network basestation and base station

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104717248A (en) * 2013-12-12 2015-06-17 鸿合科技有限公司 File network sharing methods, server and terminal
CN104717248B (en) * 2013-12-12 2019-01-25 鸿合科技股份有限公司 File network sharing method, server and terminal
CN104079957A (en) * 2014-06-25 2014-10-01 广东欧珀移动通信有限公司 Multimedia device synchronous operation method and system
CN104079957B (en) * 2014-06-25 2017-09-01 广东欧珀移动通信有限公司 A kind of method and system of multimedia equipment simultaneously operating
CN105141458A (en) * 2015-08-25 2015-12-09 广州酷狗计算机科技有限公司 Remaining duration showing method and device
CN105141458B (en) * 2015-08-25 2018-09-11 广州酷狗计算机科技有限公司 Residual time length methods of exhibiting and device
CN105207768B (en) * 2015-10-23 2018-06-19 上海斐讯数据通信技术有限公司 Router side access equipment and the inconsistent based reminding method of internet time and system
CN105207768A (en) * 2015-10-23 2015-12-30 上海斐讯数据通信技术有限公司 Reminding method and system for time inconsistency between router side access device and Internet
CN105490798A (en) * 2015-11-25 2016-04-13 尹璐 Synchronization method and synchronization system for standard time and fighting time of cross-platform terminals of multiple types
CN105490798B (en) * 2015-11-25 2019-03-15 尹璐 A kind of cross-platform multiple types of terminals standard time and operational time synchronous method and synchronization system
CN105578399A (en) * 2016-01-29 2016-05-11 刘炳钺 Electronic clock synchronizing method and system
CN105915308B (en) * 2016-07-08 2018-04-27 腾讯科技(深圳)有限公司 A kind of method for synchronizing time, apparatus and system
CN105915308A (en) * 2016-07-08 2016-08-31 腾讯科技(深圳)有限公司 Time synchronization method, device and system
CN108709565A (en) * 2018-04-04 2018-10-26 深圳市沃特沃德股份有限公司 Step-recording method and step count set
CN110953682A (en) * 2019-12-17 2020-04-03 珠海格力电器股份有限公司 Air conditioning system and time correction method of GPRS module thereof
CN110953682B (en) * 2019-12-17 2021-05-11 珠海格力电器股份有限公司 Air conditioning system and time correction method of GPRS module thereof
CN111224733A (en) * 2020-01-09 2020-06-02 珠海格力电器股份有限公司 Time calibration method, device, computer equipment and storage medium
CN111224733B (en) * 2020-01-09 2020-12-29 珠海格力电器股份有限公司 Time calibration method, device, computer equipment and storage medium
CN111867046A (en) * 2020-07-23 2020-10-30 上海中通吉网络技术有限公司 Method, system, equipment and storage medium for checking local time of mobile terminal

Similar Documents

Publication Publication Date Title
CN103220120A (en) Time synchronizing method of mobile terminal, mobile terminal and time synchronizing system
CN102546918B (en) Avoid the system and method for double card paging conflict
CN104601203B (en) A kind of low-power consumption bluetooth equipment dynamically adjusts the method and device of Connecting quantity
CN103823546B (en) Information control method and electronic equipment
CN104216835B (en) A kind of method and device for realizing internal memory fusion
CN102468989B (en) The method and system of network data
CN105278413B (en) The communication means of host computer and similar CAN device
CN103458496A (en) Method and system for achieving time synchronization through WiFi-Direct
CN103619078A (en) Communication processing method and terminal
CN102122303A (en) Method for data migration, service system and sever equipment
CN105204633A (en) Control method of mobile terminal music play and mobile terminal
CN110677211A (en) Time synchronization method and device and power acquisition terminal
CN103428844A (en) Method for achieving mobile phone time synchronization of mobile phone terminal
CN105260285A (en) Method and system for data center to collect and upload data
CN102883046A (en) Information display method and device and mobile terminal
CN107682464A (en) A kind of cloud disk data synchronous system
CN111311250A (en) Method, device and system for supporting off-line and on-line payment
CN114125590B (en) Sampling method and device for landslide disaster
CN103716357A (en) Mobile information synchronization method and apparatus, and mobile communication terminal
CN104731723A (en) Power-off protection method and device for storage device
CN103327651A (en) Information transmission method and system and sleeping function device
WO2022127803A1 (en) Power grid clock synchronization method and device
CN108387776A (en) A kind of method for early warning and device of intelligent electric meter
WO2021031779A1 (en) Charging method, terminal, and computer readable storage medium
CN207529371U (en) CPU fetchings system and electronic equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20130724