WO2014005535A1 - 物联网消息处理方法、装置及系统 - Google Patents

物联网消息处理方法、装置及系统 Download PDF

Info

Publication number
WO2014005535A1
WO2014005535A1 PCT/CN2013/078841 CN2013078841W WO2014005535A1 WO 2014005535 A1 WO2014005535 A1 WO 2014005535A1 CN 2013078841 W CN2013078841 W CN 2013078841W WO 2014005535 A1 WO2014005535 A1 WO 2014005535A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
terminal
queue
internet
messages
Prior art date
Application number
PCT/CN2013/078841
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 中兴通讯股份有限公司
Priority to US14/410,850 priority Critical patent/US9832275B2/en
Priority to EP13812651.1A priority patent/EP2871809B1/en
Publication of WO2014005535A1 publication Critical patent/WO2014005535A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • 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/07User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail characterised by the inclusion of specific contents
    • H04L51/18Commands or executable codes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/62Queue scheduling characterised by scheduling criteria
    • H04L47/622Queue service order
    • H04L47/6235Variable service order
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/62Queue scheduling characterised by scheduling criteria
    • H04L47/625Queue scheduling characterised by scheduling criteria for service slots or service orders
    • H04L47/6275Queue scheduling characterised by scheduling criteria for service slots or service orders based on priority
    • 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/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/566Grouping or aggregating service requests, e.g. for unified processing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/66Arrangements for connecting between networks having differing types of switching systems, e.g. gateways

Definitions

  • the present invention relates to the field of communications, and in particular to an Internet of Things message processing method, apparatus, and system. Background technique
  • the vertical industry applications of the Internet of Things are gradually integrated and developed into a horizontal application model.
  • One terminal device in the Internet of Things can interact with multiple applications/platforms, and can also interact with multiple users in one application. Perform message interaction to achieve device sharing.
  • the Internet of Things provides the ability to exchange information between IoT applications/platforms and terminal devices.
  • IoT gateways will provide more More capabilities to implement IoT applications.
  • the terminal device may be simply referred to as a terminal, and may also be referred to as a device.
  • multiple applications/platforms can interact with the same terminal device through the IoT gateway.
  • frequent same operations on the terminal device within a certain time range will increase the energy consumption of the terminal device.
  • Resource loss, or conflicting operations on terminal devices within a certain time range, such as sleeping device energy saving and wake-up device reading information, reading device information, and modifying device data, etc. will affect the accuracy and increase of read data. Problems such as the complexity of the operation.
  • an Internet of Things message processing method including: an IoT gateway receiving one or more operation messages sent by a plurality of senders for terminal operations; and the IoT gateway receiving The operation message is buffered and pre-processed in the message queue, and the operation message in the message queue is sent to the terminal according to the processed result.
  • the IoT gateway performs preprocessing on the received operation message in the message queue, where: the IoT gateway corresponds to the received operation message to the terminal according to the configured policy.
  • the order of the messages in the message queue is adjusted.
  • the IoT gateway performs preprocessing on the received operation message in the message queue, where: the IoT gateway operates the same operation on the received operation message according to the configured policy.
  • the message, and/or the same operation message in the message queue corresponding to the terminal is merged.
  • the sequence of adjusting the received message in the message queue corresponding to the terminal includes: when the received operation message conflicts with an operation message in the message queue, and exists When the priority of the conflicting operation message is different, the IoT gateway adjusts the order of sending the operation message of the message queue according to the configured policy, and firstly, the operation message with high priority in the conflicting operation message Executing the operation message with a low priority; and/or, when the received operation message conflicts with the operation message in the message queue, and the priority of the conflicting operation message is the same, the IoT gateway And reordering the delivery order of the conflicting operation messages according to the policy.
  • the IoT gateway combines the same operation message in the received operation message according to the configured policy, and/or merges the same operation message in the message queue corresponding to the terminal, including: When the received operation message has the same operation as the message queue, and the priority of the same operation message is different, the IoT gateway performs the same operation message according to the configured policy.
  • the networked gateway merges the operation message with the same operation into the location of the operation message with the same operation already existing in the message queue of the terminal; and/or, when the received operation message has the same operation
  • the IoT gateway merges the operation message with the same operation into the corresponding position of the operation message with the highest priority among the operation messages according to the configured policy.
  • the message queue corresponding to the terminal includes a first queue and a second queue, the first queue is configured to store an operation message of the terminal, and the second queue is configured to store the end and correspond to the Address information of the operation message in the first queue; correspondingly, the sending the operation message in the message queue to the terminal according to the processed result includes: the IoT gateway according to the second The access address in the queue reads the status information of the terminal; the IoT gateway reads the operation message of the terminal stored in the first queue according to the address information of the operation message in the second queue; The IoT gateway sends the read operation message to the terminal according to the processed result according to the status information of the terminal.
  • the IoT gateway sends the read operation message to the terminal according to the processed state information according to the status information of the terminal: when the status information of the terminal is in a sleep or shutdown state
  • the IoT gateway inserts a wake-up or start message before sending the read operation message according to the processed result; or, when the status information of the terminal is in an execution state, and the processed
  • the IoT gateway inserts the termination of the operation message before the operation message is read according to the processed result. Operational message.
  • the method further includes: the terminal according to the processed message queue The operation of the message is performed in an order; when the operation is successful, the terminal returns a success message to the IoT gateway, where the success message carries the status information of the terminal; or, when the operation fails, the terminal Returning a failure message to the IoT gateway, where the failure message carries status information of the terminal and a reason for failure.
  • the method further includes: receiving, by the IoT gateway, a response message returned by the terminal; when the response message is a success message or a failure message, the IoT gateway sends the response message to the Responding to one or more initiators of the operation message corresponding to the message, and deleting the operation message corresponding to the response message from the message queue corresponding to the terminal; or, when the response message is that the operation is being performed, The IoT gateway marks the status information of the terminal as being in an execution state.
  • an IoT message processing apparatus which is located in an IoT gateway, and includes: a receiving module, configured to receive one or more operation messages sent by a plurality of senders for terminal operations; The processing module is configured to buffer and process the received operation message in the message queue, and send the operation message in the message queue to the terminal according to the processed result.
  • the processing module includes: an adjustment module, configured to adjust the received operation message and the message sequence in the message queue according to the configured policy; and/or, the merge module is configured according to the configuration The policy, the same operation message in the received operation message, and/or the same operation message in the message queue corresponding to the terminal is merged.
  • the message queue corresponding to the terminal includes a first queue and a second queue, where the first queue is configured to store an operation message of the terminal, and the second queue is configured to store the end and correspond to the The address information of the operation message in the first queue; correspondingly, the processing module includes: a reading module, configured to read status information of the terminal according to an access address in the second queue, and according to the Address information of the operation message in the second queue, read An operation message of the terminal stored in the first queue; the sending module is configured to send the read operation message in the message queue to the terminal according to the processed result according to the status information of the terminal .
  • the sending module includes: an inserting module configured to: when the status information of the terminal is in a sleep or a stop state, insert the wake-up message before the read operation message is sent according to the processed result Or initiating a message; or, when the status information of the terminal is in an execution state, and the priority of the operation message to be sent in the processed message queue is higher than the operation being performed by the terminal, The result is that the read operation message is sent before the current operation message is terminated.
  • an inserting module configured to: when the status information of the terminal is in a sleep or a stop state, insert the wake-up message before the read operation message is sent according to the processed result Or initiating a message; or, when the status information of the terminal is in an execution state, and the priority of the operation message to be sent in the processed message queue is higher than the operation being performed by the terminal, The result is that the read operation message is sent before the current operation message is terminated.
  • the device further includes: a second receiving module, configured to receive a response message returned by the terminal; and a sending module, configured to: when the response message is a success message or a failure message executed by the operation, the response is The message is sent to one or more initiators of the operation message corresponding to the response message, and the operation message corresponding to the response message is deleted from the message queue corresponding to the terminal; and/or the labeling module is configured to be The response message is that when the operation is being executed, the status information of the terminal is marked as being in an execution state.
  • an Internet of Things message processing system comprising the above-mentioned Internet of Things message processing apparatus, further comprising a terminal; wherein the terminal comprises: an execution module, configured to be according to the processed The operation of the operation message in the message queue is performed in an order; the returning module is configured to return a success message to the IoT gateway, where the success message carries the status information of the terminal; or When the operation fails, a failure message is returned to the IoT gateway, where the failure message carries status information of the terminal and a reason for failure.
  • the IoT gateway is used to receive one or more operation messages sent by multiple senders for terminal operations; the IoT gateway buffers and processes the received operation messages in the message queue, and according to the processing The result is sent to the terminal by the operation message in the message queue.
  • the method solves the problems in the related art in the process of interacting with the terminal device, saves the energy consumption generated by the terminal when the operation message is performed, and reduces the resource loss of the Internet of Things.
  • FIG. 1 is a flowchart of a method for processing an Internet of Things message according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of a message queue according to an embodiment of the present invention
  • FIG. 3 is a diagram of an Internet of Things message processing apparatus according to an embodiment of the present invention
  • FIG. 4 is a block diagram showing a preferred structure of a processing module according to an embodiment of the present invention
  • FIG. 5 is a block diagram showing a preferred configuration of a processing module according to an embodiment of the present invention
  • FIG. 7 is a block diagram showing a preferred structure of an Internet of Things message processing apparatus according to an embodiment of the present invention
  • FIG. 8 is a block diagram showing the structure of an Internet of Things message processing system according to an embodiment of the present invention
  • FIG. 10 is a structural diagram of an operation message distribution processing apparatus for implementing an Internet of Things gateway supporting multiple applications/platforms or multi-user operations
  • FIG. 10 is a flowchart of multi-application/platform or multi-user operation conflict processing according to Embodiment 2 of the present invention
  • FIG. 11 is a schematic flowchart of a multi-application/platform or multi-user identical operation process according to Embodiment 3 of the present invention.
  • the embodiment proposes that the IoT gateway analyzes and processes the sent message according to a certain strategy to resolve conflicts and resource losses, and an application or user temporarily monopolizes an Internet of Things. Terminal problem.
  • FIG. 1 is a flowchart of an Internet of Things message processing method according to an embodiment of the present invention. As shown in FIG. 1, the method includes the following steps: Step S102, Internet of Things The gateway receives one or more operation messages sent by multiple senders for terminal operations;
  • Step S104 The IoT gateway buffers and processes the received operation message in the message queue, and sends the operation message in the message queue to the terminal according to the processed result.
  • the IoT gateway caches and processes the operation message sent by the multiple senders in the message queue, and sends the operation message in the message queue to the terminal according to the processed result. Therefore, the operation message initiated by the terminal can be adjusted to a reasonable situation, and then executed by the terminal, which solves the problems in the related art in the process of interacting with the terminal, and saves the energy generated by the terminal when performing the operation message. , reducing the resource consumption of the Internet of Things.
  • the pre-processing manner of the IoT gateway in step S104 may be to adjust the execution order of the operation message, or may be performed by combining at least two of the multiple operation messages, and may of course be The above two methods are used in combination. This method is easy to implement.
  • the IoT gateway may perform the policy according to the policy, and the policy may be based on the priority of the message, the attributes of the message (such as the sending/receiving time), and the content of the message (such as read/write) to analyze whether the message needs to be Merging and how to merge, whether the message needs to be reordered and How to adjust.
  • the policy defines how to adjust the order of message execution. For example, the IoT gateway has the adjustment function of the message sending order, but how to adjust it is based on the specific adjustment strategy.
  • the preprocessing manner of the IoT gateway in step S104 may be, for example: the IoT gateway adjusts the sequence of the received operation message in the message queue corresponding to the terminal according to the configured policy; or, may be an Internet of Things gateway. According to the configured policy, the same operation message in the received operation message and/or the same operation message in the message queue corresponding to the terminal are merged.
  • the above method solves the problem of frequently performing the same operation on the terminal within a certain time range, or performing conflicting operations on the terminal in a certain period of time.
  • the adjustment manner of the Internet of Things gateway in step S104 may further be: adjusting the execution order of the operation message according to the priority of the operation message.
  • the terminal can be operated according to the priority of the operation message, preventing an application or a user from monopolizing the problem of the IoT terminal for a long time.
  • the IoT gateway adjusts the sequence of the received operation message in the message queue corresponding to the terminal, the received operation message conflicts with the operation message in the message queue, and the conflicting operation message has priority.
  • the IoT gateway adjusts the order of sending the operation messages of the message queue according to the configured policy, and performs the operation message with the higher priority in the conflicting operation message before the operation message with the lower priority; or
  • the IoT gateway rearranges the delivery order of the conflicting operation message according to the policy.
  • the IoT gateway merges the same operation message in the received operation message and/or the same operation message in the message queue corresponding to the terminal according to the configured policy.
  • the received operation message is received.
  • the IoT gateway merges the same operation message according to the configured policy to the operation message with the highest priority among the operation operation messages. of The corresponding location is executed; or, if the received operation message has the same operation as the message queue, and the same operation message has the same priority, the IoT gateway merges the same operation message into the terminal's message queue.
  • the IoT gateway merges the operation message with the same operation into the operation message according to the configured policy.
  • the corresponding position of the highest priority operation message is executed. In this way, the priority can be combined with the adjustment execution order or the combined execution to adjust the operation message to the terminal, which improves the flexibility of the solution and is easy to implement.
  • the IoT gateway can execute the read operation message prior to the sleep operation message.
  • the message queue may include a first queue and a second queue.
  • FIG. 2 is a schematic diagram of a message queue according to an embodiment of the present invention.
  • the first queue (hereinafter simply referred to as an A queue) may be configured as a storage application.
  • Each of the message nodes may include information such as a terminal identifier, an operation instruction, and an operation attribute, and the second queue (hereinafter referred to as a B queue) may be configured as a delivery sequence of the storage terminal.
  • the delivery sequence may include a terminal identifier, an access address of the terminal status (the status information of the terminal may be directly read through the access address), and address information corresponding to the operation message in the A queue.
  • the B queue may be composed of a plurality of linked lists, and a linked list represents a message delivery list of a terminal, including a terminal identifier, a terminal status, and a plurality of nodes, wherein the nodes are used to store the message nodes in the corresponding A queue.
  • the address, the node forms a linked list in the order in which the message is delivered.
  • the IoT gateway can read the status information of the terminal through the access address of the terminal status in the B queue, and read the operation message of the terminal stored in the A queue according to the address information of the operation message in the B queue. Then according to the status information of the terminal, according to the processed result The read operation message is sent to the terminal.
  • the IoT gateway may insert a wake-up or start message before the read operation message is sent according to the processed result; or if the status information of the terminal If the status of the operation message is higher than the operation being performed by the terminal, the IoT gateway can insert the operation of the read terminal to the current operation before the operation message is sent according to the processed result. Message. In this way, the rationality of the operational messages sent to the terminal can be further guaranteed.
  • the terminal may perform an operation according to the sequence of the operation messages in the processed message queue.
  • the terminal may return a success message to the IoT gateway, where the success message may carry the status information of the terminal, the identifier indicating that the operation is successful, and the like; if the operation fails, the terminal may go to the Internet of Things.
  • the gateway returns a failure message, which may carry the status information of the terminal, the reason for the failure, and the like. In this way, the IoT gateway can obtain the status information of the terminal in real time, so as to adjust the operation message according to the state of the terminal.
  • the IoT gateway may first send the response message to one or more operation messages corresponding to the response message.
  • the initiator and then delete the operation message from the message queue corresponding to the terminal; if the response message is that the operation is being performed, the IoT gateway can mark the status information of the terminal as the execution state, and continue to put the operation message on It is not deleted in the message queue. In this way, the initiator of the operation message can obtain the current state information of the terminal, so as to improve the rationality of the operation message initiated by the terminal in the future.
  • the embodiment further provides an Internet of Things message processing device, which is used to implement the above embodiments and preferred embodiments, and has not been described again.
  • the term "module” may implement a combination of software and/or hardware of a predetermined function.
  • the apparatus described in the following embodiments is preferably implemented in software, hardware, or software The implementation of a combination with hardware is also possible and conceived.
  • FIG. 3 is an IoT message processing apparatus according to an embodiment of the present invention.
  • the apparatus is located in an Internet of Things gateway, and includes: a receiving module 32 and a processing module 34. Each module is described in detail below.
  • the receiving module 32 is configured to receive one or more operation messages sent by the multiple senders for the terminal operation;
  • the processing module 34 is connected to the receiving module 32, and configured to receive the operation message received by the receiving module 32 in the message queue.
  • the cache is pre-processed, and the operation message in the message queue is sent to the terminal according to the processed result.
  • the IoT gateway caches and processes the operation message sent by the multiple senders received by the receiving module 32 through the processing module 34, and performs the pre-processing according to the processed result.
  • the operation message is sent to the terminal, so that the operation message initiated by the terminal can be adjusted to a reasonable situation, and then executed by the terminal, which solves the problems in the process of interacting with the terminal in the related art, and saves the terminal in progress.
  • the energy consumption generated by operating the message reduces the resource loss of the Internet of Things.
  • FIG. 4 is a block diagram of a preferred structure of a processing module 34.
  • the processing module 34 may include: an adjustment module 342 configured to receive received operation messages and messages according to a configured policy. The messages in the queue are sequentially adjusted; and/or, the merging module 344 is configured to operate the same operation message in the received operation message according to the configured policy, and/or the same operation in the message queue corresponding to the terminal The message is merged.
  • FIG. 5 is a block diagram of a preferred structure of a processing module 34 according to an embodiment of the present invention.
  • a message queue corresponding to a terminal includes a queue A and a queue B, and the queue A is configured to store an operation message of the terminal, and the queue is configured.
  • the processing module 34 may also include: the reading module 346, where the B is configured to store the delivery sequence of the operation message of the terminal, and the delivery sequence includes the access address of the terminal state and the address information corresponding to the operation message in the first queue.
  • FIG. 6 is a block diagram of a preferred structure of a sending module 348 according to an embodiment of the present invention.
  • the sending module 348 may include: an inserting module 3482 configured to when the status information of the terminal is in a sleep or stop state, Inserting a wake-up or start message before issuing the read operation message according to the processed result; or, when the status information of the terminal is in an execution state, and the processed operation message has a higher priority than the terminal is executing In operation, the interrupted current operation message is inserted before the read operation message is sent according to the processed result.
  • FIG. 7 is a block diagram of a preferred structure of an Internet of Things message processing apparatus according to an embodiment of the present invention.
  • the apparatus may further include: a second receiving module 72, connected to the processing module 34, configured to receive a response returned by the terminal.
  • the sending module 74 is connected to the second receiving module 72, and configured to send a response message to one of the operation messages corresponding to the response message when the response message received by the second receiving module 72 is a success message or a failure message.
  • the labeling module 76 is connected to the second receiving module 72, and configured to receive when the second receiving module 72 receives When the response message is that the operation is being executed, the status information of the terminal is marked as being executed.
  • FIG. 8 is a structural block diagram of an Internet of Things message processing system according to an embodiment of the present invention.
  • the Internet of Things message processing system includes the Internet of Things message processing apparatus 30 of any one of FIG. 3 to FIG.
  • FIG. 8 is an example of FIG. 3, further including a terminal 80, wherein the terminal 80 includes: an execution module 82 configured to perform operations according to an operation message sequence in the processed message queue; returning to the module 84,
  • the execution module 82 is connected to be configured to return a success message to the IoT gateway when the operation is successful, and the success message carries the status information of the terminal.
  • the operation fails, a failure message is returned to the IoT gateway, and the failure message carries the terminal. Status information and reason for failure.
  • the Internet of Things field is taken as an example to provide a method and system for supporting multiple applications or multiple users (including multiple users of the same application) simultaneously operating the same terminal in an IoT gateway.
  • the Internet of Things gateway system supporting multiple applications/platforms or multiple users simultaneously operating the same terminal in the preferred embodiment includes a device management module and a message scheduling module, and each module will be described in detail below.
  • the device management module is configured to manage basic attribute information of the terminal, monitor the status of the terminal, and identify the identity of the terminal.
  • the message scheduling module (implementing the functions of the processing module 34 in the above embodiment) communicates with the device management module; sets a queue for sending messages, and performs various message delivery in accordance with the operation sequence.
  • a method for supporting the same terminal of multiple applications or multiple users simultaneously includes the following steps:
  • Step 1 The message scheduling module receives an operation message sent by the application/platform to the terminal, and the operation message includes an identifier of the operated terminal, an operation instruction, and an operation attribute.
  • the operation attribute may include a priority of an operation, an initiator of an operation, and the like, an initiation time of the operation.
  • Step 2 The message scheduling module obtains the current state information of the terminal by using the terminal device state access address provided by the device management module, including the working state of the terminal, the working mode of the terminal, and the like;
  • the state access address is stored in a message queue corresponding to each terminal;
  • the working state may be dormant, busy, etc.;
  • the working mode may be: a power saving mode, a normal mode, and the like.
  • Step 3 The message scheduling module performs message processing according to the state information, operation instructions, and operation attributes of the terminal, and sets the delivery order, for example: merge the same operation, reorder conflict operation, high priority operation priority operation, and add wakeup before the sleep operation. Operation, etc., and complete the message delivery in order;
  • Step 4 After the terminal performs the operation, the response message is returned to the message scheduling module, and the message scheduling module is notified of the completion or failure of the operation, and the response message includes the current state information of the terminal.
  • the message scheduling module transmits the state information of the terminal to the device management module, and the device management The module updates and manages the status of the terminal based on the latest status information of the terminal.
  • the message scheduling module analyzes the message of the operation terminal, and in the message operated by the same terminal within a certain time range, the same operation message is merged, and the operation conflict message is reordered, thereby reducing Resource loss due to the same operation or conflict, and improve the operational efficiency of the terminal.
  • FIG. 9 is a structural diagram of an operation message distribution processing apparatus for implementing an Internet of Things gateway supporting multiple applications/platforms or multi-user operations according to a first embodiment of the present invention.
  • the structure diagram includes a message scheduling module and a device. Management module.
  • the message scheduling module receives the terminal operation message sent by the application/platform or the user within a certain time range; where the operation message includes information such as an operation instruction, an operation attribute, and an operated terminal identifier, where the operation attribute includes an operation priority level and an operation Initiator, time of operation initiation and reception, etc.; time range setting can have multiple strategies, such as setting the minimum value of the application/platform request feedback time, or other reasonable value, remote setting through platform/application, local setting, etc. Mode setting.
  • the message scheduling module includes a message queue, and the message scheduling module is configured according to the received terminal operation message. Determining whether it is the same or conflicting with the terminal operation in the message queue or the plurality of terminal operations received at the same time, if there are the same operation, combining the operation messages according to information and policies such as operation attributes; if there is a conflict operation, according to the operation instruction, Information and other information and policies to rearrange the order of operations of the message queue;
  • the message queue contains the A queue and the B queue (as shown in Figure 2).
  • the A queue stores operation messages sent by the application/platform or the user.
  • Each message node contains information such as terminal identifiers, operation instructions, and operation attributes.
  • the message scheduling module sends an operation message in the order of node 1, node 2, node 3, ..., and the linked list includes the terminal identifier and the address of the terminal state;
  • the management module stores the access address of the terminal state, and the message scheduling module can directly read the state information of the terminal through the address.
  • the message scheduling module sends a terminal operation message in the order of the message B queue, and the terminal returns a completion or failure message after executing the operation message, and the return message includes information such as a success identifier, terminal status information, or a failure reason; the message scheduling module returns the message.
  • the terminal status information is transmitted to the device management module. Meanwhile, after the message scheduling module returns the completion or failure message to the application/platform, the message scheduling module deletes the operation message in the message queue. If the completed message is returned, the terminal is While the operation is in progress, the message queue still retains the message node and the message status is still marked as being executed.
  • the message scheduling module interacts with the device management module, and the message scheduling module queries the device management module for status information of the terminal.
  • the device management module updates and manages the status of the terminal according to the status information of the terminal sent by the receiving message scheduling module.
  • the preferred embodiment is mainly described by taking a multi-application/platform or multi-user operation conflict processing flow as an example.
  • the IoT gateway receives the application/platform or within a certain time range
  • the operation message sent by the user needs to be sent to the designated terminal through the IoT gateway. Since the operated terminal is the same terminal, the operation sequence will cause conflicts of operations. For example, the operation and reading of the dormant terminal are required at the same time. Take the terminal data operation. If the shutdown operation is performed first, the terminal needs to be woken up again when the read operation is performed.
  • 10 is a schematic flowchart of multi-application/platform or multi-user operation conflict processing according to Embodiment 2 of the present invention. As shown in FIG. 10, the steps of the IoT gateway processing an operation message conflict within a certain time range are as follows:
  • Step S1002 Analyze whether there is a conflict according to the received terminal operation message, and perform processing.
  • the message scheduling module receives the operation message of the terminal sent by multiple applications/platforms or multiple users within a certain time range, and the operation message includes the terminal identifier, the operation instruction, the operation attribute, and the like; the message scheduling module checks whether the terminal exists in the current message queue.
  • the operation message if there is an operation message of the terminal, and the priority of the operation is not higher than the existing terminal operation message, analyze the currently received operation message and the operation message of the terminal in the queue, and determine the current operation.
  • the sleep operation is placed after the read operation.
  • the appropriate insertion of the message node into the message queue according to the operation attribute of the currently received operation message position If the same operation message of the terminal is included, but the priority of the operation is higher than the existing operation message or part of the message queue, the appropriate insertion of the message node into the message queue according to the operation attribute of the currently received operation message position.
  • the conflict is analyzed according to the operation instruction and the operation attribute of the received operation message, and according to the policy
  • the order in which the operation messages are arranged is placed in the message queue in a plurality of message nodes of the terminal in an arranged order.
  • Step S1004 Send an operation message to the terminal according to the message queue.
  • the message scheduling module sends an operation message to the terminal according to the order in the B queue.
  • the message queue obtains the current status of the terminal through the corresponding terminal status access address in the B queue, determines whether the operation message can be sent, and according to the status and operation of the terminal.
  • Command scheduling operation for example, the current terminal is in hibernation or shutdown, etc. State, before sending the operation message, first send an operation message such as wake-up or start, the terminal is awake to return a success message and update the state of the terminal, and then send the operation message; or the terminal is currently performing an operation, but the The operation message has a higher level, and may send a termination current operation message. After the terminal returns a success message, the terminal sends the operation message to the terminal. After the operation message is sent, the operation message status is marked as a message being executed by the message to be delivered.
  • Step S1006 returning an operation completion or failure message.
  • the terminal receives the operation message and performs an operation according to the operation instruction of the operation message. If the operation succeeds, the success message is returned to the message scheduling module.
  • the success message includes the status information of the terminal, the identifier indicating that the operation is successful, and the like. If the operation fails, the failure message is returned to the message scheduling module, and the failure message includes the reason of the failure, the terminal's Status information, etc.
  • Step S1008 Update the message queue.
  • the message scheduling module receives the message returned by the terminal and updates the message queue. If the returned message is a message that the terminal operation has completed or failed, the returned message is sent to one or more applications/platforms that send the operation message, and corresponding The operation message and its node are deleted from the message queue; if the returned message is that the terminal is still performing the operation, the operation message is continued in the message queue, and the label is still in the execution state.
  • Step S1010 Send status information of the terminal.
  • the message scheduling module sends the current state information returned by the terminal to the device management module, and the device management module updates the state of the terminal according to the received information.
  • the preferred embodiment is mainly described by taking the same processing flow of a multi-application/platform or multi-user operation message as an example.
  • the Internet of Things gateway receives the operation messages of the operation terminals sent by multiple applications/platforms or multiple users within a certain time range, and the operation messages are sent to the same terminal through the Internet of Things gateway. Since the operation message and the terminal to be operated are the same, the same operation is performed on the terminal multiple times, resulting in waste of resources. For example, at the same time, the operation of reading the terminal data is required to be performed. The same operation message will be sent to the terminal multiple times, and the same data will be read multiple times.
  • 11 is a schematic flowchart of a multi-application/platform or multi-user identical operation process according to Embodiment 3 of the present invention. As shown in FIG. 11, a method for processing an operation message received by an IoT gateway for a certain time range is the same. as follows:
  • Step S1102 Analyze whether the same operation is performed according to the received terminal operation message, and perform processing.
  • the message scheduling module receives the operation message of the application/platform or the user sending terminal in a certain time range, and the operation message includes the terminal identifier, the operation instruction, the operation attribute, and the like; the message scheduling module queries whether the terminal has the same operation message in the current message queue; If an operation message containing the same operation instruction is included, and the priority of the operation is not higher than the existing same operation message, the currently received operation message is merged into the same operation message already existing in the message queue.
  • the merge operation instruction the same operation message, and according to the operation attribute and other operation messages in front of the merge operation message in the message queue
  • the attribute comparison analysis puts the merged operation message into a suitable position in the message B queue (the new location can take precedence over the queue position of the merged operation message).
  • the multiple operation messages are directly merged into one, and the priority of the combined operation message is the maximum of the plurality of operation messages.
  • Step S1104 Send an operation message to the terminal according to the message queue.
  • the message scheduling module sends an operation message to the terminal according to the sequence in the queue of the message B. Before the operation message is sent, the current state of the terminal is obtained according to the state of the terminal in the B queue, and the current state of the terminal is obtained, and the operation message is sent according to the terminal.
  • the status and operation instruction arrangement operation for example, the current terminal is in a state of being hibernated or shut down, and an operation message such as waking or starting is sent before the operation message is sent, and the terminal device is awake to return a success message and update the state of the terminal device.
  • the terminal sends the operation message to the terminal.
  • the operation message is marked as the executing message by the message to be delivered.
  • Step S1106 returning an operation completion or failure message.
  • the terminal receives the operation message and performs an operation according to the operation instruction of the operation message. If the operation succeeds, the success message is returned to the message scheduling module.
  • the success message includes the status information of the terminal, the identifier indicating that the operation is successful, and the like. If the operation fails, the failure message is returned to the message scheduling module, and the failure message includes the reason of the failure, the terminal's Status information, etc.
  • Step S1108 Update the message queue.
  • the message scheduling module receives the message returned by the terminal and updates the message queue. If the returned message is a message that the terminal operation has completed or failed, the returned message is sent to one or more applications/platforms that send the operation message, and corresponding The operation message and its node are deleted from the message queue; if the returned message is that the terminal is still performing the operation, the operation message continues to be placed in the message queue and marked as being in the execution state.
  • Step S1110 Send status information of the terminal.
  • the message scheduling module sends the current state information returned by the terminal device to the device management module, and the device management module updates the state of the terminal device according to the received information.
  • the terminal refers to a terminal device.
  • a storage medium is also provided, the software being stored, including but not limited to an optical disk, a floppy disk, a hard disk, a rewritable memory, and the like.
  • modules or steps of the present invention can be implemented by a general-purpose computing device, which can be concentrated on a single computing device or distributed over a network composed of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device, such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein. Execution shown or described Steps, either by making them into individual integrated circuit modules, or by making a plurality of modules or steps into a single integrated circuit module. Thus, the invention is not limited to any specific combination of hardware and software.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephonic Communication Services (AREA)
  • Information Transfer Between Computers (AREA)
  • Computer And Data Communications (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本发明公开了一种物联网消息处理方法、装置及系统,其中,该方法包括:物联网网关接收多个发送方发送的用于终端操作的一条或多条操作消息;物联网网关对收到的操作消息在消息队列中缓存且进行预处理,并按照处理后的结果将消息队列中的操作消息下发给终端。通过本发明,解决了相关技术中对终端进行交互操作过程中存在的问题,节省了终端在进行的操作消息时所产生的能耗,降低了物联网的资源损耗。

Description

物联网消息处理方法、 装置及系统 技术领域
本发明涉及通信领域, 具体而言, 涉及一种物联网消息处理方法、 装 置及系统。 背景技术
随着物联网的发展, 物联网垂直行业应用逐渐融合并向水平应用模式 发展, 物联网中的一个终端设备可以与多个应用 /平台进行信息交互, 同时, 也可以与一个应用中的多个用户进行消息交互, 实现设备共享。 物联网网 关作为物联网架构中的一个重要网元, 提供物联网应用 /平台与终端设备之 间的信息交互能力, 特别的对于物联网中一些能力受限的终端设备, 物联 网网关将提供更多的能力实现物联网应用。 这里, 终端设备可以简称为终 端, 也可以称为设备。
目前在物联网具体实施中, 多个应用 /平台可以通过物联网网关与同一 个终端设备信息交互, 但是, 在一定时间范围内对终端设备进行频繁的相 同操作会加大终端设备的能耗等资源损耗, 或者在一定时间范围内对终端 设备进行彼此冲突的操作, 如休眠设备节能与唤醒设备读取信息、 读取设 备信息与修改设备数据等, 则会影响读取数据的准确性、 增加操作的复杂 性等问题。
针对相关技术中对终端设备进行交互操作过程中存在的问题, 目前尚 未提出有效的解决方案。 发明内容
针对相关技术中对终端设备进行交互操作过程中存在的问题, 本发明 提供了一种物联网消息处理方法、 装置及系统, 以至少解决上述问题。 根据本发明的一个方面, 提供了一种物联网消息处理方法, 包括: 物 联网网关接收多个发送方发送的用于终端操作的一条或多条操作消息; 所 述物联网网关对收到的所述操作消息在消息队列中緩存且进行预处理, 并 按照处理后的结果将所述消息队列中的操作消息下发给所述终端。
优选地, 所述物联网网关对收到的所述操作消息在所述消息队列中进 行预处理包括: 所述物联网网关根据配置的策略, 对收到的所述操作消息 在所述终端对应的消息队列中的消息顺序进行调整。
优选地, 所述物联网网关对收到的所述操作消息在所述消息队列中进 行预处理包括: 所述物联网网关根据配置的策略, 对收到的所述操作消息 中操作相同的操作消息, 和 /或与所述终端对应的消息队列中操作相同的操 作消息进行合并。
优选地, 所述对收到的所述操作消息在所述终端对应的消息队列中消 息顺序进行调整包括: 当收到的所述操作消息与所述消息队列中的操作消 息存在冲突, 且存在冲突的操作消息的优先级不同时, 所述物联网网关根 据所述配置的策略调整所述消息队列的操作消息下发顺序, 并将所述存在 冲突的操作消息中优先级高的操作消息先于优先级低的操作消息执行; 和 / 或, 当收到的所述操作消息与所述消息队列中的操作消息存在冲突, 且存 在冲突的操作消息的优先级相同时, 所述物联网网关根据所述策略重新排 列所述存在冲突的操作消息的下发顺序。
优选地, 所述物联网网关根据配置的策略, 对收到的所述操作消息中 操作相同的操作消息, 和 /或与所述终端对应的消息队列中操作相同的操作 消息进行合并包括: 当收到的所述操作消息与所述消息队列中存在相同的 操作, 且操作相同的操作消息的优先级不同时, 所述物联网网关根据所述 配置的策略, 将所述操作相同的操作消息合并至所述操作相同的操作消息 中优先级最高的操作消息的相应位置执行; 和 /或, 当收到的所述操作消息 与所述消息队列中存在相同的操作, 且操作相同的操作消息的优先级相同 时, 所述物联网网关将所述操作相同的操作消息合并至所述终端的消息队 列中已存在的所述操作相同的操作消息所在位置执行; 和 /或, 当收到的所 述操作消息中存在相同的操作时, 所述物联网网关根据所述配置的策略, 将所述操作相同的操作消息合并至所述操作消息中优先级最高的操作消息 的相应位置执行。
优选地, 所述终端对应的消息队列包括第一队列和第二队列, 所述第 一队列配置为存储所述终端的操作消息, 所述第二队列配置为存储所述终 及对应于所述第一队列中的所述操作消息的地址信息; 相应的, 所述按照 处理后的结果将所述消息队列中的操作消息下发给所述终端包括: 所述物 联网网关根据所述第二队列中的访问地址读取所述终端的状态信息; 所述 物联网网关根据所述第二队列中所述操作消息的地址信息, 读取存储在所 述第一队列中终端的操作消息; 所述物联网网关根据所述终端的状态信息, 按照处理后的结果将读取的所述操作消息下发给所述终端。
优选地, 所述物联网网关根据所述终端的状态信息, 按照处理后的结 果将读取的所述操作消息下发给所述终端包括: 当所述终端的状态信息为 休眠或停机状态时, 所述物联网网关在按照处理后的结果将读取的所述操 作消息进行下发之前, 插入唤醒或启动消息; 或者, 当所述终端的状态信 息为正在执行状态, 且处理后的所述消息队列中待发送的操作消息的优先 级高于所述终端正在执行的操作时, 所述物联网网关在按照处理后的结果 将读取的所述操作消息进行下发之前, 插入终止当前操作消息。
优选地, 所述按照处理后的结果将所述消息队列中的操作消息下发给 所述终端后, 所述方法还包括: 所述终端根据处理后的所述消息队列中的 操作消息的顺序执行操作; 当执行操作成功时, 所述终端向所述物联网网 关返回成功消息, 所述成功消息中携带所述终端的状态信息; 或者, 当执 行操作失败时, 所述终端向所述物联网网关返回失败消息, 所述失败消息 中携带所述终端的状态信息和失败原因。
优选地, 所述方法还包括: 所述物联网网关接收所述终端返回的响应 消息; 当所述响应消息为成功消息或失败消息时, 所述物联网网关将所述 响应消息发送给所述响应消息对应的操作消息的一个或多个发起方, 并将 所述响应消息对应的操作消息从所述终端对应的消息队列中删除; 或者, 当所述响应消息为操作正在执行时, 所述物联网网关标注所述终端的状态 信息为正在执行状态。
根据本发明的另一方面, 提供了一种物联网消息处理装置, 位于物联 网网关中, 包括: 接收模块, 配置为接收多个发送方发送的用于终端操作 的一条或多条操作消息; 处理模块, 配置为对收到的所述操作消息在消息 队列中緩存且进行预处理, 并按照处理后的结果将所述消息队列中的操作 消息下发给所述终端。
优选地, 所述处理模块包括: 调整模块, 配置为根据配置的策略, 对 收到的所述操作消息与所述消息队列中的消息顺序进行调整; 和 /或, 合并 模块, 配置为根据配置的策略, 对收到的所述操作消息中操作相同的操作 消息, 和 /或与所述终端对应的消息队列中操作相同的操作消息进行合并。
优选地, 所述终端对应的消息队列包括第一队列和第二队列, 所述第 一队列配置为存储所述终端的操作消息, 所述第二队列配置为存储所述终 以及对应于所述第一队列中的所述操作消息的地址信息; 相应的, 所述处 理模块包括: 读取模块, 配置为根据所述第二队列中的访问地址读取所述 终端的状态信息, 并根据所述第二队列中所述操作消息的地址信息, 读取 存储在所述第一队列中终端的操作消息; 下发模块, 配置为根据所述终端 的状态信息, 按照处理后的结果将读取的所述消息队列中的操作消息下发 给所述终端。
优选地, 所述下发模块包括: 插入模块, 配置为当所述终端的状态信 息为休眠或停机状态时, 在按照处理后的结果将读取的所述操作消息进行 下发之前, 插入唤醒或启动消息; 或者, 当所述终端的状态信息为正在执 行状态, 且处理后的所述消息队列中待发送的操作消息的优先级高于所述 终端正在执行的操作时, 在按照处理后的结果将读取的所述操作消息进行 下发之前, 插入终止当前操作消息。
优选地, 所述装置还包括: 第二接收模块, 配置为接收所述终端返回 的响应消息; 发送模块, 配置为当所述响应消息为操作执行的成功消息或 失败消息时, 将所述响应消息发送给所述响应消息对应的操作消息的一个 或多个发起方, 并将所述响应消息对应的操作消息从所述终端对应的消息 队列中删除; 和 /或, 标注模块, 配置为当所述响应消息为操作正在执行时, 标注所述终端的状态信息为正在执行状态。
根据本发明的另一方面, 还提供了一种物联网消息处理系统, 包括上 述的物联网消息处理装置, 还包括终端; 其中, 所述终端包括: 执行模块, 配置为根据处理后的所述消息队列中的操作消息的顺序执行操作; 返回模 块, 配置为当执行操作成功的情况下, 向所述物联网网关返回成功消息, 所述成功消息中携带所述终端的状态信息; 或者, 当执行操作失败时, 向 所述物联网网关返回失败消息, 所述失败消息中携带所述终端的状态信息 和失败原因。
通过本发明, 采用物联网网关接收多个发送方发送的用于终端操作的 一条或多条操作消息; 物联网网关对收到的操作消息在消息队列中緩存且 进行预处理, 并按照处理后的结果将消息队列中的操作消息下发给终端的 方式, 解决了相关技术中对终端设备进行交互操作过程中存在的问题, 节 省了终端在进行操作消息时所产生的能耗, 降低了物联网的资源损耗。 附图说明 此处所说明的附图用来提供对本发明的进一步理解, 构成本申请的一 部分, 本发明的示意性实施例及其说明用于解释本发明, 并不构成对本发 明的不当限定。 在附图中: 图 1是根据本发明实施例的物联网消息处理方法的流程图; 图 2是根据本发明实施例的消息队列示意图; 图 3是根据本发明实施例的物联网消息处理装置的结构框图; 图 4是根据本发明实施例的一种处理模块的优选结构框图; 图 5是根据本发明实施例的另一种处理模块的优选结构框图; 图 6是根据本发明实施例的下发模块的优选结构框图; 图 7是根据本发明实施例的物联网消息处理装置的优选结构框图; 图 8是根据本发明实施例的物联网消息处理系统的结构框图; 图 9是根据本发明实施例一的实现物联网网关支持多应用 /平台或多用 户操作的操作消息分发处理装置的结构图; 图 10是根据本发明实施例二的多应用 /平台或多用户操作冲突处理的 流程示意图; 图 11 是根据本发明实施例三的多应用 /平台或多用户相同操作处理的 流程示意图。 具体实施方式
下文中将参考附图并结合实施例来详细说明本发明。 需要说明的是, 在不冲突的情况下, 本申请中的实施例及实施例中的特征可以相互组合。
为了实现多应用 /平台对终端的高效操作, 本实施例提出通过物联网网 关对下发消息按某种策略进行分析处理以解决冲突及资源损失, 以及某个 应用或用户长期独占某个物联网终端的问题。
在本实施例中提供了一种物联网消息处理方法, 图 1 是根据本发明实 施例的物联网消息处理方法的流程图, 如图 1所示, 该方法包括以下步骤: 步骤 S102, 物联网网关接收多个发送方发送的用于终端操作的一条或 多条操作消息;
步骤 S104, 物联网网关对接收到的操作消息在消息队列中緩存且进行 预处理, 并按照处理后的结果将消息队列中的操作消息下发给终端。
本实施例通过上述步骤, 物联网网关对接收到的多个发送方发送的操 作消息在消息队列中緩存且进行预处理, 并按照处理后的结果将该消息队 列中的操作消息下发给终端, 从而能够将对终端发起的操作消息调整成合 理的情况, 再由终端执行, 解决了相关技术中对终端进行交互操作过程中 存在的问题, 节省了终端在进行操作消息时所产生的能耗, 降低了物联网 的资源损耗。
作为一种优选实施方式, 物联网网关在步骤 S104中的预处理方式可以 是对上述操作消息的执行顺序进行调整, 或者也可以是合并执行多条操作 消息中的至少两条, 当然还可以是上述两种方式结合使用。 这种方式易于 实现。
物联网网关在对消息进行调整时可以是根据策略来执行, 该策略可以 是根据消息的优先级、 消息的属性(如发送 /接收时间)、 消息的内容(如读 /写)分析消息是否需要合并以及如何合并, 消息是否需要重新调整顺序及 如何调整。 策略定义了如何调整消息执行顺序的方案, 例如, 物联网网关 具有消息发送顺序的调整功能, 但是如何调整, 则是根据具体的调整策略。
因此, 物联网网关在步骤 S104中的预处理方式可以例如: 物联网网关 根据配置的策略, 对接收到的操作消息在终端对应的消息队列中的消息顺 序进行调整; 或者, 可以是物联网网关根据配置的策略, 对接收到的操作 消息中操作相同的操作消息和 /或与该终端对应的消息队列中操作相同的操 作消息进行合并。 上述方式解决了在一定时间范围内对终端进行频繁的相 同操作、 或者在一定时间内对终端进行彼此冲突的操作的问题。
作为一种优选实施方式, 物联网网关在步骤 S104中的调整方式还可以 是根据上述操作消息的优先级对该操作消息的执行顺序进行调整。 通过这 种方式, 可以按照操作消息的优先级对终端进行操作, 防止了某个应用或 用户长期独占物联网终端的问题出现。
例如, 对于物联网网关对接收到的操作消息在终端对应的消息队列中 消息顺序进行调整的情况, 在接收到的操作消息与消息队列中的操作消息 存在冲突, 且存在冲突的操作消息的优先级不同的情况下, 物联网网关根 据配置的策略调整消息队列的操作消息下发顺序, 并将存在冲突的操作消 息中优先级高的操作消息先于优先级低的操作消息执行; 或者, 在接收到 的操作消息与消息队列中的操作消息存在冲突, 且存在冲突的操作消息的 优先级相同的情况下, 物联网网关根据策略重新排列存在冲突的操作消息 的下发顺序。
又例如, 对于物联网网关根据配置的策略对接收到的操作消息中操作 相同的操作消息和 /或与该终端对应的消息队列中操作相同的操作消息进行 合并的情况, 在接收到的操作消息与消息队列中存在相同的操作, 且操作 相同的操作消息的优先级不同的情况下, 物联网网关根据配置的策略将操 作相同的操作消息合并至操作相同的操作消息中优先级最高的操作消息的 相应位置执行; 或者, 在接收到的操作消息与消息队列中存在相同的操作, 且操作相同的操作消息的优先级相同的情况下, 物联网网关将操作相同的 操作消息合并至终端的消息队列中已存在的操作相同的操作消息所在位置 执行; 或者, 在接收到的操作消息中存在相同的操作的情况下, 物联网网 关根据配置的策略将该操作相同的操作消息合并至上述操作消息中优先级 最高的操作消息的相应位置执行。 通过这种方式, 可以将优先级与调整执 行顺序或者合并执行结合来调整对终端操作消息, 提高了方案的灵活性, 且易于实现。
例如, 在读取操作消息与休眠操作消息存在冲突的情况下, 物联网网 关可以将读取操作消息先于休眠操作消息执行。
作为一种优选实施方式, 在物联网网关对操作消息进行预处理之后, 可以通过终端对应的消息队列将操作消息下发给该终端。 该消息队列可以 包括第一队列和第二队列, 图 2是根据本发明实施例的消息队列示意图, 如图 2所示, 其中, 第一队列 (在下文中简称为 A队列 )可以配置为存储 应用 /平台或用户发送的对于该终端的操作消息, 每个消息节点可以包含终 端标识、 操作指令、 操作属性等信息; 第二队列 (在下文中简称为 B队列) 可以配置为存储终端的下发序列, 该下发序列可以包括终端标识、 终端状 态的访问地址(可以通过该访问地址直接读取终端的状态信息) 以及对应 于 A队列中的操作消息的地址信息。 例如, 参考图 2, B队列可以由多个链 表组成, 一个链表表示一个终端的消息下发链表, 包括终端标识、 终端状 态和多个节点, 其中的节点用于存储对应 A队列中消息节点的地址, 节点 按照消息下发的顺序形成链表。
在这种情况下, 物联网网关可以通过 B队列中的终端状态的访问地址 读取到终端的状态信息, 并根据 B队列中操作消息的地址信息读取存储在 A 队列中终端的操作消息, 然后根据终端的状态信息按照处理后的结果将 读取到的操作消息下发给终端。
优选地, 如果终端的状态信息为休眠或停机状态, 则物联网网关可以 在按照处理后的结果将读取到的操作消息进行下发之前, 插入唤醒或启动 消息; 或者, 如果终端的状态信息为正在执行状态, 且处理后的操作消息 的优先级高于终端正在执行的操作, 则物联网网关可以在按照处理后的结 果将读取到的操作消息进行下发之前, 插入终止终端当前操作的消息。 通 过这种方式, 可以进一步保证发送给终端的操作消息的合理性。
优选地, 终端接收到物联网网关发来的操作消息后, 可以根据处理后 的消息队列中的操作消息的顺序执行操作。 在执行操作之后, 如果执行操 作成功, 则终端可以向物联网网关返回成功消息, 该成功消息中可以携带 终端的状态信息、 表示操作成功的标识等; 如果执行操作失败, 则终端可 以向物联网网关返回失败消息, 该失败消息中可以携带终端的状态信息、 失败的原因等。 通过这种方式, 物联网网关能够实时获取到终端的状态信 息, 以便根据终端的状态对操作消息进行调整。
优选地, 当物联网网关接收到终端返回的响应消息后, 如果响应消息 为成功消息或失败消息, 则物联网网关均可以首先将该响应消息发送给该 响应消息对应的操作消息的一个或多个发起方, 然后再将该操作消息从终 端对应的消息队列中删除; 如果响应消息为操作正在执行, 则物联网网关 可以标注该终端的状态信息为正在执行状态, 并将操作消息继续放在消息 队列中不删除。 这样可以使操作消息的发起方获得终端当前的状态信息, 以提高以后对该终端发起的操作消息的合理性。
对应于上述方法, 本实施例还提供了一种物联网消息处理装置, 该装 置用于实现上述实施例及优选实施方式, 已经进行过说明的不再赘述。 如 以下所使用的, 术语 "模块" 可以实现预定功能的软件和 /或硬件的组合。 尽管以下实施例所描述的装置较佳地以软件来实现, 但是硬件, 或者软件 和硬件的组合的实现也是可能并被构想的。
图 3是根据本发明实施例的物联网消息处理装置, 该装置位于物联网 网关中, 包括: 接收模块 32和处理模块 34, 下面对各模块进行详细说明。
接收模块 32, 配置为接收多个发送方发送的用于终端操作的一条或多 条操作消息; 处理模块 34, 与接收模块 32相连, 配置为对接收模块 32接 收到的操作消息在消息队列中緩存且进行预处理, 并按照处理后的结果将 消息队列中的操作消息下发给终端。
本实施例通过上述模块, 物联网网关通过处理模块 34, 对接收模块 32 接收到的多个发送方发送的操作消息在消息队列中緩存且进行预处理, 并 按照处理后的结果将该消息队列中的操作消息下发给终端, 从而能够将对 终端发起的操作消息调整成合理的情况, 再由终端执行, 解决了相关技术 中对终端进行交互操作过程中存在的问题, 节省了终端在进行操作消息时 所产生的能耗, 降低了物联网的资源损耗。
图 4是根据本发明实施例的一种处理模块 34的优选结构框图, 如图 4 所示, 该处理模块 34可以包括: 调整模块 342, 配置为根据配置的策略对 接收到的操作消息与消息队列中的消息顺序进行调整; 和 /或, 合并模块 344, 配置为根据配置的策略对接收到的操作消息中操作相同的操作消息, 和 /或与该终端对应的消息队列中操作相同的操作消息进行合并。
图 5是根据本发明实施例的另一种处理模块 34的优选结构框图, 如图 2所示, 在终端对应的消息队列包括队列 A和队列 B, 队列 A配置为存储 终端的操作消息, 队列 B配置为存储终端的操作消息的下发序列, 下发序 列包括终端状态的访问地址以及对应于第一队列中的操作消息的地址信息 的情况下, 处理模块 34也可以包括: 读取模块 346, 配置为根据所述 B队 列中的访问地址读取该终端的状态信息, 并根据 B队列中操作消息的地址 信息读取存储在 A队列中终端的操作消息; 下发模块 348, 与读取模块 346 相连, 配置为根据读取模块 346读取的终端的状态信息按照处理后的结果 将读取模块 346读取的操作消息下发给该终端。
图 6是根据本发明实施例的下发模块 348的优选结构框图, 如图 6所 示, 该下发模块 348可以包括: 插入模块 3482, 配置为当终端的状态信息 为休眠或停机状态时, 在按照处理后的结果将读取的操作消息进行下发之 前, 插入唤醒或启动消息; 或者, 当终端的状态信息为正在执行状态, 且 处理后的操作消息的优先级高于终端正在执行的操作时, 在按照处理后的 结果将读取的操作消息进行下发之前, 插入终止当前操作消息。
图 7是根据本发明实施例的物联网消息处理装置的优选结构框图, 如 图 7所示, 该装置还可以包括: 第二接收模块 72, 与处理模块 34相连, 配 置为接收终端返回的响应消息; 发送模块 74, 与第二接收模块 72相连, 配 置为当第二接收模块 72接收到的响应消息为成功消息或失败消息时, 将响 应消息发送给所述响应消息对应的操作消息的一个或多个发起方, 并将所 述响应消息对应的操作消息从终端对应的消息队列中删除; 和 /或, 标注模 块 76, 与第二接收模块 72相连, 配置为当第二接收模块 72接收到的响应 消息为操作正在执行的情况下, 标注终端的状态信息为正在执行状态。
图 8是根据本发明实施例的物联网消息处理系统的结构框图, 如图 8 所示, 该物联网消息处理系统包括如图 3至图 7中任意一种的物联网消息 处理装置 30 (在图 8中以图 3为例进行说明), 还包括终端 80, 其中, 该 终端 80包括: 执行模块 82, 配置为根据处理后的消息队列中的操作消息的 顺序执行操作; 返回模块 84, 与执行模块 82相连, 配置为当执行操作成功 时, 向物联网网关返回成功消息, 该成功消息携带终端的状态信息; 当执 行操作失败时, 向物联网网关返回失败消息, 该失败消息中携带终端的状 态信息和失败原因。
下面结合优选实施例进行说明, 以下优选实施例结合了上述实施例及 其优选实施方式。
实施例一
在本优选实施例中以物联网领域为例进行说明, 提供了一种在物联网 网关中支持多应用或多用户 (包括同一应用的多个用户) 同时操作同一个 终端的方法及系统。
本优选实施例中提供的实现应用 /平台或多用户对终端的高效操作的系 统和方法, 通过对应用 /平台或多用户下发消息进行分析, 设置消息顺序并 下发到终端, 解决了物联网中多应用 /平台或多用户对终端的操作引起的冲 突或资源损失。
本优选实施例中的支持多应用 /平台或多用户同时操作同一个终端的物 联网网关系统包括设备管理模块和消息调度模块, 下面对各模块进行详细 说明。
设备管理模块, 配置为管理终端的基本属性信息、 监控终端的状态、 以及管理终端的标识。
消息调度模块(实现了上述实施例中的处理模块 34 的功能), 与设备 管理模块通信; 设置下发消息的队列, 并按照操作顺序进行各种消息的下 发。
同时, 在本优选实施例中还提供了一种支持多应用或多用户同时操作 的同一个终端的方法, 该方法包括以下步骤:
步骤一: 消息调度模块接收应用 /平台在发送的对终端的操作消息, 操 作消息包括被操作终端的标识、 操作指令、 及操作属性等;
这里, 所述操作属性可以包括操作的优先级、 操作的发起者等、 操作 的发起时间)。
步骤二: 消息调度模块通过设备管理模块提供的终端设备状态访问地 址获取当前该终端的状态信息, 包括终端的工作状态、 终端的工作模式等; 这里, 所述状态访问地址存储在每个终端对应的消息队列中; 所述工 作状态可以是休眠、 繁忙等; 所述工作模式可以是: 节能模式、 正常模式 等。
步骤三: 消息调度模块根据终端的状态信息、 操作指令、 操作属性进 行消息处理并设置下发顺序, 例如: 合并相同操作、 重排序冲突操作、 高 优先级操作优先操作、 对休眠操作前增加唤醒操作等, 并按照顺序完成消 息下发;
步骤四: 终端执行操作后返回响应消息到消息调度模块, 告知消息调 度模块操作执行完成或失败, 响应消息中含有终端当前状态信息; 消息调 度模块将终端的状态信息传送给设备管理模块, 设备管理模块根据该终端 最新的状态信息更新并管理该终端的状态。
本优选实施例通过消息调度模块对操作终端的消息进行分析, 在一定 时间范围内对同一个终端操作的消息中, 对操作相同的消息进行合并, 以 及对操作冲突的消息进行重排序, 从而减少了因操作相同或冲突引起的资 源损耗, 并提高对终端的操作效率。
图 9是根据本发明实施例一的实现物联网网关支持多应用 /平台或多用 户操作的操作消息分发处理装置的结构图, 如图 9所示, 该结构图中包括 了消息调度模块和设备管理模块。
消息调度模块在一定时间范围内接收应用 /平台或用户发送的终端操作 消息; 这里, 操作消息包含操作指令、 操作属性和被操作终端标识等信息, 其中, 操作属性包含操作的优先等级、 操作的发起者、 操作发起和接收的 时间等; 时间范围设置可有多种策略, 比如设置为应用 /平台要求反馈时长 最短的值, 或其它的合理值, 通过平台 /应用远程设置、 通过本地设置等方 式设置。
消息调度模块含有消息队列, 消息调度模块根据接收的终端操作消息, 判断是否与消息队列中该终端操作或者同时接收的多个该终端操作相同或 冲突, 如果存在相同操作则根据操作属性等信息和策略将这些操作消息进 行合并; 如果有冲突操作则根据操作指令、 操作属性等信息和策略重新排 列消息队列的操作顺序;
消息队列包含 A队列和 B队列 (如图 2所示)。 A队列存储了应用 /平 台或用户发送的操作消息, 每个消息节点包含终端标识、 操作指令、 操作 属性等信息; B队列由多个链表 Bx ( x=l,2, …)组成, 每个链表表示一个 终端操作消息的下发序列,例如:消息调度模块按节点 1、节点 2、节点 3、 ... 的顺序下发操作消息, 链表中包含终端标识、 终端状态的地址; 其中, 设 备管理模块存储终端状态的访问地址, 消息调度模块可直接通过地址读取 终端的状态信息。
消息调度模块按消息 B队列中的顺序下发送终端操作消息, 终端执行 操作消息后返回完成或失败消息, 返回消息中包含成功标识、 终端状态信 息或失败原因等信息; 消息调度模块将返回消息中的终端状态信息传送给 设备管理模块; 同时, 消息调度模块将该完成或失败消息返回给应用 /平台 后, 消息调度模块将消息队列中将该操作消息删除, 如果返回的完成消息 中, 终端为正在执行该操作, 则消息队列仍保留该消息节点, 消息状态也 仍标注为正在执行状态。
消息调度模块与设备管理模块交互信息, 消息调度模块向设备管理模 块查询终端的状态信息; 设备管理模块根据接收消息调度模块发送的终端 的状态信息, 更新并管理相应终端的状态。
实施例二
本优选实施例主要以多应用 /平台或多用户操作冲突处理流程为例进行 说明。
在本优选实施例中, 物联网网关在一定时间范围内接收到应用 /平台或 用户发送的操作消息, 操作消息需要通过物联网网关发送到指定的终端, 由于被操作的终端为同一个终端, 操作顺序不同将会造成操作的冲突, 例 如, 同时要求执行休眠终端的操作与读取终端数据操作, 如果先执行关闭 操作, 则在执行读取操作的时候则需要重新唤醒终端。 图 10是根据本发明 实施例二的多应用 /平台或多用户操作冲突处理的流程示意图, 如图 10 所 示, 物联网网关处理一定时间范围内操作消息冲突的步骤如下:
步骤 S1002 ,根据接收的终端操作消息,分析是否有冲突,并进行处理。 消息调度模块在一定时间范围内接收多个应用 /平台或者多个用户发送的终 端的操作消息, 操作消息包含终端标识、 操作指令及操作属性等; 消息调 度模块检查当前消息队列中是否有该终端的操作消息, 如果有该终端的操 作消息, 并且操作的优先等级不高于已有的该终端操作消息, 则将当前接 收到的操作消息与队列中该终端的操作消息进行分析, 判断当前操作消息 加入到消息队列中是否会引起操作的冲突, 并根据策略重新排列该终端的 操作消息序列, 例如: 休眠操作放在读取操作后面。
如果含有该终端相同的操作消息, 但操作的优先等级高于消息队列中 已有的操作消息或其中的一部分, 则根据当前接收到的操作消息的操作属 性将消息节点插入到消息队列中的合适位置。
如果同时接收到多个被操作终端相同、 操作指令不同的消息, 且消息 队列中没有被操作终端的它他操作消息, 则根据接收的多个操作消息的操 作指令、 操作属性分析冲突并根据策略排列操作消息的顺序, 消息队列中 按已排列好的顺序放入该终端的多个消息节点。
步骤 S1004, 按消息队列向终端发送操作消息。 消息调度模块按照 B 队列中的顺序向终端发送操作消息; 消息队列通过 B队列中对应的终端状 态访问地址, 获取该终端的当前状态, 判断是否可以发送操作消息, 并根 据该终端的状态及操作指令安排操作, 例如, 当前终端处于休眠或关机等 状态, 需在发送该操作消息前, 先发送唤醒或启动等操作消息, 终端被唤 醒返回成功消息并更新终端的状态后, 再发送该操作消息; 或者当前该终 端正在执行某一操作, 但是该操作消息的等级较高, 可以发送终止当前操 作消息, 终端返回成功消息后, 再发送该操作消息到终端; 发送操作消息 后, 操作消息状态由待下发消息标注为正在执行消息。
步骤 S1006, 返回操作完成或失败消息。 终端接收操作消息, 根据操作 消息的操作指令执行操作。 如果操作成功, 则向消息调度模块返回成功消 息, 成功消息包括终端的状态信息、 表示操作成功的标识等; 如果操作失 败, 则向消息调度模块返回失败消息, 失败消息包括失败的原因、 终端的 状态信息等。
步骤 S1008 , 更新消息队列。 消息调度模块接收终端返回的消息并更新 消息队列, 如果返回的消息为终端操作已执行完成或失败的消息, 将返回 的消息发送给发送该操作消息的一个或多个应用 /平台, 并将相应的操作消 息及其节点从消息队列中删除; 如果返回的消息为终端仍在执行操作, 则 将操作消息继续放在消息队列, 标注仍为正在执行状态。
步骤 S1010,发送终端的状态信息。 消息调度模块向设备管理模块发送 该终端返回的当前状态信息, 设备管理模块根据接收的信息更新终端的状 态。
实施例三
本优选实施例主要以多应用 /平台或多用户操作消息相同处理流程为例 进行说明。
在本优选实施例中, 物联网网关在一定时间范围内接收到多个应用 /平 台或多个用户发送的操作终端的操作消息, 操作消息通过物联网网关发送 到同一个终端。 由于操作消息及被操作的终端相同, 会对终端进行多次相 同操作, 造成资源的浪费, 例如, 同时要求执行读取终端数据的操作, 多 个相同的操作消息将多次发送到终端, 则会多次读取相同的数据。 图 11是 根据本发明实施例三的多应用 /平台或多用户相同操作处理的流程示意图, 如图 11所示, 物联网网关针对一定时间范围内收到的操作相同的操作消息 的处理方法步骤如下:
步骤 S1102, 根据接收的终端操作消息, 分析是否有相同操作, 并进行 处理。 消息调度模块在一定时间范围内接收应用 /平台或用户发送终端的操 作消息, 操作消息包含终端标识、 操作指令及操作属性等; 消息调度模块 查询当前消息队列中该终端是否有相同的操作消息; 如果含有相同操作指 令的操作消息, 并且操作的优先等级不高于已有的相同操作消息, 则将当 前接收的操作消息合并到消息队列中已存在的相同操作消息中。
如果含有相同操作指令的操作消息, 但操作的优先等级高于已有的相 同操作消息, 则合并操作指令相同的操作消息, 再根据操作属性与消息队 列中被合并操作消息前面的其它操作消息的属性比较分析, 将合并后的操 作消息放入消息 B队列中的合适位置 (新位置可以优先于被合并操作消息 的队列位置)。
如果目前没有相同操作消息, 同时接收到多个相同的操作消息, 则直 接将这多个操作消息合并为一个, 合并后操作消息的优先等级为这多个操 作消息中的最大值。
步骤 S1104,按消息队列向终端发送操作消息。 消息调度模块按照消息 B队列中的顺序向终端发送操作消息; 发送操作消息前需根据 B队列中该 终端的状态访问地址, 获取该终端的当前状态, 判断是否可以发送操作消 息, 并根据该终端的状态及操作指令安排操作, 例如, 当前终端处于休眠 或关机等状态, 需在该发送操作消息前, 先发送唤醒或启动等操作消息, 终端设备被唤醒返回成功消息并更新终端设备的状态后, 再发送该操作消 息; 或者当前该终端正在执行某一操作, 但是该操作消息的等级较高, 可 以发送终止当前操作消息, 终端返回成功消息后, 再发送该操作消息到终 端; 发送操作消息后, 操作消息由待下发消息标注为正在执行消息。
步骤 S1106, 返回操作完成或失败消息。 终端接收操作消息, 根据操作 消息的操作指令执行操作。 如果操作成功, 则向消息调度模块返回成功消 息, 成功消息包括终端的状态信息、 表示操作成功的标识等; 如果操作失 败, 则向消息调度模块返回失败消息, 失败消息包括失败的原因、 终端的 状态信息等。
步骤 S1108 , 更新消息队列。 消息调度模块接收终端返回的消息并更新 消息队列, 如果返回的消息为终端操作已执行完成或失败的消息, 将返回 的消息发送给发送该操作消息的一个或多个应用 /平台, 并将相应的操作消 息及其节点从消息队列中删除; 如果返回的消息为终端仍在执行操作, 则 将操作消息继续放在消息队列, 标注为正在执行状态。
步骤 S1110,发送终端的状态信息。 消息调度模块向设备管理模块发送 该终端设备返回的当前状态信息, 设备管理模块根据接收的信息更新终端 设备的状态。
在以上的描述中, 所述终端是指终端设备。
在另外一个实施例中, 还提供了一种软件, 该软件用于执行上述实施 例及优选实施例中描述的技术方案。
在另外一个实施例中, 还提供了一种存储介质, 该存储介质中存储有 上述软件, 该存储介质包括但不限于光盘、 软盘、 硬盘、 可擦写存储器等。
显然, 本领域的技术人员应该明白, 上述的本发明的各模块或各步骤 可以用通用的计算装置来实现, 它们可以集中在单个的计算装置上, 或者 分布在多个计算装置所组成的网络上, 可选地, 它们可以用计算装置可执 行的程序代码来实现, 从而, 可以将它们存储在存储装置中由计算装置来 执行, 并且在某些情况下, 可以以不同于此处的顺序执行所示出或描述的 步骤, 或者将它们分别制作成各个集成电路模块, 或者将它们中的多个模 块或步骤制作成单个集成电路模块来实现。 这样, 本发明不限制于任何特 定的硬件和软件结合。
以上所述仅为本发明的优选实施例而已, 并不用于限制本发明, 对于 本领域的技术人员来说, 本发明可以有各种更改和变化。 凡在本发明的精 神和原则之内, 所作的任何修改、 等同替换、 改进等, 均应包含在本发明 的保护范围之内。

Claims

权利要求书
1、 一种物联网消息处理方法, 其特征在于, 所述方法包括: 物联网网关接收多个发送方发送的用于终端操作的一条或多条操作消 息;
所述物联网网关对收到的所述操作消息在消息队列中緩存且进行预处 理, 并按照处理后的结果将所述消息队列中的操作消息下发给所述终端。
2、 根据权利要求 1所述的方法, 其特征在于, 所述物联网网关对收到 的所述操作消息在所述消息队列中进行预处理包括:
所述物联网网关根据配置的策略, 对收到的所述操作消息在所述终端 对应的消息队列中的消息顺序进行调整。
3、 根据权利要求 1所述的方法, 其特征在于, 所述物联网网关对收到 的所述操作消息在所述消息队列中进行预处理包括:
所述物联网网关根据配置的策略, 对收到的所述操作消息中操作相同 的操作消息, 和 /或与所述终端对应的消息队列中操作相同的操作消息进行 合并。
4、 根据权利要求 2所述的方法, 其特征在于, 所述对接到的所述操作 消息在所述终端对应的消息队列中消息顺序进行调整包括:
当收到的所述操作消息与所述消息队列中的操作消息存在冲突, 且存 在冲突的操作消息的优先级不同时, 所述物联网网关根据所述配置的策略 调整所述消息队列的操作消息下发顺序, 并将所述存在冲突的操作消息中 优先级高的操作消息先于优先级低的操作消息执行; 和 /或,
当收到的所述操作消息与所述消息队列中的操作消息存在冲突, 且存 在冲突的操作消息的优先级相同时, 所述物联网网关根据所述策略重新排 列所述存在冲突的操作消息的下发顺序。
5、 根据权利要求 3所述的方法, 其特征在于, 所述物联网网关根据配 置的策略, 对收到的所述操作消息中操作相同的操作消息, 和 /或与所述终 端对应的消息队列中操作相同的操作消息进行合并包括:
当收到的所述操作消息与所述消息队列中存在相同的操作, 且操作相 同的操作消息的优先级不同时, 所述物联网网关根据所述配置的策略, 将 所述操作相同的操作消息合并至所述操作相同的操作消息中优先级最高的 操作消息的相应位置执行; 和 /或,
当收到的所述操作消息与所述消息队列中存在相同的操作, 且操作相 同的操作消息的优先级相同时, 所述物联网网关将所述操作相同的操作消 息合并至所述终端的消息队列中已存在的所述操作相同的操作消息所在位 置执行; 和 /或,
当收到的所述操作消息中存在相同的操作时, 所述物联网网关根据所 述配置的策略, 将所述操作相同的操作消息合并至所述操作消息中优先级 最高的操作消息的相应位置执行。
6、 根据权利要求 1至 5任一项所述的方法, 其特征在于, 所述终端对 应的消息队列包括第一队列和第二队列, 所述第一队列配置为存储所述终 端的操作消息, 所述第二队列配置为存储所述终端的操作消息的下发序列, 所述操作消息的地址信息;
相应的, 所述按照处理后的结果将所述消息队列中的操作消息下发给 所述终端包括:
所述物联网网关 居所述第二队列中的访问地址读取所述终端的状态 信息;
所述物联网网关根据所述第二队列中所述操作消息的地址信息, 读取 存储在所述第一队列中终端的操作消息;
所述物联网网关根据所述终端的状态信息, 按照处理后的结果将读取 的所述操作消息下发给所述终端。
7、 根据权利要求 6所述的方法, 其特征在于, 所述物联网网关根据所 述终端的状态信息, 按照处理后的结果将读取的所述操作消息下发给所述 终端包括:
当所述终端的状态信息为休眠或停机状态时, 所述物联网网关在按照 处理后的结果将读取的所述操作消息进行下发之前, 插入唤醒或启动消息; 或者,
当所述终端的状态信息为正在执行状态, 且处理后的所述消息队列中 待发送的操作消息的优先级高于所述终端正在执行的操作时, 所述物联网 网关在按照处理后的结果将读取的所述操作消息进行下发之前, 插入终止 当前操作消息。
8、 根据权利要求 1至 5任一项所述的方法, 其特征在于, 所述按照处 理后的结果将所述消息队列中的操作消息下发给所述终端后, 所述方法还 包括:
所述终端根据处理后的所述消息队列中的操作消息的顺序执行操作; 当执行操作成功时, 所述终端向所述物联网网关返回成功消息, 所述 成功消息中携带所述终端的状态信息; 或者,
当执行操作失败时, 所述终端向所述物联网网关返回失败消息, 所述 失败消息中携带所述终端的状态信息和失败原因。
9、 根据权利要求 8所述的方法, 其特征在于, 所述方法还包括: 所述物联网网关接收所述终端返回的响应消息;
当所述响应消息为成功消息或失败消息时, 所述物联网网关将所述响 应消息发送给所述响应消息对应的操作消息的一个或多个发起方, 并将所 述响应消息对应的操作消息从所述终端对应的消息队列中删除; 或者, 当所述响应消息为操作正在执行时, 所述物联网网关标注所述终端的 状态信息为正在执行状态。
10、 一种物联网消息处理装置, 其特征在于, 位于物联网网关中, 包 括:
接收模块, 配置为接收多个发送方发送的用于终端操作的一条或多条 操作消息;
处理模块, 配置为对收到的所述操作消息在消息队列中緩存且进行预 处理, 并按照处理后的结果将所述消息队列中的操作消息下发给所述终端。
11、 根据权利要求 10所述的装置, 其特征在于, 所述处理模块包括: 调整模块, 配置为根据配置的策略, 对收到的所述操作消息与所述消 息队列中的消息顺序进行调整; 和 /或,
合并模块, 配置为根据配置的策略, 对收到的所述操作消息中操作相 同的操作消息, 和 /或与所述终端对应的消息队列中操作相同的操作消息进 行合并。
12、 根据权利要求 10所述的装置, 其特征在于, 所述终端对应的消息 队列包括第一队列和第二队列, 所述第一队列配置为存储所述终端的操作 消息, 所述第二队列配置为存储所述终端的操作消息的下发序列, 所述下 作消息的地址信息;
相应的, 所述处理模块包括:
读取模块, 配置为根据所述第二队列中的访问地址读取所述终端的状 态信息, 并根据所述第二队列中所述操作消息的地址信息, 读取存储在所 述第一队列中终端的操作消息;
下发模块, 配置为根据所述终端的状态信息, 按照处理后的结果将读 取的所述消息队列中的操作消息下发给所述终端。
13、 根据权利要求 12所述的装置, 其特征在于, 所述下发模块包括: 插入模块, 配置为当所述终端的状态信息为休眠或停机状态时, 在按 照处理后的结果将读取的所述操作消息进行下发之前, 插入唤醒或启动消 息; 或者, 当所述终端的状态信息为正在执行状态, 且处理后的所述消息 队列中待发送的操作消息的优先级高于所述终端正在执行的操作时, 在按 照处理后的结果将读取的所述操作消息进行下发之前, 插入终止当前操作 消息。
14、 根据权利要求 10至 13任一项所述的装置, 其特征在于, 所述装 置还包括:
第二接收模块, 配置为接收所述终端返回的响应消息;
发送模块, 配置为当所述响应消息为操作执行的成功消息或失败消息 时, 将所述响应消息发送给所述响应消息对应的操作消息的一个或多个发 起方, 并将所述响应消息对应的操作消息从所述终端对应的消息队列中删 除; 和 /或,
标注模块, 配置为当所述响应消息为操作正在执行时, 标注所述终端 的状态信息为正在执行状态。
15、 一种物联网消息处理系统, 其特征在于, 包括如权利要求 10至 14 任一项所述的物联网消息处理装置, 还包括终端; 其中, 所述终端包括: 执行模块, 配置为根据处理后的所述消息队列中的操作消息的顺序执 行操作;
返回模块, 配置为当执行操作成功时, 向所述物联网网关返回成功消 息, 所述成功消息中携带所述终端的状态信息; 当执行操作失败时, 向所 述物联网网关返回失败消息, 所述失败消息中携带所述终端的状态信息和 失败原因。
PCT/CN2013/078841 2012-07-04 2013-07-04 物联网消息处理方法、装置及系统 WO2014005535A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US14/410,850 US9832275B2 (en) 2012-07-04 2013-07-04 Message processing method, device and system for internet of things
EP13812651.1A EP2871809B1 (en) 2012-07-04 2013-07-04 Message processing method, device and system for internet of things

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201210229807.3A CN103532823B (zh) 2012-07-04 2012-07-04 物联网消息处理方法、装置及系统
CN201210229807.3 2012-07-04

Publications (1)

Publication Number Publication Date
WO2014005535A1 true WO2014005535A1 (zh) 2014-01-09

Family

ID=49881353

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/078841 WO2014005535A1 (zh) 2012-07-04 2013-07-04 物联网消息处理方法、装置及系统

Country Status (4)

Country Link
US (1) US9832275B2 (zh)
EP (1) EP2871809B1 (zh)
CN (2) CN107317839A (zh)
WO (1) WO2014005535A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114650310A (zh) * 2022-03-11 2022-06-21 腾讯科技(深圳)有限公司 基于物联网的设备控制方法、装置、电子设备及存储介质

Families Citing this family (32)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107317839A (zh) * 2012-07-04 2017-11-03 中兴通讯股份有限公司 物联网消息处理方法、装置及系统
US9756131B2 (en) * 2013-10-01 2017-09-05 Verizon Deutschland Gmbh Label for use in the internet of things
JP2015115014A (ja) * 2013-12-13 2015-06-22 富士通株式会社 ノード装置、情報処理システム、情報処理方法、及び情報処理プログラム
CN105338008A (zh) * 2014-06-10 2016-02-17 阿尔卡特朗讯 一种用于物联网的设备调度方法、设备与系统
JP2016024212A (ja) * 2014-07-16 2016-02-08 ソニー株式会社 情報処理装置、情報処理方法およびプログラム
CN105472661B (zh) * 2014-09-04 2019-05-07 阿尔卡特朗讯 一种用于物联网的缓存方法、设备与系统
US11134365B2 (en) 2014-12-29 2021-09-28 Convida Wireless, Llc Resource link management at service layer
WO2017047434A1 (ja) 2015-09-18 2017-03-23 ソニー株式会社 送信装置、受信装置、およびデータ処理方法
CN106878916A (zh) * 2015-12-11 2017-06-20 中兴通讯股份有限公司 消息发送方法及装置
CN106453473A (zh) * 2016-07-15 2017-02-22 孙宝石 解决物联网中多消息通道控制消息冲突的方法及系统
CN107016056B (zh) * 2017-03-07 2021-01-12 西安电子科技大学 一种物联网中海量异构传感数据的分布式存储系统和方法
CN106851016B (zh) 2017-03-10 2019-03-19 Oppo广东移动通信有限公司 广播消息排队的方法、装置及终端
US10341463B2 (en) * 2017-05-03 2019-07-02 International Business Machines Corporation System and method for message queue configuration in a network
CN107181674A (zh) * 2017-06-16 2017-09-19 深圳市盛路物联通讯技术有限公司 物联网中消息传递方法和装置
CN107395572B (zh) * 2017-06-29 2020-04-14 京信通信系统(中国)有限公司 一种数据处理方法及物联网网关
CN107592556B (zh) * 2017-08-08 2020-02-04 福建星网视易信息系统有限公司 基于移动终端的控制信息合成方法及受控终端和移动终端
CN107592275A (zh) * 2017-11-09 2018-01-16 深圳门之间科技有限公司 一种排队控制方法及其系统
CN108039960B (zh) * 2017-11-30 2021-04-20 海信集团有限公司 配置信息下发方法及服务器
CN108830937B (zh) * 2018-05-25 2023-08-08 如你所视(北京)科技有限公司 一种操作冲突的处理方法及服务器
TR201818982A2 (tr) * 2018-12-10 2020-06-22 Siemens San Ve Tic A S Bir komünikasyon usulü.
CN110058949B (zh) * 2019-04-30 2023-03-31 华侨大学 一种基于智能边缘计算的传感云低耦合控制方法
CN110535889B (zh) * 2019-10-15 2021-05-25 四川长虹电器股份有限公司 一种物联网交互系统
US11470184B2 (en) * 2019-12-12 2022-10-11 Microsoft Technology Licensing, Llc. Intellegent queuing of rules based command invocations
CN111263061B (zh) * 2020-01-22 2021-07-06 青岛海信医疗设备股份有限公司 摄像头控制方法和通信终端
CN111405046B (zh) * 2020-03-18 2023-06-27 浩云科技股份有限公司 一种批量设备的授权方法
CN111796951B (zh) * 2020-07-17 2022-07-08 亿咖通(湖北)技术有限公司 一种车载信息娱乐系统的调度方法和电子设备
CN112887196B (zh) * 2021-01-20 2023-03-24 远景智能国际私人投资有限公司 消息发送方法、系统、装置、设备及可读存储介质
CN112666877B (zh) * 2021-02-01 2022-11-29 亚特智物联技术(广东)有限公司 一种物联网的控制系统
CN112463420B (zh) * 2021-02-02 2021-05-18 湖北亿咖通科技有限公司 一种车机桌面系统的信息调度方法和电子设备
CN113900834B (zh) * 2021-09-24 2023-02-14 天津同阳科技发展有限公司 基于物联网技术的数据处理方法、装置、设备及存储介质
CN115132332B (zh) * 2022-06-21 2023-12-22 深圳伯医科技有限公司 一种精准检查预约消息的推送方法及相关设备
CN115866091B (zh) * 2023-01-29 2023-05-16 北京飞利信信息安全技术有限公司 一种信号处理方法、装置、电子设备及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001344121A (ja) * 2000-06-02 2001-12-14 Canon Inc 情報機器、受信処理方法および記録媒体
CN1691632A (zh) * 2004-04-08 2005-11-02 捷讯研究有限公司 基于优先级的消息发送队列重新排序
CN101166208A (zh) * 2006-10-20 2008-04-23 北京直真节点技术开发有限公司 一种维护作业自动化的方法及系统
CN101499017A (zh) * 2009-03-02 2009-08-05 南京联创科技股份有限公司 实现项目实时跟踪的方法
CN101808025A (zh) * 2010-04-13 2010-08-18 中兴通讯股份有限公司 一种实现智能家居应用的装置、系统和方法

Family Cites Families (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08320838A (ja) * 1995-05-26 1996-12-03 Fujitsu Ltd 端末管理方法並びにそのためのホスト計算機及びフロントエンドプロセッサ
KR100686775B1 (ko) 2003-11-07 2007-02-23 삼성전자주식회사 광대역 무선 접속 통신 시스템에서 트래픽 지시 메시지 전송 방법
US7673018B2 (en) 2004-04-08 2010-03-02 Research In Motion Limited Message send queue reordering based on priority
US8023408B2 (en) * 2004-11-19 2011-09-20 International Business Machines Corporation Dynamically changing message priority or message sequence number
US8607235B2 (en) * 2004-12-30 2013-12-10 Intel Corporation Mechanism to schedule threads on OS-sequestered sequencers without operating system intervention
CN100531419C (zh) * 2006-03-25 2009-08-19 华为技术有限公司 PoC业务媒体请求的处理方法及装置
CN101340612B (zh) * 2007-07-04 2011-07-13 中兴通讯股份有限公司 一种无线通信系统逻辑信道分组调度方法
CN101355488B (zh) * 2007-07-25 2012-07-18 中国移动通信集团公司 网络发起的消息类业务中控制流量的方法和系统
CN101150354B (zh) * 2007-10-29 2012-03-21 华为技术有限公司 消息调度方法和消息调度装置
CN100596123C (zh) * 2007-11-16 2010-03-24 华为技术有限公司 一种网关系统及其消息业务处理方法
US20090144385A1 (en) * 2008-03-03 2009-06-04 Harry Gold Sequential Message Transmission System
CN101362334A (zh) * 2008-09-25 2009-02-11 塔米智能科技(北京)有限公司 一种智能机器人及其运作方法
US9106617B2 (en) * 2009-03-10 2015-08-11 At&T Intellectual Property I, L.P. Methods, systems and computer program products for authenticating computer processing devices and transferring both encrypted and unencrypted data therebetween
US9361165B2 (en) * 2009-12-03 2016-06-07 International Business Machines Corporation Automated merger of logically associated messages in a message queue
CN102137071A (zh) * 2010-01-25 2011-07-27 中兴通讯股份有限公司 一种物联网中实现快速响应的方法及系统
CN101767590B (zh) * 2010-03-02 2011-12-21 中国铁道科学研究院通信信号研究所 管控结合的控制方法及系统
CN101895544B (zh) * 2010-07-15 2013-10-30 普联技术有限公司 通信设备的多用户控制方法、多用户控制系统和服务器
CN102014052B (zh) * 2010-11-05 2013-12-11 中国科学院声学研究所 一种虚拟动态优先级分组调度方法
CN102035890B (zh) * 2010-12-08 2013-05-29 中国科学院声学研究所 一种基于面向物联网应用的Web服务并发控制方法及系统
US8375400B2 (en) * 2011-02-11 2013-02-12 Research In Motion Limited Communication device and method for coherent updating of collated message listings
CN107317839A (zh) * 2012-07-04 2017-11-03 中兴通讯股份有限公司 物联网消息处理方法、装置及系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001344121A (ja) * 2000-06-02 2001-12-14 Canon Inc 情報機器、受信処理方法および記録媒体
CN1691632A (zh) * 2004-04-08 2005-11-02 捷讯研究有限公司 基于优先级的消息发送队列重新排序
CN101166208A (zh) * 2006-10-20 2008-04-23 北京直真节点技术开发有限公司 一种维护作业自动化的方法及系统
CN101499017A (zh) * 2009-03-02 2009-08-05 南京联创科技股份有限公司 实现项目实时跟踪的方法
CN101808025A (zh) * 2010-04-13 2010-08-18 中兴通讯股份有限公司 一种实现智能家居应用的装置、系统和方法

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114650310A (zh) * 2022-03-11 2022-06-21 腾讯科技(深圳)有限公司 基于物联网的设备控制方法、装置、电子设备及存储介质
CN114650310B (zh) * 2022-03-11 2023-03-14 腾讯科技(深圳)有限公司 基于物联网的设备控制方法、装置、电子设备及存储介质

Also Published As

Publication number Publication date
EP2871809A1 (en) 2015-05-13
EP2871809A4 (en) 2015-07-22
US9832275B2 (en) 2017-11-28
CN103532823A (zh) 2014-01-22
CN103532823B (zh) 2018-11-23
CN107317839A (zh) 2017-11-03
EP2871809B1 (en) 2018-10-31
US20150189030A1 (en) 2015-07-02

Similar Documents

Publication Publication Date Title
WO2014005535A1 (zh) 物联网消息处理方法、装置及系统
US9998522B2 (en) Fast join of peer to peer group with power saving mode
US10091307B2 (en) Application management method and terminal
WO2022116323A1 (zh) 一种联邦学习调度方法、装置及系统
EP2984810B1 (en) Energy efficient data handling for mobile devices
CN105847447A (zh) 消息推送方法和装置
CN102999384B (zh) 在挂起状态和执行状态下管理进程
CN104899274A (zh) 一种内存数据库高效远程访问方法
WO2011022976A1 (zh) 一种通用串行总线调制解调器设备的节电装置及方法
CN112445147A (zh) 智能设备的唤醒方法、系统、装置、电子设备及存储介质
CN101335723A (zh) 一种即时通讯系统及其窗口的创建方法和系统
CN110111789A (zh) 语音交互方法、装置、计算设备和计算机可读介质
CN111858090B (zh) 一种数据处理方法、系统、电子设备及存储介质
CN109358805A (zh) 一种数据缓存方法
CN103906018A (zh) 一种用于发送短信的方法及装置
CN111737254A (zh) 一种提高应用缓存利用率的方法及装置
CN101534200A (zh) 一种客户机的省电工作方法
CN108460047A (zh) 数据同步方法及设备
WO2023082602A1 (zh) 一种远程管理方法、远程管理设备、模块及可读存储介质
TW201041364A (en) Mobile device, power saving method and computer executable medium
CN110868395B (zh) 一种基于收发单框架的大并发业务处理方法、设备及介质
EP3293896B1 (en) Intra-body communication device, intra-body communication method, and program
CN113448647A (zh) 资源同步方法、实现设备及电子设备
US10461957B2 (en) System and method for supporting both bulk storage and Ethernet communications
WO2024037482A1 (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: 13812651

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 14410850

Country of ref document: US

WWE Wipo information: entry into national phase

Ref document number: 2013812651

Country of ref document: EP

NENP Non-entry into the national phase

Ref country code: DE