CN107196725A - Embedded device time service method based on priority - Google Patents

Embedded device time service method based on priority Download PDF

Info

Publication number
CN107196725A
CN107196725A CN201710321282.9A CN201710321282A CN107196725A CN 107196725 A CN107196725 A CN 107196725A CN 201710321282 A CN201710321282 A CN 201710321282A CN 107196725 A CN107196725 A CN 107196725A
Authority
CN
China
Prior art keywords
time
time service
priority
utc
service
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
CN201710321282.9A
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.)
Hefei Shun Shun Information Technology Co Ltd
Original Assignee
Hefei Shun Shun Information Technology 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 Hefei Shun Shun Information Technology Co Ltd filed Critical Hefei Shun Shun Information Technology Co Ltd
Priority to CN201710321282.9A priority Critical patent/CN107196725A/en
Publication of CN107196725A publication Critical patent/CN107196725A/en
Pending legal-status Critical Current

Links

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
    • GPHYSICS
    • G04HOROLOGY
    • G04RRADIO-CONTROLLED TIME-PIECES
    • G04R20/00Setting the time according to the time information carried or implied by the radio signal
    • G04R20/02Setting the time according to the time information carried or implied by the radio signal the radio signal being sent by a satellite, e.g. GPS
    • GPHYSICS
    • G04HOROLOGY
    • G04RRADIO-CONTROLLED TIME-PIECES
    • G04R20/00Setting the time according to the time information carried or implied by the radio signal
    • G04R20/14Setting the time according to the time information carried or implied by the radio signal the radio signal being a telecommunication standard signal, e.g. GSM
    • 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/0658Clock or time synchronisation among packet nodes
    • H04J3/0661Clock or time synchronisation among packet nodes using timestamps
    • H04J3/0667Bidirectional timestamps, e.g. NTP or PTP for compensation of clock drift and for compensation of propagation delays

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Electric Clocks (AREA)

Abstract

The invention discloses a kind of embedded device time service method based on priority, GPS time services priority is set as P1, GSM time services priority is P2, NTP time services priority is P3;After embedded device start, 3 kinds of time service modes initiate work simultaneously, any time service mode is preferentially got after UTC time, was performed as long as no the higher time service method of priority and RTC chip time service is acted, just the storage of this UTC time into embedded RTC chip;If the time service source of high priority gets UTC time, then the time service request of low priority stops the acquisition of time service data immediately, until the time service source of highest priority was got after the time, stops whole time service strategy.The present invention can allow embedded device, and quick obtaining, to the time accuracy highest time service time, is easy to keep between internet of things equipment being in communication with each other synchronization, a reliable basis of time is provided for the logout of equipment in itself after powering.

Description

Embedded device time service method based on priority
Technical field
The invention belongs to embedded device time service method technical field, particularly relate to a kind of based on the embedding of priority Enter formula equipment time service method.
Background technology
Along with Internet of Things, the fast development of car networking technology, requirement more and more higher of the communication terminal to real-time, time service Equipment afterwards can ensure to keep synchronous between each remote terminal, while when the equipment after time service can provide for reduction scene Sequence foundation.The time service principle of embedded product is mainly by the way of GPS on the market at present, the time service method ratio of this mode It is more single, easily influenceed by factors such as weather and environment.
There are three kinds of time service methods, i.e. GPS, GSM and NTP on the market at present.The characteristics of GPS time services is that real-time is higher, number According in transmitting procedure, it is delayed smaller;Have the disadvantage that gps signal is easily influenceed by weather, environment, or even when positioning sometimes Between it is long or positioning failure.The characteristics of GSM time services is that real-time is of a relatively high, in data transmission procedure, is delayed small;Have the disadvantage GSM time services are limited by GSM network operator, and some mobile communication carriers do not provide GSM time services service.The characteristics of NTP time services It is that time real-time is higher, but is limited by GPRS network signal intensity, network delay is longer.For these reasons, now it is badly in need of Develop a kind of embedded device time service method of the quick obtaining to correct time after powering that can allow.
The content of the invention
There is provided a kind of embedded device time service side based on priority in order to overcome the shortcomings of prior art presence by the present invention Time service method in method, the present invention can realize that quick obtaining is to real-time highest UTC time value after embedded device start.
The present invention is achieved by the following technical solutions:A kind of embedded device time service method based on priority, its Comprise the following steps:
1)Define GPS, GSM and NTP time service priority:GPS time services Time priority is set as P1, GSM time service time priorities Level is P2, and NTP time services Time priority is P3;
2)Time service strategy after start:After embedded device start, this 3 kinds of time service modes of GPS, GSM and NTP initiate work simultaneously Make, any time service mode is preferentially got after UTC time, and it is right to be performed as long as no the higher time service method of priority RTC chip time service is acted, just the storage of this UTC time into embedded RTC chip;
3)If the time service source of high priority gets UTC time, then the time service request of low priority stops time service number immediately According to acquisition, flowed with saving data traffic and consumption, until the time service source of highest priority was got after the time, stop whole time service Strategy.
For example, after device power-up, GSM time services preferentially get UTC time, now, if gps time is not got, The UTC time value is then write into RTC chip at once;Meanwhile, stop the request action of NTP time services, to save flow;Later, GPS Time service also successfully gets UTC time, because GPS time service priority is higher, at this time, it may be necessary to which the UTC time is write into RTC cores In piece.Further, since GPS is priority P 1, i.e. limit priority, now whole time service action is terminated.
GPS is the abbreviation of English Global Positioning System (global positioning system).
GSM is English Global System for Mobile communications(Global system for mobile communications)'s Referred to as.
NTP is English Network Time Protocol(NTP)Abbreviation, it is in synchronizing network The agreement of the time of each computer.
UTC is English Coordinated Universal Time(Coordinated Universal Time(UTC))Abbreviation, when also known as the world unifies Between, universal time, international coordination time.
RTC is English Real-Time Clock(Real-time clock)Abbreviation.
The beneficial effects of the invention are as follows:Invention describes a kind of GPS/GSM/NTP based on priority time services simultaneously are former Reason, it is a kind of embedded device time service method based on priority, by the time service method in the present invention, can be allowed embedded Equipment after powering quick obtaining to the time accuracy highest time service time.Pass through the time service method in the present invention, Ke Yishi Quick obtaining is easy to embedded device especially Internet of Things to UTC real-time highest UTC time values after existing embedded device start Between net equipment keep be in communication with each other synchronization, while also the logout for equipment in itself provide a reliable time according to According to.It can be applied to the embedded electronic product of the accurate real-time UTC time of institute's quick offer in need.
Brief description of the drawings
Fig. 1 is the particular flow sheet of the embedded device time service method of the invention based on priority.
Embodiment
Below in conjunction with the drawings and specific embodiments, the present invention is described in detail.
As shown in figure 1, a kind of embedded device time service method based on priority, it comprises the following steps:1)Definition GPS, GSM and NTP time service priority:GPS time services Time priority is set as P1, GSM time services Time priority is P2, NTP Time service Time priority is P3;2)Time service strategy after start:After embedded device start, this 3 kinds of time services of GPS, GSM and NTP Mode initiates work simultaneously, and any time service mode is preferentially got after UTC time, as long as no the higher time service of priority Method was performed to be acted to RTC chip time service, just the storage of this UTC time into embedded RTC chip;3)If Gao You The time service source of first level gets UTC time, then the time service request of low priority stops the acquisition of time service data immediately, to save number Flowed according to flow and consumption, until the time service source of highest priority was got after the time, stop whole time service strategy.
For example, after device power-up, GSM time services preferentially get UTC time, now, if gps time is not got, The UTC time value is then write into RTC chip at once;Meanwhile, stop the request action of NTP time services, to save flow;Later, GPS Time service also successfully gets UTC time, because GPS time service priority is higher, at this time, it may be necessary to which the UTC time is write into RTC cores In piece.Further, since GPS is priority P 1, i.e. limit priority, now whole time service action is terminated.
Finally it should be noted that above content is merely illustrative of the technical solution of the present invention, rather than to present invention protection The limitation of scope, simple modification or equivalent substitution that one of ordinary skill in the art is carried out to technical scheme, All without departing from the spirit and scope of technical solution of the present invention.

Claims (1)

1. a kind of embedded device time service method based on priority, it is characterised in that:Embedded based on priority sets Standby time service method comprises the following steps:
1)Define GPS, GSM and NTP time service priority:GPS time services Time priority is set as P1, GSM time service time priorities Level is P2, and NTP time services Time priority is P3;
2)Time service strategy after start:After embedded device start, this 3 kinds of time service modes of GPS, GSM and NTP initiate work simultaneously Make, any time service mode is preferentially got after UTC time, and it is right to be performed as long as no the higher time service method of priority RTC chip time service is acted, just the storage of this UTC time into embedded RTC chip;
3)If the time service source of high priority gets UTC time, then the time service request of low priority stops time service number immediately According to acquisition, flowed with saving data traffic and consumption, until the time service source of highest priority was got after the time, stop whole time service Strategy.
CN201710321282.9A 2017-05-09 2017-05-09 Embedded device time service method based on priority Pending CN107196725A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710321282.9A CN107196725A (en) 2017-05-09 2017-05-09 Embedded device time service method based on priority

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710321282.9A CN107196725A (en) 2017-05-09 2017-05-09 Embedded device time service method based on priority

Publications (1)

Publication Number Publication Date
CN107196725A true CN107196725A (en) 2017-09-22

Family

ID=59873143

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710321282.9A Pending CN107196725A (en) 2017-05-09 2017-05-09 Embedded device time service method based on priority

Country Status (1)

Country Link
CN (1) CN107196725A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110023778A (en) * 2017-10-12 2019-07-16 华为技术有限公司 A kind of localization method and equipment
CN111310894A (en) * 2020-02-10 2020-06-19 烟台持久钟表有限公司 Large clock source detection method based on NB-IoT
WO2020134810A1 (en) * 2018-12-25 2020-07-02 维沃移动通信有限公司 Methods for acquiring and sending time information, terminal and network device
CN111597100A (en) * 2020-07-24 2020-08-28 成都智明达电子股份有限公司 Embedded system fault log recording and analyzing method
CN112769517A (en) * 2021-01-14 2021-05-07 武汉光庭信息技术股份有限公司 T-BOX time synchronization method and device
CN113271169A (en) * 2021-04-27 2021-08-17 东风汽车集团股份有限公司 Vehicle time service method and system based on wireless communication terminal
CN113890663A (en) * 2021-09-24 2022-01-04 重庆长安新能源汽车科技有限公司 Domain controller time synchronization management method and system and vehicle
CN116243586A (en) * 2023-02-01 2023-06-09 岚图汽车科技有限公司 Vehicle time correction method and related equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2631154Y (en) * 2002-11-08 2004-08-04 上海欣泰通信技术有限公司 Exchange board time supply device
CN103001759A (en) * 2012-11-23 2013-03-27 北京东土科技股份有限公司 Time synchronization method, system and device based on network
CN103580767A (en) * 2012-08-01 2014-02-12 中国移动通信集团公司 Clock synchronization method, device and network element of wireless communication network
CN104601317A (en) * 2014-12-31 2015-05-06 南京大全自动化科技有限公司 Synchronous clock device of FPGA and control method thereof
CN204392263U (en) * 2014-12-31 2015-06-10 南京大全自动化科技有限公司 The Synchronization Clock of a kind of FPGA

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2631154Y (en) * 2002-11-08 2004-08-04 上海欣泰通信技术有限公司 Exchange board time supply device
CN103580767A (en) * 2012-08-01 2014-02-12 中国移动通信集团公司 Clock synchronization method, device and network element of wireless communication network
CN103001759A (en) * 2012-11-23 2013-03-27 北京东土科技股份有限公司 Time synchronization method, system and device based on network
CN104601317A (en) * 2014-12-31 2015-05-06 南京大全自动化科技有限公司 Synchronous clock device of FPGA and control method thereof
CN204392263U (en) * 2014-12-31 2015-06-10 南京大全自动化科技有限公司 The Synchronization Clock of a kind of FPGA

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110023778A (en) * 2017-10-12 2019-07-16 华为技术有限公司 A kind of localization method and equipment
CN110023778B (en) * 2017-10-12 2021-09-14 华为技术有限公司 Positioning method and device
US11474259B2 (en) 2017-10-12 2022-10-18 Huawei Technologies Co., Ltd. Positioning method and device
WO2020134810A1 (en) * 2018-12-25 2020-07-02 维沃移动通信有限公司 Methods for acquiring and sending time information, terminal and network device
CN111310894A (en) * 2020-02-10 2020-06-19 烟台持久钟表有限公司 Large clock source detection method based on NB-IoT
CN111310894B (en) * 2020-02-10 2023-09-05 烟台持久钟表有限公司 NB-IoT based large Zhong Shiyuan detection method
CN111597100A (en) * 2020-07-24 2020-08-28 成都智明达电子股份有限公司 Embedded system fault log recording and analyzing method
CN112769517A (en) * 2021-01-14 2021-05-07 武汉光庭信息技术股份有限公司 T-BOX time synchronization method and device
CN112769517B (en) * 2021-01-14 2024-01-12 武汉光庭信息技术股份有限公司 T-BOX time synchronization method and device
CN113271169A (en) * 2021-04-27 2021-08-17 东风汽车集团股份有限公司 Vehicle time service method and system based on wireless communication terminal
CN113890663A (en) * 2021-09-24 2022-01-04 重庆长安新能源汽车科技有限公司 Domain controller time synchronization management method and system and vehicle
CN116243586A (en) * 2023-02-01 2023-06-09 岚图汽车科技有限公司 Vehicle time correction method and related equipment

Similar Documents

Publication Publication Date Title
CN107196725A (en) Embedded device time service method based on priority
US10334545B2 (en) Synchronizing time among two or more devices
CN102547969B (en) High-accuracy wireless clock synchronization system for power system
MX2020008515A (en) Method and device for data route selection.
WO2020043181A1 (en) Clock synchronization method and apparatus, system, storage medium, and electronic device
WO2013063600A9 (en) Systems and methods for fast initial network link setup
US10165622B2 (en) Method and system for synchronizing communication between nodes in a Bluetooth network
CN104202723A (en) Broadcasting service system and method for position enhanced data
US10750463B2 (en) Method and device for identifying synchronization priority
CN101425887A (en) Time synchronization method used for wireless sensor network
CN110572204B (en) A-GNSS auxiliary data request method in Internet of things
TW202005464A (en) Communication between terminal and base station
CN104079957A (en) Multimedia device synchronous operation method and system
CN103248436A (en) Method for avoiding hidden terminal and exposed terminal of underwater acoustic communication network
CN104516334A (en) Closed-loop control system and method for positive and reverse isolators
CN105553540A (en) Satellite and ground data processing method and device
US10425908B2 (en) Methods and apparatus for enabling spontaneous location determination in a scheduled wireless communication environment
EP4366225A3 (en) Methods for transmitting or receiving data in wireless power transmission system
CN103809552A (en) LIN communication system for vehicle and method for driving slave module
CN107947885B (en) Non-stop layer time synchronization ad hoc network method under a kind of cluster environment
WO2016095526A1 (en) Time service method, apparatus and system, and storage medium
CN110537374B (en) Data sending method, data receiving method, device and equipment
CN104901423B (en) Target wide area phasor differential protecting method during transmission
WO2015042955A1 (en) Synchronization method and apparatus
CN103400502B (en) Based on the traffic signal control system of scene application

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
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20170922