CN111641937B - Communication system, first node, gateway, network server and time synchronization method - Google Patents

Communication system, first node, gateway, network server and time synchronization method Download PDF

Info

Publication number
CN111641937B
CN111641937B CN201910157562.XA CN201910157562A CN111641937B CN 111641937 B CN111641937 B CN 111641937B CN 201910157562 A CN201910157562 A CN 201910157562A CN 111641937 B CN111641937 B CN 111641937B
Authority
CN
China
Prior art keywords
time
gateway
request message
node
network server
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
CN201910157562.XA
Other languages
Chinese (zh)
Other versions
CN111641937A (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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201910157562.XA priority Critical patent/CN111641937B/en
Publication of CN111641937A publication Critical patent/CN111641937A/en
Application granted granted Critical
Publication of CN111641937B publication Critical patent/CN111641937B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W56/00Synchronisation arrangements
    • H04W56/001Synchronization between nodes
    • H04W56/0015Synchronization between nodes one node acting as a reference for the others
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication

Abstract

The invention discloses a communication system, a first node, a gateway, a network server and a time synchronization method. The system comprises: the method comprises the steps that a first node, wherein the time of the first node, namely a reference time, is synchronous with a standard time, the first node sends a first request message, records the first reference time when the first request message is sent, and sends a second request message, wherein the second request message carries the first reference time; and a gateway forwarding the first request message and the second request message to a network server, and calibrating the own time based on a time calibration command from the network server, wherein a first gateway time when the gateway completes the reception of the first request message is added to the first request message. Thereby, time synchronization of the gateway with the reference time is achieved at a lower cost.

Description

Communication system, first node, gateway, network server and time synchronization method
Technical Field
The disclosure relates to the field of communication technologies, and in particular, to a communication system, a first node, a gateway, a network server and a time synchronization method executed by the first node, the gateway and the network server respectively.
Background
With the development of the internet of things, a plurality of wireless technologies are emerging, wherein LoRa (Long Range) technology has been applied to various industries as a low-power-consumption wide-area communication technology with the most development prospect at present due to the characteristics of long distance, low power consumption, multiple nodes and low cost.
In a LoRa network, each gateway periodically transmits a beacon signal to provide a communication service with a certain quality of service to terminal devices supporting it. While the LoRa gateway is running, due to the drift of the gateway clock crystal, the clock calibration needs to be performed regularly (the accuracy is in the ms level). Currently, the LoRa gateways are time calibrated by GPS timing, i.e., each gateway (i.e., each gateway's clock) is slaved to a reference signal (e.g., GPS (global positioning system) radio signal).
However, in an indoor situation, for example, the LoRa gateway cannot receive positioning signals of multiple GPS satellites at the same time because the GPS signals are weak or substantially absent, so that the GPS-based time synchronization mechanism is not suitable for the LoRa gateway disposed indoors. If the outdoor GPS antenna is used for receiving GPS signals, a longer GPS antenna needs to be installed, so that the installation difficulty is high and the cost is high.
Therefore, there is still a need for a solution that can efficiently address time synchronization of indoor LoRa gateways.
Disclosure of Invention
The purpose of the present disclosure is to provide a communication system, a first node, a gateway, a network server and a time synchronization method, which achieve time synchronization between the gateway and a reference time at a lower cost.
According to one aspect of the present disclosure, there is provided a communication system comprising: the method comprises the steps that a first node, wherein the time of the first node, namely a reference time, is synchronous with a standard time, the first node sends a first request message, records the first reference time when the first request message is sent, and sends a second request message, wherein the second request message carries the first reference time; and a gateway forwarding the first request message and the second request message to a network server, and calibrating the own time based on a time calibration command from the network server, wherein a first gateway time when the gateway completes the reception of the first request message is added to the first request message.
Optionally, the first node is adapted to receive a time service signal; and the gateway is not adapted to receive time signals.
Optionally, the first node includes a timing module, receiving a timing signal, so as to synchronize a reference time of the first node with a standard time based on the timing signal; and the gateway does not include the time service module.
Optionally, the time service module is a GPS module, and the time service signal is a satellite signal.
Optionally, the first node or a time service module thereof receiving the time service signal is suitable for being arranged outdoors; and/or the gateway is adapted to be located indoors.
Optionally, the first node can cover at least one gateway, i.e. the at least one gateway can receive the message sent by the first node.
Optionally, the system comprises a plurality of first nodes to cover a plurality of gateways in the communication system.
Optionally, the system may further include: the network server receives the first request message and the second request message and sends a time calibration command to the gateway based on the first reference time and the first gateway time.
Optionally, the system may further include: a second node communicates with the server via the gateway and is time synchronized with the gateway.
Optionally, the communication system is a LoRa communication system.
Optionally, the first node receives a first response message sent by the network server in response to the first request message, acquires the first gateway time carried by the first response message, and evaluates whether time calibration is required for the gateway and/or the effect of time calibration for the gateway previously based on the first reference time and the first gateway time; and/or the first node receives a second response message sent by the network server in response to the second request message, acquires the second gateway time carried by the second response message, and evaluates whether the effect of time calibration on the gateway and/or the effect of time calibration on the gateway before the second gateway is needed or not based on the second reference time and the second gateway time, wherein the second gateway time when the gateway finishes receiving the second request message is added in the second request message.
Optionally, the first node sends the second request message if it determines that time alignment of the gateway is required.
Optionally, the first node sends a third request message and records a third reference time when the first node completes sending the third request message;
the gateway adds a third gateway time when the gateway completes the third request message receiving in the third request message, and forwards the third request message to a network server;
the first node receives a third response message sent by the network server in response to the third request message, acquires the third gateway time carried by the third response message, and evaluates the effect of time calibration on the gateway previously based on the third reference time and the third gateway time and/or whether the time calibration on the gateway is needed again.
According to another aspect of the present disclosure, there is provided a communication system including: the first node is suitable for receiving time service signals, synchronizing the time of the first node, namely the reference time, with the standard time based on the time service signals, and sending a request message, wherein the request message carries the last sending reference time when the first node finishes sending the last request message; the gateway is not suitable for receiving the time service signal, is deployed in the signal coverage area of the first node, can forward the request message to the network server, and calibrates the self time based on a time calibration command from the network server, wherein the gateway adds the current receiving gateway time when the gateway completes the current request message receiving in the request message.
Optionally, the system may further include: the network server receives the request message, records the current gateway receiving time in a memory, and sends a time calibration command to the gateway based on the last transmission reference time extracted from the request message and the last gateway receiving time acquired from the memory.
Optionally, the first node includes a timing module, receiving a timing signal, so as to synchronize a reference time of the first node with a standard time based on the timing signal; and the gateway does not include the time service module.
Optionally, the first node or a time service module thereof receiving the time service signal is suitable for being arranged outdoors; and/or the gateway is adapted to be located indoors.
Optionally, the time service signal includes at least one of: short wave time signals; a long wave time service signal; satellite time service signals; and network and telephony time signals.
According to another aspect of the present disclosure, there is also provided a first node for time synchronization in a communication system, comprising: the time service module is used for receiving time service signals; the communication module is used for sending a first request message and a second request message; and the first control module synchronizes the time of the first node, namely the reference time, with the standard time based on the time service signal, records the first reference time when the communication module finishes sending the first request message, and the second request message carries the first reference time recorded by the first control module.
Optionally, the time service module is a GPS module, and the time service signal is a satellite signal.
Optionally, the communication module receives a first response message sent by the network server in response to the first request message, where the first response message carries a first gateway time when a gateway forwarding the first request message to the network server completes receiving a first request message, the first control module obtains the first gateway time from the first response message, and based on the first reference time and the first gateway time, evaluates whether time calibration of the gateway and/or an effect of previous time calibration of the gateway is required, and/or receives a second response message sent by the network server in response to the second request message, where the second response message carries a first gateway time when a gateway forwarding the second request message to the network server completes receiving a second request message, and the first control module obtains the second gateway time from the second response message, and evaluates whether time calibration of the gateway and/or the effect of previous time calibration of the gateway is required.
Optionally, the communication module further sends a third request message, and receives a third response message sent by the network server in response to the third request message, where the third response message carries a third gateway time when the gateway forwarding the third request message to the network server completes receiving the third request message, and the first control module obtains the third gateway time from the third response message, and evaluates whether time calibration is needed for the gateway and/or an effect of previous time calibration for the gateway based on the third reference time and the third gateway time.
Optionally, the first node may further include: and the wake-up module is periodically started to wake up the first node, so that the gateway in the coverage area of the first node is time-synchronized.
Optionally, the first node may further include: and the dormancy module is used for enabling the first node to enter a dormancy state in response to the fact that all gateways in the coverage area of the first node realize the reference time synchronization with the first node.
Optionally, the communication module is a LoRa module; and/or the time service module is adapted to be arranged outdoors.
According to another aspect of the present disclosure, there is also provided a time synchronization method performed at a first node, including: synchronizing a time of the first node, i.e., a reference time, with a standard time based on a time service signal; transmitting a first request message and recording a first reference time when the first request message is transmitted; and sending a second request message, wherein the second request message carries the first reference time.
Optionally, the method may further include: receiving a first response message sent by a network server in response to the first request message, wherein the first response message carries a first gateway time when a gateway forwarding the first request message to the network server completes first request message receiving, acquiring the first gateway time from the first response message, and evaluating whether time calibration on the gateway and/or the effect of time calibration on the gateway previously are required or not based on the first reference time and the first gateway time; and/or receiving a second response message sent by the network server in response to the second request message, wherein the second response message carries a second gateway time when a gateway forwarding the second request message to the network server completes receiving the second request message; and acquiring the second gateway time from the second response message, and evaluating whether time calibration of the gateway and/or the effect of time calibration of the gateway is needed or not based on the second reference time and the second gateway time.
According to another aspect of the present disclosure, there is also provided a gateway including: the first communication module is used for communicating with a first node, receiving a first request message and a second request message sent by the first node, wherein the time of the first node, namely the reference time, is synchronous with the standard time, and the second request message carries a first reference time when the first node finishes sending the first request message; a second communication module, configured to communicate with a network server, forward the first request message and the second request message from the first node to the network server, and receive a time calibration command from the network server; and the second control module is used for adding a first gateway time when the first communication module finishes receiving the first request message in the first request message forwarded to the network server, and calibrating the gateway time of the gateway in response to the time calibration command.
Optionally, the gateway is not adapted to receive time signals.
Optionally, the gateway does not include a time service module for receiving a time service signal; or the gateway cannot receive the time service signal.
Optionally, the second communication module receives a first response message sent by the network server in response to the first request message, the first response message carries a first gateway time when a gateway forwarding the first request message to the network server completes the first request message reception, and the first communication module forwards the first response message to the first node; and/or the second communication module receives a second response message sent by the network server in response to the second request message, the second response message carries a second gateway time when a gateway forwarding the second request message to the network server completes receiving the second request message, and the first communication module forwards the second response message to the first node.
According to another aspect of the present disclosure, there is also provided a time synchronization method performed in a gateway, including: receiving a first request message sent by a first node, wherein the time of the first node, namely the reference time, is synchronous with the standard time; adding a first gateway time when the first request message is received into the first request message; forwarding a first request message added with a first gateway time to a network server; receiving a second request message sent by a first node, wherein the second request message carries a first reference time when the first node finishes sending the first request message; forwarding the second request message to the network server; and calibrating a gateway time of the gateway in response to a time calibration command from the network server.
Optionally, the method may further include: forwarding a first response message sent by the network server in response to the first request message to the first node, wherein the first response message carries a first gateway time when a gateway forwarding the first request message to the network server completes first request message reception; and/or forwarding a second response message sent by the network server in response to the second request message to the first node, wherein the second response message carries a second gateway time when a gateway forwarding the second request message to the network server completes receiving the second request message.
According to another aspect of the present disclosure, there is also provided a network server including: the network communication module is used for communicating with a gateway, receiving the first request message and the second request message forwarded by the gateway from a first node, sending a time calibration command to the gateway, wherein the time of the first node, namely the reference time, is synchronous with the standard time, the first request message carries first gateway time when the gateway finishes receiving the first request message, and the second request message carries first reference time when the first node finishes sending the first request message; and a processing module that generates the time alignment command based on the first reference time and the first gateway time.
Optionally, in response to the first request message, the network communication module sends a first response message to the first node via a gateway, the first response message carrying the first gateway time; and/or in response to the second request message, the network communication module sends a second response message to the first node via a gateway, wherein the second response message carries the second gateway time, and the second request message is added with the second gateway time when the gateway completes the second request message reception.
Optionally, the method may further include: and the storage module is used for storing the first gateway time in association with the gateway.
According to another aspect of the present disclosure, there is also provided a time synchronization method performed in a network server, including: receiving a first request message forwarded by a gateway from a first node, wherein the time of the first node, namely the reference time, is synchronous with the standard time, and the first request message carries first gateway time when the gateway finishes receiving the first request message; receiving a second request message forwarded by a gateway from a first node, wherein the second request message carries a first reference time when the first node finishes sending the first request message; generating a time alignment command based on the first reference time and the first gateway time; and sending the time alignment command to the gateway.
Optionally, the method may further include: transmitting a first response message to the first node via a gateway in response to the first request message, the first response message carrying the first gateway time; and/or responding to the second request message, sending a second response message to the first node, wherein the second response message carries the second gateway time, and the second request message is added with the second gateway time when the gateway finishes receiving the second request message.
Therefore, through the technical scheme disclosed by the disclosure, the time synchronization of the gateway can be realized at lower cost only through simple hardware equipment and a network server simple algorithm without modifying a communication protocol and a command or complex hardware equipment. The technical scheme has no limitation on the hardware function of the gateway, the node can work in a plurality of modes, can be compatible with active and passive modes, and is easy to install and time.
Drawings
The foregoing and other objects, features and advantages of the disclosure will be apparent from the following more particular descriptions of exemplary embodiments of the disclosure as illustrated in the accompanying drawings wherein like reference numbers generally represent like parts throughout exemplary embodiments of the disclosure.
Fig. 1 shows a schematic diagram of a communication system according to one embodiment of the present disclosure.
Fig. 2 illustrates an example deployment configuration of a communication system according to one embodiment of the present disclosure.
Fig. 3 illustrates a simplified flow diagram of message transmission and reception of a time synchronization mechanism according to one embodiment of the present disclosure.
Fig. 4 shows a gateway time synchronization flow diagram according to one embodiment of the present disclosure.
Fig. 5 illustrates a second time synchronization flow diagram according to one embodiment of the present disclosure.
Fig. 6 shows a flow diagram of a time synchronization method according to one embodiment of the present disclosure.
Fig. 7 shows a flow diagram of a time synchronization method according to one embodiment of the present disclosure.
Fig. 8 shows a flow diagram of a time synchronization method according to one embodiment of the present disclosure.
Detailed Description
Preferred embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While the preferred embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
LoRa is a low-power consumption local area network wireless standard, and is used in various industries as a low-power consumption wide area communication technology with the most development prospect at present due to the characteristics of long distance, low power consumption, multiple nodes and low cost. The LoRaWAN is an open standard, and defines a communication protocol of the LPWAN technology based on the LoRa chip.
The LoRa gateway is a communication base station responsible for nodes and a core network under the LoRaWAN system. In a LoRa network, each gateway periodically transmits a beacon signal to provide a communication service with a certain quality of service to the node devices supporting it (i.e., the ordinary LoRa nodes as described below). When the LoRa gateway is running, due to the drift of the gateway clock crystal, the clock calibration needs to be performed regularly (the precision is in the ms level).
The LoRa gateways are currently time-aligned by GPS (Global Positioning System ) timing, i.e. the clock of each gateway is synchronized with GPS standard time. However, in some scenarios, such as indoor scenarios or mountain scenarios, the LoRa gateway cannot receive positioning signals of multiple GPS satellites at the same time due to weak or substantially no GPS signals, and the GPS-based time synchronization mechanism is not suitable for the LoRa gateway in these scenarios. If the outdoor GPS antenna is connected to receive GPS signals, a longer GPS antenna needs to be installed for the gateway, so that the installation difficulty and the cost are high.
In view of this, the present disclosure proposes a communication system and a time synchronization mechanism executed by the same, where the communication system does not need to modify communication commands or protocols, and does not need complex hardware design, and can solve the problem of gateway time synchronization at a lower cost only by laying simple hardware devices and using a simple algorithm of a core network. The scheme has no limitation on the gateway hardware function, and the distributed hardware equipment can be compatible with various working modes, and has lower installation difficulty and lower cost.
The communication system and time synchronization mechanism may be adapted to a variety of communication technologies and communication protocols or commands upon which it is based. In one embodiment, the communication system of the present disclosure may be a LoRa communication system, where related communication devices, such as a gateway, a network server, a first node, a second node, etc., described below, may each include a LoRa chip, such that the communication system may implement communication based on the communication protocol of the LoRa LPWAN technology. The wireless communication technology on which the communication system of the present disclosure is based will be exemplified by the LoRa technology as follows, and the communication system and the time synchronization mechanism of the present disclosure will be described in detail with reference to the drawings and embodiments.
Fig. 1 shows a schematic diagram of a communication system according to one embodiment of the present disclosure.
As shown in fig. 1, a communication system 100 of the present disclosure may include a first node 110, a gateway 120, a network server 130, and a second node 140, each of which is described below as well as its respective functional implementation.
First node 110
The first node 110 may also be referred to as a "time reference node" and its own time can be synchronized with a standard time, referred to as a "reference time" in this disclosure. The reference time can be used to calibrate the gateway time of the gateway in the coverage of its radio signal. The first node 110 may include a timing module 111, a communication module 112, and a first control module 113.
The first node 110 may synchronize its own time with the standard time through the timing module 111. In one embodiment, the timing module 111 is adapted to receive the timing signal and synchronize the time of the first node with the standard time based on the received timing signal. The term "time service" refers to a process of broadcasting a standard time signal by using radio waves, and may also be referred to as "time service". According to different time service means, the time service signals can comprise short wave time service signals, long wave time service signals, satellite time service signals, network and telephone time service signals and the like.
In a preferred embodiment, the timing module of the first node 110 may be a GPS module, and the received timing signal may be a satellite signal (also referred to as a GPS signal), and the first node may synchronize with the standard time based on the satellite signal. This can avoid the influence of the network or the like to some extent, and thus improve the time accuracy of the reference time of the first node.
As an example, in the LoRa network, the time service module may be a GPS module, the received time service signal is a satellite signal (may also be referred to as a GPS signal), the time service module 111 may be capable of receiving the GPS signal, and the first control module 113 may be capable of synchronizing the reference time of the first node with the GPS standard time based on the GPS signal. The GPS module may include a GPS antenna or a GPS signal microprocessor with a certain computing power, for example, so as to achieve accurate synchronization of the reference time and the GPS standard time. In other embodiments of the present disclosure, the first node may also achieve synchronization between its own time and the standard time through other time synchronization mechanisms, which is not limited in this disclosure, and the specific time synchronization mechanism synchronized with the standard time is not described herein.
The communication module 112 can send a request message, and the first control module 113 can record the reference time of the first node when the communication module 112 completes sending the request message, so as to calibrate the gateway time.
Wherein the request message may be sent for the purpose of obtaining a gateway time of the gateway. A plurality of gateways within the coverage area of the first node are capable of receiving the request message and forwarding the request message to the network server. The communication module 112 is capable of receiving a response message from the network server in response to the request message, which may carry a gateway time when the gateway forwarding the request message to the network server completes the receipt of the request message. In this way, the first node can determine whether calibration of the gateway time is required by evaluating the time difference between the gateway time and the reference time.
In one embodiment, the communication module 112 may send a first request message and a second request message, respectively, and the first control module may be capable of recording a first reference time corresponding to the first request message and a second reference time corresponding to the second request message, respectively. Wherein the first request message may be aimed at acquiring a gateway time of the gateway and the second request may be aimed at calibrating the gateway time.
Specifically, the first control module may obtain a first gateway time from the first response message, and may evaluate whether time calibration of the gateway is required based on the first reference time and the first gateway time. In the case that the gateway time calibration is required, the communication module may send a second request message, where the first control module may add the first reference time to the second request message so that the sent second request message carries the first reference time recorded by the first control module. Therefore, the network server can know the time difference between the gateway time and the reference time of the first node, and the gateway time can be calibrated conveniently.
In addition, if the gateway time is calibrated immediately before the first request message, the first control module may evaluate the effect of previously time calibrating the gateway based on the first reference time and the first gateway time after obtaining the first gateway time from the first response message. Thereby, the time difference between the gateway time and the reference time is evaluated. The communication module may also send a third request message if the calibration of the gateway time fails to reach a reasonable range.
The first control module can record a third reference time when the third request message is sent, and can receive a third response message sent by the network server in response to the third request message. The third response message carries a third gateway time when the gateway forwarding the third request message to the network server completes the third request message reception. The first control module obtains the third gateway time from the third response message, and may evaluate whether time calibration of the gateway and/or an effect of previous time calibration of the gateway is required based on the third reference time and the third gateway time.
Thus, the first node may calibrate and synchronize the gateway time of the gateway in its coverage area by sending the request message multiple times. Compared with the existing time synchronization mechanism based on a NTP (Network Time Protocol) server, the time synchronization mechanism is free from the influence of a network, has higher calibration precision, can meet the time calibration requirement of the gateway even in a scene of poor network, and can realize the time calibration of the gateway in various scenes at lower cost and cost.
In addition, in order to reduce power consumption of the hardware device, the first node 110 may include a sleep module and a wake module (not shown in the drawing).
The dormancy module can make the first node enter a dormant state or make a communication module of the first node for sending the request message enter the dormant state under the condition that all gateways in the coverage area of the first node realize synchronization with the reference time of the first node. And the awakening module is periodically started to awaken the first node or the communication module of the first node for sending the request message, so that the gateway in the coverage area of the first node is time-synchronized.
Thus, with the first node of the present disclosure, time alignment of gateways in various scenarios can be achieved at lower cost and expense.
Gateway 120
Gateway 120 may be a relay base station responsible for communication between a second node (e.g., a terminal device node) and a network server (i.e., a core network) under the communication architecture.
In some scenarios, the gateway time of the gateway may also be used to calibrate the device time of the terminal device. For example, in a LoRa network (which gateway may also be referred to as a LoRa gateway), each LoRa gateway periodically transmits beacon signals to provide communication services with a certain quality of service to the terminal devices supporting it (terminal devices within coverage of the LoRa gateway).
While the LoRa gateway is running, due to the drift of the gateway clock crystal, the clock calibration needs to be performed regularly (the accuracy is in the ms level). If the gateway time of the gateway cannot be synchronized with the standard time, the communication quality of the terminal devices in the coverage area of the gateway is affected.
If the gateway itself receives the time service signal to synchronize itself time with the standard time, due to the influence of the coverage area of the time service signal or the network, the time precision of the gateway time will be affected under the condition that the time service signal cannot be covered or the time service signal is weak or the network is bad, so as to affect the communication quality of the terminal equipment in the coverage area, and bring very bad communication experience to the user.
Thus, in the embodiments of the present disclosure, it is proposed to calibrate the gateway time of the gateway by taking the time of the first node 110 as the reference time as described above.
To avoid that the gateway time accuracy is affected by the network and to reduce the deployment difficulty of the communication system of the present disclosure, in one embodiment, the first node 110 may be configured to receive the time service signal so that its time, i.e. the reference time, is synchronized with the standard time, and the gateway is not adapted to receive the time service signal, or the gateway is not able to directly synchronize with the standard time.
Wherein the first node may synchronize with the standard time in any of the ways as described before. For the gateway, the gateway can not be directly synchronous with the standard time through setting the hardware equipment of the gateway or setting the deployment position. For example, the gateway is located in a place where the time service signal cannot cover or the time service signal is weak, such as an indoor place or a mountain area, and cannot receive the time service signal, or the gateway does not have a module that directly synchronizes with the standard time, for example, does not include the time service module (for example, a GPS module or a GPS signal receiving antenna) as described above.
In one embodiment, the gateway 120 may act as a relay base station for communications between the first node 110 and the network server 130, and the gateway 120 may include a first communication module 121, a second communication module 122, and a second control module 123.
The first communication module 121 may communicate with the first node 110 and be capable of receiving a first request message and a second request message transmitted by the first node 110. The time of the first node, that is, the reference time is synchronized with the standard time, and the second request message may carry the first reference time when the first node completes the sending of the first request message.
The second communication module 122 may be in communication with the web server 130 and may be capable of forwarding the first request message and the second request message from the first node to the web server. And, the second control module 123 may add the first/second gateway time when the first communication module completes the reception of the first/second request message to the first/second request message forwarded by the second communication module 122 to the network server, so that the network server can know the gateway time.
Also, the second communication module 122 may also receive a first response message issued by the network server in response to the first request message, and the first communication module may forward the first response message to the first node. The first response message may carry a first gateway time when the gateway forwarding the first request message to the network server completes receiving the first request message. By carrying the gateway time in the response message, the first node can know the gateway time, and by comparing the gateway time with the reference time, the effect of whether the gateway needs to be time-calibrated and/or the effect of the gateway which is time-calibrated previously can be evaluated.
In another embodiment, the second communication module may further receive a time calibration command from the network server when the gateway time is to be calibrated, and calibrate the gateway time of the gateway in response to the time calibration command. The time calibration command from the network server may include a gateway identifier (e.g., a gateway number) that needs to be calibrated for gateway time and a time difference between the gateway time and the reference time of the gateway. The gateway needing to perform time calibration can calibrate the gateway time of the gateway according to the time difference value after receiving the time calibration command, and increase or decrease the corresponding time difference on the basis of the gateway time of the gateway so as to enable the gateway time of the gateway to be synchronous with the reference time as much as possible.
Network server 130
The Network Server 130, which may also be referred to as a "core Network", has a strong communication capability and processing capability, is capable of providing services externally through the Network, and is capable of providing computing services for the communication system.
The network server 130 may include a network communication module 131 and a processing module 132.
The network communication module 131 may communicate with the gateway and may receive a request message forwarded by the gateway from the first node, and may also send a response message to the gateway in response to the request message and cause the gateway to forward the response message to the first node.
The processing module 132 is capable of obtaining the reference time of the first node and the gateway time of the gateway, respectively, from the request message forwarded via the gateway, and determining whether the gateway time needs to be calibrated by evaluating a time difference between the gateway time of the gateway and the reference time of the first node.
The network communication module 131 may receive a first request message and a second request message forwarded by the gateway from the first node, where the first request message may carry a first gateway time when the gateway receives the first request message, and the second request message may carry a first reference time recorded when the first node completes sending the first request message, and the processing module may obtain the first reference time and the first gateway time, and determine whether to calibrate the gateway time by evaluating the first gateway time and the first reference time. Further, in the case that the gateway needs to be time-calibrated, the processing module may further generate a time calibration instruction based on the first reference time and the first gateway time, and the network communication module 131 may send the time calibration instruction to the corresponding gateway to perform time calibration.
In one embodiment, the network server may include a storage module. The storage module may store a first gateway time in association with a gateway (e.g., gateway identification). When the network communication module receives the second request message forwarded by the gateway, the processing module may acquire the first gateway time from the storage module, and determine whether the gateway time needs to be evaluated and whether a time calibration instruction needs to be generated by comparing and calculating a difference between the first gateway time and a first reference time carried in the second request message.
In one embodiment, in one calibration procedure, the request message sent by the first node can be received and forwarded by the plurality of gateways, and the network server 130 can receive the request message forwarded by the plurality of gateways and can evaluate the time difference between the gateway time of the plurality of gateways and the reference time of the first node, thereby enabling the evaluation of the gateway time of the plurality of gateways and the time calibration in one calibration procedure.
In another embodiment, in response to the first/second request message, the network communication module 131 may send a first/second response message to the first node via a gateway, the first/second response message carrying the first/second gateway time. Thereby enabling the first node to learn the gateway time to facilitate determining whether the gateway time requires calibration. The effect of the previous gateway time calibration may also be evaluated if the gateway time calibration has just been performed before.
The web server 130 of the present disclosure can implement the above functions through a simple algorithm, and does not need to perform additional expansion in message interaction, so that gateway time estimation and time calibration in various scenarios can be implemented at low cost and expense.
Second node 140
The second node 140 may be a terminal node under the communication system and may correspond to a computer, a workstation, a terminal device, a network device, a terminal application, etc. And the second node has a network communication function capable of communicating with a network server, e.g. via an air interface wireless signal, via a gateway to provide the relevant communication server or network service to the user.
It should be appreciated that throughout this disclosure, the descriptions of "first" and "second," etc., are intended to distinguish between the descriptive objects, and not to provide any explicit or implicit specification of the order or size or function thereof. And wherein the first node of the present disclosure may also be a terminal node under the communication system, i.e. may be a second node, and the two may differ only in that the intersection of the first node with the second node adds a module (e.g. a GPS module as described above) for synchronization with the standard time.
The time of the second node may be calibrated based on the gateway time, i.e. synchronized with the gateway time. The second node may also obtain the gateway time carried in the message by sending the request message and receiving a response message of the network server forwarded by the gateway in response to the request message. Further, the time difference between the self time and the gateway time is evaluated to calibrate the self time.
The time calibration of the second node may be similar to the gateway time calibration of the gateway, and the two may differ only in that the second node may directly perform the time calibration by the acquired gateway time and the time difference of the second node time recorded when the message transmission is completed, without transmitting a time calibration instruction by the network server. The time calibration procedure of the second node will be described in detail below in connection with an application example, and will not be described in detail here.
Thus, the communication system of the present disclosure and the first node, gateway, network server, second node, etc. therein are described by way of example, respectively. Based on the communication system, not only good network service can be provided for users, but also reference time synchronization, gateway time synchronization and second node time synchronization can be realized respectively with lower cost, lower implementation difficulty, simplicity and convenience.
In the embodiment of the disclosure, the communication system, particularly the first node and/or the gateway in the communication system, can be deployed through reasonable layout under the required application scene, so that the communication system can provide good network service for users and can realize time calibration for the gateway. Based on the deployed communication system, the time synchronization mechanism is less influenced by the network and has high precision, and the accurate calibration of gateway time can still be realized when the network is not good.
In one embodiment, the communication system may also be deployed based on existing already deployed communication systems. In the case that the existing communication system, particularly the gateway in the communication system, is already deployed, the corresponding first node can be reasonably deployed in association with a plurality of gateways, and other complex hardware devices are not needed, so that the communication system of the disclosure can be realized with low cost and low implementation difficulty. In the case that the existing gateway includes a time service module, the time service module may be removed or the function of the existing time service module may be turned off, so that the gateway is not suitable for receiving the time service signal.
The communication system may also be suitable for indoor scenarios. At this time, in order to ensure good communication of each party in the communication system and to ensure good operation of the time synchronization mechanism, the first node or its time service module (e.g., GPS module or GPS signal receiving antenna) may be disposed outdoors and the gateway may be disposed indoors when the communication system is deployed. Thus, the first node receives the GPS signal without being influenced by a wall or other shielding object, so that the synchronization of the reference time and the standard time of the first node is ensured to a certain extent.
Moreover, the communication system disclosed by the invention is suitable for different wireless communication technologies, and can be compatible with multiple working modes such as a LoRa class a\b\c mode, an active mode, a passive mode and the like.
In view of the fact that the communication system of the present disclosure can be simply implemented through reasonable layout under different communication protocols and different application scenarios, the communication system of the present disclosure and the time synchronization mechanism that can be implemented by the communication system of the present disclosure will be described in detail below with the LoRa technology as an example of a wireless technology and the indoor scenario as an example of an application scenario.
The communication system may include a first node adapted to receive a time service signal, synchronize a time of the first node, that is, a reference time, with a standard time based on the time service signal, and be capable of sending a request message, where the request message carries a last sending reference time when the first node completes sending a last request message; the gateway is not suitable for receiving the time service signal, is deployed in the signal coverage area of the first node, can forward the request message to the network server, and calibrates the self time based on a time calibration command from the network server, wherein the gateway adds the current receiving gateway time when the gateway completes the current request message receiving in the request message. Optionally, the time service signal includes at least one of: short wave time signals; a long wave time service signal; satellite time service signals; and network and telephony time signals.
Optionally, the communication system may further include: the network server receives the request message, records the current gateway receiving time in a memory, and sends a time calibration command to the gateway based on the last transmission reference time extracted from the request message and the last gateway receiving time acquired from the memory.
Optionally, the first node or a time service module thereof receiving the time service signal is suitable for being arranged outdoors; and/or the gateway is adapted to be located indoors. Fig. 2 illustrates an example deployment configuration of a communication system according to one embodiment of the present disclosure. The communication system is a LoRa communication system, wherein some hardware devices such as a first node, a gateway and a second node are provided with LoRa chips, and communication protocols of LoRa WAN technology based on LoRa realize respective communication.
As shown in fig. 2, some hardware devices in the communication system of the present disclosure, e.g., a first node, gateway, second node, may be deployed based on indoor space 20. Wherein the first node (1) or its GPS signal receiving antenna is adapted to be located outdoors, and the LoRa gateway (2) is adapted to be located indoors. The deployment of the second node (3) is not limited, and it may be deployed indoors or outdoors. And the radiation range of the radio signal of the first node can cover at least one gateway, i.e. at least one gateway can receive the message sent by the first node.
Fig. 2 shows for ease of illustration only a single first node and its 3 gateways that can be covered (corresponding gateway numbers a, b, c, respectively). It should be understood that the communication system of the present disclosure may include, but is not limited to, one first node, and the number of gateways that the first node can cover is not limited to 3. The communication system may include a plurality of first nodes so as to cover a plurality of gateways in the communication system, and the number or deployment structure of the first nodes and the gateways may be reasonably arranged according to needs or respective signal transmitting or receiving ranges thereof, which is not limited by the present disclosure.
Fig. 3 illustrates a simplified flow diagram of message transmission and reception of a time synchronization mechanism according to one embodiment of the present disclosure.
Wherein the message sending and receiving mechanisms involved in the figure may be applied to the first node and the second node as described before, and the difference may be that the first node sends a request message for calibrating the gateway time, and the second node sends a request message for calibrating its own time, and the information carried in the messages sent by each is different.
Referring to fig. 3, on the basis of the layout structure shown in fig. 2, in step S301, the first node or the second node can transmit a request message (DeviceTimeReq); in step S302, when the DeviceTimeReq command transmission is completed, the first node or the second node records its current node time t1, respectively. And wherein DeviceTimeReq and DeviceTimeAns are mac commands defined for lorewann 1.0.3 to complete synchronization of the second node to the gateway time or the gateway to the reference time of the first node.
In step S303, the gateway can receive the request message sent by the first node or the second node, and record the current gateway time t2 of the gateway when the DeviceTimeReq data reception is completed.
In step S305, the gateway reports the DeviceTimeReq command to the Network Server (NS). The gateway time t2 when the gateway completes the reception of the DeviceTimeReq data is added in the packet of the DeviceTimeReq command.
In step S306, the NS records time information included in the received request message, for example, gateway time t2. In step S307, in response to the DeviceTimeReq request sent by the first node or the second node, a corresponding response message, i.e. DeviceTimeAns reply, is sent to the first node or the second node, where the DeviceTimeAns reply includes the gateway time t2 when the gateway completes the DeviceTimeReq data reception.
In step S308, the gateway receives the DeviceTimeAns reply from the network server and forwards the DeviceTimeAns reply to the first node or the second node.
After the first node or the second node completes the devicetime ans reception, it records its own current time t3 and records the gateway time t2 acquired from the devicetime ans response in step S309.
Thus, based on the above-described message sending and receiving mechanism, the first node or the second node enables its own time information to be delivered, and can learn the time information of other devices (e.g., gateway) from the received message.
The difference is that, after the first node obtains the gateway time, by calculating the reference time of the first node and the time difference between the gateway times, it can be determined whether the gateway time needs to be calibrated, and whether the request message is sent, so as to synchronize the gateway time with the reference time of the first node. And the second node can calibrate its own time directly according to the time difference between the second node and the gateway time after acquiring the gateway time, so that its own time is synchronous with the gateway time. Thus, the method and the device facilitate the realization of relevant time calibration in different time calibration flows based on different time synchronization mechanisms.
For the sake of clarity of the time synchronization schemes of the present disclosure for different hardware devices, the time synchronization process of the gateway time synchronization of the gateway with the reference time of the first node and the time synchronization process of the second node with the gateway time will be described below with reference to the flowcharts of fig. 4 and 5, respectively.
Fig. 4 shows a gateway time synchronization flow diagram according to one embodiment of the present disclosure. The process is to synchronize the LoRa gateway to the reference time of the first node, i.e. calibrate the LoRa gateway time by the time of the first node, i.e. the reference time (already synchronized to the standard time).
Referring to fig. 4, the first node transmits a DeviceTimeReq request, which is a first request message, at step S401, and records a first reference time Tj (N-1) when the first request message transmission is completed at step S402.
In step S403, the LoRa gateway receives the first request message and records the current gateway time, i.e., the first gateway time Tg (N-1), when the DeviceTimeReq data reception is completed.
In step S405, the gateway reports the DeviceTimeReq command to the Network Server (NS). The data packet of the DeviceTimeReq command is added with a time Tg (N-1) when the gateway completes the reception of DeviceTimeReq data.
In step S406, the NS records a first gateway time Tg (N-1) at the NS in response to the DeviceTimeReq request sent by the first node. And sends a corresponding response message, namely a DeviceTimeAns response, to the first node, wherein the DeviceTimeAns response comprises the time Tg (N-1) when the gateway finishes DeviceTimeReq data reception.
The gateway receives the DeviceTimeAns response from the web server at step S407, and forwards the DeviceTimeAns response to the first node at step S408.
In step S409, the first node completes devicetime ans reception and records its current reference time and the first gateway time Tg (N-1) acquired from the first response message. Thereafter, the first reference time Tj (N-1) and the first gateway time Tg (N-1) are evaluated to determine whether calibration of the gateway time is required. Here, unlike the second node, the first node, after acquiring the first gateway time, does not calibrate the time of the first node based on the first gateway time, but knows the time difference between the gateway time and the reference time through the first reference time and the first gateway time, and this time difference can be used as a check on the gateway time, when the time difference between the gateway time and the reference time is not within a reasonable range, it can be determined that the calibration on the gateway time is required, and the first node will initiate time synchronization, that is, send the second request message.
In the case that the gateway time needs to be calibrated, in step S410, the first node sends a second request message, i.e. a DeviceTimeReq request, where the second request message carries a first reference time Tj (N-1) when the first node completes sending the first request message.
In step S411, the first node records a second reference time Tj (N) when the transmission of the second request message is completed.
In step S412, the LoRa gateway receives the second request message and records the current gateway time, i.e., the second gateway time Tg (N), when the DeviceTimeReq data reception is completed.
In step S413, the gateway reports the DeviceTimeReq command to the Network Server (NS). The time Tg (N) when the gateway completes the reception of the DeviceTimeReq data is added to the packet of the DeviceTimeReq command.
In step S414, the NS records the second gateway time Tg (N) and the first reference time Tj (N-1) at the NS in response to the DeviceTimeReq request transmitted by the first node.
And in step S415, a corresponding response message, namely a DeviceTimeAns response is sent to the first node, where the DeviceTimeAns response includes the time Tg (N) when the gateway completes the DeviceTimeReq data reception, and in step S416, the gateway forwards the DeviceTimeAns response to the first node, so that the first node can know the gateway time (the procedure is the same and will not be repeated here).
Meanwhile, in step S417, the NS calculates a time difference Δt of the gateway time from the reference time based on the first gateway time Tg (N-1) locally recorded therein and the first reference time Tj (N-1) acquired from the second request message (N-1) =tj (N-1) -Tg (N-1). And at the time difference Deltat (N-1) When the time is not within the reasonable range, the time calibration of the gateway is judged to be needed, and at the moment, the NS generates a time calibration instruction SetGWTimeOffset for the gateway needing time calibration, wherein the time calibration instruction can comprise the gateway identification of the gateway needing time calibration and the time difference.
In step S418, the NS transmits the time alignment instruction SetGWTimeOffset. In step S419, the gateway receives a time alignment instruction from the network server, and performs time alignment in response to the time alignment instruction.
The first node may then also send a third request message to evaluate the effect of previous time alignment of the gateway.
And the first node sends a third request message and records a third reference time when the first node completes sending the third request message. The gateway adds a third gateway time when the gateway completes the third request message reception in the third request message, and forwards the third request message to the network server. The first node receives a third response message sent by the network server in response to the third request message, acquires a third gateway time carried by the third response message, and evaluates the effect of performing the time calibration on the gateway previously and/or whether the time calibration on the gateway is needed again based on the third reference time and the third gateway time.
When the time alignment of the gateway has not previously reached the predetermined requirement (e.g., the time difference between the gateway time and the reference time is not within a reasonable range) and the gateway needs to be aligned again, the above-mentioned time synchronization procedure may be repeated so as to achieve the time alignment of the gateway and synchronize it with the reference time.
Under ideal conditions, when the first node initiates a request message, the DeviceTimeReq may be received by all the LoRa gateways that overlay the first node signal, and these gateways will report these messages to the NS. The NS can calculate Δt of the gateway time of the plurality of gateways compared to the reference time at the same time, so that calibration can be completed for the plurality of gateways in one calibration procedure.
During the calibration process, the first node may determine a specific gateway calibration result through a devicetime ans message. In one embodiment, the NS may select a gateway that issues DeviceTimeAns in a Round Robin (Round Robin) manner, so that the first node may learn the time synchronization results to all gateways in a less time synchronization process.
Further, after all gateways enter the synchronized state, the first node may enter the dormant state and the first node may wake up periodically to re-enter the gateway time alignment procedure as described above. Thus, the power consumption of the first node can be better saved.
Fig. 5 illustrates a second time synchronization flow diagram according to one embodiment of the present disclosure. Wherein the procedure is the gateway time for the second node to synchronize to the LoRa gateway, i.e. the time of the second node is calibrated by the gateway time.
Referring to fig. 5, similar to the brief flowchart shown in fig. 3, the second node can transmit a request message (DeviceTimeReq) at step S501; at step S502, when the DeviceTimeReq command transmission is completed, the second nodes record their current times t1, respectively.
In step S503, the gateway can receive the request message sent by the second node, and record the current time t2 of the gateway when the DeviceTimeReq data reception is completed.
In step S504, the gateway reports the DeviceTimeReq command to the Network Server (NS). The time t2 when the gateway completes the reception of the DeviceTimeReq data is added in the packet of the DeviceTimeReq command.
In step S505, the NS records time t2 in response to the DeviceTimeReq request sent by the second node, and in step S506, sends a corresponding response message, i.e. DeviceTimeAns reply, to the second node, where the DeviceTimeAns reply includes time t2 when the gateway completes the DeviceTimeReq data reception.
In step S507, the gateway receives the DeviceTimeAns reply from the web server and forwards the DeviceTimeAns reply to the second node.
In step S508, after the second node completes the devicetime ans reception, the current time t3 is recorded. And wherein the current time t3 of the second node is calibrated to t3' =t3+ (t 2-t 1). Thereby, a calibration of the time of the second node is achieved.
Thus, the gateway time and/or time synchronization schemes of the terminal nodes of the communication system of the present disclosure are respectively described in detail by combining flowcharts. The communication system of the present disclosure can realize time calibration of the gateway and time calibration of the terminal node respectively at a lower cost through the time synchronization mechanism described above.
In other words, the communication system of the present disclosure may be implemented on the basis of existing LoRa networks. Compared with the prior art, only the time calibration instruction (setgwtimaoffset) overhead from the NS to the gateway is increased, no additional lowwan MAC command overhead is needed, no additional expansion is needed in message interaction, and the network server-side algorithm is simpler to implement. On the hardware equipment realization, the first node only needs to comprise a control module, a LoRa module, a GPS module and a GPS signal receiving antenna, so that the hardware cost is low and the installation and implementation are easy.
Moreover, the hardware cost is far smaller than that of a time synchronization mechanism or other synchronization mechanisms of a base network time server (NTP server), and the device can be compatible with LoRaWAN class a/b/c, an active mode and a passive mode, and the installation condition is loose. Compared with the existing implementation mode, the technical scheme has obvious cost advantages and is high in calibration accuracy.
In addition, the various parts of the communication system of the present disclosure may also implement a time synchronization method, respectively.
Fig. 6 shows a flow diagram of a time synchronization method according to one embodiment of the present disclosure. Wherein the method may be performed, for example, by the first node 110 shown in fig. 1.
Referring to fig. 6, in step S610, the time of the first node 110, i.e., the reference time, may be synchronized with the GPS standard time based on the GPS signal, for example, by the first control module 113.
In step S620, the communication module 112 may send the first request message and record a first reference time when the first request message is sent.
In step S630, a second request message may be sent, for example by the communication module 112, the second request message carrying the first reference time.
Wherein the first node may receive a first response message sent by the network server 130 in response to the first request message, the first response message carrying a first gateway time when the gateway 120 forwarding the first request message to the network server 130 completes the reception of the first request message. The first control module 113 obtains the first gateway time from the first response message, and evaluates whether time calibration of the gateway 120 and/or an effect of previous time calibration of the gateway is required based on the first reference time and the first gateway time. And in the event that a time alignment of gateway 120 is required, a second request message is sent by communication module 112, the first reference time in the second request message.
The first node may also receive a second response message sent by the network server 130 in response to the second request message, where the second response message carries a second gateway time when the gateway 120 forwarding the second request message to the network server 130 completes the reception of the second request message. The first control module 113 obtains the second gateway time from the second response message, and evaluates whether time calibration of the gateway and/or an effect of previous time calibration of the gateway is required based on the second reference time and the second gateway time. In the case where the time calibration of the gateway 120 is required, the above procedure may be repeated until the gateway time of the gateway under the coverage of the first node is all synchronized with the reference time of the first node.
Fig. 7 shows a flow diagram of a time synchronization method according to one embodiment of the present disclosure. Wherein the method may be performed, for example, by the gateway shown in fig. 1.
Referring to fig. 7, in step S710, for example, the first communication module 121 shown in fig. 1 may receive a first request message sent by the first node, and the time of the first node 110, that is, the reference time is synchronized with the standard time.
In step S720, a first gateway time when the first request message is received is added to the first request message, for example, by the second control module 123 shown in fig. 1.
In step S730, the first request message with the first gateway time added thereto may be forwarded to the network server, for example, by the second communication module 122 shown in fig. 1.
In step S740, for example, the first communication module 121 shown in fig. 1 may receive a second request message sent by the first node, where the second request message carries a first reference time when the first node completes sending the first request message.
In step S750, the second request message may be forwarded to the web server, for example, by the second communication module 122 shown in fig. 1.
In step S760, the gateway time of the gateway may be calibrated, for example, by the second control module 123 shown in fig. 1, in response to a time calibration command from the network server.
Optionally, the first communication module may forward, to the first node, a first response message sent by the network server in response to the first request message, where the first response message carries a first gateway time when the gateway forwarding the first request message to the network server completes receiving the first request message; and/or the first communication module may forward, to the first node, a second response message sent by the network server in response to the second request message, where the second response message carries a second gateway time when a gateway forwarding the second request message to the network server completes receiving a second request message.
Fig. 8 shows a flow diagram of a time synchronization method according to one embodiment of the present disclosure. Wherein the method may be performed, for example, by a network server as shown in fig. 1.
Referring to fig. 8, in step S810, for example, the network communication module 131 shown in fig. 1 may receive a first request message forwarded by a gateway from a first node, where the time of the first node, i.e. a reference time, is synchronized with a standard time, and the first request message carries a first gateway time when the gateway completes receiving the first request message.
In step S820, for example, the network communication module 131 shown in fig. 1 may receive a second request message forwarded by the gateway from the first node, where the second request message carries a first reference time when the first node completes sending the first request message.
In step S830, a time alignment command may be generated, for example, by the processing module 132 shown in fig. 1, based on the first reference time and the first gateway time.
In step S840, a time alignment command may be sent to the gateway, for example by the network communication module 131 shown in fig. 1.
Optionally, in response to the first request message, the network communication module 131 may send a first response message to the first node via a gateway, where the first response message carries the first gateway time; and/or in response to the second request message, the network communication module 131 may send a second response message to the first node, where the second response message carries the second gateway time, and the second request message is added with the second gateway time when the gateway completes receiving the second request message.
The implementation of the time synchronization method implemented by the first node, the gateway, and the network server in fig. 6-8 is the same as or similar to the description in connection with fig. 1-5, and specific reference may be made to the above related description, which is not repeated here.
The communication system and the first node, gateway, network server and time synchronization method according to the present invention have been described in detail above with reference to the accompanying drawings.
Furthermore, the method according to the invention may also be implemented as a computer program or computer program product comprising computer program code instructions for performing the steps defined in the above-mentioned method of the invention.
Alternatively, the invention may also be embodied as a non-transitory machine-readable storage medium (or computer-readable storage medium, or machine-readable storage medium) having stored thereon executable code (or a computer program, or computer instruction code) which, when executed by a processor of an electronic device (or computing device, server, etc.), causes the processor to perform the steps of the above-described method according to the invention.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems and methods according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The foregoing description of embodiments of the invention has been presented for purposes of illustration and description, and is not intended to be exhaustive or limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the various embodiments described. The terminology used herein was chosen in order to best explain the principles of the embodiments, the practical application, or the improvement of technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.

Claims (36)

1. A communication system, comprising:
the method comprises the steps that a first node, wherein the time of the first node, namely a reference time, is synchronous with a standard time, the first node sends a first request message, records the first reference time when the first request message is sent, and sends a second request message, wherein the second request message carries the first reference time; and
and the gateway forwards the first request message and the second request message to a network server and calibrates the self time based on a time calibration command from the network server, wherein the first request message is added with a first gateway time when the gateway completes the receiving of the first request message.
2. The system of claim 1, wherein the system further comprises a controller configured to control the controller,
the first node is adapted to receive a time service signal; and is also provided with
The gateway is not adapted to receive time signals.
3. The system of claim 2, wherein the system further comprises a controller configured to control the controller,
the first node comprises a time service module which receives a time service signal so as to synchronize the reference time of the first node with the standard time based on the time service signal; and is also provided with
The gateway does not include the time service module.
4. The system of claim 3, wherein the system further comprises a controller configured to control the controller,
the time service module is a GPS module, and the time service signal is a satellite signal.
5. The system of claim 2, wherein the system further comprises a controller configured to control the controller,
the first node or the time service module receiving the time service signal is suitable for being arranged outdoors; and is also provided with
The gateway is adapted to be located indoors.
6. The system of claim 1, wherein the system further comprises a controller configured to control the controller,
the first node can cover at least one gateway, i.e. the at least one gateway can receive the message sent by the first node.
7. The system of claim 6, wherein the system comprises a plurality of first nodes to cover a plurality of gateways in the communication system.
8. The communication system of claim 1, further comprising:
the network server receives the first request message and the second request message and sends a time calibration command to the gateway based on the first reference time and the first gateway time.
9. The communication system of claim 1, further comprising:
a second node communicates with the network server via the gateway and is time synchronized with the gateway.
10. The communication system of claim 1, wherein the communication system is a LoRa communication system.
11. The communication system of claim 1, wherein,
the first node receives a first response message sent by the network server in response to the first request message, acquires the first gateway time carried by the first response message, and evaluates whether time calibration of the gateway is needed and/or the effect of time calibration of the gateway is needed before based on the first reference time and the first gateway time; and/or
The first node receives a second response message sent by the network server in response to the second request message, acquires a second gateway time carried by the second response message, and evaluates whether time calibration of the gateway and/or the effect of time calibration of the gateway is needed or not based on a second reference time and the second gateway time when the second request message is sent, wherein the second gateway adds the second gateway time when the gateway completes the second request message in the second request message.
12. The communication system of claim 11, wherein the communication system further comprises a plurality of communication devices,
and the first node sends the second request message under the condition that the time calibration of the gateway is required.
13. The system of claim 12, wherein the system further comprises a controller configured to control the controller,
the first node sends a third request message and records a third reference time when the first node completes sending the third request message;
the gateway adds a third gateway time when the gateway completes the third request message receiving in the third request message, and forwards the third request message to a network server;
the first node receives a third response message sent by the network server in response to the third request message, acquires the third gateway time carried by the third response message, and evaluates the effect of time calibration on the gateway previously based on the third reference time and the third gateway time and/or whether the time calibration on the gateway is needed again.
14. A communication system, comprising:
the first node is suitable for receiving time service signals, synchronizing the time of the first node, namely the reference time, with the standard time based on the time service signals, and sending a request message, wherein the request message carries the last sending reference time when the first node finishes sending the last request message;
The gateway is not suitable for receiving the time service signal, is deployed in the signal coverage area of the first node, can forward the request message to the network server, and calibrates the self time based on a time calibration command from the network server, wherein the gateway adds the current receiving gateway time when the gateway completes the current request message receiving in the request message.
15. The communication system of claim 14, further comprising:
the network server receives the request message, records the current gateway receiving time in a memory, and sends a time calibration command to the gateway based on the last transmission reference time extracted from the request message and the last gateway receiving time acquired from the memory.
16. The system of claim 14, wherein the system further comprises a controller configured to control the controller,
the first node comprises a time service module which receives a time service signal so as to synchronize the reference time of the first node with the standard time based on the time service signal; and is also provided with
The gateway does not include the time service module.
17. The system of claim 14, wherein the system further comprises a controller configured to control the controller,
the first node or the time service module receiving the time service signal is suitable for being arranged outdoors; and/or
The gateway is adapted to be located indoors.
18. The system of claim 14, wherein the time signal comprises at least one of:
short wave time signals;
a long wave time service signal;
satellite time service signals; and
network and telephone time signals.
19. A first node for time synchronization in a communication system, comprising:
the time service module is used for receiving time service signals;
the communication module is used for sending the first request message and the second request message, and is a LoRa module; and
a first control module, for synchronizing the time of the first node, that is, the reference time, with the standard time based on the time service signal, recording the first reference time when the communication module completes the transmission of the first request message, the second request message carrying the first reference time recorded by the first control module,
the communication module receives a first response message sent by a network server in response to the first request message, the first response message carrying a first gateway time when a gateway forwarding the first request message to the network server completes the first request message reception,
The first control module acquires the first gateway time from the first response message, and evaluates whether the gateway needs to be time-calibrated and/or the effect of the time-calibrated gateway based on the first reference time and the first gateway time; and/or
The communication module receives a second response message sent by the network server in response to the second request message, the second response message carrying a second gateway time when a gateway forwarding the second request message to the network server completes the second request message reception,
the first control module obtains a second gateway time from the second response message, evaluates whether the gateway needs to be time-calibrated and/or the effect of time-calibrated before based on a second reference time and the second gateway time when the communication module finishes sending the second request message,
the gateway is a LoRa gateway.
20. The first node of claim 19, wherein the first node,
the time service module is a GPS module, and the time service signal is a satellite signal.
21. The first node of claim 19, wherein the first node,
The communication module also sends a third request message and receives a third response message sent by the network server in response to the third request message, wherein the third response message carries a third gateway time when a gateway forwarding the third request message to the network server completes the third request message reception,
the first control module acquires the third gateway time from the third response message, and evaluates whether the gateway needs to be time-calibrated and/or the effect of time-calibrated before based on the third reference time and the third gateway time when the communication module finishes sending the third request message.
22. The first node of claim 19, further comprising:
and the wake-up module is periodically started to wake up the first node, so that the gateway in the coverage area of the first node is time-synchronized.
23. The first node of claim 19, further comprising:
and the dormancy module is used for enabling the first node to enter a dormancy state in response to the fact that all gateways in the coverage area of the first node realize the reference time synchronization with the first node.
24. The first node of claim 19, wherein the first node,
the time service module is suitable for being arranged outdoors.
25. A method of time synchronization performed at a first node, wherein the first node is a LoRa node, the method of time synchronization comprising:
synchronizing a time of the first node, i.e., a reference time, with a standard time based on a time service signal;
transmitting a first request message and recording a first reference time when the first request message is transmitted;
sending a second request message, wherein the second request message carries the first reference time;
receiving a first response message sent by a network server in response to the first request message, wherein the first response message carries a first gateway time when a gateway forwarding the first request message to the network server completes the first request message reception;
acquiring the first gateway time from the first response message, and evaluating whether time calibration of the gateway and/or the effect of previous time calibration of the gateway is required or not based on the first reference time and the first gateway time;
and/or
Receiving a second response message sent by the network server in response to the second request message, wherein the second response message carries a second gateway time when a gateway forwarding the second request message to the network server completes receiving the second request message;
Obtaining the second gateway time from the second response message, evaluating whether the gateway needs to be time-calibrated and/or the effect of the previous time-calibration of the gateway based on the second reference time and the second gateway time when the second request message is sent,
wherein the gateway is a LoRa gateway.
26. A gateway, comprising:
the first communication module is used for communicating with a first node, receiving a first request message and a second request message sent by the first node, wherein the time of the first node, namely the reference time, is synchronous with the standard time, and the second request message carries a first reference time when the first node finishes sending the first request message;
a second communication module, configured to communicate with a network server, forward the first request message and the second request message from the first node to the network server, and receive a time calibration command from the network server; and
and the second control module is used for adding a first gateway time when the first communication module finishes receiving the first request message in the first request message forwarded to the network server, and calibrating the gateway time of the gateway in response to the time calibration command.
27. The gateway of claim 26, wherein the gateway,
the gateway is not adapted to receive time signals.
28. The gateway of claim 27, wherein the gateway further comprises a plurality of communication channels,
the gateway does not comprise a time service module for receiving time service signals; or alternatively
The gateway cannot receive the time service signal.
29. The gateway of claim 26, wherein the gateway,
the second communication module receives a first response message sent by the network server in response to the first request message, the first response message carries a first gateway time when a gateway forwarding the first request message to the network server completes first request message reception, and the first communication module forwards the first response message to the first node; and/or
The second communication module receives a second response message sent by the network server in response to the second request message, the second response message carries a second gateway time when a gateway forwarding the second request message to the network server completes receiving the second request message, and the first communication module forwards the second response message to the first node.
30. A method of time synchronization performed in a gateway, comprising:
receiving a first request message sent by a first node, wherein the time of the first node, namely the reference time, is synchronous with the standard time;
adding a first gateway time when the first request message is received into the first request message;
forwarding a first request message added with a first gateway time to a network server;
receiving a second request message sent by a first node, wherein the second request message carries a first reference time when the first node finishes sending the first request message;
forwarding the second request message to the network server; and
and calibrating the gateway time of the gateway in response to a time calibration command from the network server.
31. The method as recited in claim 30, further comprising:
forwarding a first response message sent by the network server in response to the first request message to the first node, wherein the first response message carries a first gateway time when a gateway forwarding the first request message to the network server completes first request message reception; and/or
Forwarding a second response message sent by the network server in response to the second request message to the first node, wherein the second response message carries a second gateway time when a gateway forwarding the second request message to the network server completes receiving the second request message.
32. A web server, comprising:
the network communication module is used for communicating with a gateway, receiving a first request message and a second request message forwarded by the gateway from a first node, and sending a time calibration command to the gateway, wherein the time of the first node, namely the reference time, is synchronous with the standard time, the first request message carries a first gateway time when the gateway finishes receiving the first request message, and the second request message carries a first reference time when the first node finishes sending the first request message; and
and the processing module is used for generating the time calibration command based on the first reference time and the first gateway time.
33. The web server of claim 32, wherein the web server is configured to,
in response to the first request message, the network communication module sends a first response message to the first node via a gateway, the first response message carrying the first gateway time; and/or
And responding to the second request message, the network communication module sends a second response message to the first node through a gateway, wherein the second response message carries a second gateway time, and the second request message is added with the second gateway time when the gateway finishes receiving the second request message.
34. The web server of claim 32, further comprising:
and the storage module is used for storing the first gateway time in association with the gateway.
35. A method of time synchronization performed in a network server, comprising:
receiving a first request message forwarded by a gateway from a first node, wherein the time of the first node, namely the reference time, is synchronous with the standard time, and the first request message carries first gateway time when the gateway finishes receiving the first request message;
receiving a second request message forwarded by a gateway from a first node, wherein the second request message carries a first reference time when the first node finishes sending the first request message;
generating a time alignment command based on the first reference time and the first gateway time; and
And sending the time calibration command to the gateway.
36. The method as recited in claim 35, further comprising:
transmitting a first response message to the first node via a gateway in response to the first request message, the first response message carrying the first gateway time; and/or
And responding to the second request message, sending a second response message to the first node, wherein the second response message carries a second gateway time, and the second request message is added with the second gateway time when the gateway finishes receiving the second request message.
CN201910157562.XA 2019-03-01 2019-03-01 Communication system, first node, gateway, network server and time synchronization method Active CN111641937B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910157562.XA CN111641937B (en) 2019-03-01 2019-03-01 Communication system, first node, gateway, network server and time synchronization method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910157562.XA CN111641937B (en) 2019-03-01 2019-03-01 Communication system, first node, gateway, network server and time synchronization method

Publications (2)

Publication Number Publication Date
CN111641937A CN111641937A (en) 2020-09-08
CN111641937B true CN111641937B (en) 2023-07-11

Family

ID=72332833

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910157562.XA Active CN111641937B (en) 2019-03-01 2019-03-01 Communication system, first node, gateway, network server and time synchronization method

Country Status (1)

Country Link
CN (1) CN111641937B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112218247A (en) * 2020-09-24 2021-01-12 武汉慧联无限科技有限公司 Internet of things message issuing method and device, electronic equipment and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107395311A (en) * 2017-09-01 2017-11-24 北京首科信通科技有限责任公司 Clock synchronizing method, device and computer-readable recording medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009284054A (en) * 2008-05-20 2009-12-03 Mitsubishi Electric Corp Communication system, radio station, router, and time synchronizing method
CN101888695B (en) * 2009-05-12 2013-10-30 大唐移动通信设备有限公司 Time service method, system and device of base station
CN102468898B (en) * 2010-11-19 2016-03-30 中兴通讯股份有限公司 The method, apparatus and system of time synchronized are realized in time division multiplex network
CN104735770A (en) * 2013-12-18 2015-06-24 中兴通讯股份有限公司 Synchronization method, transmission node, terminal and communication system
CN108988972B (en) * 2017-06-02 2020-04-28 华为技术有限公司 Clock synchronization method and equipment

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107395311A (en) * 2017-09-01 2017-11-24 北京首科信通科技有限责任公司 Clock synchronizing method, device and computer-readable recording medium

Also Published As

Publication number Publication date
CN111641937A (en) 2020-09-08

Similar Documents

Publication Publication Date Title
CN110324889B (en) Clock synchronization method, communication device and communication equipment
US8526305B2 (en) System and methods for reducing power consumed by a base station
US20150103818A1 (en) Transport and error compensation of a globally synchronized time-base
KR100824044B1 (en) Method and system for acquiring time sync between a base station in a communication system
CN111989592B (en) Ranging method, ranging device, ranging equipment and ranging readable storage medium in synchronous system
US20110207472A1 (en) Method and system for cellular clock-assisted wireless access point locating
US11431402B2 (en) Methods and systems for reducing beam search space for selection of an optimal beam
JP2017521975A (en) Synchronization method, synchronization device, and base station
WO2019218940A1 (en) User equipment in wireless communication system, electronic device, method and storage medium
CN101510801A (en) Method, system and base station and terminal for time adjustment
CN113923777B (en) Positioning method, mobile terminal for positioning and positioning system
CN111641937B (en) Communication system, first node, gateway, network server and time synchronization method
KR20130038140A (en) Apparatus and method for time synchronization
US20230283361A1 (en) Wireless communication method, terminal device and network device
US10420048B2 (en) Radio network synchronization of a mobile communication network with a local clock functionality providing a local timing reference for each base station entity
WO2023169131A1 (en) Positioning method, apparatus, and computer-readable storage medium
US20210223354A1 (en) Method for positioning of a user equipment operating in a cellular network
EP4054246A1 (en) Neighboring cell measurement method and apparatus
WO2019205925A1 (en) Communication method and communication apparatus
KR100288147B1 (en) Synchronization signal aquisition apparatus and its method in cdma base station
KR102526129B1 (en) Wireless communication system based on IoT communication and method for estimating location using the same
JP2007053653A (en) Radio lan delay amount measuring device and method therefor
CN116489766B (en) Positioning method, positioning system, positioning device, access network equipment and network element equipment
WO2023236706A1 (en) Frame number offset for positioning of a remote ue
WO2023065320A1 (en) Methods and apparatuses for sidelink positioning

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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40036441

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant