CN106940665A - A kind of method of time correction control based on mobile terminal, system and mobile terminal - Google Patents

A kind of method of time correction control based on mobile terminal, system and mobile terminal Download PDF

Info

Publication number
CN106940665A
CN106940665A CN201710182527.4A CN201710182527A CN106940665A CN 106940665 A CN106940665 A CN 106940665A CN 201710182527 A CN201710182527 A CN 201710182527A CN 106940665 A CN106940665 A CN 106940665A
Authority
CN
China
Prior art keywords
counter
time
value
mobile terminal
setting
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.)
Granted
Application number
CN201710182527.4A
Other languages
Chinese (zh)
Other versions
CN106940665B (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.)
Yuanyuan Shenzhen Technology Transfer Co ltd
Original Assignee
Huizhou TCL Mobile Communication 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 Huizhou TCL Mobile Communication Co Ltd filed Critical Huizhou TCL Mobile Communication Co Ltd
Priority to CN201710182527.4A priority Critical patent/CN106940665B/en
Publication of CN106940665A publication Critical patent/CN106940665A/en
Application granted granted Critical
Publication of CN106940665B publication Critical patent/CN106940665B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0751Error or fault detection not based on redundancy
    • G06F11/0754Error or fault detection not based on redundancy by exceeding limits
    • G06F11/0757Error or fault detection not based on redundancy by exceeding limits by exceeding a time limit, i.e. time-out, e.g. watchdogs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0751Error or fault detection not based on redundancy
    • G06F11/0754Error or fault detection not based on redundancy by exceeding limits
    • G06F11/076Error or fault detection not based on redundancy by exceeding limits by exceeding a count or rate limit, e.g. word- or bit count limit

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Telephone Function (AREA)

Abstract

The invention discloses a kind of method of time correction control based on mobile terminal, system and mobile terminal, methods described compares the value and the size of the thresholding of setting of counter by starting value of the timer every the time detecting counter of setting;When the value of counter is more than the thresholding of setting, acquisition current time is K;The value of counter is reset, and corresponding to current time K.When counter value because of the electrostatic in environment, magnetic field, fall or when the factor such as chip quality problem is surprisingly changed, it is possible to prevente effectively from because the secondary time showing mistake that counter overflow is brought, improves the accuracy rate of time showing, so as to be user-friendly to.

Description

A kind of method of time correction control based on mobile terminal, system and mobile terminal
Technical field
The present invention relates to field of mobile terminals, more particularly to a kind of time adjustment controlling party based on mobile terminal Method, system and mobile terminal.
Background technology
Mobile terminal is in addition to basic communication function, because the accurate timing of its time, shows clear, is also much used Electronic tool of the family as the time that is to look at;In the prior art, the time of mobile terminal is to mobile whole according to its counter End master clock count and then along with an accurate basal latency obtains current time, specific as follows:
When mobile terminal correction time, the value of counter is P1, and the time that should currently correct is K1;After correction is finished, count Device P1 can add 1 in each mobile terminal master clock cycle, if master clock cycle is T1, then when the value of counter is P2, The time K2 of mobile terminal should be:
K2=K1+(P2-P1)* T1.
Counter in current mobile terminal is often definitely enough, and a century can be used by typically counting from zero; But the features such as being due to the portability of mobile terminal, mobile terminal it is unavoidable in routine use because electrostatic, magnetic field in environment, Fall or the factor such as chip quality problem surprisingly causes the value of counter to be changed;When the value of counter is surprisingly changed first Occur be exactly mobile terminal time it is incorrect, now user can pass through network or manual correction time;But when counter Value by it is unexpected be revised as close to the value of spilling when, when user by network or manual correction time uses some time(May be very It is short such as one hour, may be very long such as 5 years)The secondary display mistake of time can be caused because of counter overflow again afterwards, to use Bring puzzlement at family, or even delays the thing of user.
I.e. in the prior art for example, the value of counter because the electrostatic in environment, magnetic field, fall or chip quality problem etc. because Element is surprisingly revised as P3, and P3 and counter maximum P4 closely;When user's discovery time is incorrect, pass through Network or manual correction time, but the value of counter can be reached after maximum P4 after counter overflow again after a period of time Become zero;Now because the value of counter becomes zero and can cause a time showing mistake, puzzlement is brought to user, or even indulge in Misapply the thing at family.
Therefore, prior art has yet to be improved and developed.
The content of the invention
The technical problem to be solved in the present invention is that the drawbacks described above for prior art is whole based on movement there is provided one kind Method of time correction control, system and the mobile terminal at end.There is provided a kind of method for preventing the mobile terminal time from overflowing.
The technical proposal for solving the technical problem of the invention is as follows:
A kind of method of time correction control based on mobile terminal, wherein, including:
A, mobile terminal start value of the timer every the time detecting counter of setting, and compare value and the setting of counter The size of thresholding;
B, when the value of counter is more than the thresholding of setting, acquisition current time is K;
C, resets the value of counter, and corresponding to current time K.
The method of time correction control based on mobile terminal, wherein, the step A comprises the following steps:
A1, startup timer;
The value of A2, when the timer expires detection counter;
A3, the value for comparing counter and the size of the thresholding of setting.
The method of time correction control based on mobile terminal, wherein, during the time-out of the timer in the step A2 Between be counter maximum P4* clock frequencies * 10%.
The method of time correction control based on mobile terminal, wherein, the thresholding set is counter maximum The 80% of P4.
A kind of time adjustment control system based on mobile terminal, wherein, including:
Counter Value is detected and comparison module, for controlling mobile terminal to start time detecting counter of the timer every setting Value, and compare the value of counter and the size of the thresholding of setting;
Time-obtaining module, for when the value of counter is more than the thresholding of setting, acquisition current time to be K;
Respective modules are reseted, the value for resetting counter, and corresponding to current time K.
The time adjustment control system based on mobile terminal, wherein, the Counter Value detection and comparison module bag Include:
Start unit, for starting timer;
Detection unit, the value for detection counter when the timer expires;
Comparing unit, value and the size of the thresholding of setting for comparing counter.
The time adjustment control system based on mobile terminal, wherein, the time-out time of the timer is counter Maximum P4* clock frequencies * 10%.
The time adjustment control system based on mobile terminal, wherein, the thresholding set is counter maximum The 80% of P4.
A kind of mobile terminal, wherein, including the time adjustment control system based on mobile terminal described in any one, use The method of time correction control based on mobile terminal is realized described in any one.
Method of time correction control provided by the present invention based on mobile terminal, system and mobile terminal, methods described By starting value of the timer every the time detecting counter of setting, and compare the big of the value of counter and the thresholding that sets It is small;When the value of counter is more than the thresholding of setting, acquisition current time is K;The value of counter is reset, and when corresponding to current Between K.When counter value because of the electrostatic in environment, magnetic field, fall or when the factor such as chip quality problem is surprisingly changed, can be with It is prevented effectively from because the secondary time showing mistake that counter overflow is brought, improves the accuracy rate of time showing, so that convenient User uses.
Brief description of the drawings
Fig. 1 is the flow chart of the preferred embodiment of the method for time correction control of the invention based on mobile terminal.
Fig. 2 is the functional schematic block diagram of the preferred embodiment of the time adjustment control system of the invention based on mobile terminal.
Embodiment
To make the objects, technical solutions and advantages of the present invention clearer, clear and definite, develop simultaneously embodiment pair referring to the drawings The present invention is further described.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and without It is of the invention in limiting.
Fig. 1 is referred to, Fig. 1 is the flow of the preferred embodiment of the method for time correction control of the invention based on mobile terminal Figure.As shown in figure 1, the method for time correction control based on mobile terminal described in the embodiment of the present invention, comprises the following steps:
S100, mobile terminal starts value of the timer every the time detecting counter of setting, and compares the value of counter with setting The size of fixed thresholding;
Specifically, the thresholding of the setting, it is preferred that being the 80% of counter maximum P4, such as counter of mobile terminal Maximum count value P4 is stored in the register of one 16, then P4 maximum count value subtracts 1 for 2 16 powers, then sets Thresholding is preferably(2 16 powers subtract 1)80%.
The timer, its time-out time is counter maximum P4* clock frequencies * 10%, for example, mobile terminal Master clock frequency is 100000000Hz, and counter maximum count value P4 is stored in the register of one 16, then P4 maximum Count value subtracts 1 for 2 16 powers, then the time-out time of timer is set to(2 16 powers subtract 1)With 100000000 product 10% ;
Further, step S100 comprises the following steps:
Start timer;
The value of detection counter when the timer expires;
Compare the value and the size of the thresholding of setting of counter.
S200, when the value of counter is more than the thresholding of setting, acquisition current time is K;
When the value of counter is more than the thresholding of setting i.e. in the present invention(The thresholding for example then set is preferably(2 16 powers subtract 1)80%)When, acquisition current time is K, and such as 11.00 is whole.
When counter value because of the electrostatic in environment, magnetic field, fall or when the factor such as chip quality problem is surprisingly changed (It is greater than the thresholding of setting), it is possible to prevente effectively from because the secondary time showing mistake that counter overflow is brought, is improved The accuracy rate of time showing, so as to be user-friendly to.
The count value of such as mobile terminal in the specific implementation of the invention is stored in the register of one 16, currently should The value of the register of 16 is 0000000000000011 (binary representation);Then due to the electrostatic in environment, magnetic field, fall Or the factor such as chip quality problem is surprisingly changed the value of the register of 16 and is modified to 0100000000000011 (two enter Tabulation is shown).
Note:0000000000000011 (binary representation) is metric 3;0100000000000011 (binary form Show) it is metric 16387
Obvious 3 differ greatly with 16387;If thresholding has exceeded thresholding for 16,000 16387.
In the present invention when the value of counter is more than the thresholding of setting, acquisition current time is K.
S300, resets the value of counter, and corresponding to current time K.
Specifically, by resetting counter, even if the value of counter is zero, then by the value of counter and step S200 The current time K of acquisition is carried out to should be used as new correction time;Like this, it is mobile subsequently when the value of counter is P2 The time K2 of terminal should be K2=K1+(P2-P1)* T1;Wherein, T1 is master clock cycle, P1 be after resetting in step S3 with The corresponding count values of time K(Namely zero), K1 is K.
For example:Assuming that master clock cycle T1 is 0.001 second, if the current time K obtained in step S200 is 199.99 seconds, The value P1 of this hour counter is 0(P1 be step S3 in reset after count value corresponding with time K, that is, zero);Will be current Time K is carried out to should be used as new correction time, i.e. K1=K=199.99 second;
When the time a moment later after, the value P2 of counter is 1000, and the time K2 of mobile terminal should be K2=K1+(P2- P1)* T1=199.99 seconds+(1000-0) * 0.001 second=200.99 seconds.
Therefore, the invention provides a kind of method of time correction control based on mobile terminal, methods described passes through Start value of the timer every the time detecting counter of setting, and compare the value and the size of the thresholding of setting of counter;When When the value of counter is more than the thresholding of setting, acquisition current time is K;The value of counter is reset, and corresponding to current time K. When counter value because of the electrostatic in environment, magnetic field, fall or when the factor such as chip quality problem is surprisingly changed, can be effective Avoid because the secondary time showing mistake that counter overflow is brought, improves the accuracy rate of time showing, so as to facilitate user Use.
Based on above method embodiment, the embodiment of the present invention additionally provides a kind of time adjustment control based on mobile terminal System, wherein, including:
Counter Value is detected and comparison module 210, by controlling mobile terminal to start timer based on the time detecting of setting The value of number device, and compare the value and the size of the thresholding of setting of counter;As detailed above.
Time-obtaining module 220, for when the value of counter is more than the thresholding of setting, acquisition current time to be K;Specifically As described above.
Respective modules 230 are reseted, the value for resetting counter, and corresponding to current time K;As detailed above.
Further, the time adjustment control system based on mobile terminal, wherein, Counter Value detection with than Include compared with module:
Start unit, for starting timer;As detailed above.
Detection unit, the value for detection counter when the timer expires;As detailed above.
Comparing unit, value and the size of the thresholding of setting for comparing counter;As detailed above.
The time adjustment control system based on mobile terminal, wherein, the time-out time of the timer is counter Maximum P4* clock frequencies * 10%;As detailed above.
The time adjustment control system based on mobile terminal, wherein, the thresholding set is counter maximum The 80% of P4;As detailed above.
Further, the embodiment of the present invention additionally provides a kind of mobile terminal, and the mobile terminal of the present embodiment is including above-mentioned The time adjustment control system based on mobile terminal described in embodiment, using described in above-described embodiment based on mobile terminal when Between Corrective control method realize.
In summary, the method for time correction control provided by the present invention based on mobile terminal, system and mobile terminal, Methods described compares the value and the door of setting of counter by starting value of the timer every the time detecting counter of setting The size of limit;When the value of counter is more than the thresholding of setting, acquisition current time is K;The value of counter is reset, and is corresponded to Current time K.When counter value because of the electrostatic in environment, magnetic field, fall or the factor such as chip quality problem is surprisingly changed When, it is possible to prevente effectively from because the secondary time showing mistake that counter overflow is brought, improves the accuracy rate of time showing, from And be user-friendly to.
Certainly, one of ordinary skill in the art will appreciate that realizing all or part of flow in above-described embodiment method, Computer program is can be by instruct related hardware(Such as processor, controller etc.)To complete, described program can be stored In the storage medium of an embodied on computer readable, the program may include such as the flow of above-mentioned each method embodiment upon execution.Its Described in storage medium can be for memory, magnetic disc, CD etc..
It should be appreciated that the application of the present invention is not limited to above-mentioned citing, for those of ordinary skills, can To be improved or converted according to the above description, all these modifications and variations should all belong to the guarantor of appended claims of the present invention Protect scope.

Claims (9)

1. a kind of method of time correction control based on mobile terminal, it is characterised in that including:
A, mobile terminal start value of the timer every the time detecting counter of setting, and compare value and the setting of counter The size of thresholding;
B, when the value of counter is more than the thresholding of setting, acquisition current time is K;
C, resets the value of counter, and corresponding to current time K.
2. the method for time correction control based on mobile terminal according to claim 1, it is characterised in that the step A bags Include following steps:
A1, startup timer;
The value of A2, when the timer expires detection counter;
A3, the value for comparing counter and the size of the thresholding of setting.
3. the method for time correction control based on mobile terminal according to claim 2, it is characterised in that the step A2 In timer time-out time be counter maximum P4* clock frequencies * 10%.
4. the method for time correction control based on mobile terminal according to claim 1, it is characterised in that the door of the setting It is limited to the 80% of counter maximum P4.
5. a kind of time adjustment control system based on mobile terminal, it is characterised in that including:
Counter Value is detected and comparison module, for controlling mobile terminal to start time detecting counter of the timer every setting Value, and compare the value of counter and the size of the thresholding of setting;
Time-obtaining module, for when the value of counter is more than the thresholding of setting, acquisition current time to be K;
Respective modules are reseted, the value for resetting counter, and corresponding to current time K.
6. the time adjustment control system based on mobile terminal according to claim 5, it is characterised in that the Counter Value Detection includes with comparison module:
Start unit, for starting timer;
Detection unit, the value for detection counter when the timer expires;
Comparing unit, value and the size of the thresholding of setting for comparing counter.
7. the time adjustment control system based on mobile terminal according to claim 6, it is characterised in that the timer Time-out time be counter maximum P4* clock frequencies * 10%.
8. the time adjustment control system based on mobile terminal according to claim 5, it is characterised in that the door of the setting It is limited to the 80% of counter maximum P4.
9. a kind of mobile terminal, it is characterised in that including the time school based on mobile terminal described in claim any one of 5-8 Positive control system, is realized using the method for time correction control based on mobile terminal described in claim any one of 1-4.
CN201710182527.4A 2017-03-24 2017-03-24 Time correction control method and system based on mobile terminal and mobile terminal Active CN106940665B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710182527.4A CN106940665B (en) 2017-03-24 2017-03-24 Time correction control method and system based on mobile terminal and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710182527.4A CN106940665B (en) 2017-03-24 2017-03-24 Time correction control method and system based on mobile terminal and mobile terminal

Publications (2)

Publication Number Publication Date
CN106940665A true CN106940665A (en) 2017-07-11
CN106940665B CN106940665B (en) 2021-04-20

Family

ID=59463479

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710182527.4A Active CN106940665B (en) 2017-03-24 2017-03-24 Time correction control method and system based on mobile terminal and mobile terminal

Country Status (1)

Country Link
CN (1) CN106940665B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110077125A (en) * 2019-04-17 2019-08-02 上海红箭自动化设备有限公司 A kind of printing ink-jet control system
CN113828529A (en) * 2021-11-26 2021-12-24 南京派格测控科技有限公司 Processing method and system based on concatenation abnormity of serial measurement data

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1673926A (en) * 2004-03-26 2005-09-28 联发科技股份有限公司 Timer system and related method capable of dynamically compensating a difference of a timer
CN101075146A (en) * 2006-05-19 2007-11-21 联发科技股份有限公司 Method and apparatus for correcting
CN101159532A (en) * 2006-10-03 2008-04-09 日本电气株式会社 Clock synchronization circuit
CN102023565A (en) * 2010-12-15 2011-04-20 中兴通讯股份有限公司 Device and method for outputting time information
US8325704B1 (en) * 2007-05-16 2012-12-04 Dust Networks, Inc. Time correction and distance measurement in wireless mesh networks
CN103257670A (en) * 2012-02-21 2013-08-21 北京国微集成技术有限公司 Embedded system and timing method thereof
US20160380672A1 (en) * 2015-06-24 2016-12-29 Casio Computer Co., Ltd. Satellite radio signal receiver, electronic timepiece, date and time acquiring method and recording medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1673926A (en) * 2004-03-26 2005-09-28 联发科技股份有限公司 Timer system and related method capable of dynamically compensating a difference of a timer
CN101075146A (en) * 2006-05-19 2007-11-21 联发科技股份有限公司 Method and apparatus for correcting
CN101159532A (en) * 2006-10-03 2008-04-09 日本电气株式会社 Clock synchronization circuit
US8325704B1 (en) * 2007-05-16 2012-12-04 Dust Networks, Inc. Time correction and distance measurement in wireless mesh networks
CN102023565A (en) * 2010-12-15 2011-04-20 中兴通讯股份有限公司 Device and method for outputting time information
CN103257670A (en) * 2012-02-21 2013-08-21 北京国微集成技术有限公司 Embedded system and timing method thereof
US20160380672A1 (en) * 2015-06-24 2016-12-29 Casio Computer Co., Ltd. Satellite radio signal receiver, electronic timepiece, date and time acquiring method and recording medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110077125A (en) * 2019-04-17 2019-08-02 上海红箭自动化设备有限公司 A kind of printing ink-jet control system
CN110077125B (en) * 2019-04-17 2021-01-01 上海红箭自动化设备有限公司 Printing ink-jet control system
CN113828529A (en) * 2021-11-26 2021-12-24 南京派格测控科技有限公司 Processing method and system based on concatenation abnormity of serial measurement data

Also Published As

Publication number Publication date
CN106940665B (en) 2021-04-20

Similar Documents

Publication Publication Date Title
CN111416617B (en) Clock synchronization method and device and electronic equipment
CN109283967A (en) A kind of micro-control unit MCU clock correcting method and relevant device
US20080244301A1 (en) Real-time clock correction methods and apparatus
CN104901687A (en) Method and system for calibrating clock frequency
CN106940665A (en) A kind of method of time correction control based on mobile terminal, system and mobile terminal
JP5696777B2 (en) Clock generator and system including the same
CN113076278A (en) USB device clock calibration method, device, system and computer readable storage medium
CN103149970A (en) Clock calibration method and system
CN109361485B (en) Method for calibrating PTP (precision time protocol) master clock in non-real-time system
EP3171269B1 (en) Data transmission method and mobile terminal
WO2022062670A1 (en) Timing method, visual navigational aid device control method, and related apparatus
WO2024125326A1 (en) Clock frequency measurement method and apparatus, and chip and module device
CN205901711U (en) Accurate digital frequency divider based on GPS pulse signal second
CN103513698B (en) A kind of clock signal calibration, device and electronic equipment
CN109799872A (en) Improve the method, apparatus and electronic equipment of low-res real-time clock waking-up precision
US20180007635A1 (en) Closed-loop clock calibration method, terminal and computer storage medium
WO2021135303A1 (en) Fpga-based design method and device for equally dividing interval
US20150074444A1 (en) Data processing device and method for determining a clock relationship
CN109617528A (en) It is a kind of for correcting the method and its system of active oscillator frequency
JP2004172911A (en) Filter device
CN104753497A (en) Method and device for correcting OSCPPS
US10042384B2 (en) System and methods for computer clock synchronization without frequency error estimation
JP4651988B2 (en) Clock accuracy correction device
CN111830349A (en) Power grid event detection method and device and electronic equipment
CN112865753A (en) Filter coefficient adjusting method and device, storage medium and filter

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20240108

Address after: 518000, 109-111, Building 17, Maker Town, No. 4109 Liuxian Avenue, Pingshan Community, Taoyuan Street, Nanshan District, Shenzhen, Guangdong Province

Patentee after: Yuanyuan (Shenzhen) Technology Transfer Co.,Ltd.

Address before: 516006 Zhongkai hi tech Zone, Huizhou, Guangdong, 86 Chang seven Road West

Patentee before: HUIZHOU TCL MOBILE COMMUNICATION Co.,Ltd.

TR01 Transfer of patent right