WO2017215476A1 - 一种用于物联网的智能设备控制方法、装置和设备 - Google Patents
一种用于物联网的智能设备控制方法、装置和设备 Download PDFInfo
- Publication number
- WO2017215476A1 WO2017215476A1 PCT/CN2017/087135 CN2017087135W WO2017215476A1 WO 2017215476 A1 WO2017215476 A1 WO 2017215476A1 CN 2017087135 W CN2017087135 W CN 2017087135W WO 2017215476 A1 WO2017215476 A1 WO 2017215476A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- action
- message
- identifier
- state
- smart device
- 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.)
- Ceased
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/12—Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
- H04L67/125—Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks involving control of end-device applications over a network
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
- H04L67/025—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/10—Network architectures or network communication protocols for network security for controlling access to devices or network resources
- H04L63/101—Access control lists [ACL]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
Definitions
- the present invention relates to the field of computer application technologies, and in particular, to a smart device control method, apparatus and device for the Internet of Things.
- Intelligent hardware is a technological concept following the smart phone. It transforms the traditional device through the combination of software and hardware, so that it has intelligent functions. Intelligent hardware is usually embodied in various smart devices such as smart home appliances, smart cars, smart wearable devices, and smart medical devices. These smart devices can be interconnected through the cloud and the Internet of Things. When a control device controls a smart device through the cloud and the Internet of Things, an important issue is how the cloud communicates with the smart device. At present, the method of communication between the smart device and the cloud adopts a traditional network communication protocol, such as a TCP/IP protocol. However, these protocols are too complicated for smart devices, and there are many redundant parts that need to be implemented by a large client, which cannot meet the simple and fast requirements of intelligent hardware.
- the present invention provides a smart device control method, apparatus and device for the Internet of Things, so as to meet the simple and fast requirements of intelligent hardware.
- the invention provides a smart device control method for the Internet of Things, the method comprising:
- the cloud device sends a first message to the smart device, where the first message includes an action identifier
- the sending the first message to the smart device includes:
- the sending the first message to the smart device includes:
- the cloud device sends a first message to the smart device corresponding to the destination device identification information according to the destination device identification information carried in the control command.
- the sending the first message to the smart device includes:
- the sending the first message to the smart device includes:
- the action identifier corresponding to the event is included in the first message and sent to the smart device corresponding to the target device identification information, according to the correspondence between the preset event and the action identifier and the destination device identifier information.
- the method further includes:
- the action identifier is registered, or the action identifier and the control parameter corresponding to the action identifier are registered.
- the method further includes:
- the control parameter is included in the first message.
- the method before the sending the first message, the method further includes:
- the action state includes:
- the method further includes:
- the first message is resent, or an abnormal condition is recorded, or an abnormal condition is provided to the control device.
- the invention also provides a smart device control method for the internet of things, the method comprising:
- the smart device receives the first message sent by the cloud device, where the first message includes an action identifier
- a second message where the second message includes the action identifier and an action state, where the action state is used to indicate an action execution status of the smart device for the first message.
- the method before the smart device receives the first message sent by the cloud device, the method further includes:
- the smart device reports an event to the cloud device.
- the method further includes:
- the action identifier and the control parameter corresponding to the action identifier are registered.
- the method further includes:
- the smart device determines, by using the action identifier included in the first message, a control parameter corresponding to the registered action identifier, so as to perform a corresponding action by using the control parameter.
- the first message further includes a control parameter corresponding to the action identifier
- the smart device performs a corresponding action using the control parameter.
- the method further includes:
- the action identifier is registered locally according to the device configuration file.
- the method further includes:
- the smart device acquires a function module registration file sent by the development device or preset to the smart device;
- the function module is registered according to the function module registration file.
- the function module registration file includes:
- the initialization process information of each function module is used to automatically run the initialization process of each function module when the smart device system starts;
- the action state includes:
- the present invention also provides an intelligent device control device for the Internet of Things, which is disposed in a cloud device, and the device includes:
- a message sending unit configured to send a first message to the smart device, where the first message includes an action identifier
- a message receiving unit configured to receive a second message returned by the smart device, where the second message includes the action identifier and an action state, where the action state is used to indicate an action execution status of the smart device for the first message .
- the device further comprises:
- An instruction receiving unit configured to receive a control instruction sent by the control device
- the first determining unit is configured to determine, according to a correspondence between the preset control command and the action identifier, an action identifier corresponding to the received control command, and provide the determined action identifier to the message sending unit.
- the message sending unit is configured to send a first message to the smart device corresponding to the destination device identification information according to the destination device identification information carried in the control command.
- the device further comprises:
- An event receiving unit configured to receive an event reported by the smart device
- the second determining unit is configured to determine, according to the correspondence between the preset event and the action identifier, an action identifier corresponding to the event received by the event receiving unit, and provide the determined action identifier to the message sending unit.
- the device further comprises:
- An event receiving unit configured to receive an event reported by another smart device
- the third determining unit is configured to provide an action identifier corresponding to the event to the message sending unit according to a correspondence between the preset event and the action identifier and the destination device identifier information.
- the device further comprises:
- a registration interface configured to receive a device configuration file sent by the development device
- the registration unit is configured to register an action identifier according to the device configuration file, or register an action identifier and a control parameter corresponding to the action identifier.
- the device further includes:
- a fourth determining unit configured to acquire a control parameter corresponding to the determined action identifier, and provide the control parameter to the message sending unit;
- the first message sent by the message sending unit further includes the control parameter.
- the device further comprises:
- the identity verification unit is configured to determine whether the identifier information of the destination terminal device corresponding to the first message is a valid device identifier, and if not, the message sending unit is prohibited from sending the first message to the smart device.
- the action state includes:
- the message sending unit is further configured to:
- the message receiving unit receives the second message including the fourth state, resending the first message.
- the present invention also provides an intelligent device control device for an Internet of Things, which is disposed on a smart device, and the device includes:
- a message receiving unit configured to receive a first message sent by the cloud device, where the first message includes an action identifier
- a message sending unit configured to return a second message to the cloud device, where the second message includes the action identifier and an action state, where the action state is used to indicate that the smart device performs an action for the first message situation.
- the device further comprises:
- An event reporting unit configured to report an event to the cloud device.
- the device further comprises:
- a registration interface configured to receive a device configuration file sent by the development device
- a registration unit configured to register, in the smart device, an action identifier and a control parameter corresponding to the action identifier according to the device configuration file.
- the device further comprises:
- a determining unit configured to determine, by using the action identifier included in the first message, a control parameter corresponding to the registered action identifier, so that the smart device performs a corresponding action by using the control parameter.
- the first message further includes a control parameter corresponding to the action identifier
- the smart device performs a corresponding action using the control parameter.
- the device further comprises:
- a registration interface configured to receive a device configuration file sent by the development device
- a registration unit configured to register an action identifier on the smart device according to the device configuration file.
- the device further comprises:
- a registration interface configured to acquire a function module registration file sent by the development device or preset to the smart device
- the registration unit is configured to register the function module according to the function module registration file.
- the function module registration file includes:
- the initialization process information of each function module is used to automatically run the initialization process of each function module when the smart device system starts;
- the action state includes:
- the invention also provides an apparatus, including
- One or more processors are One or more processors;
- One or more programs the one or more programs being stored in the memory, by the one or Multiple processors execute to implement the following operations:
- the invention also provides an apparatus, including
- One or more processors are One or more processors;
- One or more programs the one or more programs being stored in the memory, executed by the one or more processors to:
- a second message where the second message includes the action identifier and an action state, where the action state is used to indicate an action execution status of the smart device for the first message.
- the present invention implements the control interaction between the cloud device and the smart device by using the first Action message including the Action identifier and the second Action message including the Action identifier and the Action state, and compares the traditional communication protocol.
- the way is simpler and faster.
- FIG. 1 is a system architecture diagram based on an embodiment of the present invention
- FIG. 2 is a flowchart of a main method according to an embodiment of the present invention.
- FIG. 3 is a schematic diagram of a remote development configuration according to an embodiment of the present invention.
- FIG. 4 is a schematic structural diagram of a Device Profile according to an embodiment of the present disclosure.
- FIG. 5 is a flowchart of an action message interaction between a cloud device and a smart device according to an embodiment of the present invention
- FIG. 6 is a structural diagram of an apparatus installed in a cloud device according to an embodiment of the present disclosure.
- FIG. 7 is a structural diagram of an apparatus installed on a smart device according to an embodiment of the present disclosure.
- FIG. 8 is a schematic structural diagram of a device according to an embodiment of the present invention.
- the word “if” as used herein may be interpreted as “when” or “when” or “in response to determining” or “in response to detecting.”
- the phrase “if determined” or “if detected (conditions or events stated)” may be interpreted as “when determined” or “in response to determination” or “when detected (stated condition or event) “Time” or “in response to a test (condition or event stated)”.
- the system includes at least a cloud device and a smart device, wherein the cloud device may be a server in the cloud or a server cluster composed of multiple servers.
- the smart device may be, for example, a smart home device, an intelligent network device, a smart car, a smart wearable device, a smart medical device, or the like.
- the smart home appliances may include home appliances equipped with intelligent hardware such as smart TVs, smart air conditioners, smart water heaters, smart lights, smart doors and windows, smart refrigerators, smart air purifiers, and the like.
- the intelligent network device may include, for example, a switch equipped with smart hardware, a wireless AP, and the like.
- Smart wearable devices may include, for example, smart watches equipped with smart hardware, smart glasses, smart bracelets, smart helmets, AR devices, VR devices, and the like.
- the smart medical device may include, for example, an intelligent thermometer equipped with intelligent hardware, an intelligent blood pressure meter, a smart blood glucose meter, and the like.
- the system may also include control devices and/or development devices.
- the control device is responsible for sending control instructions for the smart device to the cloud
- the development device is responsible for developing the smart device.
- the device configuration file is sent to the cloud device. The details will be described in detail in the subsequent embodiments.
- FIG. 2 is a flowchart of a main method according to an embodiment of the present invention. As shown in FIG. 2, the method may include the following steps:
- the cloud device sends a first Action message to the smart device, where the first Action message includes an Action identifier.
- first Action message and the second Action message are the names of the first message and the second message listed in the embodiment of the present invention, but the embodiment of the present invention is not limited to such a message name.
- the first action message sent by the cloud device to the smart device may be triggered by, but not limited to, the following two situations:
- the cloud device is triggered by the control device, that is, the cloud device receives the control sent by the control device.
- the control device may be a smart terminal that can be used by any user, such as a smart phone, a PC, a laptop computer, etc., on which a control interface for the smart device can be provided to the user, through which the specific interface can be sent to the cloud for specific Control instructions for smart devices.
- the device identifier of the smart device acquired by the control device is included in the control instruction.
- the device identifier of the smart device may be any information that can uniquely identify the smart device.
- a unique IoT ID uniformly assigned to each smart device by the identifier distribution device may be adopted, and the ID is solidified at the factory.
- the chip of the device cannot be falsified or illegally obtained.
- the cloud device sends the first Action message to the smart device corresponding to the destination device identification information by using the destination device identifier information carried in the control command.
- each control instruction and the action identifier may be preset in the cloud, and each control instruction has an action identifier corresponding thereto, and the action identifier may be registered in the cloud device local and the smart device end in advance. If only the Action identifier is registered in the cloud device, and only the Action identifier is included in the first Action message, the control identifier and the control parameter corresponding to the Action identifier may be registered on the smart device. If the control parameter corresponding to the action identifier and the action identifier is registered in the cloud device, the control parameter corresponding to the action identifier may be included in the first action message, and the smart device end may only register the action identifier.
- the control parameter corresponding to the action identifier and the action identifier may be registered in both the cloud device and the smart device, and the control parameter may or may not be included in the first Action message.
- the general principle is that the smart device can obtain the control parameter corresponding to the action identifier included in the first Action message.
- the control parameters corresponding to the Action ID and the Action ID are registered on both sides as an example.
- the Action identifier may include any description information that can be used to determine the action, such as an Action id or an Action name.
- the cloud After receiving the control command sent by the control device, the cloud determines the corresponding Action identifier according to the corresponding relationship between the control command and the Action identifier, and the Action ID is included in the first Action message. After the corresponding action identifier is determined, the action identifier and the corresponding control parameter are sent to the smart terminal by using the first action message according to the information registered in advance.
- the second case is that the cloud device is triggered by the smart device, that is, after receiving the event reported by the smart device, the first action message is triggered.
- the control of the smart device by the cloud device is based on some specific events. For example, an event that controls voice recording triggers the cloud device to perform voice recognition, and then sends corresponding control.
- the cloud device can send the first Action message to the smart device after receiving the event reported by the smart device.
- the cloud device queries the business logic related to the event.
- the correspondence between the Event and the Action identifier may be set in advance in the cloud device.
- the Action ID corresponding to the Event is actually determined, and then the Action is determined according to the information registered in advance locally.
- the identifier and its corresponding control parameter are sent to the smart terminal through the first Action message.
- the cloud device sends the first Action message to another smart device after receiving the event reported by the smart device.
- the cloud device queries the business logic related to the event.
- the business logic is actually the correspondence between the preset Event and the Action identifier and the destination device identification information. That is to say, on the one hand, the corresponding Action identifier can be determined by the Event, and the destination device identifier can be determined on the other hand, and then the Action ID is included in the first Action message and sent to the smart device corresponding to the destination device identifier.
- the cloud device may first determine the identifier information of the destination terminal device corresponding to the first action message before sending the first Action message (the destination device identifier information carried in the control command, and the identifier of the smart device sending the event). Whether the information or the registered destination device identification information corresponding to the event is a legal device identifier. If not, the first Action message is not sent to the smart device; if yes, the first Action message is allowed to be sent to the smart device.
- the cloud device can be configured with a legal device identifier in advance. If the device identifier of the smart device is uniformly allocated by the device, the cloud device can obtain a legal device identifier from the device.
- the cloud device receives the second Action message returned by the smart device, where the second Action message includes the Action ID and the Action state.
- the action identifier in the second Action message is consistent with the action identifier in the first Action message, and is used to indicate an association between the second Action message and the first Action message.
- the Action state is used to indicate the action execution status of the smart device for the first Action message. In view of different stages of the action execution, the Action state may include but is not limited to:
- First state indicating that the first Action message is received.
- the second state the preparation for indicating that the action is performed according to the control parameter corresponding to the Action identifier in the first Action message has been completed.
- the third state indicating that the execution of the action according to the control parameter corresponding to the Action identifier in the first Action message is completed.
- the fourth state indicating that an abnormality occurs in the execution of the action according to the control parameter corresponding to the Action identifier in the first Action message.
- the mechanism for the Action registration has been mentioned in the embodiment shown in FIG. 2 above, and the mechanism of the Action registration is described in detail below through a specific embodiment.
- the action involved in the embodiment of the present invention can be understood as the control information sent by the cloud device to the smart device, which corresponds to various functions provided by the smart device, and the action delivered by the cloud device may correspond to one action, or may correspond to one action. sequence.
- An Action message can be understood as a message for an Action to interact between a cloud device and a smart device.
- an Action identifier may be used to identify and distinguish each Action.
- the action identifier corresponds to a specific control parameter, wherein the control parameter may include an action type, such as play, pause, and the like. Some actions such as pauses only need the action type, but there are some other parameters such as playing, raising the volume, etc., which require some other parameters, such as playing the object and increasing the volume.
- These Action IDs and their corresponding control parameters can be defined by the Device Profile.
- the Device Profile can be in such a format as: "Action ID: Control Parameters", where multiple control parameters can be separated by commas, for example:
- Action2 name pause
- the action corresponding to action1 name is to play the apple; the action corresponding to action2 name is pause.
- the Device Profile can define the Event ID and its corresponding event parameters in addition to the Action ID and its corresponding control parameters.
- the format adopted can be "Event ID: Event Parameter", for example:
- a Device Profile for their own intelligent hardware (ie, smart devices), and then send the Device Profile to the cloud device and smart device through the development device, as shown in Figure 3.
- developers of smart devices can implement remote Action and Event configuration.
- a general Device Profile can be provided for a certain type of smart device.
- the intelligent speaker provided by the A smart speaker developer and the B smart speaker developer has functions of playing, pause, resume, and volume setting. These two smart speakers can share this Device Profile. For each of the two smart speakers with their own features, you can pass the separate Device Profile is defined. This method can reduce the duplication of intelligent hardware development, form accumulation, and at the same time reduce the development threshold of intelligent hardware, and facilitate the popularization of intelligent hardware development.
- the Device Profile can be described by a document, and more preferably, it can be organized in the form of a tree header file directory.
- the child nodes of each node are sub-functions of the node, as shown in FIG.
- the root node is a smart device, and its child nodes include: power module, audio module, video module, etc., and there may be more levels of child nodes, which are different in this figure.
- the configuration information corresponding to the power module, the audio module, and the video module is respectively stored on the node corresponding to the power module, the audio module, and the video module, including the action identifier, the corresponding control parameter, the event identifier, and the corresponding parameter. As shown in FIG.
- the power management related configuration information may be included on the power
- the audio control related configuration information voice_control.h
- the playlist related configuration information play_list.h
- the playback control related configuration information may include brightness control related configuration information (light_control.h) and image related configuration information (image.h). Where “.h” is the format suffix of the configuration information.
- the registration process in the cloud is mainly to: resolve the device profile of a certain type of smart device, and locally register the action identifiers included in the Device profile and the control parameters corresponding to the action identifier, the event identifier, and the event parameters corresponding to the event identifier. .
- the cloud device can perform the sending of the Action message and the receiving and processing of the Event message.
- the registration process on the smart device is mainly: the control device of the smart device resolves the Device Profile, and locally registers the Action IDs included in the Device Profile and the control parameters corresponding to the Action ID, the Event ID, and the event parameters corresponding to the Event ID. In this way, the smart device can receive, process, and send Action messages, and send and process Event messages.
- the registration on the smart device side may include the registration of the function module in addition to the Action registration and the Event registration.
- the so-called function module refers to the part of the smart device that has a specific function. For example, power modules, control modules, detection modules, and the like.
- the developer can send the function module registration file to the control center of the smart device through the development device, or directly preset to the control center of the smart device, and the control center of the smart device can register the function module according to the function module registration file.
- the function module registration file may include initialization process information of each function module, so that the smart device can automatically run the initialization process of each function module when the system is started.
- the function module registration file may further include an Action identifier supported by each function module, so that after receiving the first Action instruction, the control hub can determine a function module for performing an action according to the Action identifier therein, and control parameters corresponding to the Action identifier. Provided to the corresponding functional module for execution action.
- the developer can upgrade the smart device more easily.
- the device profile including the new action identifier and the corresponding control parameter can be sent to the cloud device and the smart device, the cloud device and The smart device can easily implement the upgrade of the new Action through the above registration mechanism.
- the cloud device and the smart device can register all the action identifiers included in the Device Profile, or register only the Action IDs that have not been registered. You can skip the existing Action IDs.
- FIG. 5 is a flowchart of an action message interaction between a cloud device and a smart device according to an embodiment of the present invention. As shown in FIG. 5, the process may specifically include the following steps:
- the cloud device sends a first Action message including an action identifier and a control parameter to the smart device, where the action is represented by an action message.
- the ID is uniquely identified by the Action identifier.
- the smart device after receiving the first Action message, the smart device returns a second Action message including the action identifier and the first state information to the cloud device, where the action is represented by an action_received message.
- the second Action message in this step is uniquely identified by the action identifier and the first state information, where the first state indicates that the first Action message is received.
- the smart device returns a second Action message including the action identifier and the second state information to the cloud device after completing the preparation for performing the action according to the control parameter in the first Action message, where the action is executed in the figure.
- Action_doing indicates.
- the second Action message in this step is uniquely identified by the Action identifier and the second state information, wherein the second state indicates that the preparation for performing the action according to the control parameter in the first Action message has been completed.
- the smart device After the smart device performs the action according to the control parameter, the smart device returns a second Action message including the action identifier and the third state information to the cloud device, where the action is represented by an action_done message.
- the second Action message in this step is uniquely identified by the action identifier and the third state information, wherein the third state indication is performed according to the control parameter in the first Action message.
- the smart device when the smart device performs an action according to the control parameter, the smart device returns to the cloud device, including The second Action message of the Action ID and the fourth state information is represented by an Action_Exception message.
- the second Action message in this step is uniquely identified by the Action identifier and the fourth state information, where the fourth state indicates that an abnormality occurs in the action according to the control parameter in the first Action message. It should be noted that step 505 does not necessarily appear after step 504, which may occur at any time after step 502, and may be performed whenever an abnormality occurs.
- Action_received is not received within the set time of sending the action, the action is resent. If Action_doing is not received within the set time of receiving Action_received, the action is resent. If Action_done is not received within the set time of receiving Action_doing, the action is resent. If Action_exception is received, the action is resent. In addition, you can set the maximum number of resends for the action. After the maximum number of retransmissions is reached, the action is not resent.
- various Action states received by the cloud device may be returned to the control device that sends the control command.
- FIG. 6 is a structural diagram of a device installed in a cloud device according to an embodiment of the present invention.
- the device may be configured in a cloud device to perform operations performed by the cloud device in the foregoing embodiment.
- the apparatus may include: a message sending unit 01 and a message receiving unit 02, and may further include: a first determining unit 03, an event receiving unit 04, a second determining unit 05, a third determining unit 06, and a registration.
- the main functions of each component are as follows:
- the message sending unit 01 is responsible for sending a first Action message to the smart device, where the first Action message includes at least an Action identifier.
- the message receiving unit 02 is responsible for receiving the second Action message returned by the smart device.
- the second Action message includes an Action identifier and an Action state, and the Action state is used to indicate an action execution status of the smart device for the first Action message.
- a set of Action IDs and Action states can uniquely identify a second Action message.
- sending the first Action message to the smart device may be triggered by the following two situations, but is not limited to the following two situations:
- the device identifier of the smart device acquired by the control device is included in the control instruction.
- the device identifier of the smart device may be any information that can uniquely identify the smart device.
- a unique IoT ID uniformly assigned to each smart device by the identifier distribution device may be adopted, and the ID is solidified at the factory.
- the chip of the device cannot be falsified or illegally obtained.
- the message sending unit 01 may send the first Action message to the smart device corresponding to the destination device identification information by using the destination device identification information carried in the control command.
- the identity verification unit (not shown) can And determining whether the identifier information of the destination terminal device corresponding to the first Action message is a valid device identifier, and if not, the message sending unit 01 is prohibited from sending the first Action message to the smart device. If the sending of the first Action message is triggered by the control message of the control device, the destination terminal device corresponding to the first Action message is the smart device corresponding to the destination device identifier included in the control message. If the sending of the first action message is triggered by the event of the same smart device, the smart device that sends the event is the destination terminal device corresponding to the first action message. If the sending of the first Action message is triggered by the event of the other smart device, the smart device corresponding to the destination device identifier determined by the event is the destination terminal device corresponding to the first Action message.
- a legal device identifier may be preset in the cloud device.
- the legal device identifier may be a unique Internet of Things ID that is uniformly allocated to each smart device by the identifier distribution device. The ID is fixed to the chip of the smart device at the factory. No, falsification and illegal access. If the device identifier of the smart device is uniformly allocated by the identifier distribution device, the cloud device may obtain a legal device identifier from the identifier distribution device in advance.
- the Action state included in the second Action message received by the message receiving unit 02 may include, but is not limited to, the following:
- First state indicating that the first Action message is received.
- the third state indicating that the execution of the action according to the control parameter corresponding to the Action identifier in the first Action message is completed.
- the message sending unit 01 may resend the first Action message.
- the message sending unit 01 may resend the first Action. Message.
- the message sending unit 01 may resend the first Action message.
- FIG. 7 is a structural diagram of a device installed in a smart device according to an embodiment of the present invention.
- the device is used to implement the function of the smart device in the foregoing method embodiment, and the device corresponds to the control hub involved in the method embodiment.
- the apparatus may include: a message receiving unit 11 and a message sending unit 12, and may further include: an event reporting unit 13, a registration interface 14, a registration unit 15, and a determining unit 16.
- the message receiving unit 11 is responsible for receiving the first Action message sent by the cloud device, where the first Action message includes at least an Action identifier.
- the action identifier and the control parameter corresponding to the action identifier need to be registered, and the determining unit 16 uses the Action identifier included in the first Action message to determine The locally registered action identifier identifies the corresponding control parameter, so that the smart device performs the corresponding action by using the control parameter.
- the device can also register the function module:
- the registration interface 14 acquires a function module registration file sent by the development device or preset to the smart device, and the registration unit 15 registers the function module according to the function module registration file.
- the Action states included in the foregoing second Action message may include but are not limited to the following:
- the third state indicating that the execution of the action according to the control parameter corresponding to the Action identifier in the first Action message is completed.
- the fourth state indicating that an abnormality occurs in the execution of the action according to the control parameter corresponding to the Action identifier in the first Action message.
- the second Action message includes an Action identifier and an Action state, where the Action state is used to indicate an action execution status of the smart device for the first Action message.
- Action name1 play, args: “Little Apple”.
- the action name1 is the action identifier, and the play and args: "small apple" are the control parameters.
- the cloud device determines, according to the ID2 included in the control instruction (an Internet of Things ID that is uniformly assigned by the identifier distribution device and uniquely identifies the smart device), the destination terminal device, that is, the intelligent audio, sends the first to the smart speaker.
- the first Action message may include the following fields: an action identifier and a control parameter.
- the smart sound After the smart sound returns a second Action message containing the action_received to the cloud device, the smart sound starts to perform the action execution according to the control parameter in the first Action message. After the preparation is completed, return a second Action message containing the action_doing to the cloud.
- the second Action message with the action state of action_doing may include the following fields: action name1 and the current action state (ie, action_doing), which can uniquely identify the message returned by the smart speaker.
- the smart sound After performing the action of playing the "Little Apple” audio, the smart sound returns a second Action message containing the action_done to the cloud device.
- the second Action message with the action state of action_done may include the following fields: action name1 and the current action state (ie, action_done), which can uniquely identify the instruction returned by the smart speaker.
- the cloud device can know the action execution state of the smart sound on the action according to the action state returned by the smart sound, thereby ensuring that the control executed by the cloud device is monitored in each state executed on the smart hardware device, thereby ensuring the complete execution of the action. Sex and tracing. In addition, the cloud device can also return the action status returned by the smart sound to the smart phone that sends the control command, so that the user can know the execution status of the action in time.
- the application scenario is an Event mechanism between the smart device and the cloud device.
- the cloud device determines an Action identifier, a control parameter, and a destination terminal device corresponding to the Event.
- the determined Action ID is: Action name2
- the control parameter is: light
- the destination terminal device is a smart light.
- the cloud device sends the action name2 and its corresponding control parameter to the smart light through the first Action message.
- the smart light can perform the smart light according to the Action name2 and its corresponding control parameter. Light up. And can return a second Action message in a different state.
- each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
- the above integrated unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computing Systems (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Health & Medical Sciences (AREA)
- Computer Hardware Design (AREA)
- Computer Security & Cryptography (AREA)
- General Engineering & Computer Science (AREA)
- Computer And Data Communications (AREA)
- Telephonic Communication Services (AREA)
- Selective Calling Equipment (AREA)
- Information Transfer Between Computers (AREA)
Abstract
本发明提供了一种用于物联网的智能设备控制方法、装置和设备,其中方法包括:云端设备向智能设备发送第一消息,所述第一消息包括动作标识;接收智能设备返回的第二消息,所述第二消息包括所述动作标识和动作状态,所述动作状态用于指示所述智能设备针对所述第一消息的动作执行状况。本发明相比较通过传统通信协议实现云端与智能设备间交互的方式,更加简单快捷。
Description
本申请要求2016年06月17日递交的申请号为201610436563.4、发明名称为“一种用于物联网的智能设备控制方法、装置和设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本发明涉及计算机应用技术领域,特别涉及一种用于物联网的智能设备控制方法、装置和设备。
智能硬件是继智能手机之后的一个科技概念,通过软硬件结合的方式对传统设备进行改造,进而让其拥有智能化的功能。智能硬件在产品上通常体现为各种智能设备,诸如智能家电、智能汽车、智能穿戴设备、智能医疗设备等。这些智能设备可以通过云端以及物联网实现互联,当一个控制设备通过云端以及物联网对某个智能设备进行控制时,一个重要的问题是云端与智能设备如何进行通信。目前智能设备与云端通信的方法采用传统的网络通讯协议,例如TCP/IP协议等。但这些协议对于智能设备来说过于复杂,存在很多的冗余部分,需要一个庞大的客户端才能够实现,并不能够满足智能硬件简单快速的需求。
发明内容
有鉴于此,本发明提供了一种的用于物联网的智能设备控制方法、装置和设备,以便于满足智能硬件简单快速的需求。
具体技术方案如下:
本发明提供了一种用于物联网的智能设备控制方法,该方法包括:
云端设备向智能设备发送第一消息,所述第一消息包括动作标识;
接收智能设备返回的第二消息,所述第二消息包括所述动作标识和动作状态,所述动作状态用于指示所述智能设备针对所述第一消息的动作执行状况。
根据本发明一优选实施方式,所述向智能设备发送第一消息包括:
所述云端设备接收控制设备发送的控制指令;
依据预设的控制指令与动作标识之间的对应关系,确定接收到的控制指令对应的动
作标识,将确定的动作标识包含在所述第一消息中发送给所述智能设备。
根据本发明一优选实施方式,所述向智能设备发送第一消息包括:
所述云端设备依据所述控制指令中携带的目的设备标识信息,向与该目的设备标识信息对应的智能设备发送第一消息。
根据本发明一优选实施方式,所述向智能设备发送第一消息包括:
所述云端设备接收智能设备上报的事件;
依据预设的事件与动作标识之间的对应关系,确定接收到的事件对应的动作标识,将确定的动作标识包含在所述第一消息中发送给所述智能设备。
根据本发明一优选实施方式,所述向智能设备发送第一消息包括:
所述云端设备接收另一智能设备上报的事件;
依据预设的事件与动作标识、目的设备标识信息之间的对应关系,将与所述事件对应的动作标识包含在所述第一消息中发送给所述目的设备标识信息对应的智能设备。
根据本发明一优选实施方式,该方法还包括:
所述云端设备接收开发设备发送的设备配置文件;
依据所述设备配置文件,注册动作标识,或者注册动作标识以及动作标识对应的控制参数。
根据本发明一优选实施方式,若所述云端设备注册动作标识以及动作标识对应的控制参数,则在确定出动作标识后,还包括:
获取注册的所述确定出的动作标识对应的控制参数,将该控制参数包含在所述第一消息中。
根据本发明一优选实施方式,在发送所述第一消息之前,还包括:
判断所述第一消息对应的目的终端设备的标识信息是否为合法的设备标识,如果否,则禁止向所述智能设备发送第一消息。
根据本发明一优选实施方式,所述动作状态包括:
指示接收到所述第一消息的第一状态;或者,
指示依据所述动作标识对应的控制参数执行动作的准备工作已完成的第二状态;或者,
指示依据所述动作标识对应的控制参数执行动作已完毕的第三状态;或者,
指示依据所述动作标识对应的控制参数执行动作出现异常的第四状态。
根据本发明一优选实施方式,该方法还包括:
若在发送所述第一消息后的第一设定时长内未接收到包含所述第一状态的第二消息,则重发所述第一消息;或者,
若在接收到包含所述第一状态的第二消息后,在第二设定时长内未接收到包含所述第二状态的第二消息,则重发所述第一消息;或者,
若在接收到包含所述第二状态的第二消息后,在第三设定时长内未接收到包含所述第三状态的第二消息,则重发所述第一消息;或者,
若接收到包含所述第四状态的第二消息,则重发所述第一消息,或者记录异常状况,或者将异常状况提供给控制设备。
本发明还提供了一种用于物联网的智能设备控制方法,该方法包括:
智能设备接收云端设备发送的第一消息,所述第一消息包括动作标识;
向所述云端设备返回第二消息,所述第二消息包括所述动作标识和动作状态,所述动作状态用于指示所述智能设备针对所述第一消息的动作执行状况。
根据本发明一优选实施方式,在所述智能设备接收云端设备发送的第一消息之前,还包括:
所述智能设备向所述云端设备上报事件。
根据本发明一优选实施方式,该方法还包括:
所述智能设备接收开发设备发送的设备配置文件;
依据所述设备配置文件,注册动作标识以及动作标识对应的控制参数。
根据本发明一优选实施方式,该方法还包括:
所述智能设备利用所述第一消息中包含的动作标识,确定注册的该动作标识对应的控制参数,以便利用所述控制参数执行相应动作。
根据本发明一优选实施方式,所述第一消息中还包括所述动作标识对应的控制参数;
所述智能设备利用所述控制参数执行相应动作。
根据本发明一优选实施方式,该方法还包括:
所述智能设备接收开发设备发送的设备配置文件;
依据所述设备配置文件,在本地注册动作标识。
根据本发明一优选实施方式,该方法还包括:
所述智能设备获取开发设备发送的或者预置于智能设备的功能模块注册文件;
依据所述功能模块注册文件,进行功能模块的注册。
根据本发明一优选实施方式,所述功能模块注册文件包括:
各功能模块的初始化流程信息,用于在智能设备系统启动时自动运行各功能模块的初始化过程;或者,
各功能模块支持的动作标识。
根据本发明一优选实施方式,所述动作状态包括:
指示接收到所述第一消息的第一状态;或者,
指示依据所述动作标识对应的控制参数执行动作的准备工作已完成的第二状态;或者,
指示依据所述动作标识对应的控制参数执行动作已完毕的第三状态;或者,
指示依据所述动作标识对应的控制参数执行动作出现异常的第四状态。
本发明还提供了一种用于物联网的智能设备控制装置,设置于云端设备,该装置包括:
消息发送单元,用于向智能设备发送第一消息,所述第一消息包括动作标识;
消息接收单元,用于接收智能设备返回的第二消息,所述第二消息包括所述动作标识和动作状态,所述动作状态用于指示所述智能设备针对所述第一消息的动作执行状况。
根据本发明一优选实施方式,该装置还包括:
指令接收单元,用于接收控制设备发送的控制指令;
第一确定单元,用于依据预设的控制指令与动作标识之间的对应关系,确定接收到的控制指令对应的动作标识,将确定的动作标识提供给所述消息发送单元。
根据本发明一优选实施方式,所述消息发送单元,具体用于依据所述控制指令中携带的目的设备标识信息,向与该目的设备标识信息对应的智能设备发送第一消息。
根据本发明一优选实施方式,该装置还包括:
事件接收单元,用于接收智能设备上报的事件;
第二确定单元,用于依据预设的事件与动作标识之间的对应关系,确定所述事件接收单元接收到的事件对应的动作标识,将确定的动作标识提供给所述消息发送单元。
根据本发明一优选实施方式,该装置还包括:
事件接收单元,用于接收另一智能设备上报的事件;
第三确定单元,用于依据预设的事件与动作标识、目的设备标识信息之间的对应关系,将与所述事件对应的动作标识提供给所述消息发送单元。
根据本发明一优选实施方式,该装置还包括:
注册接口,用于接收开发设备发送的设备配置文件;
注册单元,用于依据所述设备配置文件,注册动作标识,或者注册动作标识以及动作标识对应的控制参数。
根据本发明一优选实施方式,若所述注册单元注册动作标识以及动作标识对应的控制参数,则该装置还包括:
第四确定单元,用于获取注册的所述确定出的动作标识对应的控制参数,将该控制参数提供给所述消息发送单元;
所述消息发送单元发送的所述第一消息还包括所述控制参数。
根据本发明一优选实施方式,该装置还包括:
身份验证单元,用于判断所述第一消息对应的目的终端设备的标识信息是否为合法的设备标识,如果否,则禁止所述消息发送单元向所述智能设备发送第一消息。
根据本发明一优选实施方式,所述动作状态包括:
指示接收到所述第一消息的第一状态;或者,
指示依据所述动作标识对应的控制参数执行动作的准备工作已完成的第二状态;或者,
指示依据所述动作标识对应的控制参数执行动作已完毕的第三状态;或者,
指示依据所述动作标识对应的控制参数执行动作出现异常的第四状态。
根据本发明一优选实施方式,所述消息发送单元,还用于:
若在发送所述第一消息后的第一设定时长内所述消息接收单元未接收到包含所述第一状态的第二消息,则重发所述第一消息;或者,
若在所述消息接收单元接收到包含所述第一状态的第二消息后,在第二设定时长内未接收到包含所述第二状态的第二消息,则重发所述第一消息;或者,
若在所述消息接收单元接收到包含所述第二状态的第二消息后,在第三设定时长内未接收到包含所述第三状态的第二消息,则重发所述第一消息;或者,
若所述消息接收单元接收到包含所述第四状态的第二消息,则重发所述第一消息。
本发明还提供了一种用于物联网的智能设备控制装置,设置于智能设备,该装置包括:
消息接收单元,用于接收云端设备发送的第一消息,所述第一消息包括动作标识;
消息发送单元,用于向所述云端设备返回第二消息,所述第二消息包括所述动作标识和动作状态,所述动作状态用于指示所述智能设备针对所述第一消息的动作执行状况。
根据本发明一优选实施方式,该装置还包括:
事件上报单元,用于向所述云端设备上报事件。
根据本发明一优选实施方式,该装置还包括:
注册接口,用于接收开发设备发送的设备配置文件;
注册单元,用于依据所述设备配置文件,在所述智能设备注册动作标识以及动作标识对应的控制参数。
根据本发明一优选实施方式,该装置还包括:
确定单元,用于利用所述第一消息中包含的动作标识,确定注册的该动作标识对应的控制参数,以便所述智能设备利用所述控制参数执行相应动作。
根据本发明一优选实施方式,所述第一消息中还包括所述动作标识对应的控制参数;
所述智能设备利用所述控制参数执行相应动作。
根据本发明一优选实施方式,该装置还包括:
注册接口,用于接收开发设备发送的设备配置文件;
注册单元,用于依据所述设备配置文件,在所述智能设备注册动作标识。
根据本发明一优选实施方式,该装置还包括:
注册接口,用于获取开发设备发送的或者预置于智能设备的功能模块注册文件;
注册单元,用于依据所述功能模块注册文件,进行功能模块的注册。
根据本发明一优选实施方式,所述功能模块注册文件包括:
各功能模块的初始化流程信息,用于在智能设备系统启动时自动运行各功能模块的初始化过程;或者,
各功能模块支持的动作标识。
根据本发明一优选实施方式,所述动作状态包括:
指示接收到所述第一消息的第一状态;或者,
指示依据所述动作标识对应的控制参数执行动作的准备工作已完成的第二状态;或者,
指示依据所述动作标识对应的控制参数执行动作已完毕的第三状态;或者,
指示依据所述动作标识对应的控制参数执行动作出现异常的第四状态。
本发明还提供了一种设备,包括
一个或者多个处理器;
存储器;
一个或者多个程序,所述一个或者多个程序存储在所述存储器中,被所述一个或者
多个处理器执行以实现如下操作:
向智能设备发送第一消息,所述第一消息包括动作标识;
接收智能设备返回的第二消息,所述第二消息包括所述动作标识和动作状态,所述动作状态用于指示所述智能设备针对所述第一消息的动作执行状况。
本发明还提供了一种设备,包括
一个或者多个处理器;
存储器;
一个或者多个程序,所述一个或者多个程序存储在所述存储器中,被所述一个或者多个处理器执行以实现如下操作:
接收云端设备发送的第一消息,所述第一消息包括动作标识;
向所述云端设备返回第二消息,所述第二消息包括所述动作标识和动作状态,所述动作状态用于指示所述智能设备针对所述第一消息的动作执行状况。
由以上技术方案可以看出,本发明通过包含Action标识的第一Action消息,以及包含Action标识和Action状态的第二Action消息实现云端设备与智能设备之间的控制交互,相比较通过传统通信协议的方式,更加简单快捷。
图1为本发明实施例所基于的系统架构图;
图2为本发明实施例提供的主要方法流程图;
图3为本发明实施例提供的远程开发配置的示意图;
图4为本发明实施例提供的一种Device Profile的结构示意图;
图5为本发明实施例提供的云端设备与智能设备之间的Action消息交互流程图;
图6为本发明实施例提供的设置于云端设备的装置结构图;
图7为本发明实施例提供的设置于智能设备的装置结构图;
图8为本发明实施例提供的设备结构示意图。
为了使本发明的目的、技术方案和优点更加清楚,下面结合附图和具体实施例对本发明进行详细描述。
在本发明实施例中使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本
发明。在本发明实施例和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。
应当理解,本文中使用的术语“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。
取决于语境,如在此所使用的词语“如果”可以被解释成为“在……时”或“当……时”或“响应于确定”或“响应于检测”。类似地,取决于语境,短语“如果确定”或“如果检测(陈述的条件或事件)”可以被解释成为“当确定时”或“响应于确定”或“当检测(陈述的条件或事件)时”或“响应于检测(陈述的条件或事件)”。
为了方便对本发明的理解,首先对于本发明所基于的系统架构进行简单描述。如图1中所示,该系统至少包括云端设备和智能设备,其中云端设备可以是云端的一个服务器,也可以是由多个服务器构成的服务器集群。智能设备可以是诸如智能家电设备、智能网络设备、智能汽车、智能穿戴式设备、智能医疗设备等。其中智能家电设备可以包括诸如智能电视、智能空调、智能热水器、智能电灯、智能门窗、智能冰箱、智能空气净化器等搭载了智能硬件的家电设备。智能网络设备可以包括诸如搭载了智能硬件的交换机、无线AP等。智能穿戴式设备可以包括诸如搭载了智能硬件的智能手表、智能眼镜、智能手环、智能头盔、AR设备、VR设备等等。智能医疗设备可以包括诸如搭载了智能硬件的智能体温计、智能血压仪、智能血糖仪等。
除此之外,该系统还可以包括控制设备和/或开发设备。其中控制设备负责向云端发送针对智能设备的控制指令,开发设备负责针对智能设备的开发工作,在本发明中体现为向云端设备发送设备配置文件。具体将在后续实施例中详细描述。
本发明提供的方式主要用于实现云端设备与智能设备之间的信息交互,图2为本发明实施例提供的主要方法流程图,如图2中所示,该方法可以包括以下步骤:
在201中,云端设备向智能设备发送第一Action消息,该第一Action消息包括Action标识。
需要说明的是,第一Action消息和第二Action消息为本发明实施例中列举的第一消息和第二消息的名称,但本发明实施例并不限于这种消息名称。
云端设备向智能设备发送第一Action消息可以但不限于以下两种情况下触发:
第一种情况:云端设备受到控制设备的触发,即云端设备接收到控制设备发送的控
制指令。例如,该控制设备可以是诸如智能手机、PC、笔记本电脑等任意用户可以使用的智能终端,在该控制设备上可以向用户提供针对智能设备的控制界面,通过该控制界面可以向云端发送针对特定智能设备的控制指令。
在该控制指令中包含控制设备获取到的智能设备的设备标识。该智能设备的设备标识可以是任意的能够唯一标识智能设备的信息,优选地,可以采用由标识分配设备统一分配给各智能设备的、唯一的物联网ID,该ID在出厂时被固化于智能设备的芯片中,不可篡改和非法获取。云端设备利用该控制指令中携带的目的设备标识信息,向与该目的设备标识信息对应的智能设备发送第一Action消息。
在这种情况下,可以在云端预先设置各控制指令与Action标识之间的对应关系,每一种控制指令存在与其对应的Action标识,Action标识可以预先在云端设备本地和智能设备端进行注册,若在云端设备仅注册了Action标识,在第一Action消息中仅包括Action标识,则在智能设备端可以注册Action标识以及Action标识对应的控制参数。若在云端设备注册了Action标识和Action标识对应的控制参数,则在第一Action消息中还可以包括Action标识对应的控制参数,则智能设备端就可以仅注册Action标识。也可以在云端设备和智能设备都注册Action标识以及Action标识对应的控制参数,则在第一Action消息中可以包括控制参数,也可以不包括控制参数。总的原则就是,只要智能设备能够获取到第一Action消息包含的Action标识对应的控制参数即可。在后续实施例中均以两边都注册Action标识以及Action标识对应的控制参数为例。其中Action标识可以包括任何可以用于确定该动作的描述信息,例如可以采用Action id或Action名称等形式。
具体的注册过程将在后续实施例中详述。云端接收到控制设备发送的控制指令后,依据控制指令与Action标识之间的对应关系,确定出对应的Action标识,将Action标识包含在第一Action消息中下发。或者在确定出对应的Action标识后,再依据预先在本地注册的信息,将Action标识及其对应的控制参数通过第一Action消息下发给智能终端。
第二种情况:云端设备受到智能设备端的触发,即接收到智能设备上报的Event后,触发第一Action消息的下发。在一些业务逻辑中,云端设备对智能设备的控制是基于一些特定事件的,例如控制语音录制的Event会触发云端设备进行语音识别后,下发对应的控制。
在这种情况下,云端设备可以接收到一个智能设备上报的Event后,向该智能设备下发第一Action消息。
当智能设备向云端设备上报该Event时,云端设备查询与该Event相关的业务逻辑。
可以预先在云端设备设置Event与Action标识之间的对应关系,在查询与该Event相关的业务逻辑时,实际上就是确定该Event对应的Action标识,然后再依据预先在本地注册的信息,将Action标识及其对应的控制参数通过第一Action消息下发给智能终端。
还存在这样的情况:云端设备接收到一个智能设备上报的Event后,向另一个智能设备下发第一Action消息。
当智能设备向云端上报该Event时,云端设备查询与该Event相关的业务逻辑。这里的业务逻辑实际上是预置的Event与Action标识以及目的设备标识信息之间的对应关系。也就是说,通过Event一方面可以确定出对应的Action标识,另一方面可以确定出目的设备标识,然后将该Action标识包含在第一Action消息中发送给该目的设备标识对应的智能设备。
对于上述两种情况,云端设备在发送第一Action消息之前,可以首先判断该第一Action消息对应的目的终端设备的标识信息(控制指令中携带的目的设备标识信息、发送Event的智能设备的标识信息或者已注册的与Event对应的目的设备标识信息),是否为合法的设备标识,如果否,则禁止向智能设备发送第一Action消息;如果是,才允许向智能设备发送第一Action消息。
其中,在云端设备处可以预先设置合法的设备标识,若智能设备的设备标识由标识分配设备统一分配,则云端设备可以预先从标识分配设备处获取合法的设备标识。
当然除了上述两种情况的触发之外,还可以存在其他触发方式,例如云端设备定期的Action下发,在此不再一一列举。
对于第一Action消息而言,除了包括Action标识、控制参数、智能设备的标识信息之外,还可以包含其他内容字段,本发明对此不加以限制。
在202中,云端设备接收智能设备返回的第二Action消息,该第二Action消息包括上述Action标识和Action状态。
其中,第二Action消息中的Action标识与第一Action消息中的Action标识一致,用以指示该第二Action消息与第一Action消息之间的关联。Action状态用于指示智能设备针对第一Action消息的动作执行状况,鉴于动作执行的不同阶段,Action状态可以包括但不限于:
第一状态:指示接收到第一Action消息。
第二状态:指示依据第一Action消息中的Action标识所对应的控制参数执行动作的准备工作已完成。
第三状态:指示依据第一Action消息中的Action标识所对应的控制参数执行动作已完毕。
第四状态:指示依据第一Action消息中的Action标识所对应的控制参数执行动作出现异常。
针对这几种状态的第二Action消息的发送情况,将在后续实施例中进行详细描述。
在上面图2所示的实施例中已经提及关于Action注册的机制,下面通过具体实施例对Action注册的机制进行详细描述。本发明实施例中涉及的Action可以理解为云端设备下发给智能设备的控制信息,其对应的是智能设备提供的各种功能,云端设备下发的Action可以对应一个动作,也可以对应一个动作序列。Action消息可以理解为针对Action在云端设备和智能设备之间交互的消息。
为了区分不同的动作,在本发明实施例中,可以采用Action标识来标识和区分各Action。Action标识与具体的控制参数对应,其中控制参数可以包括动作类型,例如播放、暂停等。诸如暂停等一些Action仅需要动作类型即可,但还有一些诸如播放、调高音量等Action需要一些其他的参数,例如播放对象、调高音量的幅度。这些Action标识及其对应的控制参数可以通过设备配置文件(Device Profile)进行定义。Device Profile中可以采用这样的格式:“Action标识:控制参数”,其中多个控制参数可以采用逗号隔开,例如:
action1 name:play,args:“小苹果”
action2 name:pause
其中,action1 name对应的动作是播放小苹果;action2 name对应的动作是暂停。
另外,Device Profile除了可以定义Action标识及其对应的控制参数之外,还可以定义Event标识及其对应的事件参数。采用的格式可以为“Event标识:事件参数”,例如:
event1 name:power_low args:10%
表示电量低于10%的事件。
开发者可以针对自己的智能硬件(即智能设备)定义Device Profile,然后通过开发设备将Device Profile发送给云端设备和智能设备,如图3所示。通过这种方式,智能设备的开发者就能够实现远程的Action和Event的配置。在本发明实施例中,可以针对某一类智能设备提供一个通用的Device Profile,例如A智能音箱开发者和B智能音箱开发者提供的智能音箱都有播放、暂停、恢复、音量设置等功能,这两种智能音箱就可以共用这个Device Profile。对于两种智能音箱各自有特色的功能,则可以通过分别的Device
Profile进行定义。这种方式可以减少智能硬件开发的重复劳动,形成累积,同时也降低了智能硬件的开发门槛,便于智能硬件开发的普及。
Device Profile可以通过一个文档来说明,更优地,可以通过树形的头文件目录形式进行组织。在该树形的头文件目录中,各节点的子节点是该节点的子功能,如图4中所示。根节点为智能设备(device),其子节点包括:电源模块(power)、音频模块(audio)、视频模块(video)……,还可以存在更多层次的子节点,在此图中不一一穷举。在电源模块、音频模块、视频模块对应的节点上分别存储电源模块、音频模块、视频模块所对应的配置信息,包括Action标识及其对应控制参数、Event标识及其对应参数。如图4中所示,power上可以包括电源管理相关的配置信息(power_manage.h),audio上可以包括声音控制相关的配置信息(voice_control.h)、播放列表相关的配置信息(play_list.h)、播放控制相关的配置信息(play_control.h),vedio上可以包括亮度控制相关的配置信息(light_control.h)、图像相关的配置信息(image.h)。其中,“.h”为配置信息的格式后缀。
在云端的注册过程主要是:解析某类型智能设备的Device Profile,针对该类型智能设备在本地注册Device Profile所包含的各Action标识以及Action标识对应的控制参数、Event标识以及Event标识对应的事件参数。这样云端设备就能够进行Action消息的下发和Event消息的接收、处理。
在智能设备端的注册过程主要是:智能设备的控制中枢解析Device Profile,在本地注册Device Profile所包含的各Action标识以及Action标识对应的控制参数、Event标识以及Event标识对应的事件参数。这样,智能设备就能够针对Action消息进行接收、处理和发送,以及对Event消息进行发送和处理。
另外,与云端设备的注册不太一样的是,在智能设备端的注册除了包含Action注册和Event注册之外,还可以包含功能模块的注册,所谓功能模块指的是智能设备中具有特定功能的部分,例如电源模块、控制模块、检测模块等。开发者通过开发设备能够将功能模块注册文件发送给智能设备的控制中枢中,或者直接预置于智能设备的控制中枢,智能设备的控制中枢能够依据该功能模块注册文件进行功能模块的注册。其中功能模块注册文件可以包括各功能模块的初始化流程信息,使得智能设备在系统启动时能够自动运行各功能模块的初始化过程。另外,功能模块注册文件还可以包括各功能模块支持的Action标识,使得控制中枢接收到第一Action指令后,能够依据其中的Action标识确定执行动作的功能模块,并将该Action标识对应的控制参数提供给相应的功能模块以执行
动作。
通过上述注册机制,开发者对智能设备的升级更加简单,例如当有新的Action标识时,可以将包含该新的Action标识及对应控制参数的Device Profile发送给云端设备和智能设备,云端设备和智能设备通过上述的注册机制,就能够轻松实现新的Action的升级。其中云端设备和智能设备在注册过程中,可以对Device Profile包含的所有Action标识均进行注册,也可以仅注册尚未注册的Action标识,对于本地已经存在的Action标识可以跳过。
在上面图2所示的实施例中以及提及关于第二Action消息的几种情况,下面结合一个具体实施例对云端设备和智能设备之间的Action消息交互进行详细描述。图5为本发明实施例提供的云端设备与智能设备之间的Action消息交互流程图,如图5中所示,该流程可以具体包括以下步骤:
在501中,云端设备向智能设备发送包含Action标识和控制参数的第一Action消息,图中以动作(Action)消息进行表示。
在该第一Action消息(对应于图2所示实施例中的第一Action消息)中,通过Action标识进行唯一标识。
在502中,智能设备接收到第一Action消息后,向云端设备返回包括上述Action标识和第一状态信息的第二Action消息,图中以动作_已接收(Action_received)消息表示。
本步骤中的第二Action消息通过Action标识和第一状态信息进行唯一标识,其中第一状态指示接收到第一Action消息。
在503中,智能设备在依据第一Action消息中的控制参数完成执行动作的准备工作候,向云端设备返回包括上述Action标识和第二状态信息的第二Action消息,图中以动作_执行中(Action_doing)表示。
本步骤中的第二Action消息通过Action标识和第二状态信息进行唯一标识,其中第二状态指示依据第一Action消息中的控制参数执行动作的准备工作已完成。
在504中,智能设备在依据控制参数执行动作完毕后,向云端设备返回包括上述Action标识和第三状态信息的第二Action消息,图中以动作_已完成(Action_done)消息表示。
本步骤中的第二Action消息通过Action标识和第三状态信息进行唯一标识,其中第三状态指示依据第一Action消息中的控制参数执行动作完毕。
在505中,智能设备在依据控制参数执行动作发生异常时,向云端设备返回包括上
述Action标识和第四状态信息的第二Action消息,图中以动作_异常(Action_exception)消息表示。
本步骤中的第二Action消息通过Action标识和第四状态信息进行唯一标识,其中第四状态指示依据第一Action消息中的控制参数执行动作出现异常。需要说明的是,步骤505并不一定出现于步骤504之后,其可能产生于步骤502之后的任何时间中,只要发生异常,就可能会执行。
对于云端设备而言,若在发送Action的设定时长内未接收到Action_received,则重发Action。若在接收到Action_received的设定时长内未接收到Action_doing,则重发Action。若在接收到Action_doing的设定时长内未接收到Action_done,则重发Action。若接收到Action_exception,则重发Action。另外,也可以设置Action的重发次数上限,达到该重发次数上限后,不再重发Action。
另外,对于云端设备接收到的各种Action状态,可以返回给发送控制指令的控制设备。
以上是对本发明所提供的方法进行的详细描述,下面结合具体实施例对本发明所提供的装置进行详细描述。
图6为本发明实施例提供的设置于云端设备的装置结构图,该装置可以设置于云端设备,用以完成上述实施例中云端设备所执行的操作。如图6所示,该装置可以包括:消息发送单元01和消息接收单元02,还可以进一步包括:第一确定单元03、事件接收单元04、第二确定单元05、第三确定单元06、注册接口07、注册单元08和第四确定单元09。各组成单元的主要功能如下:
消息发送单元01负责向智能设备发送第一Action消息,第一Action消息中至少包括Action标识。
消息接收单元02负责接收智能设备返回的第二Action消息,第二Action消息包括Action标识和Action状态,Action状态用于指示智能设备针对第一Action消息的动作执行状况。一组Action标识和Action状态能够对一个第二Action消息进行唯一标识。
其中,对于云端设备而言,向智能设备发送第一Action消息可以受以下两种情况触发,但并不限于以下两种情况:
第一种情况:指令接收单元接收控制设备发送的控制指令。例如,该控制设备可以是诸如智能手机、PC、笔记本电脑等任意用户可以使用的智能终端,在该控制设备上可以向用户提供针对智能设备的控制界面,通过该控制界面可以向云端发送针对特定智能
设备的控制指令。
在该控制指令中包含控制设备获取到的智能设备的设备标识。该智能设备的设备标识可以是任意的能够唯一标识智能设备的信息,优选地,可以采用由标识分配设备统一分配给各智能设备的、唯一的物联网ID,该ID在出厂时被固化于智能设备的芯片中,不可篡改和非法获取。消息发送单元01可以利用该控制指令中携带的目的设备标识信息,向与该目的设备标识信息对应的智能设备发送第一Action消息。
第一确定单元03负责依据预设的控制指令与Action标识之间的对应关系,确定接收到的控制指令对应的Action标识,将确定的Action标识提供给消息发送单元。
第二种情况:云端设备受到智能设备端的触发,即接收到智能设备上报的Event后,触发第一Action消息的下发。在一些业务逻辑中,云端设备对智能设备的控制是基于一些特定事件的,例如控制语音录制的Event会触发云端设备进行语音识别后,下发对应的控制。
在第二种情况下,又可以分为两种类型:
一种类型是,收到一个智能设备上报的Event后,下发对该同一智能设备控制。即事件接收单元04接收智能设备上报的Event。第二确定单元05依据预设的Event与Action标识之间的对应关系,确定事件接收单元04接收到的Event对应的Action标识,将确定的Action标识提供给消息发送单元01。
另一种类型是,上报Event的智能设备和下发控制所针对的智能设备并不是同一个智能设备。即事件接收单元04接收另一智能设备上报的Event;第三确定单元06依据预设的Event与Action标识、目的设备标识信息之间的对应关系,将与Event对应的Action标识提供给消息发送单元01。
在本装置中,可以通过向开发设备开放注册接口的方式,实现Action的远程注册。即该装置中的注册接口07接收开发设备发送的设备配置文件,然后注册单元08依据设备配置文件,在本地注册Action标识,或者在本地注册Action标识以及Action标识对应的控制参数。
若注册单元08在本地注册Action标识以及Action标识对应的控制参数,则第四确定单元09可以获取确定出的Action标识在本地注册的对应的控制参数,将该控制参数提供给消息发送单元01。此时,消息发送单元01发送的第一Action消息还可以进一步包括控制参数。
无论采用上述那种情况,为了保证交互安全性,身份验证单元(图中未示出)可以
判断第一Action消息对应的目的终端设备的标识信息是否为合法的设备标识,如果否,则禁止消息发送单元01向智能设备发送第一Action消息。若第一Action消息的发送由控制设备的控制消息触发,则第一Action消息对应的目的终端设备为控制消息所包含的目的设备标识所对应的智能设备。若第一Action消息的发送由同一智能设备的Event触发,则发送该Event的智能设备即为第一Action消息对应的目的终端设备。若第一Action消息的发送由另一智能设备的Event触发,则根据该Event确定出的目的设备标识所对应的智能设备即为第一Action消息对应的目的终端设备。
其中,在云端设备处可以预先设置合法的设备标识,该合法的设备标识可以由标识分配设备统一分配给各智能设备的、唯一的物联网ID,该ID在出厂时被固化于智能设备的芯片中,不可篡改和非法获取。若智能设备的设备标识由标识分配设备统一分配,则云端设备可以预先从标识分配设备处获取合法的设备标识。
其中,消息接收单元02接收到的第二Action消息所包含的Action状态可以包括但不限于以下几种:
第一状态:指示接收到第一Action消息。
第二状态:指示依据第一Action消息中的Action标识所对应的控制参数执行动作的准备工作已完成。
第三状态:指示依据第一Action消息中的Action标识所对应的控制参数执行动作已完毕。
第四状态:指示依据第一Action消息中的Action标识所对应的控制参数执行动作出现异常。
若在消息发送单元01发送第一Action消息后的第一设定时长内消息接收单元02未接收到包含第一状态的第二Action消息,则消息发送单元01可以重发第一Action消息。
若在消息接收单元02接收到包含第一状态的第二Action消息后,在第二设定时长内未接收到包含第二状态的第二Action消息,则消息发送单元01可以重发第一Action消息。
若在消息接收单元02接收到包含第二状态的第二Action消息后,在第三设定时长内未接收到包含第三状态的第二Action消息,则消息发送单元01可以重发第一Action消息。
若消息接收单元02接收到包含第四状态的第二Action消息,则消息发送单元01可以重发第一Action消息。
另外,也可以设置Action的重发次数上限,达到该重发次数上限后,不再重发Action。
图7为本发明实施例提供的设置于智能设备的装置结构图,该装置用于实现上述方法实施例中智能设备的功能,该装置对应于方法实施例中涉及的控制中枢。如图7所示,该装置可以包括:消息接收单元11和消息发送单元12,还可以进一步包括:事件上报单元13、注册接口14、注册单元15和确定单元16。
消息接收单元11负责接收云端设备发送的第一Action消息,第一Action消息至少包括Action标识。
消息发送单元12负责向云端设备返回第二Action消息,第二Action消息包括Action标识和Action状态,Action状态用于指示智能设备针对第一Action消息的动作执行状况。其中,一组Action标识和Action状态能够唯一标识一个第二Action消息。
事件上报单元13负责向云端设备上报Event。
智能设备可以向开发者开放接口进行Action的注册,即注册接口14接收开发设备发送的设备配置文件。注册单元15依据设备配置文件,在智能设备本地注册Action标识,或者注册Action标识以及Action标识对应的控制参数。关于设备配置文件的组成和结构可以参见方法实施例中的相关描述,在此不再赘述。
若第一Action消息中不包含Action标识对应的控制参数,则在上述注册过程中,需要注册Action标识以及Action标识对应的控制参数,确定单元16利用第一Action消息中包含的Action标识,确定在本地注册的该Action标识对应的控制参数,以便智能设备利用控制参数执行相应动作。
若第一Action消息中除了包含Action标识之外,还包括Action标识对应的控制参数;则在上述注册过程中,仅需要在智能设备本地注册Action标识即可,智能设备利用第一Action消息携带的控制参数执行相应动作。
另外,除了Action注册之外,该装置还可以实现功能模块的注册:
注册接口14获取开发设备发送的或者预置于智能设备的功能模块注册文件,注册单元15依据功能模块注册文件,进行功能模块的注册。
其中功能模块注册文件可以包括:各功能模块的初始化流程信息,用于在智能设备系统启动时自动运行各功能模块的初始化过程。
或者,可以包括各功能模块支持的Action标识,使得该装置能够依据第一Action指令中的Action标识确定执行动作的功能模块,并将该Action标识对应的控制参数提供给相应的功能模块以执行动作。
上述第二Action消息中包含的Action状态可以包括但不限于以下几种:
第一状态:指示接收到第一Action消息。
第二状态:指示依据第一Action消息中的Action标识所对应的控制参数执行动作的准备工作已完成。
第三状态:指示依据第一Action消息中的Action标识所对应的控制参数执行动作已完毕。
第四状态:指示依据第一Action消息中的Action标识所对应的控制参数执行动作出现异常。
本发明实施例提供的上述方法和装置可以以设置并运行于设备中的计算机程序体现。该设备可以包括一个或多个处理器,还包括存储器和一个或多个程序,如图8中所示。其中该一个或多个程序存储于存储器中,被上述一个或多个处理器执行以实现本发明上述实施例中所示的方法流程和/或装置操作。例如,被上述一个或多个处理器执行的方法流程,可以包括:
向智能设备发送第一Action消息,第一Action消息包括Action标识;
接收智能设备返回的第二Action消息,第二Action消息包括Action标识和Action状态,Action状态用于指示智能设备针对第一Action消息的动作执行状况。
或者,包括:
接收云端设备发送的第一Action消息,第一Action消息包括Action标识;
向云端设备返回第二Action消息,第二Action消息包括Action标识和Action状态,Action状态用于指示智能设备针对第一Action消息的动作执行状况。
下面列举两个本发明的应用场景实例:
应用场景1:
用户手机通过云端向智能音响发送播放“小苹果”音频的控制指令。在云端设备预先存储有action标识与控制指令之间的对应关系。云端设备接收到用户手机发送来的播放“小苹果”音频的控制指令后,依据上述对应关系,确定该指令对应的action标识,例如该action标识为:
action name1:play,args:“小苹果”。
其中action name1为action标识,play和args:“小苹果”为控制参数。
然后,云端设备依据该控制指令中包含的ID2(一种由标识分配设备统一分配的、唯一标识智能设备的物联网ID)确定目的终端设备,即智能音响,向智能音响发送第一
Action消息。该第一Action消息中可以包含以下字段:action标识和控制参数。
智能音响接收到第一Action消息后,向云端设备返回包含状态为action_received的第二Action消息。该第二Action消息中可以包含以下字段:action name1以及本次action状态(即action_received),这两个字段可以唯一标识智能音响本次返回的消息。
如果云端设备在设定时长内未接收到智能音响返回的包含状态为action_received的第二Action消息,则可以重新发送第一Action消息。
智能音响向云端设备返回包含状态为action_received的第二Action消息后,开始依据第一Action消息中的控制参数进行动作执行的准备工作。待准备工作完成后,向云端返回包含状态为action_doing的第二Action消息。该包含状态为action_doing的第二Action消息中可以包含以下字段:action name1以及本次action状态(即action_doing),这两个字段可以唯一标识智能音响本次返回的消息。
智能音响执行播放“小苹果”音频的动作后,向云端设备返回包含状态为action_done的第二Action消息。该包含状态为action_done的第二Action消息中可以包含以下字段:action name1以及本次action状态(即action_done),这两个字段可以唯一标识智能音响本次返回的指令。
智能音响若在动作执行过程中出现异常,则可以向云端返回包含状态为action_exception的第二Action消息。该包含状态为action_exception的第二Action消息中可以包含以下字段:action name1和本次action状态(即action_exception),这两个字段可以唯一标识智能音响本次返回的指令。另外该包含状态为action_exception的第二Action消息还可以包括指示具体异常类型的参数字段。
云端设备可以依据智能音响返回的action状态,获知智能音响对Action的动作执行状态,从而确保了云端设备下发的控制在智能硬件设备上执行的各个状态都在监控中,保证了动作执行的完整性和追查性。另外,云端设备还可以将智能音响返回的action状态返回给发送控制指令的智能手机,以便用户能够及时获知动作的执行状态。
应用场景2:
该应用场景是智能设备与云端设备之间的Event机制。
由于开发者预先将智能音响中语音控制模块的相关Event注册到了智能硬件中的IDJS CORE(控制中枢),并且该相关Event也预先注册到了云端设备。其中一种Event为控制语音录制。当智能音响的控制语音录制Event被触发时,智能音响将该Event发送给云端。云端对于该Event本身可以不做任何确认,但可以基于该Event进行后续处
理,例如对该Event所包含的控制语音进行识别,依据控制语音确定相应的Action标识和控制参数,并携带在第一Action消息中下发。
应用场景3:
智能门窗检测到开门的Event后,将该Event上报给云端设备。云端设备确定该Event对应的Action标识、控制参数和目的终端设备。例如,确定的Action标识为:Action name2,控制参数为:light,目的终端设备为智能电灯。则云端设备通过第一Action消息将Action name2及其对应的控制参数发送给智能电灯,智能电灯接收到该第一Action消息后,可以依据其中的Action name2及其对应的控制参数,进行智能电灯的点亮。并可以返回不同状态的第二Action消息。
在本发明所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。
上述以软件功能单元的形式实现的集成的单元,可以存储在一个计算机可读取存储介质中。上述软件功能单元存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本发明各个实施例所述方法的部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本发明保护的范围之内。
Claims (40)
- 一种用于物联网的智能设备控制方法,其特征在于,该方法包括:云端设备向智能设备发送第一消息,所述第一消息包括动作标识;接收智能设备返回的第二消息,所述第二消息包括所述动作标识和动作状态,所述动作状态用于指示所述智能设备针对所述第一消息的动作执行状况。
- 根据权利要求1所述的方法,其特征在于,所述向智能设备发送第一消息包括:所述云端设备接收控制设备发送的控制指令;依据预设的控制指令与动作标识之间的对应关系,确定接收到的控制指令对应的动作标识,将确定的动作标识包含在所述第一消息中发送给所述智能设备。
- 根据权利要求2所述的方法,其特征在于,所述向智能设备发送第一消息包括:所述云端设备依据所述控制指令中携带的目的设备标识信息,向与该目的设备标识信息对应的智能设备发送第一消息。
- 根据权利要求1所述的方法,其特征在于,所述向智能设备发送第一消息包括:所述云端设备接收智能设备上报的事件;依据预设的事件与动作标识之间的对应关系,确定接收到的事件对应的动作标识,将确定的动作标识包含在所述第一消息中发送给所述智能设备。
- 根据权利要求1所述的方法,其特征在于,所述向智能设备发送第一消息包括:所述云端设备接收另一智能设备上报的事件;依据预设的事件与动作标识、目的设备标识信息之间的对应关系,将与所述事件对应的动作标识包含在所述第一消息中发送给所述目的设备标识信息对应的智能设备。
- 根据权利要求2、4或5所述的方法,其特征在于,该方法还包括:所述云端设备接收开发设备发送的设备配置文件;依据所述设备配置文件,注册动作标识,或者注册动作标识以及动作标识对应的控制参数。
- 根据权利要求6所述的方法,其特征在于,若所述云端设备注册动作标识以及动作标识对应的控制参数,则在确定出动作标识后,还包括:获取注册的所述确定出的动作标识对应的控制参数,将该控制参数包含在所述第一消息中。
- 根据权利要求3、4或5所述的方法,其特征在于,在发送所述第一消息之前,还包括:判断所述第一消息对应的目的终端设备的标识信息是否为合法的设备标识,如果否,则禁止向所述智能设备发送第一消息。
- 根据权利要求1所述的方法,其特征在于,所述动作状态包括:指示接收到所述第一消息的第一状态;或者,指示依据所述动作标识对应的控制参数执行动作的准备工作已完成的第二状态;或者,指示依据所述动作标识对应的控制参数执行动作已完毕的第三状态;或者,指示依据所述动作标识对应的控制参数执行动作出现异常的第四状态。
- 根据权利要求9所述的方法,该方法还包括:若在发送所述第一消息后的第一设定时长内未接收到包含所述第一状态的第二消息,则重发所述第一消息;或者,若在接收到包含所述第一状态的第二消息后,在第二设定时长内未接收到包含所述第二状态的第二消息,则重发所述第一消息;或者,若在接收到包含所述第二状态的第二消息后,在第三设定时长内未接收到包含所述第三状态的第二消息,则重发所述第一消息;或者,若接收到包含所述第四状态的第二消息,则重发所述第一消息,或者记录异常状况,或者将异常状况提供给控制设备。
- 一种用于物联网的智能设备控制方法,其特征在于,该方法包括:智能设备接收云端设备发送的第一消息,所述第一消息包括动作标识;向所述云端设备返回第二消息,所述第二消息包括所述动作标识和动作状态,所述动作状态用于指示所述智能设备针对所述第一消息的动作执行状况。
- 根据权利要求11所述的方法,其特征在于,在所述智能设备接收云端设备发送的第一消息之前,还包括:所述智能设备向所述云端设备上报事件。
- 根据权利要求11所述的方法,其特征在于,该方法还包括:所述智能设备接收开发设备发送的设备配置文件;依据所述设备配置文件,注册动作标识以及动作标识对应的控制参数。
- 根据权利要求13所述的方法,其特征在于,该方法还包括:所述智能设备利用所述第一消息中包含的动作标识,确定注册的该动作标识对应的控制参数,以便利用所述控制参数执行相应动作。
- 根据权利要求11所述的方法,其特征在于,所述第一消息中还包括所述动作标识对应的控制参数;所述智能设备利用所述控制参数执行相应动作。
- 根据权利要求15所述的方法,其特征在于,该方法还包括:所述智能设备接收开发设备发送的设备配置文件;依据所述设备配置文件,在本地注册动作标识。
- 根据权利要求11所述的方法,其特征在于,该方法还包括:所述智能设备获取开发设备发送的或者预置于智能设备的功能模块注册文件;依据所述功能模块注册文件,进行功能模块的注册。
- 根据权利要求17所述的方法,其特征在于,所述功能模块注册文件包括:各功能模块的初始化流程信息,用于在智能设备系统启动时自动运行各功能模块的初始化过程;或者,各功能模块支持的动作标识。
- 根据权利要求11所述的方法,其特征在于,所述动作状态包括:指示接收到所述第一消息的第一状态;或者,指示依据所述动作标识对应的控制参数执行动作的准备工作已完成的第二状态;或者,指示依据所述动作标识对应的控制参数执行动作已完毕的第三状态;或者,指示依据所述动作标识对应的控制参数执行动作出现异常的第四状态。
- 一种用于物联网的智能设备控制装置,设置于云端设备,其特征在于,该装置包括:消息发送单元,用于向智能设备发送第一消息,所述第一消息包括动作标识;消息接收单元,用于接收智能设备返回的第二消息,所述第二消息包括所述动作标识和动作状态,所述动作状态用于指示所述智能设备针对所述第一消息的动作执行状况。
- 根据权利要求20所述的装置,其特征在于,该装置还包括:指令接收单元,用于接收控制设备发送的控制指令;第一确定单元,用于依据预设的控制指令与动作标识之间的对应关系,确定接收到的控制指令对应的动作标识,将确定的动作标识提供给所述消息发送单元。
- 根据权利要求21所述的装置,其特征在于,所述消息发送单元,具体用于依据 所述控制指令中携带的目的设备标识信息,向与该目的设备标识信息对应的智能设备发送第一消息。
- 根据权利要求20所述的装置,其特征在于,该装置还包括:事件接收单元,用于接收智能设备上报的事件;第二确定单元,用于依据预设的事件与动作标识之间的对应关系,确定所述事件接收单元接收到的事件对应的动作标识,将确定的动作标识提供给所述消息发送单元。
- 根据权利要求20所述的装置,其特征在于,该装置还包括:事件接收单元,用于接收另一智能设备上报的事件;第三确定单元,用于依据预设的事件与动作标识、目的设备标识信息之间的对应关系,将与所述事件对应的动作标识提供给所述消息发送单元。
- 根据权利要求21、23或24所述的装置,其特征在于,该装置还包括:注册接口,用于接收开发设备发送的设备配置文件;注册单元,用于依据所述设备配置文件,注册动作标识,或者注册动作标识以及动作标识对应的控制参数。
- 根据权利要求25所述的装置,其特征在于,若所述注册单元注册动作标识以及动作标识对应的控制参数,则该装置还包括:第四确定单元,用于获取注册的所述确定出的动作标识对应的控制参数,将该控制参数提供给所述消息发送单元;所述消息发送单元发送的所述第一消息还包括所述控制参数。
- 根据权利要求22、23或24所述的装置,其特征在于,该装置还包括:身份验证单元,用于判断所述第一消息对应的目的终端设备的标识信息是否为合法的设备标识,如果否,则禁止所述消息发送单元向所述智能设备发送第一消息。
- 根据权利要求27所述的装置,其特征在于,所述动作状态包括:指示接收到所述第一消息的第一状态;或者,指示依据所述动作标识对应的控制参数执行动作的准备工作已完成的第二状态;或者,指示依据所述动作标识对应的控制参数执行动作已完毕的第三状态;或者,指示依据所述动作标识对应的控制参数执行动作出现异常的第四状态。
- 根据权利要求28所述的装置,其特征在于,所述消息发送单元,还用于:若在发送所述第一消息后的第一设定时长内所述消息接收单元未接收到包含所述 第一状态的第二消息,则重发所述第一消息;或者,若在所述消息接收单元接收到包含所述第一状态的第二消息后,在第二设定时长内未接收到包含所述第二状态的第二消息,则重发所述第一消息;或者,若在所述消息接收单元接收到包含所述第二状态的第二消息后,在第三设定时长内未接收到包含所述第三状态的第二消息,则重发所述第一消息;或者,若所述消息接收单元接收到包含所述第四状态的第二消息,则重发所述第一消息。
- 一种用于物联网的智能设备控制装置,设置于智能设备,其特征在于,该装置包括:消息接收单元,用于接收云端设备发送的第一消息,所述第一消息包括动作标识;消息发送单元,用于向所述云端设备返回第二消息,所述第二消息包括所述动作标识和动作状态,所述动作状态用于指示所述智能设备针对所述第一消息的动作执行状况。
- 根据权利要求30所述的装置,其特征在于,该装置还包括:事件上报单元,用于向所述云端设备上报事件。
- 根据权利要求30所述的装置,其特征在于,该装置还包括:注册接口,用于接收开发设备发送的设备配置文件;注册单元,用于依据所述设备配置文件,在所述智能设备注册动作标识以及动作标识对应的控制参数。
- 根据权利要求32所述的装置,其特征在于,该装置还包括:确定单元,用于利用所述第一消息中包含的动作标识,确定注册的该动作标识对应的控制参数,以便所述智能设备利用所述控制参数执行相应动作。
- 根据权利要求30所述的装置,其特征在于,所述第一消息中还包括所述动作标识对应的控制参数;所述智能设备利用所述控制参数执行相应动作。
- 根据权利要求34所述的装置,其特征在于,该装置还包括:注册接口,用于接收开发设备发送的设备配置文件;注册单元,用于依据所述设备配置文件,在所述智能设备注册动作标识。
- 根据权利要求30所述的装置,其特征在于,该装置还包括:注册接口,用于获取开发设备发送的或者预置于智能设备的功能模块注册文件;注册单元,用于依据所述功能模块注册文件,进行功能模块的注册。
- 根据权利要求36所述的装置,其特征在于,所述功能模块注册文件包括:各功能模块的初始化流程信息,用于在智能设备系统启动时自动运行各功能模块的初始化过程;或者,各功能模块支持的动作标识。
- 根据权利要求30所述的装置,其特征在于,所述动作状态包括:指示接收到所述第一消息的第一状态;或者,指示依据所述动作标识对应的控制参数执行动作的准备工作已完成的第二状态;或者,指示依据所述动作标识对应的控制参数执行动作已完毕的第三状态;或者,指示依据所述动作标识对应的控制参数执行动作出现异常的第四状态。
- 一种设备,包括一个或者多个处理器;存储器;一个或者多个程序,所述一个或者多个程序存储在所述存储器中,被所述一个或者多个处理器执行以实现如下操作:向智能设备发送第一消息,所述第一消息包括动作标识;接收智能设备返回的第二消息,所述第二消息包括所述动作标识和动作状态,所述动作状态用于指示所述智能设备针对所述第一消息的动作执行状况。
- 一种设备,包括一个或者多个处理器;存储器;一个或者多个程序,所述一个或者多个程序存储在所述存储器中,被所述一个或者多个处理器执行以实现如下操作:接收云端设备发送的第一消息,所述第一消息包括动作标识;向所述云端设备返回第二消息,所述第二消息包括所述动作标识和动作状态,所述动作状态用于指示智能设备针对所述第一消息的动作执行状况。
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US16/215,167 US11272012B2 (en) | 2016-06-17 | 2018-12-10 | Action processing associated with a cloud device |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610436563.4 | 2016-06-17 | ||
| CN201610436563.4A CN107517238A (zh) | 2016-06-17 | 2016-06-17 | 一种用于物联网的智能设备控制方法、装置和设备 |
Related Child Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| US16/215,167 Continuation-In-Part US11272012B2 (en) | 2016-06-17 | 2018-12-10 | Action processing associated with a cloud device |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2017215476A1 true WO2017215476A1 (zh) | 2017-12-21 |
Family
ID=60663447
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2017/087135 Ceased WO2017215476A1 (zh) | 2016-06-17 | 2017-06-05 | 一种用于物联网的智能设备控制方法、装置和设备 |
Country Status (4)
| Country | Link |
|---|---|
| US (1) | US11272012B2 (zh) |
| CN (1) | CN107517238A (zh) |
| TW (1) | TW201800959A (zh) |
| WO (1) | WO2017215476A1 (zh) |
Families Citing this family (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108989451A (zh) * | 2018-08-06 | 2018-12-11 | 百度在线网络技术(北京)有限公司 | 数据同步方法、设备云、数据同步服务器及存储介质 |
| CN111131001A (zh) * | 2019-12-25 | 2020-05-08 | 南京甄视智能科技有限公司 | 消息发送方法、装置、存储介质及服务器 |
| CN114578720B (zh) * | 2020-12-01 | 2023-11-07 | 合肥欣奕华智能机器股份有限公司 | 控制方法及控制系统 |
| CN114221985A (zh) * | 2021-12-06 | 2022-03-22 | 深圳Tcl新技术有限公司 | 设备控制方法、装置、电子设备和计算机可读存储介质 |
| CN114327709A (zh) * | 2021-12-20 | 2022-04-12 | 深圳Tcl新技术有限公司 | 一种控制页面生成方法、装置、智能设备及存储介质 |
| CN115208859B (zh) * | 2022-06-23 | 2023-12-15 | 阿波罗智联(北京)科技有限公司 | 一种信息交互方法、装置、设备及存储介质 |
| CN116350990B (zh) * | 2023-04-19 | 2024-08-27 | 浙江华消科技有限公司 | 消防联动系统的控制方法、装置和处理器 |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103702402A (zh) * | 2013-12-20 | 2014-04-02 | 山西慧联网络技术有限责任公司 | 基于无线传感器网络的低功耗停车位状态收集方法 |
| CN103888261A (zh) * | 2014-03-24 | 2014-06-25 | 北京智谷睿拓技术服务有限公司 | 证书更新方法及装置 |
| CN204014088U (zh) * | 2014-04-19 | 2014-12-10 | 青岛职业技术学院 | 智能无线广域安防监测物联网系统 |
| CN104302018A (zh) * | 2014-09-27 | 2015-01-21 | 青岛高校重工机械制造有限公司 | 智能无线广域安防监测物联网系统 |
| WO2016089262A1 (en) * | 2014-12-02 | 2016-06-09 | Telefonaktiebolaget Lm Ericsson (Publ) | Methods and nodes for m2m communication |
| CN105704234A (zh) * | 2016-03-23 | 2016-06-22 | 浙江风向标科技有限公司 | 智能设备的控制方法及装置 |
Family Cites Families (45)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20030191793A1 (en) * | 1991-03-18 | 2003-10-09 | Dolin Robert A. | Task scheduling in an event driven environment |
| US7249195B2 (en) * | 2001-03-30 | 2007-07-24 | Minor Ventures, Llc | Apparatus and methods for correlating messages sent between services |
| DE10132333B4 (de) * | 2001-07-02 | 2006-05-24 | Siemens Ag | Verfahren und Netzanordnung zum Zugriff auf geschützte Ressourcen per Mobilfunk-Endgerät |
| US20040127198A1 (en) * | 2002-12-30 | 2004-07-01 | Roskind James A. | Automatically changing a mobile device configuration based on environmental condition |
| CN100344099C (zh) * | 2004-03-24 | 2007-10-17 | 华为技术有限公司 | 一种在宽带数据智能网中实现客户端小窗口的方法 |
| US8688820B1 (en) * | 2004-06-28 | 2014-04-01 | Oracle America, Inc. | Methods and apparatus for remote management and self management of servers |
| US20090070786A1 (en) | 2007-09-11 | 2009-03-12 | Bea Systems, Inc. | Xml-based event processing networks for event server |
| US8934351B2 (en) * | 2011-03-24 | 2015-01-13 | Fujitsu Ten Limited | Communication apparatus and communication system |
| US20120323690A1 (en) * | 2011-06-15 | 2012-12-20 | Joseph Michael | Systems and methods for monitoring, managing, and facilitating location- and/or other criteria-dependent targeted communications and/or transactions |
| KR20130066348A (ko) * | 2011-12-12 | 2013-06-20 | 현대자동차주식회사 | 차량의 핸즈프리 시스템 제어방법 |
| US20170196195A1 (en) * | 2012-02-27 | 2017-07-13 | Shane T. Wisdom | Pet mat |
| US8977741B1 (en) | 2012-02-29 | 2015-03-10 | Google Inc. | Method and system for cloud computing service transparency |
| US9444859B2 (en) | 2012-12-06 | 2016-09-13 | At&T Intellectual Property I, L.P. | Event management system |
| US9730620B2 (en) * | 2012-12-31 | 2017-08-15 | Dexcom, Inc. | Remote monitoring of analyte measurements |
| US9413827B2 (en) | 2013-02-25 | 2016-08-09 | Qualcomm Incorporated | Context aware actions among heterogeneous internet of things (IOT) devices |
| CN104104532B (zh) | 2013-04-07 | 2017-06-16 | 浙江大华技术股份有限公司 | 一种信息处理方法、装置及系统 |
| US20140337515A1 (en) | 2013-05-08 | 2014-11-13 | Connectloud | Method and Apparatus To Remotely Monitor Information Technology Infrastructure |
| CN104380796B (zh) * | 2013-06-03 | 2018-05-18 | 华为技术有限公司 | 一种无默认承载的切换方法和设备 |
| US9871865B2 (en) | 2013-07-11 | 2018-01-16 | Neura, Inc. | Physical environment profiling through internet of things integration platform |
| CN105659633B (zh) * | 2013-08-29 | 2020-04-28 | 康维达无线有限责任公司 | 物联网事件管理系统以及方法 |
| US9736688B2 (en) * | 2013-10-04 | 2017-08-15 | Sol Mingso Li | Systems and methods for programming, controlling and monitoring wireless networks |
| US9520054B2 (en) * | 2013-10-07 | 2016-12-13 | Google Inc. | Mobile user interface for smart-home hazard detector configuration |
| CN104679493B (zh) | 2013-12-02 | 2017-12-12 | 北京天地超云科技有限公司 | 一种流程化的事件处理机制的改进方法 |
| WO2015089788A1 (en) * | 2013-12-19 | 2015-06-25 | Telefonaktiebolaget L M Ericsson (Publ) | Method and tv associated communication device for switching user personalized interface |
| US9989942B2 (en) | 2013-12-30 | 2018-06-05 | Qualcomm Incorporated | Preemptively triggering a device action in an Internet of Things (IoT) environment based on a motion-based prediction of a user initiating the device action |
| US10158536B2 (en) * | 2014-05-01 | 2018-12-18 | Belkin International Inc. | Systems and methods for interaction with an IoT device |
| US9741244B2 (en) * | 2014-05-30 | 2017-08-22 | Qualcomm Incorporated | Methods, smart objects, and systems for naming and interacting with smart objects |
| CN104202353B (zh) * | 2014-07-09 | 2018-02-13 | 武汉领傲科技有限公司 | 一种物联网互联协作系统的云事件处理方法及装置 |
| US9590976B2 (en) * | 2014-10-08 | 2017-03-07 | Google Inc. | Network-assisted fabric pairing |
| US9410712B2 (en) * | 2014-10-08 | 2016-08-09 | Google Inc. | Data management profile for a fabric network |
| US20160127928A1 (en) * | 2014-10-30 | 2016-05-05 | Neil L. McClure | Alert device system and method |
| US10505752B2 (en) * | 2014-12-15 | 2019-12-10 | Samsung Electronics Co., Ltd. | Electronic apparatus and method of controlling group action |
| CN104601695A (zh) * | 2015-01-14 | 2015-05-06 | 北京京东尚科信息技术有限公司 | 智能设备管控方法、装置和系统 |
| CN105137765A (zh) | 2015-05-15 | 2015-12-09 | 丰唐物联技术(深圳)有限公司 | 智能设备联动设置方法及终端 |
| US10327276B2 (en) * | 2015-06-12 | 2019-06-18 | Telefonaktiebolaget Lm Ericsson (Publ) | Methods and network nodes for evaluating a connection |
| US9942696B2 (en) | 2015-09-14 | 2018-04-10 | Telefonaktiebolaget Lm Ericsson (Publ) | Communicating event data from an event device to an action device |
| US10324773B2 (en) | 2015-09-17 | 2019-06-18 | Salesforce.Com, Inc. | Processing events generated by internet of things (IoT) |
| CN105182784A (zh) * | 2015-09-24 | 2015-12-23 | 小米科技有限责任公司 | 控制智能设备的方法、装置及终端 |
| CN105182783A (zh) | 2015-09-24 | 2015-12-23 | 小米科技有限责任公司 | 用于控制智能设备的方法、装置及终端 |
| KR102374677B1 (ko) * | 2015-11-27 | 2022-03-15 | 삼성전자 주식회사 | 무선 통신을 이용한 전자장치의 관리 방법과 장치 |
| CN105632494A (zh) * | 2015-12-29 | 2016-06-01 | 青岛海尔智能家电科技有限公司 | 智能家电设备的控制方法及装置 |
| CN105676655A (zh) | 2015-12-29 | 2016-06-15 | 青岛海尔智能家电科技有限公司 | 一种非AllJoyn设备之间的联动方法及装置 |
| US9866637B2 (en) | 2016-01-11 | 2018-01-09 | Equinix, Inc. | Distributed edge processing of internet of things device data in co-location facilities |
| US20190122457A1 (en) * | 2016-04-01 | 2019-04-25 | Apostolos Nikolaidis | Method and system to deliver telematics solutions |
| US10419930B2 (en) * | 2016-05-27 | 2019-09-17 | Afero, Inc. | System and method for establishing secure communication channels with internet of things (IoT) devices |
-
2016
- 2016-06-17 CN CN201610436563.4A patent/CN107517238A/zh active Pending
-
2017
- 2017-04-11 TW TW106112039A patent/TW201800959A/zh unknown
- 2017-06-05 WO PCT/CN2017/087135 patent/WO2017215476A1/zh not_active Ceased
-
2018
- 2018-12-10 US US16/215,167 patent/US11272012B2/en active Active
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103702402A (zh) * | 2013-12-20 | 2014-04-02 | 山西慧联网络技术有限责任公司 | 基于无线传感器网络的低功耗停车位状态收集方法 |
| CN103888261A (zh) * | 2014-03-24 | 2014-06-25 | 北京智谷睿拓技术服务有限公司 | 证书更新方法及装置 |
| CN204014088U (zh) * | 2014-04-19 | 2014-12-10 | 青岛职业技术学院 | 智能无线广域安防监测物联网系统 |
| CN104302018A (zh) * | 2014-09-27 | 2015-01-21 | 青岛高校重工机械制造有限公司 | 智能无线广域安防监测物联网系统 |
| WO2016089262A1 (en) * | 2014-12-02 | 2016-06-09 | Telefonaktiebolaget Lm Ericsson (Publ) | Methods and nodes for m2m communication |
| CN105704234A (zh) * | 2016-03-23 | 2016-06-22 | 浙江风向标科技有限公司 | 智能设备的控制方法及装置 |
Also Published As
| Publication number | Publication date |
|---|---|
| TW201800959A (zh) | 2018-01-01 |
| US11272012B2 (en) | 2022-03-08 |
| CN107517238A (zh) | 2017-12-26 |
| US20190182332A1 (en) | 2019-06-13 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2017215476A1 (zh) | 一种用于物联网的智能设备控制方法、装置和设备 | |
| US11196742B2 (en) | Method, system, and device for communicating data between devices to control one of the devices | |
| US10348732B2 (en) | Anti-takeover systems and methods for network attached peripherals | |
| JP5911949B2 (ja) | モバイルオペレーティング環境のための、イベント制御された連続的なロギングを提供すること | |
| CN108289110B (zh) | 设备关联方法、装置、终端设备和操作系统 | |
| WO2021190357A1 (zh) | 故障检测方法及设备 | |
| KR101646379B1 (ko) | 차량의 통신 장치 | |
| JP2011509635A (ja) | 携帯機器管理スケジュールシステム及び方法 | |
| US11153387B2 (en) | Decentralized network protected IoT query resolution | |
| CN112415901B (zh) | 用于管理智能设备的方法、装置、计算机可读介质及设备 | |
| WO2017215477A1 (zh) | 一种用于物联网的事件处理方法、装置和设备 | |
| CN105553794A (zh) | 家庭网关和智能家居系统、家庭防盗方法 | |
| CN112671897B (zh) | 分布式系统的访问方法、装置、存储介质、设备和产品 | |
| CN110910541A (zh) | 门禁控制方法、系统、网络设备及计算机可读存储介质 | |
| CN117641113A (zh) | 算法管理方法及系统 | |
| WO2017107762A1 (zh) | 一种应用程序的追踪方法及装置 | |
| CN105610880B (zh) | M2m通信架构、信息交互方法及装置 | |
| US10839675B2 (en) | Anti-theft method and apparatus | |
| CN118264711A (zh) | 基于mqtt协议的设备控制系统、方法、装置、设备及介质 | |
| EP3425931A1 (en) | Bluetooth low energy devices | |
| HK1248424A1 (zh) | 一种用於物联网的智能设备控制方法、装置和设备 | |
| HK1248423A1 (zh) | 一种用於物联网的事件处理方法、装置和设备 | |
| CN121218309A (zh) | 网络控制方法、装置、电子设备、存储介质及程序产品 | |
| CN121665235A (zh) | 基于sim卡应用的上报方法和装置 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 17812587 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 17812587 Country of ref document: EP Kind code of ref document: A1 |