[go: up one dir, main page]

CN106940665B - A mobile terminal-based time correction control method, system and mobile terminal - Google Patents

A mobile terminal-based time correction control method, system and mobile terminal Download PDF

Info

Publication number
CN106940665B
CN106940665B CN201710182527.4A CN201710182527A CN106940665B CN 106940665 B CN106940665 B CN 106940665B CN 201710182527 A CN201710182527 A CN 201710182527A CN 106940665 B CN106940665 B CN 106940665B
Authority
CN
China
Prior art keywords
counter
value
mobile terminal
time
set threshold
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
CN201710182527.4A
Other languages
Chinese (zh)
Other versions
CN106940665A (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.)
Hebei Youchen Yikang Information Technology 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

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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 OR CALCULATING; 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

本发明公开了一种基于移动终端的时间校正控制方法、系统及移动终端,所述方法通过启动定时器每隔设定的时间检测计数器的值,并比较计数器的值与设定的门限的大小;当计数器的值大于设定的门限时,获取当前时间为K;重置计数器的值,并对应于当前时间K。当计数器的值因环境中的静电、磁场、跌落或芯片质量问题等因素被意外修改时,可以有效避免因为计数器溢出带来的二次时间显示错误,提高了时间显示的准确率,从而方便用户使用。

Figure 201710182527

The invention discloses a mobile terminal-based time correction control method, system and mobile terminal. The method detects the value of the counter every set time by starting the timer, and compares the value of the counter with the set threshold size ; When the value of the counter is greater than the set threshold, obtain the current time as K; reset the value of the counter and correspond to the current time K. When the value of the counter is accidentally modified due to factors such as static electricity, magnetic field, drop or chip quality in the environment, it can effectively avoid secondary time display errors caused by counter overflow, improve the accuracy of time display, and thus facilitate users use.

Figure 201710182527

Description

Time correction control method and system based on mobile terminal and mobile terminal
Technical Field
The invention relates to the field of mobile terminals, in particular to a time correction control method and system based on a mobile terminal and the mobile terminal.
Background
Besides the basic communication function, the mobile terminal is also regarded as an electronic tool for viewing time by many users because the time is accurately timed and clearly displayed; in the prior art, the time of the mobile terminal is obtained by counting a main clock of the mobile terminal according to a counter of the mobile terminal and then adding an accurate basic time, and the specific steps are as follows:
when the mobile terminal corrects the time, the value of the counter is P1, and the time to be corrected is K1; after the calibration is completed, the counter P1 is incremented by 1 in each mobile terminal master clock cycle, and the master clock cycle is set to T1, then when the value of the counter is P2, the time K2 of the mobile terminal should be:
K2=K1+(P2-P1)*T1。
at present, a counter in a mobile terminal is always absolutely sufficient, and counting from zero can be generally used for hundreds of years; however, due to the characteristics of portability and the like of the mobile terminal, the value of the counter is difficult to be modified due to factors such as static electricity, magnetic field, falling or chip quality problems in the environment in daily use of the mobile terminal; when the value of the counter is modified accidentally, the time of the mobile terminal is incorrect firstly, and then the user can correct the time through a network or manually; however, when the value of the counter is accidentally modified to be close to the overflow value, after a user uses a network or manually for correcting time (which may be as short as one hour, and may be as long as five years), the time is displayed incorrectly for the second time due to the overflow of the counter, which causes trouble to the user and even delays the user.
That is, in the prior art, for example, the value of the counter is accidentally modified to P3 due to static electricity, magnetic field, dropping or chip quality problems in the environment, and P3 is very close to the maximum value P4 of the counter; when the user finds that the time is incorrect, the time is corrected through a network or manually, but after a period of time, the value of the counter reaches the maximum value P4, and then the counter is overflowed and becomes zero; at this time, the value of the counter becomes zero, which causes a time display error, and brings trouble to the user, even delays the user.
Accordingly, the prior art is yet to be improved and developed.
Disclosure of Invention
The present invention provides a time correction control method and system based on a mobile terminal, and a mobile terminal, aiming at the above-mentioned defects in the prior art. A method for preventing a mobile terminal from time-overflowing is provided.
The technical scheme adopted by the invention for solving the technical problem is as follows:
a time correction control method based on a mobile terminal comprises the following steps:
A. the mobile terminal starts a timer to detect the value of a counter every other set time, and compares the value of the counter with the set threshold;
b, when the value of the counter is larger than a set threshold, acquiring that the current time is K;
c, resetting the value of the counter and corresponding to the current time K.
The time correction control method based on the mobile terminal, wherein the step A comprises the following steps:
a1, starting a timer;
a2, detecting the value of the counter when the timer is overtime;
a3, comparing the value of the counter with the set threshold.
The time correction control method based on the mobile terminal, wherein the timeout time of the timer in the step A2 is the maximum value P4 clock frequency 10%.
The mobile terminal-based time correction control method is characterized in that the set threshold is 80% of the maximum value P4 of the counter.
A time correction control system based on a mobile terminal, comprising:
the counter value detection and comparison module is used for controlling the mobile terminal to start the timer to detect the value of the counter every other set time and comparing the value of the counter with the set threshold;
the time acquisition module is used for acquiring the current time as K when the value of the counter is greater than a set threshold;
and the reset corresponding module is used for resetting the value of the counter and corresponds to the current time K.
The mobile terminal-based time correction control system, wherein the counter value detection and comparison module comprises:
the starting unit is used for starting the timer;
a detecting unit for detecting a value of the counter when the timer times out;
and the comparison unit is used for comparing the value of the counter with the set threshold.
The time correction control system based on the mobile terminal is characterized in that the timeout time of the timer is equal to the maximum value P4 multiplied by 10% of the clock frequency of the counter.
The mobile terminal based time correction control system, wherein the set threshold is 80% of the maximum value P4 of the counter.
A mobile terminal comprises any one of the mobile terminal-based time correction control systems, and is realized by adopting any one of the mobile terminal-based time correction control methods.
The invention provides a time correction control method, a system and a mobile terminal based on the mobile terminal, wherein the method detects the value of a counter every other set time by starting a timer, and compares the value of the counter with the set threshold; when the value of the counter is larger than a set threshold, acquiring that the current time is K; the value of the counter is reset and corresponds to the current time K. When the value of the counter is accidentally modified due to factors such as static electricity, a magnetic field, falling or chip quality problems in the environment, secondary time display errors caused by overflow of the counter can be effectively avoided, the accuracy of time display is improved, and therefore the counter is convenient for users to use.
Drawings
Fig. 1 is a flowchart of a time correction control method based on a mobile terminal according to a preferred embodiment of the present invention.
Fig. 2 is a functional block diagram of a preferred embodiment of the mobile terminal based time correction control system of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer and clearer, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to fig. 1, fig. 1 is a flowchart illustrating a time calibration control method based on a mobile terminal according to a preferred embodiment of the present invention. As shown in fig. 1, the time correction control method based on a mobile terminal according to the embodiment of the present invention includes the following steps:
s100, the mobile terminal starts a timer to detect the value of a counter every other set time, and compares the value of the counter with the set threshold;
specifically, the set threshold is preferably 80% of the maximum value P4 of the counter, for example, the maximum count value P4 of the counter of the mobile terminal is stored in a 16-bit register, and the maximum count value P4 is 16 times of 2 minus 1, and the set threshold is preferably 80% of (16 times of 2 minus 1).
The timer, whose timeout time is the maximum counter value P4 multiplied by the clock frequency multiplied by 10%, for example, the main clock frequency of the mobile terminal is 100000000Hz, the maximum counter value P4 is stored in a 16-bit register, the maximum counter value P4 is the 16 th power of 2 minus 1, and the timeout time of the timer is set to 10% of the product of (the 16 th power of 2 minus 1) and 100000000;
further, step S100 includes the steps of:
starting a timer;
detecting a value of the counter when the timer times out;
the value of the counter is compared with the set threshold.
S200, when the value of the counter is larger than a set threshold, acquiring that the current time is K;
that is, in the present invention, when the value of the counter is greater than the set threshold (for example, the set threshold is preferably (the power 16 of 2 minus 1) 80%), the current time is K, for example, 11.00 whole.
When the value of the counter is accidentally modified (for example, greater than a set threshold) due to factors such as static electricity, magnetic field, falling or chip quality problems in the environment, secondary time display errors caused by overflow of the counter can be effectively avoided, the accuracy of time display is improved, and therefore the use of a user is facilitated.
In the implementation of the present invention, for example, the count value of the mobile terminal is stored in a 16-bit register, and the current value of the 16-bit register is 0000000000000011 (binary representation); the value of the 16-bit register is then modified to 0100000000000011 (binary representation) by accidental modification due to static electricity, magnetic fields, dropouts, or chip quality issues in the environment.
Note: 0000000000000011 (binary representation) is decimal 3 and 0100000000000011 (binary representation) is decimal 16387
Clearly 3 is very different from 16387; 16387 if the threshold is 16000, the threshold is exceeded.
In the invention, when the value of the counter is greater than the set threshold, the current time is acquired to be K.
And S300, resetting the value of the counter and corresponding to the current time K.
Specifically, by resetting the counter even if the value of the counter is zero, the value of the counter is then corresponded to the current time K acquired in step S200 as a new correction time; in this case, when the value of the counter is P2, the time K2 of the mobile terminal should be K2 ═ K1 + (P2-P1) _ T1; where T1 is the master clock cycle, P1 is the count value (i.e., zero) corresponding to time K after the reset in step S3, and K1 is K.
For example: assuming that the master clock cycle T1 is 0.001 second, the current time K obtained in step S200 is 199.99 seconds, and the value P1 of the counter is 0 (P1 is the count value corresponding to the time K after being reset in step S3, that is, zero); the current time K is mapped as a new correction time, i.e. K1= K =199.99 seconds;
when the time is over, the value P2 of the counter is 1000, and the time K2 of the mobile terminal is K2 ═ K1 + (P2-P1) _ T1=199.99 seconds + (1000-0) × 0.001 seconds = 200.99 seconds.
In view of the above, the present invention provides a time correction control method based on a mobile terminal, which detects the value of a counter every set time by starting a timer, and compares the value of the counter with the set threshold; when the value of the counter is larger than a set threshold, acquiring that the current time is K; the value of the counter is reset and corresponds to the current time K. When the value of the counter is accidentally modified due to factors such as static electricity, a magnetic field, falling or chip quality problems in the environment, secondary time display errors caused by overflow of the counter can be effectively avoided, the accuracy of time display is improved, and therefore the counter is convenient for users to use.
Based on the above method embodiment, an embodiment of the present invention further provides a time correction control system based on a mobile terminal, where the time correction control system includes:
a counter value detection and comparison module 210, configured to control the mobile terminal to start a timer, detect a counter value every other set time, and compare the counter value with a set threshold; as described above.
The time obtaining module 220 is configured to obtain a current time K when the value of the counter is greater than a set threshold; as described above.
A reset corresponding module 230 for resetting the value of the counter and corresponding to the current time K; as described above.
Further, the mobile terminal based time correction control system, wherein the counter value detection and comparison module comprises:
the starting unit is used for starting the timer; as described above.
A detecting unit for detecting a value of the counter when the timer times out; as described above.
The comparison unit is used for comparing the value of the counter with the set threshold; as described above.
The time correction control system based on the mobile terminal is characterized in that the overtime time of the timer is the maximum value P4 multiplied by 10% of the clock frequency of the counter; as described above.
The mobile terminal-based time correction control system, wherein the set threshold is 80% of the maximum value P4 of the counter; as described above.
Further, an embodiment of the present invention further provides a mobile terminal, where the mobile terminal of this embodiment includes the mobile terminal-based time correction control system described in the above embodiment, and is implemented by using the mobile terminal-based time correction control method described in the above embodiment.
In summary, in the time correction control method, the time correction control system and the mobile terminal provided by the invention, the method detects the value of the counter every set time by starting the timer, and compares the value of the counter with the set threshold; when the value of the counter is larger than a set threshold, acquiring that the current time is K; the value of the counter is reset and corresponds to the current time K. When the value of the counter is accidentally modified due to factors such as static electricity, a magnetic field, falling or chip quality problems in the environment, secondary time display errors caused by overflow of the counter can be effectively avoided, the accuracy of time display is improved, and therefore the counter is convenient for users to use.
Of course, it will be understood by those skilled in the art that all or part of the processes of the methods of the above embodiments may be implemented by a computer program instructing relevant hardware (such as a processor, a controller, etc.), and the program may be stored in a computer readable storage medium, and when executed, the program may include the processes of the above method embodiments. The storage medium may be a memory, a magnetic disk, an optical disk, etc.
It is to be understood that the invention is not limited to the examples described above, but that modifications and variations may be effected thereto by those of ordinary skill in the art in light of the foregoing description, and that all such modifications and variations are intended to be within the scope of the invention as defined by the appended claims.

Claims (5)

1. A time correction control method based on a mobile terminal is characterized by comprising the following steps:
A. the mobile terminal starts a timer to detect the value of a counter every other set time, and compares the value of the counter with the set threshold;
b, when the value of the counter is larger than a set threshold, acquiring that the current time is K;
c, resetting the value of the counter and corresponding to the current time K;
the step A comprises the following steps:
a1, starting a timer;
a2, detecting the value of the counter when the timer is overtime;
a3, comparing the value of the counter with the set threshold;
the timeout time of the timer in the step A2 is the maximum value P4 multiplied by 10% of the clock frequency.
2. The mobile terminal-based time correction control method according to claim 1, wherein the set threshold is 80% of a maximum value P4 of the counter.
3. A time correction control system based on a mobile terminal is characterized by comprising:
the counter value detection and comparison module is used for controlling the mobile terminal to start the timer to detect the value of the counter every other set time and comparing the value of the counter with the set threshold;
the time acquisition module is used for acquiring the current time as K when the value of the counter is greater than a set threshold;
a reset corresponding module for resetting the value of the counter and corresponding to the current time K;
the counter value detection and comparison module comprises:
the starting unit is used for starting the timer;
a detecting unit for detecting a value of the counter when the timer times out;
the comparison unit is used for comparing the value of the counter with the set threshold;
the overtime time of the timer is the maximum value P4 multiplied by the clock frequency multiplied by 10%.
4. The mobile terminal based time correction control system of claim 3, wherein said set threshold is 80% of the counter maximum value P4.
5. A mobile terminal, characterized in that it includes the mobile terminal-based time correction control system of any one of claims 3-4, and is implemented by using the mobile terminal-based time correction control method of any one of claims 1-2.
CN201710182527.4A 2017-03-24 2017-03-24 A mobile terminal-based time correction control method, system 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 A mobile terminal-based time correction control method, system and mobile terminal

Applications Claiming Priority (1)

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

Publications (2)

Publication Number Publication Date
CN106940665A CN106940665A (en) 2017-07-11
CN106940665B true 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 A mobile terminal-based time correction control method, system and mobile terminal

Country Status (1)

Country Link
CN (1) CN106940665B (en)

Families Citing this family (2)

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

Citations (6)

* 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 timer inaccuracy
CN101075146A (en) * 2006-05-19 2007-11-21 联发科技股份有限公司 Calibration method and device
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6115591B2 (en) * 2015-06-24 2017-04-19 カシオ計算機株式会社 Satellite radio wave receiver, electronic clock, date acquisition method and program

Patent Citations (6)

* 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 timer inaccuracy
CN101075146A (en) * 2006-05-19 2007-11-21 联发科技股份有限公司 Calibration method and device
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

Also Published As

Publication number Publication date
CN106940665A (en) 2017-07-11

Similar Documents

Publication Publication Date Title
TWI648606B (en) System and method for frequency compensation of an instant clock system
US20080244301A1 (en) Real-time clock correction methods and apparatus
US20150308996A1 (en) Olfactory sensing device and method for measuring odor
CN107450305B (en) Time correction method and device for clock chip and intelligent equipment
CN106940665B (en) A mobile terminal-based time correction control method, system and mobile terminal
CN111781987A (en) Real-time clock calibration method and related device
CN105783900B (en) A kind of calibration method and device of sensing data
CN112994136B (en) A temperature control method and device
JP2023101509A (en) Semiconductor device and method for detecting remaining battery level
CN111596802A (en) Touch screen calibration method and device and computer readable storage medium
CN115694488A (en) Control circuit and correction method applicable to signal converter
US7854544B2 (en) Correction apparatus and clock device using the same
WO2015021868A1 (en) Data processing method and apparatus for internet entity analysis
US20150317940A1 (en) Signal correcting method and signal correcting device
WO2016177239A1 (en) Electric quantity display method and device
US20180211278A1 (en) Information release method, information release apparatus, and storage medium
CN115453321A (en) A calibration method of circuit parameters and automatic calibration equipment
WO2022077228A1 (en) Time alignment method, device and system, and imaging assembly
TWI440279B (en) Electricity consumption measurement apparatus, electricity consumption measurement method, and non-transitory tangible machine-readable medium thereof
CN111562543A (en) Electric energy meter pulse per second error tester and electric energy meter pulse per second error testing method
JP2012058115A (en) Management apparatus, management method, and management program
CN112798860B (en) Electric quantity calculation method and device and multi-split system
TWI484142B (en) A multi-sensing element correction system, a correction method and a recording medium
TWI588696B (en) Touch calibration system and method thereof
CN114237020A (en) Timer calibration method and electronic device

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
TR01 Transfer of patent right

Effective date of registration: 20250522

Address after: 266000 Shandong Province Qingdao City Shibei District Renmin Road 27 Zhenye Business Building 1017

Patentee after: Shandong keyinda Electronic Technology Co.,Ltd.

Country or region after: China

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

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

Country or region before: China

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20250718

Address after: 071023 Hebei Province, Baoding City, No. 723 Cuiyuan Street, Science and Technology Industrial Park, 3rd Floor, H Area, Room 4-9

Patentee after: Hebei Youchen Yikang Information Technology Co.,Ltd.

Country or region after: China

Address before: 266000 Shandong Province Qingdao City Shibei District Renmin Road 27 Zhenye Business Building 1017

Patentee before: Shandong keyinda Electronic Technology Co.,Ltd.

Country or region before: China

TR01 Transfer of patent right