CN111865465B - Accurate time calibration method for Internet of things equipment - Google Patents

Accurate time calibration method for Internet of things equipment Download PDF

Info

Publication number
CN111865465B
CN111865465B CN202010631003.0A CN202010631003A CN111865465B CN 111865465 B CN111865465 B CN 111865465B CN 202010631003 A CN202010631003 A CN 202010631003A CN 111865465 B CN111865465 B CN 111865465B
Authority
CN
China
Prior art keywords
time
calibration
equipment
compensation
nth
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
CN202010631003.0A
Other languages
Chinese (zh)
Other versions
CN111865465A (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.)
Marssenger Kitchenware Co Ltd
Original Assignee
Marssenger Kitchenware 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 Marssenger Kitchenware Co Ltd filed Critical Marssenger Kitchenware Co Ltd
Priority to CN202010631003.0A priority Critical patent/CN111865465B/en
Publication of CN111865465A publication Critical patent/CN111865465A/en
Application granted granted Critical
Publication of CN111865465B publication Critical patent/CN111865465B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0644External master-clock
    • GPHYSICS
    • G04HOROLOGY
    • G04GELECTRONIC TIME-PIECES
    • G04G5/00Setting, i.e. correcting or changing, the time-indication
    • GPHYSICS
    • G04HOROLOGY
    • G04GELECTRONIC TIME-PIECES
    • G04G7/00Synchronisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Abstract

The invention provides an accurate time correction method for Internet of things equipment. The accurate time correction method for the Internet of things equipment comprises the following steps: the equipment is powered on and the cloud server is networked for time calibration, and T is used n Denotes the time of the apparatus at the time of the nth calibration by T n ' represents the cloud server time at the nth calibration, and n is more than or equal to 1; starting from the second calibration, the time interval between two adjacent calibrations of the device is calculated: delta T n =T n ‑T n‑1 (ii) a Calculating the time deviation of the device in the nth calibration: delta T n '=T n '‑T n (ii) a Calculating a compensation coefficient of the nth calibration:
Figure DDA0002568703780000011
in the time period between the nth calibration and the (n + 1) th calibration, the device time is compensated for m times: t is t aft_m =t pre_mn ×ΔT’,m≥1,ΔT’≤ΔT n+1 Wherein Δ T' is a fixed time interval; t is t pre_m For the plant time before the m-th compensation, t aft_m Is the device time after the m-th compensation. The method solves the problem that the equipment operation is wrong or fails due to the fact that the equipment time is prone to large deviation, and improves the accuracy of the equipment time.

Description

Accurate time calibration method for Internet of things equipment
Technical Field
The invention belongs to the technical field of metering calibration, and particularly relates to an accurate time calibration method for Internet of things equipment.
Background
Along with the development of society and the progress of technology, the internet of things equipment is more and more popular, the proportion of intelligent household appliances is more and more big, and intelligent household appliances all have the networking function, and intelligent household appliances include big household appliances, small household appliances, kitchen household appliances and the like. The intelligent household appliance has the functions of remote control, equipment state reporting, timing, alarm clock and the like; while some intelligent functions are implemented by requiring the device to have the correct time, otherwise problems arise, such as device timing 15: 00 is turned on, and if the equipment time deviation is large, errors and faults can be caused.
In fact, a certain deviation occurs in the clock of each device, and the reason for the deviation includes two aspects of hardware consistency and external environment. The hardware of each device has difference, such as a PCB, a device, a crystal oscillator, a process and the like; the external environment including temperature, humidity, etc. may cause different deviations of the clock during operation.
The conventional method for solving the clock skew problem is as follows: the device periodically performs time synchronization calibration to the cloud server time server through the network, for example, the calibration period is 1 day. This solution can solve part of the hour hand deviation problem, but the above solution has the following disadvantages: the device must be kept always connectable to the cloud server, through which the time is constantly calibrated; when the device and the cloud server network cannot be connected, especially when the device and the cloud server are connected for a period of time and the device and the cloud server are always disconnected, the clock error of the device is increased.
Disclosure of Invention
In view of this, the invention aims to provide an accurate time calibration method for internet of things equipment, and the system can effectively improve the clock running accuracy of the internet of things equipment.
The purpose of the invention can be realized by the following technical scheme: an accurate time calibration method for Internet of things equipment is characterized by comprising the following steps:
the equipment is powered on and the cloud server is networked for time calibration, and T is used n Denotes the time of the apparatus at the time of the nth calibration by T n ' represents the cloud server time at the nth calibration, and n is more than or equal to 1;
starting from the second calibration, the time interval between two adjacent calibrations of the device is calculated: delta T n =T n -T n-1
Calculating the time deviation of the device in the nth calibration: delta T n '=T n '-T n
Calculating a compensation coefficient of the nth calibration:
Figure BDA0002568703760000021
in the time period between the nth calibration and the (n + 1) th calibration, the device time is compensated for m times: t is t aft_m =t pre_mn ×ΔT’,m≥1,ΔT’≤ΔT n+1 Wherein Δ T' is a fixed time interval; t is t pre_m For the plant time before the m-th compensation, t aft_m Is the device time after the m-th compensation.
In the method for accurately calibrating the time of the internet-of-things equipment, when the equipment is offline and cannot be networked with the cloud server for calibrating the time, the compensation coefficient eta is used l Compensating for the time of the installation, said compensation factor eta l The compensation coefficient defined as the last time is specifically compensated as follows: t is t aft_m =t pre_ml ×ΔT’。
In the accurate time calibration method for the Internet of things equipment, the temperature acquisition sensor is arranged to acquire the temperature parameter T c Correlating the temperature parameter with the compensation coefficient to obtain a temperature-compensation coefficient relation corresponding table, and obtaining a relation function eta by a function fitting method c =f(T c ),η c For the compensation coefficient at the corresponding temperature, after the device obtains the relation function between the temperature and the compensation coefficient, the function relation eta is followed c =f(T c ) And performing compensation specifically as follows: t is t aft_m =t pre_mc ×ΔT’。
In the above method for accurately calibrating the time of the internet of things equipment, the priority of the compensation coefficient is eta c >η l
Compared with the prior art, the accurate time correction method for the Internet of things equipment has the following advantages: the accurate time correction method for the Internet of things equipment can compensate the equipment time more accurately, effectively reduces the equipment time deviation and avoids errors or faults of the equipment caused by the time deviation. In addition, self-adaptive compensation according to temperature change under the offline state of the equipment can be realized, and the compensation precision is improved.
Drawings
Fig. 1 is a flowchart of an accurate time correction method for internet of things equipment according to an embodiment.
FIG. 2 is a graph of temperature parameters and compensation coefficients for an embodiment.
Detailed Description
The following are specific embodiments of the present invention and are further described with reference to the accompanying drawings, but the present invention is not limited to these embodiments.
The parameters involved are first defined as follows: by T n Denotes the plant time at the time of the nth calibration by T' n Represents the time of the cloud server at the nth calibration, and n is more than or equal to 1
As shown in fig. 1, the device sends a request time calibration to the cloud server from power-on of the device. Recording the time of the equipment in the calibration as T from the calibration of the No. 1 and the cloud server 1 The cloud server time is T 1 ', the time of the device T 1 Time T with cloud server 1 ' is synchronous, with no offset;
when the 2 nd time of the equipment is calibrated with the cloud server, recording the current equipment time as T 2 Cloud server time is T 2 ', calculating the time interval Delta T of two times of calibration 2 =T 2 -T 1 Time deviation of operation of the apparatus Δ T 2 '=T 2 '-T 2 Passing through a time interval Δ T 2 And a time deviation Δ T 2 ', calculating the current compensation coefficient
Figure BDA0002568703760000031
During the time period between the 2 nd and 3 rd calibrations, a compensation factor may be employed
Figure BDA0002568703760000032
The device is time compensated. During this time period, a compensated time interval Δ T '(e.g., 1 hour) is set, and time is compensated every time interval Δ T'. Setting the m-th pre-compensation time as t pre_m Time after compensation is t aft_m And then:
the device time after the 1 st compensation is expressed as: t is t aft_1 =t pre_12 ×ΔT’;
The device time after the 2 nd compensation is expressed as: t is t aft_2 =t pre_22 ×ΔT’;
By analogy, the device time after the nth compensation is expressed as: t is t aft_m =t pre_m2 ×ΔT’。
When the 3 rd time of the equipment is calibrated with the cloud server, recording the current equipment time as T 3 The cloud server time is T 3 ', calculating the time interval Delta T of two times of calibration 3 =T 3 -T 2 Time deviation of operation of the apparatus Δ T 3 '=T 3 '-T 3 Passing through a time interval Δ T 3 And a time deviation Δ T 3 ' calculating the current compensation coefficient
Figure BDA0002568703760000041
Using a compensation factor in the time between the 3 rd calibration and the 4 th calibration
Figure BDA0002568703760000042
Time compensation is carried out on the equipment:
the device time after the 1 st compensation is expressed as: t is t aft_1 =t pre_13 ×ΔT’;
The device time after the 2 nd compensation is expressed as: t is t aft_2 =t pre_23 ×ΔT’;
By analogy, the device time after the nth compensation is expressed as: t is t aft_m =t pre_m3 ×ΔT’。
When the equipment is calibrated with the cloud server for the nth time, recording the current equipment time as T n Cloud server time is T n ', calculating the time interval Delta T of two times of calibration n =T n -T n-1 Time deviation of device operation Δ T' n =T’ n -T n Passing through a time interval Δ T n And a time deviation Δ T n ', calculating the current compensation coefficient
Figure BDA0002568703760000043
Using a compensation factor in the time between the nth calibration and the (n + 1) th calibration
Figure BDA0002568703760000044
Time compensation is carried out on the equipment:
the device time after the 1 st compensation is expressed as: t is t aft_1 =t pre_1n ×ΔT’;
The device time after the 2 nd compensation is expressed as: t is t aft_2 =t pre_2n ×ΔT’;
By analogy, the device time after the nth compensation is expressed as: t is t aft_m =t pre_mn ×ΔT’。
When the equipment is in an off-line state and can not be networked with the cloud server for calibrating time any more, according to the compensation coefficient eta l Compensating the equipment time by a compensation coefficient eta l The compensation coefficient defined as the last time is specifically compensated as follows: t is t aft_m =t pre_ml ×ΔT’。
Example two:
referring to fig. 2, the time deviation of the equipment is related to the working environment of the equipment, so that the temperature acquisition sensor is arranged to acquire the temperature parameter T c Correlating the compensation coefficient with the temperature change, and defining the compensation coefficient at the corresponding temperature after correlation as eta c . The device generates a temperature-compensation coefficient relation corresponding table (taking a temperature interval of 10-100 ℃ as an example) by recording data as follows:
Figure BDA0002568703760000051
then, a graph is drawn on the data in the corresponding table by using MATLAB or similar tools, and the temperature parameter T is obtained by fitting a function c And the compensation coefficient after correlation is eta c Of (d) a relation function eta c =f(T c ) It should be noted that the obtained compensation coefficient is η c Has a priority greater than the compensation coefficient eta l The priority of (2); because different devices have different sensitivities to different temperatures, the relation function eta obtained by fitting c =f(T c ) The function can be a linear function or a curve function, when the calibration times of the equipment and the cloud server are more, the obtained data are more, and the function eta obtained by fitting is more c =f(T c ) The closer to the real situation, the more closely the fitting function η is used c =f(T c ) The more accurate the compensation made for the device time.
After the equipment obtains the relation function between the temperature and the compensation coefficient, the function relation eta is followed c =f(T c ) And performing compensation specifically as follows:
the device time after the 1 st compensation is expressed as: t is t aft_1 =t pre_1c ×ΔT’;
The device time after the 2 nd compensation is expressed as: t is t aft_2 =t pre_2c ×ΔT’;
By analogy, the device time after the nth compensation is expressed as: t is t aft_m =t pre_mc ×ΔT’。
By adopting the method provided by each embodiment of the invention, the time of the equipment can be compensated more accurately, so that the time of the equipment is closer to or even the same as the time of the cloud server, and errors or faults of the equipment caused by larger time deviation are effectively avoided.
The specific embodiments described herein are merely illustrative of the spirit of the invention. Various modifications or additions may be made to the described embodiments or alternatives may be employed by those skilled in the art without departing from the spirit or ambit of the invention as defined in the appended claims.

Claims (3)

1. An accurate time calibration method for Internet of things equipment is characterized by comprising the following steps:
the equipment is powered on and the cloud server is networked for time calibration, and T is used n T 'represents a device time at the time of nth calibration' n Denotes the nth calibrationThe time of the cloud server is n more than or equal to 1;
starting from the second calibration, the time interval between two adjacent calibrations of the device is calculated: delta T n =T n -T n-1
Calculating the time deviation of the device at the nth calibration: delta T n '=T n '-T n
Calculating a compensation coefficient of the nth calibration:
Figure FDA0003730143660000011
in the time period between the nth calibration and the (n + 1) th calibration, the device time is time-revised m times: t is t aft_m =t pre_mn ×ΔT’,m≥1,ΔT’≤ΔT n+1 Wherein Δ T' is a fixed time interval; t is t pre_m For the device time before the m-th revision, t aft_m The mth revised device time;
when the equipment is offline and cannot be networked with the cloud server for calibrating time, the compensation coefficient eta is used l Compensating for the time of the installation, said compensation factor eta l The compensation coefficient defined as the last time is specifically compensated as follows: t is t aft_m =t pre_ml ×ΔT’。
2. The Internet of things equipment accurate timing method according to claim 1, wherein a temperature acquisition sensor is arranged to acquire a temperature parameter T c Correlating the temperature parameter with the compensation coefficient to obtain a temperature-compensation coefficient relation corresponding table, and obtaining a relation function eta by a function fitting method c =f(T c ),η c According to a functional relation eta for compensating coefficient under corresponding temperature parameter c =f(T c ) The equipment time is compensated, specifically as follows: t is t aft_m =t pre_m +f(T c )×ΔT’。
3. The Internet of things device accurate time correction method as claimed in claim 2, wherein the priority of the compensation coefficientIs eta c >η l
CN202010631003.0A 2020-07-03 2020-07-03 Accurate time calibration method for Internet of things equipment Active CN111865465B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010631003.0A CN111865465B (en) 2020-07-03 2020-07-03 Accurate time calibration method for Internet of things equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010631003.0A CN111865465B (en) 2020-07-03 2020-07-03 Accurate time calibration method for Internet of things equipment

Publications (2)

Publication Number Publication Date
CN111865465A CN111865465A (en) 2020-10-30
CN111865465B true CN111865465B (en) 2022-09-02

Family

ID=73152143

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010631003.0A Active CN111865465B (en) 2020-07-03 2020-07-03 Accurate time calibration method for Internet of things equipment

Country Status (1)

Country Link
CN (1) CN111865465B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113271171A (en) * 2021-05-14 2021-08-17 四川虹美智能科技有限公司 Time calibration method, device and computer readable medium
CN114237020B (en) * 2021-12-10 2023-09-26 合肥兆芯电子有限公司 Method for calibrating timer and electronic device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103414532A (en) * 2013-07-24 2013-11-27 上海傲蓝信息科技有限公司 Clock synchronization method
CN108631897A (en) * 2017-03-17 2018-10-09 杭州海康威视数字技术股份有限公司 A kind of correcting time in network method and device
CN110557823A (en) * 2018-05-31 2019-12-10 华为技术有限公司 clock synchronization method and device, terminal equipment, chip and readable storage medium
CN110662285A (en) * 2018-06-29 2020-01-07 中兴通讯股份有限公司 Method and device for configuring timing adjustment information

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107894703A (en) * 2017-11-15 2018-04-10 广东乐心医疗电子股份有限公司 Wearable device time calibration method and wearable device
CN111327385A (en) * 2018-12-13 2020-06-23 阿里巴巴集团控股有限公司 Clock synchronization method, device and equipment of Internet of things equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103414532A (en) * 2013-07-24 2013-11-27 上海傲蓝信息科技有限公司 Clock synchronization method
CN108631897A (en) * 2017-03-17 2018-10-09 杭州海康威视数字技术股份有限公司 A kind of correcting time in network method and device
CN110557823A (en) * 2018-05-31 2019-12-10 华为技术有限公司 clock synchronization method and device, terminal equipment, chip and readable storage medium
CN110662285A (en) * 2018-06-29 2020-01-07 中兴通讯股份有限公司 Method and device for configuring timing adjustment information

Also Published As

Publication number Publication date
CN111865465A (en) 2020-10-30

Similar Documents

Publication Publication Date Title
CN111865465B (en) Accurate time calibration method for Internet of things equipment
US20200328718A1 (en) Systems and methods for frequency compensation of real-time-clock systems
CN101303401B (en) RTC regulating apparatus of electrical energy meter and RTC automatic compensation correcting method
CN108449791B (en) Self-adaptive time synchronization method based on temperature compensation
CN101604970B (en) Self-fitting digital temperature compensation crystal oscillistor and system and realization method thereof
CN107566105B (en) Time synchronization equipment compensation method, device, storage medium and computer equipment thereof
US20120320902A1 (en) Method for Time Synchronization in a Communication Network
CN116125512B (en) PPP self-adaptive clock difference model estimation method considering clock frequency time-varying characteristics
CN103699001A (en) Method and system for realizing low-cost and high-precision timing through oven controlled crystal oscillator
CN103138749A (en) Improved method and improved device for frequency correction
CN110138491B (en) GPS clock compensation method based on generalized weighted least square method
CN109100927B (en) Time autonomous synchronization method of time unified system under traceless reference condition
CN109212560A (en) Method and apparatus for compensating the frequency inaccuracy of the frequency generator of such as oscillator
CN102916654A (en) Crystal oscillator ageing compensation method
Tosato et al. A software-based low-jitter servo clock for inexpensive phasor measurement units
US20130099869A1 (en) System and methods for correcting clock synchronization errors
JP4788260B2 (en) Multivariate transmitter
WO2016100999A1 (en) Method and device for energy-saving external synchronization of clocks in a distributed real-time computer system
CN115856793A (en) Radar signal frequency deviation estimation compensation method
CN112737507B (en) Method for realizing RTC high precision based on temperature sensor
JP6823701B1 (en) Clock regulators, methods, and programs
CN116388913B (en) RTC clock self-calibration method, electronic equipment and storage medium
CN112115079B (en) Method and system for bus cycle synchronization
JP2024011741A (en) Time correction device, time correction method, and time correction system
CN106843246A (en) A kind of duration control method for moving middle imaging attitude planning

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