WO2021212293A1 - Method and apparatus for transmitting messages in internet of things, server, device and cloud platform - Google Patents

Method and apparatus for transmitting messages in internet of things, server, device and cloud platform Download PDF

Info

Publication number
WO2021212293A1
WO2021212293A1 PCT/CN2020/085739 CN2020085739W WO2021212293A1 WO 2021212293 A1 WO2021212293 A1 WO 2021212293A1 CN 2020085739 W CN2020085739 W CN 2020085739W WO 2021212293 A1 WO2021212293 A1 WO 2021212293A1
Authority
WO
WIPO (PCT)
Prior art keywords
resource
attribute information
server
notification message
trigger condition
Prior art date
Application number
PCT/CN2020/085739
Other languages
French (fr)
Chinese (zh)
Inventor
吕小强
Original Assignee
Oppo广东移动通信有限公司
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 Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Priority to PCT/CN2020/085739 priority Critical patent/WO2021212293A1/en
Priority to CN202080098894.6A priority patent/CN115362666A/en
Publication of WO2021212293A1 publication Critical patent/WO2021212293A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks

Definitions

  • the embodiments of the present application relate to, but are not limited to, the Internet of Things technology, and in particular, to a method, device, server, equipment, and cloud platform for transmitting messages in the Internet of Things.
  • the Internet of Things is an important part of the new generation of information technology. As the Internet of Things scenarios become more and more complex, there are more and more information exchange devices, which leads to an increase in the computing resources of the server, and how to reduce the computing resources of the server is an urgent problem in this field.
  • the embodiments of the present application provide a method, device, server, equipment, and cloud platform for message transmission in the Internet of Things.
  • a method for transmitting messages in the Internet of Things including:
  • the server sends a first request to the first device, the first request instructs the first device to send a notification message to the server when the attribute information of the first resource meets the trigger condition, and the notification message includes or indicates Attribute information of the first resource;
  • a method for transmitting messages in the Internet of Things including:
  • the server receives a second message sent by the cloud platform, where the second message includes or instructs the first device to complete the setting of a trigger condition, and the trigger condition is used when the attribute information of the first resource of the first device satisfies the In the case of a trigger condition, trigger the first device to send a notification message to the server, where the notification message includes or indicates the attribute information of the first resource;
  • a method for transmitting messages in the Internet of Things including:
  • the cloud platform sends a first request to the first device, the first request instructing the first device to send a notification message to the server when the attribute information of the first resource meets the trigger condition, and the notification message includes or Indicates the attribute information of the first resource.
  • a method for transmitting messages in the Internet of Things including:
  • the first device monitors the attribute information of the first resource
  • a notification message is sent to the server; the notification message includes or indicates the attribute information of the first resource.
  • a device for transmitting messages in the Internet of Things including:
  • the request sending unit is configured to send a first request to a first device, where the first request instructs the first device to send a notification message to the server when the attribute information of the first resource meets a trigger condition, and
  • the notification message includes or indicates the attribute information of the first resource
  • the notification message receiving unit is configured to receive the notification message sent by the first device.
  • a device for transmitting messages in the Internet of Things including:
  • the second message receiving unit is configured to receive a second message sent by the cloud platform, the second message including or instructing the first device to complete the setting of the trigger condition, and the trigger condition is used in the first device of the first device.
  • the attribute information of the resource satisfies the trigger condition, trigger the first device to send a notification message to the server, where the notification message includes or indicates the attribute information of the first resource;
  • the notification message receiving unit is configured to receive the notification message sent by the first device.
  • a device for transmitting messages in the Internet of Things including:
  • the request sending unit is configured to send a first request to a first device, where the first request instructs the first device to send a notification message to the server when the attribute information of the first resource meets a trigger condition, and
  • the notification message includes or indicates the attribute information of the first resource.
  • a message transmission device in the Internet of Things including:
  • the monitoring unit is used to monitor the attribute information of the first resource
  • the notification message sending unit is configured to send a notification message to the server if the attribute information of the first resource meets the trigger condition; the notification message includes or indicates the attribute information of the first resource.
  • a server including: a memory and a processor,
  • the memory stores a computer program that can run on the processor
  • a cloud platform including: a memory and a processor
  • the memory stores a computer program that can run on the processor
  • a first device including: a memory and a processor
  • the memory stores a computer program that can run on the processor
  • a computer storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps in the foregoing method.
  • a chip including a processor, configured to call and run a computer program from a memory, so that a device installed with the chip executes the steps in the above method.
  • a computer program product in a fourteenth aspect, includes a computer storage medium, and the computer storage medium stores computer program code.
  • the computer program code includes instructions that can be executed by at least one processor. When the instructions are executed by the at least one processor, the steps in the method are implemented.
  • the server sends a first request to the first device.
  • the first request instructs the first device to send a notification message to the server when the attribute information of the first resource meets the trigger condition.
  • the notification message includes or indicates the first Attribute information of the resource; receiving the notification message sent by the first device.
  • the server sends the first request to the first device, so that the first device can receive the notification message sent by the first device when the attribute information of the first resource meets the triggering condition, instead of only requiring the attribute of the first resource
  • the notification message sent by the first device is received, so the number of notification messages received by the server decreases, and the computing resources of the server decrease.
  • FIG. 1 is a schematic diagram of an Internet of Things system provided by an embodiment of this application.
  • FIG. 2 is a schematic diagram of an information processing process of a server in the Internet of Things provided by an embodiment of this application;
  • FIG. 3 is a schematic diagram of an implementation process of a method for transmitting messages in the Internet of Things according to an embodiment of the application;
  • FIG. 4 is a schematic diagram of the implementation process of another method for transmitting messages in the Internet of Things provided by an embodiment of the application;
  • FIG. 5 is a schematic diagram of the implementation process of yet another method for message transmission in the Internet of Things provided by an embodiment of this application;
  • FIG. 6 is a schematic diagram of another Internet of Things system provided by an embodiment of the application.
  • FIG. 7 is a schematic diagram of the implementation process of yet another method for transmitting messages in the Internet of Things according to an embodiment of the application;
  • FIG. 8a is a schematic diagram of an implementation process of a method for transmitting messages in the Internet of Things according to another embodiment of this application;
  • FIG. 8b is a schematic diagram of the implementation process of a method for transmitting messages in the Internet of Things according to another embodiment of this application;
  • FIG. 8c is a schematic diagram of an implementation process of a method for transmitting messages in the Internet of Things according to still another embodiment of this application;
  • FIG. 9 is a schematic diagram of the composition structure of a message transmission device in the Internet of Things provided by an embodiment of the application.
  • FIG. 10 is a schematic diagram of the composition structure of another device for transmitting messages in the Internet of Things according to an embodiment of the application;
  • FIG. 11 is a schematic diagram of the composition structure of another device for transmitting messages in the Internet of Things according to an embodiment of this application;
  • FIG. 12 is a schematic diagram of the composition structure of another device for transmitting messages in the Internet of Things according to an embodiment of the application;
  • FIG. 13 is a schematic diagram of a hardware entity of a server provided by an embodiment of the application.
  • FIG. 14 is a schematic diagram of a hardware entity of a cloud platform provided by an embodiment of the application.
  • 15 is a schematic diagram of a hardware entity of a first device provided by an embodiment of this application.
  • FIG. 16 is a schematic structural diagram of a chip provided by an embodiment of the present application.
  • FIG. 1 is a schematic diagram of an Internet of Things system provided by an embodiment of this application. As shown in FIG. 1, the Internet of Things system includes resource devices 11, 12, 13, 14, and 15, and a server 16. in:
  • the resource devices 11, 12, 13, 14, and 15 may be sensor nodes in the Internet of Things.
  • the sensor node includes a sensor and a communication module, where the sensor is used for sensing data, and the communication module is used for communication of resource devices.
  • the resource devices can be smart speakers, air conditioners, electric lights, kettles, televisions, mobile phones, computers, smart watches, augmented reality devices, or virtual reality devices.
  • the server 16 may be an Internet of Things connection management platform, an Internet of Things application server, or a gateway.
  • the resource devices 11-15 can all be connected to the server 16, and the server 16 can exchange information with the resource devices 11-15.
  • the server 16 can manage the resource devices 11-15, such as resource device software and hardware upgrades. , At least one of resource equipment function control, resource subscription and resource query, etc. It should be understood that in other embodiments, the resource device 14 or 15 may be directly connected to the server 16.
  • Resource devices can also be connected to each other.
  • resource device 11 can be connected to resource devices 14 and 15, respectively. Messages or data between server 16 and resource device 14 are forwarded via resource device 11, and resource device 11 can also connect to resource devices 14 and 15. Messages or data undergo certain processing, such as data preprocessing/filtering, communication protocol or message format conversion, etc.
  • the communication connection between the resource devices, or between the resource device and the server through the communication module is not limited
  • connection mode or communication protocol between the resource device and the resource device, or between the server and the resource device.
  • a wired connection can be used, and the Constrained Application Protocol (CoAP) can be used for data or message transmission.
  • Constrained Application Protocol can be used for data or message transmission.
  • NB-IoT Narrow Band Internet of Things
  • MQTT Use Message Queuing Telemetry Transport
  • the server manages the resource equipment in the form of resources.
  • the "resource” is an abstract concept, which can refer to the physical form of the resource equipment, or the model of the resource equipment, software and hardware. Static attributes such as version or manufacturer can also refer to dynamic attributes such as operations that the resource device can perform, events that can be reported, parameters, or status parameters that can be read.
  • Each resource has a unique identifier.
  • the identifier can be a name, a Uniform Resource Identifier (URI), a Uniform Resource Locator (URL), or any other type that can distinguish and identify resources. Format. In this application, URI is taken as an example to identify resources.
  • the URI of server 16 is “/server16”
  • the URIs of resource devices 11 to 15 are "/server16/device11", “/server16/device12”, and “/server16” /device13", “/server16/device11/device14”, “/server16/device11/device15”.
  • Figure 2 is a schematic diagram of the information processing process of a server in the Internet of Things provided by an embodiment of this application.
  • the server has a rule resource (oic.r.rule), and the rule resource is a collective resource.
  • the set of resources includes the following three resources, namely a rule input resource (oic.r.ruleinput) 21, a rule expression resource (oic.r.ruleexpressiom) 22, and a rule behavior resource (oic.r.ruleaction) 23.
  • the rule input resource 21 and the rule action resource 23 are both a collection resource, which may include a rule input collection (Rule Input Collection) and a rule action collection (Rule Actions Collection), respectively.
  • Rule Input Collection a rule input collection
  • Rule Actions Collection a rule action collection
  • the rule input of this rule is stored in the rule input resource 21, and the expression of each rule input is as follows:
  • the regular expression resource 22 includes regular expressions and rule results.
  • the rule result changes from false to true
  • the rule input changes from not satisfying the regular expression to
  • the rule behavior is executed, and the execution rule behavior is generally to modify the attributes of a certain resource or a series of resources.
  • the rule input resource 21 of the server receives a resource (for example, mytemperature)
  • this resource can be a resource on the server or a resource device other than the server, and the server can link to the rule based on the received resource Input (for example, the value of mytemperature), that is, the server obtains the rule input according to the resource.
  • the rule input can be understood as the value of the resource.
  • the server can transmit the rule input to the rule expression. If the rule enable (Rule Enable) is true, the server Determine whether the rule input satisfies the rule expression. If it is satisfied, output the rule result.
  • the rule input is the input element of the rule judgment condition
  • the rule expression is an expression formed according to the input of each rule. If the rule expression is judged to be true, the rule behavior is executed.
  • the rule enablement is used to enable the server to determine whether or not the rule expression is required.
  • the server can control to disable/enable a certain resource for a period of time, so that the rule enablement corresponding to this resource is fasle/true.
  • the behavior enable is used to determine whether to execute the behavior action when the rule result is true. The true or false of the rule enable and the behavior enable can be determined based on the user's operation or configuration determination.
  • the rule in the server is to turn on the air conditioner when the indoor temperature reaches 30 degrees.
  • the temperature is a rule input.
  • the temperature is greater than or equal to 30 is a rule expression.
  • the server's rule engine will It is judged whether the temperature is greater than or equal to 30. If the judgment result is true, the rule behavior of "turn on the air conditioner" will be executed.
  • a server running rules needs to subscribe to a resource pointed to or linked by a ruleInput resource.
  • This resource can be called a target input resource, for example, a temperature sensor of a resource device.
  • the resource device When the attribute information of the target input resource changes, the resource device will send a notification message to the server running the rule.
  • the server receives the notification message, it will substitute the attribute value of the target input resource's attribute information into the regular expression for calculation .
  • each notification message of the target input resource will cause the server to perform a regular expression calculation, which greatly wastes the server's resources.
  • FIG. 3 is a schematic diagram of the implementation process of a message transmission method in the Internet of Things provided by an embodiment of the application. As shown in FIG. 3, the method is applied to a server, and the method includes:
  • the server sends a first request to the first device.
  • the first request instructs the first device to send a notification message to the server when the attribute information of the first resource meets the trigger condition.
  • the notification message includes or indicates the attribute information of the first resource. .
  • the first device may be any of the resource devices listed above.
  • the first device in the embodiment of this application can be understood as an input resource device (inputDevice), and the server in the embodiment of this application can be understood as a rule resource device (ruleDevice).
  • ruleInput There is a resource referenced by the rule input (ruleInput) on the inputDevice, which means that a certain resource of the inputDevice is used as the input resource of the rule.
  • the ruleDevice is a resource device that saves the ruleInput resource, the rule expression ruleExpression resource, and the rule action ruleAction resource, and runs the entire rule on the ruleDevice.
  • the first resource may be a resource in the first device, for example, a sensor in the first device; or, the first resource may be a resource outside the first device, for example, a camera in the first device shoots for a certain target/object
  • the first resource is the resource in the target/object.
  • the attribute information of the first resource can be obtained in the following manner: the first device senses the attribute information of the first resource, or a device outside the first device senses the attribute information of the first resource and sends the attribute information of the first resource Give the first device.
  • the first request may include a trigger condition of the notification message, so that the first device can obtain the trigger condition by parsing the first request.
  • the first request may not include the trigger condition of the notification message, but may include at least one of the trigger condition's identifier, address, index, or link, so that the first device can be based on the trigger condition. At least one of the identification, address, index, or link, the trigger condition is acquired.
  • the trigger condition is determined by the server.
  • a resource device can have at least one resource, and different resources on a resource device can correspond to different trigger conditions.
  • a resource device can correspond to temperature resources.
  • the trigger condition and the trigger condition of the brightness resource can be determined by the server.
  • the notification message indicates the attribute information of the first resource of the first device.
  • the notification message includes the resource identifier (for example, URI or resource name) of the first resource, so that the server can obtain the attribute information of the first resource through the resource identifier of the first resource.
  • the notification message may include the attribute information of the first resource, so that the server can parse the notification message to obtain the attribute information of the first resource.
  • the attribute information of the first resource may include the attribute value of the first resource.
  • the attribute information of the first resource may further include at least one of the status information, data type, location information, and parameter information of the first device of the first resource.
  • the attribute value of the first resource may be a value measured by a sensor, for example, a sensed value of the sensor.
  • the first device may also include a second resource, a third resource, etc., and each resource may have its own attribute information.
  • the first device may be a monitoring resource device used to monitor the opening or closing of a room door, and the first resource may be the monitoring resource Sensors in the device.
  • the sensor's sensing value when the room door is opened, the sensor's sensing value is 1, and the attribute value of the first resource is 1, where 1 means the room door is open; when the room door is closed, the sensor's sensing value If the value is 0, the attribute value of the first resource is 0, where 0 means that the room door is closed.
  • the server receives the notification message sent by the first device.
  • the server obtains the resource identifier of the first resource by parsing the notification message, and obtains the attribute information of the first resource corresponding to the resource identifier.
  • the server obtains the attribute information of the first resource of the first device by parsing the notification message.
  • the server sends the first request to the first device, so that the first device can receive the notification message sent by the first device only when the attribute information of the first resource meets the trigger condition, instead of only the first device.
  • the notification message sent by the first device is received, so that the number of notification messages received by the server decreases, and the computing resources of the server decrease.
  • Fig. 4 is a schematic diagram of the implementation process of another method for message transmission in the Internet of Things provided by an embodiment of the application. As shown in Fig. 4, the method includes:
  • the server sends a first request to the first device, where the first request instructs the first device to send a notification message to the server when the attribute information of the first resource meets the trigger condition.
  • the notification message includes or indicates the attribute information of the first resource. ;
  • the first device receives the first request sent by the server.
  • the first device may obtain the trigger condition by parsing the first request.
  • the first device can obtain the identifier, address, index or link of the trigger condition by parsing the first request, and obtain it from the server or other device based on the identifier, address, index or link of the trigger condition Triggering conditions.
  • the first device monitors the attribute information of the first resource, and determines that the attribute information of the first resource satisfies the trigger condition.
  • the first device can monitor the attribute information of the first resource continuously or periodically or non-periodically, and each time it monitors the attribute information of the first resource, it determines whether the attribute information of the first resource meets the trigger condition, If the first device determines that the attribute information of the first resource meets the trigger condition, it sends a notification message to the server. If the first device determines that the attribute information of the first resource does not meet the trigger condition, it does not send the notification message to the server, and the first device continues Monitor the attribute information of the first resource.
  • the first device sends a notification message to the server; the server receives the notification message sent by the first device.
  • the first device when the first device interacts with the server, because the first device can obtain the trigger condition through the first request sent by the server, the first device monitors that the attribute information of the first resource meets the trigger condition. Send notification messages to the server, and the number of notification messages received by the server is small, and the computing resources of the server are low.
  • FIG. 5 is a schematic diagram of the implementation process of another method for message transmission in the Internet of Things provided by an embodiment of the application. As shown in FIG. 5, the method includes:
  • the server creates a rule resource.
  • the rule resource may include constraint conditions (the constraint conditions in the embodiments of this application can all be understood as the first constraint condition), N input resources corresponding to the constraint conditions, and M behavior resources corresponding to the constraint conditions; N is greater than or A positive integer equal to 1; M is a positive integer greater than or equal to 1. Among them, the N input resources include the first resource. Constraints can be understood as regular expressions.
  • any one of the N input resources is different from any one of the M behavior resources.
  • part of the input resources in the N input resources is the same as part of the input resources in the M behavior resources.
  • the rule resource created by the server may include at least two constraint conditions, input resources corresponding to the at least two constraint conditions, and behavior resources corresponding to the at least two constraint conditions.
  • the at least two constraint conditions may include the first constraint condition.
  • the rule resource created by the server may include a first constraint condition and a second constraint condition, as well as N input resources corresponding to the first constraint condition, M behavior resources corresponding to the first constraint condition, and the second constraint condition.
  • P or Q is a positive integer greater than or equal to 1.
  • any one of the N input resources is different from any one of the P input resources, or some of the N input resources are the same as some of the P input resources.
  • any one of the M behavior resources is different from any one of the Q behavior resources, or some of the M behavior resources are the same as some of the Q behavior resources.
  • Rule resources include rule input resources, rule expression resources, and rule behavior resources. Wherein, at least two constraint conditions can be included in the rule expression resource, input resources corresponding to the at least two constraint conditions can be included in the rule input resource, and behavior resources corresponding to the at least two constraint conditions can be included in the rule behavior resource.
  • at least two constraint conditions can be included in the rule expression resource
  • input resources corresponding to the at least two constraint conditions can be included in the rule input resource
  • behavior resources corresponding to the at least two constraint conditions can be included in the rule behavior resource.
  • the embodiment of the present application takes the rule resource including the first constraint condition as an example to illustrate the message transmission mode.
  • the message transmission mode when the rule resource includes at least two constraint conditions It is similar to the message transmission mode when the rule resource includes the first constraint condition.
  • the number of N in the embodiment of the present application may be the same as the number of resources in the constraint condition.
  • a certain input resource among the N input resources and a certain behavior resource among the M behavior resources may be resources on the same device, or may be resources on different devices.
  • the determination and modification of the constraint conditions may be obtained through configuration.
  • the server may receive configuration information sent by a resource device, and the configuration information may include or indicate constraint conditions, or include or indicate modification information to the constraint conditions, so that the server can obtain the constraint conditions based on the configuration information, or can be based on the configuration information Modify the constraints.
  • S503 The server sends a request for subscribing to the first resource to the first device; the first device receives the request for subscribing to the first resource sent by the server.
  • the server needs to register the resource in the rule resource after it obtains the created rule resource.
  • the server can send a resource subscription request to one or at least two devices corresponding to the resource in the rule resource.
  • the resource subscription request may include or indicate the resource identifier to be subscribed.
  • the server may send the identifier or name of the first resource to the first device, so that the first device may subscribe to the first resource based on the received identifier or name of the first resource. That is, the request for subscribing to the first resource may include the identifier or name of the first resource.
  • the server can not only subscribe to the first resource of the first device, but also subscribe to other resources in the first device, such as the second resource and the third resource in the first device, or it can also subscribe to the Internet of Things. Resources in other resource devices.
  • the first device may store the identification or name of the first resource in the subscription resource of the first device. After the storage is completed, the first device also completes the subscription of the first resource.
  • the first device sends a first message to the server, where the first message includes or indicates that the first resource subscription is successful.
  • the first device may send the first message to the server.
  • the first message can also be understood as a resource subscription success message; the server receives the first message sent by the first device.
  • the server After the server receives the first message sent by the first device, the server determines that the first resource subscription is completed.
  • the server can determine the trigger condition based on the constraint condition.
  • the server can determine the trigger based on the expression corresponding to a rule input resource (the first resource) included in the constraint condition condition. For example, the server may determine the constraint condition as the trigger condition. For another example, the server can modify the parameters in the constraint condition to obtain the trigger condition.
  • the server can decompose the constraint conditions, so that the decomposed rule input can be based on at least two rule inputs.
  • the expressions corresponding to the resources respectively obtain the trigger conditions.
  • the server decomposes the constraint condition into N sub-conditions; the N sub-conditions have a one-to-one correspondence with the N input resources; and the sub-conditions corresponding to the first resource are determined from the N sub-conditions.
  • one sub-condition corresponds to one resource, that is, when the constraint condition is decomposed into N sub-conditions, one sub-condition corresponds to only one resource.
  • resource A resource A
  • resource B resource B
  • the server may determine the sub-conditions corresponding to the first resource from the N sub-conditions.
  • S509 The server determines a trigger condition based on the sub-condition corresponding to the first resource.
  • the trigger condition may include one of the following: the attribute information of the first resource is greater than the first threshold; within the first time period, the attribute information of the first resource is greater than the first threshold; the attribute information of the first resource is less than the second threshold; During the second time period, the attribute information of the first resource is less than the second threshold; during the third time period, the attribute information of the first resource changes, and the changed value is greater than the first value.
  • the first duration, the second duration, and the third duration may be durations determined by the first device itself, or the first duration, the second duration, and the third duration may be durations configured by the server or other devices.
  • the first duration, the second duration, or the third duration may be the running duration of a certain timer before it expires.
  • the server may determine the sub-condition corresponding to the first resource as the trigger condition. For example, the sub-condition corresponding to the first resource is "resource A>17", and it is determined that the trigger condition is also "resource A>17".
  • the server may modify the determined sub-condition corresponding to the first resource, and determine the modified sub-condition corresponding to the first resource as the trigger condition. That is, the threshold or value corresponding to the sub-condition corresponding to the first resource may be greater than or smaller than the threshold or value corresponding to the trigger condition. In one embodiment, the server may determine the threshold or value corresponding to the sub-condition corresponding to the first resource, and add or subtract a certain value from the threshold or value corresponding to the sub-condition to obtain the threshold corresponding to the trigger condition Or numerical value. For example, when the sub-condition corresponding to the first resource is "resource A>17", the trigger condition may be "resource A>18", or the trigger condition may be "resource A>15".
  • steps S503 to S505 and the step server to determine the trigger condition based on the constraint condition.
  • the order of execution during execution for example, steps S503 to S505 can be executed first, and then the step server is executed based on the constraint.
  • the condition determines the trigger condition.
  • the step server may first determine the trigger condition based on the constraint condition, and then steps S503 to S505 are executed, or steps S503 to S505 can be executed synchronously with the step server determining the trigger condition based on the constraint condition.
  • the server sends a first request to the first device.
  • the first request instructs the first device to send a notification message to the server when the attribute information of the first resource meets the trigger condition.
  • the notification message includes or indicates the attribute information of the first resource. ;
  • the first device receives the first request sent by the server.
  • the attribute information of the first resource satisfies the trigger condition, and may include one of the following:
  • the attribute information of the first resource is greater than the first threshold
  • the attribute information of the first resource is greater than the first threshold
  • the attribute information of the first resource is less than the second threshold
  • the attribute information of the first resource is less than the second threshold
  • the attribute information of the first resource changes within the third time period, and the changed value is greater than the first value.
  • the first device sends a second message to the server, where the second message includes or indicates that the first device completes the setting of the trigger condition; the server receives the second message sent by the first device.
  • the first device After receiving the first request, the first device can obtain the trigger condition of the notification message based on the first request, and set the trigger condition. For example, an implementation manner of setting the trigger condition may be to store the trigger condition in the first request. In one device or in the subscription resource of the first device. After the first device finishes setting the trigger condition, it can send a second message to the server.
  • S515 The first device monitors the attribute information of the first resource, and determines that the attribute information of the first resource satisfies the trigger condition.
  • the notification message includes or indicates the attribute information of the first resource.
  • the attribute information of the first resource satisfies the trigger condition, which can be understood as the attribute value of the first resource satisfies the trigger condition.
  • the first device sends a notification message to the server; the server receives the notification message sent by the first device.
  • the first device may send a notification message to the server when it is determined that the attribute information of the first resource satisfies the trigger condition.
  • the first device may determine that if the attribute information of the first resource is greater than the first threshold, send a notification message to the server.
  • the trigger condition is that the attribute information is greater than 25, and the first device determines that the attribute information of the first resource is 26, and sends a notification message to the server.
  • the first device may determine that if the attribute information is greater than the first threshold within the first time period, send a notification message to the server.
  • the first device may start and run the first timer when it is determined that the attribute information of the first resource is greater than the first threshold.
  • the first timer is configured to run for the first period of time and then time out.
  • the first device will continuously monitor whether the attribute information of the first resource is still greater than the first threshold. If so, the first device sends a notification message to the server, if not, the first device does not send a notification to the server Message, and continue to monitor the attribute information of the first resource.
  • the first device may send a notification message to the server after determining that the attribute information of the first resource is less than the second threshold, or the first device may determine that: within the second time period, the first device The attribute information of a resource is less than the second threshold.
  • the first device may send a notification message to the server after determining that the attribute information of the first resource has changed within the third time period and the changed value is greater than the first value.
  • the first device may determine the attribute information of the first resource before and after the third time period every third time period, and if it is determined that the change value of the attribute information of the first resource is greater than the first value, it sends a notification message to the server.
  • the first device can control a second timer to restart periodically, the second timer is configured to run for a third period of time and then time out, and restart in the case of timeout, the first device can obtain: the second timer respectively The attribute information of the first resource corresponding to the restart time, and the attribute information of the first resource corresponding to the second timer at the time of timeout, so as to obtain the value of the change in the attribute information of the first resource within the first time period.
  • the server executes the rule behavior.
  • the server since the first device has determined that the attribute information of the first resource meets the trigger condition, the server does not need to determine whether the attribute information of the first resource still meets the sub-conditions corresponding to the first resource, but directly By default, the attribute information of the first resource has met the sub-conditions corresponding to the first resource.
  • the server may obtain the attribute information of the first resource through the notification message, and determine whether the attribute information of the first resource satisfies the sub-condition corresponding to the first resource.
  • N is equal to 1, that is, there are only sub-conditions corresponding to the first resource in the constraint condition, and the server executes the rule behavior when it determines that the attribute information of the first resource satisfies the constraint condition.
  • N is greater than 1, that is, at least sub-conditions are included in the constraint condition, and the server determines that the attribute information of the first resource satisfies the sub-conditions corresponding to the first resource
  • the server obtains N input resources, except for the first resource
  • the attribute information of N-1 resources and it is determined that if the attribute information of each resource in the N-1 resources satisfies the sub-conditions corresponding to each resource, the rule behavior is executed.
  • the server can obtain the attribute information of N-1 resources through the identification of N-1 resources, and then determine whether the attribute information of each resource in the attribute information of N-1 resources meets the requirements of The sub-condition corresponding to each resource.
  • the server may determine whether a notification message sent by a device corresponding to N-1 resources is received, and if it is received, determine the attribute information of each resource in the attribute information of the N-1 resources. , All satisfy the sub-conditions corresponding to each resource.
  • the server determines that any one of the N input resources does not satisfy the sub-condition corresponding to the resource, the server does not execute the rule behavior.
  • the server executing the rule behavior can be implemented in the following way: modifying the attribute information of the M behavior resources.
  • the rule created by the server is: if the door is opened, turn on the light. Then, when the sensor of the monitoring device used to detect the door switch detects that the door turns from closed to open, the monitoring device sends the door instruction to the server, and the server determines that the door turns from closed to open based on the door instruction, and the server executes Rule behavior, for example, the attribute information of the resource used to turn on or off the light can be modified from 0 to 1, where 0 means that the state of the light is off, and 1 means that the state of the light is on.
  • the server can send an indication message to a series of resource devices corresponding to the M behavior resources.
  • the indication message includes or indicates the attribute information of the behavior resource, so that the series of devices can get the behavior
  • the behavior resource is converted to the corresponding state based on the attribute information of the behavior resource.
  • the series of resource devices includes at least one resource device, and the at least one resource device may include or exclude the first device.
  • the server can link to the scene information corresponding to the rule result or the rule expression in the scene set based on the rule result, and assign the linked scene information to Give the scene information of the rule behavior.
  • the scene information of the rule behavior may be the attribute information of the behavior resource in the embodiment of the application.
  • the pressure of the server to determine the sub-conditions corresponding to the first resource is sunk and decomposed to each resource device through the method of setting the trigger condition by the first device, which can effectively reduce the number of server determinations and reduce
  • the working pressure of the server saves the resources of the server, and after the server receives the notification message, it executes the regular behavior, so as to realize the linkage of the resource equipment in the Internet of Things.
  • FIG. 6 is a schematic diagram of another Internet of Things system provided by an embodiment of this application.
  • the difference between the Internet of Things system in Fig. 6 and the Internet of Things system in Fig. 1 is that the Internet of Things system in Fig. 6 also includes a cloud platform 17, in which:
  • the cloud platform 17 is wirelessly connected to the server 16, and the cloud platform may also be wirelessly connected to the resource devices 11-15.
  • the communication protocol on which the connection between the cloud platform and the server is based may be the same or different from the communication protocol on which the connection of the resource device is based, and may also be different or the same as the communication protocol on which the connection between the server and the resource device is based.
  • FIG. 7 is a schematic diagram of the implementation process of another method for transmitting messages in the Internet of Things provided by an embodiment of the application. As shown in FIG. 7, the method includes:
  • the cloud platform sends a first request to the first device.
  • the first request instructs the first device to send a notification message to the server when the attribute information of the first resource satisfies the trigger condition.
  • the notification message includes or indicates the attribute of the first resource.
  • Information the first device receives the first request sent by the cloud platform.
  • the server receives a second message sent by the cloud platform, where the second message includes or indicates that the first device has completed setting the trigger condition, and the trigger condition is used when the attribute information of the first resource of the first device meets the trigger condition, Trigger the first device to send a notification message to the server.
  • the first device may send a trigger condition setting complete message to the cloud platform after setting the trigger condition, so that the cloud platform can determine that the first device will set the trigger condition after receiving the trigger condition setting complete message. After the trigger condition is set, the cloud platform can send a second message to the server.
  • the cloud platform after the cloud platform sends the first request to the first device, the first device will set the trigger condition by default, so the second message can be sent to the server.
  • the cloud platform may also send a second message to the server after sending the first request and after a certain period of time.
  • the first device monitors the attribute information of the first resource, and determines that the attribute information of the first resource satisfies the trigger condition.
  • the first device sends a notification message to the server; the server receives the notification message sent by the first device.
  • the cloud platform determines the trigger condition and sends the first request to the first device.
  • the trigger condition does not need to be determined by the server, thereby further reducing the amount of calculations on the server.
  • Fig. 8a is a schematic diagram of the implementation process of a method for message transmission in the Internet of Things according to another embodiment of the application. As shown in Fig. 8a, the method includes:
  • the server creates a rule resource.
  • the rule resource may include constraint conditions, N input resources corresponding to the constraint conditions, and M behavior resources corresponding to the constraint conditions; N is a positive integer greater than or equal to 1; M is a positive integer greater than or equal to 1.
  • the N input resources include the first resource.
  • S803 The server sends a request for subscribing to the first resource to the first device; the first device receives the request for subscribing to the first resource sent by the server.
  • the first device sends a first message to the server, where the first message includes or indicates that the first resource subscription is successful; the server receives the first message sent by the first device.
  • the server sends a third message to the cloud platform, where the third message includes or indicates: constraint conditions and N input resources; the cloud platform receives the third message sent by the server.
  • steps S803 to S805 may be executed first, and then step S807 may be executed, or step S807 may be executed first.
  • steps S803 to S805 are executed again, or steps S803 to S805 and step S807 can be executed synchronously.
  • the cloud platform can determine the trigger condition based on the constraint condition.
  • N is equal to 1, that is, there is only one rule input resource among the rule resources created by the server
  • the server can be based on the constraint condition.
  • a rule enters the expression corresponding to the resource (the first resource) to determine the trigger condition.
  • the cloud platform may determine the constraint condition as the trigger condition.
  • the cloud platform can modify the parameters in the constraint condition to obtain the trigger condition.
  • the cloud platform may The constraint conditions are decomposed, so that the respective expressions corresponding to the resources can be input based on the decomposed at least two rules to obtain the trigger conditions.
  • the cloud platform may determine the trigger conditions based on the constraint conditions, please refer to S809 to S811.
  • the cloud platform decomposes the constraint condition into N sub-conditions; N is a positive integer greater than or equal to 1, and the N sub-conditions correspond to the N input resources one-to-one, and the sub-condition corresponding to the first resource is determined from the N sub-conditions.
  • the manner of the cloud platform decomposing constraint conditions can refer to the description of the server decomposing constraint conditions, which is not specifically described here.
  • the cloud platform can parse the third message to obtain the identification of the N input resources and the identification of the constraint condition, and then based on the identification of the N input resources and the identification of the constraint condition , Obtain the constraints and N input resources.
  • the cloud platform can parse the third message to directly obtain N input resources and constraint conditions.
  • the cloud platform determines a trigger condition based on the sub-condition corresponding to the first resource.
  • the cloud platform determines the implementation manner of the trigger condition based on the sub-condition corresponding to the first resource. You can refer to the server to determine the implementation manner of the trigger condition based on the sub-condition corresponding to the first resource.
  • the cloud platform sends a first request to the first device.
  • the first request instructs the first device to send a notification message to the server when the attribute information of the first resource meets the trigger condition.
  • the notification message includes or indicates the attribute of the first resource.
  • Information the first device receives the first request sent by the cloud platform.
  • S815 The first device sends a second message to the cloud platform, where the second message includes or indicates that the first device completes the setting of the trigger condition; the cloud platform receives the second message sent by the first device.
  • the first device After the first device sends the second message to the cloud platform, it indicates that the first device has set the trigger condition. In this way, the first device determines that the first device has changed the attribute information of the first resource. Whether the attribute information of the resource meets the trigger condition.
  • the cloud platform sends a second message to the server; the server receives the second message sent by the cloud platform.
  • the first device monitors the attribute information of the first resource, and determines that the attribute information of the first resource satisfies the trigger condition.
  • the first device sends a notification message to the server; the server receives the notification message sent by the first device.
  • the cloud platform when the first device, the server, and the cloud platform interact, the cloud platform obtains the trigger condition corresponding to the first resource by receiving the message sent by the server, so that the cloud platform sends the first device including or instructs to send to the server Instruct the first device to send the first request of the notification message to the server when the attribute information of the first resource satisfies the trigger condition, thereby eliminating the need for the server to determine the trigger condition of the first resource and execute the sending process of the first request, reducing The computing resources of the server.
  • Fig. 8b is a schematic diagram of the implementation process of a method for message transmission in the Internet of Things according to another embodiment of this application. As shown in Fig. 8b, the method includes:
  • ruleDevice creates a new Rule resource; the Rule resource is a rule for executing resource device automation.
  • the resource includes ruleInput resources, ruleExpression resources, etc.
  • the ruleDevice resource device subscribes to each inputDevice related resources respectively; these resources are the resources specified by the link in the ruleInput.
  • the sub-collection can be divided according to resources, so that each sub-collection only represents one resource.
  • ruleDevice decomposes ruleExpression it can be decomposed according to the number of inputResource. For example, the number of InputResources is N, ruleDevice is decomposed into N subsets, and N is a positive integer greater than or equal to 1.
  • the sub-collection can be divided according to logical operators, so that each sub-collection can contain only one relational operator.
  • S845 and ruleDevice subscribe the input parameters on the inputDevice to each inputDevice respectively.
  • S845 can be understood as ruleDevice subscribing to related resources to each inputDevice respectively.
  • Input parameters can include resources on inputDevice.
  • the server can first perform the step of decomposing the ruleExpression expression, and then the step of subscribing to the inputDevice; or the server can first perform the step of subscribing to the inputDevice, and after the subscription is successful, then perform the step of decomposing the ruleExpression expression ; Or the steps of the server decomposing ruleExpression expressions, and the steps of subscribing to inputDevice can be executed synchronously.
  • the regular expression may be the constraint condition in the foregoing embodiment
  • the subset may be the sub-condition in the foregoing embodiment.
  • the ruleDevice sends a request for the subscription notification condition of the subscribed resource to each corresponding inputDevice according to each of the decomposed sub-sets.
  • the subscription notification condition may be the trigger condition in the foregoing embodiment.
  • the content of the request to subscribe to the notification condition may be as follows:
  • the value in valueCondition is the attribute value of the resource.
  • each resource is bound to an oic.r.value.conditional resource, which is used to limit the conditions for the target resource to send subscription notification messages.
  • condition of subscribing to the notification message or the condition of subscribing to the notification may be the triggering condition in the embodiment of the present application.
  • the inputDevice After the inputDevice has set the notification condition, it can send a message that the set notification condition is complete to the ruleDevice.
  • the inputDevice first judges the content of the oic.r.value.conditional resource; if the value of the subscribed resource changes, the condition set in oic.r.value.conditional (ie valueCondition If the value of the subscription resource does not meet the condition set in oic.r.value.conditional after the value of the subscription resource changes, the subscription notification message is not sent.
  • the resource information here may be the attribute information of the first resource in the embodiment of the present application.
  • the inputDevice triggers the subscription notification message, and sends the subscription notification message to the server, and the subscription notification message carries or indicates the value of the changed resource.
  • the subscription notification message may be the notification message in the example of this application.
  • the subscription notification message may be the notification message in the embodiment of the present application.
  • Fig. 8c is a schematic diagram of the implementation process of a method for message transmission in the Internet of Things provided by still another embodiment of the application. As shown in Fig. 8c, the method includes:
  • ruleDevice creates a new Rule resource; the Rule resource is a rule for performing device automation; the resource contains ruleInput resources, ruleExpression resources, etc.; ruleDevice devices subscribe to each inputDevice for related resources; these resources are in ruleInput Contains the resource specified by the link.
  • S863 and ruleDevice subscribe the input parameters on the inputDevice to each inputDevice respectively.
  • S863 can be understood as ruleDevice subscribing to related resources to each inputDevice respectively.
  • Input parameters can include resources on inputDevice.
  • the ruleDevice sends the ruleInput resource and the ruleExpression resource of the newly created rule to the cloud platform Cloud to request the cloud platform to send the notification message sending condition of the subscription resource according to the above information.
  • the server can first perform the step of subscribing to inputDevice, and then perform the step of sending ruleInput resources and ruleExpression resources; or, the server can first perform the ruleInput resource and ruleExpression resources, and then perform the step of subscribing to inputDevice; or, the server subscribes
  • the steps of inputDevice and the steps of sending ruleInput resources and ruleExpression resources can be executed synchronously.
  • the cloud platform decomposes the ruleExpression; according to the resource specified in the ruleInput, decomposes the ruleExpression into different sub-collections (or expressions). Among them, the cloud platform can set the subscription notification conditions of the corresponding resources to different inputDevices according to the decomposed expression.
  • the sub-collection can be divided according to resources, so that each sub-collection only represents one resource.
  • the sub-collection can be divided according to logical operators, so that each sub-collection contains only one relational operator.
  • the cloud platform sends a request for the subscription notification condition of the subscribed resource to each corresponding inputDevice according to the decomposed sub-sets.
  • the requested content may be the same as the content sent by the ruleDevice to the inputDevice in the foregoing embodiment.
  • the content of the request for subscribing to notification conditions can be as follows:
  • each target resource is bound to an oic.r.value.conditional resource, which is used to limit the conditions for the target resource to send subscription notification messages.
  • the inputDevice may send a message to the cloud platform that the setting of the notification condition is completed after the setting of the notification condition is completed.
  • the cloud platform may send a message that the set notification condition is completed to the ruleDevice.
  • the subscription notification condition of the resource may be the trigger condition in the embodiment of this application.
  • the cloud platform After all the request messages are completed and the response message is received, the cloud platform notifies the ruleDevice that the task of setting the notification condition of the subscription resource has been completed.
  • the inputDevice first judges the content of the oic.r.value.conditional resource; if the value of the subscribed resource changes and meets the set in oic.r.value.conditional Condition (that is, the condition of valueCondition), execute S879. If the value of the subscription resource does not meet the conditions set in oic.r.value.conditional after the change, the subscription notification message will not be sent.
  • ruleDevice After receiving the above subscription notification message, ruleDevice calculates the ruleExpression and makes a determination of the ruleExpression. When the determination is true, execute S883.
  • the subscription notification message may be the notification message in the embodiment of the present application.
  • an embodiment of the present application provides a message transmission device in the Internet of Things.
  • the device includes each unit included and each module included in each unit, which can be passed through the server/first device/cloud platform
  • the processor can be implemented; of course, it can also be implemented by a logic circuit; in the implementation process, the processor can be a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP) or a field programmable gate Array (FPGA), etc.
  • CPU central processing unit
  • MPU microprocessor
  • DSP digital signal processor
  • FPGA field programmable gate Array
  • FIG. 9 is a schematic diagram of the composition structure of a message transmission device in the Internet of Things provided by an embodiment of the application.
  • the transmission device 9 may be set in a server and includes:
  • the request sending unit 91 is configured to send a first request to the first device.
  • the first request instructs the first device to send a notification message to the server when the attribute information of the first resource meets the trigger condition.
  • the notification message includes or indicates the first request.
  • the notification message receiving unit 92 is configured to receive a notification message sent by the first device.
  • the transmission device 9 further includes: a resource subscription unit 93, configured to send a request for subscribing to the first resource to the first device; receive a first message sent by the first device, the first message including or indicating the first resource The subscription is successful.
  • a resource subscription unit 93 configured to send a request for subscribing to the first resource to the first device; receive a first message sent by the first device, the first message including or indicating the first resource The subscription is successful.
  • the transmission device 9 further includes: a second message receiving unit 94, configured to receive a second message sent by the first device, the second message includes or indicates that the first device completes the setting of the trigger condition.
  • the transmission device 9 further includes: a resource creation unit 95 for creating a rule resource; the rule resource includes constraint conditions and N input resources corresponding to the constraint conditions; N is a positive integer greater than or equal to 1, The N input resources include the first resource.
  • the transmission device 9 further includes: a trigger condition determining unit 96, configured to determine the constraint condition as a trigger condition if N is equal to 1.
  • the transmission device 9 further includes: a rule execution unit 97, configured to determine that the attribute information of the first resource satisfies the constraint condition, and execute the rule behavior.
  • the trigger condition determining unit 96 is further configured to decompose the constraint condition into N sub-conditions if N is greater than 1, and the N sub-conditions correspond to the N input resources one-to-one;
  • the trigger condition determining unit 96 is further configured to determine the sub-condition corresponding to the first resource as the trigger condition.
  • the transmission device 9 further includes: a rule execution unit 97, configured to determine that the attribute information of the first resource satisfies the sub-conditions corresponding to the first resource; and obtain N input resources except for the first resource. The attribute information of 1 resource; if the attribute information of each resource in N-1 resources satisfies the sub-conditions corresponding to each resource, the rule behavior is executed.
  • a rule execution unit 97 configured to determine that the attribute information of the first resource satisfies the sub-conditions corresponding to the first resource; and obtain N input resources except for the first resource. The attribute information of 1 resource; if the attribute information of each resource in N-1 resources satisfies the sub-conditions corresponding to each resource, the rule behavior is executed.
  • the rule resource further includes: M behavior resources corresponding to the constraint condition, where M is a positive integer greater than or equal to 1; the rule execution unit 97 is also used to modify the attribute information of the M behavior resources; M is A positive integer greater than or equal to 1.
  • the attribute information of the first resource satisfies the trigger condition, including one of the following:
  • the attribute information of the first resource is greater than the first threshold
  • the attribute information of the first resource is greater than the first threshold
  • the attribute information of the first resource is less than the second threshold
  • the attribute information of the first resource is less than the second threshold
  • the attribute information of the first resource changes within the third time period, and the changed value is greater than the first value.
  • FIG. 10 is a schematic diagram of the composition structure of another message transmission device in the Internet of Things provided by an embodiment of the application.
  • the transmission device 10 may be set in a server, and the transmission device 10 includes:
  • the second message receiving unit 101 is configured to receive a second message sent by the cloud platform.
  • the second message includes or instructs the first device to complete the setting of the trigger condition, and the trigger condition is used when the attribute information of the first resource of the first device satisfies
  • trigger condition trigger the first device to send a notification message to the server, and the notification message includes or indicates the attribute information of the first resource;
  • the notification message receiving unit 102 is configured to receive a notification message sent by the first device.
  • the transmission apparatus 10 further includes: a resource subscription unit 103, configured to send a request for subscribing to the first resource to the first device; receive a first message sent by the first device, the first message including or indicating the first resource The subscription is successful.
  • a resource subscription unit 103 configured to send a request for subscribing to the first resource to the first device; receive a first message sent by the first device, the first message including or indicating the first resource The subscription is successful.
  • the transmission device 10 further includes: a resource creation unit 104, configured to create a rule resource, the rule resource includes a constraint condition, and N input resources corresponding to the constraint condition; N is a positive integer greater than or equal to 1, The N input resources include the first resource.
  • a resource creation unit 104 configured to create a rule resource, the rule resource includes a constraint condition, and N input resources corresponding to the constraint condition; N is a positive integer greater than or equal to 1, The N input resources include the first resource.
  • the transmission device 10 further includes: a third message sending unit 105, configured to send a third message to the cloud platform, the third message including or indicating: constraint conditions and N input resources.
  • a third message sending unit 105 configured to send a third message to the cloud platform, the third message including or indicating: constraint conditions and N input resources.
  • the transmission device 10 further includes: a rule execution unit 106, configured to determine that the attribute information of the first resource satisfies the constraint condition if N is equal to 1, and execute the rule behavior.
  • a rule execution unit 106 configured to determine that the attribute information of the first resource satisfies the constraint condition if N is equal to 1, and execute the rule behavior.
  • the rule execution unit 106 is further configured to determine that the attribute information of the first resource satisfies the sub-conditions corresponding to the first resource if N is greater than 1, and obtain N- The attribute information of 1 resource; if the attribute information of each resource in N-1 resources satisfies the sub-conditions corresponding to each resource, the rule behavior is executed.
  • the rule resource further includes: M behavior resources corresponding to the constraint condition, where M is a positive integer greater than or equal to 1; the rule execution unit 106 is also used to modify the attribute information of the M behavior resources.
  • the attribute information of the first resource satisfies the trigger condition, including one of the following:
  • the attribute information of the first resource is greater than the first threshold
  • the attribute information of the first resource is greater than the first threshold
  • the attribute information of the first resource is less than the second threshold
  • the attribute information of the first resource is less than the second threshold
  • the attribute information of the first resource changes within the third time period, and the changed value is greater than the first value.
  • FIG. 11 is a schematic diagram of the composition structure of another message transmission device in the Internet of Things provided by an embodiment of the application. As shown in FIG. 11, the transmission device 11 may be set in a cloud platform, and the transmission device 11 includes:
  • the request sending unit 111 is configured to send a first request to the first device.
  • the first request instructs the first device to send a notification message to the server when the attribute information of the first resource meets the trigger condition.
  • the notification message includes or indicates the first request.
  • the attribute information of the resource is configured to send a first request to the first device.
  • the transmission device 11 further includes: a second message forwarding unit 112, configured to receive a second message sent by the first device, the second message including or indicating that the first device has set the trigger condition; sending to the server The second message.
  • a second message forwarding unit 112 configured to receive a second message sent by the first device, the second message including or indicating that the first device has set the trigger condition; sending to the server The second message.
  • the transmission device 11 further includes: a third message receiving unit 113, configured to receive a third message sent by the server, the third message including or indicating: a constraint condition and N input resources corresponding to the constraint condition; N Is a positive integer greater than or equal to 1, and the N input resources include the first resource.
  • a third message receiving unit 113 configured to receive a third message sent by the server, the third message including or indicating: a constraint condition and N input resources corresponding to the constraint condition; N Is a positive integer greater than or equal to 1, and the N input resources include the first resource.
  • the transmission device 11 further includes: a trigger condition determining unit 114, configured to determine the constraint condition as a trigger condition if N is equal to 1.
  • the trigger condition determining unit 114 is further configured to decompose the constraint condition into N sub-conditions if N is greater than 1, and N is a positive integer greater than or equal to 1, and the N sub-conditions correspond to N input resources one-to-one. ; Determine the sub-condition corresponding to the first resource from the N sub-conditions; determine the trigger condition based on the sub-condition corresponding to the first resource.
  • the trigger condition determining unit 114 is further configured to determine the sub-condition corresponding to the first resource as the trigger condition.
  • the attribute information of the first resource satisfies the trigger condition, including one of the following:
  • the attribute information of the first resource is greater than the first threshold
  • the attribute information of the first resource is greater than the first threshold
  • the attribute information of the first resource is less than the second threshold
  • the attribute information of the first resource is less than the second threshold
  • the attribute information of the first resource changes within the third time period, and the changed value is greater than the first value.
  • FIG. 12 is a schematic diagram of the composition structure of a message transmission device in the Internet of Things according to another embodiment of the application. As shown in FIG. 12, the transmission device 12 may be set in a first device, and the transmission device 12 includes:
  • the monitoring unit 121 is configured to monitor the attribute information of the first resource.
  • the notification message sending unit 122 is configured to send a notification message to the server if the attribute information of the first resource meets the trigger condition; the notification message includes or indicates the attribute information of the first resource.
  • the transmission device 12 further includes: a condition setting unit 123, configured to receive a first request sent by the server, the first request instructing the first device to send the The server sends a notification message; and a second message is sent to the server.
  • the second message includes or indicates that the first device completes the setting of the trigger condition.
  • condition setting unit 123 is further configured to receive a first request sent by the cloud platform, the first request instructing the first device to send a notification message to the server when the attribute information of the first resource meets the trigger condition ; Send a second message to the cloud platform, the second message includes or instructs the first device to complete the trigger condition setting.
  • the transmission device 12 further includes: a resource subscription unit 124, configured to receive a request for subscribing to the first resource sent by the server; and send a first message to the server, the first message including or indicating that the first resource subscription is successful.
  • a resource subscription unit 124 configured to receive a request for subscribing to the first resource sent by the server; and send a first message to the server, the first message including or indicating that the first resource subscription is successful.
  • the attribute information of the first resource satisfies the trigger condition, including one of the following:
  • the attribute information of the first resource is greater than the first threshold
  • the attribute information of the first resource is greater than the first threshold
  • the attribute information of the first resource is less than the second threshold
  • the attribute information of the first resource is less than the second threshold
  • the attribute information of the first resource changes within the third time period, and the changed value is greater than the first value.
  • the technical solutions of the embodiments of the present application can be embodied in the form of software products in essence or the parts that contribute to related technologies.
  • the computer software products are stored in a storage medium and include several instructions to enable The server/first device/cloud platform executes all or part of the method in each embodiment of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read only memory (Read Only Memory, ROM), magnetic disk or optical disk and other media that can store program codes. In this way, the embodiments of the present application are not limited to any specific combination of hardware and software.
  • FIG. 13 is a schematic diagram of a hardware entity of a server provided by an embodiment of the application.
  • the hardware entity of the server 13 includes a processor 131 and a memory 132, where the memory 132 stores data that can run on the processor 131
  • the processor 131 executes the program, the processor 131 implements the steps in the method executed by the server in any one of the embodiments of FIGS. 3 to 5, 7 and 8a to 8c.
  • the hardware entity of the first device 14 includes a processor 141 and a memory 142.
  • the computer program running on 141 when the processor 141 executes the program, implements the steps in the method executed by the cloud platform of the corresponding embodiment in FIG. 7 or FIGS. 8a to 8c.
  • the hardware entity of the first device 15 includes a processor 151 and a memory 152.
  • the computer program running on the processor 151 when the processor 151 executes the program, implements the steps in the method executed by the first device in any one of the embodiments of FIGS. 4, 5, 7 and 8a to 8c.
  • the embodiment of the present application provides a computer storage medium, and the computer storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the method executed by the server in the foregoing method.
  • the embodiment of the present application provides a computer storage medium, and the computer storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the method executed by the cloud platform in the foregoing method.
  • the embodiment of the present application provides a computer storage medium.
  • the computer storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the method executed by the first device in the above method. .
  • FIG. 16 is a schematic structural diagram of a chip provided by an embodiment of the present application.
  • the chip 16 shown in FIG. 16 includes a processor 161, and the processor 161 can call and run a computer program from the memory to implement the steps of the method executed by the server/cloud platform/first device in the embodiment of the present application.
  • the chip 16 may further include a memory 162.
  • the processor 161 may call and run a computer program from the memory 162 to implement the steps of the method executed by the server/cloud platform/first device in the embodiment of the present application.
  • the memory 162 may be a separate device independent of the processor 161, or may be integrated in the processor 161.
  • the chip 16 may further include an input interface 163.
  • the processor 161 can control the input interface 163 to communicate with other devices or chips, and specifically, can obtain information or data sent by other devices or chips.
  • the chip 16 may further include an output interface 164.
  • the processor 161 can control the output interface 164 to communicate with other devices or chips, specifically, can output information or data to other devices or chips.
  • the chip can be applied to the network device in the embodiment of the present application, and the chip can implement the corresponding process implemented by the network device in each method of the embodiment of the present application.
  • the chip can implement the corresponding process implemented by the network device in each method of the embodiment of the present application.
  • the chip can be applied to the server/cloud platform/first device in the embodiments of the present application, and the chip can implement the corresponding processes implemented by the server/cloud platform/first device in the various methods of the embodiments of the present application , For the sake of brevity, I won’t repeat it here.
  • the chip mentioned in the embodiment of the present application may also be referred to as a system-level chip, a system-on-chip, a system-on-chip, or a system-on-chip, etc.
  • the embodiments of the present application provide a computer program product.
  • the computer program product includes a computer storage medium, and the computer storage medium stores computer program code.
  • the computer program code includes instructions that can be executed by at least one processor. The steps of the method executed by the server/cloud platform/first device in the above method are implemented.
  • the computer program product can be applied to the server/cloud platform/first device in the embodiments of the present application, and the computer program instructions cause the computer to execute each method in the embodiments of the present application by the server/cloud platform/first device.
  • the corresponding process implemented by the device will not be repeated here.
  • the processor of the embodiment of the present application may be an integrated circuit chip with signal processing capability.
  • the steps of the foregoing method embodiments may be completed by hardware integrated logic circuits in the processor or instructions in the form of software.
  • the above-mentioned processor may be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (ASIC), a ready-made programmable gate array (Field Programmable Gate Array, FPGA) or other Programming logic devices, discrete gates or transistor logic devices, discrete hardware components.
  • DSP Digital Signal Processor
  • ASIC application specific integrated circuit
  • FPGA ready-made programmable gate array
  • the methods, steps, and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed.
  • the general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
  • the steps of the method disclosed in the embodiments of the present application may be directly embodied as being executed and completed by a hardware decoding processor, or executed and completed by a combination of hardware and software modules in the decoding processor.
  • the software module can be located in a mature storage medium in the field, such as random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, registers.
  • the storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
  • the memory in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory.
  • the non-volatile memory can be read-only memory (Read-Only Memory, ROM), programmable read-only memory (Programmable ROM, PROM), erasable programmable read-only memory (Erasable PROM, EPROM), and electrically available Erase programmable read-only memory (Electrically EPROM, EEPROM) or flash memory.
  • the volatile memory may be a random access memory (Random Access Memory, RAM), which is used as an external cache.
  • RAM random access memory
  • SRAM static random access memory
  • DRAM dynamic random access memory
  • DRAM synchronous dynamic random access memory
  • DDR SDRAM Double Data Rate Synchronous Dynamic Random Access Memory
  • Enhanced SDRAM, ESDRAM Enhanced Synchronous Dynamic Random Access Memory
  • Synchronous Link Dynamic Random Access Memory Synchronous Link Dynamic Random Access Memory
  • DR RAM Direct Rambus RAM
  • the memory in the embodiment of the present application may also be static random access memory (static RAM, SRAM), dynamic random access memory (dynamic RAM, DRAM), Synchronous dynamic random access memory (synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (double data rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (enhanced SDRAM, ESDRAM), synchronous connection Dynamic random access memory (synch link DRAM, SLDRAM) and direct memory bus random access memory (Direct Rambus RAM, DR RAM) and so on. That is to say, the memory in the embodiments of the present application is intended to include, but is not limited to, these and any other suitable types of memory.
  • the server/first device/cloud platform executes any step in the embodiments of the present application, and the processor of the server/first device/cloud platform may execute the step.
  • the embodiment of the present application does not limit the order in which the server/first device/cloud platform executes the following steps.
  • the methods used to process data in different embodiments may be the same method or different methods.
  • any step in the embodiment of the present application can be independently executed by the server/first device/cloud platform, that is, when the server/first device/cloud platform executes any of the steps in the following embodiments, It does not depend on the execution of other steps.
  • server/first device/cloud platform and method may be implemented in other ways.
  • the server/first device/cloud platform embodiments described above are merely illustrative.
  • the division of the units is only a logical function division.
  • the coupling, or direct coupling, or communication connection between the components shown or discussed may be through some interfaces, indirect coupling or communication connection between resource devices or units, and may be electrical, mechanical, or other Form.
  • the foregoing program can be stored in a computer readable storage medium.
  • the execution includes The steps of the foregoing method embodiment; and the foregoing storage medium includes: various media capable of storing program codes, such as a removable storage resource device, a read only memory (Read Only Memory, ROM), a magnetic disk or an optical disc.
  • ROM Read Only Memory
  • the aforementioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it may also be stored in a computer readable storage medium.
  • the technical solutions of the embodiments of the present application can be embodied in the form of software products in essence or the parts that contribute to related technologies.
  • the computer software products are stored in a storage medium and include several instructions to enable The server/first device/cloud platform executes all or part of the methods described in the various embodiments of the present application.
  • the aforementioned storage media include: removable storage resource devices, ROMs, magnetic disks, or optical disks and other media that can store program codes.
  • the server/first device/cloud platform executes A and executes B. It may be that the server/first device/cloud platform executes A first. Then execute B, or the server/first device/cloud platform executes B first, and then executes A, or the server/first device/cloud platform executes A while executing B.
  • a in one message in this application means that there is A in one message.
  • the indication of A in a message indicates that the identity of A is included in a message, so that A can be obtained based on the identity of A. It should be understood that when different resource devices execute the same step, the execution method may be the same.
  • Figures 5 and 8a to 8c show a complete flow chart of the message transmission method in the Internet of Things, however, in the process of execution, the resource device may not perform some of the steps, as long as the resource device The steps performed make the program complete. It should be understood that in the signaling interactions in Figures 4, 5, 7, and 8a to 8c, the dotted line represents control plane signaling, and implementation represents user plane signaling.
  • the embodiments of the application provide a method, device, server, device and cloud platform for message transmission in the Internet of Things.
  • the message transmission scheme in the Internet of Things in this application is adopted, and the attribute information of the first device in the first resource satisfies the trigger Under conditions, the server can receive the notification message sent by the first device, so that the number of notification messages received by the server is small, and the computing resources of the server are low.

Abstract

Disclosed in the embodiments of the present application are a method and apparatus for transmitting messages in the Internet of Things, a server, a resource device, a cloud platform, a computer storage medium and a chip. The method for transmitting messages in the Internet of Things comprises: a server sends a first request to a first device, the first request instructing the first device to send a notification message to the server when attribute information of a first resource meets a trigger condition, and the notification message comprising or indicating the attribute information of the first resource; and receives the notification message sent by the first device.

Description

物联网中消息的传输方法、装置、服务器、设备及云平台Message transmission method, device, server, equipment and cloud platform in Internet of Things 技术领域Technical field
本申请实施例涉及但不限于物联网技术,尤其涉及一种物联网中消息的传输方法、装置、服务器、设备及云平台。The embodiments of the present application relate to, but are not limited to, the Internet of Things technology, and in particular, to a method, device, server, equipment, and cloud platform for transmitting messages in the Internet of Things.
背景技术Background technique
物联网(The Internet of Things,IOT)是新一代信息技术的重要组成部分。随着物联网场景越来越复杂,信息交换的设备越来越多,从而导致服务器的计算资源增多,而如何降低服务器的计算资源是本领域亟需解决的问题。The Internet of Things (IOT) is an important part of the new generation of information technology. As the Internet of Things scenarios become more and more complex, there are more and more information exchange devices, which leads to an increase in the computing resources of the server, and how to reduce the computing resources of the server is an urgent problem in this field.
发明内容Summary of the invention
本申请实施例提供一种物联网中消息的传输方法、装置、服务器、设备及云平台。The embodiments of the present application provide a method, device, server, equipment, and cloud platform for message transmission in the Internet of Things.
第一方面,提供一种物联网中消息的传输方法,包括:In the first aspect, a method for transmitting messages in the Internet of Things is provided, including:
服务器向第一设备发送第一请求,所述第一请求指示所述第一设备在第一资源的属性信息满足触发条件的情况下,向所述服务器发送通知消息,所述通知消息包括或指示所述第一资源的属性信息;The server sends a first request to the first device, the first request instructs the first device to send a notification message to the server when the attribute information of the first resource meets the trigger condition, and the notification message includes or indicates Attribute information of the first resource;
接收所述第一设备发送的所述通知消息。Receiving the notification message sent by the first device.
第二方面,提供一种物联网中消息的传输方法,包括:In a second aspect, a method for transmitting messages in the Internet of Things is provided, including:
服务器接收云平台发送的第二消息,所述第二消息包括或指示第一设备将触发条件设定完成,所述触发条件用于在所述第一设备的第一资源的属性信息满足所述触发条件的情况下,触发所述第一设备向所述服务器发送通知消息,所述通知消息包括或指示所述第一资源的属性信息;The server receives a second message sent by the cloud platform, where the second message includes or instructs the first device to complete the setting of a trigger condition, and the trigger condition is used when the attribute information of the first resource of the first device satisfies the In the case of a trigger condition, trigger the first device to send a notification message to the server, where the notification message includes or indicates the attribute information of the first resource;
接收所述第一设备发送的所述通知消息。Receiving the notification message sent by the first device.
第三方面,提供一种物联网中消息的传输方法,包括:In a third aspect, a method for transmitting messages in the Internet of Things is provided, including:
云平台向第一设备发送第一请求,所述第一请求指示所述第一设备在第一资源的属性信息满足触发条件的情况下,向所述服务器发送通知消息,所述通知消息包括或指示所述第一资源的属性信息。The cloud platform sends a first request to the first device, the first request instructing the first device to send a notification message to the server when the attribute information of the first resource meets the trigger condition, and the notification message includes or Indicates the attribute information of the first resource.
第四方面,提供一种物联网中消息的传输方法,包括:In a fourth aspect, a method for transmitting messages in the Internet of Things is provided, including:
第一设备监听第一资源的属性信息;The first device monitors the attribute information of the first resource;
如果所述第一资源的属性信息满足触发条件,向服务器发送通知消息;所述通知消息包括或指示所述第一资源的属性信息。If the attribute information of the first resource satisfies the trigger condition, a notification message is sent to the server; the notification message includes or indicates the attribute information of the first resource.
第五方面,提供一种物联网中消息的传输装置,包括:In a fifth aspect, a device for transmitting messages in the Internet of Things is provided, including:
请求发送单元,用于向第一设备发送第一请求,所述第一请求指示所述第一设备在第一资源的属性信息满足触发条件的情况下,向所述服务器发送通知消息,所述通知消息包括或指示所述第一资源的属性信息;The request sending unit is configured to send a first request to a first device, where the first request instructs the first device to send a notification message to the server when the attribute information of the first resource meets a trigger condition, and The notification message includes or indicates the attribute information of the first resource;
通知消息接收单元,用于接收所述第一设备发送的所述通知消息。The notification message receiving unit is configured to receive the notification message sent by the first device.
第六方面,提供一种物联网中消息的传输装置,包括:In a sixth aspect, a device for transmitting messages in the Internet of Things is provided, including:
第二消息接收单元,用于接收云平台发送的第二消息,所述第二消息包括或指示第一设备将触发条件设定完成,所述触发条件用于在所述第一设备的第一资源的属性信息满足所述触发条件的情况下,触发所述第一设备向所述服务器发送通知消息,所述通知消息包括或指示所述第一资源的属性信息;The second message receiving unit is configured to receive a second message sent by the cloud platform, the second message including or instructing the first device to complete the setting of the trigger condition, and the trigger condition is used in the first device of the first device. When the attribute information of the resource satisfies the trigger condition, trigger the first device to send a notification message to the server, where the notification message includes or indicates the attribute information of the first resource;
通知消息接收单元,用于接收所述第一设备发送的所述通知消息。The notification message receiving unit is configured to receive the notification message sent by the first device.
第七方面,提供一种物联网中消息的传输装置,包括:In a seventh aspect, a device for transmitting messages in the Internet of Things is provided, including:
请求发送单元,用于向第一设备发送第一请求,所述第一请求指示所述第一设备在第一资源的属性信息满足触发条件的情况下,向所述服务器发送通知消息,所述通知消息包括或指示所述第一资源的属性信息。The request sending unit is configured to send a first request to a first device, where the first request instructs the first device to send a notification message to the server when the attribute information of the first resource meets a trigger condition, and The notification message includes or indicates the attribute information of the first resource.
第八方面,提供一种物联网中消息的传输装置,包括:In an eighth aspect, a message transmission device in the Internet of Things is provided, including:
监听单元,用于监听第一资源的属性信息;The monitoring unit is used to monitor the attribute information of the first resource;
通知消息发送单元,用于如果所述第一资源的属性信息满足触发条件,向服务器发送通知消息;所 述通知消息包括或指示所述第一资源的属性信息。The notification message sending unit is configured to send a notification message to the server if the attribute information of the first resource meets the trigger condition; the notification message includes or indicates the attribute information of the first resource.
第九方面,提供一种服务器,包括:存储器和处理器,In a ninth aspect, a server is provided, including: a memory and a processor,
所述存储器存储有可在处理器上运行的计算机程序,The memory stores a computer program that can run on the processor,
所述处理器执行所述程序时实现上述方法中的步骤。When the processor executes the program, the steps in the above method are implemented.
第十方面,提供一种云平台,包括:存储器和处理器,In a tenth aspect, a cloud platform is provided, including: a memory and a processor,
所述存储器存储有可在处理器上运行的计算机程序,The memory stores a computer program that can run on the processor,
所述处理器执行所述程序时实现上述方法中的步骤。When the processor executes the program, the steps in the above method are implemented.
第十一方面,提供一种第一设备,包括:存储器和处理器,In an eleventh aspect, a first device is provided, including: a memory and a processor,
所述存储器存储有可在处理器上运行的计算机程序,The memory stores a computer program that can run on the processor,
所述处理器执行所述程序时实现上述方法中的步骤。When the processor executes the program, the steps in the above method are implemented.
第十二方面,提供一种计算机存储介质,所述计算机存储介质存储有一个或者多个程序,所述一个或者多个程序可被一个或者多个处理器执行,以实现上述方法中的步骤。In a twelfth aspect, a computer storage medium is provided, the computer storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps in the foregoing method.
第十三方面,提供一种芯片,包括:处理器,用于从存储器中调用并运行计算机程序,使得安装有所述芯片的设备执行上述方法中的步骤。In a thirteenth aspect, a chip is provided, including a processor, configured to call and run a computer program from a memory, so that a device installed with the chip executes the steps in the above method.
第十四方面,提供一种计算机程序产品,所述计算机程序产品包括计算机存储介质,所述计算机存储介质存储计算机程序代码,所述计算机程序代码包括能够由至少一个处理器执行的指令,当所述指令由所述至少一个处理器执行时实现所述的方法中的步骤。In a fourteenth aspect, a computer program product is provided. The computer program product includes a computer storage medium, and the computer storage medium stores computer program code. The computer program code includes instructions that can be executed by at least one processor. When the instructions are executed by the at least one processor, the steps in the method are implemented.
本申请实施例中,服务器向第一设备发送第一请求,第一请求指示第一设备在第一资源的属性信息满足触发条件的情况下,向服务器发送通知消息,通知消息包括或指示第一资源的属性信息;接收第一设备发送的通知消息。如此,通过服务器向第一设备发送第一请求,使得第一设备在第一资源的属性信息满足触发条件的情况下,服务器才能接收第一设备发送的通知消息,而不是只要第一资源的属性信息发生变化就接收第一设备发送的通知消息,从而服务器接收的通知消息的数量变少,服务器的计算资源降低。In this embodiment of the application, the server sends a first request to the first device. The first request instructs the first device to send a notification message to the server when the attribute information of the first resource meets the trigger condition. The notification message includes or indicates the first Attribute information of the resource; receiving the notification message sent by the first device. In this way, the server sends the first request to the first device, so that the first device can receive the notification message sent by the first device when the attribute information of the first resource meets the triggering condition, instead of only requiring the attribute of the first resource When the information changes, the notification message sent by the first device is received, so the number of notification messages received by the server decreases, and the computing resources of the server decrease.
附图说明Description of the drawings
图1为本申请实施例提供的一种物联网系统的示意图;FIG. 1 is a schematic diagram of an Internet of Things system provided by an embodiment of this application;
图2为本申请实施例提供的一种物联网中服务器的信息处理过程的示意图;2 is a schematic diagram of an information processing process of a server in the Internet of Things provided by an embodiment of this application;
图3为本申请实施例提供的一种物联网中消息的传输方法的实现流程示意图;FIG. 3 is a schematic diagram of an implementation process of a method for transmitting messages in the Internet of Things according to an embodiment of the application;
图4为本申请实施例提供的另一种物联网中消息的传输方法的实现流程示意图;4 is a schematic diagram of the implementation process of another method for transmitting messages in the Internet of Things provided by an embodiment of the application;
图5为本申请实施例提供的又一种物联网中消息的传输方法的实现流程示意图;FIG. 5 is a schematic diagram of the implementation process of yet another method for message transmission in the Internet of Things provided by an embodiment of this application;
图6为本申请实施例提供的另一种物联网系统的示意图;FIG. 6 is a schematic diagram of another Internet of Things system provided by an embodiment of the application;
图7为本申请实施例提供的再一种物联网中消息的传输方法的实现流程示意图;FIG. 7 is a schematic diagram of the implementation process of yet another method for transmitting messages in the Internet of Things according to an embodiment of the application;
图8a为本申请另一实施例提供的一种物联网中消息的传输方法的实现流程示意图;FIG. 8a is a schematic diagram of an implementation process of a method for transmitting messages in the Internet of Things according to another embodiment of this application;
图8b为本申请又一实施例提供的一种物联网中消息的传输方法的实现流程示意图;FIG. 8b is a schematic diagram of the implementation process of a method for transmitting messages in the Internet of Things according to another embodiment of this application;
图8c为本申请再一实施例提供的一种物联网中消息的传输方法的实现流程示意图;FIG. 8c is a schematic diagram of an implementation process of a method for transmitting messages in the Internet of Things according to still another embodiment of this application;
图9为本申请实施例提供的一种物联网中消息的传输装置的组成结构示意图;9 is a schematic diagram of the composition structure of a message transmission device in the Internet of Things provided by an embodiment of the application;
图10为本申请实施例提供的另一种物联网中消息的传输装置的组成结构示意图;10 is a schematic diagram of the composition structure of another device for transmitting messages in the Internet of Things according to an embodiment of the application;
图11为本申请实施例提供的又一种物联网中消息的传输装置的组成结构示意图;FIG. 11 is a schematic diagram of the composition structure of another device for transmitting messages in the Internet of Things according to an embodiment of this application;
图12为本申请实施例提供的再一种物联网中消息的传输装置的组成结构示意图;FIG. 12 is a schematic diagram of the composition structure of another device for transmitting messages in the Internet of Things according to an embodiment of the application;
图13为本申请实施例提供的一种服务器的硬件实体示意图;FIG. 13 is a schematic diagram of a hardware entity of a server provided by an embodiment of the application;
图14为本申请实施例提供的一种云平台的硬件实体示意图;FIG. 14 is a schematic diagram of a hardware entity of a cloud platform provided by an embodiment of the application;
图15为本申请实施例提供的一种第一设备的硬件实体示意图;15 is a schematic diagram of a hardware entity of a first device provided by an embodiment of this application;
图16是本申请实施例提供的一种芯片的结构示意图。FIG. 16 is a schematic structural diagram of a chip provided by an embodiment of the present application.
具体实施方式Detailed ways
下面将通过实施例并结合附图具体地对本申请的技术方案以及本申请的技术方案如何解决上述技术问题进行详细说明。下面这几个具体的实施例可以相互结合,对于相同或相似的概念或过程可能在某些实施例中不再赘述。Hereinafter, the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems will be described in detail through the embodiments and the accompanying drawings. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.
需要说明的是:在本申请实例中,“第一”、“第二”等是用于区别类似的对象,而不必用于描述 特定的顺序或先后次序。It should be noted that in the examples of this application, "first", "second", etc. are used to distinguish similar objects, and not necessarily used to describe a specific sequence or sequence.
另外,本申请实施例所记载的技术方案之间,在不冲突的情况下,可以任意组合。In addition, the technical solutions described in the embodiments of the present application can be combined arbitrarily without conflict.
图1为本申请实施例提供的一种物联网系统的示意图,如图1所示,物联网系统包括资源设备11、12、13、14和15,以及服务器16。其中:FIG. 1 is a schematic diagram of an Internet of Things system provided by an embodiment of this application. As shown in FIG. 1, the Internet of Things system includes resource devices 11, 12, 13, 14, and 15, and a server 16. in:
资源设备11、12、13、14和15可以为物联网中的传感器节点。传感器节点包括传感器和通信模块,其中,传感器用于感测数据,通信模块用于资源设备的通信。在实施时,资源设备可以分别为智能音箱、空调、电灯、水壶、电视机、手机、电脑、智能手表、增强现实设备或虚拟现实设备等。The resource devices 11, 12, 13, 14, and 15 may be sensor nodes in the Internet of Things. The sensor node includes a sensor and a communication module, where the sensor is used for sensing data, and the communication module is used for communication of resource devices. In implementation, the resource devices can be smart speakers, air conditioners, electric lights, kettles, televisions, mobile phones, computers, smart watches, augmented reality devices, or virtual reality devices.
服务器16可以是物联网连接管理平台、物联网应用服务器或网关等。The server 16 may be an Internet of Things connection management platform, an Internet of Things application server, or a gateway.
在实施的过程中,资源设备11至15均可以与服务器16相连,服务器16可以与资源设备11至15进行信息交互,例如服务器16可以对资源设备11至15进行管理,如资源设备软硬件升级、资源设备功能控制、资源订阅以及资源查询至少一个等。应理解,在其它实施例中,资源设备14或15可以与服务器16直接连接。In the implementation process, the resource devices 11-15 can all be connected to the server 16, and the server 16 can exchange information with the resource devices 11-15. For example, the server 16 can manage the resource devices 11-15, such as resource device software and hardware upgrades. , At least one of resource equipment function control, resource subscription and resource query, etc. It should be understood that in other embodiments, the resource device 14 or 15 may be directly connected to the server 16.
资源设备之间还可以相互连接,例如,资源设备11可以分别与资源设备14和15连接,服务器16和资源设备14之间的消息或数据经由资源设备11转发,资源设备11也可以对转发的消息或数据进行一定的处理,如数据预处理/过滤,通信协议或消息格式转换等。Resource devices can also be connected to each other. For example, resource device 11 can be connected to resource devices 14 and 15, respectively. Messages or data between server 16 and resource device 14 are forwarded via resource device 11, and resource device 11 can also connect to resource devices 14 and 15. Messages or data undergo certain processing, such as data preprocessing/filtering, communication protocol or message format conversion, etc.
资源设备之间,或者,资源设备与服务器之间通过通信模块进行通信连接。The communication connection between the resource devices, or between the resource device and the server through the communication module.
需要说明的是,本申请实施例不限定资源设备与资源设备之间,或者服务器与资源设备之间的连接方式或通信协议。比如服务器16和资源设备11/12/13之间,或者,资源设备11和资源设备14/15之间可以采用有线连接,使用受限应用协议(Constrained Application Protocol,CoAP)进行数据或消息传输,或者,服务器16和资源设备11/12/13之间,或者,资源设备11和资源设备14/15之间可以采用基于蜂窝的窄带物联网(Narrow Band Internet of Things,NB-IoT)无线连接技术,使用消息队列遥测传输(Message Queuing Telemetry Transport,MQTT)协议进行数据或消息传输。It should be noted that the embodiment of the present application does not limit the connection mode or communication protocol between the resource device and the resource device, or between the server and the resource device. For example, between the server 16 and the resource device 11/12/13, or between the resource device 11 and the resource device 14/15, a wired connection can be used, and the Constrained Application Protocol (CoAP) can be used for data or message transmission. Or, between the server 16 and the resource device 11/12/13, or between the resource device 11 and the resource device 14/15, a cellular-based Narrow Band Internet of Things (NB-IoT) wireless connection technology can be used , Use Message Queuing Telemetry Transport (MQTT) protocol for data or message transmission.
需要说明的是,物联网技术中,服务器以资源的形式对资源设备进行管理,这里的“资源”是抽象的概念,既可以指物理形态的资源设备,也可以指资源设备的型号,软硬件版本或生产商等静态属性,还可以指资源设备可以执行的操作、可以上报的事件、参数或者可以读取的状态参数等动态属性。每个资源具有唯一的标识,标识可以是名称、统一资源标识符(Uniform Resource Identifier,URI)、统一资源定位系统(Uniform Resource Locator,URL)或其它任何可于对资源进行区分和辨识的类型或格式。本申请中以URI为例,对资源进行标识,如服务器16的URI为“/server16”,资源设备11至15的URI分别为“/server16/device11”,“/server16/device12”,“/server16/device13”,“/server16/device11/device14”,“/server16/device11/device15”。It should be noted that in the Internet of Things technology, the server manages the resource equipment in the form of resources. The "resource" here is an abstract concept, which can refer to the physical form of the resource equipment, or the model of the resource equipment, software and hardware. Static attributes such as version or manufacturer can also refer to dynamic attributes such as operations that the resource device can perform, events that can be reported, parameters, or status parameters that can be read. Each resource has a unique identifier. The identifier can be a name, a Uniform Resource Identifier (URI), a Uniform Resource Locator (URL), or any other type that can distinguish and identify resources. Format. In this application, URI is taken as an example to identify resources. For example, the URI of server 16 is "/server16", and the URIs of resource devices 11 to 15 are "/server16/device11", "/server16/device12", and "/server16" /device13", "/server16/device11/device14", "/server16/device11/device15".
图2为本申请实施例提供的一种物联网中服务器的信息处理过程的示意图,如图2所示,服务器中具有规则rule资源(oic.r.rule),rule资源是一个集合资源,在该集合资源中包括以下三个资源,分别为规则输入资源(oic.r.ruleinput)21、规则表达式资源(oic.r.ruleexpressiom)22、规则行为资源(oic.r.ruleaction)23。Figure 2 is a schematic diagram of the information processing process of a server in the Internet of Things provided by an embodiment of this application. As shown in Figure 2, the server has a rule resource (oic.r.rule), and the rule resource is a collective resource. The set of resources includes the following three resources, namely a rule input resource (oic.r.ruleinput) 21, a rule expression resource (oic.r.ruleexpressiom) 22, and a rule behavior resource (oic.r.ruleaction) 23.
规则输入资源21和规则行为资源23均为一个集合资源,可以分别包括规则输入集合(Rule Input Collection)和规则行为集合(Rule Actions Collection)。对于一个规则,这个规则的规则输入都是保存在规则输入资源21中的,每个规则输入的表达式如下:The rule input resource 21 and the rule action resource 23 are both a collection resource, which may include a rule input collection (Rule Input Collection) and a rule action collection (Rule Actions Collection), respectively. For a rule, the rule input of this rule is stored in the rule input resource 21, and the expression of each rule input is as follows:
{"anchor":"mytemperature",//规则输入的别名,在ruleexpression中使用;{"anchor":"mytemperature",//The alias of rule input, used in ruleexpression;
"href":"/mylocaltemperaturesensor",//规则输入的硬件的相对URI"href":"/mylocaltemperaturesensor",//Relative URI of the hardware entered by the rule
"rel":["ruleinput"],//表示是规则输入"rel":["ruleinput"],//Indicates that it is a rule input
"rt":["oic.r.temperature"],//资源类型"rt":["oic.r.temperature"],//Resource type
"if":["oic.if.s"]//接口}"if":["oic.if.s"]//interface}
规则表达式资源22包括规则表达式和规则结果,例如,规则表达式可以为:mytemperature:temperature>="25",当规则结果由false变为true,即规则输入由不满足规则表达式变为满足规则表达式时,执行规则行为,执行规则行为一般是修改某一个或者一系列资源的属性。The regular expression resource 22 includes regular expressions and rule results. For example, the regular expression can be: mytemperature:temperature>="25". When the rule result changes from false to true, the rule input changes from not satisfying the regular expression to When the regular expression is satisfied, the rule behavior is executed, and the execution rule behavior is generally to modify the attributes of a certain resource or a series of resources.
继续参阅图2,当服务器的规则输入资源21接收到一个资源(例如,mytemperature),这个资源可以是服务器上的资源或者服务器之外的资源设备的资源,服务器可以根据接收到的资源链接到规则输入(例如,mytemperature的值),即服务器根据资源获取规则输入,规则输入可以理解为资源的值,服务器可以将该规则输入传输至规则表达式,如果规则使能(Rule Enable)是true,服务器判断规则输入是否满足规则表达式,如果满足,输出规则结果,如果规则结果是true,且行为使能(Action Enable) 是true,根据规则结果链接场景集合中的场景信息,并将链接到场景集合的场景信息赋给规则行为资源23中的场景信息。规则输入为规则判定条件的输入元素,规则表达式为根据各规则输入形成的表达式,如果规则表达式被判定为true则执行规则行为。Continuing to refer to Figure 2, when the rule input resource 21 of the server receives a resource (for example, mytemperature), this resource can be a resource on the server or a resource device other than the server, and the server can link to the rule based on the received resource Input (for example, the value of mytemperature), that is, the server obtains the rule input according to the resource. The rule input can be understood as the value of the resource. The server can transmit the rule input to the rule expression. If the rule enable (Rule Enable) is true, the server Determine whether the rule input satisfies the rule expression. If it is satisfied, output the rule result. If the rule result is true and Action Enable is true, link the scene information in the scene set according to the rule result and link to the scene set The scene information of is assigned to the scene information in the rule behavior resource 23. The rule input is the input element of the rule judgment condition, and the rule expression is an expression formed according to the input of each rule. If the rule expression is judged to be true, the rule behavior is executed.
其中,规则使能用于使服务器要不要判断规则表达式,例如,服务器可以控制在一段时间内停用/启用对某一资源,从而这个资源所对应的规则使能为fasle/true。行为使能用于在确定到规则结果是true时,是否执行行为action,规则使能和行为使能的true或者false可以是基于用户的操作而确定或者配置确定。Among them, the rule enablement is used to enable the server to determine whether or not the rule expression is required. For example, the server can control to disable/enable a certain resource for a period of time, so that the rule enablement corresponding to this resource is fasle/true. The behavior enable is used to determine whether to execute the behavior action when the rule result is true. The true or false of the rule enable and the behavior enable can be determined based on the user's operation or configuration determination.
以下介绍一个物联网场景,服务器中的规则是室内温度达到30度时开空调,温度是一个规则输入,温度大于或等于30是一个规则表达式,当温度发生变化的时候,服务器的规则引擎会判断温度大于或等于30是否成立,如果判断结果是true,则会执行“开启空调”的规则行为。The following introduces an IoT scenario. The rule in the server is to turn on the air conditioner when the indoor temperature reaches 30 degrees. The temperature is a rule input. The temperature is greater than or equal to 30 is a rule expression. When the temperature changes, the server's rule engine will It is judged whether the temperature is greater than or equal to 30. If the judgment result is true, the rule behavior of "turn on the air conditioner" will be executed.
在当前的物联网的技术架构中,运行规则的服务器需要订阅规则输入(ruleInput)资源指向或链接(link)的资源,这个资源可以称为目标输入资源,例如,资源设备的温度传感器。当目标输入资源的属性信息发生变化的时候,资源设备会向运行规则的服务器发送通知消息,当服务器接收到该通知消息后,会将目标输入资源的属性信息的属性值代入规则表达式进行计算。然而,每一次目标输入资源的通知消息会导致服务器进行一次规则表达式的计算,大大浪费了服务器的资源。In the current technical architecture of the Internet of Things, a server running rules needs to subscribe to a resource pointed to or linked by a ruleInput resource. This resource can be called a target input resource, for example, a temperature sensor of a resource device. When the attribute information of the target input resource changes, the resource device will send a notification message to the server running the rule. When the server receives the notification message, it will substitute the attribute value of the target input resource's attribute information into the regular expression for calculation . However, each notification message of the target input resource will cause the server to perform a regular expression calculation, which greatly wastes the server's resources.
至少基于当前存在的问题,图3为本申请实施例提供的一种物联网中消息的传输方法的实现流程示意图,如图3所示,该方法应用于服务器,该方法包括:At least based on the existing problems, FIG. 3 is a schematic diagram of the implementation process of a message transmission method in the Internet of Things provided by an embodiment of the application. As shown in FIG. 3, the method is applied to a server, and the method includes:
S301、服务器向第一设备发送第一请求,第一请求指示第一设备在第一资源的属性信息满足触发条件的情况下,向服务器发送通知消息,通知消息包括或指示第一资源的属性信息。S301. The server sends a first request to the first device. The first request instructs the first device to send a notification message to the server when the attribute information of the first resource meets the trigger condition. The notification message includes or indicates the attribute information of the first resource. .
第一设备可以是上述列举的资源设备中的任一个。The first device may be any of the resource devices listed above.
本申请实施例中的第一设备可以理解为输入资源设备(inputDevice),本申请实施例中的服务器可以理解为规则资源设备(ruleDevice)。The first device in the embodiment of this application can be understood as an input resource device (inputDevice), and the server in the embodiment of this application can be understood as a rule resource device (ruleDevice).
在inputDevice上存在规则输入(ruleInput)引用的资源,也就是说该inputDevice的某一资源被用来作为规则rule的输入资源。There is a resource referenced by the rule input (ruleInput) on the inputDevice, which means that a certain resource of the inputDevice is used as the input resource of the rule.
ruleDevice为保存ruleInput资源、规则表达式ruleExpression资源以及规则行为ruleAction资源的资源设备,在ruleDevice上运行整个规则。The ruleDevice is a resource device that saves the ruleInput resource, the rule expression ruleExpression resource, and the rule action ruleAction resource, and runs the entire rule on the ruleDevice.
第一资源可以为第一设备中的资源,例如,第一设备中的传感器;或者,第一资源可以为第一设备外的资源,例如,第一设备中的摄像头拍摄针对某一目标/对象的图像,第一资源为该目标/对象中的资源。The first resource may be a resource in the first device, for example, a sensor in the first device; or, the first resource may be a resource outside the first device, for example, a camera in the first device shoots for a certain target/object The first resource is the resource in the target/object.
第一资源的属性信息可以通过以下方式得到:第一设备感测第一资源的属性信息,或者,第一设备外的一个设备感测第一资源的属性信息,将第一资源的属性信息发送给第一设备。The attribute information of the first resource can be obtained in the following manner: the first device senses the attribute information of the first resource, or a device outside the first device senses the attribute information of the first resource and sends the attribute information of the first resource Give the first device.
在一种实施方式中,第一请求中可以包括通知消息的触发条件,以使第一设备可以通过解析第一请求来得到触发条件。In an implementation manner, the first request may include a trigger condition of the notification message, so that the first device can obtain the trigger condition by parsing the first request.
在另一种实施方式中,第一请求中也可以不包括通知消息的触发条件,但是可以包括触发条件的标识、地址、索引或链接中的至少一个,以使第一设备可以基于触发条件的标识、地址、索引或链接中的至少一个,获取到触发条件。In another implementation manner, the first request may not include the trigger condition of the notification message, but may include at least one of the trigger condition's identifier, address, index, or link, so that the first device can be based on the trigger condition. At least one of the identification, address, index, or link, the trigger condition is acquired.
在本申请实施例中,触发条件是由服务器确定的,一个资源设备上可以有至少一个资源,一个资源设备上的不同的资源可以对应不同的触发条件,例如,一个资源设备可以对应温度资源的触发条件和亮度资源的触发条件。In the embodiment of this application, the trigger condition is determined by the server. A resource device can have at least one resource, and different resources on a resource device can correspond to different trigger conditions. For example, a resource device can correspond to temperature resources. The trigger condition and the trigger condition of the brightness resource.
在一种实施方式中,通知消息指示第一设备的第一资源的属性信息。例如,通知消息中包括第一资源的资源标识(例如URI或者资源名称),从而服务器可以通过第一资源的资源标识,获取到第一资源的属性信息。In an implementation manner, the notification message indicates the attribute information of the first resource of the first device. For example, the notification message includes the resource identifier (for example, URI or resource name) of the first resource, so that the server can obtain the attribute information of the first resource through the resource identifier of the first resource.
在另一种实施方式中,通知消息可以包括第一资源的属性信息,从而服务器可以解析通知消息,得到第一资源的属性信息。In another implementation manner, the notification message may include the attribute information of the first resource, so that the server can parse the notification message to obtain the attribute information of the first resource.
第一资源的属性信息可以包括第一资源的属性值。在一种实施方式中,第一资源的属性信息还可以包括第一资源的状态信息、数据类别、位置信息、第一设备的参数信息中的至少一种。在实施过程中,第一资源的属性值可以为感测器测量的数值,例如,传感器的感测值。应需理解,在一种可行的实施方式中,第一设备还可以包括第二资源、第三资源等,每一个资源都可以有其自身的属性信息。The attribute information of the first resource may include the attribute value of the first resource. In an implementation manner, the attribute information of the first resource may further include at least one of the status information, data type, location information, and parameter information of the first device of the first resource. In the implementation process, the attribute value of the first resource may be a value measured by a sensor, for example, a sensed value of the sensor. It should be understood that, in a feasible implementation manner, the first device may also include a second resource, a third resource, etc., and each resource may have its own attribute information.
以第一设备的资源为第一设备中的感测器(例如传感器)来讲,例如,第一设备可以为用于监控房间门打开或关闭的监控资源设备,第一资源可以是该监控资源设备中的传感器。在一种实施场景中,在房间门打开时,传感器的感测值为1,第一资源的属性值为1,此处的1表示房间门打开;在房间门关 闭时,传感器的感测值为0,第一资源的属性值为0,此处的0表示房间门关闭。Taking the resource of the first device as a sensor (such as a sensor) in the first device, for example, the first device may be a monitoring resource device used to monitor the opening or closing of a room door, and the first resource may be the monitoring resource Sensors in the device. In an implementation scenario, when the room door is opened, the sensor's sensing value is 1, and the attribute value of the first resource is 1, where 1 means the room door is open; when the room door is closed, the sensor's sensing value If the value is 0, the attribute value of the first resource is 0, where 0 means that the room door is closed.
S303、服务器接收第一设备发送的通知消息。S303. The server receives the notification message sent by the first device.
应理解,在通知消息包括第一设备的第一资源的资源标识时,服务器通过解析通知消息得到第一资源的资源标识,并获取与该资源标识所对应的第一资源的属性信息。It should be understood that when the notification message includes the resource identifier of the first resource of the first device, the server obtains the resource identifier of the first resource by parsing the notification message, and obtains the attribute information of the first resource corresponding to the resource identifier.
在通知消息包括第一设备的第一资源的属性信息时,服务器通过解析通知消息,得到第一设备的第一资源的属性信息。When the notification message includes the attribute information of the first resource of the first device, the server obtains the attribute information of the first resource of the first device by parsing the notification message.
本申请实施例中,通过服务器向第一设备发送第一请求,使得第一设备在第一资源的属性信息满足触发条件的情况下,服务器才能接收第一设备发送的通知消息,而不是只要第一资源的属性信息发生变化就接收第一设备发送的通知消息,从而服务器接收的通知消息的数量变少,服务器的计算资源降低。In this embodiment of the application, the server sends the first request to the first device, so that the first device can receive the notification message sent by the first device only when the attribute information of the first resource meets the trigger condition, instead of only the first device. As soon as the attribute information of the resource changes, the notification message sent by the first device is received, so that the number of notification messages received by the server decreases, and the computing resources of the server decrease.
图4为本申请实施例提供的另一种物联网中消息的传输方法的实现流程示意图,如图4所示,该方法包括:Fig. 4 is a schematic diagram of the implementation process of another method for message transmission in the Internet of Things provided by an embodiment of the application. As shown in Fig. 4, the method includes:
S401、服务器向第一设备发送第一请求,第一请求指示第一设备在第一资源的属性信息满足触发条件的情况下,向服务器发送通知消息,通知消息包括或指示第一资源的属性信息;第一设备接收服务器发送的第一请求。S401. The server sends a first request to the first device, where the first request instructs the first device to send a notification message to the server when the attribute information of the first resource meets the trigger condition. The notification message includes or indicates the attribute information of the first resource. ; The first device receives the first request sent by the server.
在第一请求包括触发条件时,第一设备可以通过解析第一请求的方式得到触发条件。在第一请求指示触发条件时,第一设备可以通过解析第一请求的方式得到触发条件的标识、地址、索引或链接,并基于触发条件的标识、地址、索引或链接从服务器或其它设备获取触发条件。When the first request includes the trigger condition, the first device may obtain the trigger condition by parsing the first request. When the first request indicates the trigger condition, the first device can obtain the identifier, address, index or link of the trigger condition by parsing the first request, and obtain it from the server or other device based on the identifier, address, index or link of the trigger condition Triggering conditions.
S403、第一设备监听第一资源的属性信息,确定第一资源的属性信息满足触发条件。S403: The first device monitors the attribute information of the first resource, and determines that the attribute information of the first resource satisfies the trigger condition.
第一设备可以持续性的或周期性的或非周期性的监听第一资源的属性信息,在每一次监听到第一资源的属性信息时,确定该第一资源的属性信息是否满足触发条件,如果第一设备确定第一资源的属性信息满足触发条件,向服务器发送通知消息,如果第一设备确定第一资源的属性信息不满足触发条件,则不向服务器发送通知消息,且第一设备继续监听第一资源的属性信息。The first device can monitor the attribute information of the first resource continuously or periodically or non-periodically, and each time it monitors the attribute information of the first resource, it determines whether the attribute information of the first resource meets the trigger condition, If the first device determines that the attribute information of the first resource meets the trigger condition, it sends a notification message to the server. If the first device determines that the attribute information of the first resource does not meet the trigger condition, it does not send the notification message to the server, and the first device continues Monitor the attribute information of the first resource.
S405、第一设备向服务器发送通知消息;服务器接收第一设备发送的通知消息。S405. The first device sends a notification message to the server; the server receives the notification message sent by the first device.
本申请实施例中,第一设备和服务器交互时,由于第一设备能够通过服务器发送的第一请求获取到触发条件,从而第一设备在监听到第一资源的属性信息满足触发条件时,才向服务器发送通知消息,进而服务器接收的通知消息的数量少,服务器的计算资源低。In the embodiment of the present application, when the first device interacts with the server, because the first device can obtain the trigger condition through the first request sent by the server, the first device monitors that the attribute information of the first resource meets the trigger condition. Send notification messages to the server, and the number of notification messages received by the server is small, and the computing resources of the server are low.
图5为本申请实施例提供的又一种物联网中消息的传输方法的实现流程示意图,如图5所示,该方法包括:FIG. 5 is a schematic diagram of the implementation process of another method for message transmission in the Internet of Things provided by an embodiment of the application. As shown in FIG. 5, the method includes:
S501、服务器创建规则资源。S501. The server creates a rule resource.
规则资源可以包括约束条件(本申请实施例中的约束条件可以均理解为第一约束条件),与约束条件对应的N个输入资源,以及与约束条件对应的M个行为资源;N为大于或等于1的正整数;M为大于或等于1的正整数。其中,N个输入资源包括第一资源。约束条件可以理解为规则表达式。The rule resource may include constraint conditions (the constraint conditions in the embodiments of this application can all be understood as the first constraint condition), N input resources corresponding to the constraint conditions, and M behavior resources corresponding to the constraint conditions; N is greater than or A positive integer equal to 1; M is a positive integer greater than or equal to 1. Among them, the N input resources include the first resource. Constraints can be understood as regular expressions.
在一种情况下,N个输入资源中任一个输入资源,与M个行为资源中任一个行为资源不同。在另一种情况下,N个输入资源中的部分输入资源,与M个行为资源中的部分输入资源相同。In one case, any one of the N input resources is different from any one of the M behavior resources. In another case, part of the input resources in the N input resources is the same as part of the input resources in the M behavior resources.
在一种实施方式中,服务器创建的规则资源中可以包括至少两个约束条件、与至少两个约束条件对应的输入资源,以及与至少两个约束条件对应的行为资源。其中,至少两个约束条件可以包括第一约束条件。In an embodiment, the rule resource created by the server may include at least two constraint conditions, input resources corresponding to the at least two constraint conditions, and behavior resources corresponding to the at least two constraint conditions. Among them, the at least two constraint conditions may include the first constraint condition.
举例来说,服务器创建的规则资源中可以包括第一约束条件和第二约束条件,以及与第一约束条件对应的N个输入资源、与第一约束条件对应的M个行为资源、与第二约束条件对应的P个输入资源,以及与第二约束条件对应的Q个行为资源。其中,P或Q为大于或等于1的正整数。其中,N个输入资源中任一个输入资源,和P个输入资源中任一个输入资源不同,或者,N个输入资源中的部分输入资源,和P个输入资源中的部分输入资源相同。其中,M个行为资源中任一个行为资源,和Q个行为资源中任一个行为资源不同,或者,M个行为资源中部分行为资源,和Q个行为资源中部分行为资源相同。For example, the rule resource created by the server may include a first constraint condition and a second constraint condition, as well as N input resources corresponding to the first constraint condition, M behavior resources corresponding to the first constraint condition, and the second constraint condition. P input resources corresponding to the constraint condition, and Q behavior resources corresponding to the second constraint condition. Wherein, P or Q is a positive integer greater than or equal to 1. Wherein, any one of the N input resources is different from any one of the P input resources, or some of the N input resources are the same as some of the P input resources. Among them, any one of the M behavior resources is different from any one of the Q behavior resources, or some of the M behavior resources are the same as some of the Q behavior resources.
请参阅图2,规则资源包括规则输入资源、规则表达式资源以及规则行为资源。其中,至少两个约束条件可以包括在规则表达式资源内,与至少两个约束条件对应的输入资源可以包括在规则输入资源内,与至少两个约束条件对应的行为资源可以包括在规则行为资源内。Refer to Figure 2. Rule resources include rule input resources, rule expression resources, and rule behavior resources. Wherein, at least two constraint conditions can be included in the rule expression resource, input resources corresponding to the at least two constraint conditions can be included in the rule input resource, and behavior resources corresponding to the at least two constraint conditions can be included in the rule behavior resource. Inside.
值得注意的是,本申请实施例以规则资源包括第一约束条件为例,对消息的传输方式作出说明,本领域技术人员应理解,在规则资源包括至少两个约束条件时消息的传输方式,与规则资源包括第一约束条件时消息的传输方式类似。It is worth noting that the embodiment of the present application takes the rule resource including the first constraint condition as an example to illustrate the message transmission mode. Those skilled in the art should understand that the message transmission mode when the rule resource includes at least two constraint conditions, It is similar to the message transmission mode when the rule resource includes the first constraint condition.
本申请实施例中的N的个数,可以与约束条件中资源的个数相同。例如,在约束条件为“(资源A>17)and((资源B=false)or(资源C<16))”时,约束条件中有三个资源A、B和C,与约束条件对应的资源为资源A、B和C。The number of N in the embodiment of the present application may be the same as the number of resources in the constraint condition. For example, when the constraint condition is "(resource A>17) and ((resource B=false)or (resource C<16))", there are three resources A, B, and C in the constraint condition, and the resource corresponding to the constraint condition Are resources A, B, and C.
本申请实施例中的N个输入资源中的某一个输入资源,和M个行为资源中的某一个行为资源,可以是同一个设备上的资源,或者,可以是不同的设备上的资源。In the embodiment of the present application, a certain input resource among the N input resources and a certain behavior resource among the M behavior resources may be resources on the same device, or may be resources on different devices.
在一种实施方式中,服务器可以基于用户的输入,确定约束条件。例如,服务器可以接收用户的输入“(资源A>17)and((资源B=false)or(资源C<16))”,从而得到约束条件“(资源A>17)and((资源B=false)or(资源C<16))”。In an embodiment, the server may determine the constraint conditions based on the user's input. For example, the server can receive the user's input "(resource A>17) and ((resource B=false) or (resource C<16))", thereby obtaining the constraint condition "(resource A>17) and ((resource B= false)or(resource C<16))".
在另一实施方式中,服务器可以基于用户对约束条件的操作,来对约束条件进行修改。例如,服务器可以接收用户将“资源C<16”修改为“资源C<25”的操作,从而将约束条件修改为“(资源A>17)and((资源B=false)or(资源C<25))”。In another embodiment, the server may modify the constraint condition based on the user's operation on the constraint condition. For example, the server can receive the user's operation to modify "resource C<16" to "resource C<25", thereby modifying the constraint condition to "(resource A>17) and ((resource B=false) or (resource C< 25))".
在又一种实施方式中,约束条件的确定和修改可以是通过配置得到的。例如,服务器可以接收一个资源设备发送的配置信息,配置信息可以包括或指示约束条件,或者,包括或指示对约束条件的修改信息,从而服务器可以基于配置信息得到约束条件,或者,可以基于配置信息对约束条件进行修改。In yet another embodiment, the determination and modification of the constraint conditions may be obtained through configuration. For example, the server may receive configuration information sent by a resource device, and the configuration information may include or indicate constraint conditions, or include or indicate modification information to the constraint conditions, so that the server can obtain the constraint conditions based on the configuration information, or can be based on the configuration information Modify the constraints.
S503、服务器向第一设备发送订阅第一资源的请求;第一设备接收服务器发送的订阅第一资源的请求。S503: The server sends a request for subscribing to the first resource to the first device; the first device receives the request for subscribing to the first resource sent by the server.
在物联网场景中,服务器在得到创建规则资源后,需要注册规则资源中的资源,一般来说,服务器可以向与规则资源中的资源对应的一个或至少两个设备,发送订阅资源的请求,其中,订阅资源的请求中可以包括或指示待订阅的资源标识。In the Internet of Things scenario, the server needs to register the resource in the rule resource after it obtains the created rule resource. Generally speaking, the server can send a resource subscription request to one or at least two devices corresponding to the resource in the rule resource. Wherein, the resource subscription request may include or indicate the resource identifier to be subscribed.
以服务器订阅第一资源举例,服务器可以向第一设备发送第一资源的标识或名称,从而第一设备可以基于接收到的第一资源的标识或名称订阅到第一资源。即,订阅第一资源的请求中可以包括第一资源的标识或名称。Taking the example of the server subscribing to the first resource, the server may send the identifier or name of the first resource to the first device, so that the first device may subscribe to the first resource based on the received identifier or name of the first resource. That is, the request for subscribing to the first resource may include the identifier or name of the first resource.
能够理解地,服务器不仅可以订阅第一设备的第一资源,还可以订阅第一设备中的其它资源,例如第一设备中的第二资源、第三资源等,或者还可以订阅物联网中的其它资源设备中的资源。Understandably, the server can not only subscribe to the first resource of the first device, but also subscribe to other resources in the first device, such as the second resource and the third resource in the first device, or it can also subscribe to the Internet of Things. Resources in other resource devices.
第一设备可以将第一资源的标识或名称存放到第一设备的订阅资源中,在存放完成后,第一设备也就完成了第一资源的订阅。The first device may store the identification or name of the first resource in the subscription resource of the first device. After the storage is completed, the first device also completes the subscription of the first resource.
S505、第一设备向服务器发送第一消息,第一消息包括或指示第一资源订阅成功。S505: The first device sends a first message to the server, where the first message includes or indicates that the first resource subscription is successful.
在第一设备成资源的订阅后,第一设备可以向服务器发送第一消息。第一消息也可以理解为资源订阅成功消息;服务器接收第一设备发送的第一消息。After the first device has subscribed to the resource, the first device may send the first message to the server. The first message can also be understood as a resource subscription success message; the server receives the first message sent by the first device.
在服务器接收到第一设备发送的第一消息后,服务器确定第一资源订阅完成。After the server receives the first message sent by the first device, the server determines that the first resource subscription is completed.
在实施过程中,服务器可以基于约束条件确定触发条件。In the implementation process, the server can determine the trigger condition based on the constraint condition.
在一种实施方式中,如果N等于1,即服务器创建的规则资源中仅有一个规则输入资源,服务器可以基于约束条件中包括的一个规则输入资源(第一资源)对应的表达式,确定触发条件。例如,服务器可以将约束条件确定为触发条件。再例如,服务器可以修改约束条件中的参数,从而得到触发条件。In one embodiment, if N is equal to 1, that is, there is only one rule input resource in the rule resource created by the server, the server can determine the trigger based on the expression corresponding to a rule input resource (the first resource) included in the constraint condition condition. For example, the server may determine the constraint condition as the trigger condition. For another example, the server can modify the parameters in the constraint condition to obtain the trigger condition.
在另一种实施方式中,如果N大于1,即服务器创建的规则资源中包括至少两个规则输入资源的情况下,服务器可以将约束条件进行分解,从而可以基于分解后的至少两个规则输入资源分别对应的表达式,得到触发条件,其中,服务器基于约束条件确定触发条件的实施过程可以参阅S507~S509。In another embodiment, if N is greater than 1, that is, in the case that the rule resource created by the server includes at least two rule input resources, the server can decompose the constraint conditions, so that the decomposed rule input can be based on at least two rule inputs. The expressions corresponding to the resources respectively obtain the trigger conditions. For the implementation process of the server determining the trigger conditions based on the constraint conditions, please refer to S507 to S509.
S507、服务器将约束条件分解为N个子条件;N个子条件与N个输入资源一一对应;从N个子条件中确定第一资源对应的子条件。S507. The server decomposes the constraint condition into N sub-conditions; the N sub-conditions have a one-to-one correspondence with the N input resources; and the sub-conditions corresponding to the first resource are determined from the N sub-conditions.
其中,一个子条件对应一个资源,即将约束条件分解为N个子条件时,一个子条件仅对应一个资源。例如,在约束条件为“(资源A>17)and((资源B=false)or(资源C<16))”的情况下,由于约束条件中具有三个资源,分别为资源A、资源B以及资源C,从而服务器可以将约束条件分解为三个子条件,分别是与资源A对应的“资源A>17”、与资源B对应的“资源B=false”以及与资源C对应的“资源C<25”。Among them, one sub-condition corresponds to one resource, that is, when the constraint condition is decomposed into N sub-conditions, one sub-condition corresponds to only one resource. For example, when the constraint condition is "(resource A>17) and ((resource B=false) or (resource C<16))", since there are three resources in the constraint condition, they are resource A and resource B. And resource C, so that the server can decompose the constraint condition into three sub-conditions, which are "resource A>17" corresponding to resource A, "resource B=false" corresponding to resource B, and "resource C" corresponding to resource C <25".
由于N个子条件中包括第一资源对应的子条件,因此,服务器可以从N个子条件中确定第一资源对应的子条件。Since the N sub-conditions include the sub-conditions corresponding to the first resource, the server may determine the sub-conditions corresponding to the first resource from the N sub-conditions.
S509、服务器基于第一资源对应的子条件,确定触发条件。S509: The server determines a trigger condition based on the sub-condition corresponding to the first resource.
其中,触发条件可以包括以下之一:第一资源的属性信息大于第一阈值;在第一时长内,第一资源的属性信息大于第一阈值;第一资源的属性信息小于第二阈值;在第二时长内,第一资源的属性信息小于第二阈值;第一资源的属性信息在第三时长内发生变化,且变化的数值大于第一数值。Wherein, the trigger condition may include one of the following: the attribute information of the first resource is greater than the first threshold; within the first time period, the attribute information of the first resource is greater than the first threshold; the attribute information of the first resource is less than the second threshold; During the second time period, the attribute information of the first resource is less than the second threshold; during the third time period, the attribute information of the first resource changes, and the changed value is greater than the first value.
其中,第一时长、第二时长以及第三时长可以是第一设备自身确定的时长,或者,第一时长、第二时长以及第三时长可以是服务器或其它设备配置的时长。第一时长、第二时长或者第三时长可以是某一 个定时器在超时前的运行时长。The first duration, the second duration, and the third duration may be durations determined by the first device itself, or the first duration, the second duration, and the third duration may be durations configured by the server or other devices. The first duration, the second duration, or the third duration may be the running duration of a certain timer before it expires.
在一种实施方式中,服务器可以将第一资源对应的子条件确定为触发条件。例如,第一资源对应的子条件为“资源A>17”,确定触发条件也为“资源A>17”。In an implementation manner, the server may determine the sub-condition corresponding to the first resource as the trigger condition. For example, the sub-condition corresponding to the first resource is "resource A>17", and it is determined that the trigger condition is also "resource A>17".
在另一种实施方式中,服务器可以对确定的第一资源对应的子条件进行修改,并将修改后的第一资源对应的子条件确定为触发条件。即第一资源对应的子条件所对应的阈值或数值,可以大于或者小于触发条件所对应的阈值或数值。在一种实施方式中,服务器可以确定第一资源对应的子条件所对应的阈值或数值,并将该子条件所对应的阈值或数值加上或减去某一个值,得到触发条件对应的阈值或数值。例如,在第一资源对应的子条件为“资源A>17”时,触发条件可以为“资源A>18”,或者,触发条件可以为“资源A>15”。In another implementation manner, the server may modify the determined sub-condition corresponding to the first resource, and determine the modified sub-condition corresponding to the first resource as the trigger condition. That is, the threshold or value corresponding to the sub-condition corresponding to the first resource may be greater than or smaller than the threshold or value corresponding to the trigger condition. In one embodiment, the server may determine the threshold or value corresponding to the sub-condition corresponding to the first resource, and add or subtract a certain value from the threshold or value corresponding to the sub-condition to obtain the threshold corresponding to the trigger condition Or numerical value. For example, when the sub-condition corresponding to the first resource is "resource A>17", the trigger condition may be "resource A>18", or the trigger condition may be "resource A>15".
应需说明的是,本申请实施例并不限定步骤S503~S505与步骤服务器基于约束条件确定触发条件,在执行时的先后顺序,例如,可以先执行步骤S503~S505,再执行步骤服务器基于约束条件确定触发条件,或者,可以先执行步骤服务器基于约束条件确定触发条件,再执行步骤S503~S505,或者,步骤S503~S505与步骤服务器基于约束条件确定触发条件可以同步执行。It should be noted that the embodiment of the present application does not limit the steps S503 to S505 and the step server to determine the trigger condition based on the constraint condition. The order of execution during execution, for example, steps S503 to S505 can be executed first, and then the step server is executed based on the constraint. The condition determines the trigger condition. Alternatively, the step server may first determine the trigger condition based on the constraint condition, and then steps S503 to S505 are executed, or steps S503 to S505 can be executed synchronously with the step server determining the trigger condition based on the constraint condition.
S511、服务器向第一设备发送第一请求,第一请求指示第一设备在第一资源的属性信息满足触发条件的情况下,向服务器发送通知消息,通知消息包括或指示第一资源的属性信息;第一设备接收服务器发送的第一请求。S511. The server sends a first request to the first device. The first request instructs the first device to send a notification message to the server when the attribute information of the first resource meets the trigger condition. The notification message includes or indicates the attribute information of the first resource. ; The first device receives the first request sent by the server.
其中,第一资源的属性信息满足触发条件,可以包括以下之一:Wherein, the attribute information of the first resource satisfies the trigger condition, and may include one of the following:
第一资源的属性信息大于第一阈值;The attribute information of the first resource is greater than the first threshold;
在第一时长内,第一资源的属性信息大于第一阈值;Within the first time period, the attribute information of the first resource is greater than the first threshold;
第一资源的属性信息小于第二阈值;The attribute information of the first resource is less than the second threshold;
在第二时长内,第一资源的属性信息小于第二阈值;In the second time period, the attribute information of the first resource is less than the second threshold;
第一资源的属性信息在第三时长内发生变化,且变化的数值大于第一数值。The attribute information of the first resource changes within the third time period, and the changed value is greater than the first value.
S513、第一设备向服务器发送第二消息,第二消息包括或指示第一设备将触发条件设定完成;服务器接收第一设备发送的第二消息。S513: The first device sends a second message to the server, where the second message includes or indicates that the first device completes the setting of the trigger condition; the server receives the second message sent by the first device.
在第一设备接收到第一请求后,可以基于第一请求得到通知消息的触发条件,并设定该触发条件,例如,设定触发条件的一种实施方式可以是,将触发条件存储在第一设备中或者第一设备的订阅资源中。在第一设备将触发条件设定完成后,可以向服务器发送第二消息。After receiving the first request, the first device can obtain the trigger condition of the notification message based on the first request, and set the trigger condition. For example, an implementation manner of setting the trigger condition may be to store the trigger condition in the first request. In one device or in the subscription resource of the first device. After the first device finishes setting the trigger condition, it can send a second message to the server.
S515、第一设备监听第一资源的属性信息,确定第一资源的属性信息满足触发条件。S515: The first device monitors the attribute information of the first resource, and determines that the attribute information of the first resource satisfies the trigger condition.
其中,通知消息包括或指示第一资源的属性信息。Wherein, the notification message includes or indicates the attribute information of the first resource.
值得注意的是,本申请实施例中,第一资源的属性信息满足触发条件,可以理解为第一资源的属性值满足触发条件。It is worth noting that in this embodiment of the application, the attribute information of the first resource satisfies the trigger condition, which can be understood as the attribute value of the first resource satisfies the trigger condition.
S517、第一设备向服务器发送通知消息;服务器接收第一设备发送的通知消息。S517. The first device sends a notification message to the server; the server receives the notification message sent by the first device.
第一设备可以在确定到第一资源的属性信息满足触发条件的情况下,向服务器发送通知消息。在一种实施例中,第一设备可以在确定到:如果第一资源的属性信息大于第一阈值,向服务器发送通知消息。例如,触发条件为属性信息大于25,第一设备确定到第一资源的属性信息为26,向服务器发送通知消息。The first device may send a notification message to the server when it is determined that the attribute information of the first resource satisfies the trigger condition. In an embodiment, the first device may determine that if the attribute information of the first resource is greater than the first threshold, send a notification message to the server. For example, the trigger condition is that the attribute information is greater than 25, and the first device determines that the attribute information of the first resource is 26, and sends a notification message to the server.
在另一种实施例中,第一设备可以在确定到:如果在第一时长内,属性信息大于第一阈值,向服务器发送通知消息。In another embodiment, the first device may determine that if the attribute information is greater than the first threshold within the first time period, send a notification message to the server.
在实施中,第一设备可以在确定到第一资源的属性信息大于第一阈值的情况下,开启并运行第一定时器,第一定时器被配置为运行第一时长后超时,在第一定时器的运行过程中,第一设备将不断地监听第一资源的属性信息是否依旧大于第一阈值,如果是,第一设备向服务器发送通知消息,如果否,第一设备不向服务器发送通知消息,并继续监听第一资源的属性信息。In implementation, the first device may start and run the first timer when it is determined that the attribute information of the first resource is greater than the first threshold. The first timer is configured to run for the first period of time and then time out. During the operation of the timer, the first device will continuously monitor whether the attribute information of the first resource is still greater than the first threshold. If so, the first device sends a notification message to the server, if not, the first device does not send a notification to the server Message, and continue to monitor the attribute information of the first resource.
在又一种实施例中,第一设备可以在确定到:第一资源的属性信息小于第二阈值,向服务器发送通知消息,或者,第一设备可以在确定到:在第二时长内,第一资源的属性信息小于第二阈值。In another embodiment, the first device may send a notification message to the server after determining that the attribute information of the first resource is less than the second threshold, or the first device may determine that: within the second time period, the first device The attribute information of a resource is less than the second threshold.
在再一种实施例中,第一设备可以在确定到:第一资源的属性信息在第三时长内发生变化,且变化的数值大于第一数值,向服务器发送通知消息。In another embodiment, the first device may send a notification message to the server after determining that the attribute information of the first resource has changed within the third time period and the changed value is greater than the first value.
在实施中,第一设备可以每隔第三时长确定该第三时长前后的第一资源的属性信息,如果确定第一资源的属性信息的变化数值大于第一数值,向服务器发送通知消息。例如,第一设备可以控制一个第二定时器周期性的重启,第二定时器被配置为运行第三时长后超时,并在超时的情况下重启,第一设备可以分别获得:第二定时器在重启的时刻对应的第一资源的属性信息,和,第二定时器在超时的时刻对应的第一资源的属性信息,从而得到第一时长内第一资源的属性信息的变化的数值。In implementation, the first device may determine the attribute information of the first resource before and after the third time period every third time period, and if it is determined that the change value of the attribute information of the first resource is greater than the first value, it sends a notification message to the server. For example, the first device can control a second timer to restart periodically, the second timer is configured to run for a third period of time and then time out, and restart in the case of timeout, the first device can obtain: the second timer respectively The attribute information of the first resource corresponding to the restart time, and the attribute information of the first resource corresponding to the second timer at the time of timeout, so as to obtain the value of the change in the attribute information of the first resource within the first time period.
S519、服务器执行规则行为。S519. The server executes the rule behavior.
在一种实施方式中,由于第一设备已经确定到第一资源的属性信息满足触发条件,因此,服务器无需再确定第一资源的属性信息是否还满足第一资源对应的子条件,而是直接默认第一资源的属性信息已经满足第一资源对应的子条件。In one embodiment, since the first device has determined that the attribute information of the first resource meets the trigger condition, the server does not need to determine whether the attribute information of the first resource still meets the sub-conditions corresponding to the first resource, but directly By default, the attribute information of the first resource has met the sub-conditions corresponding to the first resource.
在另一种实施方式中,服务器可以在获取到通知消息后,通过通知消息得到第一资源的属性信息,并判断第一资源的属性信息是否满足第一资源对应的子条件。In another implementation manner, after obtaining the notification message, the server may obtain the attribute information of the first resource through the notification message, and determine whether the attribute information of the first resource satisfies the sub-condition corresponding to the first resource.
如果N等于1,即在约束条件中只有第一资源对应的子条件,且服务器在确定第一资源的属性信息满足约束条件的情况下,执行规则行为。If N is equal to 1, that is, there are only sub-conditions corresponding to the first resource in the constraint condition, and the server executes the rule behavior when it determines that the attribute information of the first resource satisfies the constraint condition.
如果N大于1,即在约束条件中包括至少子条件,且服务器确定第一资源的属性信息满足第一资源对应的子条件的情况下,服务器获取N个输入资源中,除第一资源外的N-1个资源的属性信息,并确定到如果该N-1个资源中每一资源的属性信息,均满足每一资源对应的子条件时,执行规则行为。If N is greater than 1, that is, at least sub-conditions are included in the constraint condition, and the server determines that the attribute information of the first resource satisfies the sub-conditions corresponding to the first resource, the server obtains N input resources, except for the first resource The attribute information of N-1 resources, and it is determined that if the attribute information of each resource in the N-1 resources satisfies the sub-conditions corresponding to each resource, the rule behavior is executed.
在一种实施方式中,服务器可以通过N-1个资源的标识,获取N-1个资源的属性信息,进而判断N-1个资源的属性信息中的每一个资源的属性信息,是否满足与该每一个资源对应的子条件。In one embodiment, the server can obtain the attribute information of N-1 resources through the identification of N-1 resources, and then determine whether the attribute information of each resource in the attribute information of N-1 resources meets the requirements of The sub-condition corresponding to each resource.
在另一种实施方式中,服务器可以通过确定是否接收到与N-1个资源对应的设备发送的通知消息,如果接收到,确定N-1个资源的属性信息中的每一个资源的属性信息,均满足与该每一个资源对应的子条件。In another implementation manner, the server may determine whether a notification message sent by a device corresponding to N-1 resources is received, and if it is received, determine the attribute information of each resource in the attribute information of the N-1 resources. , All satisfy the sub-conditions corresponding to each resource.
能够理解的是,在约束条件包括N个子条件时,如果服务器确定N个输入资源中任一输入资源不满足该资源对应的子条件,则服务器不执行规则行为。It can be understood that when the constraint condition includes N sub-conditions, if the server determines that any one of the N input resources does not satisfy the sub-condition corresponding to the resource, the server does not execute the rule behavior.
服务器执行规则行为可以通过以下方式实现:修改M个行为资源的属性信息。The server executing the rule behavior can be implemented in the following way: modifying the attribute information of the M behavior resources.
举例而言,如果服务器创建的规则是:如果门开了,打开灯。那么,用于检测门开关的监控设备的传感器,在监测到门从关闭转为打开的情况下,监控设备向服务器发送门的指示,服务器基于门的指示确定门从关闭转为打开,服务器执行规则行为,例如,可以将灯的用于开启或关闭的资源的属性信息由0修改为1,此处的0表示灯的状态为熄灭,1表示灯的状态为开启。For example, if the rule created by the server is: if the door is opened, turn on the light. Then, when the sensor of the monitoring device used to detect the door switch detects that the door turns from closed to open, the monitoring device sends the door instruction to the server, and the server determines that the door turns from closed to open based on the door instruction, and the server executes Rule behavior, for example, the attribute information of the resource used to turn on or off the light can be modified from 0 to 1, where 0 means that the state of the light is off, and 1 means that the state of the light is on.
在服务器修改了M个行为资源的属性信息之后,服务器可以向与M个行为资源对应的一系列资源设备发送指示消息,指示消息包括或指示行为资源的属性信息,从而一系列设备能够在得到行为资源的属性信息后,基于行为资源的属性信息使行为资源转换至对应的状态。一系列资源设备包括至少一个资源设备,至少一个资源设备可以包括第一设备或者不包括第一设备。After the server modifies the attribute information of the M behavior resources, the server can send an indication message to a series of resource devices corresponding to the M behavior resources. The indication message includes or indicates the attribute information of the behavior resource, so that the series of devices can get the behavior After the attribute information of the resource, the behavior resource is converted to the corresponding state based on the attribute information of the behavior resource. The series of resource devices includes at least one resource device, and the at least one resource device may include or exclude the first device.
请参阅图2,在规则表达式资源中规则结果为true时,服务器可以基于规则结果,链接到场景集合中的与该规则结果或规则表达式对应的场景信息,并将链接到的场景信息赋给规则行为的场景信息。规则行为的场景信息可以为本申请实施例中的行为资源的属性信息。Refer to Figure 2. When the rule result in the rule expression resource is true, the server can link to the scene information corresponding to the rule result or the rule expression in the scene set based on the rule result, and assign the linked scene information to Give the scene information of the rule behavior. The scene information of the rule behavior may be the attribute information of the behavior resource in the embodiment of the application.
在本申请实施例中,将服务器进行第一资源对应的子条件判定的压力,经过第一设备设定触发条件的方式,下沉并分解到各个资源设备,从而可以有效减少服务器判定次数,降低服务器的工作压力,节省服务器的资源,并且,在服务器接收到通知消息后,执行规则行为,从而能够实现物联网中资源设备的联动。In the embodiment of the present application, the pressure of the server to determine the sub-conditions corresponding to the first resource is sunk and decomposed to each resource device through the method of setting the trigger condition by the first device, which can effectively reduce the number of server determinations and reduce The working pressure of the server saves the resources of the server, and after the server receives the notification message, it executes the regular behavior, so as to realize the linkage of the resource equipment in the Internet of Things.
图6为本申请实施例提供的另一种物联网系统的示意图。图6中的物联网系统相对于图1中的物联网系统的区别在于:图6中的物联网系统还包括云平台17,其中:FIG. 6 is a schematic diagram of another Internet of Things system provided by an embodiment of this application. The difference between the Internet of Things system in Fig. 6 and the Internet of Things system in Fig. 1 is that the Internet of Things system in Fig. 6 also includes a cloud platform 17, in which:
云平台17与服务器16无线连接,云平台还可以与资源设备11至15无线连接。The cloud platform 17 is wirelessly connected to the server 16, and the cloud platform may also be wirelessly connected to the resource devices 11-15.
在实施时,云平台与服务器连接所基于的通信协议,可以与资源设备的连接所基于的通信协议相同或不同,还可以与服务器与资源设备的连接所基于的通信协议不同或相同。In implementation, the communication protocol on which the connection between the cloud platform and the server is based may be the same or different from the communication protocol on which the connection of the resource device is based, and may also be different or the same as the communication protocol on which the connection between the server and the resource device is based.
图7为本申请实施例提供的再一种物联网中消息的传输方法的实现流程示意图,如图7所示,该方法包括:FIG. 7 is a schematic diagram of the implementation process of another method for transmitting messages in the Internet of Things provided by an embodiment of the application. As shown in FIG. 7, the method includes:
S701、云平台向第一设备发送第一请求,第一请求指示第一设备在第一资源的属性信息满足触发条件的情况下,向服务器发送通知消息,通知消息包括或指示第一资源的属性信息;第一设备接收云平台发送的第一请求。S701. The cloud platform sends a first request to the first device. The first request instructs the first device to send a notification message to the server when the attribute information of the first resource satisfies the trigger condition. The notification message includes or indicates the attribute of the first resource. Information; the first device receives the first request sent by the cloud platform.
S703、服务器接收云平台发送的第二消息,第二消息包括或指示第一设备将触发条件设定完成,触发条件用于在第一设备的第一资源的属性信息满足触发条件的情况下,触发第一设备向服务器发送通知消息。S703. The server receives a second message sent by the cloud platform, where the second message includes or indicates that the first device has completed setting the trigger condition, and the trigger condition is used when the attribute information of the first resource of the first device meets the trigger condition, Trigger the first device to send a notification message to the server.
在一种实施方式中,在S703之前,可以有云平台向服务器发送第二消息的步骤。In an implementation manner, before S703, there may be a step of the cloud platform sending the second message to the server.
在一种实施方式中,第一设备在将触发条件设置完成后,可以向云平台发送触发条件设定完成消息,从而云平台能够在接收到触发条件设定完成消息后,确定第一设备将触发条件设定完成,接着,云平台可以向服务器发送第二消息。In an embodiment, the first device may send a trigger condition setting complete message to the cloud platform after setting the trigger condition, so that the cloud platform can determine that the first device will set the trigger condition after receiving the trigger condition setting complete message. After the trigger condition is set, the cloud platform can send a second message to the server.
在另一种实施方式中,云平台向第一设备发送第一请求后,默认第一设备会将触发条件设定,因此 可以向服务器发送第二消息。云平台还可以在发送第一请求后,间隔特定时长后,向服务器发送第二消息。In another implementation manner, after the cloud platform sends the first request to the first device, the first device will set the trigger condition by default, so the second message can be sent to the server. The cloud platform may also send a second message to the server after sending the first request and after a certain period of time.
S705、第一设备监听第一资源的属性信息,确定第一资源的属性信息满足触发条件。S705: The first device monitors the attribute information of the first resource, and determines that the attribute information of the first resource satisfies the trigger condition.
S707、第一设备向服务器发送通知消息;服务器接收第一设备发送的通知消息。S707. The first device sends a notification message to the server; the server receives the notification message sent by the first device.
在本申请实施例中,第一设备、服务器以及云平台交互时,云平台确定触发条件,并向第一设备发送第一请求,相较于图3至5任一个所对应的实施例来说,触发条件无需服务器确定,从而进一步减少了服务器的计算量。In the embodiment of the present application, when the first device, the server, and the cloud platform interact, the cloud platform determines the trigger condition and sends the first request to the first device. Compared with the embodiment corresponding to any one of FIGS. 3 to 5 , The trigger condition does not need to be determined by the server, thereby further reducing the amount of calculations on the server.
图8a为本申请另一实施例提供的一种物联网中消息的传输方法的实现流程示意图,如图8a所示,该方法包括:Fig. 8a is a schematic diagram of the implementation process of a method for message transmission in the Internet of Things according to another embodiment of the application. As shown in Fig. 8a, the method includes:
S801、服务器创建规则资源。S801. The server creates a rule resource.
其中,规则资源可以包括约束条件,与约束条件对应的N个输入资源,以及与约束条件对应的M个行为资源;N为大于或等于1的正整数;M为大于或等于1的正整数。其中,N个输入资源包括第一资源。The rule resource may include constraint conditions, N input resources corresponding to the constraint conditions, and M behavior resources corresponding to the constraint conditions; N is a positive integer greater than or equal to 1; M is a positive integer greater than or equal to 1. Among them, the N input resources include the first resource.
S803、服务器向第一设备发送订阅第一资源的请求;第一设备接收服务器发送的订阅第一资源的请求。S803: The server sends a request for subscribing to the first resource to the first device; the first device receives the request for subscribing to the first resource sent by the server.
S805、第一设备向服务器发送第一消息,第一消息包括或指示第一资源订阅成功;服务器接收第一设备发送的第一消息。S805. The first device sends a first message to the server, where the first message includes or indicates that the first resource subscription is successful; the server receives the first message sent by the first device.
S807、服务器向云平台发送第三消息,第三消息包括或指示:约束条件和N个输入资源;云平台接收服务器发送的第三消息。S807. The server sends a third message to the cloud platform, where the third message includes or indicates: constraint conditions and N input resources; the cloud platform receives the third message sent by the server.
例如,第三消息中可以包括或指示资源A、资源B以及资源C,以及,第三消息可以包括或指示“(资源A>17)and((资源B=false)or(资源C<16))”。For example, the third message may include or indicate resource A, resource B, and resource C, and the third message may include or indicate "(resource A>17) and ((resource B=false) or (resource C<16) )".
应需说明的是,本申请实施例并不限定步骤S803~S805与步骤S807在执行时的先后顺序,例如,可以先执行步骤S803~S805,再执行步骤S807,或者,可以先执行步骤S807,再执行步骤S803~S805,或者,步骤S803~S805与步骤S807可以同步执行。It should be noted that the embodiment of the present application does not limit the order of execution of steps S803 to S805 and step S807. For example, steps S803 to S805 may be executed first, and then step S807 may be executed, or step S807 may be executed first. Steps S803 to S805 are executed again, or steps S803 to S805 and step S807 can be executed synchronously.
在实施过程中,云平台可以基于约束条件确定触发条件。In the implementation process, the cloud platform can determine the trigger condition based on the constraint condition.
在一种实施方式中,如果N等于1,即服务器创建的规则资源中仅有一个规则输入资源,在服务器将包括约束条件的第三消息发送给云平台后,服务器可以基于约束条件中包括的一个规则输入资源(第一资源)对应的表达式,确定触发条件。例如,云平台可以将约束条件确定为触发条件。再例如,云平台可以修改约束条件中的参数,从而得到触发条件。In one embodiment, if N is equal to 1, that is, there is only one rule input resource among the rule resources created by the server, after the server sends the third message including the constraint condition to the cloud platform, the server can be based on the constraint condition. A rule enters the expression corresponding to the resource (the first resource) to determine the trigger condition. For example, the cloud platform may determine the constraint condition as the trigger condition. For another example, the cloud platform can modify the parameters in the constraint condition to obtain the trigger condition.
在另一种实施方式中,如果N大于1,即服务器创建的规则资源中包括至少两个规则输入资源的情况下,在服务器将包括约束条件的第三消息发送给云平台后,云平台可以将约束条件进行分解,从而可以基于分解后的至少两个规则输入资源分别对应的表达式,得到触发条件,其中,云平台基于约束条件确定触发条件的实施过程可以参阅S809~S811。In another embodiment, if N is greater than 1, that is, when the rule resource created by the server includes at least two rule input resources, after the server sends the third message including the constraint condition to the cloud platform, the cloud platform may The constraint conditions are decomposed, so that the respective expressions corresponding to the resources can be input based on the decomposed at least two rules to obtain the trigger conditions. For the implementation process of the cloud platform to determine the trigger conditions based on the constraint conditions, please refer to S809 to S811.
S809、云平台将约束条件分解为N个子条件;N为大于或等于1的正整数,N个子条件与N个输入资源一一对应,从N个子条件中确定第一资源对应的子条件。S809. The cloud platform decomposes the constraint condition into N sub-conditions; N is a positive integer greater than or equal to 1, and the N sub-conditions correspond to the N input resources one-to-one, and the sub-condition corresponding to the first resource is determined from the N sub-conditions.
其中,云平台分解约束条件的方式可以参照服务器分解约束条件的描述,此处不作具体说明。Among them, the manner of the cloud platform decomposing constraint conditions can refer to the description of the server decomposing constraint conditions, which is not specifically described here.
在一种实施情况下,在云平台接收到第三消息后,云平台可以解析第三消息得到N个输入资源的标识和约束条件的标识,然后基于N个输入资源的标识和约束条件的标识,获取到约束条件和N个输入资源。在另一种实施情况下,在云平台接收到第三消息后,云平台可以解析第三消息,直接得到N个输入资源和约束条件。In an implementation situation, after the cloud platform receives the third message, the cloud platform can parse the third message to obtain the identification of the N input resources and the identification of the constraint condition, and then based on the identification of the N input resources and the identification of the constraint condition , Obtain the constraints and N input resources. In another implementation situation, after the cloud platform receives the third message, the cloud platform can parse the third message to directly obtain N input resources and constraint conditions.
S811、云平台基于第一资源对应的子条件,确定触发条件。S811. The cloud platform determines a trigger condition based on the sub-condition corresponding to the first resource.
其中,云平台基于第一资源对应的子条件,确定触发条件的实施方式,可以参阅服务器基于第一资源对应的子条件,确定触发条件的实施方式。Wherein, the cloud platform determines the implementation manner of the trigger condition based on the sub-condition corresponding to the first resource. You can refer to the server to determine the implementation manner of the trigger condition based on the sub-condition corresponding to the first resource.
S813、云平台向第一设备发送第一请求,第一请求指示第一设备在第一资源的属性信息满足触发条件的情况下,向服务器发送通知消息,通知消息包括或指示第一资源的属性信息;第一设备接收云平台发送的第一请求。S813. The cloud platform sends a first request to the first device. The first request instructs the first device to send a notification message to the server when the attribute information of the first resource meets the trigger condition. The notification message includes or indicates the attribute of the first resource. Information; the first device receives the first request sent by the cloud platform.
S815、第一设备向云平台发送第二消息,第二消息包括或指示第一设备将触发条件设定完成;云平台接收第一设备发送的第二消息。S815: The first device sends a second message to the cloud platform, where the second message includes or indicates that the first device completes the setting of the trigger condition; the cloud platform receives the second message sent by the first device.
能够理解的,在第一设备向云平台发送第二消息之后,表明第一设备已经设定好了触发条件,这样第一设备每确定到第一资源的属性信息发生变化后,就确定第一资源的属性信息是否满足触发条件。It can be understood that after the first device sends the second message to the cloud platform, it indicates that the first device has set the trigger condition. In this way, the first device determines that the first device has changed the attribute information of the first resource. Whether the attribute information of the resource meets the trigger condition.
S817、云平台向服务器发送第二消息;服务器接收云平台发送的第二消息。S817. The cloud platform sends a second message to the server; the server receives the second message sent by the cloud platform.
S819、第一设备监听第一资源的属性信息,确定第一资源的属性信息满足触发条件。S819. The first device monitors the attribute information of the first resource, and determines that the attribute information of the first resource satisfies the trigger condition.
其中,关于S819的描述可以参阅S517中的相关描述。For the description of S819, please refer to the related description in S517.
S821、第一设备向服务器发送通知消息;服务器接收第一设备发送的通知消息。S821. The first device sends a notification message to the server; the server receives the notification message sent by the first device.
S823、服务器执行规则行为。S823: The server executes the rule behavior.
在本申请实施例中,第一设备、服务器以及云平台交互时,云平台通过接收服务器发送的消息,得到第一资源对应的触发条件,从而云平台给第一设备发送包括或指示向服务器发送指示第一设备在第一资源的属性信息满足触发条件的情况下,向服务器发送通知消息的第一请求,进而无需服务器进行第一资源的触发条件的确定以及执行第一请求的发送流程,减少了服务器的计算资源。In the embodiment of the present application, when the first device, the server, and the cloud platform interact, the cloud platform obtains the trigger condition corresponding to the first resource by receiving the message sent by the server, so that the cloud platform sends the first device including or instructs to send to the server Instruct the first device to send the first request of the notification message to the server when the attribute information of the first resource satisfies the trigger condition, thereby eliminating the need for the server to determine the trigger condition of the first resource and execute the sending process of the first request, reducing The computing resources of the server.
以下以第一设备为inputDevice,服务器为ruleDevice举例,对本申请实施例的物联网中消息的传输方法作出说明:The following takes the first device as the inputDevice and the server as the ruleDevice as an example to illustrate the method for transmitting messages in the Internet of Things in the embodiment of the present application:
图8b为本申请又一实施例提供的一种物联网中消息的传输方法的实现流程示意图,如图8b所示,该方法包括:Fig. 8b is a schematic diagram of the implementation process of a method for message transmission in the Internet of Things according to another embodiment of this application. As shown in Fig. 8b, the method includes:
S841、ruleDevice创建一个新的Rule资源;该Rule资源就是执行资源设备自动化的一个规则。在该资源中包含了ruleInput资源,ruleExpression资源等,ruleDevice资源设备分别向各inputDevice订阅相关的资源;这些资源为ruleInput中包含链接指定的资源。S841, ruleDevice creates a new Rule resource; the Rule resource is a rule for executing resource device automation. The resource includes ruleInput resources, ruleExpression resources, etc. The ruleDevice resource device subscribes to each inputDevice related resources respectively; these resources are the resources specified by the link in the ruleInput.
S843、ruleDevice分解规则表达式ruleExpression;根据ruleInput中指定的资源,分解ruleExpression为不同的子集合。例如ruleExpression“A>17and B=false or C<16”,则分解为3个子集合:A>17;B=false;C<16。划分子集合时可以根据资源来划分,使得每个子集合仅代表一个资源。ruleDevice分解ruleExpression时,可以根据inputResource的个数分解。例如,InputResource的个数为N个,ruleDevice分解为N个子集合,N为大于或等于1的正整数。S843, ruleDevice decomposes the rule expression ruleExpression; according to the resource specified in ruleInput, decomposes the ruleExpression into different subsets. For example, ruleExpression "A>17 and B=false or C<16", it is decomposed into 3 sub-sets: A>17; B=false; C<16. The sub-collection can be divided according to resources, so that each sub-collection only represents one resource. When ruleDevice decomposes ruleExpression, it can be decomposed according to the number of inputResource. For example, the number of InputResources is N, ruleDevice is decomposed into N subsets, and N is a positive integer greater than or equal to 1.
划分子集合时可以根据逻辑运算符来划分,使每个子集合中可以仅包含一个关系运算符,关系运算符可以包含(“>”,“>=”,“=”,“<”,“<=”以及“!=”等)。如此,被订阅的资源的属性值在变化后满足与该资源对应的关系表达式再去发送订阅通知消息。The sub-collection can be divided according to logical operators, so that each sub-collection can contain only one relational operator. The relational operator can include (">", ">=", "=", "<", "< =" and "!=" etc.). In this way, after the attribute value of the subscribed resource changes, it satisfies the relational expression corresponding to the resource before sending the subscription notification message.
S845、ruleDevice分别向各inputDevice订阅inputDevice上的输入参数。S845 and ruleDevice subscribe the input parameters on the inputDevice to each inputDevice respectively.
其中,S845可以理解为ruleDevice分别向各inputDevice订阅相关的资源。输入参数可以包括inputDevice上的资源。Among them, S845 can be understood as ruleDevice subscribing to related resources to each inputDevice respectively. Input parameters can include resources on inputDevice.
S847、在inputDevice订阅成功后,可以向ruleDevice发送订阅成功的消息。S847. After the inputDevice is successfully subscribed, a message indicating that the subscription is successful may be sent to the ruleDevice.
其中,在实施过程中,服务器可以先执行分解ruleExpression表达式的步骤,再执行订阅inputDevice的步骤;或者,服务器可以先执行订阅inputDevice的步骤,并在订阅成功后,再执行分解ruleExpression表达式的步骤;或者服务器分解ruleExpression表达式的步骤,和订阅inputDevice的步骤可以同步执行。Among them, in the implementation process, the server can first perform the step of decomposing the ruleExpression expression, and then the step of subscribing to the inputDevice; or the server can first perform the step of subscribing to the inputDevice, and after the subscription is successful, then perform the step of decomposing the ruleExpression expression ; Or the steps of the server decomposing ruleExpression expressions, and the steps of subscribing to inputDevice can be executed synchronously.
其中,规则表达式可以是上述实施例中的约束条件,子集合可以是上述实施例中的子条件。Wherein, the regular expression may be the constraint condition in the foregoing embodiment, and the subset may be the sub-condition in the foregoing embodiment.
S849、ruleDevice根据分解的各个子集合,分别向各对应的inputDevice发送已订阅的资源的订阅通知条件的请求,订阅通知条件可以是上述实施例中的触发条件。其中,订阅通知条件的请求的内容可以如下:S849. The ruleDevice sends a request for the subscription notification condition of the subscribed resource to each corresponding inputDevice according to each of the decomposed sub-sets. The subscription notification condition may be the trigger condition in the foregoing embodiment. Among them, the content of the request to subscribe to the notification condition may be as follows:
To:A所属的资源的地址To: The address of the resource to which A belongs
CN:{CN:{
Oic.r.value.conditional(Oic.r.value.conditional(
Valuecondition:“>17”;)Valuecondition: ">17";)
}}
其中,valueCondition中的值为资源的属性值。另外,每个资源都绑定一个oic.r.value.conditional资源,该资源用于限制目标资源发送订阅通知消息的条件。Among them, the value in valueCondition is the attribute value of the resource. In addition, each resource is bound to an oic.r.value.conditional resource, which is used to limit the conditions for the target resource to send subscription notification messages.
其中,订阅通知消息的条件或者订阅通知条件,可以是本申请实施例中的触发条件。The condition of subscribing to the notification message or the condition of subscribing to the notification may be the triggering condition in the embodiment of the present application.
S851、inputDevice在将通知条件设定完成后,可以向ruleDevice发送设定通知条件完成的消息。S851. After the inputDevice has set the notification condition, it can send a message that the set notification condition is complete to the ruleDevice.
S853、当订阅的资源信息发生变化的时候,inputDevice首先判断oic.r.value.conditional资源的内容;如果订阅资源的值变化后满足了oic.r.value.conditional中设定的条件(即valueCondition的条件),则执行S855、如果订阅资源的值变化后不满足oic.r.value.conditional中设定的条件则不发送订阅通知消息。其中,此处的资源信息可以是本申请实施例中的第一资源的属性信息。S853. When the subscribed resource information changes, the inputDevice first judges the content of the oic.r.value.conditional resource; if the value of the subscribed resource changes, the condition set in oic.r.value.conditional (ie valueCondition If the value of the subscription resource does not meet the condition set in oic.r.value.conditional after the value of the subscription resource changes, the subscription notification message is not sent. Wherein, the resource information here may be the attribute information of the first resource in the embodiment of the present application.
S855、inputDevice触发订阅通知消息,并向服务器发送该订阅通知消息,在该订阅通知消息中携带或指示变化后的资源的值。S855. The inputDevice triggers the subscription notification message, and sends the subscription notification message to the server, and the subscription notification message carries or indicates the value of the changed resource.
其中,订阅通知消息可以是本申请实例中的通知消息。The subscription notification message may be the notification message in the example of this application.
S857、ruleDevice收到上述订阅通知消息之后,计算ruleExpression,并进行ruleExpression的判定, 在判断为true时,执行S859。其中,订阅通知消息可以是本申请实施例中的通知消息。S857. After receiving the above subscription notification message, the ruleDevice calculates the ruleExpression and determines the ruleExpression. When the determination is true, execute S859. The subscription notification message may be the notification message in the embodiment of the present application.
S859、ruleDevice规则行为ruleAction。S859, ruleDevice rule action ruleAction.
图8c为本申请再一实施例提供的一种物联网中消息的传输方法的实现流程示意图,如图8c所示,该方法包括:Fig. 8c is a schematic diagram of the implementation process of a method for message transmission in the Internet of Things provided by still another embodiment of the application. As shown in Fig. 8c, the method includes:
S861、ruleDevice创建一个新的Rule资源;该Rule资源就是执行设备自动化的一个规则;在该资源中包含了ruleInput资源,ruleExpression资源等;ruleDevice设备分别向各inputDevice订阅相关的资源;这些资源为ruleInput中包含链接指定的资源。S861, ruleDevice creates a new Rule resource; the Rule resource is a rule for performing device automation; the resource contains ruleInput resources, ruleExpression resources, etc.; ruleDevice devices subscribe to each inputDevice for related resources; these resources are in ruleInput Contains the resource specified by the link.
S863、ruleDevice分别向各inputDevice订阅inputDevice上的输入参数。S863 and ruleDevice subscribe the input parameters on the inputDevice to each inputDevice respectively.
其中,S863可以理解为ruleDevice分别向各inputDevice订阅相关的资源。输入参数可以包括inputDevice上的资源。Among them, S863 can be understood as ruleDevice subscribing to related resources to each inputDevice respectively. Input parameters can include resources on inputDevice.
S865、在inputDevice订阅成功后后,可以向ruleDevice发送订阅成功的消息。S865. After the inputDevice is subscribed successfully, a message indicating that the subscription is successful can be sent to the ruleDevice.
S867、ruleDevice向云平台Cloud发送新创建的rule的ruleInput资源和ruleExpression资源,用于请求云平台根据上述信息发送订阅资源的通知消息发送条件。S867. The ruleDevice sends the ruleInput resource and the ruleExpression resource of the newly created rule to the cloud platform Cloud to request the cloud platform to send the notification message sending condition of the subscription resource according to the above information.
其中,在实施过程中,服务器可以先执行订阅inputDevice的步骤,再执行发送ruleInput资源和ruleExpression资源的步骤;或者,服务器可以先执行ruleInput资源和ruleExpression资源,再执行订阅inputDevice的步骤;或者,服务器订阅inputDevice的步骤,和发送ruleInput资源和ruleExpression资源的步骤可以同步执行。Among them, in the implementation process, the server can first perform the step of subscribing to inputDevice, and then perform the step of sending ruleInput resources and ruleExpression resources; or, the server can first perform the ruleInput resource and ruleExpression resources, and then perform the step of subscribing to inputDevice; or, the server subscribes The steps of inputDevice and the steps of sending ruleInput resources and ruleExpression resources can be executed synchronously.
S869、云平台分解该ruleExpression;根据ruleInput中指定的资源,分解ruleExpression为不同的子集合(或表达式)。其中,云平台可以根据分解的表达式,分别向不同的inputDevice设定对应资源的订阅通知条件。S869. The cloud platform decomposes the ruleExpression; according to the resource specified in the ruleInput, decomposes the ruleExpression into different sub-collections (or expressions). Among them, the cloud platform can set the subscription notification conditions of the corresponding resources to different inputDevices according to the decomposed expression.
例如,ruleExpression“A>17and B=false or C<16”,则分解为3个子集合:A>17;B=false;C<16。划分子集合时可以根据资源来划分,使得每个子集合仅代表一个资源。划分子集合时可以根据逻辑运算符来划分,使每个子集合中仅包含一个关系运算符。For example, ruleExpression "A>17 and B=false or C<16", it is decomposed into 3 sub-sets: A>17; B=false; C<16. The sub-collection can be divided according to resources, so that each sub-collection only represents one resource. The sub-collection can be divided according to logical operators, so that each sub-collection contains only one relational operator.
S871、云平台根据分解的各个子集合,分别向各对应的inputDevice发送已订阅的资源的订阅通知条件的请求。请求的内容可以与上述实施例中ruleDevice向inputDevice发送的内容相同。S871. The cloud platform sends a request for the subscription notification condition of the subscribed resource to each corresponding inputDevice according to the decomposed sub-sets. The requested content may be the same as the content sent by the ruleDevice to the inputDevice in the foregoing embodiment.
订阅通知条件的请求的内容可以如下:The content of the request for subscribing to notification conditions can be as follows:
To:A所属的资源的地址To: The address of the resource to which A belongs
CN:{CN:{
Oic.r.value.conditional(Oic.r.value.conditional(
Valuecondition:“>17”;)Valuecondition: ">17";)
}}
另外,每个目标资源都绑定一个oic.r.value.conditional资源,该资源用于限制目标资源发送订阅通知消息的条件。In addition, each target resource is bound to an oic.r.value.conditional resource, which is used to limit the conditions for the target resource to send subscription notification messages.
S873、inputDevice在将通知条件设定完成后,可以向云平台发送设定通知条件完成的消息。In S873, the inputDevice may send a message to the cloud platform that the setting of the notification condition is completed after the setting of the notification condition is completed.
S875、云平台可以将设定通知条件完成的消息发送给ruleDevice。其中,资源的订阅通知条件,可以是本申请实施例中触发条件。S875. The cloud platform may send a message that the set notification condition is completed to the ruleDevice. The subscription notification condition of the resource may be the trigger condition in the embodiment of this application.
云平台在所有的请求消息完成,并收到应答消息之后,通知ruleDevice设定订阅资源的通知条件的任务已经完成。After all the request messages are completed and the response message is received, the cloud platform notifies the ruleDevice that the task of setting the notification condition of the subscription resource has been completed.
S877、当订阅的第一资源的属性信息发生变化的时候,inputDevice首先判断oic.r.value.conditional资源的内容;如果订阅资源的值变化后满足了oic.r.value.conditional中设定的条件(即valueCondition的条件),则执行S879。如果订阅资源的值变化后不满足oic.r.value.conditional中设定的条件则不发送订阅通知消息。S877. When the attribute information of the subscribed first resource changes, the inputDevice first judges the content of the oic.r.value.conditional resource; if the value of the subscribed resource changes and meets the set in oic.r.value.conditional Condition (that is, the condition of valueCondition), execute S879. If the value of the subscription resource does not meet the conditions set in oic.r.value.conditional after the change, the subscription notification message will not be sent.
S879、触发订阅通知消息,并向服务器发送该订阅通知消息,在该订阅通知消息中携带或指示变化后的资源的值S879. Trigger the subscription notification message, and send the subscription notification message to the server, and the subscription notification message carries or indicates the value of the changed resource.
S881、ruleDevice收到上述订阅通知消息之后,计算ruleExpression,并进行ruleExpression的判定,在判断为true时,执行S883。其中,订阅通知消息可以是本申请实施例中的通知消息。S881. After receiving the above subscription notification message, ruleDevice calculates the ruleExpression and makes a determination of the ruleExpression. When the determination is true, execute S883. The subscription notification message may be the notification message in the embodiment of the present application.
S883、ruleDevice规则行为ruleAction。S883, ruleDevice rule action ruleAction.
基于前述的实施例,本申请实施例提供一种物联网中消息的传输装置,该装置包括所包括的各单元、以及各单元所包括的各模块,可以通过服务器/第一设备/云平台中的处理器来实现;当然也可通过逻辑电路实现;在实施的过程中,处理器可以为中央处理器(CPU)、微处理器(MPU)、数字信号处理器(DSP)或现场可编程门阵列(FPGA)等。Based on the foregoing embodiment, an embodiment of the present application provides a message transmission device in the Internet of Things. The device includes each unit included and each module included in each unit, which can be passed through the server/first device/cloud platform The processor can be implemented; of course, it can also be implemented by a logic circuit; in the implementation process, the processor can be a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP) or a field programmable gate Array (FPGA), etc.
图9为本申请实施例提供的一种物联网中消息的传输装置的组成结构示意图,如图9所示,该传输装置9可以设置在服务器中,包括:FIG. 9 is a schematic diagram of the composition structure of a message transmission device in the Internet of Things provided by an embodiment of the application. As shown in FIG. 9, the transmission device 9 may be set in a server and includes:
请求发送单元91,用于向第一设备发送第一请求,第一请求指示第一设备在第一资源的属性信息满足触发条件的情况下,向服务器发送通知消息,通知消息包括或指示第一资源的属性信息;The request sending unit 91 is configured to send a first request to the first device. The first request instructs the first device to send a notification message to the server when the attribute information of the first resource meets the trigger condition. The notification message includes or indicates the first request. The attribute information of the resource;
通知消息接收单元92,用于接收第一设备发送的通知消息。The notification message receiving unit 92 is configured to receive a notification message sent by the first device.
在一些实施例中,传输装置9还包括:资源订阅单元93,用于向第一设备发送订阅第一资源的请求;接收第一设备发送的第一消息,第一消息包括或指示第一资源订阅成功。In some embodiments, the transmission device 9 further includes: a resource subscription unit 93, configured to send a request for subscribing to the first resource to the first device; receive a first message sent by the first device, the first message including or indicating the first resource The subscription is successful.
在一些实施例中,传输装置9还包括:第二消息接收单元94,用于接收第一设备发送的第二消息,第二消息包括或指示第一设备将触发条件设定完成。In some embodiments, the transmission device 9 further includes: a second message receiving unit 94, configured to receive a second message sent by the first device, the second message includes or indicates that the first device completes the setting of the trigger condition.
在一些实施例中,传输装置9还包括:资源创建单元95,用于创建规则资源;规则资源包括约束条件,和与约束条件对应的N个输入资源;N为大于或等于1的正整数,N个输入资源包括第一资源。In some embodiments, the transmission device 9 further includes: a resource creation unit 95 for creating a rule resource; the rule resource includes constraint conditions and N input resources corresponding to the constraint conditions; N is a positive integer greater than or equal to 1, The N input resources include the first resource.
在一些实施例中,传输装置9还包括:触发条件确定单元96,用于如果N等于1,将约束条件确定为触发条件。In some embodiments, the transmission device 9 further includes: a trigger condition determining unit 96, configured to determine the constraint condition as a trigger condition if N is equal to 1.
在一些实施例中,传输装置9还包括:规则执行单元97,用于确定第一资源的属性信息满足约束条件,执行规则行为。In some embodiments, the transmission device 9 further includes: a rule execution unit 97, configured to determine that the attribute information of the first resource satisfies the constraint condition, and execute the rule behavior.
在一些实施例中,触发条件确定单元96,还用于如果N大于1,将约束条件分解为N个子条件;N个子条件与N个输入资源一一对应;In some embodiments, the trigger condition determining unit 96 is further configured to decompose the constraint condition into N sub-conditions if N is greater than 1, and the N sub-conditions correspond to the N input resources one-to-one;
从N个子条件中确定第一资源对应的子条件;Determine the sub-condition corresponding to the first resource from the N sub-conditions;
基于第一资源对应的子条件,确定触发条件。Determine the trigger condition based on the sub-condition corresponding to the first resource.
在一些实施例中,在一些实施例中,触发条件确定单元96,还用于将第一资源对应的子条件确定为触发条件。In some embodiments, in some embodiments, the trigger condition determining unit 96 is further configured to determine the sub-condition corresponding to the first resource as the trigger condition.
在一些实施例中,传输装置9还包括:规则执行单元97,用于确定第一资源的属性信息满足第一资源对应的子条件;获取N个输入资源中,除第一资源外的N-1个资源的属性信息;如果N-1个资源中每一资源的属性信息,均满足每一资源对应的子条件,执行规则行为。In some embodiments, the transmission device 9 further includes: a rule execution unit 97, configured to determine that the attribute information of the first resource satisfies the sub-conditions corresponding to the first resource; and obtain N input resources except for the first resource. The attribute information of 1 resource; if the attribute information of each resource in N-1 resources satisfies the sub-conditions corresponding to each resource, the rule behavior is executed.
在一些实施例中,规则资源还包括:与约束条件对应的M个行为资源,M为大于或等于1的正整数;规则执行单元97,还用于修改M个行为资源的属性信息;M为大于或等于1的正整数。In some embodiments, the rule resource further includes: M behavior resources corresponding to the constraint condition, where M is a positive integer greater than or equal to 1; the rule execution unit 97 is also used to modify the attribute information of the M behavior resources; M is A positive integer greater than or equal to 1.
在一些实施例中,第一资源的属性信息满足触发条件,包括以下之一:In some embodiments, the attribute information of the first resource satisfies the trigger condition, including one of the following:
第一资源的属性信息大于第一阈值;The attribute information of the first resource is greater than the first threshold;
在第一时长内,第一资源的属性信息大于第一阈值;Within the first time period, the attribute information of the first resource is greater than the first threshold;
第一资源的属性信息小于第二阈值;The attribute information of the first resource is less than the second threshold;
在第二时长内,第一资源的属性信息小于第二阈值;In the second time period, the attribute information of the first resource is less than the second threshold;
第一资源的属性信息在第三时长内发生变化,且变化的数值大于第一数值。The attribute information of the first resource changes within the third time period, and the changed value is greater than the first value.
图10为本申请实施例提供的再一种物联网中消息的传输装置的组成结构示意图,如图10所示,该传输装置10可以设置在服务器中,传输装置10包括:FIG. 10 is a schematic diagram of the composition structure of another message transmission device in the Internet of Things provided by an embodiment of the application. As shown in FIG. 10, the transmission device 10 may be set in a server, and the transmission device 10 includes:
第二消息接收单元101,用于接收云平台发送的第二消息,第二消息包括或指示第一设备将触发条件设定完成,触发条件用于在第一设备的第一资源的属性信息满足触发条件的情况下,触发第一设备向服务器发送通知消息,通知消息包括或指示第一资源的属性信息;The second message receiving unit 101 is configured to receive a second message sent by the cloud platform. The second message includes or instructs the first device to complete the setting of the trigger condition, and the trigger condition is used when the attribute information of the first resource of the first device satisfies In the case of a trigger condition, trigger the first device to send a notification message to the server, and the notification message includes or indicates the attribute information of the first resource;
通知消息接收单元102,用于接收第一设备发送的通知消息。The notification message receiving unit 102 is configured to receive a notification message sent by the first device.
在一些实施例中,传输装置10还包括:资源订阅单元103,用于向第一设备发送订阅第一资源的请求;接收第一设备发送的第一消息,第一消息包括或指示第一资源订阅成功。In some embodiments, the transmission apparatus 10 further includes: a resource subscription unit 103, configured to send a request for subscribing to the first resource to the first device; receive a first message sent by the first device, the first message including or indicating the first resource The subscription is successful.
在一些实施例中,传输装置10还包括:资源创建单元104,用于创建规则资源,规则资源包括约束条件,和与约束条件对应的N个输入资源;N为大于或等于1的正整数,N个输入资源包括第一资源。In some embodiments, the transmission device 10 further includes: a resource creation unit 104, configured to create a rule resource, the rule resource includes a constraint condition, and N input resources corresponding to the constraint condition; N is a positive integer greater than or equal to 1, The N input resources include the first resource.
在一些实施例中,传输装置10还包括:第三消息发送单元105,用于向云平台发送第三消息,第三消息包括或指示:约束条件和N个输入资源。In some embodiments, the transmission device 10 further includes: a third message sending unit 105, configured to send a third message to the cloud platform, the third message including or indicating: constraint conditions and N input resources.
在一些实施例中,传输装置10还包括:规则执行单元106,用于如果N等于1,确定第一资源的属性信息满足约束条件,执行规则行为。In some embodiments, the transmission device 10 further includes: a rule execution unit 106, configured to determine that the attribute information of the first resource satisfies the constraint condition if N is equal to 1, and execute the rule behavior.
在一些实施例中,规则执行单元106,还用于如果N大于1,确定第一资源的属性信息满足第一资源对应的子条件;获取N个输入资源中,除第一资源外的N-1个资源的属性信息;如果N-1个资源中每一资源的属性信息,均满足每一资源对应的子条件,执行规则行为。In some embodiments, the rule execution unit 106 is further configured to determine that the attribute information of the first resource satisfies the sub-conditions corresponding to the first resource if N is greater than 1, and obtain N- The attribute information of 1 resource; if the attribute information of each resource in N-1 resources satisfies the sub-conditions corresponding to each resource, the rule behavior is executed.
在一些实施例中,规则资源还包括:与约束条件对应的M个行为资源,M为大于或等于1的正整 数;规则执行单元106,还用于修改M个行为资源的属性信息。In some embodiments, the rule resource further includes: M behavior resources corresponding to the constraint condition, where M is a positive integer greater than or equal to 1; the rule execution unit 106 is also used to modify the attribute information of the M behavior resources.
在一些实施例中,第一资源的属性信息满足触发条件,包括以下之一:In some embodiments, the attribute information of the first resource satisfies the trigger condition, including one of the following:
第一资源的属性信息大于第一阈值;The attribute information of the first resource is greater than the first threshold;
在第一时长内,第一资源的属性信息大于第一阈值;Within the first time period, the attribute information of the first resource is greater than the first threshold;
第一资源的属性信息小于第二阈值;The attribute information of the first resource is less than the second threshold;
在第二时长内,第一资源的属性信息小于第二阈值;In the second time period, the attribute information of the first resource is less than the second threshold;
第一资源的属性信息在第三时长内发生变化,且变化的数值大于第一数值。The attribute information of the first resource changes within the third time period, and the changed value is greater than the first value.
图11为本申请实施例提供的又一种物联网中消息的传输装置的组成结构示意图,如图11所示,该传输装置11可以设置在云平台中,传输装置11包括:FIG. 11 is a schematic diagram of the composition structure of another message transmission device in the Internet of Things provided by an embodiment of the application. As shown in FIG. 11, the transmission device 11 may be set in a cloud platform, and the transmission device 11 includes:
请求发送单元111,用于向第一设备发送第一请求,第一请求指示第一设备在第一资源的属性信息满足触发条件的情况下,向服务器发送通知消息,通知消息包括或指示第一资源的属性信息。The request sending unit 111 is configured to send a first request to the first device. The first request instructs the first device to send a notification message to the server when the attribute information of the first resource meets the trigger condition. The notification message includes or indicates the first request. The attribute information of the resource.
在一些实施例中,传输装置11还包括:第二消息转发单元112,用于接收第一设备发送的第二消息,第二消息包括或指示第一设备将触发条件设定完成;向服务器发送第二消息。In some embodiments, the transmission device 11 further includes: a second message forwarding unit 112, configured to receive a second message sent by the first device, the second message including or indicating that the first device has set the trigger condition; sending to the server The second message.
在一些实施例中,传输装置11还包括:第三消息接收单元113,用于接收服务器发送的第三消息,第三消息包括或指示:约束条件和与约束条件对应的N个输入资源;N为大于或等于1的正整数,N个输入资源包括第一资源。In some embodiments, the transmission device 11 further includes: a third message receiving unit 113, configured to receive a third message sent by the server, the third message including or indicating: a constraint condition and N input resources corresponding to the constraint condition; N Is a positive integer greater than or equal to 1, and the N input resources include the first resource.
在一些实施例中,传输装置11还包括:触发条件确定单元114,用于如果N等于1,将约束条件确定为触发条件。In some embodiments, the transmission device 11 further includes: a trigger condition determining unit 114, configured to determine the constraint condition as a trigger condition if N is equal to 1.
在一些实施例中,触发条件确定单元114,还用于如果N大于1,将约束条件分解为N个子条件;N为大于或等于1的正整数,N个子条件与N个输入资源一一对应;从N个子条件中确定第一资源对应的子条件;基于第一资源对应的子条件,确定触发条件。In some embodiments, the trigger condition determining unit 114 is further configured to decompose the constraint condition into N sub-conditions if N is greater than 1, and N is a positive integer greater than or equal to 1, and the N sub-conditions correspond to N input resources one-to-one. ; Determine the sub-condition corresponding to the first resource from the N sub-conditions; determine the trigger condition based on the sub-condition corresponding to the first resource.
在一些实施例中,触发条件确定单元114,还用于将第一资源对应的子条件确定为触发条件。In some embodiments, the trigger condition determining unit 114 is further configured to determine the sub-condition corresponding to the first resource as the trigger condition.
在一些实施例中,第一资源的属性信息满足触发条件,包括以下之一:In some embodiments, the attribute information of the first resource satisfies the trigger condition, including one of the following:
第一资源的属性信息大于第一阈值;The attribute information of the first resource is greater than the first threshold;
在第一时长内,第一资源的属性信息大于第一阈值;Within the first time period, the attribute information of the first resource is greater than the first threshold;
第一资源的属性信息小于第二阈值;The attribute information of the first resource is less than the second threshold;
在第二时长内,第一资源的属性信息小于第二阈值;In the second time period, the attribute information of the first resource is less than the second threshold;
第一资源的属性信息在第三时长内发生变化,且变化的数值大于第一数值。The attribute information of the first resource changes within the third time period, and the changed value is greater than the first value.
图12为本申请另一实施例提供的一种物联网中消息的传输装置的组成结构示意图,如图12所示,该传输装置12可以设置在第一设备中,传输装置12包括:FIG. 12 is a schematic diagram of the composition structure of a message transmission device in the Internet of Things according to another embodiment of the application. As shown in FIG. 12, the transmission device 12 may be set in a first device, and the transmission device 12 includes:
监听单元121,用于监听第一资源的属性信息。The monitoring unit 121 is configured to monitor the attribute information of the first resource.
通知消息发送单元122,用于如果第一资源的属性信息满足触发条件,向服务器发送通知消息;通知消息包括或指示第一资源的属性信息。The notification message sending unit 122 is configured to send a notification message to the server if the attribute information of the first resource meets the trigger condition; the notification message includes or indicates the attribute information of the first resource.
在一些实施例中,传输装置12还包括:条件设定单元123,用于接收服务器发送的第一请求,第一请求指示第一设备在第一资源的属性信息满足触发条件的情况下,向服务器发送通知消息;向服务器发送第二消息,第二消息包括或指示第一设备将触发条件设定完成。In some embodiments, the transmission device 12 further includes: a condition setting unit 123, configured to receive a first request sent by the server, the first request instructing the first device to send the The server sends a notification message; and a second message is sent to the server. The second message includes or indicates that the first device completes the setting of the trigger condition.
在一些实施例中,条件设定单元123,还用于接收云平台发送的第一请求,第一请求指示第一设备在第一资源的属性信息满足触发条件的情况下,向服务器发送通知消息;向云平台发送第二消息,第二消息包括或指示第一设备将触发条件设定完成。In some embodiments, the condition setting unit 123 is further configured to receive a first request sent by the cloud platform, the first request instructing the first device to send a notification message to the server when the attribute information of the first resource meets the trigger condition ; Send a second message to the cloud platform, the second message includes or instructs the first device to complete the trigger condition setting.
在一些实施例中,传输装置12还包括:资源订阅单元124,用于接收服务器发送的订阅第一资源的请求;向服务器发送第一消息,第一消息包括或指示第一资源订阅成功。In some embodiments, the transmission device 12 further includes: a resource subscription unit 124, configured to receive a request for subscribing to the first resource sent by the server; and send a first message to the server, the first message including or indicating that the first resource subscription is successful.
在一些实施例中,第一资源的属性信息满足触发条件,包括以下之一:In some embodiments, the attribute information of the first resource satisfies the trigger condition, including one of the following:
第一资源的属性信息大于第一阈值;The attribute information of the first resource is greater than the first threshold;
在第一时长内,第一资源的属性信息大于第一阈值;Within the first time period, the attribute information of the first resource is greater than the first threshold;
第一资源的属性信息小于第二阈值;The attribute information of the first resource is less than the second threshold;
在第二时长内,第一资源的属性信息小于第二阈值;In the second time period, the attribute information of the first resource is less than the second threshold;
第一资源的属性信息在第三时长内发生变化,且变化的数值大于第一数值。The attribute information of the first resource changes within the third time period, and the changed value is greater than the first value.
以上装置实施例的描述,与上述方法实施例的描述是类似的,具有同方法实施例相似的有益效果。对于本申请装置实施例中未披露的技术细节,请参照本申请方法实施例的描述而理解。The description of the above device embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the device embodiments of the present application, please refer to the description of the method embodiments of the present application for understanding.
需要说明的是,本申请实施例中,如果以软件功能模块的形式实现上述的物联网中消息的传输方法, 并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对相关技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得服务器/第一设备/云平台执行本申请各个实施例方法的全部或部分。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read Only Memory,ROM)、磁碟或者光盘等各种可以存储程序代码的介质。这样,本申请实施例不限制于任何特定的硬件和软件结合。It should be noted that, in the embodiments of this application, if the above-mentioned message transmission method in the Internet of Things is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer readable storage medium. middle. Based on this understanding, the technical solutions of the embodiments of the present application can be embodied in the form of software products in essence or the parts that contribute to related technologies. The computer software products are stored in a storage medium and include several instructions to enable The server/first device/cloud platform executes all or part of the method in each embodiment of the present application. The aforementioned storage media include: U disk, mobile hard disk, read only memory (Read Only Memory, ROM), magnetic disk or optical disk and other media that can store program codes. In this way, the embodiments of the present application are not limited to any specific combination of hardware and software.
图13为本申请实施例提供的一种服务器的硬件实体示意图,如13所示,该服务器13的硬件实体包括:处理器131和存储器132,其中,存储器132存储有可在处理器131上运行的计算机程序,处理器131执行程序时实现图3~5、7和8a至8c中任一实施例的服务器执行的方法中的步骤。FIG. 13 is a schematic diagram of a hardware entity of a server provided by an embodiment of the application. As shown in 13, the hardware entity of the server 13 includes a processor 131 and a memory 132, where the memory 132 stores data that can run on the processor 131 When the processor 131 executes the program, the processor 131 implements the steps in the method executed by the server in any one of the embodiments of FIGS. 3 to 5, 7 and 8a to 8c.
图14为本申请实施例提供的一种云平台的硬件实体示意图,如14所示,该第一设备14的硬件实体包括:处理器141和存储器142,其中,存储器142存储有可在处理器141上运行的计算机程序,处理器141执行程序时实现图7或图8a至8c中所对应的实施例的云平台执行的方法中的步骤。14 is a schematic diagram of the hardware entity of a cloud platform provided by an embodiment of the application. As shown in FIG. 14, the hardware entity of the first device 14 includes a processor 141 and a memory 142. The computer program running on 141, when the processor 141 executes the program, implements the steps in the method executed by the cloud platform of the corresponding embodiment in FIG. 7 or FIGS. 8a to 8c.
图15为本申请实施例提供的一种第一设备的硬件实体示意图,如15所示,该第一设备15的硬件实体包括:处理器151和存储器152,其中,存储器152存储有可在处理器151上运行的计算机程序,处理器151执行程序时实现图4、5、7以及8a至8c中任一实施例的第一设备执行的方法中的步骤。15 is a schematic diagram of a hardware entity of a first device provided by an embodiment of the application. As shown in FIG. 15, the hardware entity of the first device 15 includes a processor 151 and a memory 152. The computer program running on the processor 151, when the processor 151 executes the program, implements the steps in the method executed by the first device in any one of the embodiments of FIGS. 4, 5, 7 and 8a to 8c.
本申请实施例提供一种计算机存储介质,计算机存储介质存储有一个或者多个程序,一个或者多个程序可被一个或者多个处理器执行,以实现上述方法中服务器执行的方法的步骤。The embodiment of the present application provides a computer storage medium, and the computer storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the method executed by the server in the foregoing method.
本申请实施例提供一种计算机存储介质,计算机存储介质存储有一个或者多个程序,一个或者多个程序可被一个或者多个处理器执行,以实现上述方法中云平台执行的方法的步骤。The embodiment of the present application provides a computer storage medium, and the computer storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the method executed by the cloud platform in the foregoing method.
本申请实施例提供一种计算机存储介质,计算机存储介质存储有一个或者多个程序,一个或者多个程序可被一个或者多个处理器执行,以实现上述方法中第一设备执行的方法的步骤。The embodiment of the present application provides a computer storage medium. The computer storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the method executed by the first device in the above method. .
图16是本申请实施例提供的一种芯片的结构示意图。图16所示的芯片16包括处理器161,处理器161可以从存储器中调用并运行计算机程序,以实现本申请实施例中服务器/云平台/第一设备执行的方法的步骤。FIG. 16 is a schematic structural diagram of a chip provided by an embodiment of the present application. The chip 16 shown in FIG. 16 includes a processor 161, and the processor 161 can call and run a computer program from the memory to implement the steps of the method executed by the server/cloud platform/first device in the embodiment of the present application.
可选地,如图16所示,芯片16还可以包括存储器162。其中,处理器161可以从存储器162中调用并运行计算机程序,以实现本申请实施例中服务器/云平台/第一设备执行的方法的步骤。Optionally, as shown in FIG. 16, the chip 16 may further include a memory 162. The processor 161 may call and run a computer program from the memory 162 to implement the steps of the method executed by the server/cloud platform/first device in the embodiment of the present application.
其中,存储器162可以是独立于处理器161的一个单独的器件,也可以集成在处理器161中。The memory 162 may be a separate device independent of the processor 161, or may be integrated in the processor 161.
可选地,该芯片16还可以包括输入接口163。其中,处理器161可以控制该输入接口163与其他设备或芯片进行通信,具体地,可以获取其他设备或芯片发送的信息或数据。Optionally, the chip 16 may further include an input interface 163. The processor 161 can control the input interface 163 to communicate with other devices or chips, and specifically, can obtain information or data sent by other devices or chips.
可选地,该芯片16还可以包括输出接口164。其中,处理器161可以控制该输出接口164与其他设备或芯片进行通信,具体地,可以向其他设备或芯片输出信息或数据。Optionally, the chip 16 may further include an output interface 164. The processor 161 can control the output interface 164 to communicate with other devices or chips, specifically, can output information or data to other devices or chips.
可选地,该芯片可应用于本申请实施例中的网络设备,并且该芯片可以实现本申请实施例的各个方法中由网络设备实现的相应流程,为了简洁,在此不再赘述。Optionally, the chip can be applied to the network device in the embodiment of the present application, and the chip can implement the corresponding process implemented by the network device in each method of the embodiment of the present application. For the sake of brevity, details are not described herein again.
可选地,该芯片可应用于本申请实施例中的服务器/云平台/第一设备,并且该芯片可以实现本申请实施例的各个方法中由服务器/云平台/第一设备实现的相应流程,为了简洁,在此不再赘述。Optionally, the chip can be applied to the server/cloud platform/first device in the embodiments of the present application, and the chip can implement the corresponding processes implemented by the server/cloud platform/first device in the various methods of the embodiments of the present application , For the sake of brevity, I won’t repeat it here.
应理解,本申请实施例提到的芯片还可以称为系统级芯片,系统芯片,芯片系统或片上系统芯片等。It should be understood that the chip mentioned in the embodiment of the present application may also be referred to as a system-level chip, a system-on-chip, a system-on-chip, or a system-on-chip, etc.
本申请实施例提供一种计算机程序产品,计算机程序产品包括计算机存储介质,计算机存储介质存储计算机程序代码,计算机程序代码包括能够由至少一个处理器执行的指令,当指令由至少一个处理器执行时实现上述方法中服务器/云平台/第一设备执行的方法的步骤。The embodiments of the present application provide a computer program product. The computer program product includes a computer storage medium, and the computer storage medium stores computer program code. The computer program code includes instructions that can be executed by at least one processor. The steps of the method executed by the server/cloud platform/first device in the above method are implemented.
可选地,该计算机程序产品可应用于本申请实施例中的服务器/云平台/第一设备,并且该计算机程序指令使得计算机执行本申请实施例的各个方法中由服务器/云平台/第一设备实现的相应流程,为了简洁,在此不再赘述。Optionally, the computer program product can be applied to the server/cloud platform/first device in the embodiments of the present application, and the computer program instructions cause the computer to execute each method in the embodiments of the present application by the server/cloud platform/first device. For the sake of brevity, the corresponding process implemented by the device will not be repeated here.
这里需要指出的是:以上存储介质和服务器/第一设备/云平台实施例的描述,与上述方法实施例的描述是类似的,具有同方法实施例相似的有益效果。对于本申请存储介质和服务器/第一设备/云平台实施例中未披露的技术细节,请参照本申请方法实施例的描述而理解。It should be pointed out here that the description of the above storage medium and server/first device/cloud platform embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the embodiments of the storage medium and the server/first device/cloud platform of this application, please refer to the description of the method embodiments of this application for understanding.
应理解,本申请实施例的处理器可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法实施例的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器可以是通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中 的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法的步骤。It should be understood that the processor of the embodiment of the present application may be an integrated circuit chip with signal processing capability. In the implementation process, the steps of the foregoing method embodiments may be completed by hardware integrated logic circuits in the processor or instructions in the form of software. The above-mentioned processor may be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (ASIC), a ready-made programmable gate array (Field Programmable Gate Array, FPGA) or other Programming logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps, and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like. The steps of the method disclosed in the embodiments of the present application may be directly embodied as being executed and completed by a hardware decoding processor, or executed and completed by a combination of hardware and software modules in the decoding processor. The software module can be located in a mature storage medium in the field, such as random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, registers. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
可以理解,本申请实施例中的存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DR RAM)。应注意,本文描述的系统和方法的存储器旨在包括但不限于这些和任意其它适合类型的存储器。It can be understood that the memory in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory. Among them, the non-volatile memory can be read-only memory (Read-Only Memory, ROM), programmable read-only memory (Programmable ROM, PROM), erasable programmable read-only memory (Erasable PROM, EPROM), and electrically available Erase programmable read-only memory (Electrically EPROM, EEPROM) or flash memory. The volatile memory may be a random access memory (Random Access Memory, RAM), which is used as an external cache. By way of exemplary but not restrictive description, many forms of RAM are available, such as static random access memory (Static RAM, SRAM), dynamic random access memory (Dynamic RAM, DRAM), synchronous dynamic random access memory (Synchronous DRAM, SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (Double Data Rate SDRAM, DDR SDRAM), Enhanced Synchronous Dynamic Random Access Memory (Enhanced SDRAM, ESDRAM), Synchronous Link Dynamic Random Access Memory (Synchlink DRAM, SLDRAM) ) And Direct Rambus RAM (DR RAM). It should be noted that the memories of the systems and methods described herein are intended to include, but are not limited to, these and any other suitable types of memories.
应理解,上述存储器为示例性但不是限制性说明,例如,本申请实施例中的存储器还可以是静态随机存取存储器(static RAM,SRAM)、动态随机存取存储器(dynamic RAM,DRAM)、同步动态随机存取存储器(synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(double data rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synch link DRAM,SLDRAM)以及直接内存总线随机存取存储器(Direct Rambus RAM,DR RAM)等等。也就是说,本申请实施例中的存储器旨在包括但不限于这些和任意其它适合类型的存储器。It should be understood that the foregoing memory is exemplary but not restrictive. For example, the memory in the embodiment of the present application may also be static random access memory (static RAM, SRAM), dynamic random access memory (dynamic RAM, DRAM), Synchronous dynamic random access memory (synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (double data rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (enhanced SDRAM, ESDRAM), synchronous connection Dynamic random access memory (synch link DRAM, SLDRAM) and direct memory bus random access memory (Direct Rambus RAM, DR RAM) and so on. That is to say, the memory in the embodiments of the present application is intended to include, but is not limited to, these and any other suitable types of memory.
这里需要指出的是:以上存储介质、计算机程序、芯片和设备实施例的描述,与上述方法实施例的描述是类似的,具有同方法实施例相似的有益效果。对于本申请存储介质和设备实施例中未披露的技术细节,请参照本申请方法实施例的描述而理解。It should be pointed out here that the description of the above storage medium, computer program, chip, and device embodiments is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the storage medium and device embodiments of this application, please refer to the description of the method embodiments of this application for understanding.
应理解,说明书通篇中提到的“一个实施例”或“一实施例”或“本申请实施例”或“前述实施例”意味着与实施例有关的特定特征、结构或特性包括在本申请的至少一个实施例中。因此,在整个说明书各处出现的“在一个实施例中”或“在一实施例中”未必一定指相同的实施例。此外,这些特定的特征、结构或特性可以任意适合的方式结合在一个或多个实施例中。应理解,在本申请的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。It should be understood that “one embodiment” or “an embodiment” or “an embodiment of the application” or “the foregoing embodiment” mentioned throughout the specification means that a specific feature, structure, or characteristic related to the embodiment is included in this In at least one embodiment of the application. Therefore, the appearances of "in one embodiment" or "in an embodiment" in various places throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in the various embodiments of the present application, the size of the sequence number of the above-mentioned processes does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not correspond to the embodiments of the present application. The implementation process constitutes any limitation. The serial numbers of the foregoing embodiments of the present application are for description only, and do not represent the superiority or inferiority of the embodiments.
在未做特殊说明的情况下,服务器/第一设备/云平台执行本申请实施例中的任一步骤,可以是服务器/第一设备/云平台的处理器执行该步骤。除非特殊说明,本申请实施例并不限定服务器/第一设备/云平台执行下述步骤的先后顺序。另外,不同实施例中对数据进行处理所采用的方式可以是相同的方法或不同的方法。还需说明的是,本申请实施例中的任一步骤是服务器/第一设备/云平台可以独立执行的,即服务器/第一设备/云平台执行下述实施例中的任一步骤时,可以不依赖于其它步骤的执行。Without special instructions, the server/first device/cloud platform executes any step in the embodiments of the present application, and the processor of the server/first device/cloud platform may execute the step. Unless otherwise specified, the embodiment of the present application does not limit the order in which the server/first device/cloud platform executes the following steps. In addition, the methods used to process data in different embodiments may be the same method or different methods. It should also be noted that any step in the embodiment of the present application can be independently executed by the server/first device/cloud platform, that is, when the server/first device/cloud platform executes any of the steps in the following embodiments, It does not depend on the execution of other steps.
在本申请所提供的几个实施例中,应该理解到,所揭露的服务器/第一设备/云平台和方法,可以通过其它的方式实现。以上所描述的服务器/第一设备/云平台实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,如:多个单元或组件可以结合,或可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的各组成部分相互之间的耦合、或直接耦合、或通信连接可以是通过一些接口,资源设备或单元的间接耦合或通信连接,可以是电性的、机械的或其它形式的。In the several embodiments provided in this application, it should be understood that the disclosed server/first device/cloud platform and method may be implemented in other ways. The server/first device/cloud platform embodiments described above are merely illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods, such as multiple Units or components can be combined, or can be integrated into another system, or some features can be omitted or not implemented. In addition, the coupling, or direct coupling, or communication connection between the components shown or discussed may be through some interfaces, indirect coupling or communication connection between resource devices or units, and may be electrical, mechanical, or other Form.
本申请所提供的几个方法实施例中所揭露的方法,在不冲突的情况下可以任意组合,得到新的方法实施例。The methods disclosed in the several method embodiments provided in this application can be combined arbitrarily without conflict to obtain new method embodiments.
本申请所提供的几个产品实施例中所揭露的特征,在不冲突的情况下可以任意组合,得到新的产品实施例。The features disclosed in the several product embodiments provided in this application can be combined arbitrarily without conflict to obtain new product embodiments.
本申请所提供的几个方法或服务器/第一设备/云平台实施例中所揭露的特征,在不冲突的情况下可以任意组合,得到新的方法实施例或服务器/第一设备/云平台实施例。The features disclosed in the several methods or server/first device/cloud platform embodiments provided in this application can be combined arbitrarily without conflict to obtain a new method embodiment or server/first device/cloud platform Examples.
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施 例的步骤;而前述的存储介质包括:移动存储资源设备、只读存储器(Read Only Memory,ROM)、磁碟或者光盘等各种可以存储程序代码的介质。Those of ordinary skill in the art can understand that all or part of the steps in the above method embodiments can be implemented by a program instructing relevant hardware. The foregoing program can be stored in a computer readable storage medium. When the program is executed, the execution includes The steps of the foregoing method embodiment; and the foregoing storage medium includes: various media capable of storing program codes, such as a removable storage resource device, a read only memory (Read Only Memory, ROM), a magnetic disk or an optical disc.
或者,本申请上述集成的单元如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对相关技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得服务器/第一设备/云平台执行本申请各个实施例所述方法的全部或部分。而前述的存储介质包括:移动存储资源设备、ROM、磁碟或者光盘等各种可以存储程序代码的介质。Alternatively, if the aforementioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it may also be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the embodiments of the present application can be embodied in the form of software products in essence or the parts that contribute to related technologies. The computer software products are stored in a storage medium and include several instructions to enable The server/first device/cloud platform executes all or part of the methods described in the various embodiments of the present application. The aforementioned storage media include: removable storage resource devices, ROMs, magnetic disks, or optical disks and other media that can store program codes.
在本申请实施例中,不同实施例中相同步骤和相同内容的说明,可以互相参照。在本申请实施例中,术语“并”不对步骤的先后顺序造成影响,例如,服务器/第一设备/云平台执行A,并执行B,可以是服务器/第一设备/云平台先执行A,再执行B,或者是服务器/第一设备/云平台先执行B,再执行A,或者是服务器/第一设备/云平台执行A的同时执行B。In the embodiments of the present application, descriptions of the same steps and the same content in different embodiments may be referred to each other. In the embodiment of the present application, the term “union” does not affect the sequence of steps. For example, the server/first device/cloud platform executes A and executes B. It may be that the server/first device/cloud platform executes A first. Then execute B, or the server/first device/cloud platform executes B first, and then executes A, or the server/first device/cloud platform executes A while executing B.
应需理解,本申请中一个消息中包括A,表示一个消息中具有A。一个消息中指示A,表示一个消息中包括A的标识,从而可以基于A的标识获取到A。应需理解,不同资源设备执行相同的步骤时,执行的方式可以相同。It should be understood that the inclusion of A in one message in this application means that there is A in one message. The indication of A in a message indicates that the identity of A is included in a message, so that A can be obtained based on the identity of A. It should be understood that when different resource devices execute the same step, the execution method may be the same.
应需理解,虽然图5和图8a至8c示出了物联网中消息的传输方法的完整的流程图,然而,在执行的过程中,资源设备可以不执行其中的某些步骤,只要资源设备执行的步骤使得方案完整即可。应需理解,图4、5、7以及8a至8c的信令交互中,虚线代表控制面信令,实现代表用户面信令。It should be understood that although Figures 5 and 8a to 8c show a complete flow chart of the message transmission method in the Internet of Things, however, in the process of execution, the resource device may not perform some of the steps, as long as the resource device The steps performed make the program complete. It should be understood that in the signaling interactions in Figures 4, 5, 7, and 8a to 8c, the dotted line represents control plane signaling, and implementation represents user plane signaling.
以上所述,仅为本申请的实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above are only the implementation manners of this application, but the protection scope of this application is not limited to this. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in this application. Covered in the scope of protection of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.
工业实用性Industrial applicability
本申请实施例提供了一种物联网中消息的传输方法、装置、服务器、设备及云平台,采用本申请中的物联网中消息的传输方案,第一设备在第一资源的属性信息满足触发条件的情况下,服务器才能接收到第一设备发送的通知消息,从而服务器接收的通知消息的数量少,服务器的计算资源低。The embodiments of the application provide a method, device, server, device and cloud platform for message transmission in the Internet of Things. The message transmission scheme in the Internet of Things in this application is adopted, and the attribute information of the first device in the first resource satisfies the trigger Under conditions, the server can receive the notification message sent by the first device, so that the number of notification messages received by the server is small, and the computing resources of the server are low.

Claims (41)

  1. 一种物联网中消息的传输方法,包括:A method for transmitting messages in the Internet of Things, including:
    服务器向第一设备发送第一请求,所述第一请求指示所述第一设备在第一资源的属性信息满足触发条件的情况下,向所述服务器发送通知消息,所述通知消息包括或指示所述第一资源的属性信息;The server sends a first request to the first device, the first request instructs the first device to send a notification message to the server when the attribute information of the first resource meets the trigger condition, and the notification message includes or indicates Attribute information of the first resource;
    接收所述第一设备发送的所述通知消息。Receiving the notification message sent by the first device.
  2. 根据权利要求1所述的方法,其中,所述服务器向第一设备发送第一请求之前,还包括:The method according to claim 1, wherein before the server sends the first request to the first device, the method further comprises:
    向所述第一设备发送订阅所述第一资源的请求;Sending a request for subscribing to the first resource to the first device;
    接收所述第一设备发送的第一消息,所述第一消息包括或指示所述第一资源订阅成功。Receiving a first message sent by the first device, where the first message includes or indicates that the first resource subscription is successful.
  3. 根据权利要求1或2所述的方法,其中,所述服务器向第一设备发送第一请求之后,还包括:The method according to claim 1 or 2, wherein after the server sends the first request to the first device, the method further comprises:
    接收所述第一设备发送的第二消息,所述第二消息包括或指示所述第一设备将所述触发条件设定完成。Receiving a second message sent by the first device, where the second message includes or instructs the first device to complete the setting of the trigger condition.
  4. 根据权利要求1至3任一项所述的方法,其中,所述服务器向第一设备发送第一请求之前,还包括:The method according to any one of claims 1 to 3, wherein before the server sends the first request to the first device, the method further comprises:
    创建规则资源;所述规则资源包括约束条件,和与所述约束条件对应的N个输入资源;N为大于或等于1的正整数,所述N个输入资源包括所述第一资源。Create a rule resource; the rule resource includes a constraint condition and N input resources corresponding to the constraint condition; N is a positive integer greater than or equal to 1, and the N input resources include the first resource.
  5. 根据权利要求4所述的方法,其中,所述服务器向第一设备发送第一请求之前,还包括:The method according to claim 4, wherein before the server sends the first request to the first device, the method further comprises:
    如果N等于1,将所述约束条件确定为所述触发条件。If N is equal to 1, the constraint condition is determined as the trigger condition.
  6. 根据权利要求5所述的方法,其中,所述接收所述第一设备发送的所述通知消息之后,还包括:The method according to claim 5, wherein after the receiving the notification message sent by the first device, the method further comprises:
    确定所述第一资源的属性信息满足所述约束条件,执行规则行为。It is determined that the attribute information of the first resource satisfies the constraint condition, and the rule behavior is executed.
  7. 根据权利要求4所述的方法,其中,所述服务器向第一设备发送第一请求之前,还包括:The method according to claim 4, wherein before the server sends the first request to the first device, the method further comprises:
    如果N大于1,将所述约束条件分解为N个子条件;所述N个子条件与所述N个输入资源一一对应;If N is greater than 1, decompose the constraint condition into N sub-conditions; the N sub-conditions have a one-to-one correspondence with the N input resources;
    从所述N个子条件中确定所述第一资源对应的子条件;Determine the sub-condition corresponding to the first resource from the N sub-conditions;
    基于所述第一资源对应的子条件,确定所述触发条件。The trigger condition is determined based on the sub-condition corresponding to the first resource.
  8. 根据权利要求7所述的方法,其中,所述基于所述第一资源对应的子条件,确定所述触发条件,包括:将所述第一资源对应的子条件确定为所述触发条件。8. The method according to claim 7, wherein the determining the trigger condition based on the sub-condition corresponding to the first resource comprises: determining the sub-condition corresponding to the first resource as the trigger condition.
  9. 根据权利要求8所述的方法,其中,所述接收所述第一设备发送的所述通知消息之后,还包括:确定所述第一资源的属性信息满足所述第一资源对应的子条件;The method according to claim 8, wherein after the receiving the notification message sent by the first device, the method further comprises: determining that the attribute information of the first resource satisfies the sub-condition corresponding to the first resource;
    获取所述N个输入资源中,除所述第一资源外的N-1个资源的属性信息;Acquiring attribute information of N-1 resources other than the first resource among the N input resources;
    如果所述N-1个资源中每一资源的属性信息,均满足所述每一资源对应的子条件,执行规则行为。If the attribute information of each resource in the N-1 resources satisfies the sub-conditions corresponding to each resource, the rule behavior is executed.
  10. 根据权利要求6或9所述的方法,其中,所述规则资源还包括:与所述约束条件对应的M个行为资源,M为大于或等于1的正整数;所述执行规则行为,包括:The method according to claim 6 or 9, wherein the rule resource further comprises: M behavior resources corresponding to the constraint condition, where M is a positive integer greater than or equal to 1, and the execution of the rule behavior includes:
    修改所述M个行为资源的属性信息。Modify the attribute information of the M behavior resources.
  11. 根据权利要求1至10任一项所述的方法,其中,所述第一资源的属性信息满足触发条件,包括以下之一:The method according to any one of claims 1 to 10, wherein the attribute information of the first resource satisfies a trigger condition and includes one of the following:
    所述第一资源的属性信息大于第一阈值;The attribute information of the first resource is greater than a first threshold;
    在第一时长内,所述第一资源的属性信息大于所述第一阈值;Within the first time period, the attribute information of the first resource is greater than the first threshold;
    所述第一资源的属性信息小于第二阈值;The attribute information of the first resource is less than a second threshold;
    在第二时长内,所述第一资源的属性信息小于所述第二阈值;In the second time period, the attribute information of the first resource is less than the second threshold;
    所述第一资源的属性信息在第三时长内发生变化,且变化的数值大于第一数值。The attribute information of the first resource changes within the third time period, and the changed value is greater than the first value.
  12. 一种物联网中消息的传输方法,包括:A method for transmitting messages in the Internet of Things, including:
    服务器接收云平台发送的第二消息,所述第二消息包括或指示第一设备将触发条件设定完成,所述触发条件用于在所述第一设备的第一资源的属性信息满足所述触发条件的情况下,触发所述第一设备向所述服务器发送通知消息,所述通知消息包括或指示所述第一资源的属性信息;The server receives a second message sent by the cloud platform, where the second message includes or instructs the first device to complete the setting of a trigger condition, and the trigger condition is used when the attribute information of the first resource of the first device satisfies the In the case of a trigger condition, trigger the first device to send a notification message to the server, where the notification message includes or indicates the attribute information of the first resource;
    接收所述第一设备发送的所述通知消息。Receiving the notification message sent by the first device.
  13. 根据权利要求12所述的方法,其中,所述服务器接收云平台发送的第二消息之前,还包括:The method according to claim 12, wherein before the server receives the second message sent by the cloud platform, the method further comprises:
    向所述第一设备发送订阅所述第一资源的请求;Sending a request for subscribing to the first resource to the first device;
    接收所述第一设备发送的第一消息,所述第一消息包括或指示所述第一资源订阅成功。Receiving a first message sent by the first device, where the first message includes or indicates that the first resource subscription is successful.
  14. 根据权利要求12或13所述的方法,其中,所述服务器接收云平台发送的第二消息之前,还包括:The method according to claim 12 or 13, wherein before the server receives the second message sent by the cloud platform, the method further comprises:
    创建规则资源,所述规则资源包括约束条件,和与所述约束条件对应的N个输入资源;N为大于或等于1的正整数,所述N个输入资源包括所述第一资源。A rule resource is created. The rule resource includes a constraint condition and N input resources corresponding to the constraint condition; N is a positive integer greater than or equal to 1, and the N input resources include the first resource.
  15. 根据权利要求14所述的方法,其中,所述服务器接收云平台发送的第二消息之前,还包括:The method according to claim 14, wherein before the server receives the second message sent by the cloud platform, the method further comprises:
    向所述云平台发送第三消息,所述第三消息包括或指示:所述约束条件和所述N个输入资源。A third message is sent to the cloud platform, where the third message includes or indicates: the constraint condition and the N input resources.
  16. 根据权利要求14或15所述的方法,其中,所述接收所述第一设备发送的所述通知消息之后,还包括:The method according to claim 14 or 15, wherein after the receiving the notification message sent by the first device, the method further comprises:
    如果N等于1,确定所述第一资源的属性信息满足所述约束条件,执行规则行为。If N is equal to 1, it is determined that the attribute information of the first resource satisfies the constraint condition, and the rule behavior is executed.
  17. 根据权利要求14或15所述的方法,其中,所述接收所述第一设备发送的所述通知消息之后,还包括:The method according to claim 14 or 15, wherein after the receiving the notification message sent by the first device, the method further comprises:
    如果N大于1,确定所述第一资源的属性信息满足所述第一资源对应的子条件;If N is greater than 1, it is determined that the attribute information of the first resource satisfies the sub-conditions corresponding to the first resource;
    获取所述N个输入资源中,除所述第一资源外的N-1个资源的属性信息;Acquiring attribute information of N-1 resources other than the first resource among the N input resources;
    如果所述N-1个资源中每一资源的属性信息,均满足所述每一资源对应的子条件,执行规则行为。If the attribute information of each resource in the N-1 resources satisfies the sub-conditions corresponding to each resource, the rule behavior is executed.
  18. 根据权利要求16或17所述的方法,其中,所述规则资源还包括:与所述约束条件对应的M个行为资源,M为大于或等于1的正整数;所述执行规则行为,包括:The method according to claim 16 or 17, wherein the rule resource further comprises: M behavior resources corresponding to the constraint condition, where M is a positive integer greater than or equal to 1, and the execution of the rule behavior includes:
    修改所述M个行为资源的属性信息。Modify the attribute information of the M behavior resources.
  19. 根据权利要求12至18任一项所述的方法,其中,所述第一资源的属性信息满足所述触发条件,包括以下之一:The method according to any one of claims 12 to 18, wherein the attribute information of the first resource satisfies the trigger condition and includes one of the following:
    所述第一资源的属性信息大于第一阈值;The attribute information of the first resource is greater than a first threshold;
    在第一时长内,所述第一资源的属性信息大于所述第一阈值;Within the first time period, the attribute information of the first resource is greater than the first threshold;
    所述第一资源的属性信息小于第二阈值;The attribute information of the first resource is less than a second threshold;
    在第二时长内,所述第一资源的属性信息小于所述第二阈值;In the second time period, the attribute information of the first resource is less than the second threshold;
    所述第一资源的属性信息在第三时长内发生变化,且变化的数值大于第一数值。The attribute information of the first resource changes within the third time period, and the changed value is greater than the first value.
  20. 一种物联网中消息的传输方法,包括:A method for transmitting messages in the Internet of Things, including:
    云平台向第一设备发送第一请求,所述第一请求指示所述第一设备在第一资源的属性信息满足触发条件的情况下,向所述服务器发送通知消息,所述通知消息包括或指示所述第一资源的属性信息。The cloud platform sends a first request to the first device, the first request instructing the first device to send a notification message to the server when the attribute information of the first resource meets the trigger condition, and the notification message includes or Indicates the attribute information of the first resource.
  21. 根据权利要求20所述的方法,其中,所述云平台向第一设备发送第一请求之后,还包括:The method according to claim 20, wherein after the cloud platform sends the first request to the first device, the method further comprises:
    接收所述第一设备发送的第二消息,所述第二消息包括或指示所述第一设备将所述触发条件设定完成;Receiving a second message sent by the first device, where the second message includes or instructs the first device to complete the setting of the trigger condition;
    向所述服务器发送所述第二消息。Sending the second message to the server.
  22. 根据权利要求20或21所述的方法,其中,所述云平台向第一设备发送第一请求之前,还包括:The method according to claim 20 or 21, wherein before the cloud platform sends the first request to the first device, the method further comprises:
    接收所述服务器发送的第三消息,所述第三消息包括或指示:约束条件和与所述约束条件对应的N个输入资源;N为大于或等于1的正整数,所述N个输入资源包括所述第一资源。Receive a third message sent by the server, where the third message includes or indicates: a constraint condition and N input resources corresponding to the constraint condition; N is a positive integer greater than or equal to 1, and the N input resources Including the first resource.
  23. 根据权利要求22所述的方法,其中,所述云平台向第一设备发送第一请求之前,还包括:The method according to claim 22, wherein before the cloud platform sends the first request to the first device, the method further comprises:
    如果N等于1,将所述约束条件确定为所述触发条件。If N is equal to 1, the constraint condition is determined as the trigger condition.
  24. 根据权利要求22所述的方法,其中,所述云平台向第一设备发送第一请求之前,还包括:The method according to claim 22, wherein before the cloud platform sends the first request to the first device, the method further comprises:
    如果N大于1,将所述约束条件分解为N个子条件;所述N个子条件与所述N个输入资源一一对应;If N is greater than 1, decompose the constraint condition into N sub-conditions; the N sub-conditions have a one-to-one correspondence with the N input resources;
    从所述N个子条件中确定所述第一资源对应的子条件;Determine the sub-condition corresponding to the first resource from the N sub-conditions;
    基于所述第一资源对应的子条件,确定所述触发条件。The trigger condition is determined based on the sub-condition corresponding to the first resource.
  25. 根据权利要求24所述的方法,其中,所述基于所述第一资源对应的子条件,确定所述触发条件,包括:The method according to claim 24, wherein the determining the trigger condition based on the sub-condition corresponding to the first resource comprises:
    将所述第一资源对应的子条件确定为所述触发条件。The sub-condition corresponding to the first resource is determined as the trigger condition.
  26. 根据权利要求20至25任一项所述的方法,其中,所述第一资源的属性信息满足触发条件, 包括以下之一:The method according to any one of claims 20 to 25, wherein the attribute information of the first resource that satisfies a trigger condition includes one of the following:
    所述第一资源的属性信息大于第一阈值;The attribute information of the first resource is greater than a first threshold;
    在第一时长内,所述第一资源的属性信息大于所述第一阈值;Within the first time period, the attribute information of the first resource is greater than the first threshold;
    所述第一资源的属性信息小于第二阈值;The attribute information of the first resource is less than a second threshold;
    在第二时长内,所述第一资源的属性信息小于所述第二阈值;In the second time period, the attribute information of the first resource is less than the second threshold;
    所述第一资源的属性信息在第三时长内发生变化,且变化的数值大于第一数值。The attribute information of the first resource changes within the third time period, and the changed value is greater than the first value.
  27. 一种物联网中消息的传输方法,包括:A method for transmitting messages in the Internet of Things, including:
    第一设备监听第一资源的属性信息;The first device monitors the attribute information of the first resource;
    如果所述第一资源的属性信息满足触发条件,向服务器发送通知消息;所述通知消息包括或指示所述第一资源的属性信息。If the attribute information of the first resource satisfies the trigger condition, a notification message is sent to the server; the notification message includes or indicates the attribute information of the first resource.
  28. 根据权利要求27所述的方法,其中,所述第一设备监听第一资源的属性信息之前,还包括:The method according to claim 27, wherein before the first device monitors the attribute information of the first resource, the method further comprises:
    接收所述服务器发送的第一请求,所述第一请求指示所述第一设备在所述第一资源的属性信息满足所述触发条件的情况下,向所述服务器发送所述通知消息;Receiving a first request sent by the server, where the first request instructs the first device to send the notification message to the server when the attribute information of the first resource satisfies the trigger condition;
    向所述服务器发送第二消息,所述第二消息包括或指示所述第一设备将所述触发条件设定完成。Sending a second message to the server, where the second message includes or instructs the first device to complete the setting of the trigger condition.
  29. 根据权利要求27所述的方法,其中,所述第一设备监听第一资源的属性信息之前,还包括:The method according to claim 27, wherein before the first device monitors the attribute information of the first resource, the method further comprises:
    接收云平台发送的第一请求,所述第一请求指示所述第一设备在所述第一资源的属性信息满足所述触发条件的情况下,向所述服务器发送所述通知消息;Receiving a first request sent by a cloud platform, the first request instructing the first device to send the notification message to the server when the attribute information of the first resource satisfies the trigger condition;
    向所述云平台发送第二消息,所述第二消息包括或指示所述第一设备将所述触发条件设定完成。Send a second message to the cloud platform, where the second message includes or instructs the first device to complete the setting of the trigger condition.
  30. 根据权利要求27至29任一项所述的方法,其中,所述第一设备监听第一资源的属性信息之前,包括:The method according to any one of claims 27 to 29, wherein before the first device monitors the attribute information of the first resource, the method comprises:
    接收所述服务器发送的订阅所述第一资源的请求;Receiving a request for subscribing to the first resource sent by the server;
    向所述服务器发送第一消息,所述第一消息包括或指示所述第一资源订阅成功。Send a first message to the server, where the first message includes or indicates that the first resource subscription is successful.
  31. 根据权利要求27至30任一项所述的方法,其中,所述第一资源的属性信息满足所述触发条件,包括以下之一:The method according to any one of claims 27 to 30, wherein the attribute information of the first resource satisfies the trigger condition and includes one of the following:
    所述第一资源的属性信息大于第一阈值;The attribute information of the first resource is greater than a first threshold;
    在第一时长内,所述第一资源的属性信息大于所述第一阈值;Within the first time period, the attribute information of the first resource is greater than the first threshold;
    所述第一资源的属性信息小于第二阈值;The attribute information of the first resource is less than a second threshold;
    在第二时长内,所述第一资源的属性信息小于所述第二阈值;In the second time period, the attribute information of the first resource is less than the second threshold;
    所述第一资源的属性信息在第三时长内发生变化,且变化的数值大于第一数值。The attribute information of the first resource changes within the third time period, and the changed value is greater than the first value.
  32. 一种物联网中消息的传输装置,包括:A message transmission device in the Internet of Things, including:
    请求发送单元,用于向第一设备发送第一请求,所述第一请求指示所述第一设备在第一资源的属性信息满足触发条件的情况下,向所述服务器发送通知消息,所述通知消息包括或指示所述第一资源的属性信息;The request sending unit is configured to send a first request to a first device, where the first request instructs the first device to send a notification message to the server when the attribute information of the first resource meets a trigger condition, and The notification message includes or indicates the attribute information of the first resource;
    通知消息接收单元,用于接收所述第一设备发送的所述通知消息。The notification message receiving unit is configured to receive the notification message sent by the first device.
  33. 一种物联网中消息的传输装置,包括:A message transmission device in the Internet of Things, including:
    第二消息接收单元,用于接收云平台发送的第二消息,所述第二消息包括或指示第一设备将触发条件设定完成,所述触发条件用于在所述第一设备的第一资源的属性信息满足所述触发条件的情况下,触发所述第一设备向所述服务器发送通知消息,所述通知消息包括或指示所述第一资源的属性信息;The second message receiving unit is configured to receive a second message sent by the cloud platform, the second message including or instructing the first device to complete the setting of the trigger condition, and the trigger condition is used in the first device of the first device. When the attribute information of the resource satisfies the trigger condition, trigger the first device to send a notification message to the server, where the notification message includes or indicates the attribute information of the first resource;
    通知消息接收单元,用于接收所述第一设备发送的所述通知消息。The notification message receiving unit is configured to receive the notification message sent by the first device.
  34. 一种物联网中消息的传输装置,包括:A message transmission device in the Internet of Things, including:
    请求发送单元,用于向第一设备发送第一请求,所述第一请求指示所述第一设备在第一资源的属性信息满足触发条件的情况下,向所述服务器发送通知消息,所述通知消息包括或指示所述第一资源的属性信息。The request sending unit is configured to send a first request to a first device, where the first request instructs the first device to send a notification message to the server when the attribute information of the first resource meets a trigger condition, and The notification message includes or indicates the attribute information of the first resource.
  35. 一种物联网中消息的传输装置,包括:A message transmission device in the Internet of Things, including:
    监听单元,用于监听第一资源的属性信息;The monitoring unit is used to monitor the attribute information of the first resource;
    通知消息发送单元,用于如果所述第一资源的属性信息满足触发条件,向服务器发送通知消息;所述通知消息包括或指示所述第一资源的属性信息。The notification message sending unit is configured to send a notification message to the server if the attribute information of the first resource satisfies the trigger condition; the notification message includes or indicates the attribute information of the first resource.
  36. 一种服务器,包括:存储器和处理器,A server, including: memory and processor,
    所述存储器存储有可在处理器上运行的计算机程序,The memory stores a computer program that can run on the processor,
    所述处理器执行所述程序时实现权利要求1至11任一项所述方法中的步骤,或者,所述处理器 执行所述程序时实现权利要求12至19任一项所述方法中的步骤。When the processor executes the program, the steps in the method described in any one of claims 1 to 11 are implemented, or, when the processor executes the program, the steps in the method described in any one of claims 12 to 19 are implemented. step.
  37. 一种云平台,包括:存储器和处理器,A cloud platform, including: memory and processor,
    所述存储器存储有可在处理器上运行的计算机程序,The memory stores a computer program that can run on the processor,
    所述处理器执行所述程序时实现权利要求20至26任一项所述方法中的步骤。When the processor executes the program, the steps in the method according to any one of claims 20 to 26 are implemented.
  38. 一种第一设备,包括:存储器和处理器,A first device, including: a memory and a processor,
    所述存储器存储有可在处理器上运行的计算机程序,The memory stores a computer program that can run on the processor,
    所述处理器执行所述程序时实现权利要求27至31任一项所述方法中的步骤。When the processor executes the program, the steps in the method according to any one of claims 27 to 31 are implemented.
  39. 一种计算机存储介质,所述计算机存储介质存储有一个或者多个程序,所述一个或者多个程序可被一个或者多个处理器执行,以实现权利要求1至11任一项所述方法中的步骤;A computer storage medium that stores one or more programs, and the one or more programs can be executed by one or more processors to implement the method described in any one of claims 1 to 11 A step of;
    或者,所述一个或者多个程序可被一个或者多个处理器执行,以实现权利要求12至19任一项所述方法中的步骤;Alternatively, the one or more programs may be executed by one or more processors to implement the steps in the method according to any one of claims 12 to 19;
    或者,所述一个或者多个程序可被一个或者多个处理器执行,以实现权利要求20至26任一项所述方法中的步骤;Alternatively, the one or more programs may be executed by one or more processors to implement the steps in the method according to any one of claims 20 to 26;
    或者,所述一个或者多个程序可被一个或者多个处理器执行,以实现权利要求27至31任一项所述方法中的步骤。Alternatively, the one or more programs may be executed by one or more processors to implement the steps in the method of any one of claims 27 to 31.
  40. 一种芯片,包括:处理器,用于从存储器中调用并运行计算机程序,使得安装有所述芯片的设备执行如权利要求1至11任一项所述方法中的步骤;A chip comprising: a processor, configured to call and run a computer program from a memory, so that a device installed with the chip executes the steps in the method according to any one of claims 1 to 11;
    或者,用于从存储器中调用并运行计算机程序,使得安装有所述芯片的设备执行如权利要求12至19任一项所述方法中的步骤;Or, used to call and run a computer program from the memory, so that the device installed with the chip executes the steps in the method according to any one of claims 12 to 19;
    或者,用于从存储器中调用并运行计算机程序,使得安装有所述芯片的设备执行如权利要求20至26任一项所述方法中的步骤;Or, used to call and run a computer program from the memory, so that the device installed with the chip executes the steps in the method according to any one of claims 20 to 26;
    或者,用于从存储器中调用并运行计算机程序,使得安装有所述芯片的设备执行如权利要求27至31任一项所述方法中的步骤。Or, it is used to call and run a computer program from the memory, so that the device installed with the chip executes the steps in the method according to any one of claims 27 to 31.
  41. 一种计算机程序产品,所述计算机程序产品包括计算机存储介质,所述计算机存储介质存储计算机程序代码,所述计算机程序代码包括能够由至少一个处理器执行的指令,当所述指令由所述至少一个处理器执行时实现权利要求1至11中任一项所述的方法中的步骤;A computer program product includes a computer storage medium, the computer storage medium stores computer program code, and the computer program code includes instructions that can be executed by at least one processor. A processor implements the steps in the method of any one of claims 1 to 11 when executed;
    或者,当所述指令由所述至少一个处理器执行时实现权利要求12至19中任一项所述的方法中的步骤;Or, when the instructions are executed by the at least one processor, the steps in the method according to any one of claims 12 to 19 are implemented;
    或者,当所述指令由所述至少一个处理器执行时实现权利要求20至26中任一项所述的方法中的步骤;Or, when the instructions are executed by the at least one processor, the steps in the method according to any one of claims 20 to 26 are implemented;
    或者,当所述指令由所述至少一个处理器执行时实现权利要求27至31中任一项所述的方法中的步骤。Or, when the instructions are executed by the at least one processor, the steps in the method according to any one of claims 27 to 31 are implemented.
PCT/CN2020/085739 2020-04-20 2020-04-20 Method and apparatus for transmitting messages in internet of things, server, device and cloud platform WO2021212293A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2020/085739 WO2021212293A1 (en) 2020-04-20 2020-04-20 Method and apparatus for transmitting messages in internet of things, server, device and cloud platform
CN202080098894.6A CN115362666A (en) 2020-04-20 2020-04-20 Message transmission method and device in Internet of things, server, equipment and cloud platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/085739 WO2021212293A1 (en) 2020-04-20 2020-04-20 Method and apparatus for transmitting messages in internet of things, server, device and cloud platform

Publications (1)

Publication Number Publication Date
WO2021212293A1 true WO2021212293A1 (en) 2021-10-28

Family

ID=78270967

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/085739 WO2021212293A1 (en) 2020-04-20 2020-04-20 Method and apparatus for transmitting messages in internet of things, server, device and cloud platform

Country Status (2)

Country Link
CN (1) CN115362666A (en)
WO (1) WO2021212293A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105072144A (en) * 2015-06-30 2015-11-18 青岛海尔智能家电科技有限公司 Method and device for transmitting server-side notification message
CN107682229A (en) * 2017-11-03 2018-02-09 云南合续环境科技有限公司 A kind of monitoring method of equipment, monitoring device and system
US20190222433A1 (en) * 2015-02-24 2019-07-18 BrainofT Inc. Automatically learning and controlling connected devices
CN110247786A (en) * 2018-03-08 2019-09-17 佛山市顺德区美的电热电器制造有限公司 Household appliance, Cloud Server, client, control method and storage medium based on NB-IoT
CN110266529A (en) * 2019-06-14 2019-09-20 苏州凌瑞智能技术有限公司 Extensive individualized intelligent service customization method based on Internet of Things

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190222433A1 (en) * 2015-02-24 2019-07-18 BrainofT Inc. Automatically learning and controlling connected devices
CN105072144A (en) * 2015-06-30 2015-11-18 青岛海尔智能家电科技有限公司 Method and device for transmitting server-side notification message
CN107682229A (en) * 2017-11-03 2018-02-09 云南合续环境科技有限公司 A kind of monitoring method of equipment, monitoring device and system
CN110247786A (en) * 2018-03-08 2019-09-17 佛山市顺德区美的电热电器制造有限公司 Household appliance, Cloud Server, client, control method and storage medium based on NB-IoT
CN110266529A (en) * 2019-06-14 2019-09-20 苏州凌瑞智能技术有限公司 Extensive individualized intelligent service customization method based on Internet of Things

Also Published As

Publication number Publication date
CN115362666A (en) 2022-11-18

Similar Documents

Publication Publication Date Title
US11805441B2 (en) Method and system for group communication, group server, and group member device
US11770317B2 (en) Internet of Things event management systems and methods
JP6255422B2 (en) Information modeling for the future Internet of Things
CN109040200B (en) Access method and device of Internet of things equipment
CN111201764B (en) Method and server device for providing platform service of Internet of things
US20150135259A1 (en) Proxy device for a network of devices
US11805166B2 (en) Enhanced M2M content management based on interest
EP2945340B1 (en) Operation trigger method and device for machine-to-machine communications
CN110650203B (en) Data transmission method, device and system, computer storage medium and electronic equipment
US10609534B2 (en) Feed service engine
US10148739B2 (en) M2M data querying and invoking methods, querying and invoking devices, and system
CA3043127C (en) Data prefetching method, apparatus, and system
CN115098412B (en) Peripheral access controller, data access device and corresponding method, medium and chip
CN111953648A (en) Data processing method and device based on block chain prediction machine and electronic equipment
US20220272171A1 (en) Method and apparatus for subscribing to resource
WO2021212293A1 (en) Method and apparatus for transmitting messages in internet of things, server, device and cloud platform
CN110784336A (en) Multi-device intelligent timing delay scene setting method and system based on Internet of things
IL272881B2 (en) Method and device for wireless communications
Ting et al. A comparison and evaluation of different BLE connection methods for wearable devices
US20230045914A1 (en) Method and apparatus for controlling device in internet of things, and gateway device and storage medium
US20210176186A1 (en) Resource processing method and system, storage medium and electronic device
KR20140094298A (en) Method and Apparatus for Sharing Functions of M2M Devices based on Gateway
Chagas et al. Real-time databases techniques in wireless sensor networks
CN109218049A (en) A kind of control method, relevant device and system
KR102233007B1 (en) Server for Providing IoT Platform Service Using Device Descriptor and Method Therefor

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20931760

Country of ref document: EP

Kind code of ref document: A1