WO2018107606A1 - 物联网中消息传递方法和装置 - Google Patents
物联网中消息传递方法和装置 Download PDFInfo
- Publication number
- WO2018107606A1 WO2018107606A1 PCT/CN2017/077054 CN2017077054W WO2018107606A1 WO 2018107606 A1 WO2018107606 A1 WO 2018107606A1 CN 2017077054 W CN2017077054 W CN 2017077054W WO 2018107606 A1 WO2018107606 A1 WO 2018107606A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- message
- instruction
- information
- inter
- terminal
- Prior art date
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L51/00—User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
- H04L51/21—Monitoring or handling of messages
- H04L51/23—Reliability checks, e.g. acknowledgments or fault reporting
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/20—Traffic policing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L51/00—User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
- H04L51/04—Real-time or near real-time messaging, e.g. instant messaging [IM]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/26—Special purpose or proprietary protocols or architectures
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/28—Timers or timing mechanisms used in protocols
Definitions
- the present invention relates to the field of computer technologies, and in particular, to a message delivery method and apparatus in an Internet of Things.
- MQTT Message Queuing Telemetry
- the MQTT protocol is a real-time communication protocol. It uses a lightweight publishing and subscription message transmission mechanism. Compared with other communication protocols, the MQTT protocol is simpler and easier to use. It is especially suitable for low network bandwidth, high network delay, and network communication. In a restricted environment such as stability.
- the MQTT protocol is an important IoT transport protocol that supports all platforms.
- a method for messaging in an Internet of Things comprising:
- the message instruction further includes message delivery path information
- the method further includes: [0012] if the message instruction is not exceeded, detecting current according to message execution end information in the message instruction Whether the terminal is a message execution end;
- the method further includes:
- the received message instruction overwrites the over-the-top message instruction.
- the method further includes:
- the requesting the inter-day synchronization request to the server further includes:
- the inter-time synchronization request is periodically initiated to the server according to a preset inter-turn interval.
- a messaging device in the Internet of Things comprising:
- a receiving module configured to receive a message instruction transmitted by using an MQTT protocol, where the message instruction includes message sending end information, message executing end information, inter-time stamp, and super-inter-turn information;
- a first detecting module configured to detect the message according to the inter-postmark and the inter-turn information in the message instruction Whether the instruction is excessive;
- a second detecting module configured to detect, according to the message execution end information in the message instruction, whether the current terminal is a message execution end, if the message instruction is exceeded;
- an execution module configured to: if the message command has been exceeded and the current terminal is a message execution end, abandon the execution of the message instruction, and send the message to the message sending end according to the message sending end information
- the message instruction is interrupted, and the message is sent to the message sending end according to the message sending end information.
- the message instruction further includes message delivery path information
- the second detection module is further configured to: according to the message execution end information detection in the message instruction, if the message instruction is not exceeded Whether the current terminal is a message execution end;
- the execution module is further configured to execute the message instruction if the message instruction is not exceeded and the current terminal is a message execution end; if the message instruction is not exceeded and the current terminal is not a message execution end, Transmitting the message instruction according to the message passing path information.
- the device further includes:
- an overlay module configured to: if the current terminal has an over-the-top message instruction, overwrite the received message instruction to the over-the-top message instruction.
- the device further includes:
- a requesting module configured to initiate a inter-day synchronization request to the server
- the receiving module is further configured to receive a response result of the inter-turn synchronization request returned by the server, and perform inter-time synchronization according to the response result.
- the requesting module is further configured to periodically initiate a inter-day synchronization request to the server according to a preset inter-turn interval.
- the above method and apparatus for messaging in the Internet of Things by setting the inter-post stamp and the inter-turn information in the message command transmitted by the MQTT protocol, can determine the received message command according to the inter-turn stamp and the inter-turn information. Whether it is super-sounding, and the over-command message interrupt transmission and the over-cue prompt information are fed back to the message sender, so that the super-message command will not be executed or continue to be transmitted, saving network transmission traffic and reducing the network.
- FIG. 1 is a schematic diagram of an application environment of a message passing method in an Internet of Things in an embodiment
- FIG. 2 is a flowchart of a message delivery method in an Internet of Things in an embodiment
- FIG. 3 is a flowchart of a message delivery method in an Internet of Things in another embodiment
- FIG. 4 is a flowchart of a message delivery method in an Internet of Things in another embodiment
- FIG. 5 is a structural block diagram of a message passing apparatus in an Internet of Things in an embodiment
- FIG. 6 is a structural block diagram of a message passing device in an Internet of Things in another embodiment
- FIG. 7 is a structural block diagram of a message passing apparatus in an Internet of Things in another embodiment.
- first detection module can be referred to as a second detection module without departing from the scope of the invention, and similarly, the second detection module can be referred to as a first detection module. Both the first detection module and the second detection module are detection modules, but they are not the same detection module.
- the application environment includes a first terminal 110, a server 120, and a second terminal 130.
- the first terminal 110 and the second terminal 130 can be connected through the Internet, and the first terminal 110 and the second terminal 130 can exchange messages and communicate with each other.
- the first terminal 110 can connect to the server 120 through the Internet, and the second terminal 130 can The server 120 is connected through the Internet.
- the first terminal 110 sends a message instruction to the second terminal 130, and the second terminal 130 detects the message instruction according to the information in the message instruction, and performs a corresponding operation according to different detection results; the first terminal 110 may initiate the message to the server 120.
- the response result of the inter-synchronization request is time-synchronized; the second terminal 130 may initiate a inter-day synchronization request to the server 120, and perform inter-time synchronization according to the response result of the inter-time synchronization request returned by the server 120.
- the first terminal 110 is a device that can access the network and can send a message instruction, such as a mobile intelligent terminal, a vehicle intelligent terminal, a wearable device, and a personal digital assistant.
- the second terminal 130 is a device that can access the network and can receive message instructions, such as a refrigerator with an RFID (Radio Frequency Identification) tag, a washing machine with an RFID tag, and an air conditioner with an RFID tag.
- RFID Radio Frequency Identification
- a message passing method in the Internet of Things, running in the second terminal in FIG. 1, includes:
- S202 Receive a message instruction transmitted by using an MQTT protocol, where the message instruction includes a message sending end information, a message executing end information, a time stamp, and a super time information.
- the inter-timestamp is a sequence of characters for uniquely identifying the engraving of the message instruction. For example, when the message sending end sends a message instruction with an engraving time of 10:00:01, the interrogation in the message instruction The record message command is sent at 10:00:01.
- the inter-time information refers to the excess time and/or the time interval between the message instructions that can be executed.
- the message sender refers to the terminal that sends the message command.
- the message execution end refers to the terminal that executes the message instruction.
- the second terminal receives the message instruction sent by the message sending end through the MQTT protocol or the intermediate node passes the MQT
- the message instruction passed by the T protocol refers to a terminal that transmits a message instruction between the message sending end and the message executing end.
- the second terminal can be an intermediate node or a message execution end.
- the terminal detects whether the message instruction is excessive according to the inter-post stamp and the excess time in the message instruction, and the excess time refers to the super-engraving that the message instruction can be executed. For example, the moment when the message sender generates the message instruction is 05:01:00, and the setting of the message instruction can be executed when the absolute time is 05:01:30, then the moment of the time stamp record in the message instruction is 05:01:00, the super-record recorded in the super-inter-information is 05:01:30.
- the terminal After receiving the message instruction, the terminal compares the engraving of the message command received by the terminal with the super-engraving, and if the terminal receives the engraving of the message instruction earlier than the engraving, the message instruction is not exceeded; The message received by the message is later than the moment, and the message is over. For example, if the terminal receives the message command at 05:01:20, and the message is earlier than 05:01:30, the message command is not exceeded; the moment the terminal receives the message command is 05:01:35 , after the super engraving 05:01:30, the message command has been Super ⁇ .
- the terminal detects whether the message instruction exceeds the time according to the inter-post stamp and the inter-turn interval in the message instruction, and the inter-turn interval refers to the inter-turn range in which the message instruction is allowed to be executed from the sending. .
- the moment when the message sender generates a message instruction is 05:01:00, and the absolute time of setting the message instruction can be executed is 05:01:30, then the moment of the time stamp record in the message instruction is 05:01:00, the super-turn time recorded in the super-inter-turn information is 30 seconds.
- the terminal After receiving the message command, the terminal calculates the time interval between the moment when the terminal receives the message command and the time stamp record, and if the time interval is less than the time interval, the message command is not exceeded; If the inter-turn interval is greater than the inter-turn time, the message is overdue. For example, the moment when the terminal receives the message command is 05:01:20, and the time interval between the time stamped with the time stamp is 05:01:00 is 20 seconds, and less than 30 seconds between the times, The message command is not exceeded; the moment when the terminal receives the message command is 05:01:35, and the time interval between the time interval 05:01:00 recorded with the time stamp is 35 seconds, which is greater than the time interval 30. In seconds, the message command has exceeded.
- the message execution end information may include an IP (Internet Protocol) protocol, a MAC (Medium Access Control) address, a device code, or other uniqueness of the message instruction execution terminal. Information that identifies the identity of the device.
- IP Internet Protocol
- MAC Medium Access Control
- the interrupt transmission message instruction means that the terminal does not transmit the message instruction.
- the terminal sends the message to the message sending end according to the message sending end information, so that the message sending end adjusts the message command to be sent according to the feedback information.
- the super-information prompt information refers to information that is fed back to the sender of the message that the message instruction has exceeded the transmission or that the message instruction has exceeded the execution.
- the message delivery method in the above Internet of Things by setting the inter-post stamp and the inter-turn information in the message instruction transmitted by the MQTT protocol, can determine whether the received message instruction is super or not according to the inter-turn stamp and the inter-turn information ⁇ , and the super-message command interrupt transmission, the super-instruction prompt information is fed back to the message sender, so that the super-message message instruction will not be executed or continue to be transmitted, saving network transmission traffic, reducing the risk of network congestion, and the message The instruction increases the inter-time judgment and improves the certainty of the execution of the message instruction transmitted through the MQTT protocol.
- the message instruction further includes message delivery path information
- the message delivery method in the Internet of Things includes:
- the message delivery path information refers to a node sequence and node information that the message instruction passes through the MQTT protocol and is transmitted by the message sending end to the message executing end, and the message may be searched according to the node order and the node information in the message passing path information.
- the node information may include a node's IP (Internet Protocol) address, a MAC (Medium Access Control) address, a device code, or other information that uniquely identifies the device.
- the message command is sent by the A terminal to the B terminal.
- the message command is transmitted from the A terminal to the C node, then to the D node, and finally to the B terminal.
- the message routing path information includes the order of the message instruction A ⁇ C ⁇ D ⁇ B, and also includes the IP (Internet Protocol) protocol of the C node and the D node.
- IP Internet Protocol
- the node that detects the next delivery is the D node, and then searches for the D node and sends the message instruction to the D node. If the message instruction is not exceeded, the next transmitted node is detected as the B terminal and the node information does not include B.
- the information of the terminal is further directed to the B terminal according to the message execution end information in the message instruction and the message instruction is sent to the B terminal.
- the message delivery method in the Internet of Things further includes: if the current terminal has a message exceeding the message, the received message instruction overwrites the message command. [0066] In this embodiment, the terminal overwrites the already exceeded message instruction with the received message instruction, and no longer transmits the overwritten message instruction, thereby saving network traffic and reducing the risk of network congestion.
- the message delivery method in the foregoing Internet of Things further includes:
- the terminal sends a chime synchronization message to the server, where the message refers to a data unit exchanged and transmitted in the network, that is, a data block to be sent by the station at one time, and the chirp synchronization message may include a day synchronization.
- the inter-post stamp of the request and the terminal to send the chime synchronization message may include a day synchronization.
- the server refers to the inter-day synchronization server
- the inter-day synchronization server is an independent NTP (Network Time Protocol)/SNTP (Simple Network Time Protocol) protocol.
- the daytime server acquires standard cuckoo clock information from GPS (Global Positioning System) satellites, and transmits the signal information in the network to realize synchronization between the terminal and the inter-day synchronization server in the network.
- GPS Global Positioning System
- S404 Receive a response result of the day synchronization request returned by the server, and perform synchronization according to the response result.
- the inter-day synchronization server responds after receiving the chi-clock synchronization message, and returns the response message, the inter-timestamp of receiving the chime synchronization message, and the inter-post stamp of the response message to the terminal; After receiving the response message, the terminal records the time stamp of the received response message.
- the terminal can synchronize the message according to the chime clock, the response message, the inter-timestamp of sending the chime synchronization message, the inter-timestamp of sending the response message, the inter-timestamp of receiving the chime synchronization message, and the receipt of the response message.
- the interval stamp calculates the transmission delay and synchronization error, and achieves accurate synchronization between the terminal and the daytime synchronization server.
- the terminal time is 10:00:00
- the standard cesium clock signal obtained by the daytime synchronization server from the GP S satellite is 11:00:00.
- the terminal sends the chime synchronization message and the inter-timestamp T1 for sending the chime synchronization message to the inter-day synchronization server, and the inter-timestamp T1 is 10:00:00; the daytime synchronization server receives the chirp synchronization message.
- the interval stamp ⁇ 2 is 11:00:01
- the time stamp of the response message sent by the daytime synchronization server is 11:00:02
- the timestamp of the response message received by the terminal is 10:00:03
- the terminal includes a message sending end, an intermediate node, and a message executing end
- the message sending end may perform synchronization with the daytime synchronization server
- the intermediate node may synchronize with the daytime synchronization server
- the message executing end may be The daytime synchronization server performs the daytime synchronization, thereby achieving accurate synchronization between the message sender, the intermediate node, and the message execution end.
- the inter-day synchronization server and the terminal form a closed system, and each terminal in the system realizes the synchronization between the terminal and the inter-time synchronization server by initiating a chirp synchronization message to the inter-time synchronization server, thereby implementing the entire system.
- each terminal in the system realizes the synchronization between the terminal and the inter-time synchronization server by initiating a chirp synchronization message to the inter-time synchronization server, thereby implementing the entire system.
- the message delivery method in the Internet of Things further includes: periodically sending a inter-day synchronization request to the server according to a preset time interval.
- the preset inter-turn interval includes values of a plurality of inter-turn intervals, for example, the preset inter-turn interval may be 1 day, 3 days, 7 days, 15 days, and 30 days. In the IoT system, different values of the inter-turn interval can be selected according to the system environment.
- the message command has a timeout of 30 seconds, and can initiate a synchronization request to the server every other day; the message command is 2 minutes in length, and can initiate a day synchronization request to the server every 15 days.
- the terminal periodically sends the inter-time synchronization message to the inter-day synchronization server to implement the inter-time synchronization, which avoids the inter-turn error between the terminals caused by the inaccurate terminal, thereby causing the message instruction. A situation that cannot be performed accurately.
- FIG. 5 is a structural block diagram of a message passing apparatus in an Internet of Things in an embodiment.
- a message passing device in the Internet of things, running on the second terminal of FIG. 1 is a virtual device constructed by implementing the message passing method in the Internet of Things of FIG. 2, and includes:
- the receiving module 502 is configured to receive a message instruction transmitted by using an MQTT protocol, where the message instruction includes message sending end information, message executing end information, inter-time stamp, and super-inter-turn information;
- the first detecting module 504 is configured to detect, according to the inter-post stamp and the inter-turn information in the message instruction, whether the message instruction is exceeded;
- the second detecting module 506 is configured to: if the message instruction is exceeded, detect, according to the message execution end information in the message instruction, whether the current terminal is a message execution end;
- the execution module 508 is configured to: if the message instruction is exceeded and the current terminal is the message execution end, then execute execution The message instruction sends the super-prompt message to the message sending end according to the message sending end information; if the message command is exceeded and the current terminal is not the message executing end, the message command is interrupted, and the message is sent according to the message sending end information The message is sent to the sender of the message.
- the message passing device in the above Internet of Things by setting the inter-post stamp and the inter-turn information in the message command transmitted by the MQTT protocol, can determine whether the received message command is super or not according to the inter-turn stamp and the inter-turn information ⁇ , and the super-message command interrupt transmission, the super-instruction prompt information is fed back to the message sender, so that the super-message message instruction will not be executed or continue to be transmitted, saving network transmission traffic, reducing the risk of network congestion, and the message The instruction increases the inter-time judgment and improves the certainty of the execution of the message instruction transmitted through the MQTT protocol.
- the message instruction further includes message delivery path information
- the second detection module 506 is further configured to: if the message instruction is not exceeded, detect, according to the message execution end information in the message instruction, whether the current terminal is the message execution end. ;
- the execution module 508 is further configured to: if the message instruction is not exceeded and the current terminal is a message execution end, execute a message instruction; if the message instruction is not exceeded and the current terminal is not the message execution end, then the message is delivered according to the message delivery path information. instruction.
- the message passing device in the Internet of Things includes a receiving module 602, a first detecting module 604, a second detecting module 606, an executing module 608, and an overlay module 610, wherein the receiving module 602
- the first detecting module 604, the second detecting module 606, and the executing module 608 have the same functions as the corresponding modules in FIG. 5.
- the overlay module 610 is configured to overwrite the received message instruction with the over-message command if the current terminal has a message exceeding the message.
- the terminal overwrites the already exceeded message instruction with the received message instruction, and no longer transmits the overwritten message instruction, thereby saving network traffic and reducing the risk of network congestion.
- a messaging device in the Internet of Things includes a receiving module 702, a first detecting module 704, a second detecting module 706, an executing module 708, and a requesting module 710, wherein the receiving module 702.
- the first detecting module 704, the second detecting module 706, and the executing module 708 have the same functions as the corresponding modules in FIG. 5.
- the requesting module 710 is configured to initiate a inter-day synchronization request to the server; [0091]
- the receiving module 702 is further configured to receive a response result of the inter-time synchronization request returned by the server, and perform inter-time synchronization according to the response result.
- the inter-day synchronization server and the terminal form a closed system, and each terminal in the system realizes the synchronization of the terminal and the inter-time synchronization server by initiating a chirp synchronization message to the inter-day synchronization server, thereby implementing the entire system.
- each terminal in the system realizes the synchronization of the terminal and the inter-time synchronization server by initiating a chirp synchronization message to the inter-day synchronization server, thereby implementing the entire system.
- the requesting module 710 is further configured to periodically initiate a inter-day synchronization request to the server according to a preset inter-time interval.
- the terminal periodically sends the inter-time synchronization message to the inter-day synchronization server to implement the inter-time synchronization, which avoids the excessive error between the terminals caused by the inaccurate terminal, thereby causing the message instruction. A situation that cannot be performed accurately.
- the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or the like.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Computing Systems (AREA)
- Telephonic Communication Services (AREA)
- Information Transfer Between Computers (AREA)
Abstract
本方案涉及一种物联网中消息传递方法和装置,包括:接收通过MQTT协议传输的消息指令,所述消息指令中包括消息发送端信息、消息执行端信息、时间戳和超时时间信息;根据所述消息指令中时间戳和超时时间信息检测所述消息指令是否超时;若所述消息指令已超时,根据所述消息指令中消息执行端信息检测当前终端是否为消息执行端;若所述消息指令已超时且当前终端是消息执行端,则放弃执行所述消息指令,并根据所述消息发送端信息将超时提示信息发送给消息发送端;若所述消息指令已超时且当前终端不是消息执行端,则中断传输所述消息指令,并根据所述消息发送端信息将超时提示信息发送给消息发送端。提高了通过MQTT协议传输的消息指令执行情况的确定性。
Description
物联网中消息传递方法和装置
技术领域
[0001] 本发明涉及计算机技术领域, 特别是涉及一种物联网中消息传递方法和装置。
背景技术
[0002] 随着信息技术的快速发展, 物联网成为新一代信息技术的重要组成部分。 在物 联网系统中, 物品和物品之间通过互联网连接, 物品之间可通过互联网进行消 息交换和通信。
[0003] 传统的物联网消息传递中, 多采用 MQTT (Message Queuing Telemetry
Transport, 消息队列遥测传输) 通讯协议。 MQTT协议是一个即吋通讯协议, 采 用轻量级发布和订阅消息传输机制, 相比于其他通讯协议, MQTT协议更为简约 、 易于使用, 特别适用于网络带宽低、 网络延迟高、 网络通信不稳定等受限环 境中。 MQTT协议作为重要的物联网传输协议, 支持所有平台。 MQTT协议支持 三种消息发布服务质量。 其中, QoS (Quality of Service, 服务质量) =0, 消息 发送完即丢弃, 会导致消息丢失或重复; QoS=l, 消息发送后需要确认回复, 确 保消息到达, 可能导致消息重复; QoS=2, 消息发送后需要确认回复, 确保消息 到达一次。 但在物联网环境中, 由于网络带宽低、 网络延迟高和网络通信不稳 定等因素, 常造成消息传递缓慢, MQTT协议中三种消息发布服务质量所发送的 消息指令执行情况具有不确定性。
技术问题
[0004] 基于此, 有必要针对物联网环境中, 传统 MQTT协议中三种消息发布服务质量 所发送的消息指令执行情况具有不确定性的问题, 提供一种提高消息指令执行 情况的确定性的物联网中消息传递方法和装置。
问题的解决方案
技术解决方案
[0005] 一种物联网中消息传递方法, 包括:
[0006] 接收通过 MQTT协议传输的消息指令, 所述消息指令中包括消息发送端信息、
消息执行端信息、 吋间戳和超吋吋间信息;
[0007] 根据所述消息指令中吋间戳和超吋吋间信息检测所述消息指令是否超吋; [0008] 若所述消息指令已超吋, 根据所述消息指令中消息执行端信息检测当前终端是 否为消息执行端;
[0009] 若所述消息指令已超吋且当前终端是消息执行端, 则放弃执行所述消息指令, 并根据所述消息发送端信息将超吋提示信息发送给消息发送端;
[0010] 若所述消息指令已超吋且当前终端不是消息执行端, 则中断传输所述消息指令
, 并根据所述消息发送端信息将超吋提示信息发送给消息发送端。
[0011] 在一个实施例中, 所述消息指令中还包括消息传递路径信息, 所述方法还包括 [0012] 若所述消息指令未超吋, 根据所述消息指令中消息执行端信息检测当前终端是 否为消息执行端;
[0013] 若所述消息指令未超吋且当前终端是消息执行端, 则执行所述消息指令; [0014] 若所述消息指令未超吋且当前终端不是消息执行端, 则根据所述消息传递路径 信息传递所述消息指令。
[0015] 在一个实施例中, 所述方法还包括:
[0016] 若当前终端存在已超吋消息指令, 将接收的所述消息指令覆盖所述已超吋消息 指令。
[0017] 在一个实施例中, 所述方法还包括:
[0018] 向服务器发起吋间同步请求;
[0019] 接收所述服务器返回的所述吋间同步请求的响应结果, 根据所述响应结果进行 吋间同步。
[0020] 在一个实施例中, 所述向服务器发起吋间同步请求还包括:
[0021] 根据预设的吋间间隔定期向服务器发起吋间同步请求。
[0022] 一种物联网中消息传递装置, 包括:
[0023] 接收模块, 用于接收通过 MQTT协议传输的消息指令, 所述消息指令中包括消 息发送端信息、 消息执行端信息、 吋间戳和超吋吋间信息;
[0024] 第一检测模块, 用于根据所述消息指令中吋间戳和超吋吋间信息检测所述消息
指令是否超吋;
[0025] 第二检测模块, 用于若所述消息指令已超吋, 根据所述消息指令中消息执行端 信息检测当前终端是否为消息执行端;
[0026] 执行模块, 用于若所述消息指令已超吋且当前终端是消息执行端, 则放弃执行 所述消息指令, 并根据所述消息发送端信息将超吋提示信息发送给消息发送端
; 若所述消息指令已超吋且当前终端不是消息执行端, 则中断传输所述消息指 令, 并根据所述消息发送端信息将超吋提示信息发送给消息发送端。
[0027] 在一个实施例中, 所述消息指令中还包括消息传递路径信息, 所述第二检测模 块还用于若所述消息指令未超吋, 根据所述消息指令中消息执行端信息检测当 前终端是否为消息执行端;
[0028] 所述执行模块还用于若所述消息指令未超吋且当前终端是消息执行端, 则执行 所述消息指令; 若所述消息指令未超吋且当前终端不是消息执行端, 则根据所 述消息传递路径信息传递所述消息指令。
[0029] 在一个实施例中, 所述装置还包括:
[0030] 覆盖模块, 用于若当前终端存在已超吋消息指令, 将接收的所述消息指令覆盖 所述已超吋消息指令。
[0031] 在一个实施例中, 所述装置还包括:
[0032] 请求模块, 用于向服务器发起吋间同步请求;
[0033] 所述接收模块还用于接收所述服务器返回的所述吋间同步请求的响应结果, 根 据所述响应结果进行吋间同步。
[0034] 在一个实施例中, 所述请求模块还用于根据预设的吋间间隔定期向服务器发起 吋间同步请求。
发明的有益效果
有益效果
[0035] 上述物联网中消息传递方法和装置, 通过在 MQTT协议传输的消息指令中设置 吋间戳和超吋吋间信息, 可根据吋间戳和超吋吋间信息判断接收到的消息指令 是否超吋, 并将超吋消息指令中断传输、 超吋提示信息反馈给消息发送端, 使 得超吋消息指令不会被执行或继续传递下去, 节省了网络传输流量、 降低了网
络拥堵的风险, 对消息指令增加超吋吋间判断, 提高了通过 MQTT协议传输的消 息指令执行情况的确定性。
对附图的简要说明
附图说明
[0036] 图 1为一个实施例中物联网中消息传递方法的应用环境示意图;
[0037] 图 2为一个实施例中物联网中消息传递方法的流程图;
[0038] 图 3为另一个实施例中物联网中消息传递方法的流程图;
[0039] 图 4为另一个实施例中物联网中消息传递方法的流程图;
[0040] 图 5为一个实施例中物联网中消息传递装置的结构框图;
[0041] 图 6为另一个实施例中物联网中消息传递装置的结构框图;
[0042] 图 7为另一个实施例中物联网中消息传递装置的结构框图。
本发明的实施方式
[0043] 为了使本发明的目的、 技术方案及优点更加清楚明白, 以下结合附图及实施例 , 对本发明进行进一步详细说明。 应当理解, 此处所描述的具体实施例仅仅用 以解释本发明, 并不用于限定本发明。
[0044] 可以理解, 本发明所使用的术语 "第一"、 "第二 "等可在本文中用于描述各种元 件, 但这些元件不受这些术语限制。 这些术语仅用于将第一个元件与另一个元 件区分。 举例来说, 在不脱离本发明的范围的情况下, 可以将第一检测模块称 为第二检测模块, 且类似地, 可将第二检测模块称为第一检测模块。 第一检测 模块和第二检测模块两者都是检测模块, 但其不是同一检测模块。
[0045] 图 1为一个实施例中物联网中消息传递方法的应用环境示意图。 如图 1所示, 该 应用环境包括第一终端 110、 服务器 120、 第二终端 130。 第一终端 110与第二终 端 130之间可通过互联网连接, 第一终端 110和第二终端 130之间可进行消息交换 和通信, 第一终端 110可通过互联网连接服务器 120, 第二终端 130可通过互联网 连接服务器 120。 第一终端 110将消息指令发送给第二终端 130, 第二终端 130根 据消息指令中信息对消息指令进行检测, 并根据不同的检测结果执行相应的操 作; 第一终端 110可向服务器 120发起吋间同步请求, 并根据服务器 120返回的吋
间同步请求的响应结果进行吋间同步; 第二终端 130可向服务器 120发起吋间同 步请求, 并根据服务器 120返回的吋间同步请求的响应结果进行吋间同步。 其中 , 第一终端 110为能接入网络且能发送消息指令的设备, 如移动智能终端、 车载 智能终端、 可穿戴设备和个人数字助理等。 第二终端 130为能接入网络且能接收 消息指令的设备, 如带有 RFID (Radio Frequency Identification, 射频识别) 标签 的电冰箱、 带有 RFID标签的洗衣机和带有 RFID标签的空调等。
[0046] 图 2为一个实施例中物联网中消息传递方法的流程图。 如图 2所示, 一种物联网 中消息传递方法, 运行于图 1中的第二终端, 包括:
[0047] S202, 接收通过 MQTT协议传输的消息指令, 消息指令中包括消息发送端信息 、 消息执行端信息、 吋间戳和超吋吋间信息。
[0048] 其中, 吋间戳是一个字符序列, 用于唯一的标识消息指令发送的吋刻, 例如, 消息发送端发送消息指令的吋刻为 10:00:01, 则消息指令中吋间戳记录消息指令 发送吋刻为 10:00:01。 超吋吋间信息是指消息指令能被执行的超吋绝对吋间和 /或 超吋吋间间隔。 消息发送端是指发送消息指令的终端。 消息执行端是指执行消 息指令的终端。
[0049] 第二终端接收消息发送端通过 MQTT协议发送的消息指令或中间节点通过 MQT
T协议传递的消息指令。 其中, 中间节点是指消息发送端和消息执行端之间传递 消息指令的终端。 第二终端可为中间节点或消息执行端。
[0050] S204, 根据消息指令中吋间戳和超吋吋间信息检测消息指令是否超吋。
[0051] 具体地, 终端根据消息指令中吋间戳和超吋绝对吋间来检测消息指令是否超吋 , 超吋绝对吋间是指消息指令能被执行的超吋吋刻。 例如, 消息发送端生成消 息指令的吋刻为 05:01:00, 设置该消息指令能被执行的超吋绝对吋间是 05:01:30 , 则消息指令中吋间戳记录的吋刻为 05:01:00, 超吋吋间信息中记录的超吋吋刻 为 05:01:30。 终端在接收到消息指令后, 将终端接收到消息指令的吋刻与超吋吋 刻进行对比, 若终端接收到消息指令的吋刻早于超吋吋刻, 则消息指令未超吋 ; 若终端接收到消息指令的吋刻晚于超吋吋刻, 则消息已超吋。 例如, 终端接 收到消息指令的吋刻为 05:01:20, 早于超吋吋刻 05:01:30, 则消息指令未超吋; 终端接收到消息指令的吋刻为 05:01:35, 晚于超吋吋刻 05:01:30, 则消息指令已
超吋。
[0052] 在一个实施例中, 终端根据消息指令中吋间戳和超吋吋间间隔来检测消息指令 是否超吋, 超吋吋间间隔是指消息指令从发送起允许被执行的吋间范围。 例如 , 消息发送端生成消息指令的吋刻为 05:01:00, 设置该消息指令能被执行的超吋 绝对吋间是 05:01:30, 则消息指令中吋间戳记录的吋刻为 05:01:00, 超吋吋间信 息中记录的超吋吋间为 30秒。 终端在接收到消息指令后, 计算终端接收到消息 指令的吋刻与吋间戳记录的吋刻之间的吋间间隔, 若吋间间隔小于超吋吋间, 则消息指令未超吋; 若吋间间隔大于超吋吋间, 则消息已超吋。 例如, 终端接 收到消息指令的吋刻为 05:01:20, 与吋间戳记录的吋刻为 05:01:00之间的吋间间 隔为 20秒, 小于超吋吋间 30秒, 则消息指令未超吋; 终端接收到消息指令的吋 刻为 05:01:35, 与吋间戳记录的吋刻 05:01:00之间的吋间间隔为 35秒, 大于超吋 吋间 30秒, 则消息指令已超吋。
[0053] S206 , 若消息指令已超吋, 根据消息指令中消息执行端信息检测当前终端是否 为消息执行端。
[0054] 具体地, 消息执行端信息可包括消息指令执行终端的 IP (Internet Protocol, 网 络之间互连的协议) 地址、 MAC (Medium Access Control, 媒体访问控制) 地 址、 设备编码或其他能唯一标识设备身份的信息。
[0055] S208 , 若消息指令已超吋且当前终端是消息执行端, 则放弃执行消息指令, 并 根据消息发送端信息将超吋提示信息发送给消息发送端。
[0056] S210, 若消息指令已超吋且当前终端不是消息执行端, 则中断传输消息指令, 并根据消息发送端信息将超吋提示信息发送给消息发送端。
[0057] 具体地, 中断传输消息指令是指终端不再传输该消息指令。
[0058] 本实施例中, 若消息指令已超吋, 终端根据消息发送端信息将超吋提示信息发 送给消息发送端, 以使消息发送端根据反馈的超吋提示信息调整所要发送的消 息指令。 超吋提示信息是指反馈给消息发送端该消息指令已超吋不再传输或该 消息指令已超吋不再执行的信息。
[0059] 上述物联网中消息传递方法, 通过在 MQTT协议传输的消息指令中设置吋间戳 和超吋吋间信息, 可根据吋间戳和超吋吋间信息判断接收到的消息指令是否超
吋, 并将超吋消息指令中断传输、 超吋提示信息反馈给消息发送端, 使得超吋 消息指令不会被执行或继续传递下去, 节省了网络传输流量、 降低了网络拥堵 的风险, 对消息指令增加超吋吋间判断, 提高了通过 MQTT协议传输的消息指令 执行情况的确定性。
[0060] 图 3为另一个实施例中物联网中消息传递方法的流程图。 如图 3所示, 在一个实 施例中, 消息指令中还包括消息传递路径信息, 上述物联网中消息传递方法还 包括:
[0061] S302, 若消息指令未超吋, 根据消息指令中消息执行端信息检测当前终端是否 为消息执行端。
[0062] S304, 若消息指令未超吋且当前终端是消息执行端, 则执行消息指令。
[0063] S306, 若消息指令未超吋且当前终端不是消息执行端, 则根据消息传递路径信 息传递消息指令。
[0064] 具体地, 消息传递路径信息是指消息指令通过 MQTT协议由消息发送端传递到 消息执行端所经过的节点顺序和节点信息, 可依据消息传递路径信息中的节点 顺序和节点信息査找消息指令传递的下一个节点。 其中, 节点信息可包括节点 的 IP (Internet Protocol, 网络之间互连的协议) 地址、 MAC (Medium Access Control, 媒体访问控制) 地址、 设备编码或其他能唯一标识设备身份的信息。 例如, 消息指令由 A终端发送给 B终端, 根据预设的消息传递路径, 消息指令是 由 A终端传向 C节点、 再传向 D节点, 最后传递给 B终端。 则消息传递路径信息中 包括消息指令 A→C→D→B的顺序, 还包括 C节点和 D节点的 IP (Internet Protocol , 网络之间互连的协议) 地址。 根据 A终端发送的消息指令的消息传递路径信息 中节点顺序和节点信息, 检测到下一个传递的节点为 C节点, 可定向査找 C节点 并将消息指令发送给 C节点, 若消息指令未超吋, 检测到下一个传递的节点为 D 节点, 再定向査找 D节点并将消息指令发送给 D节点, 若消息指令未超吋, 检测 到下一个传递的节点为 B终端且节点信息中不包括 B终端的信息, 再根据消息指 令中消息执行端信息定向査找 B终端并将消息指令发送给 B终端。
[0065] 在一个实施例中, 上述物联网中消息传递方法还包括: 若当前终端存在已超吋 消息指令, 将接收的消息指令覆盖已超吋消息指令。
[0066] 本实施例中, 终端用接收到的消息指令覆盖已超吋的消息指令, 不再将已超吋 的消息指令继续传递, 节省了网络流量、 减少了网络拥堵的风险。
[0067] 图 4为另一个实施例中物联网中消息传递方法的流程图。 如图 4所示, 在一个实 施例中, 上述物联网中消息传递方法还包括:
[0068] S402, 向服务器发起吋间同步请求。
[0069] 具体地, 终端向服务器发送吋钟同步报文, 报文是指网络中交换与传输的数据 单元, 即站点一次性要发送的数据块, 吋钟同步报文中可包括吋间同步请求和 终端发送吋钟同步报文的吋间戳。
[0070] 其中, 服务器是指吋间同步服务器, 吋间同步服务器是一种可独立基于 NTP ( Network Time Protocol, 网络吋间协议) /SNTP (Simple Network Time Protocol, 简单网络吋间协议) 协议工作的吋间服务器。 吋间同步服务器从 GPS (Global Positioning System, 全球定位系统) 卫星上获取标准吋钟信号信息, 并将信号信 息在网络中传输, 实现网络中终端与吋间同步服务器吋间同步。
[0071] S404, 接收服务器返回的吋间同步请求的响应结果, 根据响应结果进行吋间同 步。
[0072] 具体地, 吋间同步服务器在接收到吋钟同步报文后作出响应, 并将响应报文、 接收吋钟同步报文的吋间戳和发送响应报文的吋间戳返回终端; 终端接收到响 应报文后记录接收响应报文的吋间戳。 终端可根据吋钟同步报文、 响应报文、 发送吋钟同步报文的吋间戳、 发送响应报文的吋间戳、 接收吋钟同步报文的吋 间戳和接收响应报文的吋间戳计算传输吋延和同步误差, 实现终端吋间与吋间 同步服务器吋间的精准同步。 例如, 终端吋间为 10:00:00, 吋间同步服务器从 GP S卫星上获取的标准吋钟信号信息为 11:00:00。 终端向吋间同步服务器发送吋钟 同步报文和发送吋钟同步报文的吋间戳 Tl, 该吋间戳 T1为 10:00:00; 吋间同步服 务器接收到吋钟同步报文的吋间戳 Τ2为 11:00:01, 吋间同步服务器发送响应报文 的吋间戳 Τ3为 11:00:02, 终端接收到响应报文的吋间戳 Τ4为 10:00:03, 则终端可 计算报文的往返吋延为 (T4-T1) - (Τ3-Τ2) =2秒, 终端相对于吋间同步服务器 的吋间差为 ( (T2-T1) 十 (Τ3-Τ4) ) /2=1小吋, 终端再跟据计算的吋间差进行 吋间同步。
[0073] 其中, 终端包括消息发送端、 中间节点和消息执行端, 消息发送端可与吋间同 步服务器进行吋间同步、 中间节点可与吋间同步服务器进行吋间同步、 消息执 行端可与吋间同步服务器进行吋间同步, 从而实现消息发送端、 中间节点和消 息执行端的吋间精准同步。
[0074] 本实施中, 吋间同步服务器与终端组成封闭式系统, 系统中各终端通过向吋间 同步服务器发起吋钟同步报文实现终端与吋间同步服务器的吋间同步, 从而实 现整个系统处于同一吋间维度, 避免因各终端吋间不同步造成消息指令产生和 执行在吋间维度上的混乱。
[0075] 在一个实施例中, 上述物联网中消息传递方法还包括: 根据预设的吋间间隔定 期向服务器发起吋间同步请求。
[0076] 具体地, 预设的吋间间隔包括多个吋间间隔的数值, 例如预设的吋间间隔可为 1天、 3天、 7天、 15天和 30天。 在物联网系统中, 可根据系统环境选择不同的吋 间间隔的数值。 例如, 消息指令的超吋吋间为 30秒, 可每隔 1天向服务器发起吋 间同步请求; 消息指令的超吋吋间为 2分钟, 可每隔 15天向服务器发起吋间同步 请求。
[0077] 本实施例中, 终端定期向吋间同步服务器发送吋间同步报文实现吋间同步, 避 免了终端由于计吋不准导致的各终端之间吋间误差过大, 从而造成消息指令不 能准确执行的情况。
[0078] 图 5为一个实施例中物联网中消息传递装置的结构框图。 如图 5所示, 一种物联 网中消息传递装置, 运行于图 1的第二终端上, 为实现图 2的物联网中消息传递 方法所架构的虚拟装置, 包括:
[0079] 接收模块 502, 用于接收通过 MQTT协议传输的消息指令, 消息指令中包括消 息发送端信息、 消息执行端信息、 吋间戳和超吋吋间信息;
[0080] 第一检测模块 504, 用于根据消息指令中吋间戳和超吋吋间信息检测消息指令 是否超吋;
[0081] 第二检测模块 506, 用于若消息指令已超吋, 根据消息指令中消息执行端信息 检测当前终端是否为消息执行端;
[0082] 执行模块 508, 用于若消息指令已超吋且当前终端是消息执行端, 则放弃执行
消息指令, 并根据消息发送端信息将超吋提示信息发送给消息发送端; 若消息 指令已超吋且当前终端不是消息执行端, 则中断传输消息指令, 并根据消息发 送端信息将超吋提示信息发送给消息发送端。
[0083] 上述物联网中消息传递装置, 通过在 MQTT协议传输的消息指令中设置吋间戳 和超吋吋间信息, 可根据吋间戳和超吋吋间信息判断接收到的消息指令是否超 吋, 并将超吋消息指令中断传输、 超吋提示信息反馈给消息发送端, 使得超吋 消息指令不会被执行或继续传递下去, 节省了网络传输流量、 降低了网络拥堵 的风险, 对消息指令增加超吋吋间判断, 提高了通过 MQTT协议传输的消息指令 执行情况的确定性。
[0084] 在一个实施例中, 消息指令中还包括消息传递路径信息, 第二检测模块 506还 用于若消息指令未超吋, 根据消息指令中消息执行端信息检测当前终端是否为 消息执行端;
[0085] 执行模块 508还用于若消息指令未超吋且当前终端是消息执行端, 则执行消息 指令; 若消息指令未超吋且当前终端不是消息执行端, 则根据消息传递路径信 息传递消息指令。
[0086] 图 6为另一个实施例中物联网中消息传递装置的结构框图。 如图 6所示, 在一个 实施例中, 上述物联网中消息传递装置, 包括接收模块 602、 第一检测模块 604 、 第二检测模块 606、 执行模块 608和覆盖模块 610, 其中, 接收模块 602、 第一 检测模块 604、 第二检测模块 606、 执行模块 608与图 5中对应的模块功能相同。
[0087] 覆盖模块 610用于若当前终端存在已超吋消息指令, 将接收的消息指令覆盖已 超吋消息指令。
[0088] 本实施例中, 终端用接收到的消息指令覆盖已超吋的消息指令, 不再将已超吋 的消息指令继续传递, 节省了网络流量、 减少了网络拥堵的风险。
[0089] 图 7为另一个实施例中物联网中消息传递装置的结构框图。 如图 7所示, 在一个 实施例中, 一种物联网中消息传递装置, 包括接收模块 702、 第一检测模块 704 、 第二检测模块 706、 执行模块 708和请求模块 710, 其中, 接收模块 702、 第一 检测模块 704、 第二检测模块 706、 执行模块 708与图 5中对应的模块功能相同。
[0090] 请求模块 710用于向服务器发起吋间同步请求;
[0091] 接收模块 702还用于接收服务器返回的吋间同步请求的响应结果, 根据响应结 果进行吋间同步。
[0092] 本实施中, 吋间同步服务器与终端组成封闭式系统, 系统中各终端通过向吋间 同步服务器发起吋钟同步报文实现终端与吋间同步服务器的吋间同步, 从而实 现整个系统处于同一吋间维度, 避免因各终端吋间不同步造成消息指令产生和 执行在吋间维度上的混乱。
[0093] 在一个实施例中, 请求模块 710还用于根据预设的吋间间隔定期向服务器发起 吋间同步请求。
[0094] 本实施例中, 终端定期向吋间同步服务器发送吋间同步报文实现吋间同步, 避 免了终端由于计吋不准导致的各终端之间吋间误差过大, 从而造成消息指令不 能准确执行的情况。
[0095] 本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程, 是可 以通过计算机程序来指令相关的硬件来完成, 所述的程序可存储于一非易失性 计算机可读取存储介质中, 该程序在执行吋, 可包括如上述各方法的实施例的 流程。 其中, 所述的存储介质可为磁碟、 光盘、 只读存储记忆体 (Read-Only Memory , ROM) 等。
[0096] 以上所述实施例仅表达了本发明的几种实施方式, 其描述较为具体和详细, 但 并不能因此而理解为对本发明专利范围的限制。 应当指出的是, 对于本领域的 普通技术人员来说, 在不脱离本发明构思的前提下, 还可以做出若干变形和改 进, 这些都属于本发明的保护范围。 因此, 本发明专利的保护范围应以所附权 利要求为准。
Claims
[权利要求 1] 一种物联网中消息传递方法, 其特征在于, 包括:
接收通过 MQTT协议传输的消息指令, 所述消息指令中包括消息发送 端信息、 消息执行端信息、 吋间戳和超吋吋间信息;
根据所述消息指令中吋间戳和超吋吋间信息检测所述消息指令是否超 吋;
若所述消息指令已超吋, 根据所述消息指令中消息执行端信息检测当 前终端是否为消息执行端;
若所述消息指令已超吋且当前终端是消息执行端, 则放弃执行所述消 息指令, 并根据所述消息发送端信息将超吋提示信息发送给消息发送 山 若所述消息指令已超吋且当前终端不是消息执行端, 则中断传输所述 消息指令, 并根据所述消息发送端信息将超吋提示信息发送给消息发 送端。
[权利要求 2] 根据权利要求 1所述的物联网中消息传递方法, 其特征在于, 所述消 息指令中还包括消息传递路径信息, 所述方法还包括:
若所述消息指令未超吋, 根据所述消息指令中消息执行端信息检测当 前终端是否为消息执行端;
若所述消息指令未超吋且当前终端是消息执行端, 则执行所述消息指 令;
若所述消息指令未超吋且当前终端不是消息执行端, 则根据所述消息 传递路径信息传递所述消息指令。
[权利要求 3] 根据权利要求 1所述的物联网中消息传递方法, 其特征在于, 所述方 法还包括:
若当前终端存在已超吋消息指令, 将接收的所述消息指令覆盖所述已 超吋消息指令。
[权利要求 4] 根据权利要求 1所述的物联网中消息传递方法, 其特征在于, 所述方 法还包括:
向服务器发起吋间同步请求;
接收所述服务器返回的所述吋间同步请求的响应结果, 根据所述响应 结果进行吋间同步。
[权利要求 5] 根据权利要求 4所述的物联网中消息传递方法, 其特征在于, 所述向 服务器发起吋间同步请求还包括:
根据预设的吋间间隔定期向服务器发起吋间同步请求。
[权利要求 6] —种物联网中消息传递装置, 其特征在于, 包括:
接收模块, 用于接收通过 MQTT协议传输的消息指令, 所述消息指令 中包括消息发送端信息、 消息执行端信息、 吋间戳和超吋吋间信息; 第一检测模块, 用于根据所述消息指令中吋间戳和超吋吋间信息检测 所述消息指令是否超吋;
第二检测模块, 用于若所述消息指令已超吋, 根据所述消息指令中消 息执行端信息检测当前终端是否为消息执行端; 执行模块, 用于若所述消息指令已超吋且当前终端是消息执行端, 则 放弃执行所述消息指令, 并根据所述消息发送端信息将超吋提示信息 发送给消息发送端; 若所述消息指令已超吋且当前终端不是消息执行 端, 则中断传输所述消息指令, 并根据所述消息发送端信息将超吋提 示信息发送给消息发送端。
[权利要求 7] 根据权利要求 6所述的物联网中消息传递装置, 其特征在于:
所述消息指令中还包括消息传递路径信息, 所述第二检测模块还用于 若所述消息指令未超吋, 根据所述消息指令中消息执行端信息检测当 前终端是否为消息执行端;
所述执行模块还用于若所述消息指令未超吋且当前终端是消息执行端 , 则执行所述消息指令; 若所述消息指令未超吋且当前终端不是消息 执行端, 则根据所述消息传递路径信息传递所述消息指令。
[权利要求 8] 根据权利要求 6所述的物联网中消息传递装置, 其特征在于, 所述装 置还包括:
覆盖模块, 用于若当前终端存在已超吋消息指令, 将接收的所述消息
指令覆盖所述已超吋消息指令。
[权利要求 9] 根据权利要求 6所述的物联网中消息传递装置, 其特征在于, 所述装 置还包括:
请求模块, 用于向服务器发起吋间同步请求;
所述接收模块还用于接收所述服务器返回的所述吋间同步请求的响应 结果, 根据所述响应结果进行吋间同步。
[权利要求 10] 根据权利要求 9所述的物联网中消息传递装置, 其特征在于, 所述请 求模块还用于根据预设的吋间间隔定期向服务器发起吋间同步请求。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611147715.5 | 2016-12-13 | ||
CN201611147715.5A CN106850397A (zh) | 2016-12-13 | 2016-12-13 | 物联网中消息传递方法和装置 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2018107606A1 true WO2018107606A1 (zh) | 2018-06-21 |
Family
ID=59139087
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2017/077054 WO2018107606A1 (zh) | 2016-12-13 | 2017-03-17 | 物联网中消息传递方法和装置 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN106850397A (zh) |
WO (1) | WO2018107606A1 (zh) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113872982A (zh) * | 2021-10-09 | 2021-12-31 | 中远海运科技股份有限公司 | 一种基于mqtt协议的船舶监控数据传输方法及系统 |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107181674A (zh) * | 2017-06-16 | 2017-09-19 | 深圳市盛路物联通讯技术有限公司 | 物联网中消息传递方法和装置 |
CN111130680B (zh) * | 2017-06-19 | 2022-04-22 | 深圳市盛路物联通讯技术有限公司 | 一种同步物联网接入节点与汇聚单元时间的方法及系统 |
CN107359954B (zh) * | 2017-08-03 | 2018-12-04 | 广东浩云长盛网络股份有限公司 | 一种基于基准同步机制进行时间校准的方法及系统 |
CN114138520B (zh) * | 2020-05-13 | 2022-06-28 | 浙江创邻科技有限公司 | 分布式消息处理方法及系统 |
CN112134965B (zh) * | 2020-11-24 | 2021-02-26 | 树根互联技术有限公司 | 物联网指令的下发方法、装置和电子设备 |
CN113194156B (zh) * | 2021-07-01 | 2021-09-03 | 广州得一物联科技有限公司 | 一种边缘设备的数据同步方法及系统 |
CN113709257B (zh) * | 2021-10-09 | 2024-04-23 | 天翼物联科技有限公司 | 消息缓存超期监控方法、装置、设备及介质 |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101227427A (zh) * | 2007-12-27 | 2008-07-23 | 腾讯科技(深圳)有限公司 | 一种信息交互的方法及系统 |
EP2363847A2 (en) * | 2010-03-01 | 2011-09-07 | Honeywell International Inc. | Method for automatic delay of standby message to maximize time for response to electronic text message |
CN102647365A (zh) * | 2011-02-16 | 2012-08-22 | 北京大学 | 处理消息及消息状态的方法、装置和数据交换服务器 |
CN103312753A (zh) * | 2012-03-14 | 2013-09-18 | 中国移动通信集团公司 | 一种物联网通信方法和装置 |
CN105868029A (zh) * | 2015-12-11 | 2016-08-17 | 鼎点视讯科技有限公司 | 一种一致性容错处理方法和系统 |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20160065653A1 (en) * | 2014-08-26 | 2016-03-03 | Fujitsu Limited | Internet of things (iot) device configuration construction |
CN104717220B (zh) * | 2015-03-25 | 2018-09-21 | 江苏物联网研究发展中心 | 基于硬件加密的控制信令安全传输方法 |
CN106059892A (zh) * | 2016-05-17 | 2016-10-26 | 中国科学院沈阳计算技术研究所有限公司 | 一种用于融合通信系统的消息引擎 |
CN106209812A (zh) * | 2016-07-04 | 2016-12-07 | 深圳市得润车联科技有限公司 | 一种物联网终端平台数据封装的方法 |
-
2016
- 2016-12-13 CN CN201611147715.5A patent/CN106850397A/zh active Pending
-
2017
- 2017-03-17 WO PCT/CN2017/077054 patent/WO2018107606A1/zh active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101227427A (zh) * | 2007-12-27 | 2008-07-23 | 腾讯科技(深圳)有限公司 | 一种信息交互的方法及系统 |
EP2363847A2 (en) * | 2010-03-01 | 2011-09-07 | Honeywell International Inc. | Method for automatic delay of standby message to maximize time for response to electronic text message |
CN102647365A (zh) * | 2011-02-16 | 2012-08-22 | 北京大学 | 处理消息及消息状态的方法、装置和数据交换服务器 |
CN103312753A (zh) * | 2012-03-14 | 2013-09-18 | 中国移动通信集团公司 | 一种物联网通信方法和装置 |
CN105868029A (zh) * | 2015-12-11 | 2016-08-17 | 鼎点视讯科技有限公司 | 一种一致性容错处理方法和系统 |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113872982A (zh) * | 2021-10-09 | 2021-12-31 | 中远海运科技股份有限公司 | 一种基于mqtt协议的船舶监控数据传输方法及系统 |
CN113872982B (zh) * | 2021-10-09 | 2023-10-31 | 中远海运科技股份有限公司 | 一种基于mqtt协议的船舶监控数据传输方法及系统 |
Also Published As
Publication number | Publication date |
---|---|
CN106850397A (zh) | 2017-06-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2018107606A1 (zh) | 物联网中消息传递方法和装置 | |
US10158444B1 (en) | Event-driven precision time transfer | |
US10334545B2 (en) | Synchronizing time among two or more devices | |
US7729706B2 (en) | Location service-providing system and deferred location request service-providing method using previously computed location in location service-providing system | |
CA2715977C (en) | Method and apparatus for performing session info query for user plane location | |
US8107502B2 (en) | Method and apparatus for monitoring packet networks | |
US8730867B2 (en) | Clock synchronization aid device for communication station(s) of a wireless network, and associated clock synchronization device | |
US8332867B2 (en) | Methods and devices for sending transmission-time or reception-time information for a transmitted or received message | |
US9042411B1 (en) | System and method for accurate time sampling in presence of output delay | |
US20030142696A1 (en) | Method for ensuring access to a transmission medium | |
JP4853625B2 (ja) | 伝搬遅延時間測定方法、同期方法、及び無線lanシステム | |
WO2009076908A1 (zh) | 一种网络时钟同步的方法、装置及系统 | |
JPH08221336A (ja) | データ通信ネットワーク | |
WO2008035863A1 (en) | Method and apparatus for synchronizing applications of terminals in communication network | |
CN110492967B (zh) | 一种时间同步方法、中继设备及装置 | |
US20020021717A1 (en) | Method and system for transmit time stamp insertion in a hardware time stamp system for packetized data networks | |
WO2018227703A1 (zh) | 物联网中消息传递方法和装置 | |
WO2019128869A1 (zh) | 一种灵活以太网时延测量方法及相关设备 | |
CN114071487B (zh) | 一种接口时延测量方法、相关网络设备和存储介质 | |
CN111416751A (zh) | 计算端口转发时延的方法及装置 | |
CN101420281B (zh) | 用于在网络要素之间传送日内时间值的方法和装置 | |
WO2012075921A1 (zh) | 实现时间同步的方法及基站 | |
US20180295185A1 (en) | Method and computer system for quickly transmitting time-controlled real-time messages | |
US9960870B2 (en) | Method and device for data transfer in a computer network for identifying a synchronicity between a node of the computer network with an element of the computer network | |
CN115086955A (zh) | 面向工控系统的无线半双工通信的时间同步系统及方法 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 17880380 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 17880380 Country of ref document: EP Kind code of ref document: A1 |