CN115362666A - Message transmission method and device in Internet of things, server, equipment and cloud platform - Google Patents

Message transmission method and device in Internet of things, server, equipment and cloud platform Download PDF

Info

Publication number
CN115362666A
CN115362666A CN202080098894.6A CN202080098894A CN115362666A CN 115362666 A CN115362666 A CN 115362666A CN 202080098894 A CN202080098894 A CN 202080098894A CN 115362666 A CN115362666 A CN 115362666A
Authority
CN
China
Prior art keywords
resource
attribute information
server
condition
notification message
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202080098894.6A
Other languages
Chinese (zh)
Inventor
吕小强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Publication of CN115362666A publication Critical patent/CN115362666A/en
Pending legal-status Critical Current

Links

Images

Classifications

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The embodiment of the application discloses a method and a device for transmitting messages in the Internet of things, a server, resource equipment, a cloud platform, a computer storage medium and a chip, wherein the method for transmitting the messages in the Internet of things comprises the following steps: the method comprises the steps that a server sends a first request to first equipment, wherein the first request indicates that the first equipment sends a notification message to the server under the condition that attribute information of first resources meets a trigger condition, and the notification message comprises or indicates the attribute information of the first resources; and receiving the notification message sent by the first equipment.

Description

Message transmission method and device in Internet of things, server, equipment and cloud platform Technical Field
The embodiment of the application relates to but is not limited to the technology of the internet of things, and particularly relates to a message transmission method, device, server, equipment and cloud platform in the internet of things.
Background
The Internet of Things (IOT) is an important component of new-generation information technology. With the increasingly complex scene of the internet of things, more and more information exchange devices are provided, so that the computing resources of the server are increased, and how to reduce the computing resources of the server is an urgent problem to be solved in the field.
Disclosure of Invention
The embodiment of the application provides a message transmission method, a message transmission device, a server, equipment and a cloud platform in the Internet of things.
In a first aspect, a method for transmitting messages in the internet of things is provided, including:
the method comprises the steps that a server sends a first request to first equipment, wherein the first request indicates that the first equipment sends a notification message to the server under the condition that attribute information of first resources meets a trigger condition, and the notification message comprises or indicates the attribute information of the first resources;
and 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 method comprises the steps that a server receives a second message sent by a cloud platform, wherein the second message comprises or indicates that a first device completes setting of a trigger condition, the trigger condition is used for triggering the first device to send a notification message to the server under the condition that attribute information of a first resource of the first device meets the trigger condition, and the notification message comprises or indicates the attribute information of the first resource;
and receiving the notification message sent by the first equipment.
In a third aspect, a method for transmitting messages in the internet of things is provided, including:
the method comprises the steps that a cloud platform sends a first request to first equipment, wherein the first request indicates that the first equipment sends a notification message to a server under the condition that attribute information of first resources meets a trigger condition, and the notification message comprises or indicates the attribute information of the first resources.
In a fourth aspect, a method for transmitting messages in the internet of things is provided, including:
the first equipment monitors attribute information of the first resource;
if the attribute information of the first resource meets the triggering condition, sending a notification message to a server; the notification message includes or indicates attribute information of the first resource.
In a fifth aspect, a device for transmitting messages in the internet of things is provided, including:
a request sending unit, configured to send a first request to a first device, where the first request indicates that the first device sends a notification message to the server when attribute information of a first resource meets a trigger condition, where the notification message includes or indicates the attribute information of the first resource;
a notification message receiving unit, 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, which includes:
a second message receiving unit, configured to receive a second message sent by a cloud platform, where the second message includes or indicates that a first device completes setting of a trigger condition, where the trigger condition is used to trigger the first device to send a notification message to the server when attribute information of a first resource of the first device meets the trigger condition, and the notification message includes or indicates the attribute information of the first resource;
a notification message receiving unit, configured to receive the notification message sent by the first device.
A seventh aspect provides a device for transmitting messages in the internet of things, including:
a request sending unit, configured to send a first request to a first device, where the first request indicates that the first device sends a notification message to the server when attribute information of a first resource satisfies a trigger condition, where the notification message includes or indicates the attribute information of the first resource.
In an eighth aspect, a transmission device for messages in the internet of things is provided, which includes:
the monitoring unit is used for monitoring the attribute information of the first resource;
a notification message sending unit, configured to send a notification message to a server if the attribute information of the first resource satisfies a trigger condition; the notification message includes or indicates attribute information of the first resource.
In a ninth aspect, there is provided a server comprising: a memory and a processor, wherein the processor is capable of,
the memory stores a computer program operable on the processor,
the processor implements the steps of the above method when executing the program.
In a tenth aspect, there is provided a cloud platform comprising: a memory and a processor, wherein the processor is capable of,
the memory stores a computer program operable on the processor,
the processor implements the steps of the above method when executing the program.
In an eleventh aspect, there is provided a first apparatus comprising: a memory and a processor, wherein the processor is capable of,
the memory stores a computer program operable on the processor,
the processor implements the steps of the above method when executing the program.
In a twelfth aspect, a computer storage medium is provided that stores one or more programs executable by one or more processors to implement the steps in the above-described method.
In a thirteenth aspect, a chip is provided, including: and the processor is used for calling and running the computer program from the memory so that the equipment provided with the chip executes the steps of the method.
In a fourteenth aspect, a computer program product is provided, the computer program product comprising a computer storage medium storing computer program code comprising instructions executable by at least one processor, the instructions implementing the steps of the method when executed by the at least one processor.
In the embodiment of the application, a server sends a first request to a first device, wherein the first request indicates that the first device sends a notification message to the server under the condition that attribute information of a first resource meets a trigger condition, and the notification message includes or indicates the attribute information of the first resource; and receiving a notification message sent by the first equipment. In this way, the server sends the first request to the first device, so that the server 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 receiving the notification message sent by the first device as long as the attribute information of the first resource changes, and thus the number of notification messages received by the server decreases, and the computing resources of the server decrease.
Drawings
Fig. 1 is a schematic diagram of an internet of things system provided by an embodiment of the present application;
fig. 2 is a schematic diagram of an information processing process of a server in the internet of things according to the embodiment of the present application;
fig. 3 is a schematic view of an implementation flow of a method for transmitting a message in the internet of things according to the embodiment of the present application;
fig. 4 is a schematic implementation flow diagram of another method for transmitting messages in the internet of things according to the embodiment of the present application;
fig. 5 is a schematic implementation flow diagram of another method for transmitting messages in the internet of things according to the embodiment of the present application;
FIG. 6 is a schematic diagram of another system of things provided by an embodiment of the present application;
fig. 7 is a schematic flow chart illustrating an implementation of a further method for transmitting a message in the internet of things according to an embodiment of the present application;
fig. 8a is a schematic implementation flow chart of a message transmission method in the internet of things according to another embodiment of the present application;
fig. 8b is a schematic view of an implementation flow of a message transmission method in the internet of things according to another embodiment of the present application;
fig. 8c is a schematic view of an implementation flow of a message transmission method in the internet of things according to yet another embodiment of the present application;
fig. 9 is a schematic structural diagram illustrating a component of a message transmission device in the internet of things according to an embodiment of the present application;
fig. 10 is a schematic structural diagram illustrating a composition of another apparatus for transmitting messages in the internet of things according to an embodiment of the present application;
fig. 11 is a schematic structural diagram illustrating a component of another apparatus for transmitting messages in the internet of things according to an embodiment of the present application;
fig. 12 is a schematic structural diagram of a component of another apparatus for transmitting messages in the internet of things according to the embodiment of the present application;
fig. 13 is a schematic hardware entity diagram of a server according to an embodiment of the present disclosure;
fig. 14 is a hardware entity diagram of a cloud platform according to an embodiment of the present disclosure;
fig. 15 is a hardware entity diagram of a first device according to an embodiment of the present application;
fig. 16 is a schematic structural diagram of a chip according to an embodiment of the present application.
Detailed Description
The following describes in detail the technical solutions of the present application and how the technical solutions of the present application solve the above technical problems by embodiments and with reference to the drawings. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments.
It should be noted that: in the present examples, "first", "second", etc. are used for distinguishing similar objects and are not necessarily used for describing a particular order or sequence.
The technical means described in the embodiments of the present application may be arbitrarily combined without conflict.
Fig. 1 is a schematic view of an internet of things system provided in an embodiment of the present application, and as shown in fig. 1, the internet of things system includes resource devices 11, 12, 13, 14, and 15, and a server 16. Wherein:
the resource devices 11, 12, 13, 14 and 15 may be sensor nodes in the internet of things. The sensor node comprises a sensor and a communication module, wherein the sensor is used for sensing data, and the communication module is used for communication of the resource device. When the system is implemented, the resource devices can be an intelligent sound box, an air conditioner, an electric lamp, a kettle, a television, a mobile phone, a computer, an intelligent watch, an augmented reality device or a virtual reality device and the like.
The server16 may be an internet of things connection management platform, an internet of things application server or gateway, and the like.
In the implementation process, the resource devices 11 to 15 may all be connected to the server16, the server16 may perform information interaction with the resource devices 11 to 15, for example, the server16 may manage the resource devices 11 to 15, such as at least one of resource device software and hardware upgrade, resource device function control, resource subscription, and resource query. It should be understood that in other embodiments, the resource device14 or 15 may be directly connected to the server 16.
The resource devices may also be connected to each other, for example, the resource device11 may be connected to the resource devices 14 and 15, respectively, messages or data between the server16 and the resource device14 are forwarded via the resource device11, and the resource device11 may also perform certain processing on the forwarded messages or data, such as data preprocessing/filtering, communication protocol or message format conversion, and the like.
The resource devices or the resource devices and the server are in communication connection through the communication module.
It should be noted that, in the embodiments of the present application, a connection manner or a communication protocol between resource devices, or between a server and a resource device is not limited. For example, the server16 and the resource devices 11/12/13, or the resource devices 11 and 14/15 may use a wired connection and use a restricted Application Protocol (CoAP) for data or Message transmission, or the server16 and the resource devices 11/12/13, or the resource devices 11 and 14/15 may use a cellular narrowband Internet of Things (NB-IoT) wireless connection technology and use a Message Queuing Telemetry Transport (MQTT) Protocol for data or Message transmission.
It should be noted that, in the internet of things technology, a server manages resource devices in a resource form, where "resource" is an abstract concept, and may refer to a physical resource device, a model, a software/hardware version, or a manufacturer of the resource device, or a dynamic attribute such as an operation that can be executed by the resource device, a reported event, a parameter, or a readable state parameter. Each Resource has a unique Identifier, which may be a name, a Uniform Resource Identifier (URI), a Uniform Resource Locator (URL), or any other type or format that can distinguish and identify the Resource. In this application, URI is taken as an example to identify a resource, for example, URI of server16 is "/server16", URI of resource devices 11 to 15 are "/server16/device11", "/server16/device12", "/server16/device13", "/server16/device11/device14", "/server16/device11/device15", respectively.
Fig. 2 is a schematic diagram of an information processing process of a server in the internet of things according to an embodiment of the present application, and as shown in fig. 2, the server has a rule resource (oil.r.rule), where the rule resource is an aggregate resource, and the aggregate resource includes a rule input resource (oil.r.rule) 21, a rule expression resource (oil.r.rule expression) 22, and a rule behavior resource (oil.r.rule action) 23.
The Rule Input resource 21 and the Rule behavior resource 23 are both a Collection resource, and may include a Rule Input Collection (Rule Input Collection) and a Rule behavior Collection (Rule Actions Collection), respectively. For a rule, the rule inputs of the rule are stored in the rule input resource 21, and the expression of each rule input is as follows:
{ "anchor" - "mytemperature" -// alias of rule input, used in ruleexpress;
"href"/mylocalteparaturesensor "// relative URI of hardware for rule input
"rel" [ "ruleinput" ],// meaning is a regular input
"rt" [ "oic. R. Temperature" ],// resource type
If [ "oic. If. S" ]// interface }
The regular expression resource 22 includes regular expressions and rule results, for example, a regular expression may be: temperature > = "25", when the rule result is changed from false to true, that is, the rule input is changed from not satisfying the rule expression to satisfying the rule expression, the rule action is executed, and the execution of the rule action generally modifies the attribute of a certain resource or a series of resources.
Continuing with fig. 2, when the Rule input resource 21 of the server receives a resource (e.g., mytemperature), which may be a resource on the server or a resource of a resource device outside the server, the server may link to the Rule input (e.g., a value of mytemperature) according to the received resource, that is, the server obtains the Rule input according to the resource, the Rule input may be understood as a value of the resource, the server may transmit the Rule input to the Rule expression, if the Rule Enable (Rule Enable) is true, the server determines whether the Rule input satisfies the Rule expression, if so, outputs a Rule result, if the Rule result is true and the behavior Enable (Action Enable) is true, links scene information in the scene set according to the Rule result, and assigns the scene information linked to the scene set to the scene information in the Rule behavior resource 23. The rule input is an input element of the rule determination condition, the rule expression is an expression formed from the respective rule inputs, and the rule behavior is executed if the rule expression is determined to be true.
The rule enable is used for enabling the server not to judge the rule expression, for example, the server may control to disable/enable a resource for a period of time, so that the rule enable corresponding to the resource is false/true. The behavior enable is used to determine whether to execute the behavior action when the rule result is true, and the true or false of the rule enable and the behavior enable can be determined based on the operation of the user or the configuration determination.
Introducing an internet of things scene, wherein the rule in the server is that the air conditioner is turned on when the indoor temperature reaches 30 ℃, the temperature is input as a rule, the temperature is greater than or equal to 30 and is a rule expression, when the temperature changes, a rule engine of the server judges whether the temperature is greater than or equal to 30, and if the judgment result is true, the rule behavior of turning on the air conditioner is executed.
In the current technical architecture of the internet of things, a server running a rule needs to subscribe to a resource pointed to or linked (link) by a rule input (ruleInput) resource, which may be referred to as 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 equipment sends a notification message to the server running the rule, and after receiving the notification message, the server substitutes the attribute value of the attribute information of the target input resource into the rule expression for calculation. However, each time the notification message of the target input resource causes the server to perform the calculation of the regular expression, the resource of the server is greatly wasted.
Based on at least the existing problems, fig. 3 is a schematic view of an implementation flow of a transmission method for messages in the internet of things according to an embodiment of the present application, as shown in fig. 3, the method is applied to a server, and the method includes:
s301, the server sends a first request to the first device, wherein the first request indicates that the first device sends a notification message to the server under the condition that 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.
The first device may be any of the resource devices listed above.
The first device in the embodiment of the present application may be understood as an input resource device (inputDevice), and the server in the embodiment of the present application may be understood as a rule resource device (ruleDevice).
There is a resource referenced by the rule input (ruleInput) on the inputDevice, that is, a certain resource of the inputDevice is used as an input resource for the rule.
A ruleDevice is a resource device that stores a ruleInput resource, a rule expression ruleExpression resource, and a rule behavior ruleAction resource, and runs the entire rule on the ruleDevice.
The first resource may be a resource in the first device, e.g., a sensor in the first device; alternatively, the first resource may be a resource outside the first device, for example, a camera in the first device captures an image of a certain target/object, and the first resource is a resource in the target/object.
The attribute information of the first resource may be obtained by: the first device senses attribute information of the first resource, or one device outside the first device senses the attribute information of the first resource and sends the attribute information of the first resource to the first device.
In one embodiment, the trigger condition of the notification message may be included in the first request, so that the first device may obtain the trigger condition by parsing the first request.
In another embodiment, the first request may not include the trigger condition of the notification message, but may include at least one of an identifier, an address, an index, or a link of the trigger condition, so that the first device may acquire the trigger condition based on the at least one of the identifier, the address, the index, or the link of the trigger condition.
In this embodiment, the trigger condition is determined by the server, at least one resource may be located on one resource device, and different resources on one resource device may correspond to different trigger conditions, for example, one resource device may correspond to a trigger condition of a temperature resource and a trigger condition of a brightness resource.
In one embodiment, the notification message indicates attribute information of a first resource of the first device. For example, the notification message includes a resource identifier (e.g., a URI or a 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 embodiment, the notification message may include attribute information of the first resource, so that the server may parse the notification message to obtain the attribute information of the first resource.
The attribute information of the first resource may include an attribute value of the first resource. In one embodiment, the attribute information of the first resource may further include at least one of status information, data category, location information, and parameter information of the first device. In an implementation, the property value of the first resource may be a value measured by a sensor, for example, a sensing value of a sensor. It should be appreciated that in one possible implementation, the first device may also include a second resource, a third resource, etc., each of which may have its own attribute information.
To the extent that the resource of the first device is a sensor (e.g., a sensor) in the first device, the first device can be, for example, a monitoring resource device for monitoring the opening or closing of a door of a room, and the first resource can be a sensor in the monitoring resource device. In one implementation scenario, when the room door is opened, the sensing value of the sensor is 1, and the attribute value of the first resource is 1, where 1 indicates that the room door is opened; when the room door is closed, the sensing value of the sensor is 0, and the attribute value of the first resource is 0, where 0 indicates that the room door is closed.
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 analyzing the notification message.
In the embodiment of the application, the server sends the first request to the first device, so that the server 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 receiving the notification message sent by the first device as long as the attribute information of the first resource changes, the number of the notification messages received by the server is reduced, and the computing resources of the server are reduced.
Fig. 4 is a schematic view of an implementation flow of another method for transmitting a message in the internet of things according to the embodiment of the present application, and as shown in fig. 4, the method includes:
s401, a server sends a first request to a first device, wherein the first request indicates that the first device sends a notification message to the server under the condition that attribute information of a first resource meets a trigger condition, and the notification message comprises or indicates the attribute information of the first resource; the first device receives a first request sent by a 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 may obtain an identifier, an address, an index, or a link of the trigger condition by parsing the first request, and obtain the trigger condition from a server or other devices based on the identifier, the address, the index, or the link of the trigger condition.
S403, the first device monitors the attribute information of the first resource, and determines that the attribute information of the first resource meets the trigger condition.
The first device may monitor the attribute information of the first resource continuously or periodically or aperiodically, determine whether the attribute information of the first resource satisfies a trigger condition each time the attribute information of the first resource is monitored, send a notification message to the server if the first device determines that the attribute information of the first resource satisfies the trigger condition, not send the notification message to the server if the first device determines that the attribute information of the first resource does not satisfy the trigger condition, and the first device continues to monitor the attribute information of the first resource.
S405, the first equipment sends a notification message to a server; the server receives the notification message sent by the first device.
In the embodiment of the application, when the first device interacts with the server, because the first device can acquire the trigger condition through the first request sent by the server, the first device sends the notification message to the server only when monitoring that the attribute information of the first resource meets the trigger condition, and further the number of the notification messages received by the server is small, and the calculation resources of the server are low.
Fig. 5 is a schematic view of an implementation flow of another method for transmitting a message in the internet of things according to the embodiment of the present application, and as shown in fig. 5, the method includes:
s501, the server creates rule resources.
The rule resources may include constraints (the constraints in the embodiment of the present application may be both understood as first constraints), N input resources corresponding to the constraints, and M behavior resources corresponding to the constraints; n is a positive integer greater than or equal to 1; m is a positive integer greater than or equal to 1. Wherein the N input resources include a first resource. Constraints can be understood as regular expressions.
In one case, any one of the N input resources is different from any one of the M behavior resources. In another case, a portion of the N input resources are the same as a portion of the M behavior resources.
In one embodiment, the rule resources created by the server may include at least two constraints, input resources corresponding to the at least two constraints, and behavior resources corresponding to the at least two constraints. Wherein the at least two constraints may include a first constraint.
For example, the rule resources created by the server may include a first constraint and a second constraint, and N input resources corresponding to the first constraint, M behavior resources corresponding to the first constraint, P input resources corresponding to the second constraint, and Q behavior resources corresponding to the second constraint. Wherein P or Q is a positive integer greater than or equal to 1. Wherein, any input resource in the N input resources is different from any input resource in the P input resources, or part of the N input resources is the same as part of the P input resources. Any behavior resource in the M behavior resources is different from any behavior resource in the Q behavior resources, or a part of behavior resources in the M behavior resources is the same as a part of behavior resources in the Q behavior resources.
Referring to fig. 2, the rule resources include a rule input resource, a rule expression resource, and a rule behavior resource. Wherein the at least two constraints may be included in the regular expression resources, the input resources corresponding to the at least two constraints may be included in the regular input resources, and the behavior resources corresponding to the at least two constraints may be included in the regular behavior resources.
It should be noted that, in the embodiment of the present application, the rule resource includes the first constraint condition as an example, and a transmission manner of the message is described, and it should be understood by those skilled in the art that, when the rule resource includes at least two constraint conditions, the transmission manner of the message is similar to that 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. For example, when the constraint is "(resource a > 17) and ((resource B = false) or (resource C < 16))", there are three resources A, B and C in the constraint, and the resources corresponding to the constraint are resources A, B and C.
In the embodiment of the present application, a certain input resource of the N input resources and a certain behavior resource of the M behavior resources may be resources on the same device, or may be resources on different devices.
In one embodiment, the server may determine the constraints based on user input. For example, the server may receive user input "(resource a > 17) and ((resource B = false) or (resource C < 16))", resulting in a constraint "(resource a > 17) and ((resource B = false) or (resource C < 16))".
In another embodiment, the server may modify the constraints based on the user's manipulation of the constraints. For example, the server may receive an operation that the user modifies "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 constraints may be by configuration. For example, the server may receive configuration information sent by one resource device, and the configuration information may include or indicate a constraint condition, or include or indicate modification information for the constraint condition, so that the server may obtain the constraint condition based on the configuration information, or may modify the constraint condition based on the configuration information.
S503, the server sends a request for subscribing the first resource to the first device; the first device receives a request sent by a server to subscribe to a first resource.
In the scenario of the internet of things, after obtaining the created rule resource, the server needs to register a resource in the rule resource, and generally, the server may send a resource subscription request to one or at least two devices corresponding to the resource in the rule resource, where the resource subscription request may include or indicate a resource identifier to be subscribed.
For example, 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 identity or name of the first resource may be included in the request to subscribe to the first resource.
It can be understood that the server may subscribe to not only the first resource of the first device, but also to other resources in the first device, such as the second resource, the third resource, etc. in the first device, or may subscribe to resources in other resource devices in the internet of things.
The first device may store the identifier or name of the first resource in a subscription resource of the first device, and after the storage is completed, the first device completes the subscription of the first resource.
S505, the first device sends a first message to the server, wherein the first message includes or indicates that the first resource subscription is successful.
After the first device becomes a subscription for the resource, the first device may send a first message to the server. The first message can also be understood as a resource subscription success message; the server receives a 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 implementation, the server may determine the trigger condition based on the constraint condition.
In one embodiment, if N is equal to 1, that is, only one rule input resource is in the rule resources created by the server, the server may determine the trigger condition based on an expression corresponding to the one rule input resource (first resource) included in the constraint condition. For example, the server may determine the constraint as a trigger. As another example, the server may modify parameters in the constraints to obtain the trigger conditions.
In another embodiment, if N is greater than 1, that is, under the condition that the rule resource created by the server includes at least two rule input resources, the server may decompose the constraint condition, so that the trigger condition may be obtained based on the expressions respectively corresponding to the at least two decomposed rule input resources, where the implementation process of determining the trigger condition based on the constraint condition by the server may refer to S507 to S509.
S507, the server decomposes the constraint condition into N sub-conditions; the N sub-conditions correspond to the N input resources one by one; and determining the sub-condition corresponding to the first resource from the N sub-conditions.
One of the sub-conditions 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 is "(resource a > 17) and ((resource B = false) or (resource C < 16))", the server can resolve the constraint into three sub-conditions, "resource a >17" corresponding to resource a, "resource B = false" corresponding to resource B, and "resource C < 25" corresponding to resource C, because the constraint has three resources, respectively, resource a, resource B, and resource C.
Since the N sub-conditions include the sub-condition corresponding to the first resource, the server may determine the sub-condition 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.
Wherein the trigger condition may include one of: the attribute information of the first resource is greater than a first threshold; in a first time period, the attribute information of the first resource is larger than a first threshold value; the attribute information of the first resource is smaller than a second threshold; within a second duration, the attribute information of the first resource is smaller than a second threshold; the attribute information of the first resource changes within the third duration, 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 an operation duration of a certain timer before timeout.
In one embodiment, the server may determine a 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 the determination trigger condition is also "resource a >17".
In another embodiment, 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 the value corresponding to the sub-condition corresponding to the first resource may be greater than or less than the threshold or the value corresponding to the trigger condition. In an embodiment, the server may determine a threshold or a value corresponding to a sub-condition corresponding to the first resource, and add or subtract a certain value to or from the threshold or the value corresponding to the sub-condition to obtain the threshold or the value corresponding to the trigger condition. 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".
It should be noted that, in the embodiment of the present application, the steps S503 to S505 and the step server determine the trigger condition based on the constraint condition, and the execution sequence of the steps is not limited, for example, the steps S503 to S505 may be executed first, and then the step server determines the trigger condition based on the constraint condition, or the step server determines the trigger condition based on the constraint condition first, and then the steps S503 to S505 are executed, or the steps S503 to S505 and the step server determine the trigger condition based on the constraint condition, and may be executed synchronously.
S511, the server sends a first request to the first device, wherein the first request indicates that the first device sends a notification message to the server under the condition that the attribute information of the first resource meets the trigger condition, and the notification message comprises or indicates the attribute information of the first resource; the first device receives a first request sent by a server.
The attribute information of the first resource satisfies the trigger condition, and may include one of:
the attribute information of the first resource is greater than a first threshold;
in a first time period, the attribute information of the first resource is larger than a first threshold value;
the attribute information of the first resource is smaller than a second threshold;
within a second time length, the attribute information of the first resource is smaller than a second threshold value;
the attribute information of the first resource is changed in the third duration, and the changed value is larger than the first value.
S513, the first equipment sends a second message to the server, wherein the second message comprises or indicates that the first equipment completes the setting of the trigger condition; and the server receives a second message sent by the first equipment.
After the first device receives the first request, the trigger condition of the notification message may be obtained based on the first request, and the trigger condition may be set, for example, one implementation of setting the trigger condition may be to store the trigger condition in the first device or in a subscription resource of the first device. After the first device completes setting the trigger condition, a second message may be sent 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 meets the trigger condition.
Wherein the notification message comprises or indicates attribute information of the first resource.
It is to be noted that, in the embodiment of the present application, the attribute information of the first resource satisfies the trigger condition, and it can be understood that the attribute value of the first resource satisfies the trigger condition.
S517, 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 if it is determined that the attribute information to the first resource satisfies the trigger condition. In one embodiment, the first device may determine that: and if the attribute information of the first resource is larger than the first threshold value, sending a notification message to the server. For example, the triggering condition is that the attribute information is greater than 25, the first device determines that the attribute information to the first resource is 26, and sends a notification message to the server.
In another embodiment, the first device may determine that: and if the attribute information is larger than the first threshold value in the first time period, sending a notification message to the server.
In an implementation, the first device may start and operate a first timer when it is determined that the attribute information of the first resource is greater than a first threshold, where the first timer is configured to run for a first time period and then time out, and during the operation of the first timer, the first device may 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, and if not, the first device does not send the notification message to the server and continues to monitor the attribute information of the first resource.
In yet another embodiment, the first device may determine that: the attribute information of the first resource is less than the second threshold, and a notification message is sent to the server, or the first device may determine that: within the second duration, the attribute information of the first resource is less than a second threshold.
In yet another embodiment, the first device may determine that: and the attribute information of the first resource is changed in the third time length, and the changed value is greater than the first value, and a notification message is sent to the server.
In implementation, the first device may determine, every third duration, the attribute information of the first resource before and after the third duration, and send a notification message to the server if it is determined that a change value of the attribute information of the first resource is greater than the first value. For example, the first device may control a second timer to periodically restart, the second timer is configured to run for a third duration and then time out, and restart the second timer when the second timer times out, and the first device may obtain: and obtaining the change value of the attribute information of the first resource in the first duration by the attribute information of the first resource corresponding to the second timer at the restarting moment and the attribute information of the first resource corresponding to the second timer at the overtime moment.
And S519, the server executes the rule behaviors.
In an embodiment, since the first device has already determined that the attribute information of the first resource satisfies the trigger condition, the server does not need to determine whether the attribute information of the first resource further satisfies the sub-condition corresponding to the first resource, but directly defaults that the attribute information of the first resource already satisfies the sub-condition corresponding to the first resource.
In another embodiment, 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 meets the sub-condition corresponding to the first resource.
And if the N is equal to 1, namely only the sub-condition corresponding to the first resource exists in the constraint condition, and the server executes the rule action under the condition that the attribute information of the first resource is determined to meet the constraint condition.
If N is larger than 1, namely at least a sub-condition is included in the constraint condition, and the server determines that the attribute information of the first resource meets the sub-condition corresponding to the first resource, the server acquires the attribute information of N-1 resources except the first resource in the N input resources, and executes the rule behavior when determining that the attribute information of each resource in the N-1 resources meets the sub-condition corresponding to each resource.
In an implementation manner, the server can obtain the attribute information of the N-1 resources through the identifiers of the N-1 resources, and further judge whether the attribute information of each resource in the attribute information of the N-1 resources meets the sub-condition corresponding to each resource.
In another embodiment, the server may determine whether the notification message sent by the device corresponding to the N-1 resources is received, and if so, determine that the attribute information of each resource in the attribute information of the N-1 resources satisfies the sub-condition corresponding to each resource.
It can be understood that, when the constraint condition includes N sub-conditions, if the server determines that any input resource 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 execution rule behavior may be implemented by: and modifying the attribute information of the M behavior resources.
For example, if the server creates a rule that is: if the door is opened, the light is turned on. Then, a sensor of the monitoring device for detecting the opening and closing of the door, in a case where it is monitored that the door is turned from closed to open, the monitoring device sends an indication of the door to the server, the server determines that the door is turned from closed to open based on the indication of the door, and the server performs a regular action, for example, the attribute information of the resource for turning on or off the lamp may be modified from 0 to 1, where 0 indicates that the state of the lamp is off, and 1 indicates that the state of the lamp is on.
After the server modifies the attribute information of the M behavior resources, the server may send an indication message to a series of resource devices corresponding to the M behavior resources, where the indication message includes or indicates the attribute information of the behavior resources, so that the series of devices can convert the behavior resources to corresponding states based on the attribute information of the behavior resources after obtaining the attribute information of the behavior resources. The series of resource devices includes at least one resource device, which may or may not include the first device.
Referring to fig. 2, when the rule result in the rule expression resource is true, the server may 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 the scene information of the rule behavior. The scenario information of the rule behavior may be attribute information of a behavior resource in the embodiment of the present application.
In the embodiment of the application, the pressure for judging the sub-condition corresponding to the first resource by the server is sunk and decomposed to each resource device in the manner that the triggering condition is set by the first device, so that the judging times of the server can be effectively reduced, the working pressure of the server is reduced, the resource of the server is saved, and the regular behavior is executed after the server receives the notification message, so that the linkage of the resource devices in the internet of things can be realized.
Fig. 6 is a schematic diagram of another system of things provided in an embodiment of the present 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 further includes a cloud platform 17, wherein:
the cloud platform 17 is wirelessly connected with the server16, and the cloud platform may also be wirelessly connected with the resource devices 11 to 15.
In implementation, the communication protocol on which the cloud platform and the server are connected may be the same as or different from the communication protocol on which the resource device is connected, and may also be different from or the same as the communication protocol on which the server and the resource device are connected.
Fig. 7 is a schematic view of an implementation flow of a further method for transmitting a message in an internet of things according to an embodiment of the present application, and as shown in fig. 7, the method includes:
s701, the cloud platform sends a first request to the first device, the first request indicates that the first device sends a notification message to the server under the condition that the attribute information of the first resource meets the trigger condition, and the notification message comprises or indicates the attribute information of the first resource; the first device receives a first request sent by a cloud platform.
And S703, the server receives a second message sent by the cloud platform, the second message includes or indicates that the first device completes setting of the trigger condition, and the trigger condition is used for triggering the first device to send a notification message to the server when the attribute information of the first resource of the first device meets the trigger condition.
In one embodiment, before S703, there may be a step of the cloud platform sending the second message to the server.
In an embodiment, after the first device completes setting the trigger condition, the first device may send a trigger condition setting completion message to the cloud platform, so that the cloud platform can determine that the first device completes setting the trigger condition after receiving the trigger condition setting completion message, and then, the cloud platform may send a second message to the server.
In another embodiment, after the cloud platform sends the first request to the first device, the first device may default to setting the trigger condition, so that the second message may be sent to the server. The cloud platform can also send a second message to the server after sending the first request and after a certain time interval.
S705, the first device monitors the attribute information of the first resource and determines that the attribute information of the first resource meets the triggering condition.
S707, the first equipment sends a notification message to the server; the server receives a notification message sent by the first device.
In this embodiment of the 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, and compared with any one of the embodiments corresponding to fig. 3 to 5, the trigger condition does not need to be determined by the server, so that the calculation amount of the server is further reduced.
Fig. 8a is a schematic view of an implementation flow of a transmission method for a message in an internet of things according to another embodiment of the present application, and as shown in fig. 8a, the method includes:
s801, the server creates rule resources.
The rule resources may include a constraint condition, N input resources corresponding to the constraint condition, and M behavior resources corresponding to the constraint condition; n is a positive integer greater than or equal to 1; m is a positive integer greater than or equal to 1. Wherein the N input resources include a first resource.
S803, the server sends a request for subscribing the first resource to the first device; the first device receives a request sent by a server to subscribe to a first resource.
S805, the first device sends a first message to the server, wherein the first message comprises or indicates that the first resource subscription is successful; the server receives a first message sent by the first device.
S807, the server Xiang Yun platform sends a third message, and the third message includes or indicates: constraints and N input resources; and the cloud platform receives a third message sent by the server.
For example, resource a, resource B, and resource C may be included or indicated in the third message, and the third message may include or indicate "(resource a > 17) and ((resource B = false) or (resource C < 16))".
It should be noted that the present embodiment does not limit the execution sequence of steps S803 to S805 and step S807 in execution, for example, steps S803 to S805 may be executed first, and then step S807 is executed, or steps S807 and then steps S803 to S805 may be executed first, or steps S803 to S805 and step S807 may be executed synchronously.
In implementation, the cloud platform may determine the trigger condition based on the constraint condition.
In one embodiment, if N is equal to 1, that is, only one rule input resource is in the rule resources created by the server, after the server sends the third message including the constraint condition to the cloud platform, the server may determine the trigger condition based on an expression corresponding to the one rule input resource (the first resource) included in the constraint condition. For example, the cloud platform may determine the constraint as a trigger. For another example, the cloud platform may modify parameters in the constraint to obtain the trigger condition.
In another embodiment, if N is greater than 1, that is, under the condition that the rule resources created by the server include at least two rule input resources, after the server sends a third message including the constraint condition to the cloud platform, the cloud platform may decompose the constraint condition, so that the trigger condition may be obtained based on expressions respectively corresponding to the at least two decomposed rule input resources, where the implementation process of determining the trigger condition based on the constraint condition by the cloud platform may refer to S809 to S811.
S809, decomposing the constraint condition into N sub-conditions by the cloud platform; n is a positive integer greater than or equal to 1, the N sub-conditions correspond to the N input resources one by one, and the sub-condition corresponding to the first resource is determined from the N sub-conditions.
The manner of decomposing the constraint condition by the cloud platform may refer to the description of decomposing the constraint condition by the server, which is not specifically described herein.
In an implementation case, after the cloud platform receives the third message, the cloud platform may analyze the third message to obtain the identifiers of the N input resources and the identifiers of the constraint conditions, and then obtain the constraint conditions and the N input resources based on the identifiers of the N input resources and the identifiers of the constraint conditions. In another implementation, after the cloud platform receives the third message, the cloud platform may parse the third message to directly obtain the N input resources and the constraint condition.
S811, 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, and may refer to the server to determine the implementation manner of the trigger condition based on the sub-condition corresponding to the first resource.
S813, the cloud platform sends a first request to the first device, where the first request indicates that the first device sends a notification message to the server when the attribute information of the first resource meets the trigger condition, where the notification message includes or indicates the attribute information of the first resource; the first device receives a first request sent by a cloud platform.
S815, the first device sends a second message to the cloud platform, wherein the second message comprises or indicates that the first device completes the setting of the trigger condition; and the cloud platform receives a 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, so that each time the first device determines that the attribute information of the first resource changes, it determines whether the attribute information of the first resource meets the trigger condition.
S817, the cloud platform sends a second message to the server; and the server receives a second message sent by the cloud platform.
S819, the first device monitors the attribute information of the first resource and determines that the attribute information of the first resource meets the trigger condition.
The description about S819 may refer to the related description in S517.
S821, the first device sends a notification message to the server; the server receives the notification message sent by the first device.
S823, the server executes the rule behavior.
In the embodiment of the application, when the first device, the server and the cloud platform interact with each other, the cloud platform obtains the trigger condition corresponding to the first resource by receiving a message sent by the server, so that the cloud platform sends a first request including or indicating to the server to send an indication that the first device sends a notification message to the server under the condition that the attribute information of the first resource meets the trigger condition, and further the server is not required to determine the trigger condition of the first resource and execute a sending process of the first request, thereby reducing the computing resources of the server.
The following description is given for the message transmission method in the internet of things according to the embodiment of the present application, taking the first device as an inputDevice and the server as a ruletdevice as an example:
fig. 8b is a schematic view of an implementation flow of a transmission method for a message in the internet of things according to another embodiment of the present application, and as shown in fig. 8b, the method includes:
s841, creating a new Rule resource by the Rule device; the Rule resource is a Rule for performing resource device automation. The resource comprises a ruleInput resource, a ruleExpression resource and the like, and the ruleDevice resource equipment respectively subscribes related resources to each inputDevice; these resources are the resources specified by the links contained in ruleInput.
S843, decomposing a rule expression ruleExpression by ruleDevice; the ruleExpression is decomposed into different subsets according to the resources specified in ruleInput. For example, rule expression "A >17and B = false or C-straw 16", then decomposed into 3 subsets: a >17; b = false; c <16. When the subsets are divided, the subsets may be divided according to resources such that each subset represents only one resource. When ruleDevice decomposes rulExpression, it can decompose according to the number of inputResources. For example, the number of InputResources is N, and the ruleDevice is decomposed into N subsets, where N is a positive integer greater than or equal to 1.
The subsets may be divided according to logical operators such that only one relationship operator may be included in each subset, and the relationship operators may include (">", "> =", "=", "<" = ", and" | = ", etc.). In this way, the attribute value of the subscribed resource meets the relational expression corresponding to the resource after being changed, and then the subscription notification message is sent.
S845, the ruleDevice subscribes the input parameters on the inputDevice to each inputDevice respectively.
Wherein, S845 can be understood that ruledevices subscribe to related resources from each inputDevice, respectively. The input parameters may include resources on the inputDevice.
S847, after the inputDevice successfully subscribes, the device may send a message that the subscription is successful to the ruleDevice.
In the implementation process, the server may first perform the step of decomposing the ruleExpression expression, and then perform the step of subscribing the inputDevice; or, the server may first execute the step of subscribing the inputDevice, and then execute the step of decomposing the rule expression after the subscription is successful; or the step of the server decomposing the rule expression and the step of subscribing the inputDevice may be performed synchronously.
The regular expression may be a constraint condition in the above embodiment, and the subset may be a sub-condition in the above embodiment.
S849, the ruleDevice sends a request for a subscription notification condition of the subscribed resource to each corresponding inputDevice according to each decomposed subset, where the subscription notification condition may be a trigger condition in the foregoing embodiment. The content of the request for subscribing to the notification condition may be as follows:
to is the address of the resource To which A belongs
CN:{
Oic.r.value.conditional(
Valuecondition:“>17”;)
}
Wherein, the value in the valueCondition is the attribute value of the resource. In addition, each resource binds an oil.r.value.conditional resource that is used to limit the conditions under which the target resource sends the subscription notification message.
The condition of subscribing to the notification message or the subscription notification condition may be a trigger condition in this embodiment of the application.
S851, the inputDevice may send a message that the setting of the notification condition is completed to the ruleDevice after the notification condition is set.
S853, when the subscribed resource information changes, the inputDevice first determines the content of the oic.r.value.conditional resource; if the condition set in the oil.r.value.condition (i.e., the condition of value condition) is satisfied after the value of the subscription resource is changed, S855 is performed, and if the condition set in the oil.r.value.condition is not satisfied after the value of the subscription resource is changed, the subscription notification message is not transmitted. Here, the resource information may be attribute information of the first resource in the embodiment of the present application.
S855, the inputDevice triggers a subscription notification message, and sends the subscription notification message to the server, where the subscription notification message carries or indicates the changed value of the resource.
The subscription notification message may be a notification message in the example of the present application.
And S857, after the ruleDevice receives the subscription notification message, calculating ruleExpression, judging the ruleExpression, and executing S859 when the ruleExpression is judged to be true. The subscription notification message may be a notification message in the embodiment of the present application.
S859, rule action rule action rule.
Fig. 8c is a schematic view of an implementation flow of a message transmission method in the internet of things according to still another embodiment of the present application, and as shown in fig. 8c, the method includes:
s861, creating a new Rule resource by the Rule device; the Rule resource is a Rule for executing the automation of the equipment; the resource includes a ruleInput resource, a rulExpression resource and the like; the ruleDevice equipment respectively subscribes related resources to each inputDevice; these resources are the resources in ruleInput that contain the link designation.
S863, the ruleDevice subscribes the input parameters of the inputDevice to each inputDevice.
Wherein, S863 can be understood as the resource subscribed by the ruleDevice to each inputDevice. The input parameters may include resources on the inputDevice.
S865, after the inputDevice successfully subscribes, a message of successful subscription may be sent to the ruleDevice.
S867, the rule device sends the newly created rule' S rule input resource and rule expression resource to the Cloud platform Cloud, and the rule input resource and the rule expression resource are used for requesting the Cloud platform to send the notification message sending condition of the subscription resource according to the information.
In the implementation process, the server may first perform the step of subscribing the inputDevice, and then perform the step of sending the ruleInput resource and the rulexexpression resource; or, the server may execute the ruleInput resource and the rulexexpression resource first, and then execute the step of subscribing the inputDevice; alternatively, the steps of the server subscribing to the inputDevice and sending the ruleInput resource and the rulexexpression resource may be performed synchronously.
S869, decomposing the rulExpression by the cloud platform; the ruleExpression is decomposed into different subsets (or expressions) according to the resources specified in ruleInput. The cloud platform can set subscription notification conditions of corresponding resources to different inputdevices respectively according to the decomposed expressions.
For example, rule expression "A >17and B = false or C-straw 16", then decomposed into 3 subsets: a >17; b = false; c <16. When subsets are divided, they may be divided according to resources such that each subset represents only one resource. When the subsets are divided, the subsets can be divided according to logical operators, so that each subset only contains one relational operator.
And S871, the cloud platform sends a request of subscribing notification conditions of the subscribed resources to each corresponding inputDevice according to each decomposed subset. The requested content may be the same as the content sent by the ruleDevice to the inputDevice in the above embodiment.
The content of the request to subscribe to the notification condition may be as follows:
to is the address of the resource To which A belongs
CN:{
Oic.r.value.conditional(
Valuecondition:“>17”;)
}
In addition, each target resource is bound with an oil.r.value.conditional resource, which is used for limiting the condition for the target resource to send the subscription notification message.
S873, after the inputDevice sets the notification condition, the inputDevice may send a message that the setting of the notification condition is completed to the cloud platform.
S875, the cloud platform may send a message that the setting notification condition is completed to the ruleDevice. The subscription notification condition of the resource may be a trigger condition in this embodiment of the application.
And after all the request messages are completed and the response messages are received, the cloud platform informs the ruleDevice that the task of setting the informing condition of the subscription resource is completed.
S877, when the attribute information of the subscribed first resource changes, the inputDevice firstly judges the content of the oic.r.value.conditional resource; if the condition set in the oil.r.value.condition (i.e., the condition of value condition) is satisfied after the value of the subscription resource is changed, S879 is performed. The subscription notification message is not transmitted if the condition set in the oil.r.value.condition is not satisfied after the value of the subscription resource is changed.
S879, triggering the subscription notification message, and sending the subscription notification message to the server, wherein the subscription notification message carries or indicates the changed resource value
S881, after receiving the subscription notification message, the ruleDevice calculates a ruleExpression, determines the ruleExpression, and if it is true, executes S883. The subscription notification message may be a notification message in the embodiment of the present application.
S883, rule behavior of ruleDevice ruleAction.
Based on the foregoing embodiments, the present application provides a transmission apparatus for messages in the internet of things, where the apparatus includes each included unit and each module included in each unit, and may be implemented by a processor in a server/a first device/a cloud platform; of course, it can also be implemented by logic circuits; in implementation, the processor may be a Central Processing Unit (CPU), a Microprocessor (MPU), a Digital Signal Processor (DSP), a Field Programmable Gate Array (FPGA), or the like.
Fig. 9 is a schematic structural diagram of a transmission device for messages in the internet of things according to an embodiment of the present application, and as shown in fig. 9, the transmission device 9 may be disposed in a server, and includes:
a request sending unit 91, configured to send a first request to a first device, where the first request indicates that the first device sends a notification message to a server when attribute information of a first resource satisfies a trigger condition, where the notification message includes or indicates the attribute information of the first resource;
a notification message receiving unit 92, configured to receive a notification message sent by the first device.
In some embodiments, the transmission means 9 further comprise: a resource subscribing unit 93, configured to send a request for subscribing to a first resource to a first device; and receiving a first message sent by the first device, wherein the first message comprises or indicates that the first resource subscription is successful.
In some embodiments, the transmission means 9 further comprise: a second message receiving unit 94, configured to receive a second message sent by the first device, where the second message includes or indicates that the first device will complete setting of the trigger condition.
In some embodiments, the transmission means 9 further comprise: a resource creating unit 95 for creating a rule resource; the rule resources comprise constraint conditions and N input resources corresponding to the constraint conditions; n is a positive integer greater than or equal to 1, and the N input resources include a first resource.
In some embodiments, the transmission means 9 further comprise: a trigger condition determining unit 96, configured to determine the constraint condition as the trigger condition if N is equal to 1.
In some embodiments, the transmission device 9 further comprises: and a rule executing unit 97, configured to determine that the attribute information of the first resource satisfies the constraint condition, and execute a rule behavior.
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; the N sub-conditions correspond to the N input resources one by one;
determining a sub-condition corresponding to the first resource from the N sub-conditions;
and determining a trigger condition based on the sub-condition corresponding to the first resource.
In some embodiments, the triggering condition determining unit 96 is further configured to determine a sub-condition corresponding to the first resource as the triggering condition.
In some embodiments, the transmission means 9 further comprise: a rule executing unit 97, configured to determine that the attribute information of the first resource satisfies a sub-condition corresponding to the first resource; acquiring attribute information of N-1 resources except a first resource in N input resources; and if the attribute information of each resource in the N-1 resources meets the corresponding sub-condition of each resource, executing the rule behavior.
In some embodiments, the rule resources further comprise: m behavior resources corresponding to the constraint condition, wherein M is a positive integer greater than or equal to 1; the rule executing unit 97 is further configured to modify 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 a trigger condition, including one of:
the attribute information of the first resource is greater than a first threshold;
in a first time period, the attribute information of the first resource is larger than a first threshold value;
the attribute information of the first resource is smaller than a second threshold;
within a second duration, the attribute information of the first resource is smaller than a second threshold;
the attribute information of the first resource changes within the third duration, and the changed value is greater than the first value.
Fig. 10 is a schematic structural diagram of a component of a further transmission device for messages in the internet of things according to an embodiment of the present application, as shown in fig. 10, the transmission device 10 may be disposed in a server, and the transmission device 10 includes:
a second message receiving unit 101, configured to receive a second message sent by the cloud platform, where the second message includes or indicates that the first device completes setting of a trigger condition, and the trigger condition is used to trigger the first device to send a notification message to the server when the attribute information of the first resource of the first device meets the trigger condition, where the notification message includes or indicates the attribute information of the first resource;
a notification message receiving unit 102, configured to receive a notification message sent by a first device.
In some embodiments, the transmission device 10 further comprises: a resource subscribing unit 103, configured to send a request for subscribing to a first resource to a first device; and receiving a first message sent by the first device, wherein the first message comprises or indicates that the first resource subscription is successful.
In some embodiments, the transmission device 10 further comprises: a resource creating unit 104, configured to create a rule resource, where 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 a first resource.
In some embodiments, the transmission device 10 further comprises: a third message sending unit 105, configured to send a third message to the cloud platform, where the third message includes or indicates: constraints and N input resources.
In some embodiments, the transmission device 10 further comprises: and a rule executing 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 a rule behavior.
In some embodiments, the rule executing unit 106 is further configured to determine that the attribute information of the first resource satisfies a sub-condition corresponding to the first resource if N is greater than 1; acquiring attribute information of N-1 resources except a first resource in N input resources; and if the attribute information of each resource in the N-1 resources meets the corresponding sub-condition of each resource, executing the rule behavior.
In some embodiments, the rule resources further comprise: m behavior resources corresponding to the constraint condition, wherein M is a positive integer greater than or equal to 1; the rule executing unit 106 is further configured to modify attribute information of the M behavior resources.
In some embodiments, the attribute information of the first resource satisfies a trigger condition, including one of:
the attribute information of the first resource is greater than a first threshold;
in a first time period, the attribute information of the first resource is larger than a first threshold value;
the attribute information of the first resource is smaller than a second threshold value;
within a second duration, the attribute information of the first resource is smaller than a second threshold;
the attribute information of the first resource changes within the third duration, and the changed value is greater than the first value.
Fig. 11 is a schematic structural diagram of a component of a transmission device for messages in the internet of things according to an embodiment of the present application, and as shown in fig. 11, the transmission device11 may be disposed in a cloud platform, and the transmission device11 includes:
a request sending unit 111, configured to send a first request to the first device, where the first request indicates that the first device sends a notification message to the server when the attribute information of the first resource satisfies the trigger condition, where the notification message includes or indicates the attribute information of the first resource.
In some embodiments, the transmission device11 further comprises: a second message forwarding unit 112, configured to receive a second message sent by the first device, where the second message includes or indicates that the first device completes setting of the trigger condition; and sending the second message to the server.
In some embodiments, the transmission device11 further comprises: a third message receiving unit 113, configured to receive a third message sent by the server, where the third message includes or indicates: a constraint and N input resources corresponding to the constraint; n is a positive integer greater than or equal to 1, and the N input resources include a first resource.
In some embodiments, the transmission device11 further comprises: a trigger condition determining unit 114, configured to determine the constraint condition as the trigger condition if N is equal to 1.
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; 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; determining a sub-condition corresponding to the first resource from the N sub-conditions; and determining a trigger condition based on the sub-condition corresponding to the first resource.
In some embodiments, the triggering condition determining unit 114 is further configured to determine a sub-condition corresponding to the first resource as the triggering condition.
In some embodiments, the attribute information of the first resource satisfies a trigger condition, including one of:
the attribute information of the first resource is greater than a first threshold;
in a first time period, the attribute information of the first resource is larger than a first threshold value;
the attribute information of the first resource is smaller than a second threshold;
within a second duration, the attribute information of the first resource is smaller than a second threshold;
the attribute information of the first resource changes within the third duration, and the changed value is greater than the first value.
Fig. 12 is a schematic structural diagram of a transmission apparatus for messages in the internet of things according to another embodiment of the present application, and as shown in fig. 12, the transmission apparatus 12 may be disposed in a first device, and the transmission apparatus 12 includes:
the listening unit 121 is configured to listen to attribute information of the first resource.
A notification message sending unit 122, 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 attribute information of the first resource.
In some embodiments, the transmission device12 further comprises: a condition setting unit 123, configured to receive a first request sent by a server, where the first request indicates that a first device sends a notification message to the server when attribute information of a first resource satisfies a trigger condition; and sending a second message to the server, wherein the second message comprises or indicates that the first equipment completes the setting of the trigger condition.
In some embodiments, the condition setting unit 123 is further configured to receive a first request sent by the cloud platform, where the first request indicates that the first device sends a notification message to the server when the attribute information of the first resource satisfies the trigger condition; and sending a second message to the cloud platform, wherein the second message comprises or indicates that the first device completes the setting of the trigger condition.
In some embodiments, the transmission device12 further comprises: a resource subscribing unit 124, configured to receive a request for subscribing to a first resource sent by a server; and sending a first message to the server, wherein the first message comprises or indicates that the subscription of the first resource is successful.
In some embodiments, the attribute information of the first resource satisfies a trigger condition, including one of:
the attribute information of the first resource is greater than a first threshold;
in a first time period, the attribute information of the first resource is larger than a first threshold value;
the attribute information of the first resource is smaller than a second threshold;
within a second duration, the attribute information of the first resource is smaller than a second threshold;
the attribute information of the first resource changes within the third duration, and the changed value is greater than the first value.
The above description of the apparatus embodiments, similar to the above description of the method embodiments, has similar beneficial effects as the method embodiments. For technical details not disclosed in the embodiments of the apparatus of the present application, reference is made to the description of the embodiments of the method of the present application for understanding.
It should be noted that, in the embodiment of the present application, if the method for transmitting messages in the internet of things is implemented in the form of a software functional module, and the method is sold or used as an independent product, the method may also be stored in a computer-readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions to enable a server/first device/cloud platform to execute all or part of the methods of the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read Only Memory (ROM), a magnetic disk, or an optical disk. Thus, 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 according to an embodiment of the present application, and as shown in fig. 13, the hardware entity of the server 13 includes: a processor 131 and a memory 132, wherein the memory 132 stores a computer program operable on the processor 131, and the processor 131 executes the program to implement the steps in the method performed by the server according to any one of the embodiments of fig. 3-5, 7and 8 a-8 c.
Fig. 14 is a schematic diagram of a hardware entity of a cloud platform provided in an embodiment of the present application, and as shown in fig. 14, the hardware entity of the first device14 includes: a processor 141 and a memory 142, wherein the memory 142 stores a computer program operable on the processor 141, and the processor 141 executes the computer program to implement the steps in the method executed by the cloud platform according to the embodiment corresponding to fig. 7 or fig. 8a to 8 c.
Fig. 15 is a schematic diagram of a hardware entity of a first device according to an embodiment of the present application, and as shown in fig. 15, the hardware entity of the first device15 includes: a processor 151 and a memory 152, wherein the memory 152 stores a computer program operable on the processor 151, and the processor 151 executes the program to implement the steps in the method performed by the first device of any of the embodiments of fig. 4, 5, 7and 8a to 8 c.
Embodiments of the present application provide a computer storage medium, which stores one or more programs, where the one or more programs are executable by one or more processors to implement the steps of the method performed by the server in the above-mentioned method.
The embodiment of the application provides a computer storage medium, which 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 method.
Embodiments of the present application provide a computer storage medium, which stores one or more programs, where the one or more programs are executable by one or more processors to implement the steps of the method performed by the first device in the above method.
Fig. 16 is a schematic structural diagram of a chip according to an embodiment of the present application. The chip 16 shown in fig. 16 includes a processor 161, and the processor 161 may call and run a computer program from a memory to implement the steps of the method performed by the server/cloud platform/first device in the embodiment of the present application.
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 performed by the server/cloud platform/first device in the embodiment of the present application.
The memory 162 may be a separate device from the processor 161, or may be integrated into the processor 161.
Optionally, the chip 16 may further include an input interface 163. The processor 161 may control the input interface 163 to communicate with other devices or chips, and specifically, may obtain information or data transmitted by other devices or chips.
Optionally, the chip 16 may also include an output interface 164. The processor 161 may control the output interface 164 to communicate with other devices or chips, and in particular, may output information or data to other devices or chips.
Optionally, the chip may be applied to the network device in the embodiment of the present application, and the chip may implement a corresponding process implemented by the network device in each method in the embodiment of the present application, and for brevity, details are not described here again.
Optionally, the chip may be applied to the server/cloud platform/first device in this embodiment, and the chip may implement a corresponding process implemented by the server/cloud platform/first device in each method in this embodiment, which is not described herein again for brevity.
It should be understood that the chips mentioned in the embodiments of the present application may also be referred to as a system-on-chip, a system-on-chip or a system-on-chip, etc.
An embodiment of the present application provides a computer program product, which includes a computer storage medium storing computer program code, where the computer program code includes instructions executable by at least one processor, and when the instructions are executed by the at least one processor, the steps of the method performed by the server/cloud platform/first device in the above method are implemented.
Optionally, the computer program product may be applied to the server/cloud platform/first device in this embodiment, and the computer program instructions enable the computer to execute corresponding processes implemented by the server/cloud platform/first device in the methods in this embodiment, which are not described herein again for brevity.
It is to be noted here that: the above description of the storage medium and server/first device/cloud platform embodiments is similar to the description of the method embodiments described above, with similar beneficial effects as the method embodiments. For technical details not disclosed in the embodiments of the storage medium and the server/first device/cloud platform of the present application, please refer to the description of the embodiments of the method of the present application for understanding.
It should be understood that the processor of the embodiments of the present application may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method embodiments may be performed by integrated logic circuits of hardware in a processor or instructions in the form of software. The Processor may be a general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, or discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules may be located in ram, flash, rom, prom, or eprom, registers, etc. as is well known in the art. The storage medium is located in a memory, and a processor reads information in the memory and completes the steps of the method in combination with hardware of the processor.
It will be appreciated that the memory in the embodiments of the subject application can be either volatile memory or nonvolatile memory, or can include both volatile and nonvolatile memory. The non-volatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash Memory. Volatile Memory can be Random Access Memory (RAM), which acts as external cache Memory. By way of example, but not limitation, many forms of RAM are available, such as Static random access memory (Static RAM, SRAM), dynamic Random Access Memory (DRAM), synchronous Dynamic random access memory (Synchronous DRAM, SDRAM), double Data Rate Synchronous Dynamic random access memory (DDR SDRAM), enhanced Synchronous SDRAM (ESDRAM), synchronous link SDRAM (SLDRAM), and Direct Rambus RAM (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to comprise, without being limited to, these and any other suitable types of memory.
It should be understood that the above memories are exemplary but not limiting illustrations, for example, the memories in the embodiments of the present application may also be Static Random Access Memory (SRAM), dynamic random access memory (dynamic RAM, DRAM), synchronous Dynamic Random Access Memory (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (enhanced SDRAM, ESDRAM), synchronous Link DRAM (SLDRAM), direct Rambus RAM (DR RAM), and the like. That is, the memory in the embodiments of the present application is intended to comprise, without being limited to, these and any other suitable types of memory.
Here, it should be noted that: the above description of the storage medium, computer program, chip and device embodiments is similar to the description of the method embodiments described above, with similar advantageous effects as the method embodiments. For technical details not disclosed in the embodiments of the storage medium and the apparatus of the present application, reference is made to the description of the embodiments of the method of the present application for understanding.
It should be appreciated that reference throughout this specification to "one embodiment" or "an embodiment of the present application" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present application. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. It should be understood that, in the various embodiments of the present application, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application. The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
In a case that no specific description is given, the server/first device/cloud platform performs any step in the embodiments of the present application, and the step may be performed by a processor of the server/first device/cloud platform. Unless otherwise specified, the embodiments of the present application do not limit the sequence in which the server/first device/cloud platform performs the following steps. In addition, the data may be processed in the same way or in different ways in different embodiments. It should be further noted that any step in this embodiment of the application may be independently executed by the server/the first device/the cloud platform, that is, when the server/the first device/the cloud platform executes any step in the following embodiments, it may not depend on the execution of other steps.
In several embodiments provided in the present application, it should be understood that the disclosed server/first device/cloud platform and method may be implemented in other ways. The above-described server/first device/cloud platform embodiment is only illustrative, for example, the division of the unit is only one logical function division, and there may be another division manner in actual implementation, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the resource devices or units may be electrical, mechanical or other forms.
The methods disclosed in the several method embodiments provided in the present application may be combined arbitrarily without conflict to obtain new method embodiments.
Features disclosed in several of the product embodiments provided in the present application may be combined in any combination to yield new product embodiments without conflict.
The features disclosed in the several methods or server/first device/cloud platform embodiments provided by the present application may be combined arbitrarily without conflict to obtain a new method embodiment or server/first device/cloud platform embodiment.
Those of ordinary skill in the art will understand that: all or part of the steps for realizing the method embodiments can be completed by hardware related to program instructions, the program can be stored in a computer readable storage medium, and the program executes the steps comprising the method embodiments when executed; and the aforementioned storage medium includes: various media that can store program codes, such as a removable storage resource device, a Read Only Memory (ROM), a magnetic disk, or an optical disk.
Alternatively, the integrated units described above in the present application may be stored in a computer-readable storage medium if they are implemented in the form of software functional modules and sold or used as independent products. Based on such understanding, the technical solutions of the embodiments of the present application may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions to enable a server/first device/cloud platform to execute all or part of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a removable storage resource device, a ROM, a magnetic or optical disk, or other various media that can store program code.
In the embodiments of the present application, the descriptions of the same steps and the same contents in different embodiments may be mutually referred to. In the embodiment of the present application, the term "and" does not affect the order of the steps, for example, the server/first device/cloud platform executes a and executes B, where a and B are executed first by the server/first device/cloud platform, or B and a are executed first by the server/first device/cloud platform, or B is executed while a is executed by the server/first device/cloud platform.
It should be understood that the inclusion of a in a message in this application means that a is present in a message. The indication A in one message indicates that the message comprises the identifier of A, so that the A can be acquired based on the identifier of A. It should be understood that different resource devices may perform the same steps in the same manner.
It should be understood that although fig. 5 and fig. 8a to 8c show a complete flow chart of the transmission method of the message in the internet of things, in the execution process, the resource device may not execute some of the steps, as long as the steps executed by the resource device make the scheme complete. It should be understood that in the signaling interactions of fig. 4, 5, 7and 8a to 8c, the dashed lines represent control plane signaling and the implementations represent user plane signaling.
The above description is only an embodiment of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily think of the changes or substitutions within the technical scope of the present application, and shall cover the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Industrial applicability
By adopting the transmission scheme of the message in the internet of things, the server can only receive the notification message sent by the first device when the attribute information of the first resource meets the trigger condition, so that the number of the 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 comprises the following steps:
    the method comprises the steps that a server sends a first request to first equipment, wherein the first request indicates that the first equipment sends a notification message to the server under the condition that attribute information of first resources meets a trigger condition, and the notification message comprises or indicates the attribute information of the first resources;
    and receiving the notification message sent by the first equipment.
  2. The method of claim 1, wherein prior to the server sending the first request to the first device, further comprising:
    sending a request to the first device to subscribe to the first resource;
    receiving a first message sent by the first device, wherein the first message includes or indicates that the first resource subscription is successful.
  3. The method of claim 1 or 2, wherein after the server sends the first request to the first device, further comprising:
    and receiving a second message sent by the first equipment, wherein the second message comprises or indicates that the first equipment completes the setting of the trigger condition.
  4. The method of any of claims 1 to 3, wherein prior to the server sending the first request to the first device, further comprising:
    creating a rule resource; the rule resources comprise constraint conditions and N input resources corresponding to the constraint conditions; n is a positive integer greater than or equal to 1, and the N input resources include the first resource.
  5. The method of claim 4, wherein prior to the server sending the first request to the first device, further comprising:
    and if N is equal to 1, determining the constraint condition as the trigger condition.
  6. The method of claim 5, wherein after receiving the notification message sent by the first device, further comprising:
    and determining that the attribute information of the first resource meets the constraint condition, and executing a rule action.
  7. The method of claim 4, wherein prior to the server sending the first request to the first device, further comprising:
    if N is larger than 1, decomposing the constraint condition into N sub-conditions; the N sub-conditions correspond to the N input resources one to one;
    determining a sub-condition corresponding to the first resource from the N sub-conditions;
    and determining the trigger condition based on the sub-condition corresponding to the first resource.
  8. The method of claim 7, wherein the determining the trigger condition based on the sub-condition corresponding to the first resource comprises: and determining the sub-condition corresponding to the first resource as the trigger condition.
  9. The method of claim 8, wherein after receiving the notification message sent by the first device, further comprising: determining that the attribute information of the first resource meets a sub-condition corresponding to the first resource;
    acquiring attribute information of N-1 resources except the first resource in the N input resources;
    and if the attribute information of each resource in the N-1 resources meets the corresponding sub-condition of each resource, executing rule behaviors.
  10. The method of claim 6 or 9, wherein the rule resource further comprises: m behavior resources corresponding to the constraint condition, wherein M is a positive integer greater than or equal to 1; the execute rule action includes:
    and modifying the attribute information of the M behavior resources.
  11. The method of any of claims 1 to 10, wherein the attribute information of the first resource satisfies a trigger condition, including one of:
    the attribute information of the first resource is greater than a first threshold;
    within a first duration, the attribute information of the first resource is greater than the first threshold;
    the attribute information of the first resource is smaller than a second threshold value;
    within a second duration, the attribute information of the first resource is smaller than the second threshold;
    and the attribute information of the first resource is changed in the third duration, and the changed value is greater than the first value.
  12. A method for transmitting messages in the Internet of things comprises the following steps:
    the method comprises the steps that a server receives a second message sent by a cloud platform, wherein the second message comprises or indicates that a first device completes setting of a trigger condition, the trigger condition is used for triggering the first device to send a notification message to the server under the condition that attribute information of a first resource of the first device meets the trigger condition, and the notification message comprises or indicates the attribute information of the first resource;
    and receiving the notification message sent by the first equipment.
  13. The method of claim 12, wherein before the server receives the second message sent by the cloud platform, the method further comprises:
    sending a request to the first device to subscribe to the first resource;
    receiving a first message sent by the first device, wherein the first message includes or indicates that the first resource subscription is successful.
  14. 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:
    creating a rule resource, wherein the rule resource comprises 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. The method of claim 14, wherein before the server receives the second message sent by the cloud platform, the method further comprises:
    sending a third message to the cloud platform, the third message including or indicating: the constraints and the N input resources.
  16. The method according to claim 14 or 15, wherein after receiving the notification message sent by the first device, the method further comprises:
    and if N is equal to 1, determining that the attribute information of the first resource meets the constraint condition, and executing a rule action.
  17. The method according to claim 14 or 15, wherein after receiving the notification message sent by the first device, the method further comprises:
    if N is larger than 1, determining that the attribute information of the first resource meets the corresponding sub-condition of the first resource;
    acquiring attribute information of N-1 resources except the first resource in the N input resources;
    and if the attribute information of each resource in the N-1 resources meets the corresponding sub-condition of each resource, executing a rule behavior.
  18. The method of claim 16 or 17, wherein the rule resource further comprises: m behavior resources corresponding to the constraint condition, wherein M is a positive integer greater than or equal to 1; the execute rule action includes:
    and modifying the attribute information of the M behavior resources.
  19. The method of any of claims 12 to 18, wherein the attribute information of the first resource satisfies the trigger condition, including one of:
    the attribute information of the first resource is greater than a first threshold;
    within a first duration, the attribute information of the first resource is greater than the first threshold;
    the attribute information of the first resource is smaller than a second threshold;
    within a second duration, the attribute information of the first resource is smaller than the second threshold;
    and the attribute information of the first resource is changed in the third time length, and the changed value is greater than the first value.
  20. A method for transmitting messages in the Internet of things comprises the following steps:
    the method comprises the steps that a cloud platform sends a first request to first equipment, wherein the first request indicates that the first equipment sends a notification message to a server under the condition that attribute information of first resources meets a trigger condition, and the notification message comprises or indicates the attribute information of the first resources.
  21. The method of claim 20, wherein after the cloud platform sends the first request to the first device, further comprising:
    receiving a second message sent by the first device, wherein the second message comprises or indicates that the first device completes the setting of the trigger condition;
    sending the second message to the server.
  22. The method of claim 20 or 21, wherein prior to the cloud platform sending the first request to the first device, further comprising:
    receiving a third message sent by the server, wherein the third message includes or indicates: a constraint and N input resources corresponding to the constraint; n is a positive integer greater than or equal to 1, and the N input resources include the first resource.
  23. The method of claim 22, wherein prior to the cloud platform sending the first request to the first device, further comprising:
    and if N is equal to 1, determining the constraint condition as the trigger condition.
  24. The method of claim 22, wherein prior to the cloud platform sending the first request to the first device, further comprising:
    if N is larger than 1, decomposing the constraint condition into N sub-conditions; the N sub-conditions correspond to the N input resources one to one;
    determining a sub-condition corresponding to the first resource from the N sub-conditions;
    and determining the trigger condition based on the sub-condition corresponding to the first resource.
  25. The method of claim 24, wherein the determining the trigger condition based on the sub-condition corresponding to the first resource comprises:
    and determining the sub-condition corresponding to the first resource as the trigger condition.
  26. The method of any of claims 20 to 25, wherein the attribute information of the first resource satisfies a trigger condition, including one of:
    the attribute information of the first resource is greater than a first threshold;
    within a first duration, the attribute information of the first resource is greater than the first threshold;
    the attribute information of the first resource is smaller than a second threshold value;
    within a second duration, the attribute information of the first resource is smaller than the second threshold;
    and the attribute information of the first resource is changed in the third duration, and the changed value is greater than the first value.
  27. A method for transmitting messages in the Internet of things comprises the following steps:
    the first equipment monitors attribute information of the first resource;
    if the attribute information of the first resource meets the triggering condition, sending a notification message to a server; the notification message includes or indicates attribute information of the first resource.
  28. The method of claim 27, wherein prior to the first device listening for attribute information of the first resource, further comprising:
    receiving a first request sent by the server, wherein the first request indicates that the first device sends the notification message to the server under the condition that the attribute information of the first resource meets the trigger condition;
    and sending a second message to the server, wherein the second message comprises or indicates that the first equipment completes the setting of the trigger condition.
  29. The method of claim 27, wherein prior to the first device listening for attribute information of the first resource, further comprising:
    receiving a first request sent by a cloud platform, wherein the first request indicates that the first device sends the notification message to the server when the attribute information of the first resource meets the trigger condition;
    sending a second message to the cloud platform, wherein the second message includes or indicates that the first device completes the setting of the trigger condition.
  30. The method according to any of claims 27 to 29, wherein prior to listening for attribute information of the first resource, the method comprises:
    receiving a request for subscribing the first resource sent by the server;
    sending a first message to the server, the first message including or indicating that the first resource subscription was successful.
  31. The method of any of claims 27 to 30, wherein the attribute information of the first resource satisfies the trigger condition, including one of:
    the attribute information of the first resource is greater than a first threshold;
    within a first duration, the attribute information of the first resource is greater than the first threshold;
    the attribute information of the first resource is smaller than a second threshold;
    within a second duration, the attribute information of the first resource is smaller than the second threshold;
    and the attribute information of the first resource is changed in the third duration, and the changed value is greater than the first value.
  32. A transmission device of messages in the Internet of things comprises:
    a request sending unit, configured to send a first request to a first device, where the first request indicates that the first device sends a notification message to the server when attribute information of a first resource meets a trigger condition, where the notification message includes or indicates the attribute information of the first resource;
    a notification message receiving unit, configured to receive the notification message sent by the first device.
  33. A transmission device for messages in the Internet of things comprises:
    a second message receiving unit, configured to receive a second message sent by a cloud platform, where the second message includes or indicates that a first device completes setting of a trigger condition, where the trigger condition is used to trigger the first device to send a notification message to the server when attribute information of a first resource of the first device meets the trigger condition, and the notification message includes or indicates the attribute information of the first resource;
    a notification message receiving unit, configured to receive the notification message sent by the first device.
  34. A transmission device for messages in the Internet of things comprises:
    a request sending unit, configured to send a first request to a first device, where the first request indicates that the first device sends a notification message to the server when attribute information of a first resource satisfies a trigger condition, where the notification message includes or indicates the attribute information of the first resource.
  35. A transmission device for messages in the Internet of things comprises:
    the monitoring unit is used for monitoring the attribute information of the first resource;
    a notification message sending unit, configured to send a notification message to a server if the attribute information of the first resource satisfies a trigger condition; the notification message includes or indicates attribute information of the first resource.
  36. A server, comprising: a memory and a processor, wherein the processor is configured to,
    the memory stores a computer program operable on the processor,
    the processor implementing the steps of the method of any one of claims 1 to 11 when executing the program or implementing the steps of the method of any one of claims 12 to 19 when executing the program.
  37. A cloud platform, comprising: a memory and a processor, wherein the processor is capable of,
    the memory stores a computer program operable on the processor,
    the processor, when executing the program, performs the steps of the method of any one of claims 20 to 26.
  38. A first device, comprising: a memory and a processor, wherein the processor is capable of,
    the memory stores a computer program operable on the processor,
    the processor, when executing the program, performs the steps of the method of any one of claims 27 to 31.
  39. A computer storage medium storing one or more programs, the one or more programs being executable by one or more processors to perform the steps of the method of any one of claims 1 to 11;
    alternatively, the one or more programs may be executable by one or more processors to perform the steps of the method of any one of claims 12 to 19;
    alternatively, the one or more programs may be executable by one or more processors to perform the steps of the method of any one of claims 20 to 26;
    alternatively, the one or more programs may be executable by one or more processors to perform the steps of the method of any of claims 27 to 31.
  40. A chip, comprising: a processor for calling and running a computer program from a memory so that a device on which the chip is installed performs the steps of the method according to any one of claims 1 to 11;
    or, for calling and running a computer program from a memory, so that a device on which the chip is installed performs the steps of the method according to any one of claims 12 to 19;
    or a computer program for calling and running from a memory a computer program that causes a device on which the chip is installed to perform the steps of the method of any one of claims 20 to 26;
    or to invoke and run a computer program from memory to cause a device on which the chip is installed to perform the steps of a method as claimed in any one of claims 27 to 31.
  41. A computer program product comprising a computer storage medium storing computer program code comprising instructions executable by at least one processor, the instructions when executed by the at least one processor implementing the steps in the method of any one of claims 1 to 11;
    or, when executed by the at least one processor, implement a step in the method of any one of claims 12 to 19;
    or, when executed by the at least one processor, to implement the steps in the method of any one of claims 20 to 26;
    or, when executed by the at least one processor, to implement the steps in the method of any one of claims 27 to 31.
CN202080098894.6A 2020-04-20 2020-04-20 Message transmission method and device in Internet of things, server, equipment and cloud platform Pending CN115362666A (en)

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
CN115362666A true CN115362666A (en) 2022-11-18

Family

ID=78270967

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202080098894.6A Pending CN115362666A (en) 2020-04-20 2020-04-20 Message transmission method and device in Internet of things, server, equipment and cloud platform

Country Status (2)

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

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106937241A (en) * 2015-12-31 2017-07-07 华为技术有限公司 Time series data detection method and device
CN107682229A (en) * 2017-11-03 2018-02-09 云南合续环境科技有限公司 A kind of monitoring method of equipment, monitoring device and system
CN207490955U (en) * 2017-11-03 2018-06-12 云南合续环境科技有限公司 A kind of monitoring device and system
CN108243216A (en) * 2016-12-26 2018-07-03 华为技术有限公司 Method, end side equipment, cloud side apparatus and the end cloud cooperative system of data processing
CN109495524A (en) * 2017-09-11 2019-03-19 华为技术有限公司 A kind of method, apparatus and system of Internet of Things resource subscription
CN109857518A (en) * 2019-01-08 2019-06-07 平安科技(深圳)有限公司 A kind of distribution method and equipment of Internet resources
CN110266529A (en) * 2019-06-14 2019-09-20 苏州凌瑞智能技术有限公司 Extensive individualized intelligent service customization method based on Internet of Things

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10270609B2 (en) * 2015-02-24 2019-04-23 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
CN110247786A (en) * 2018-03-08 2019-09-17 佛山市顺德区美的电热电器制造有限公司 Household appliance, Cloud Server, client, control method and storage medium based on NB-IoT

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106937241A (en) * 2015-12-31 2017-07-07 华为技术有限公司 Time series data detection method and device
CN108243216A (en) * 2016-12-26 2018-07-03 华为技术有限公司 Method, end side equipment, cloud side apparatus and the end cloud cooperative system of data processing
CN109495524A (en) * 2017-09-11 2019-03-19 华为技术有限公司 A kind of method, apparatus and system of Internet of Things resource subscription
CN107682229A (en) * 2017-11-03 2018-02-09 云南合续环境科技有限公司 A kind of monitoring method of equipment, monitoring device and system
CN207490955U (en) * 2017-11-03 2018-06-12 云南合续环境科技有限公司 A kind of monitoring device and system
CN109857518A (en) * 2019-01-08 2019-06-07 平安科技(深圳)有限公司 A kind of distribution method and equipment of Internet resources
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
WO2021212293A1 (en) 2021-10-28

Similar Documents

Publication Publication Date Title
CN110908879B (en) Reporting method, reporting device, reporting terminal and recording medium of buried point data
CN106649640B (en) Instant search method and device
US10148739B2 (en) M2M data querying and invoking methods, querying and invoking devices, and system
CN110650203B (en) Data transmission method, device and system, computer storage medium and electronic equipment
CN110677462A (en) Access processing method, system, device and storage medium for multi-block chain network
CN109343983B (en) Information interaction method, device, equipment and storage medium between function modules
US20220272171A1 (en) Method and apparatus for subscribing to resource
CN114327710B (en) Function management method, management device, terminal equipment and readable storage medium
CN111338710A (en) Application program control method and device, electronic equipment and storage medium
CN112448992A (en) Edge computing task scheduling method and device
CN108052401B (en) System attribute monitoring method, terminal device and computer readable storage medium
CN115362666A (en) Message transmission method and device in Internet of things, server, equipment and cloud platform
CN109254858B (en) Data sharing method, device and equipment of active window and storage medium
CN108595274B (en) Program synchronization control method, device, system, computer device and storage medium
CN110045378B (en) Method and device for searching terminal equipment and related equipment
JP6412641B2 (en) Communication link transmission method, apparatus and terminal
CN114840574A (en) Data query method, server, node and storage medium
CN107992363B (en) Data processing method and device
CN111124923B (en) Running state query method and device, server equipment and storage medium
CN115168438B (en) Transaction return data integration method and related device
CN113032010B (en) Command transmission control method, terminal and computer readable storage medium
CN114666241B (en) Method and device for identifying industrial control asset information
CN112988125B (en) Data bridging method, device, equipment and storage medium
CN114401302B (en) Linkage action execution method, linkage action execution device and storage medium
CN112583613B (en) Method and device for creating PM task

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination