WO2018227703A1 - 物联网中消息传递方法和装置 - Google Patents

物联网中消息传递方法和装置 Download PDF

Info

Publication number
WO2018227703A1
WO2018227703A1 PCT/CN2017/093578 CN2017093578W WO2018227703A1 WO 2018227703 A1 WO2018227703 A1 WO 2018227703A1 CN 2017093578 W CN2017093578 W CN 2017093578W WO 2018227703 A1 WO2018227703 A1 WO 2018227703A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
instruction
information
terminal
message instruction
Prior art date
Application number
PCT/CN2017/093578
Other languages
English (en)
French (fr)
Inventor
杜光东
Original Assignee
深圳市盛路物联通讯技术有限公司
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 深圳市盛路物联通讯技术有限公司 filed Critical 深圳市盛路物联通讯技术有限公司
Publication of WO2018227703A1 publication Critical patent/WO2018227703A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/21Monitoring or handling of messages
    • H04L51/212Monitoring or handling of messages using filtering or selective blocking
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/21Monitoring or handling of messages
    • H04L51/214Monitoring or handling of messages using selective forwarding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks

Definitions

  • the present invention relates to the field of Internet of Things technologies, and in particular, to a message delivery method and apparatus in an Internet of Things.
  • the Internet of Things refers to a huge network formed by combining various information such as objects or processes that need to be monitored, connected, and interacted with various information sensing devices.
  • the purpose of the Internet of Things is to realize the connection between objects and objects, objects and people, all items and networks, and to facilitate identification, management and control.
  • AMQP message queue telemetry transmission
  • the subscription protocol is an instant communication protocol, which adopts a lightweight publishing and subscription message transmission mechanism. Compared with other communication protocols, the predetermined protocol is simpler and easier to use, especially suitable for low network bandwidth, high network delay, and network communication. In a restricted environment such as stability.
  • the pre-determined protocol is an important IoT transport protocol that supports all platforms.
  • the present invention provides a message delivery method and apparatus in the Internet of Things to solve the problem of uncertainty in the execution of message instructions sent by three message publishing service quality in the existing predetermined protocol.
  • a method for messaging in an Internet of Things including:
  • the message instruction further includes message delivery path information
  • the method further includes
  • the method further includes:
  • the method further includes:
  • the initiating the inter-day synchronization request to the server further includes:
  • the inter-day synchronization request is periodically initiated to the server according to a preset inter-turn interval.
  • a message delivery apparatus in an Internet of Things including:
  • a receiving module configured to receive a message instruction transmitted by using a predetermined protocol, where the message instruction includes a message sending end information, a message executing end information, a time stamp, and a deadline information;
  • a detecting module configured to detect, according to the inter-postmark and the cut-off information in the message instruction, whether the message instruction is excessive, and according to the message execution end information in the message instruction, detecting whether the current terminal is a message execution end ;
  • an execution module configured to abandon execution if the message instruction is exceeded and the current terminal is a message execution end Transmitting, by the message sending instruction, the super-instruction information to the message sending end according to the message sending end information; if the message instruction is exceeded and the current terminal is not the message executing end, deleting the message instruction, and according to the The message sender information sends the message to the message sender.
  • the message instruction further includes message delivery path information
  • 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:
  • the coverage module is configured to: if the current terminal has an excess message command, overwrite the received message instruction of the current terminal to overwrite the message exceeding the message.
  • a message delivery apparatus in an Internet of Things comprising a memory, a processor, and a computer program stored in the memory and operable on the processor, the processor executing the computer
  • the program implements the steps of the message passing method in the Internet of Things.
  • a computer readable storage medium storing a computer program, the computer program being executed by a processor to implement the step of the message delivery method in the Internet of Things.
  • the present invention has the beneficial effects compared with the prior art: by setting the inter-turn stamp and the cut-off information in the message command transmitted by the predetermined protocol, the received information can be judged according to the inter-turn stamp and the cut-off information. Whether the message instruction is excessive or not, and the over-command message interrupt transmission and the over-hook message are fed back to the message sending end, so that the super-message command will not be executed or continue to be transmitted, thereby saving network transmission traffic and reducing network congestion. Risk, increase the deadline for the message instruction, improve the certainty of the execution of the message instruction transmitted through the predetermined protocol, and has strong ease of use and practicability.
  • FIG. 1 is a schematic diagram of an application environment of a message delivery 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 apparatus 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
  • FIG. 8 is a structural block diagram of a message passing apparatus in an Internet of Things in another embodiment.
  • FIG. 1 is a schematic diagram of an application environment of a message delivery method in an Internet of Things in an embodiment.
  • 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.
  • 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.
  • the server 120 can be connected via 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 send the server to the server. 120 initiates a day synchronization request, and performs a day synchronization according to a response result of the day synchronization request returned by the server 120; the second terminal 130 may initiate a day synchronization request to the server 120, and according to the day synchronization request returned by the server 120 The response results are synchronized.
  • a trigger condition may be preset, and the trigger condition may be: detecting that the user touches the screen at the second terminal 130. After the touch action on the touch is two-point touch and the slide track is vertically relative to the slide, it is determined whether the displacement of the longitudinal sliding of the two touch points is greater than a preset first threshold, and the distance difference between the final touch points of the two touch points is less than a preset second threshold, and whether the speed at which the two touch points slide is greater than a preset third threshold; or after detecting that the touch action is two-touch and the sliding track is sliding in the opposite direction, Determining whether the displacement of the two touch points in the opposite direction is greater than a preset first threshold, whether the distance difference between the two touch points and the final drop point is greater than a preset fourth threshold, and whether the speed of the two touch points slides The same threshold is greater than the preset third threshold.
  • the shell 1 is determined to trigger the second terminal 130 to the server 120.
  • the inter-time synchronization request is initiated; if not (at least one of the above three conditions is "NO"), the execution is not performed, and the current operation is ended.
  • the first terminal 110 is a device that can access a 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:
  • S201 Receive a message instruction transmitted by using a predetermined protocol, where the message instruction includes a message sending end information, a message executing end information, a time stamp, and a deadline information.
  • the predetermined protocol may be a message queue telemetry transmission protocol, or an AMQP (Advanced)
  • the inter-time stamp is a sequence of characters for uniquely identifying the moment when the message instruction is sent. For example, when the message sending end sends a message instruction with an engraving time of 10:00:01, the inter-marking message is recorded in the message instruction. The command is sent at 10:00:01. The deadline information is the absolute and/or cut-off interval at which the message instruction 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 by the predetermined protocol or the message instruction delivered by the intermediate node through the predetermined protocol.
  • the intermediate node refers to the transmission between the message sender and the message execution end.
  • the second terminal can be an intermediate node or a message execution end.
  • S202 Detect whether the message instruction is exceeded according to the inter-postmark and the cut-off information in the message instruction, and detect whether the current terminal is a message execution end according to the message execution end information in the message instruction.
  • 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 absolute time is the deadline for the message instruction to 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 deadline between the deadlines is 05:01:30.
  • the terminal compares the engraving and the deadline of receiving the message instruction, and if the terminal receives the message instruction and the engraving is earlier than the deadline, the message instruction is not exceeded; if the terminal receives The message order is later than the deadline, and the message is over.
  • the moment when the terminal receives the message instruction is 05:01:20, and the message command is not exceeded before the deadline of 05:01:30; the moment when the terminal receives the message instruction is 05:01:35, After the deadline of 05:01:30, the message command has exceeded.
  • the terminal detects whether the message instruction is exceeded according to the inter-turn stamp and the cut-off interval in the message instruction, and the cut-off interval refers to the inter-turn range in which the message instruction is allowed to be executed from the transmission. For example, 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 deadline between the deadlines is 30 seconds.
  • the terminal After receiving the message command, the terminal calculates the inter-turn interval between the moment when the terminal receives the message command and the time stamp record, and if the inter-turn interval is less than the cut-off time, the message command is not exceeded; If the interval is greater than the cutoff interval, the message is overwritten. 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 after the deadline, the message The command is not exceeded; the moment when the terminal receives the message command is 05:01:35, and the interval between the time interval 05:01:00 of the time stamp record is 35 seconds, which is greater than 30 seconds between the deadlines. Then the message instruction has exceeded.
  • the message execution end information in the message instruction is used to detect whether the current terminal is the message execution end.
  • the message execution end information may include an IP (Internet Protocol) protocol, and a MAC (Medium Access Control) address of the message instruction execution terminal. Address, device code, or other information that uniquely identifies the identity of the device.
  • IP Internet Protocol
  • MAC Medium Access Control
  • the message prompting information may be sent to the message execution end according to the message execution end information.
  • deleting the message instruction can save the terminal memory, and can also avoid the retransmission of the message instruction.
  • the terminal sends the message to the message sending end according to the information of the message sending end, so that the message sending end adjusts the message command to be sent according to the feedback information of the message exceeding the feedback.
  • 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 instruction further includes message delivery path information
  • the message delivery method in the Internet of Things includes:
  • S301 Detect whether the message instruction is exceeded according to the inter-postmark and the cut-off information in the message instruction, and detect whether the current terminal is a message execution end according to the message execution end information in the message instruction.
  • 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 absolute time is the deadline for the message instruction to be executed. .
  • the terminal detects whether the message instruction is exceeded according to the inter-turn stamp and the cut-off interval in the message instruction, and the cut-off interval refers to the inter-turn range in which the message instruction is allowed to be executed from the transmission.
  • 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 message delivery path information refers to a node sequence and node information that the message instruction passes through the predetermined 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 delivery 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 delivery path information includes the sequence 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 order and the node information in the message passing path information of the message instruction sent by the A terminal it is detected that the next transmitted node is a C node, and the C node can be directionally searched and the message instruction is sent to the C node, if the message instruction is not exceeded. , detecting that the next transmitted node is a D node, and then locating the D node and sending a message instruction to the D node. If the message instruction is not exceeded, detecting that the next transmitted node is a 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.
  • 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 diurnal 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 can perform synchronization with the daytime synchronization server
  • the intermediate node can synchronize with the daytime synchronization server
  • the message executing end can 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 passes through the network
  • the synchronization server initiates the synchronization message to realize the synchronization between the terminal and the synchronization server, so that the entire system is in the same inter-dimension dimension, and the message order generation and execution in the inter-dimension dimension are avoided due to the asynchronous synchronization between the terminals. confusion.
  • 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.
  • different values of the inter-turn interval can be selected according to the system environment. For example, the deadline for the message command is 30 seconds, and the inter-sync request can be initiated to the server every other day; the deadline for the message command is 2 minutes, and the inter-day synchronization request can be initiated to the server every 15 days.
  • the terminal periodically sends the inter-day 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.
  • 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 501 is configured to receive a message instruction transmitted by using a predetermined protocol, where the message instruction includes a message sending end information, a message executing end information, a time stamp, and a deadline information.
  • the predetermined protocol may be a message queue telemetry transmission protocol, or an advanced message queue protocol, etc.
  • the inter-turn stamp is a sequence of characters used to uniquely identify the engraving of the message command transmission.
  • the deadline information refers to the absolute and/or cut-off interval between message orders 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 by the predetermined protocol or the message instruction delivered by the intermediate node through the predetermined protocol.
  • the intermediate node 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 detecting module 502 is configured to detect, according to the inter-postmark and the cut-off information in the message instruction, whether the message instruction is excessive, and whether the current terminal is the message execution end according to the message execution end information in the message instruction. [0091] Specifically, the terminal detects, according to the inter-post stamp and the excess time in the message instruction, whether the message instruction is excessive
  • the terminal detects whether the message instruction is exceeded according to the inter-turn stamp and the cut-off interval in the message instruction, and the cut-off interval refers to the inter-turn range in which the message instruction is allowed to be executed from the transmission.
  • the message execution end information in the message instruction is used to detect whether the current terminal is the message execution end.
  • the message execution end information may include an IP address, a MAC address, a device code, or other information that can uniquely identify the identity of the device.
  • the executing module 503 is 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; if the message command has been If the current terminal is not the message execution end, the message instruction is deleted, and the message prompt message is sent to the message sender according to the message sender information.
  • deleting the message instruction can save the terminal memory, and can also avoid the retransmission of 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 device in the above Internet of Things can determine whether the received message command is excessive according to the inter-turn stamp and the cut-off information by setting the inter-time stamp and the cut-off information in the message command transmitted by the predetermined protocol.
  • the over-command message interrupt transmission and the over-cue prompt information are fed back to the message sending end, so that the super-message command will not be executed or continue to be transmitted, saving network transmission traffic, reducing the risk of network congestion, and increasing the message command.
  • the determination of the execution of the message instructions transmitted through the predetermined protocol is improved by the deadline.
  • the message instruction further includes message delivery path information
  • the execution module 503 is further configured to: if the message instruction is not exceeded, and the current terminal is a message execution end, execute the message instruction; if the message instruction is not exceeded and the current terminal is not the message execution end,
  • the message passing path information conveys the message instruction.
  • 6 is a structural block diagram of a message passing apparatus in an Internet of Things in another embodiment. As shown in FIG. 6, in an embodiment, the message delivery device in the Internet of Things includes:
  • the receiving module 601 is configured to receive a message instruction that is transmitted by using a predetermined protocol, where the message instruction includes a message sending end information, a message executing end information, a time stamp, and a deadline information.
  • the detecting module 602 is configured to detect, according to the inter-postmark and the cut-off information in the message instruction, whether the message instruction is excessive, and whether the current terminal is the message execution end according to the message execution end information in the message instruction.
  • the executing module 603 is configured to: if the message command has been exceeded and the current terminal is the 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; if the message command has been If the current terminal is not the message execution end, the message instruction is deleted, and the message prompt message is sent to the message sender according to the message sender information.
  • the message instruction further includes message delivery path information, where
  • the execution module 603 is further configured to: if the message instruction is not exceeded, and the current terminal is a message execution end, execute the message instruction; if the message instruction is not exceeded and the current terminal is not the message execution end, The message passing path information conveys the message instruction.
  • the overlay module 604 is configured to overwrite the received message instruction of the current terminal to overwrite the message instruction if the current terminal has a message exceeding the message.
  • the terminal uses the received message command to overwrite the message command that has been exceeded, and no longer transmits the message command that has passed the message, thereby saving network traffic and reducing the risk of network congestion.
  • a messaging device in the Internet of Things includes:
  • the receiving module 701 is configured to receive a message instruction that is transmitted by using a predetermined protocol, where the message instruction includes a message sending end information, a message executing end information, a time stamp, and a deadline information.
  • the detecting module 702 is configured to detect, according to the inter-postmark and the cut-off information in the message instruction, whether the message instruction is excessive, and whether the current terminal is the message execution end according to the message execution end information in the message instruction.
  • the executing module 703 is configured to: if the message command has been exceeded and the current terminal is the 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; If the command is exceeded and the current terminal is not the message execution end, the message instruction is deleted, and the message prompt message is sent to the message sender according to the message sender information.
  • the message instruction further includes message delivery path information
  • the execution module 703 is further configured to: if the message instruction is not exceeded, and the current terminal is a message execution end, execute the message instruction; if the message instruction is not exceeded and the current terminal is not a message execution end, The message passing path information conveys the message instruction.
  • the requesting module 704 is configured to initiate a inter-day synchronization request to the server;
  • the receiving module 701 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 between 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 between 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 704 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.
  • FIG. 8 is a structural block diagram of a message passing apparatus in an Internet of Things in another embodiment. As shown, one or more processors 801 (only one shown); one or more input devices 802
  • processor 801 input device 802, output device 803, and memory 804 are connected by a bus 805.
  • Memory 804 is used to store instructions, and processor 801 is used to execute instructions stored in memory 804. among them:
  • the input device 802 is configured to receive a message instruction transmitted by using a predetermined protocol, where the message instruction includes message sending end information, message executing end information, inter-time stamp, and cut-off information;
  • the processor 801 is configured to detect, according to the inter-postmark and the cut-off information in the message instruction, whether the message instruction is excessive, and whether the current terminal is detected according to the message execution end information in the message instruction. Message execution end. [0125] The processor 801 is further configured to: when the message instruction is exceeded and the current terminal is a message execution end, abandon the execution of the message instruction, and pass the message prompt information according to the message sending end information.
  • the output device 803 sends the message to the sender;
  • the message instruction further includes message delivery path information, where the processor 801 is further configured to execute the message instruction when the message instruction is not exceeded and the current terminal is a message execution end. And when the message instruction is not exceeded and the current terminal is not the message execution end, the message instruction is delivered according to the message delivery path information.
  • the processor 801 is further configured to: if the current terminal has an excess message instruction, overwrite the received message instruction to the over-the-top message instruction.
  • the processor 801 is further configured to: initiate, by the output device 803, a synchronization request to the server, and receive, by using the input device 802, a response result of the synchronization request returned by the server, according to the The response results are synchronized.
  • the processor 801 periodically sends a inter-time synchronization request to the server according to the preset inter-time interval by the output device 803.
  • the predetermined protocol may be a message queue telemetry transmission protocol, or an advanced message queue protocol.
  • the inter-time stamp is a sequence of characters used to uniquely identify the engraving of a message instruction transmission.
  • the deadline information refers to the absolute and/or cut-off interval between message orders 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 by the predetermined protocol or the message instruction delivered by the intermediate node through the predetermined protocol.
  • the intermediate node 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 absolute time is the deadline for the message instruction to be executed.
  • the terminal detects whether the message instruction is exceeded according to the inter-turn stamp and the cut-off interval in the message instruction, and the cut-off interval refers to the inter-turn range in which the message instruction is allowed to be executed from the transmission. [0136] In addition, in detecting whether the message is excessive, the message execution end information in the message instruction is used to detect whether the current terminal is the message execution end.
  • the message execution end information may include an IP address, a MAC address, a device code, or other information capable of uniquely identifying the identity of the device.
  • deleting the message instruction may save the terminal memory, and may also avoid retransmission of 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 exceeding the prompt 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 server responds after receiving the chime synchronization message, and returns the response packet, the inter-time stamp of the chi-clock synchronization message, and the inter-post stamp of the response message to the terminal; the terminal receives The inter-post stamp of the received response message is recorded after the 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 includes a message sending end, an intermediate node, and a message executing end
  • the message sending end can perform synchronization with the daytime synchronization server
  • the intermediate node can synchronize with the daytime synchronization server
  • the message execution end can 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 server and the terminal form a closed system, and each terminal in the system initiates the synchronization between the terminal and the daytime synchronization server by initiating a clock synchronization message to the synchronization server, so that the entire system is in the same state.
  • the dimension is to avoid the confusion of the message order generation and execution in the diurnal dimension caused by the unsynchronization between the terminals.
  • the memory 804 is configured to store a software program and a module.
  • the processor 801 executes various functional applications and data processing by running software programs and modules stored in the memory 804.
  • the processor 801 may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors. (Digital Signal Processor, DSP), Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware Components, etc.
  • the general purpose processor may be a microprocessor or the processor or any conventional processor or the like.
  • the input device 802 can include a touchpad, a fingerprint sensor (for collecting fingerprint information of the user and direction information of the fingerprint), a microphone, a data receiving interface, and the like.
  • the output device 803 can include a display (LC D, etc.), a speaker, a data transmission interface, and the like.
  • the memory 804 can include read only memory and random access memory and provides instructions and data to the processor 501.
  • a portion of memory 804 may also include non-volatile random access memory.
  • the memory 804 can also store information of the device type.
  • the processor 801, the input device 802, the output device 803, and the memory 804 described in the embodiments of the present invention may be described in the embodiment of the message delivery method in the Internet of Things provided by the embodiment of the present invention. The implementation of this will not be repeated here.
  • the embodiment of the present invention by setting the inter-time stamp and the cut-off information in the message command transmitted by the predetermined protocol, it is possible to determine whether the received message command is exceeded according to the inter-turn stamp and the cut-off information. , and the super-message instruction interrupt transmission and the over-cue prompt information are fed back to the message sending end, so that the super-message message instruction will not be executed or continue to be transmitted, thereby saving network transmission traffic and reducing the risk of network congestion, and the message instruction
  • the increase of the cut-off time judgment improves the certainty of the execution of the message instruction transmitted through the predetermined protocol, and has strong usability and practicability.
  • the disclosed apparatus and method may be implemented in other manners.
  • the system embodiment described above is merely illustrative.
  • the division of the module or unit is only a logical function division, and the actual implementation may have another division manner, for example, multiple units or components may be used. Combine or can be integrated into another system, or some features Can be ignored, or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • the unit described as a separate component may or may not be physically distributed, and the component displayed as a unit may or may not be a physical unit, that is, may be located in one place, or may be distributed to multiple On the network unit. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • the medium includes a plurality of instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor to perform all or part of the steps of the methods of the various embodiments of the embodiments of the present invention.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (R 0M, Read-Only Memory), a random access memory (RAM), a magnetic disk or an optical disk, and the like, which can store program codes. medium.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Computer And Data Communications (AREA)

Abstract

本方案属于物联网技术领域,涉及一种物联网中消息传递方法和装置,所述方法包括:接收消息指令,所述消息指令中包括消息发送端信息、消息执行端信息、时间戳和截止时间信息;根据所述消息指令中时间戳和截止时间信息检测所述消息指令是否超时,以及根据所述消息指令中消息执行端信息检测当前终端是否为消息执行端;若所述消息指令已超时且当前终端是消息执行端,则放弃执行所述消息指令,并根据所述消息发送端信息将超时提示信息发送给消息发送端;若所述消息指令已超时且当前终端不是消息执行端,则删除所述消息指令,并根据所述消息发送端信息将超时提示信息发送给消息发送端。本方案提高了通过预定协议传输的消息指令执行情况的确定性。

Description

发明名称:物联网中消息传递方法和装置
技术领域
[0001] 本发明涉及物联网技术领域, 特别是涉及一种物联网中消息传递方法和装置。
背景技术
[0002] 物联网是指通过各种信息传感设备, 实吋采集任何需要监控、 连接、 互动的物 体或过程等各种需要的信息, 与互联网结合形成的一个巨大网络。 物联网的目 的是实现物与物、 物与人, 所有的物品与网络的连接, 方便识别、 管理和控制
[0003] 传统的物联网消息传递中, 多采用预定协议, 例如消息队列遥测传输、 AMQP
(Advanced Message Queuing Protocol先进消息队列协议) 等。 预定协议是一个 即吋通讯协议, 采用轻量级发布和订阅消息传输机制, 相比于其他通讯协议, 预定协议更为简约、 易于使用, 特别适用于网络带宽低、 网络延迟高、 网络通 信不稳定等受限环境中。 预定协议作为重要的物联网传输协议, 支持所有平台 。 预定协议支持三种消息发布服务质量。 其中, QoS (Quality of Service, 服务 质量) =0, 消息发送完即丢弃, 会导致消息丢失或重复; QoS=l, 消息发送后需 要确认回复, 确保消息到达, 可能导致消息重复; QoS=2, 消息发送后需要确认 回复, 确保消息到达一次。 但在物联网环境中, 由于网络带宽低、 网络延迟高 和网络通信不稳定等因素, 常造成消息传递缓慢, 因此, 预定协议中三种消息 发布服务质量所发送的消息指令执行情况具有不确定性。
技术问题
[0004] 基于此, 本发明提供一种物联网中消息传递方法和装置, 以解决现有预定协议 中三种消息发布服务质量所发送的消息指令执行情况具有不确定性的问题。 问题的解决方案
技术解决方案
[0005] 一方面, 提供一种物联网中消息传递方法, 包括:
[0006] 接收通过预定协议传输的消息指令, 所述消息指令中包括消息发送端信息、 消 息执行端信息、 吋间戳和截止吋间信息;
[0007] 根据所述消息指令中吋间戳和截止吋间信息检测所述消息指令是否超吋, 以及 根据所述消息指令中消息执行端信息检测当前终端是否为消息执行端;
[0008] 若所述消息指令已超吋且当前终端是消息执行端, 则放弃执行所述消息指令, 并根据所述消息发送端信息将超吋提示信息发送给消息发送端;
[0009] 若所述消息指令已超吋且当前终端不是消息执行端, 则刪除所述消息指令, 并 根据所述消息发送端信息将超吋提示信息发送给消息发送端。
[0010] 在一个实施例中, 所述消息指令中还包括消息传递路径信息, 所述方法还包括
[0011] 若所述消息指令未超吋且当前终端是消息执行端, 则执行所述消息指令; [0012] 若所述消息指令未超吋且当前终端不是消息执行端, 则根据所述消息传递路径 信息传递所述消息指令。
[0013] 在一个实施例中, 所述方法还包括:
[0014] 若当前终端存在已超吋消息指令, 将接收的所述当前终端存在的消息指令覆盖 所述已超吋消息指令。
[0015] 在一个实施例中, 所述方法还包括:
[0016] 向服务器发起吋间同步请求;
[0017] 接收所述服务器返回的所述吋间同步请求的响应结果, 根据所述响应结果进行 吋间同步。
[0018] 在一个实施例中, 所述向服务器发起吋间同步请求还包括:
[0019] 根据预设的吋间间隔定期向服务器发起吋间同步请求。
[0020] 第二方面, 提供一种物联网中消息传递装置, 包括:
[0021] 接收模块, 用于接收通过预定协议传输的消息指令, 所述消息指令中包括消息 发送端信息、 消息执行端信息、 吋间戳和截止吋间信息;
[0022] 检测模块, 用于根据所述消息指令中吋间戳和截止吋间信息检测所述消息指令 是否超吋, 以及根据所述消息指令中消息执行端信息检测当前终端是否为消息 执行端;
[0023] 执行模块, 用于若所述消息指令已超吋且当前终端是消息执行端, 则放弃执行 所述消息指令, 并根据所述消息发送端信息将超吋提示信息发送给消息发送端 ; 若所述消息指令已超吋且当前终端不是消息执行端, 则刪除所述消息指令, 并根据所述消息发送端信息将超吋提示信息发送给消息发送端。
[0024] 在一个实施例中, 所述消息指令中还包括消息传递路径信息,
[0025] 所述执行模块还用于若所述消息指令未超吋且当前终端是消息执行端, 则执行 所述消息指令; 若所述消息指令未超吋且当前终端不是消息执行端, 则根据所 述消息传递路径信息传递所述消息指令。
[0026] 在一个实施例中, 所述装置还包括:
[0027] 覆盖模块, 用于若当前终端存在已超吋消息指令, 将接收的所述当前终端存在 的消息指令覆盖所述已超吋消息指令。
[0028] 第三方面, 提供一种物联网中消息传递装置, 包括存储器、 处理器以及存储在 所述存储器中并可在所述处理器上运行的计算机程序, 所述处理器执行所述计 算机程序吋实现所述物联网中消息传递方法的步骤。
[0029] 第四方面, 提供一种计算机可读存储介质, 所述计算机可读存储介质存储有计 算机程序, 所述计算机程序被处理器执行吋实现所述物联网中消息传递方法的 步骤。
发明的有益效果
有益效果
[0030] 本发明与现有技术相比存在的有益效果是: 通过在预定协议传输的消息指令中 设置吋间戳和截止吋间信息, 可根据吋间戳和截止吋间信息判断接收到的消息 指令是否超吋, 并将超吋消息指令中断传输、 超吋提示信息反馈给消息发送端 , 使得超吋消息指令不会被执行或继续传递下去, 节省了网络传输流量、 降低 了网络拥堵的风险, 对消息指令增加截止吋间判断, 提高了通过预定协议传输 的消息指令执行情况的确定性, 具有较强的易用性和实用性。
对附图的简要说明
附图说明
[0031] 为了更清楚地说明本发明实施例中的技术方案, 下面将对实施例或现有技术描 述中所需要使用的附图作简单地介绍, 显而易见地, 下面描述中的附图仅仅是 本发明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创造性劳动性 的前提下, 还可以根据这些附图获得其他的附图。
[0032] 图 1为一个实施例中物联网中消息传递方法的应用环境示意图;
[0033] 图 2为一个实施例中物联网中消息传递方法的流程图;
[0034] 图 3为另一个实施例中物联网中消息传递方法的流程图;
[0035] 图 4为另一个实施例中物联网中消息传递方法的流程图;
[0036] 图 5为一个实施例中物联网中消息传递装置的结构框图;
[0037] 图 6为另一个实施例中物联网中消息传递装置的结构框图;
[0038] 图 7为另一个实施例中物联网中消息传递装置的结构框图;
[0039] 图 8为另一个实施例中物联网中消息传递装置的结构框图。
本发明的实施方式
[0040] 以下描述中, 为了说明而不是为了限定, 提出了诸如特定系统结构、 技术之类 的具体细节, 以便透彻理解本发明实施例。 然而, 本领域的技术人员应当清楚 , 在没有这些具体细节的其它实施例中也可以实现本发明。 在其它情况中, 省 略对众所周知的系统、 装置、 电路以及方法的详细说明, 以免不必要的细节妨 碍本发明的描述。
[0041] 为了说明本发明所述的技术方案, 下面通过具体实施例来进行说明。
[0042] 图 1为一个实施例中物联网中消息传递方法的应用环境示意图。
[0043] 如图 1所示, 该应用环境包括第一终端 110、 服务器 120、 第二终端 130。 第一终 端 110与第二终端 130之间可通过互联网连接, 第一终端 110和第二终端 130之间 可进行消息交换和通信, 第一终端 110可通过互联网连接服务器 120, 第二终端 1 30可通过互联网连接服务器 120。
[0044] 第一终端 110将消息指令发送给第二终端 130, 第二终端 130根据消息指令中信 息对消息指令进行检测, 并根据不同的检测结果执行相应的操作; 第一终端 110 可向服务器 120发起吋间同步请求, 并根据服务器 120返回的吋间同步请求的响 应结果进行吋间同步; 第二终端 130可向服务器 120发起吋间同步请求, 并根据 服务器 120返回的吋间同步请求的响应结果进行吋间同步。 [0045] 在本发明实施例中, 第二终端 130在向服务器 120发起吋间同步请求之前, 可以 预先设定一个触发条件, 所述触发条件可以为: 在监测到用户在第二终端 130触 摸屏上的触摸动作为两点触摸且滑动轨迹为纵向相对滑动后, 判断两触摸点纵 向相对滑动的位移是否同吋大于预设的第一阈值、 所述两触摸点最终落点的距 离差是否小于预设的第二阈值、 且所述两触摸点滑动的速度是否同吋大于预设 的第三阈值; 或者在监测到所述触摸动作为两点触摸且所述滑动轨迹为相反方 向滑动后, 判断两触摸点相反方向滑动的位移是否同吋大于预设的第一阈值、 所述两触摸点最终落点的距离差是否大于预设的第四阈值、 且所述两触摸点滑 动的速度是否同吋大于预设的第三阈值, 若是 (即上述三个条件判断结果都为" 是") , 贝 1」判定为触发第二终端 130向服务器 120发起吋间同步请求; 若否 (上述 三个条件的判断结果至少有一个为"否") , 则不执行, 结束当前操作。
[0046] 其中, 第一终端 110为能接入网络且能发送消息指令的设备, 如移动智能终端 、 车载智能终端、 可穿戴设备和个人数字助理等。 第二终端 130为能接入网络且 能接收消息指令的设备, 如带有 RFID (Radio Frequency Identification, 射频识别 ) 标签的电冰箱、 带有 RFID标签的洗衣机和带有 RFID标签的空调等。
[0047] 图 2为一个实施例中物联网中消息传递方法的流程图。 如图 2所示, 一种物联网 中消息传递方法, 运行于图 1中的第二终端, 包括:
[0048] S201 , 接收通过预定协议传输的消息指令, 消息指令中包括消息发送端信息、 消息执行端信息、 吋间戳和截止吋间信息。
[0049] 其中, 所述预定协议可以为消息队列遥测传输协议, 或者 AMQP (Advanced
Message Queuing Protocol先进消息队列协议) 等。
[0050] 吋间戳是一个字符序列, 用于唯一的标识消息指令发送的吋刻, 例如, 消息发 送端发送消息指令的吋刻为 10:00:01, 则消息指令中吋间戳记录消息指令发送吋 刻为 10:00:01。 截止吋间信息是指消息指令能被执行的超吋绝对吋间和 /或截止吋 间间隔。 消息发送端是指发送消息指令的终端。 消息执行端是指执行消息指令 的终端。
[0051] 第二终端接收消息发送端通过预定协议发送的消息指令或中间节点通过预定协 议传递的消息指令。 其中, 中间节点是指消息发送端和消息执行端之间传递消 息指令的终端。 第二终端可为中间节点或消息执行端。
[0052] S202, 根据所述消息指令中吋间戳和截止吋间信息检测所述消息指令是否超吋 , 以及根据所述消息指令中消息执行端信息检测当前终端是否为消息执行端。
[0053] 具体地, 终端根据消息指令中吋间戳和超吋绝对吋间来检测消息指令是否超吋 , 超吋绝对吋间是指消息指令能被执行的截止吋间。 例如, 消息发送端生成消 息指令的吋刻为 05:01:00, 设置该消息指令能被执行的超吋绝对吋间是 05:01:30 , 则消息指令中吋间戳记录的吋刻为 05:01:00, 截止吋间信息中记录的截止吋间 为 05:01:30。 终端在接收到消息指令后, 将终端接收到消息指令的吋刻与截止吋 间进行对比, 若终端接收到消息指令的吋刻早于截止吋间, 则消息指令未超吋 ; 若终端接收到消息指令的吋刻晚于截止吋间, 则消息已超吋。 例如, 终端接 收到消息指令的吋刻为 05:01:20, 早于截止吋间 05:01:30, 则消息指令未超吋; 终端接收到消息指令的吋刻为 05:01:35, 晚于截止吋间 05:01:30, 则消息指令已 超吋。
[0054] 在一个实施例中, 终端根据消息指令中吋间戳和截止吋间间隔来检测消息指令 是否超吋, 截止吋间间隔是指消息指令从发送起允许被执行的吋间范围。 例如 , 消息发送端生成消息指令的吋刻为 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秒, 则消息指令已超吋。
[0055] 另外, 在检测消息是否超吋的同吋, 根据消息指令中消息执行端信息检测当前 终端是否为消息执行端。
[0056] 具体地, 消息执行端信息可包括消息指令执行终端的 IP (Internet Protocol, 网 络之间互连的协议) 地址、 MAC (Medium Access Control, 媒体访问控制) 地 址、 设备编码或其他能唯一标识设备身份的信息。
[0057] S203 , 若消息指令已超吋且当前终端是消息执行端, 则放弃执行消息指令, 并 根据消息发送端信息将超吋提示信息发送给消息发送端。
[0058] S204, 若消息指令已超吋且当前终端不是消息执行端, 则刪除所述消息指令, 并根据消息发送端信息将超吋提示信息发送给消息发送端。
[0059] 可选的, 还可以根据所述消息执行端信息将超吋提示信息发送给消息执行端。
[0060] 需要说明的是, 刪除所述消息指令即可节约终端内存, 也可避免所述消息指令 的再次传输。
[0061] 本实施例中, 若消息指令已超吋, 终端根据消息发送端信息将超吋提示信息发 送给消息发送端, 以使消息发送端根据反馈的超吋提示信息调整所要发送的消 息指令。 超吋提示信息是指反馈给消息发送端该消息指令已超吋不再传输或该 消息指令已超吋不再执行的信息。
[0062] 上述物联网中消息传递方法, 通过在预定协议传输的消息指令中设置吋间戳和 截止吋间信息, 可根据吋间戳和截止吋间信息判断接收到的消息指令是否超吋 , 并将超吋消息指令中断传输、 超吋提示信息反馈给消息发送端, 使得超吋消 息指令不会被执行或继续传递下去, 节省了网络传输流量、 降低了网络拥堵的 风险, 对消息指令增加截止吋间判断, 提高了通过预定协议传输的消息指令执 行情况的确定性。
[0063] 图 3为另一个实施例中物联网中消息传递方法的流程图。 如图 3所示, 在一个实 施例中, 消息指令中还包括消息传递路径信息, 上述物联网中消息传递方法还 包括:
[0064] S301, 根据所述消息指令中吋间戳和截止吋间信息检测所述消息指令是否超吋 , 以及根据所述消息指令中消息执行端信息检测当前终端是否为消息执行端。
[0065] 具体地, 终端根据消息指令中吋间戳和超吋绝对吋间来检测消息指令是否超吋 , 超吋绝对吋间是指消息指令能被执行的截止吋间。 。
[0066] 在一个实施例中, 终端根据消息指令中吋间戳和截止吋间间隔来检测消息指令 是否超吋, 截止吋间间隔是指消息指令从发送起允许被执行的吋间范围。
[0067] 另外, 在检测消息是否超吋的同吋, 根据消息指令中消息执行端信息检测当前 终端是否为消息执行端。
[0068] 具体地, 消息执行端信息可包括消息指令执行终端的 IP (Internet Protocol, 网 络之间互连的协议) 地址、 MAC (Medium Access Control, 媒体访问控制) 地 址、 设备编码或其他能唯一标识设备身份的信息。
[0069] S302, 若消息指令未超吋且当前终端是消息执行端, 则执行消息指令。
[0070] S303 , 若消息指令未超吋且当前终端不是消息执行端, 则根据消息传递路径信 息传递消息指令。
[0071] 具体地, 消息传递路径信息是指消息指令通过预定协议由消息发送端传递到消 息执行端所经过的节点顺序和节点信息, 可依据消息传递路径信息中的节点顺 序和节点信息査找消息指令传递的下一个节点。 其中, 节点信息可包括节点的 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终端。
[0072] 在一个实施例中, 上述物联网中消息传递方法还包括: 若当前终端存在已超吋 消息指令, 将接收的消息指令覆盖已超吋消息指令。
[0073] 本实施例中, 终端用接收到的消息指令覆盖已超吋的消息指令, 不再将已超吋 的消息指令继续传递, 节省了网络流量、 减少了网络拥堵的风险。
[0074] 图 4为另一个实施例中物联网中消息传递方法的流程图。 如图 4所示, 在一个实 施例中, 上述物联网中消息传递方法还包括:
[0075] S402, 向服务器发起吋间同步请求。 [0076] 具体地, 终端向服务器发送吋钟同步报文, 报文是指网络中交换与传输的数据 单元, 即站点一次性要发送的数据块, 吋钟同步报文中可包括吋间同步请求和 终端发送吋钟同步报文的吋间戳。
[0077] 其中, 服务器是指吋间同步服务器, 吋间同步服务器是一种可独立基于 NTP ( Network Time Protocol, 网络吋间协议) /SNTP (Simple Network Time Protocol, 简单网络吋间协议) 协议工作的吋间服务器。 吋间同步服务器从 GPS (Global Positioning System, 全球定位系统) 卫星上获取标准吋钟信号信息, 并将信号信 息在网络中传输, 实现网络中终端与吋间同步服务器吋间同步。
[0078] S404, 接收服务器返回的吋间同步请求的响应结果, 根据响应结果进行吋间同 步。
[0079] 具体地, 吋间同步服务器在接收到吋钟同步报文后作出响应, 并将响应报文、 接收吋钟同步报文的吋间戳和发送响应报文的吋间戳返回终端; 终端接收到响 应报文后记录接收响应报文的吋间戳。 终端可根据吋钟同步报文、 响应报文、 发送吋钟同步报文的吋间戳、 发送响应报文的吋间戳、 接收吋钟同步报文的吋 间戳和接收响应报文的吋间戳计算传输吋延和同步误差, 实现终端吋间与吋间 同步服务器吋间的精准同步。 例如, 终端吋间为 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小吋, 终端再跟据计算的吋间差进行 吋间同步。
[0080] 其中, 终端包括消息发送端、 中间节点和消息执行端, 消息发送端可与吋间同 步服务器进行吋间同步、 中间节点可与吋间同步服务器进行吋间同步、 消息执 行端可与吋间同步服务器进行吋间同步, 从而实现消息发送端、 中间节点和消 息执行端的吋间精准同步。
[0081] 本实施中, 吋间同步服务器与终端组成封闭式系统, 系统中各终端通过向吋间 同步服务器发起吋钟同步报文实现终端与吋间同步服务器的吋间同步, 从而实 现整个系统处于同一吋间维度, 避免因各终端吋间不同步造成消息指令产生和 执行在吋间维度上的混乱。
[0082] 在一个实施例中, 上述物联网中消息传递方法还包括: 根据预设的吋间间隔定 期向服务器发起吋间同步请求。
[0083] 具体地, 预设的吋间间隔包括多个吋间间隔的数值, 例如预设的吋间间隔可为 1天、 3天、 7天、 15天和 30天。 在物联网系统中, 可根据系统环境选择不同的吋 间间隔的数值。 例如, 消息指令的截止吋间为 30秒, 可每隔 1天向服务器发起吋 间同步请求; 消息指令的截止吋间为 2分钟, 可每隔 15天向服务器发起吋间同步 请求。
[0084] 本实施例中, 终端定期向吋间同步服务器发送吋间同步报文实现吋间同步, 避 免了终端由于计吋不准导致的各终端之间吋间误差过大, 从而造成消息指令不 能准确执行的情况。
[0085] 图 5为一个实施例中物联网中消息传递装置的结构框图。 如图 5所示, 一种物联 网中消息传递装置, 运行于图 1的第二终端上, 为实现图 2的物联网中消息传递 方法所架构的虚拟装置, 包括:
[0086] 接收模块 501, 用于接收通过预定协议传输的消息指令, 消息指令中包括消息 发送端信息、 消息执行端信息、 吋间戳和截止吋间信息。
[0087] 其中, 所述预定协议可以为消息队列遥测传输协议, 或者先进消息队列协议等
[0088] 吋间戳是一个字符序列, 用于唯一的标识消息指令发送的吋刻。 截止吋间信息 是指消息指令能被执行的超吋绝对吋间和 /或截止吋间间隔。 消息发送端是指发 送消息指令的终端。 消息执行端是指执行消息指令的终端。
[0089] 第二终端接收消息发送端通过预定协议发送的消息指令或中间节点通过预定协 议传递的消息指令。 其中, 中间节点是指消息发送端和消息执行端之间传递消 息指令的终端。 第二终端可为中间节点或消息执行端。
[0090] 检测模块 502, 用于根据消息指令中吋间戳和截止吋间信息检测消息指令是否 超吋, 以及根据消息指令中消息执行端信息检测当前终端是否为消息执行端。 [0091] 具体地, 终端根据消息指令中吋间戳和超吋绝对吋间来检测消息指令是否超吋
, 超吋绝对吋间是指消息指令能被执行的截止吋间。
[0092] 在一个实施例中, 终端根据消息指令中吋间戳和截止吋间间隔来检测消息指令 是否超吋, 截止吋间间隔是指消息指令从发送起允许被执行的吋间范围。
[0093] 另外, 在检测消息是否超吋的同吋, 根据消息指令中消息执行端信息检测当前 终端是否为消息执行端。
[0094] 具体地, 消息执行端信息可包括消息指令执行终端的 IP地址、 MAC地址、 设备 编码或其他能唯一标识设备身份的信息。
[0095] 执行模块 503, 用于若消息指令已超吋且当前终端是消息执行端, 则放弃执行 消息指令, 并根据消息发送端信息将超吋提示信息发送给消息发送端; 若消息 指令已超吋且当前终端不是消息执行端, 则刪除消息指令, 并根据消息发送端 信息将超吋提示信息发送给消息发送端。
[0096] 需要说明的是, 刪除所述消息指令即可节约终端内存, 也可避免所述消息指令 的再次传输。
[0097] 本实施例中, 若消息指令已超吋, 终端根据消息发送端信息将超吋提示信息发 送给消息发送端, 以使消息发送端根据反馈的超吋提示信息调整所要发送的消 息指令。 超吋提示信息是指反馈给消息发送端该消息指令已超吋不再传输或该 消息指令已超吋不再执行的信息。
[0098] 上述物联网中消息传递装置, 通过在预定协议传输的消息指令中设置吋间戳和 截止吋间信息, 可根据吋间戳和截止吋间信息判断接收到的消息指令是否超吋 , 并将超吋消息指令中断传输、 超吋提示信息反馈给消息发送端, 使得超吋消 息指令不会被执行或继续传递下去, 节省了网络传输流量、 降低了网络拥堵的 风险, 对消息指令增加截止吋间判断, 提高了通过预定协议传输的消息指令执 行情况的确定性。
[0099] 在一个实施例中, 所述消息指令中还包括消息传递路径信息,
[0100] 执行模块 503还用于若所述消息指令未超吋且当前终端是消息执行端, 则执行 所述消息指令; 若所述消息指令未超吋且当前终端不是消息执行端, 则根据所 述消息传递路径信息传递所述消息指令。 [0101] 图 6为另一个实施例中物联网中消息传递装置的结构框图。 如图 6所示, 在一个 实施例中, 上述物联网中消息传递装置, 包括:
[0102] 接收模块 601、 检测模块 602、 执行模块 603和覆盖模块 604, 其中:
[0103] 接收模块 601, 用于接收通过预定协议传输的消息指令, 消息指令中包括消息 发送端信息、 消息执行端信息、 吋间戳和截止吋间信息。
[0104] 检测模块 602, 用于根据消息指令中吋间戳和截止吋间信息检测消息指令是否 超吋, 以及根据消息指令中消息执行端信息检测当前终端是否为消息执行端。
[0105] 执行模块 603, 用于若消息指令已超吋且当前终端是消息执行端, 则放弃执行 消息指令, 并根据消息发送端信息将超吋提示信息发送给消息发送端; 若消息 指令已超吋且当前终端不是消息执行端, 则刪除消息指令, 并根据消息发送端 信息将超吋提示信息发送给消息发送端。
[0106] 在一个实施例中, 所述消息指令中还包括消息传递路径信息,
[0107] 执行模块 603还用于若所述消息指令未超吋且当前终端是消息执行端, 则执行 所述消息指令; 若所述消息指令未超吋且当前终端不是消息执行端, 则根据所 述消息传递路径信息传递所述消息指令。
[0108] 覆盖模块 604用于若当前终端存在已超吋消息指令, 将接收到的所述当前终端 存在的消息指令覆盖已超吋消息指令。
[0109] 本实施例中, 终端用接收到的消息指令覆盖已超吋的消息指令, 不再将已超吋 的消息指令继续传递, 节省了网络流量、 减少了网络拥堵的风险。
[0110] 图 7为另一个实施例中物联网中消息传递装置的结构框图。 如图 7所示, 在一个 实施例中, 一种物联网中消息传递装置, 包括:
[0111] 接收模块 701、 检测模块 702、 执行模块 703和请求模块 704, 其中:
[0112] 接收模块 701, 用于接收通过预定协议传输的消息指令, 消息指令中包括消息 发送端信息、 消息执行端信息、 吋间戳和截止吋间信息。
[0113] 检测模块 702, 用于根据消息指令中吋间戳和截止吋间信息检测消息指令是否 超吋, 以及根据消息指令中消息执行端信息检测当前终端是否为消息执行端。
[0114] 执行模块 703, 用于若消息指令已超吋且当前终端是消息执行端, 则放弃执行 消息指令, 并根据消息发送端信息将超吋提示信息发送给消息发送端; 若消息 指令已超吋且当前终端不是消息执行端, 则刪除消息指令, 并根据消息发送端 信息将超吋提示信息发送给消息发送端。
[0115] 在一个实施例中, 所述消息指令中还包括消息传递路径信息,
[0116] 执行模块 703还用于若所述消息指令未超吋且当前终端是消息执行端, 则执行 所述消息指令; 若所述消息指令未超吋且当前终端不是消息执行端, 则根据所 述消息传递路径信息传递所述消息指令。
[0117] 请求模块 704用于向服务器发起吋间同步请求;
[0118] 接收模块 701还用于接收服务器返回的吋间同步请求的响应结果, 根据响应结 果进行吋间同步。
[0119] 本实施中, 吋间同步服务器与终端组成封闭式系统, 系统中各终端通过向吋间 同步服务器发起吋钟同步报文实现终端与吋间同步服务器的吋间同步, 从而实 现整个系统处于同一吋间维度, 避免因各终端吋间不同步造成消息指令产生和 执行在吋间维度上的混乱。
[0120] 在一个实施例中, 请求模块 704还用于根据预设的吋间间隔定期向服务器发起 吋间同步请求。
[0121] 本实施例中, 终端定期向吋间同步服务器发送吋间同步报文实现吋间同步, 避 免了终端由于计吋不准导致的各终端之间吋间误差过大, 从而造成消息指令不 能准确执行的情况。
[0122] 参见图 8, 为另一个实施例中物联网中消息传递装置的结构框图。 如图所示可 以包括: 一个或多个处理器 801 (图中仅示出一个) ; 一个或多个输入设备 802
(图中仅示出一个) , 一个或多个输出设备 803 (图中仅示出一个) 和存储器 80 4。 上述处理器 801、 输入设备 802、 输出设备 803和存储器 804通过总线 805连接 。 存储器 804用于存储指令, 处理器 801用于执行存储器 804存储的指令。 其中:
[0123] 所述输入设备 802, 用于接收通过预定协议传输的消息指令, 所述消息指令中 包括消息发送端信息、 消息执行端信息、 吋间戳和截止吋间信息;
[0124] 所述处理器 801, 用于根据所述消息指令中吋间戳和截止吋间信息检测所述消 息指令是否超吋, 以及根据所述消息指令中消息执行端信息检测当前终端是否 为消息执行端。 [0125] 所述处理器 801, 还用于在所述消息指令已超吋且当前终端是消息执行端, 则 放弃执行所述消息指令, 并根据所述消息发送端信息将超吋提示信息通过输出 设备 803发送给消息发送端;
[0126] 若所述消息指令已超吋且当前终端不是消息执行端, 则刪除所述消息指令, 并 根据所述消息发送端信息将超吋提示信息通过输出设备 803发送给消息发送端。
[0127] 可选的, 所述消息指令中还包括消息传递路径信息, 所述处理器 801还用于, 在所述消息指令未超吋且当前终端是消息执行端, 则执行所述消息指令; 在所 述消息指令未超吋且当前终端不是消息执行端, 则根据所述消息传递路径信息 传递所述消息指令。
[0128] 可选的, 所述处理器 801还用于, 若当前终端存在已超吋消息指令, 将接收的 所述消息指令覆盖所述已超吋消息指令。
[0129] 可选的, 所述处理器 801还用于通过输出设备 803向服务器发起吋间同步请求, 并通过输入设备 802接收所述服务器返回的所述吋间同步请求的响应结果, 根据 所述响应结果进行吋间同步。
[0130] 具体的, 所述处理器 801通过输出设备 803根据预设的吋间间隔定期向服务器发 起吋间同步请求。
[0131] 在本实施例中, 其中, 所述预定协议可以为消息队列遥测传输协议, 或者先进 消息队列协议等。
[0132] 吋间戳是一个字符序列, 用于唯一的标识消息指令发送的吋刻。 截止吋间信息 是指消息指令能被执行的超吋绝对吋间和 /或截止吋间间隔。 消息发送端是指发 送消息指令的终端。 消息执行端是指执行消息指令的终端。
[0133] 第二终端接收消息发送端通过预定协议发送的消息指令或中间节点通过预定协 议传递的消息指令。 其中, 中间节点是指消息发送端和消息执行端之间传递消 息指令的终端。 第二终端可为中间节点或消息执行端。
[0134] 另外, 终端根据消息指令中吋间戳和超吋绝对吋间来检测消息指令是否超吋, 超吋绝对吋间是指消息指令能被执行的截止吋间。
[0135] 在一个实施例中, 终端根据消息指令中吋间戳和截止吋间间隔来检测消息指令 是否超吋, 截止吋间间隔是指消息指令从发送起允许被执行的吋间范围。 [0136] 另外, 在检测消息是否超吋的同吋, 根据消息指令中消息执行端信息检测当前 终端是否为消息执行端。
[0137] 具体地, 消息执行端信息可包括消息指令执行终端的 IP地址、 MAC地址、 设备 编码或其他能唯一标识设备身份的信息。
[0138] 需要说明的是, 本实施例刪除所述消息指令即可节约终端内存, 也可避免所述 消息指令的再次传输。
[0139] 本实施例中, 若消息指令已超吋, 终端根据消息发送端信息将超吋提示信息发 送给消息发送端, 以使消息发送端根据反馈的超吋提示信息调整所要发送的消 息指令。 超吋提示信息是指反馈给消息发送端该消息指令已超吋不再传输或该 消息指令已超吋不再执行的信息。
[0140] 进一步的, 服务器在接收到吋钟同步报文后作出响应, 并将响应报文、 接收吋 钟同步报文的吋间戳和发送响应报文的吋间戳返回终端; 终端接收到响应报文 后记录接收响应报文的吋间戳。 终端可根据吋钟同步报文、 响应报文、 发送吋 钟同步报文的吋间戳、 发送响应报文的吋间戳、 接收吋钟同步报文的吋间戳和 接收响应报文的吋间戳计算传输吋延和同步误差, 实现终端吋间与吋间同步服 务器吋间的精准同步。
[0141] 其中, 终端包括消息发送端、 中间节点和消息执行端, 消息发送端可与吋间同 步服务器进行吋间同步、 中间节点可与吋间同步服务器进行吋间同步、 消息执 行端可与吋间同步服务器进行吋间同步, 从而实现消息发送端、 中间节点和消 息执行端的吋间精准同步。
[0142] 本实施中, 服务器与终端组成封闭式系统, 系统中各终端通过向吋间同步服务 器发起吋钟同步报文实现终端与吋间同步服务器的吋间同步, 从而实现整个系 统处于同一吋间维度, 避免因各终端吋间不同步造成消息指令产生和执行在吋 间维度上的混乱。
[0143] 所述存储器 804, 用于存储软件程序以及模块。 所述处理器 801通过运行存储在 所述存储器 804的软件程序以及模块, 从而执行各种功能应用以及数据处理。
[0144] 应当理解, 在本发明实施例中, 所述处理器 801可以是中央处理单元 (Central Processing Unit, CPU) , 该处理器还可以是其他通用处理器、 数字信号处理器 (Digital Signal Processor, DSP)、 专用集成电路 (Application Specific Integrated Circuit, ASIC)、 现成可编程门阵列(Field-Programmable Gate Array, FPGA)或 者其他可编程逻辑器件、 分立门或者晶体管逻辑器件、 分立硬件组件等。 通用 处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
输入设备 802可以包括触控板、 指纹采传感器 (用于采集用户的指纹信息和指 纹的方向信息) 、 麦克风、 数据接收接口等。 输出设备 803可以包括显示器 (LC D等) 、 扬声器、 数据发送接口等。
[0146] 该存储器 804可以包括只读存储器和随机存取存储器, 并向处理器 501提供指令 和数据。 存储器 804的一部分还可以包括非易失性随机存取存储器。 例如, 存储 器 804还可以存储设备类型的信息。
[0147] 具体实现中, 本发明实施例中所描述的处理器 801、 输入设备 802、 输出设备 80 3和存储器 804可执行本发明实施例提供的物联网中消息传递方法的实施例中所 描述的实现方式, 在此不再赘述。
[0148] 综上所述, 本发明实施例通过在预定协议传输的消息指令中设置吋间戳和截止 吋间信息, 可根据吋间戳和截止吋间信息判断接收到的消息指令是否超吋, 并 将超吋消息指令中断传输、 超吋提示信息反馈给消息发送端, 使得超吋消息指 令不会被执行或继续传递下去, 节省了网络传输流量、 降低了网络拥堵的风险 , 对消息指令增加截止吋间判断, 提高了通过预定协议传输的消息指令执行情 况的确定性, 具有较强的易用性和实用性。
[0149] 本领域普通技术人员可以意识到, 结合本文中所公幵的实施例描述的各示例的 单元及算法步骤, 能够以电子硬件、 或者计算机软件和电子硬件的结合来实现 。 这些功能究竟以硬件还是软件方式来执行, 取决于技术方案的特定应用和设 计约束条件。 专业技术人员可以对每个特定的应用来使用不同方法来实现所描 述的功能, 但是这种实现不应认为超出本发明的范围。
[0150] 在本发明所提供的实施例中, 应该理解到, 所揭露的装置和方法, 可以通过其 它的方式实现。 例如, 以上所描述的系统实施例仅仅是示意性的, 例如, 所述 模块或单元的划分, 仅仅为一种逻辑功能划分, 实际实现吋可以有另外的划分 方式, 例如多个单元或组件可以结合或者可以集成到另一个系统, 或一些特征 可以忽略, 或不执行。 另一点, 所显示或讨论的相互之间的耦合或直接耦合或 通讯连接可以是通过一些接口, 装置或单元的间接耦合或通讯连接, 可以是电 性, 机械或其它的形式。
[0151] 所述作为分离部件说明的单元可以是或者也可以不是物理上分幵的, 作为单元 显示的部件可以是或者也可以不是物理单元, 即可以位于一个地方, 或者也可 以分布到多个网络单元上。 可以根据实际的需要选择其中的部分或者全部单元 来实现本实施例方案的目的。
[0152] 另外, 在本发明各个实施例中的各功能单元可以集成在一个处理单元中, 也可 以是各个单元单独物理存在, 也可以两个或两个以上单元集成在一个单元中。 上述集成的单元既可以采用硬件的形式实现, 也可以采用软件功能单元的形式 实现。
[0153] 所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用 吋, 可以存储在一个计算机可读取存储介质中。 基于这样的理解, 本发明实施 例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部 或部分可以以软件产品的形式体现出来, 该计算机软件产品存储在一个存储介 质中, 包括若干指令用以使得一台计算机设备 (可以是个人计算机, 服务器, 或者网络设备等) 或处理器 (processor) 执行本发明实施例各个实施例所述方法 的全部或部分步骤。 而前述的存储介质包括: U盘、 移动硬盘、 只读存储器 (R 0M, Read-Only Memory) 、 随机存取存储器 (RAM, Random Access Memory ) 、 磁碟或者光盘等各种可以存储程序代码的介质。
以上所述实施例仅用以说明本发明的技术方案, 而非对其限制; 尽管参照前述 实施例对本发明进行了详细的说明, 本领域的普通技术人员应当理解: 其依然 可以对前述各实施例所记载的技术方案进行修改, 或者对其中部分技术特征进 行等同替换; 而这些修改或者替换, 并不使相应技术方案的本质脱离本发明各 实施例技术方案的精神和范围, 均应包含在本发明的保护范围之内。

Claims

权利要求书
[权利要求 1] 一种物联网中消息传递方法, 其特征在于, 包括:
接收通过预定协议传输的消息指令, 所述消息指令中包括消息发送端 信息、 消息执行端信息、 吋间戳和截止吋间信息; 根据所述消息指令中吋间戳和截止吋间信息检测所述消息指令是否超 吋, 以及根据所述消息指令中消息执行端信息检测当前终端是否为消 息执行端;
若所述消息指令已超吋且当前终端是消息执行端, 则放弃执行所述消 息指令, 并根据所述消息发送端信息将超吋提示信息发送给消息发送 若所述消息指令已超吋且当前终端不是消息执行端, 则刪除所述消息 指令, 并根据所述消息发送端信息将超吋提示信息发送给消息发送端
[权利要求 2] 根据权利要求 1所述的物联网中消息传递方法, 其特征在于, 所述消 息指令中还包括消息传递路径信息, 所述方法还包括:
若所述消息指令未超吋且当前终端是消息执行端, 则执行所述消息指 令;
若所述消息指令未超吋且当前终端不是消息执行端, 则根据所述消息 传递路径信息传递所述消息指令。
[权利要求 3] 根据权利要求 1所述的物联网中消息传递方法, 其特征在于, 所述方 法还包括:
若当前终端存在已超吋消息指令, 将接收的所述消息指令覆盖所述当 前终端存在的已超吋消息指令。
[权利要求 4] 根据权利要求 1所述的物联网中消息传递方法, 其特征在于, 所述方 法还包括:
向服务器发起吋间同步请求;
接收所述服务器返回的所述吋间同步请求的响应结果, 根据所述响应 结果进行吋间同步。 根据权利要求 4所述的物联网中消息传递方法, 其特征在于, 所述向 服务器发起吋间同步请求还包括:
根据预设的吋间间隔定期向服务器发起吋间同步请求。
一种物联网中消息传递装置, 其特征在于, 包括:
接收模块, 用于接收通过预定协议传输的消息指令, 所述消息指令中 包括消息发送端信息、 消息执行端信息、 吋间戳和截止吋间信息; 检测模块, 用于根据所述消息指令中吋间戳和截止吋间信息检测所述 消息指令是否超吋, 以及根据所述消息指令中消息执行端信息检测当 前终端是否为消息执行端;
执行模块, 用于若所述消息指令已超吋且当前终端是消息执行端, 则 放弃执行所述消息指令, 并根据所述消息发送端信息将超吋提示信息 发送给消息发送端; 若所述消息指令已超吋且当前终端不是消息执行 端, 则刪除所述消息指令, 并根据所述消息发送端信息将超吋提示信 息发送给消息发送端。
根据权利要求 6所述的物联网中消息传递装置, 其特征在于: 所述消息指令中还包括消息传递路径信息,
所述执行模块还用于若所述消息指令未超吋且当前终端是消息执行端 , 则执行所述消息指令; 若所述消息指令未超吋且当前终端不是消息 执行端, 则根据所述消息传递路径信息传递所述消息指令。
根据权利要求 6所述的物联网中消息传递装置, 其特征在于, 所述装 置还包括:
覆盖模块, 用于若当前终端存在已超吋消息指令, 将接收的所述当前 终端存在的消息指令覆盖所述已超吋消息指令。
一种物联网中消息传递装置, 包括存储器、 处理器以及存储在所述存 储器中并可在所述处理器上运行的计算机程序, 其特征在于, 所述处 理器执行所述计算机程序吋实现如权利要求 1至 5任一项所述物联网中 消息传递方法的步骤。
一种计算机可读存储介质, 所述计算机可读存储介质存储有计算机程 序, 其特征在于, 所述计算机程序被处理器执行吋实现如权利要求 1 至 5任一项所述物联网中消息传递方法的步骤。
PCT/CN2017/093578 2017-06-16 2017-07-19 物联网中消息传递方法和装置 WO2018227703A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710461387.4 2017-06-16
CN201710461387.4A CN107181674A (zh) 2017-06-16 2017-06-16 物联网中消息传递方法和装置

Publications (1)

Publication Number Publication Date
WO2018227703A1 true WO2018227703A1 (zh) 2018-12-20

Family

ID=59836733

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/093578 WO2018227703A1 (zh) 2017-06-16 2017-07-19 物联网中消息传递方法和装置

Country Status (2)

Country Link
CN (1) CN107181674A (zh)
WO (1) WO2018227703A1 (zh)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110032176A (zh) * 2019-05-16 2019-07-19 广州文远知行科技有限公司 无人驾驶汽车的远程接管方法、装置、设备和存储介质
CN114138520B (zh) * 2020-05-13 2022-06-28 浙江创邻科技有限公司 分布式消息处理方法及系统
CN113709257B (zh) * 2021-10-09 2024-04-23 天翼物联科技有限公司 消息缓存超期监控方法、装置、设备及介质
CN114360108A (zh) * 2021-12-30 2022-04-15 沙龙智行科技有限公司 车辆的钥匙权限控制方法、装置及车辆

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102831156A (zh) * 2012-06-29 2012-12-19 浙江大学 一种云计算平台上的分布式事务处理方法
CN103532823A (zh) * 2012-07-04 2014-01-22 中兴通讯股份有限公司 物联网消息处理方法、装置及系统
WO2016007057A1 (en) * 2014-07-10 2016-01-14 Telefonaktiebolaget L M Ericsson (Publ) Methods and devices for signalling in a communication network
CN105681436A (zh) * 2016-01-27 2016-06-15 四川长虹电器股份有限公司 控制端与物联网设备之间基于alljoyn协议的通信方法
CN106850397A (zh) * 2016-12-13 2017-06-13 深圳市智物联网络有限公司 物联网中消息传递方法和装置

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9900172B2 (en) * 2013-04-25 2018-02-20 Qualcomm Incorporated Coordinated resource sharing in machine-to-machine communication using a network-based group management and floor control mechanism
CN106130693B (zh) * 2016-07-08 2019-04-23 浙江工业大学 一种基于udp的可靠传输方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102831156A (zh) * 2012-06-29 2012-12-19 浙江大学 一种云计算平台上的分布式事务处理方法
CN103532823A (zh) * 2012-07-04 2014-01-22 中兴通讯股份有限公司 物联网消息处理方法、装置及系统
WO2016007057A1 (en) * 2014-07-10 2016-01-14 Telefonaktiebolaget L M Ericsson (Publ) Methods and devices for signalling in a communication network
CN105681436A (zh) * 2016-01-27 2016-06-15 四川长虹电器股份有限公司 控制端与物联网设备之间基于alljoyn协议的通信方法
CN106850397A (zh) * 2016-12-13 2017-06-13 深圳市智物联网络有限公司 物联网中消息传递方法和装置

Also Published As

Publication number Publication date
CN107181674A (zh) 2017-09-19

Similar Documents

Publication Publication Date Title
WO2018227703A1 (zh) 物联网中消息传递方法和装置
WO2018107606A1 (zh) 物联网中消息传递方法和装置
CN109644061B (zh) 网络定时同步
US8879586B2 (en) Inband timestamping
US10334545B2 (en) Synchronizing time among two or more devices
US10645145B2 (en) Method and apparatus for accelerating data transmission in a network communication system
JP6716583B2 (ja) 測距プロトコルのための方法およびシステム
WO2011023068A1 (zh) 一种个人网设备获取业务内容的装置、方法及相关装置
WO2007137085A2 (en) Network time protocol precision timestamping service
JP2018509095A (ja) デバイスを同期させるための方法およびシステム
US9042411B1 (en) System and method for accurate time sampling in presence of output delay
WO2022033094A1 (zh) 定位基站数据流处理方法、装置、设备及计算机可读介质
WO2017080386A1 (zh) 一种报文处理方法和装置
US9069834B2 (en) Control method and storage controller apparatus
CN104052565A (zh) 一种时间同步方法和通信终端
WO2019037611A1 (zh) 数据传输方法、装置、基站和服务器
CN113452770B (zh) 数据同步方法、装置、计算机设备及存储介质
US20190391262A1 (en) System for determining distance between fixed and mobile endpoints and related methods
CN111654505B (zh) Udp数据包可靠传输方法、系统、计算机设备及存储介质
WO2021057068A1 (zh) Rdma数据流控方法、系统、电子设备及可读存储介质
US10080196B2 (en) Method and apparatus for prolonging lasting time of inactive mode
WO2018227710A1 (zh) 一种物联网终端信息寻址方法及装置
US8180875B1 (en) Ping-based communication system (PICS)
US11323375B2 (en) Communication device, communication method, and computer readable medium
JP6572136B2 (ja) 通信システム、通信装置、第二装置、通信方法及びコンピュータプログラム

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: 17913637

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: 1205A 25.05.2020

122 Ep: pct application non-entry in european phase

Ref document number: 17913637

Country of ref document: EP

Kind code of ref document: A1