WO2022036722A1 - 物联网通信方法、装置、设备、计算机存储介质及芯片 - Google Patents

物联网通信方法、装置、设备、计算机存储介质及芯片 Download PDF

Info

Publication number
WO2022036722A1
WO2022036722A1 PCT/CN2020/110634 CN2020110634W WO2022036722A1 WO 2022036722 A1 WO2022036722 A1 WO 2022036722A1 CN 2020110634 W CN2020110634 W CN 2020110634W WO 2022036722 A1 WO2022036722 A1 WO 2022036722A1
Authority
WO
WIPO (PCT)
Prior art keywords
resource
information
state
client
cloud platform
Prior art date
Application number
PCT/CN2020/110634
Other languages
English (en)
French (fr)
Inventor
包永明
张军
吕小强
罗朝明
Original Assignee
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Priority to CN202080102066.5A priority Critical patent/CN115699707A/zh
Priority to PCT/CN2020/110634 priority patent/WO2022036722A1/zh
Publication of WO2022036722A1 publication Critical patent/WO2022036722A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/40Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass for recovering from a failure of a protocol instance or entity, e.g. service redundancy protocols, protocol state redundancy or protocol service redirection
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/70Services for machine-to-machine communication [M2M] or machine type communication [MTC]

Definitions

  • the embodiments of the present application relate to, but are not limited to, the field of the Internet of Things, and in particular, relate to a communication method, apparatus, device, computer storage medium, and chip for the Internet of Things.
  • IOT Internet of Things
  • the resource equipment in the Internet of Things needs to be restored to the normal working state as soon as possible.
  • Embodiments of the present application provide an Internet of Things communication method, apparatus, device, computer storage medium, and chip.
  • an IoT communication method including:
  • the client receives the first resource information sent by the resource device through the cloud platform;
  • the first resource information includes or indicates the first resource status information of a specific resource in the resource device;
  • the client sends a recovery request to the resource device through the cloud platform; the recovery request instructs the resource device to restore the state to A state corresponding to the first resource state information.
  • an IoT communication method including:
  • the resource device sends first resource information to the client through the cloud platform;
  • the first resource information includes or indicates the first resource status information of a specific resource in the resource device;
  • the resource device receives, through the cloud platform, a recovery request sent by the client;
  • the resource device restores the state to a state corresponding to the first resource state information.
  • an Internet of Things communication method including:
  • the cloud platform receives the first resource information sent by the resource device, and sends the first resource information to the client; the first resource information includes or indicates the first resource status information of a specific resource in the resource device;
  • the cloud platform receives the recovery request sent by the client, and sends the recovery request to the resource device; the recovery request indicates the The resource device restores the state to the state corresponding to the first resource state information.
  • an Internet of Things communication device including:
  • a receiving unit used for the client to receive the first resource information sent by the resource device through the cloud platform;
  • the first resource information includes or indicates the first resource status information of a specific resource in the resource device;
  • a sending unit configured to send, by the client, a recovery request to the resource device through the cloud platform when the first resource status information changes to the second resource status information; the recovery request indicates the resource
  • the device restores the state to a state corresponding to the first resource state information.
  • an Internet of Things communication device including:
  • a sending unit used for the resource device to send first resource information to the client through the cloud platform;
  • the first resource information includes or indicates the first resource status information of a specific resource in the resource device;
  • a receiving unit configured to receive, by the resource device, a recovery request sent by the client through the cloud platform when the first resource state information is changed to the second resource state information
  • a restoring unit configured to restore the state of the resource device to a state corresponding to the first resource state information.
  • an Internet of Things communication device comprising:
  • a first transceiver unit used for the cloud platform to receive the first resource information sent by the resource device, and send the first resource information to the client;
  • the first resource information includes or indicates the first resource of a specific resource in the resource device status information;
  • a second transceiver unit configured to, when the first resource status information changes to the second resource status information, the cloud platform receives a recovery request sent by the client, and sends the recovery request to the resource device ; the restoration request instructs the resource device to restore the state to the state corresponding to the first resource state information.
  • an Internet of Things communication device comprising: a memory and a processor
  • the memory stores a computer program executable on the processor
  • a computer storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps in any of the above methods .
  • a chip comprising: a processor for calling and running a computer program from a memory, so that a device installed with the chip executes the steps in any of the above methods.
  • a tenth aspect provides a computer program product, the computer program product comprising a computer storage medium storing computer program code, the computer program code comprising instructions executable by at least one processor, when the The instructions, when executed by the at least one processor, implement the steps in any of the above methods.
  • the client when the first resource state information of the resource device changes to the second resource state information, the client can restore the state of the resource device to the same state as the first resource state information by sending a recovery request to the resource device The corresponding state, so that the resource device can restore the state to the previous normal working state when the state of the resource changes due to the power failure or failure of the resource device, thereby improving the reliability of IoT communication.
  • 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 flowchart of the implementation of a method for a resource device to report a resource status to a client provided by the related art
  • FIG. 3 is a schematic flowchart of an Internet of Things communication method provided by an embodiment of the present application.
  • FIG. 4 is a schematic flowchart of another Internet of Things communication method provided by an embodiment of the present application.
  • FIG. 5 is a schematic flowchart of another Internet of Things communication method provided by an embodiment of the present application.
  • FIG. 6 is a schematic flowchart of still another Internet of Things communication method provided by an embodiment of the present application.
  • FIG. 7 is a schematic flowchart of an Internet of Things communication method provided by another embodiment of the present application.
  • FIG. 8 is a schematic flowchart of a communication method for the Internet of Things according to another embodiment of the present application.
  • FIG. 9 is a schematic flowchart of a communication method for the Internet of Things according to still another embodiment of the present application.
  • FIG. 10 is a schematic flowchart of another IoT communication method provided by another embodiment of the present application.
  • FIG. 11 is a schematic flowchart of yet another IoT communication method provided by another embodiment of the present application.
  • FIG. 12 is a schematic diagram of the composition and structure of an IoT communication device according to an embodiment of the present application.
  • FIG. 13 is a schematic diagram of the composition and structure of another IoT communication device according to an embodiment of the present application
  • FIG. 14 is a schematic diagram of the composition and structure of another Internet of Things communication device provided by an embodiment of the present application.
  • 15 is a schematic diagram of a hardware entity of an Internet of Things communication device provided by an embodiment of the application.
  • FIG. 16 is a schematic structural diagram of a chip provided by an embodiment of the present application.
  • FIG. 1 is a schematic diagram of an Internet of Things system provided by an embodiment of the present application.
  • the Internet of Things system 10 includes resource devices (Device) 11 to 15 , a cloud platform (Cloud) 16 and a client (Client) 17 . . in:
  • the resource devices 11 to 15 can be the resource status reporting nodes in the Internet of Things.
  • the resource status reporting node may include a resource status determination module and a communication module, wherein the resource status determination module may be used to determine the current running status information of the resource device, and the communication module is used for the communication of the resource device, for example, the communication module may determine the resource status.
  • the current running status information determined by the module is uploaded to the cloud platform 16 or uploaded to the client 17 .
  • the resource devices 11 to 15 may be any one or a combination of several such as lamps, air conditioners, smart speakers, kettles, rice cookers, refrigerators, and televisions.
  • the resource device may also be other smart home appliances, mobile phones, computers, smart watches, measurement devices in factories, sensing devices in automobiles, augmented reality (AR) devices, or virtual reality devices.
  • AR Augmented Reality
  • VR Virtual Reality
  • This embodiment of the present application does not limit the resource device, as long as the resource device can work in different states.
  • Cloud platforms can be replaced with cloud or cloud devices.
  • Cloud platforms can be physical devices or virtual devices.
  • the client 17 can be a device with display and control functions, for example, a display screen is used to realize the display function, and the display function can be used to display the relevant information of the resource device to the user; a single chip or a processor is used to realize the control function, and the control function uses It is used to control the running status of resource devices.
  • the client 17 in this embodiment of the present application may be a physical device or a virtual device.
  • the client 17 can be a terminal device, an access terminal device, a subscriber unit, a subscriber station, a mobile station, a mobile station, a remote station, a remote terminal device, a mobile device, or a user equipment (User Equipment). , UE), wireless communication device, user agent or user equipment.
  • Terminal devices can be servers, mobile phones, tablet computers, notebook computers, PDAs, personal digital assistants, portable media players, smart speakers, navigation devices, display devices, smart bracelets and other wearable devices, virtual reality devices, augmented reality device, pedometer, digital TV or desktop computer, etc.
  • the resource device can be connected to the client through the cloud platform.
  • both the resource devices 11 and 15 can be connected to the client 17 through the cloud platform 16, and the client 17 can Information interaction is performed with the resource devices 11 and 15 through the cloud platform 16 .
  • the resource device can be directly connected to the client 17.
  • the resource devices 12 and 13 are both directly connected to the client 17, so that the client 17 can directly connect to the resource The device 12 or 13 exchanges information.
  • the information interaction between the client 17 and any of the above resource devices may include: the client 17 can manage and/or control the resource devices 11 to 15, such as resource device software and hardware upgrades, resource device functions and/or operating status and/or Or at least one of resource status control, resource subscription, and resource query.
  • the client 17 can manage and/or control the resource devices 11 to 15, such as resource device software and hardware upgrades, resource device functions and/or operating status and/or Or at least one of resource status control, resource subscription, and resource query.
  • Resource devices can also be connected to each other.
  • resource device 11 can be connected to resource devices 14 and 15, respectively, and messages or data between client 17 and resource devices 14 or 15 can be forwarded via resource device 11.
  • Resource device 11 also Certain processing can be performed on the forwarded message or data, such as data preprocessing/filtering, communication protocol or message format conversion, etc.
  • a communication connection can be made through a communication module .
  • a wired connection can be used between any of the above two, or, using Hyper Text Transfer Protocol (Hyper Text Transfer Protocol, HTTP) for data or message transmission, or using Constrained Application Protocol (Constrained Application Protocol, CoAP) for data transmission Or message transmission, or, using cellular-based Narrow Band Internet of Things (NB-IoT) wireless connection technology, using the Message Queuing Telemetry Transport (MQTT) protocol for data or message transmission.
  • CoAP may be used for data or message transmission between any of the above two.
  • other protocols may be used for data or message transmission between any of the above-mentioned two.
  • the client 17 manages resource devices in the form of resources.
  • the "resource” is an abstract concept, which can refer to both the physical form of the resource device and the model of the resource device.
  • Static attributes such as software and hardware versions or manufacturers can also refer to dynamic attributes such as operations that the resource device can perform, events that can be reported, parameters, or status parameters that can be read.
  • FIG. 2 is a schematic diagram of the implementation flow of a method for a resource device to report a resource status to a client provided by the related art. As shown in FIG. 2 , the method includes:
  • connection between Device A and Cloud A may be a persistent connection.
  • Device A in the embodiment of the present application may be the above-mentioned resource device, and Cloud A may be the above-mentioned cloud platform.
  • Client A sends a request to Cloud A to obtain device information on Cloud A.
  • connection between Client A and Cloud A may be a short connection or a long connection.
  • Client A in this embodiment of the present application may be the above-mentioned client.
  • data transmission is performed between Client A and Cloud A or between Device A and Cloud A after establishing a secure connection.
  • a secure channel can be established with Cloud A or between Device A and Cloud A, so that data or information can be securely transmitted between Device A and Cloud A.
  • Device information may include information of all devices on Cloud A, or, include information of devices associated with Client A.
  • the device information may include device information of at least one device.
  • Cloud A sends the device information on Cloud A to Client A.
  • the device information on Cloud A can include the device information of Device A.
  • the device information on Cloud A may include device information of at least one of Device B, Device C, Device D, and the like.
  • Device A may include at least one resource, and one resource may include at least one resource information.
  • the electric light when Device A is an electric light, the electric light may include at least one resource.
  • the electric light may include a resource for controlling the brightness of the electric light, a resource for controlling the color of the electric light, a resource for controlling the color temperature of the electric light, and a resource for controlling the color temperature of the electric light. At least one of resources and the like for controlling the flickering frequency of electric lamps.
  • the washing machine may include at least one resource.
  • the washing machine may include a resource for controlling the washing mode, a resource for controlling the water level, a resource for controlling the duration of laundry, and a resource for controlling the washing time. At least one of the resources for rinsing strength, etc.
  • the TV set may include at least one resource, for example, the TV set may include resources for controlling the broadcast channels of the TV set, resources for controlling the volume of the playback sound, and resources for adjusting the display mode. at least one of the resources, etc.
  • Device A can also be exemplified by other devices, such as an air conditioner, a speaker, or a kettle, and the embodiment of this application does not limit the implementation scenario of Device A.
  • Cloud A sends to Client A the device information of at least one device such as a light, washing machine, TV, air conditioner, speaker, or kettle on Cloud A.
  • the device information may include not only at least one resource included in the device or an identifier of at least one resource, but also at least one information of device type, device identification, device appearance, device location, and the like.
  • Client A sends a subscription request to Cloud A, where the subscription request is used to request to subscribe to the resource information of Device A on Cloud A.
  • Client A may request to subscribe to resource information of one device, or may request to subscribe to resource information of at least two devices, and the resource information of one device or at least two devices includes the resource information of Device A. In some embodiments, Client A may request to subscribe to resource information of one resource of one device, or may subscribe to resource information of at least two resources of one device.
  • Cloud A sends a subscription request to Device A, where the subscription request is used to request to subscribe to the resource information of Device A on Cloud A.
  • Device A sends a subscription success message and current resource information to Cloud A.
  • the subscription success message and the current resource information may be sent in one signaling. In other embodiments, the subscription success message and the current resource information may be sent in two signalings respectively. For example, the subscription success message may be sent before the current resource information, or the current resource information may be sent before the subscription success message send.
  • Cloud A forwards the subscription success message and current resource information to Client A.
  • the resource state change is, for example, at least one of a change in the working mode of the washing machine, water level information of the washing machine, and a change in the rinsing intensity of the washing machine.
  • Device A sends the changed resource information to Cloud A.
  • Cloud A sends the changed resource information to Client A.
  • the related technology only provides the situation of how Device A reports the resource status to Client A, and the related technology does not consider the situation of how to operate after Device A is powered off and restarted.
  • the washing machine when the washing machine is washing clothes in the normal laundry mode, if the washing machine is powered off and powered on (for example, it is powered off after restarting, or powered off due to a power failure, or the user Power failure caused by misoperation, etc.), the washing machine may be in the off state, standby state or running in the default state. In this way, after the washing machine is powered off and powered on, it cannot continue to run in the state before the power off and on.
  • the air conditioner when the air conditioner detects that the ambient temperature meets the set temperature, it will enter the power saving mode or standby mode.
  • the user wants the air conditioner to work in a fixed state all the time, and does not want the air conditioner to suddenly enter. In other states, however, this requirement of the user will only cause the user to continuously use the air conditioner remote controller to remotely operate the air conditioner, resulting in the user's trouble in use.
  • FIG. 3 is a schematic flowchart of an Internet of Things communication method provided by an embodiment of the present application. As shown in FIG. 3 , the method includes:
  • the client receives first resource information sent by a resource device through a cloud platform; the first resource information includes or indicates first resource status information of a specific resource in the resource device.
  • the client described in the embodiment of the present application may be the client 17 in FIG. 1 or the Client A in other embodiments
  • the resource device described in the embodiment of the present application may be the one shown in FIG. 1 . Any one of the resource devices 11 to 15 or Device A in other embodiments.
  • the cloud platform described in the embodiments of this application may be the cloud platform 16 in FIG. 1 or Cloud A in other embodiments.
  • the resource device may send resource information to the client at a fixed period through the cloud platform. In other embodiments, the resource device may send the resource information to the client through the cloud platform in a variable period. For example, between 6:00-24:00, the resource device may send the resource information in a shorter period. Between 0:00 and 6:00, the resource device may use a longer period to send resource information. For another example, when the resource device determines that there is a user in the family, the resource information can be sent in a shorter period, and when the resource device determines that there is no user in the family, the resource information can be sent in a longer period.
  • the first resource information may be current resource information sent by the resource device to the client through the cloud platform.
  • Each resource information (which may be the resource information in the embodiment corresponding to FIG. 2 , including the first resource information, the second resource information or the third resource information described in the embodiment of this application), is sent by the resource device to the client through the cloud platform. ) may include or indicate resource status information of a specific resource, or may include or indicate resource status information of a specific resource and resource attribute information of a specific resource.
  • the resource state information of a specific resource may be the current state value of the specific resource, which usually changes as the state of the specific resource changes.
  • the resource attribute information in each resource information sent by the resource device to the client through the cloud platform may include at least one of the following: whether the resource information/resource state information is recoverable, the type of resource information/resource state information, resource information/resource information Whether the status information can be modified, the resource information/identification of the specific resource corresponding to the resource status information, etc.
  • the first resource information may include not only the first resource state information, but also resource attribute information of a specific resource.
  • each resource information sent by the resource device to the client through the cloud platform such as the first resource information or the following second resource information, third resource information, etc., may include resource attributes of a specific resource information, or part of the resource information includes resource attribute information of a specific resource.
  • the first resource information (or the following second resource information or third resource information) in this embodiment of the present application may be represented by state, and state may represent the current state of a specific resource.
  • the state may include: resource state 1: XXX; resource state 2: XXX; resource state 3: XXX; resource attribute 1: XXX; resource attribute 2: XXX.
  • the first resource state information may be at least one resource state information, and each resource state information in the at least one resource state information may be a resource state value.
  • the first resource status information may be the running mode identifier of the washing machine, the running time of the washing machine, the water level information of the washing machine, the washing intensity of the washing machine, etc. at least one.
  • the specific resource may be one resource or at least two resources in the resource device.
  • the resource attribute information of a specific resource may include one or at least two attribute information, and at least part of one or at least two attribute information may be fixed attribute information, or may be changed with time and/or scene changes Attribute information, or it may be attribute information changed by the resource device receiving the attribute adjustment operation input by the user.
  • the resource attribute information is information A under the indicate attribute (or described as indicate: A)
  • the information A indicates that the resource state information is recoverable.
  • the resource attribute information may always be information A.
  • the resource device receives certain instructions, the resource attribute information may be modified to information B, and the information B indicates that the resource state information is unrecoverable.
  • the resource device determines that the number of times the resource information is recovered within a certain period of time is greater than a threshold, it may determine that the recovery has failed, and the resource attribute information may be modified to B.
  • the client sends a recovery request to the resource device through the cloud platform; the recovery request instructs the resource device to restore the state to the state corresponding to the first resource state information.
  • the second resource state information is different from the first resource state information.
  • the client may determine that the first resource state information is changed to the second resource state information. In order to ensure the validity of the restoration process, the client may send the restoration request only when the first resource state information changes to other resource state information and then changes to the second resource state information. For example, in order to avoid the influence of the child's false trigger on the laundry process, the client may send a recovery request to the resource device only when it is determined that the first resource state information has changed at least twice within a set period of time.
  • the change of the first resource state information to the second resource state information may be that at least one of all the resource state information in the first resource state information changes.
  • the client when the client determines that the first resource state information has changed to the second resource state information, it may be that the client can obtain the second resource information with the determined state value, thereby determining that the first resource state information has changed to the second resource state information. Resource status information. In this manner, the client can receive the second resource state information sent by the resource device through the cloud platform, thereby determining that the first resource state information has changed to the second resource state information.
  • the client determines that the first resource state information has changed to the second resource state information, which may be that the client cannot obtain a second resource information with a definite state value, and only knows that the first resource state information has changed , but do not know what changes have occurred to the first resource status information.
  • the client can receive the information that is sent by the resource device through the cloud platform to indicate that the first resource state information has changed, or the cloud platform can determine whether the first resource state information has changed, and the client can receive the information from the cloud platform. The information that is sent by the platform and represents whether the first resource state information has changed.
  • the restoration request may include first resource information, or the restoration request may include first resource state information.
  • the first resource before the change may not be stored information or first resource status information.
  • the restoration request may not include the first resource information nor the first resource state information, and the restoration request is only a request for indicating state restoration.
  • the resource device may store the changes The previous first resource information or the first resource state information, after the state changes, the state is restored. Whether the recovery request includes the first resource information may be preset, or may be determined flexibly according to different attributes of resource devices.
  • the resource device can respond to the recovery request by modifying the current resource status information of the resource device to the first resource status information, or modifying the current resource information to the first resource information, so that the The state of the resource device can be restored to a state corresponding to the first resource state information. For example, when the first resource state information of the resource device changes to the second resource state information, the resource device may modify the second resource state information to the first resource state information. When the resource device restores the resource state information to the first resource state information, the resource device may operate in a state corresponding to the first resource state information.
  • washing machine when the washing machine has been running in normal mode for 20 minutes, if the running mode has changed to quick wash mode, standby mode or shutdown mode, after the washing machine receives the recovery request, it can be based on the recovery request. Re-enter normal laundry mode and continue washing for the next 20 minutes.
  • the client when the first resource state information of the resource device changes to the second resource state information, the client can restore the state of the resource device to the same state as the first resource state information by sending a recovery request to the resource device The corresponding state, so that the resource device can restore the state to the previous normal working state when the state of the resource changes due to the power failure or failure of the resource device, thereby improving the reliability of IoT communication.
  • FIG. 4 is a schematic flowchart of another IoT communication method provided by an embodiment of the present application. As shown in FIG. 4 , the method includes:
  • the resource device sends first resource information to the client through the cloud platform; the client receives the first resource information sent by the resource device through the cloud platform; the first resource information includes or indicates first resource status information of a specific resource in the resource device.
  • the cloud platform receives the first resource information sent by the resource device, and sends the first resource information to the client.
  • the client determines that the first resource state information is changed to the second resource state information.
  • the state corresponding to the first resource state information is the state of the specific resource before the resource device is powered off, and the state corresponding to the second resource state information is the state of the specific resource after the resource device is powered on.
  • the client can also determine that the resource state of the specific resource can be restored, and then execute S405.
  • the first resource information further includes or indicates resource attribute information of a specific resource, where the resource attribute information is used to indicate that the resource state of the specific resource can be restored; the client can determine, based on the resource attribute information, that the resource state of the specific resource can be restored recover.
  • the client sends a recovery request to the resource device through the cloud platform; the resource device receives the recovery request sent by the client through the cloud platform.
  • the cloud platform receives the recovery request sent by the client, and sends the recovery request to the resource device.
  • the resource device restores the state to the state corresponding to the first resource state information.
  • the resource device may restore the state to the state corresponding to the first resource state information in response to the restoration request.
  • the resource state of the resource in the resource device can be reset, thereby improving the reliability of Internet of Things communication.
  • the communication between the client and the resource device is through the cloud platform, because the cloud platform can access a large number of clients and resource devices, so that the Internet of Things system has the advantages of strong system scalability and wide application range.
  • FIG. 5 is a schematic flowchart of another Internet of Things communication method provided by an embodiment of the present application. As shown in FIG. 5 , the method includes:
  • the resource device sends first resource information to the cloud platform; the cloud platform receives the first resource information sent by the resource device.
  • the first resource information not only includes or indicates the first resource status information of a specific resource in the resource device, but may also include or indicate resource attribute information of the specific resource, and the resource attribute information is used to indicate the resource status of the specific resource. able to recover.
  • the cloud platform may determine, based on the resource attribute information of the first resource information, that the resource state of the specific resource can be restored.
  • the cloud platform may modify the third resource information stored in the cloud platform to the first resource information; the third resource information is received by the cloud platform before the first resource information.
  • the cloud platform sends the first resource information to the client; the client receives the first resource information sent by the cloud platform.
  • the protocol over which the cloud platform communicates with the resource device may be the same as the protocol over which the cloud platform communicates with the client.
  • both protocols are HTTP, CoAP, or MQTT.
  • the protocol over which the cloud platform communicates with the resource device may be different from the protocol over which the cloud platform communicates with the client.
  • the former may be the HTTP protocol
  • the latter may be the CoAP protocol , which is not limited in the embodiments of the present application.
  • the client After receiving the first resource information, the client can display a state corresponding to the first resource state information.
  • the client or the cloud platform may determine the read-write attribute and/or the recoverable attribute of the resource according to the resource attribute information reported by the resource device indicating whether the resource state is recoverable.
  • the working mode resource of the washing machine has the indicate attribute (read-only attribute) and the working mode attribute (read-write attribute); the indicate attribute indicates whether the state of the working mode resource can be restored; when the device reports its resources, the client judges according to the value of the indicate attribute Whether the attribute state under this resource is recoverable.
  • the first resource state information in the resource device is changed to the second resource state information.
  • the resource device is often powered off and powered on.
  • the state of the resource device does not return to the state before the power-off, but enters the initial state set by the resource device.
  • the resource device is a computer, and multiple programs are opened on the computer, after the power is turned off, the computer will not enter the preset desktop, and will not change the multiple programs that were turned on before the power off. program to resume.
  • the state of the resource device can automatically enter the state before the power off.
  • An implementation manner of power-off and power-on in the embodiment of the present application may be shutdown and restart.
  • the operating state of the resource device corresponding to the second resource state information may be a shutdown state, a standby state, or an operating state, etc., which is not limited in this embodiment of the present application.
  • the cloud platform can monitor the disconnection between the cloud platform and the resource device, the cloud platform determines that the resource device is offline, and then the cloud platform can send a message to the client that the resource device is offline , when the client receives the message that the resource device is offline, it can display that the resource device is offline.
  • the client can also set the control related to the resource device as a non-triggerable control, so that the user cannot control the resource device correspondingly by triggering the client.
  • the client can also display the content related to the resource device in the form of a grayscale image, so that the user can clearly know that the resource device is offline.
  • the client can determine that the state of the first resource has changed to the state of the second resource. In this way, the resource device sends the first resource information and the second resource information to the client through the cloud platform (or first resource state information and second resource state information). In other embodiments, the client cannot determine that the state of the first resource has changed to an explicit state of the second resource, and the client can only determine that the state of the first resource has changed, which is different from the state of the first resource. In this way, the resource device can send the first resource information (or the first resource status information) to the client through the cloud platform, without sending the second resource information (the second resource status information).
  • the information sent to the resource device (for example, the cloud platform cannot receive the heartbeat packet sent by the resource device), and it cannot determine what happened to the resource device.
  • the cloud platform can only determine that the resource device is offline, and then the cloud platform sends the resource device to the client. Offline information, the client shows that the resource device is offline.
  • the resource device After the resource device is powered on, the connection between the resource device and the cloud platform is restored, and the resource device can send a notification that the resource device is online to the cloud platform, and/or send a restart reason to the cloud platform.
  • the cloud platform sends the online notification to the client the client can display the information that the resource device is online.
  • the cloud platform sends the restart reason to the client the client can display the restart reason.
  • the resource device sends the second resource information to the cloud platform; the cloud platform receives the second resource information sent by the resource device.
  • the second resource state information is used for the cloud platform to send a notification message to the client when it is determined that the first resource state information and the second resource state information are different.
  • the second resource information includes or indicates: the second resource status information of the specific resource in the resource device, or the second resource information includes or indicates: the second resource status information of the specific resource in the resource device and the resource attribute information of the specific resource; Attribute information is used to indicate that the resource state of a specific resource can be restored.
  • the second resource state information may be used by the cloud platform to send a notification message to the client when it is determined that the first resource state information and the second resource state information are different.
  • the resource device may send a notification that the resource device is online to the cloud platform, and the notification that the resource device is online is used to notify that the resource device is online.
  • the second resource information and the notification of the resource device going online and the restart reason may be sent in one signaling, or may be sent in at least two signalings.
  • the first resource state information and/or the second resource state information may be a readable and writable attribute, and the resource attribute information may be a read-only attribute.
  • the difference between the first resource state information and the second resource state information may be replaced by the difference between the first resource information and the second resource information.
  • the cloud platform determines that the first resource state information and the second resource state information are different.
  • the cloud platform sends a notification message to the client; the client receives the notification message sent by the cloud platform.
  • the notification message indicates that the first resource status information is changed to the second resource status information, or the notification message indicates that the resource status of the resource device needs to be restored, or the notification message includes or indicates the first resource information.
  • the cloud platform may also send an online notification to the client.
  • the cloud platform may modify the first resource state information stored in the cloud platform to the second resource state information when it is determined that the first resource state information and the second resource state information are different. In other embodiments, the cloud platform may modify the first resource information stored in the cloud platform to the second resource information when it is determined that the first resource information and the second resource information are different.
  • the client determines, based on the notification message, that the first resource state information is changed to the second resource state information.
  • the client may display that the resource device is online based on the online notification sent by the cloud platform.
  • the client can reset the controls related to the resource device to be triggerable controls, so that the user can control the resource device correspondingly by triggering the client.
  • the client can also display the content related to the resource device in the form of a color image, so that the user can clearly know that the resource device is online.
  • the client determines, based on the resource attribute information, that the resource state of the specific resource can be restored.
  • the client may determine that the resource state of a specific resource can be restored based on the resource attribute information in the third resource information, or based on the resource attribute information in the first resource information, or based on the resource attribute information in the second resource information.
  • the client obtains the first trigger instruction; the first trigger instruction is used to instruct to restore the resource state of the resource device.
  • the client obtains the first trigger instruction obtained by the user triggering the client.
  • the client terminal may display a control for whether to restore the resource state, and if the user selects yes, the client terminal may obtain the first trigger instruction.
  • the client sends a recovery request to the cloud platform, and the cloud platform receives the recovery request sent by the client.
  • the preconditions for the client to send a recovery request to the cloud platform are: the first resource status information changes to the second resource status information, the client determines that the resource status of a specific resource can be recovered, and receives the first trigger instruction.
  • the cloud platform sends a recovery request to the resource device, and the resource device receives the recovery request sent by the cloud platform.
  • the resource device restores the state to the state corresponding to the first resource state information.
  • the resource device may restore the state to the state corresponding to the first resource state information in response to the restoration request.
  • the resource device may, in response to the restoration request, restore the state corresponding to the second resource state information to the state corresponding to the first resource state information.
  • the client or the cloud platform may store a list of the corresponding relationship between resource identifiers and whether the resource can be restored, so that the client or the cloud platform can determine whether the resource can be restored based on the list.
  • the client or the cloud platform may directly determine whether the resource can be restored according to the latest received state information. In this case, there may not be a list of the corresponding relationship between the resource identifier and whether the resource can be restored. .
  • the cloud platform is used to determine whether the first resource state information and the second resource state information are the same, so that the cloud platform can notify the client whether the result is the same, so that the client does not need to perform the first resource information and the second Whether the resource information is the same is calculated, thereby reducing the consumption of the client.
  • sending the restoration request based on the first trigger instruction obtained by the user triggering the client can make the resource device restore the resource state only when the user confirms the restoration, so that the restoration of the resource state can be performed according to the user's requirement, which improves the performance of the resource state. Controllability of resource recovery.
  • FIG. 6 is a schematic flowchart of still another Internet of Things communication method provided by an embodiment of the present application. As shown in FIG. 6 , the method includes:
  • the client obtains a second trigger instruction; the second trigger instruction is used to instruct the client to determine to automatically send a recovery request to the resource device through the cloud platform when the first resource state information changes to the second resource state information.
  • the client can display a control for whether to set the state of the resource device as automatic recovery, and when the user selects yes, a second operation instruction is obtained, indicating that the client can automatically send a recovery request to the resource device through the cloud platform to Automatically restore the state of resource devices.
  • a second operation instruction is obtained, indicating that the client can automatically send a recovery request to the resource device through the cloud platform to Automatically restore the state of resource devices.
  • the client can set the resource state of the resource device to automatically recover from power-off and power-on, so that the resource device can be automatically recovered after power off and on. After the power is turned off, it will automatically send a recovery request to the client through the cloud platform.
  • the resource device sends the first resource information to the cloud platform; the cloud platform receives the first resource information sent by the resource device.
  • S605 The cloud platform sends the first resource information to the client; the client receives the first resource information sent by the cloud platform.
  • the first resource state information in the resource device is changed to the second resource state information.
  • the first resource information includes first resource status information
  • the second resource information includes second resource status information
  • S609 The resource device sends the second resource information to the cloud platform; the cloud platform receives the second resource information sent by the resource device.
  • the second resource state information is used by the client to send a recovery request to the resource device when it is determined that the first resource state information and the second resource state information are different.
  • the cloud platform determines that the first resource state information and the second resource state information are different.
  • S613 The cloud platform sends a notification message to the client; the client receives the notification message sent by the cloud platform.
  • the client determines, based on the notification message, that the first resource state information is changed to the second resource state information.
  • the client determines, based on the resource attribute information, that the resource state of the specific resource can be restored.
  • S619 The client sends a recovery request to the cloud platform, and the cloud platform receives the recovery request sent by the client.
  • the cloud platform sends a recovery request to the resource device, and the resource device receives the recovery request sent by the cloud platform.
  • the resource device restores the state to the state corresponding to the first resource state information in response to the restoration request.
  • the cloud platform is used to determine whether the first resource state information and the second resource state information are the same, so that the cloud platform can notify the client whether the result is the same, so that the client does not need to perform the first resource information and the second Whether the resource information is the same is calculated, thereby reducing the consumption of the client.
  • the specific resources of the resource device are set on the client in advance and can be automatically recovered after the power off and on, so after the resource device is powered off and powered on, the client can automatically Sending recovery requests to resource devices without user intervention in the recovery process increases the automation of IoT systems.
  • FIG. 7 is a schematic flowchart of an IoT communication method provided by another embodiment of the present application. As shown in FIG. 7 , the method includes:
  • the resource device sends first resource information to a cloud platform; the cloud platform receives the first resource information sent by the resource device.
  • the cloud platform sends the first resource information to the client; the client receives the first resource information sent by the cloud platform.
  • the first resource state information in the resource device is changed to the second resource state information.
  • the resource device sends the second resource information to the cloud platform; the cloud platform receives the second resource information sent by the resource device.
  • the second resource state information is used by the client to send a recovery request to the resource device when it is determined that the first resource state information and the second resource state information are different.
  • S709 The cloud platform sends the second resource information to the client; the client receives the second resource information sent by the cloud platform.
  • the client when the resource device is directly connected to the client, the client directly receives the second resource information sent by the resource device.
  • the client determines that the second resource state information is different from the first resource state information, and determines that the first resource state information is changed to the second resource state information.
  • the client determines, based on the resource attribute information, that the resource state of the specific resource can be restored.
  • the client obtains the first trigger instruction; the first trigger instruction is used to instruct to restore the resource state of the resource device.
  • S717 The client sends a recovery request to the cloud platform, and the cloud platform receives the recovery request sent by the client.
  • the cloud platform sends a recovery request to the resource device, and the resource device receives the recovery request sent by the cloud platform.
  • the resource device restores the state to the state corresponding to the first resource state information in response to the restoration request.
  • the client can determine whether the first resource state information and the second resource state information are the same, which can greatly reduce the resources of the cloud platform.
  • the occupancy rate is reduced, thereby reducing the layout cost of the cloud platform, and because the cloud platform directly sends the received second resource information to the client, the data does not need to be calculated by the cloud platform, thereby reducing the delay of information transmission.
  • sending the restoration request based on the first trigger instruction obtained by the user triggering the client can make the resource device restore the resource state only when the user confirms the restoration, so that the restoration of the resource state can be performed according to the user's requirement, which improves the performance of the resource state. Controllability of resource recovery.
  • FIG. 8 is a schematic flowchart of an IoT communication method provided by another embodiment of the present application. As shown in FIG. 8 , the method includes:
  • the client obtains a second trigger instruction; the second trigger instruction is used to instruct the client to determine to automatically send a recovery request to the resource device through the cloud platform when the first resource state information changes to the second resource state information.
  • the resource device sends first resource information to the cloud platform; the cloud platform receives the first resource information sent by the resource device.
  • S805 The cloud platform sends the first resource information to the client; the client receives the first resource information sent by the cloud platform.
  • the first resource state information in the resource device is changed to the second resource state information.
  • the resource device sends the second resource information to the cloud platform; the cloud platform receives the second resource information sent by the resource device.
  • the cloud platform sends the second resource information to the client; the client receives the second resource information sent by the cloud platform.
  • the client determines that the second resource state information is different from the first resource state information, and determines that the first resource state information is changed to the second resource state information.
  • the client determines, based on the resource attribute information, that the resource state of the specific resource can be restored.
  • S817 The client sends a recovery request to the cloud platform, and the cloud platform receives the recovery request sent by the client.
  • S819 The cloud platform sends a recovery request to the resource device, and the resource device receives the recovery request sent by the cloud platform.
  • the resource device restores the state to the state corresponding to the first resource state information in response to the restoration request.
  • the client can determine whether the first resource state information and the second resource state information are the same, which can greatly reduce the resources of the cloud platform.
  • the occupancy rate is reduced, thereby reducing the layout cost of the cloud platform, and because the cloud platform directly sends the received second resource information to the client, the data does not need to be calculated by the cloud platform, thereby reducing the delay of information transmission.
  • the specific resources of the resource device are set on the client in advance and can be automatically restored after the power off and on, so after the resource device is powered off and powered on, the client can automatically
  • the recovery request is sent to the resource device, and the recovery process does not require user intervention, thereby improving the automation of the IoT system.
  • FIG. 9 is a schematic flowchart of an Internet of Things communication method provided by still another embodiment of the present application. As shown in FIG. 9 , the method includes:
  • Client A sends a request to Cloud A to obtain device information on Cloud A.
  • a secure connection may be established between Device A and Cloud A, and/or between Cloud A and Client A, through HTTP protocol, CoAP protocol, or MQTT protocol.
  • the device information of Device A may include resource status information of each resource in the at least one resource on Device A.
  • Cloud A sends the device information on Cloud A to Client A.
  • the device information on Cloud A includes the device information of Device A.
  • Client A sends a request to Cloud A for subscribing to the resource information of Device A on Cloud A.
  • Cloud A sends Device A a request to subscribe to Device A's resource information.
  • Device A determines that there is an attribute in the subscribed device resource indicating that the resource state information can be restored after the device restarts.
  • the Device A can obtain the current resource information of a specific resource.
  • the current resource information includes the current resource status information and resource attribute information.
  • the resource attribute information in the current resource information indicates that the resource status information can be recovered, the current resource information or the current resource status information is determined. can be restored.
  • Device A sends to Cloud A the information of successful subscription, and the current resource information of the subscribed device resources.
  • the subscription success information and the current resource information of the resource of the subscribed device may be respectively sent by two signalings. For example, in some embodiments, Device A may first send the subscription success information to Cloud A, and then send the current resource information of the subscribed device resources. Or, for another example, Device A can send the current resource information to Cloud A first, and then send the subscription success information. In other embodiments, the subscription success information and the current resource information of the subscribed device resources may be sent in one signaling.
  • Cloud A determines that the resource state information can be recovered, and stores the current resource information.
  • Cloud A sends to Client A the information that the subscription is successful, and the current resource information of the subscribed device resources.
  • Client A determines that the resource status information can be recovered.
  • Device A sends the latest resource information of the subscribed device resource to Cloud A.
  • the latest resource information includes the latest resource status information and resource attribute information.
  • the current resource information before Cloud A is updated is the latest resource information, for example, the latest resource information is stored, and the latest resource information covers the previous current resource information.
  • Cloud A can store the previous current resource information in a register or other storage space. After Cloud A receives the latest resource information, it can perform a reset operation on the stored current resource information, and write the latest resource information into the register. or other storage space.
  • Cloud A sends the latest resource information of the subscribed device resource to Client A.
  • the connection between Device A and Cloud A may be a long connection
  • Device A may periodically send a heartbeat packet to Cloud A
  • Cloud A determines that the heartbeat packet sent by Device A is not received within a preset period of time Next, make sure that the connection between Device A and Cloud A is disconnected.
  • Cloud A sends the information that the device is offline to Client A.
  • Client A displays the status of the device offline and subscribed device resources.
  • the state of the subscribed device resource displayed in this step is the state corresponding to the latest resource state information of the subscribed device resource.
  • a connection request can be sent to Cloud A to re-establish the connection between Device A and Cloud A.
  • Device A sends information about the device going online to Cloud A, and reports resource information after the device goes online.
  • the information about the device going online and the resource information after going online may be in one signaling, or may be in two signalings respectively. This embodiment of the present application does not limit the order of the information about the device going online and the information about the resource after being online.
  • S943-S947, S961 may be performed, or the steps of S949-S961 may be performed.
  • Cloud A determines that the resource status information or resource information content before the device goes offline and after the device goes online is the same.
  • Cloud A sends the information that the device goes online to Client A.
  • Cloud A determines that the resource status information or resource information content before the device goes offline and after the device goes online is different.
  • Cloud A sends to Client A the information that the device is online, and the resource information (ie, the latest resource information) before the subscribed device resources go offline.
  • Client A displays the device online, determines that the resource state can be restored, and obtains a first trigger instruction through a user operation.
  • Client A sends a request for restoring the resource status to Cloud A.
  • the request for restoring the resource state may include resource information before offline or resource state information.
  • Cloud A sends a request for restoring the resource state to Device A.
  • the device resource status of Device A is updated to the status before power failure or failure.
  • FIG. 10 is a schematic flowchart of another IoT communication method provided by another embodiment of the present application. As shown in FIG. 10 , the method includes:
  • Client A sets the subscribed resources to be automatically updated after the device is powered off or restarted after failure.
  • Client A can display the option of whether to automatically restore the resource state after the device is powered off or restarted after failure, and if the user selects Yes, Client A can perform the setting of S1001.
  • the embodiment corresponding to FIG. 10 may not perform the step of obtaining the first trigger instruction through a user operation in S953.
  • the consumption of Client A can be reduced, and the automation degree of the Internet of Things system can be improved.
  • FIG. 11 is a schematic flowchart of another IoT communication method provided by another embodiment of the present application. As shown in FIG. 11 , the method includes:
  • S1101 may also be performed: Client A stores the current resource information of the subscribed device resource.
  • S1103 may also be executed: Client A stores the latest resource information of the subscribed device resource.
  • the steps of S943 to S953 may be replaced with the following steps of S1105 to S1111.
  • the steps of S1107 and S961 may be performed, or the steps of S1109, S1111, and S955 to S961 may be performed.
  • Cloud A sends information about the device going online to Client A, and reports resource information after the device goes online.
  • Client A displays that the device is online, and determines that the resource status information or resource information content is the same before the device is offline and after the device is online.
  • Client A displays that the device is online, and determines that the resource status information or resource information content is different before the device is offline and after the device is online.
  • the content of the resource status before offline may be the latest resource information of the resource of the subscribed device.
  • Client A determines that the resource state can be restored, and obtains a first trigger instruction through a user operation.
  • the resource occupancy rate of Cloud A can be reduced, the delay of information transmission can be reduced, and the controllability of resource recovery can be improved.
  • the embodiment of the present application may also provide a communication method for the Internet of Things.
  • the difference between the embodiment of the method and the embodiment corresponding to FIG. 11 is that after S919, a step may also be performed: the client sets the subscribed resource on the device It is automatically updated after power-off and power-on or fault restart, and the step of obtaining the first trigger instruction through a user operation in S1111 is not performed.
  • the resource occupancy rate of Cloud A can be reduced, the delay of information transmission can be reduced, and the automation degree of the Internet of Things system can be improved.
  • the embodiments of the present application provide an IoT communication device 1200/1300/1400.
  • the device includes each unit included and each module included in each unit, and can be processed by a processor in a terminal device.
  • the processor can also be realized by a specific logic circuit; in the process of implementation, the processor can be a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP) or a field programmable gate array ( FPGA) etc.
  • CPU central processing unit
  • MPU microprocessor
  • DSP digital signal processor
  • FPGA field programmable gate array
  • FIG. 12 is a schematic diagram of the composition and structure of an IoT communication device provided by an embodiment of the present application. As shown in FIG. 12 , the IoT communication device 1200 includes:
  • the receiving unit 1201 is used for the client to receive the first resource information sent by the resource device through the cloud platform; the first resource information includes or indicates the first resource status information of a specific resource in the resource device;
  • the sending unit 1202 is configured to send a recovery request to the resource device through the cloud platform when the first resource state information changes to the second resource state information; the recovery request instructs the resource device to restore the state to the same state as the first resource state information corresponding state.
  • the state corresponding to the first resource state information is the state of the specific resource before the resource device is powered off, and the state corresponding to the second resource state information is the state of the specific resource after the resource device is powered on.
  • the IoT communication device 1200 further includes: a determining unit 1203, for the client to determine that the first resource state information is changed to the second resource state information, and the client determines that the resource state of a specific resource can be restored;
  • the sending unit 1202 is further configured for the client to send a recovery request to the resource device through the cloud platform.
  • the first resource information further includes or indicates resource attribute information of a specific resource, where the resource attribute information is used to indicate that the resource state of the specific resource can be restored;
  • the determining unit 1203 is further configured for the client to determine, based on the resource attribute information, that the resource state of the specific resource can be restored.
  • the IoT communication apparatus 1200 further includes: an obtaining unit 1204, configured for the client to obtain the first trigger instruction; the first trigger instruction is used to instruct to restore the resource state of the resource device.
  • the obtaining unit 1204 is further configured for the client to obtain a second trigger instruction; the second trigger instruction is used to instruct the client to determine that when the first resource state information changes to the second resource state information, automatically pass the The cloud platform sends a recovery request to the resource device.
  • the receiving unit 1201 is further configured for the client to receive a notification message sent by the cloud platform; the notification message indicates that the first resource status information is changed to the second resource status information, or the notification message indicates that the resource status of the resource device needs to be recovery, or the notification message includes or indicates the first resource information;
  • the determining unit 1203 is further configured for the client to determine, based on the notification message, that the first resource state information is changed to the second resource state information.
  • the receiving unit 1201 is further configured for the client to receive second resource information sent by the resource device through the cloud platform; the second resource information includes or indicates: second resource status information of a specific resource in the resource device, or, The second resource information includes or indicates: the second resource state information of the specific resource in the resource device and the resource attribute information of the specific resource; the resource attribute information is used to indicate that the resource state of the specific resource can be restored;
  • the determining unit 1203 is further configured for the client to determine that the second resource state information is different from the first resource state information, and determine that the first resource state information is changed to the second resource state information.
  • FIG. 13 is a schematic diagram of the composition and structure of another IoT communication device provided by an embodiment of the present application. As shown in FIG. 13 , the IoT communication device 1300 includes:
  • the sending unit 1301 is used for the resource device to send first resource information to the client through the cloud platform; the first resource information includes or indicates the first resource status information of a specific resource in the resource device;
  • a receiving unit 1302, configured to receive the recovery request sent by the client through the cloud platform when the first resource state information is changed to the second resource state information;
  • the restoring unit 1303 is used for the resource device to restore the state to the state corresponding to the first resource state information.
  • the restoring unit 1303 is also used for the resource equipment to restore the state corresponding to the second resource state information to the state corresponding to the first resource state information;
  • the state corresponding to the first resource state information is the state of the specific resource before the resource device is powered off, and the state corresponding to the second resource state information is the state of the specific resource after the resource device is powered on.
  • the first resource information further includes or indicates resource attribute information of a specific resource, where the resource attribute information is used to indicate that the resource state of the specific resource can be restored.
  • the sending unit 1301 is further configured for the resource device to send second resource information to the cloud platform;
  • the second resource information includes or indicates: second resource status information of a specific resource in the resource device, or second resource information Including or indicating: the second resource state information of the specific resource in the resource device and the resource attribute information of the specific resource; the resource attribute information is used to indicate that the resource state of the specific resource can be restored;
  • the second resource state information is used by the cloud platform to send a notification message to the client when it is determined that the first resource state information and the second resource state information are different; the notification message indicates that the first resource state information changes to the second resource state information, or the notification message indicates that the resource state of the resource device needs to be restored, or the notification message includes or indicates the first resource information.
  • the sending unit 1301 is further configured for the resource device to send second resource information to the client through the cloud platform;
  • the second resource information includes or indicates: second resource status information of a specific resource in the resource device, or, the first
  • the second resource information includes or indicates: the second resource state information of the specific resource in the resource device and the resource attribute information of the specific resource; the resource attribute information is used to indicate that the resource state of the specific resource can be restored;
  • the second resource state information is used by the client to send a recovery request to the resource device when it is determined that the first resource state information and the second resource state information are different.
  • FIG. 14 is a schematic diagram of the composition and structure of another IoT communication device provided by an embodiment of the application. As shown in FIG. 14 , the IoT communication device 1400 includes:
  • the first transceiver unit 1401 is used for the cloud platform to receive the first resource information sent by the resource device, and send the first resource information to the client; the first resource information includes or indicates the first resource status information of a specific resource in the resource device;
  • the second transceiver unit 1402 is configured to, when the first resource status information changes to the second resource status information, the cloud platform receives a recovery request sent by the client, and sends a recovery request to the resource device; the recovery request instructs the resource device to recover the status to a state corresponding to the first resource state information.
  • the state corresponding to the first resource state information is the state of the specific resource before the resource device is powered off, and the state corresponding to the second resource state information is the state of the specific resource after the resource device is powered on.
  • the first resource information further includes or indicates resource attribute information of a specific resource, where the resource attribute information is used to indicate that the resource state of the specific resource can be restored.
  • the IoT communication device 1400 further includes: a determining unit 1403, configured for the cloud platform to determine, based on the resource attribute information, that the resource state of a specific resource can be restored;
  • the state updating unit 1404 is used for the cloud platform to modify the third resource information stored in the cloud platform to the first resource information; the third resource information is received by the cloud platform before the first resource information.
  • the first transceiver unit 1401 is further configured for the cloud platform to receive second resource information sent by the resource device; the second resource information includes or indicates: second resource status information of a specific resource in the resource device, or, the first The second resource information includes or indicates: the second resource state information of the specific resource in the resource device and the resource attribute information of the specific resource; the resource attribute information is used to indicate that the resource state of the specific resource can be restored; it is used for the cloud platform to determine the first resource state information Different from the second resource status information, a notification message is sent to the client; the notification message indicates that the first resource status information is changed to the second resource status information, or the notification message indicates that the resource status of the resource device needs to be restored, or the notification message includes or Indicates first resource information.
  • the first transceiver unit 1401 is further configured for the cloud platform to receive second resource information sent by the resource device, and send the second resource information to the client;
  • the second resource information includes or indicates: The second resource state information, or the second resource information includes or indicates: the second resource state information of the specific resource in the resource device and the resource attribute information of the specific resource; the resource attribute information is used to indicate that the resource state of the specific resource can be restored;
  • the second resource state information is used by the client to send a recovery request to the resource device when it is determined that the first resource state information and the second resource state information are different.
  • the above-mentioned method for transmitting messages in the Internet of Things is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. middle.
  • the technical solutions of the embodiments of the present application may be embodied in the form of software products in essence or the parts that contribute to related technologies.
  • the computer software products are stored in a storage medium and include several instructions to make
  • the client/cloud platform/resource device executes all or part of the methods of the various embodiments of the present application.
  • the aforementioned storage medium includes: a U disk, a mobile hard disk, a read only memory (Read Only Memory, ROM), a magnetic disk or an optical disk and other media that can store program codes.
  • ROM Read Only Memory
  • the aforementioned storage medium includes: a U disk, a mobile hard disk, a read only memory (Read Only Memory, ROM), a magnetic disk or an optical disk and other media that can store program codes.
  • the embodiments of the present application are not limited to any specific combination of hardware and software.
  • the Internet of Things communication device 1500 includes: a processor 1501 and a memory 1502, wherein the memory 1502 stores data that can be stored in the processor 1501
  • a computer program running on the processor 1501 implements the steps in the method executed by the client/cloud platform/resource device in any of the foregoing embodiments when the processor 1501 executes the program.
  • the IoT communication device 1500 may be the aforementioned client/cloud platform/resource device.
  • any two units may be connected through a circuit
  • the processor 1501 and the memory 1502 may be connected through a circuit.
  • An embodiment of the present application provides a computer storage medium, where one or more programs are stored in the computer storage medium, and the one or more programs can be executed by one or more processors to implement the steps of the method executed by the client in the foregoing method.
  • An embodiment of the present application provides a computer storage medium, where one or more programs are stored in the computer storage medium, 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 above method.
  • An embodiment of the present application provides a computer storage medium, where one or more programs are stored in the computer storage medium, and the one or more programs can be executed by one or more processors to implement the steps of the method executed by the resource device in the above method.
  • FIG. 16 is a schematic structural diagram of a chip provided by an embodiment of the present application.
  • the chip 1600 shown in FIG. 16 includes a processor 1601 and a memory 1602.
  • the processor 1601 is used to call and run a computer program from the memory 1602, so that the client/cloud platform/resource device installed with the chip 1600 executes this The steps of the method executed by the client/cloud platform/resource device in the embodiment of the application.
  • the memory 1602 may be a separate device independent of the processor 1601 , or may be integrated in the processor 1601 .
  • the chip 1600 may also include an input interface 1603 .
  • the processor 1601 can control the input interface 1603 to communicate with other devices or chips, and specifically, can obtain information or data sent by other devices or chips.
  • the chip 1600 may also include an output interface 1604 .
  • the processor 1601 can control the output interface 1604 to communicate with other devices or chips, and specifically, can output information or data to other devices or chips.
  • the chip 1600 may be applied to the client/cloud platform/resource device in the embodiments of the present application, and the chip may be implemented by the client/cloud platform/resource device in each method of the embodiments of the present application The corresponding process, for the sake of brevity, will not be repeated here.
  • the chip 1600 mentioned in the embodiments of the present application may also be referred to as a system-on-chip, a system-on-chip, a system-on-chip, or a system-on-chip, or the like.
  • An embodiment of the present application provides a computer program product, where the computer program product includes a computer storage medium, and the computer storage medium stores computer program code, where the computer program code includes instructions that can be executed by at least one processor, and when the instructions are executed by at least one processor Implement the steps of the method executed by the client/cloud platform/resource device in the above method.
  • the computer program product can be applied to the client/cloud platform/resource device in the embodiments of the present application, and the computer program instructions cause the computer to execute the various methods in the embodiments of the present application by the client/cloud platform
  • the corresponding process of /resource device implementation is not repeated here for brevity.
  • the processor in this embodiment of the present application may be an integrated circuit chip, which has a signal processing capability.
  • each step of the above method embodiments may be completed by a hardware integrated logic circuit in a processor or an instruction in the form of software.
  • the above-mentioned processor can be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), an off-the-shelf programmable gate array (Field Programmable Gate Array, FPGA) or other available Programming logic devices, discrete gate or transistor logic devices, discrete hardware components.
  • DSP Digital Signal Processor
  • ASIC Application Specific Integrated Circuit
  • FPGA Field Programmable Gate Array
  • 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 conjunction with the embodiments of the present application may be directly embodied as executed by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor.
  • the software modules may be located in random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers and other storage media mature in the art.
  • the storage medium is located in the memory, and the processor reads the information in the memory, and completes the steps of the above method in combination with its hardware.
  • the memory or other storage space in this embodiment of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory.
  • the non-volatile memory may be a read-only memory (Read-Only Memory, ROM), a programmable read-only memory (Programmable ROM, PROM), an erasable programmable read-only memory (Erasable PROM, EPROM), an electrically programmable read-only memory (Erasable PROM, EPROM). Erase programmable read-only memory (Electrically EPROM, EEPROM) or flash memory.
  • Volatile memory may be Random Access Memory (RAM), which acts as an external cache.
  • RAM Static RAM
  • DRAM Dynamic RAM
  • SDRAM Synchronous DRAM
  • SDRAM double data rate synchronous dynamic random access memory
  • Double Data Rate SDRAM DDR SDRAM
  • enhanced SDRAM ESDRAM
  • synchronous link dynamic random access memory Synchlink DRAM, SLDRAM
  • Direct Rambus RAM Direct Rambus RAM
  • the memory in the embodiment of the present application may also be a static random access memory (static RAM, SRAM), a dynamic random access memory (dynamic RAM) , DRAM), synchronous dynamic random access memory (synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (double data rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (enhanced SDRAM, ESDRAM) ), synchronous connection dynamic random access memory (synch link DRAM, SLDRAM) and direct memory bus random access memory (Direct Rambus RAM, DR RAM) and so on. That is, the memory in the embodiments of the present application is intended to include but not limited to these and any other suitable types of memory.
  • references throughout the specification to "one embodiment” or “an embodiment” or “an embodiment of the present application” or “the preceding embodiments” or “some embodiments” or “some implementations” mean the same as implementing A particular feature, structure, or characteristic of an example is included in at least one embodiment of the present application.
  • the appearances of "one embodiment” or “an embodiment” or “the present embodiment” or “the preceding embodiments” or “some embodiments” or “some implementations” in various places throughout this specification are not necessarily necessarily referring to the same Example.
  • the particular features, structures or characteristics may be combined in any suitable manner in one or more embodiments.
  • the size of the sequence numbers of the above-mentioned processes does not mean the sequence of execution, and the execution sequence of each process should be determined by its functions and internal logic, and should not be dealt with in the embodiments of the present application.
  • implementation constitutes any limitation.
  • the above-mentioned serial numbers of the embodiments of the present application are only for description, and do not represent the advantages or disadvantages of the embodiments.
  • the client/cloud platform/resource device executes any step in the embodiments of the present application, and the processor of the client/cloud platform/resource device may execute the step.
  • the embodiments of the present application do not limit the sequence in which the client/cloud platform/resource device performs the following steps.
  • the manner in which data is processed in different embodiments may be the same method or different methods.
  • any step in the embodiments of the present application can be independently executed by the client/cloud platform/resource device, that is, when the client/cloud platform/resource device executes any step in the following embodiments, The execution of other steps may be independent.
  • the client/cloud platform/resource device can be obtained from each provided embodiment It is not necessary to execute every step, as long as the method corresponding to the executed step is a complete solution.
  • the disclosed client/cloud platform/resource device and method may be implemented in other manners.
  • the client/cloud platform/resource device embodiments described above are only illustrative.
  • the division of the units is only a logical function division.
  • the coupling, or direct coupling, or communication connection between the various components shown or discussed may be through some interfaces, and the indirect coupling or communication connection of resource devices or units may be electrical, mechanical or other. Form.
  • the aforementioned program can be stored in a computer-readable storage medium, and when the program is executed, the execution includes: The steps of the above method embodiment; and the aforementioned storage medium includes: a mobile storage resource device, a read only memory (Read Only Memory, ROM), a magnetic disk or an optical disk and other media that can store program codes.
  • ROM Read Only Memory
  • the above-mentioned integrated units of the present application are implemented in the form of software function modules and sold or used as independent products, they may also be stored in a computer-readable storage medium.
  • the technical solutions of the embodiments of the present application may be embodied in the form of software products in essence or the parts that contribute to related technologies.
  • the computer software products are stored in a storage medium and include several instructions to make
  • the client/cloud platform/resource device executes all or part of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes various media that can store program codes, such as a removable storage resource device, a ROM, a magnetic disk, or an optical disk.
  • the descriptions of the same steps and the same contents in different embodiments can be referred to each other.
  • the term "does not” does not affect the sequence of steps. For example, if the client/cloud platform/resource device executes A and then executes B, it may be that the client/cloud platform/resource device executes A first. Then execute B, or the client/cloud platform/resource device executes B first and then executes A, or the client/cloud platform/resource device executes A and executes B at the same time.
  • A is included in a message, which means that A is included in a message.
  • Indicating A in a message means that a message includes the identifier of A, so that A can be obtained based on the identifier of A. It should be understood that when different resource devices perform the same steps, the execution manners may be the same.
  • the embodiments of the present application provide an Internet of Things communication method, device, equipment, computer storage medium, chip and computer program product.
  • the resource device can restore the state to the previous normal working state, thereby improving the reliability of IoT communication.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Computer Security & Cryptography (AREA)
  • Telephonic Communication Services (AREA)

Abstract

本申请实施例公开了一种物联网通信方法、装置、设备、计算机存储介质、芯片及计算机程序产品,该方法包括:客户端通过云平台接收资源设备发送的第一资源信息;所述第一资源信息包括或指示所述资源设备中特定资源的第一资源状态信息;在所述第一资源状态信息变化为第二资源状态信息的情况下,所述客户端通过所述云平台向所述资源设备发送恢复请求;所述恢复请求指示所述资源设备将状态恢复至与所述第一资源状态信息对应的状态。

Description

物联网通信方法、装置、设备、计算机存储介质及芯片 技术领域
本申请实施例涉及但不限于物联网领域,尤其涉及一种物联网通信方法、装置、设备、计算机存储介质及芯片。
背景技术
物联网(The Internet of Things,IOT)是新一代信息技术的重要组成部分。
物联网中资源设备掉电或者故障的情况时有发生,为保障物联网***的正常运行,需要尽快将物联网中的资源设备恢复正常工作状态。
发明内容
本申请实施例提供一种物联网通信方法、装置、设备、计算机存储介质及芯片。
第一方面,提供一种物联网通信方法,包括:
客户端通过云平台接收资源设备发送的第一资源信息;所述第一资源信息包括或指示所述资源设备中特定资源的第一资源状态信息;
在所述第一资源状态信息变化为第二资源状态信息的情况下,所述客户端通过所述云平台向所述资源设备发送恢复请求;所述恢复请求指示所述资源设备将状态恢复至与所述第一资源状态信息对应的状态。
第二方面,提供一种物联网通信方法,包括:
资源设备通过云平台向客户端发送第一资源信息;所述第一资源信息包括或指示所述资源设备中特定资源的第一资源状态信息;
在所述第一资源状态信息变化为第二资源状态信息的情况下,所述资源设备通过所述云平台接收所述客户端发送的恢复请求;
所述资源设备将状态恢复至与所述第一资源状态信息对应的状态。
第三方面,提供一种物联网通信方法,包括:
云平台接收资源设备发送的第一资源信息,向客户端发送所述第一资源信息;所述第一资源信息包括或指示所述资源设备中特定资源的第一资源状态信息;
在所述第一资源状态信息变化为第二资源状态信息的情况下,所述云平台接收所述客户端发送的恢复请求,向所述资源设备发送所述恢复请求;所述恢复请求指示所述资源设备将状态恢复至与所述第一资源状态信息对应的状态。
第四方面,提供一种物联网通信装置,包括:
接收单元,用于客户端通过云平台接收资源设备发送的第一资源信息;所述第一资源信息包括或指示所述资源设备中特定资源的第一资源状态信息;
发送单元,用于在所述第一资源状态信息变化为第二资源状态信息的情况下,所述客户端通过所述云平台向所述资源设备发送恢复请求;所述恢复请求指示所述资源设备将状态恢复至与所述第一资源状态信息对应的状态。
第五方面,提供一种物联网通信装置,包括:
发送单元,用于资源设备通过云平台向客户端发送第一资源信息;所述第一资源信息包括或指示所述资源设备中特定资源的第一资源状态信息;
接收单元,用于在所述第一资源状态信息变化为第二资源状态信息的情况下,所述资源设备通过所述云平台接收所述客户端发送的恢复请求;
恢复单元,用于所述资源设备将状态恢复至与所述第一资源状态信息对应的状态。
第六方面,提供一种物联网通信装置,包括:
第一收发单元,用于云平台接收资源设备发送的第一资源信息,向客户端发送所述第一资源信息;所述第一资源信息包括或指示所述资源设备中特定资源的第一资源状态信息;
第二收发单元,用于在所述第一资源状态信息变化为第二资源状态信息的情况下,所述云平台接收所述客户端发送的恢复请求,向所述资源设备发送所述恢复请求;所述恢复请求指示所述资源设备将状态恢复至与所述第一资源状态信息对应的状态。
第七方面,提供一种物联网通信设备,包括:存储器和处理器,
所述存储器存储有可在处理器上运行的计算机程序,
所述处理器执行所述程序时实现上述任一方法中的步骤。
第八方面,提供一种计算机存储介质,所述计算机存储介质存储有一个或者多个程序,所述一个或者多个程序可被一个或者多个处理器执行,以实现上述任一方法中的步骤。
第九方面,提供一种芯片,包括:处理器,用于从存储器中调用并运行计算机程序,使得安装有所述芯片的设备执行上述任一方法中的步骤。
第十方面,提供一种计算机程序产品,所述计算机程序产品包括计算机存储介质,所述计算机存储介质存储计算机程序代码,所述计算机程序代码包括能够由至少一个处理器执行的指令,当所述指令由所述至少一个处理器执行时实现上述任一方法中的步骤。
本申请实施例中,在资源设备的第一资源状态信息变化为第二资源状态信息的情况下,客户端能够通过向资源设备发送恢复请求,使资源设备的状态恢复至与第一资源状态信息对应的状态,从而在由于资源设备掉电或故障而导致资源的状态发生变化的情况下,使资源设备能够将状态恢复至之前的正常工作状态,进而能够提高物联网通信的可靠性。
附图说明
图1为本申请实施例提供的一种物联网***的示意图;
图2为相关技术提供的一种资源设备向客户端上报资源状态的方法的实现流程示意图;
图3为本申请实施例提供的一种物联网通信方法的流程示意图;
图4为本申请实施例提供的另一种物联网通信方法的流程示意图;
图5为本申请实施例提供的又一种物联网通信方法的流程示意图;
图6为本申请实施例提供的再一种物联网通信方法的流程示意图;
图7为本申请另一实施例提供的一种物联网通信方法的流程示意图;
图8为本申请又一实施例提供的一种物联网通信方法的流程示意图;
图9为本申请再一实施例提供的一种物联网通信方法的流程示意图;
图10为本申请另一实施例提供的另一种物联网通信方法的流程示意图;
图11为本申请另一实施例提供的又一种物联网通信方法的流程示意图;
图12为本申请实施例提供的一种物联网通信装置的组成结构示意图;
图13为本申请实施例提供的另一种物联网通信装置的组成结构示意图
图14为本申请实施例提供的又一种物联网通信装置的组成结构示意图;
图15为本申请实施例提供的一种物联网通信设备的硬件实体示意图;
图16是本申请实施例提供的一种芯片的结构示意图。
具体实施方式
下面将通过实施例并结合附图具体地对本申请的技术方案进行详细说明。下面这几个具体的实施例可以相互结合,对于相同或相似的概念或过程可能在某些实施例中不再赘述。
需要说明的是:在本申请实例中,“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。
另外,本申请实施例所记载的技术方案之间,在不冲突的情况下,可以任意组合。
图1为本申请实施例提供的一种物联网***的示意图,如图1所示,物联网***10包括资源设备(Device)11至15、云平台(Cloud)16以及客户端(Client)17。其中:
资源设备11至15可以为物联网中的资源状态上报节点。资源状态上报节点可以包括资源状态确定模块和通信模块,其中,资源状态确定模块可以用于确定资源设备当前运行的状态信息,通信 模块用于资源设备的通信,例如,通信模块可以将资源状态确定模块确定的当前运行的状态信息上传至云平台16或者上传至客户端17。在图1所示的家电领域的实施例中,资源设备11至15可以为电灯、空调、智能音箱、水壶、电饭锅、冰箱和电视机等任意一种或几种的组合。在本申请其它领域的实施例中,资源设备还可以为其它智能家电、手机、电脑、智能手表、工厂中的测量设备、汽车中的感测设备、增强现实(Augmented Reality,AR)设备或虚拟现实(Virtual Reality,VR)设备等任一种或几种的组合。本申请实施例对资源设备不作限制,只要资源设备能够在不同的状态下工作即可。
云平台可以用云端或云设备代替。云平台可以是实体设备或虚拟设备。
客户端17可以为具有显示和控制功能的设备,例如采用显示屏来实现显示功能,显示功能可以用于显示资源设备的相关信息给用户;采用单片机或处理器等来实现控制功能,控制功能用于控制资源设备的运行状态。
本申请实施例中的客户端17可以是实体设备或虚拟设备。在客户端17为实体设备时,客户端17可以为终端设备、接入终端设备、用户单元、用户站、移动站、移动台、远方站、远程终端设备、移动设备、用户终端设备(User Equipment,UE)、无线通信设备、用户代理或用户装置。终端设备可以是服务器、手机、平板电脑、笔记本电脑、掌上电脑、个人数字助理、便捷式媒体播放器、智能音箱、导航装置、显示设备、智能手环等可穿戴设备、虚拟现实设备、增强现实设备、计步器、数字TV或台式计算机等。
在一些实施例中,资源设备可以通过云平台与客户端连接,例如,在图1所对应的实施例中,资源设备11和15均可以通过云平台16与客户端17相连,客户端17可以通过云平台16与资源设备11和15进行信息交互。在另一些实施例中,资源设备可以直接与客户端17连接,例如,在图1所对应的实施例中,资源设备12和13均与客户端17直接相连,从而客户端17可以直接与资源设备12或13进行信息交互。客户端17与上述任一资源设备进行信息交互,可以包括:客户端17可以对资源设备11至15进行管理和/或控制,如资源设备软硬件升级、资源设备功能和/或运行状态和/或资源状态控制、资源订阅以及资源查询至少一个等。
资源设备之间还可以相互连接,例如,资源设备11可以分别与资源设备14和15连接,客户端17和资源设备14或15之间的消息或数据可以经由资源设备11转发,资源设备11也可以对转发的消息或数据进行一定的处理,如数据预处理/过滤,通信协议或消息格式转换等。
两个资源设备之间,和/或,资源设备与客户端之间,和/或,资源设备与云平台之间,和/或,客户端与云平台之间,可以通过通信模块进行通信连接。需要说明的是,本申请实施例不限定上述任两者之间的连接方式或通信协议。比如,上述任两者之间可以采用有线连接,或者,使用超文本传输协议(Hyper Text Transfer Protocol,HTTP)进行数据或消息传输,或者,使用受限应用协议(Constrained Application Protocol,CoAP)进行数据或消息传输,或者,采用基于蜂窝的窄带物联网(Narrow Band Internet of Things,NB-IoT)无线连接技术,使用消息队列遥测传输(Message Queuing Telemetry Transport,MQTT)协议进行数据或消息传输。在本申请实施例中,上述任两者之间可以采用CoAP进行数据或消息传输。在其它实施例中,上述任两者之间可以其它协议进行数据或消息传输。
需要说明的是,物联网技术中,客户端17以资源的形式对资源设备进行管理,这里的“资源”是抽象的概念,既可以指物理形态的资源设备,也可以指资源设备的型号,软硬件版本或生产商等静态属性,还可以指资源设备可以执行的操作、可以上报的事件、参数或者可以读取的状态参数等动态属性。
图2为相关技术提供的一种资源设备向客户端上报资源状态的方法的实现流程示意图,如图2所示,该方法包括:
S201、建立Device A到Cloud A的连接。
在一些实施方式中,Device A与Cloud A之间的连接可以是长连接。本申请实施例中的Device A可以是上述的资源设备,Cloud A可以是上述的云平台。
S203、Client A向Cloud A发送获取Cloud A上设备信息的请求。
在一些实施方式中,Client A与Cloud A之间的连接可以是短连接或长连接。本申请实施例中的Client A可以是上述的客户端。在一些实施例中,Client A与Cloud A之间或者Device A与Cloud A之间在建立安全连接后进行数据传输,例如可以采用HTTP协议、CoAP协议或者MQTT协议等建立安全连接,从而在Client A与Cloud A之间或者Device A与Cloud A之间可以建立安全通道,进 而数据或信息可以在Device A与Cloud A之间安全传输。
设备信息可以包括在Cloud A上的所有设备的信息,或者,包括与Client A相关联的设备的信息。设备信息可以包括至少一个设备的设备信息。
S205、Cloud A向Client A发送Cloud A上的设备信息。
Cloud A上的设备信息可以包括Device A的设备信息。在一些实施例中,Cloud A上的设备信息可以包括Device B、Device C、Device D等中的至少一个的设备信息。
Device A上可以包括至少一个资源,一个资源可以包括至少一个资源信息。
例如,在Device A为电灯时,电灯中可以包括至少一个资源,例如,电灯中可以包括用于控制电灯亮度的资源、用于控制电灯的颜色的资源、用于控制电灯的色温的资源、用于控制电灯的闪烁频率的资源等中的至少一个。
再例如,在Device A为洗衣机时,洗衣机可以包括至少一个资源,例如,洗衣机中可以包括用于控制洗衣模式的资源、用于控制水位高度的资源、用于控制洗衣时长的资源、用于控制漂洗强度的资源等中的至少一个。
又例如,在Device A为电视机时,电视机可以包括至少一个资源,例如,电视机中可以包括用于控制电视机播放频道的资源、用于控制播放声音大小的资源、用于调整显示模式的资源等中的至少一个。
应当理解,Device A还可以用其它设备进行举例,例如空调、音箱或水壶等,本申请实施例对Device A的实现场景不作限定。
例如,Cloud A向Client A发送Cloud A上电灯、洗衣机、电视机、空调、音箱或水壶等至少一个设备的设备信息。
设备信息中不仅可以包括设备中包括的至少一个资源或至少一个资源的标识,还可以包括设备类型、设备标识、设备外观、设备位置等中的至少一个信息。
S207、Client A向Cloud A发送订阅请求,该订阅请求用于请求订阅Cloud A上Device A的资源信息。
在一些实施例中,Client A可以请求订阅一个设备的资源信息,或者,可以请求订阅至少两个设备的资源信息,一个设备或至少两个设备的资源信息包括Device A的资源信息。在一些实施例中,Client A可以请求订阅一个设备的一个资源的资源信息,或者,可以订阅一个设备的至少两个资源的资源信息。
S209、Cloud A向Device A发送订阅请求,该订阅请求用于请求订阅Cloud A上Device A的资源信息。
S211、Device A向Cloud A发送订阅成功消息和当前资源信息。
在一些实施例中,订阅成功消息和当前资源信息可以是在一个信令中发送的。在另一些实施例中,订阅成功消息和当前资源信息可以分别是在两个信令中发送的,例如,订阅成功消息可以先于当前资源信息发送,或者,当前资源信息可以先于订阅成功消息发送。
S213、Cloud A向Client A转发订阅成功消息和当前资源信息。
S215、Device A资源状态改变。
以资源设备为洗衣机为例,资源状态改变例如是洗衣机的工作模式改变、洗衣机的水位信息、洗衣机的漂洗强度的改变中的至少一个。
S215、Device A向Cloud A发送改变后的资源信息。
S217、Cloud A向Client A发送改变后的资源信息。
相关技术只是提供了Device A如何向Client A上报资源状态的情况,相关技术并未考虑到在Device A断电重启后如何运行的情况。
以一个实施场景进行举例,在洗衣机正在采用正常洗衣模式进行洗衣服的过程中,如果洗衣机断电上电后(例如是重启的断电上电,或者停电导致的断电上电,或者是用户误操作导致的断电上电等),洗衣机可能会处于关机状态、待机状态或者以默认状态运行,如此,洗衣机在断电上电后,无法接着断电上电前的状态继续运行。
以另一个实施场景进行举例,在洗衣机以正常模式进行洗衣时,如果用于切换到快洗模式后,又想重新切换至正常模式,这时需要用户进行复杂的操作才能重新恢复到正常模式,导致用户的操作麻烦。
再例如,在空调在检测到周围温度满足设定的温度时,会进入省电模式或者待机模式,然而,在很多场景下,用户希望空调一直以固定的状态进行工作,而不希望空调突然进入其它状态,然而, 用户的这种需求只会使得用户不停地使用空调遥控器对空调进行遥控操作,导致用户的使用麻烦。
图3为本申请实施例提供的一种物联网通信方法的流程示意图,如图3所示,该方法包括:
S301、客户端通过云平台接收资源设备发送的第一资源信息;第一资源信息包括或指示资源设备中特定资源的第一资源状态信息。
需要说明的是,本申请实施例中所描述的客户端,可以为图1中的客户端17或其它实施例中的Client A,本申请实施例中所描述的资源设备,可以为图1中的资源设备11至15中的任一个或其它实施例中的Device A。本申请实施例中所描述的云平台,可以为图1中的云平台16或其它实施例中的Cloud A。
在一些实施例中,资源设备可以通过云平台向客户端以固定周期发送资源信息。在另一些实施例中,资源设备可以通过云平台向客户端以可变周期发送资源信息,例如,在6:00-24:00之间,资源设备可以采用较短的周期发送资源信息,在0:00-6:00之间,资源设备可以采用较长的周期发送资源信息。再例如,在资源设备确定家庭中存在用户时,可以采用较短的周期发送资源信息,在资源设备确定家庭中不存在用户时,可以采用较长的周期发送资源信息。其中,第一资源信息可以是资源设备通过云平台向客户端发送的当前的资源信息。
资源设备通过云平台向客户端发送的每一个资源信息(可以是图2对应的实施例中的资源信息,包括本申请实施例中描述的第一资源信息、第二资源信息或第三资源信息)中可以包括或指示特定资源的资源状态信息,或者,可以包括或指示特定资源的资源状态信息和特定资源的资源属性信息。特定资源的资源状态信息可以是特定资源的当前状态值,通常会随着特定资源状态的变化而产生变化。在资源设备通过云平台向客户端发送的每一个资源信息中的资源属性信息,可以包括以下至少一个:资源信息/资源状态信息是否可恢复、资源信息/资源状态信息的类型、资源信息/资源状态信息是否可修改、资源信息/资源状态信息所对应的特定资源的标识等。
例如,第一资源信息可以不仅包括第一资源状态信息,还可以包括特定资源的资源属性信息。在本申请实施例中,资源设备通过云平台向客户端发送的每一个资源信息,例如第一资源信息或下述的第二资源信息、第三资源信息等,均可以包括特定资源的资源属性信息,或者,部分资源信息包括特定资源的资源属性信息。
本申请实施例中的第一资源信息(或者下述的第二资源信息或第三资源信息)可以用state表示,state可以表示特定资源的当前状态。例如,state可以包括:资源状态1:XXX;资源状态2:XXX;资源状态3:XXX;资源属性1:XXX;资源属性2:XXX。
第一资源状态信息可以是至少一个资源状态信息,至少一个资源状态信息中的每一个资源状态信息可以是资源状态值。例如,以资源设备为洗衣机,特定资源为洗衣机的工作模式进行举例,第一资源状态信息可以是洗衣机的运行模式标识、洗衣机已经运行的时长、洗衣机的水位信息、洗衣机的洗衣强度等信息中的至少一个。
特定资源可以是资源设备中的一个资源或者至少两个资源。特定资源的资源属性信息可以包括一个或至少两个属性信息,一个或至少两个属性信息的至少部分,可以是固定不变的属性信息,或者,可以是随着时间和/或场景变化而变化的属性信息,或者,可以是通过资源设备接收用户输入的属性调整操作而变化的属性信息。例如,在资源属性信息为指示(indicate)属性下的信息A(或者描述为indicate:A)时,信息A表征资源状态信息可恢复。在一些实施例中,资源属性信息可以一直为信息A。在另一些实施例中,可以在资源设备接收到某些指令时,将资源属性信息修改为信息B,信息B表征资源状态信息不可恢复。在又一些实施例中,在资源设备确定到资源信息在一段时长内恢复的次数大于阈值时,可以确定恢复出现故障,可以将资源属性信息修改为B。
S303、在第一资源状态信息变化为第二资源状态信息的情况下,客户端通过云平台向资源设备发送恢复请求;恢复请求指示资源设备将状态恢复至与第一资源状态信息对应的状态。
在本申请实施例中,第二资源状态信息不同于第一资源状态信息。
在一些实施例中,客户端可以确定第一资源状态信息变化为第二资源状态信息。为了保证恢复过程的有效性,客户端可以确定第一资源状态信息变化为其它资源状态信息后再变为第二资源状态信息的情况下,才发送恢复请求。例如,为了避免孩子的误触发对洗衣过程的影响,客户端可以在确定到第一资源状态信息在一个设定时长内发生了至少两次变化时,才向资源设备发送恢复请求。
第一资源状态信息变化为第二资源状态信息,可以是第一资源状态信息中所有的资源状态信息中的至少一个发生变化。
在一些实施方式中,客户端确定第一资源状态信息变化为第二资源状态信息,可以是客户端能 够得到具有确定的状态值的第二资源信息,从而确定第一资源状态信息变化为第二资源状态信息。在这种方式下,客户端可以接收的资源设备通过云平台发送的第二资源状态信息,从而确定第一资源状态信息变化为第二资源状态信息。
在另一些实施方式中,客户端确定第一资源状态信息变化为第二资源状态信息,可以是客户端不能得到一个具有确定的状态值的第二资源信息,只知道第一资源状态信息发生变化,但不知道第一资源状态信息发生了什么样的变化。在这种方式下,客户端可以接收资源设备通过云平台发送的用于表征第一资源状态信息发生变化的信息,或者,云平台可以确定第一资源状态信息是否发生变化,客户端可以接收云平台发送的表征第一资源状态信息是否发生变化的信息。
在一些实施例中,恢复请求可以包括第一资源信息,或者,恢复请求可以包括第一资源状态信息,在这种情况下,资源设备在状态发生变化后,可以不存储变化前的第一资源信息或者第一资源状态信息。在另一些实施例中,恢复请求可以既不包括第一资源信息,也不包括第一资源状态信息,恢复请求只是一个用于指示状态恢复的请求,在这种情况下,资源设备可以存储变化前的第一资源信息或者第一资源状态信息,在状态发生变化后,对状态进行恢复。恢复请求中是否包括第一资源信息,可以是预先设定的,或者,可以根据资源设备的属性不同而灵活性的确定。
在资源设备通过云平台接收到恢复请求时,资源设备可以响应恢复请求,将资源设备当前的资源状态信息修改为第一资源状态信息,或者将当前的资源信息修改为第一资源信息,从而使得资源设备的状态能够恢复至与第一资源状态信息对应的状态。例如,在资源设备的第一资源状态信息变化为第二资源状态信息的情况下,资源设备可以将第二资源状态信息修改为第一资源状态信息。在资源设备将资源状态信息恢复到第一资源状态信息时,资源设备就可以以与第一资源状态信息对应的状态进行运行。
依旧以洗衣机为例,洗衣机在以正常模式运行了20分钟时,如果运行模式发生了变化,变成了快洗模式或待机模式或关机模式,在洗衣机接收到恢复请求后,可以基于恢复请求,重新进入到正常洗衣模式,并接着20分钟的时间继续洗衣。
本申请实施例中,在资源设备的第一资源状态信息变化为第二资源状态信息的情况下,客户端能够通过向资源设备发送恢复请求,使资源设备的状态恢复至与第一资源状态信息对应的状态,从而在由于资源设备掉电或故障而导致资源的状态发生变化的情况下,使资源设备能够将状态恢复至之前的正常工作状态,进而能够提高物联网通信的可靠性。
图4为本申请实施例提供的另一种物联网通信方法的流程示意图,如图4所示,该方法包括:
S401、资源设备通过云平台向客户端发送第一资源信息;客户端通过云平台接收资源设备发送的第一资源信息;第一资源信息包括或指示资源设备中特定资源的第一资源状态信息。
体现在云平台侧,云平台接收资源设备发送的第一资源信息,向客户端发送第一资源信息。
S403、客户端确定第一资源状态信息变化为第二资源状态信息。
其中,第一资源状态信息对应的状态为特定资源在资源设备断电前的状态,第二资源状态信息对应的状态为特定资源在资源设备上电后的状态。
在S403之后,客户端还可以确定特定资源的资源状态能够恢复,然后再执行S405。在一些实施例中,第一资源信息还包括或指示特定资源的资源属性信息,资源属性信息用于指示特定资源的资源状态能够恢复;客户端可以基于资源属性信息,确定特定资源的资源状态能够恢复。
S405、客户端通过云平台向资源设备发送恢复请求;资源设备通过云平台接收客户端发送的恢复请求。
体现在云平台侧,云平台接收客户端发送的恢复请求,向资源设备发送恢复请求。
S407、资源设备将状态恢复至与第一资源状态信息对应的状态。
资源设备可以响应恢复请求,将状态恢复至与第一资源状态信息对应的状态。
在本申请实施例中,资源设备在发生异常时,资源设备中资源的资源状态能够复位,从而能够提高物联网通信的可靠性。另外,客户端与资源设备之间通过云平台通信的方式,由于云平台可以接入大量的客户端和资源设备,从而使得物联网***具有***扩展性强、应用范围广的优点。
图5为本申请实施例提供的又一种物联网通信方法的流程示意图,如图5所示,该方法包括:
S501、资源设备向云平台发送第一资源信息;云平台接收资源设备发送的第一资源信息。
在本申请实施例中,第一资源信息不仅包括或指示资源设备中特定资源的第一资源状态信息,还可以包括或指示特定资源的资源属性信息,资源属性信息用于指示特定资源的资源状态能够恢复。
在一些实施例中,云平台在接收到第一资源信息之后,可以基于第一资源信息的资源属性信息,确定特定资源的资源状态能够恢复。
在一些实施例中,云平台可以将存储在云平台中的第三资源信息,修改为第一资源信息;第三资源信息是云平台在第一资源信息之前接收的。
S503、云平台向客户端发送第一资源信息;客户端接收云平台发送的第一资源信息。
在一些实施方式中,云平台与资源设备在通信时所基于的协议,可以与云平台与客户端在通信时所基于的协议相同,例如,两个协议都是HTTP协议、CoAP协议或者MQTT协议。在另一些实施例中,云平台与资源设备在通信时所基于的协议,可以与云平台与客户端在通信时所基于的协议不同,例如,前者可以为HTTP协议,后者可以为CoAP协议,本申请实施例对此不作限制。
在客户端接收到第一资源信息后,可以显示与第一资源状态信息对应的状态。
在一些实施例中,客户端或云平台可以根据资源设备上报的指示资源状态是否可恢复的资源属性信息,判断该资源的可读写属性和/或可恢复属性。如洗衣机的工作模式资源下有indicate属性(只读属性)和工作模式属性(读写属性);indicate属性指示该工作模式资源状态是否可恢复;当设备上报其资源后客户端根据indicate属性值判断该资源下的属性状态是不是可恢复的。
S505、资源设备中的第一资源状态信息变化为第二资源状态信息。
在资源设备的运行场景中,经常会出现资源设备断电上电的情况。在一种实施方式中,在资源设备上电后,资源设备的状态并不会恢复到断电之前的状态,而是进入至资源设备设置的初始状态。例如,在资源设备为电脑时,在电脑开启了多个程序的情况下,在断电上电之后,电脑并不会进入的是预先设置的桌面,并不会将断电之前开启的多个程序进行恢复。在另一种实施方式中,在资源设备上电后,资源设备的状态是可以自动进入到断电前的状态的。本申请实施例中的断电上电的一种实施方式可以是关机重启。
第二资源状态信息对应的资源设备的运行状态,可以是关机状态、待机状态或运行状态等,本申请实施例对此不作限定。
在一些实施方式中,在资源设备断电后,云平台可以监测到云平台与资源设备之间的连接断开,云平台确定资源设备离线,接着云平台可以向客户端发送资源设备离线的消息,客户端在接收到资源设备离线的消息,可以显示资源设备离线。在一些实施例中,客户端还可以对该资源设备相关的控件设置为不可触发的控件,从而用户无法通过触发客户端的方式对资源设备进行相应地控制。在一些实施例中,客户端还可以将与资源设备相关的内容采用灰度图像的方式显示,以使用户能够清楚的知道资源设备离线。
在一些实施例中,客户端是可以确定到第一资源状态变化为明确的第二资源状态的,在这种方式中,资源设备通过云平台向客户端发送第一资源信息和第二资源信息(或者第一资源状态信息和第二资源状态信息)。在另一些实施例中,客户端是不能确定到第一资源状态变化为明确的第二资源状态的,客户端只能确定到第一资源状态发生了变化,变化成了与第一资源状态不同的状态,在这种方式下,资源设备可以通过云平台向客户端发送第一资源信息(或者第一资源状态信息),而不发送第二资源信息(第二资源状态信息)。
以下说明一种实施方式下断电上电的过程流程:在资源设备通过云平台向客户端发送了第一资源信息后,资源设备发生重启,在资源设备发生重启的过程中,云平台无法接收到资源设备发送的信息(例如,云平台无法接收到资源设备发送的心跳包),也无法确定资源设备发生了什么事情,云平台只能确定资源设备离线,然后云平台向客户端发送资源设备离线的信息,客户端显示资源设备离线。在资源设备上电后,资源设备与云平台之间恢复连接,资源设备可以向云平台发送资源设备上线的通知,和/或,向云平台发送重启原因,重启原因例如是断电重启还是重置(reset)重启,在云平台将该上线的通知发送给客户端时,客户端可以显示资源设备上线的信息,在云平台将重启原因发送给客户端时,客户端可以显示重启原因。
S507、资源设备向云平台发送第二资源信息;云平台接收资源设备发送的第二资源信息。
第二资源状态信息用于云平台在确定第一资源状态信息和第二资源状态信息不同的情况下,向客户端发送通知消息。第二资源信息包括或指示:资源设备中特定资源的第二资源状态信息,或者,第二资源信息包括或指示:资源设备中特定资源的第二资源状态信息和特定资源的资源属性信息;资源属性信息用于指示特定资源的资源状态能够恢复。第二资源状态信息可以用于云平台在确定第一资源状态信息和第二资源状态信息不同的情况下,向客户端发送通知消息。
在一些实施方式中,资源设备可以向云平台发送资源设备上线的通知,资源设备上线的通知用于通知资源设备上线。第二资源信息与资源设备上线的通知、重启原因可以在一个信令中发送,或 者,可以在至少两个信令中发送。
在本申请实施例中,第一资源状态信息和/或第二资源状态信息可以为可读写的属性,资源属性信息可以为只读属性。
在本申请实施例中,第一资源状态信息和第二资源状态信息不同,可以用第一资源信息和第二资源信息不同来代替。
S509、云平台确定第一资源状态信息和第二资源状态信息不同。
S511、云平台向客户端发送通知消息;客户端接收云平台发送的通知消息。
通知消息指示第一资源状态信息变化为第二资源状态信息,或者,通知消息指示资源设备的资源状态需要恢复,或者,通知消息包括或者指示第一资源信息。
在一些实施例中,云平台还可以向客户端发送上线通知。
在一些实施例中,云平台可以在确定第一资源状态信息和第二资源状态信息不同的情况下,将存储于云平台中的第一资源状态信息修改为第二资源状态信息。在另一些实施例中,云平台可以在确定第一资源信息和第二资源信息不同的情况下,将存储于云平台中的第一资源信息修改为第二资源信息。
S513、客户端基于通知消息,确定第一资源状态信息变化为第二资源状态信息。
在一些实施方式中,客户端可以基于云平台发送的上线通知,显示资源设备上线。在一些实施方式中,客户端可以将资源设备相关的控件重新设置为可触发的控件,从而用户可以通过触发客户端对资源设备进行相应的控制。在一些实施例中,客户端还可以将与资源设备相关的内容采用彩色图像的方式显示,使用户能够清楚的知道资源设备上线。
S515、客户端基于资源属性信息,确定特定资源的资源状态能够恢复。
客户端可以基于第三资源信息中的资源属性信息,或者,基于第一资源信息中的资源属性信息,或者,基于第二资源信息中的资源属性信息,确定特定资源的资源状态能够恢复。
S517、客户端获取第一触发指令;第一触发指令用于指示对资源设备的资源状态进行恢复。
客户端获取用户对客户端进行触发得到的第一触发指令。在一些实施方式中,客户端可以显示是否恢复资源状态的控件,在用户选择是的情况下,客户端可以获取第一触发指令。
S519、客户端向云平台发送恢复请求,云平台接收客户端发送的恢复请求。
在本申请实施例中,客户端向云平台发送恢复请求的前提条件是:第一资源状态信息变化为第二资源状态信息,客户端确定特定资源的资源状态能够恢复,并接收到第一触发指令。
S521、云平台向资源设备发送恢复请求,资源设备接收云平台发送的恢复请求。
S523、资源设备将状态恢复至与第一资源状态信息对应的状态。
资源设备可以响应恢复请求,将状态恢复至与第一资源状态信息对应的状态。
在一些实施例中,资源设备可以响应恢复请求,将与第二资源状态信息对应的状态,恢复至与第一资源状态信息对应的状态。
在一些实施方式中,客户端或者云平台中可以存储有关于资源标识和资源是否能够被恢复的对应关系的列表,从而客户端或云平台可以基于该列表确定资源是否能够被恢复。在另一些实施方式中,客户端或者云平台可以直接根据最新接收到的状态信息,确定该资源是否可以恢复,在这种情况下,可以没有资源标识和资源是否能够被恢复的对应关系的列表。
在本申请实施例中,通过云平台确定第一资源状态信息和第二资源状态信息是否相同,使得云平台可以将是否相同的结果告知客户端,从而无需客户端进行第一资源信息和第二资源信息是否相同的计算,进而能够降低客户端的消耗。另外,基于用户触发客户端得到的第一触发指令发送恢复请求,可以使得资源设备只有在用户确认进行恢复时,才进行资源状态的恢复,进而可以使资源状态的恢复根据用户需求进行,提高了资源恢复的可控性。
图6为本申请实施例提供的再一种物联网通信方法的流程示意图,如图6所示,该方法包括:
S601、客户端获取第二触发指令;第二触发指令用于指示客户端确定在第一资源状态信息变化为第二资源状态信息的情况下,自动通过云平台向资源设备发送恢复请求。
在一些实施例中,客户端可以显示是否设定资源设备的状态为自动恢复的控件,在用户选择是时,得到第二操作指令,表明客户端可以自动通过云平台向资源设备发送恢复请求来自动恢复资源设备的状态。例如,在设定资源设备的资源状态断电上电自动恢复的情况下,在接收到用户对应的操作时,客户端可以设置资源设备的资源状态为断电上电自动恢复,从而在资源设备断电上电后,自动通过云平台向客户端发送恢复请求。
S603、资源设备向云平台发送第一资源信息;云平台接收资源设备发送的第一资源信息。
S605、云平台向客户端发送第一资源信息;客户端接收云平台发送的第一资源信息。
S607、资源设备中的第一资源状态信息变化为第二资源状态信息。
第一资源信息中包括第一资源状态信息,第二资源信息中包括第二资源状态信息。
S609、资源设备向云平台发送第二资源信息;云平台接收资源设备发送的第二资源信息。
其中,第二资源状态信息用于客户端在确定第一资源状态信息和第二资源状态信息不同的情况下,向资源设备发送恢复请求。
S611、云平台确定第一资源状态信息和第二资源状态信息不同。
S613、云平台向客户端发送通知消息;客户端接收云平台发送的通知消息。
S615、客户端基于通知消息,确定第一资源状态信息变化为第二资源状态信息。
S617、客户端基于资源属性信息,确定特定资源的资源状态能够恢复。
S619、客户端向云平台发送恢复请求,云平台接收客户端发送的恢复请求。
S621、云平台向资源设备发送恢复请求,资源设备接收云平台发送的恢复请求。
S623、资源设备响应恢复请求,将状态恢复至与第一资源状态信息对应的状态。
在本申请实施例中,通过云平台确定第一资源状态信息和第二资源状态信息是否相同,使得云平台可以将是否相同的结果告知客户端,从而无需客户端进行第一资源信息和第二资源信息是否相同的计算,进而能够降低客户端的消耗。另外,由于在资源设备断电上电之前,就在客户端上提前设置了资源设备的特定资源能够在断电上电后自动恢复,从而在资源设备断电上电后,客户端可以自动的向资源设备发送恢复请求,恢复流程无需用户干预,从而提高了物联网***的自动化程度。
图7为本申请另一实施例提供的一种物联网通信方法的流程示意图,如图7所示,该方法包括:
S701、资源设备向云平台发送第一资源信息;云平台接收资源设备发送的第一资源信息。
S703、云平台向客户端发送第一资源信息;客户端接收云平台发送的第一资源信息。
S705、资源设备中的第一资源状态信息变化为第二资源状态信息。
S707、资源设备向云平台发送第二资源信息;云平台接收资源设备发送的第二资源信息。
其中,本申请实施例中,第二资源状态信息用于客户端在确定第一资源状态信息和第二资源状态信息不同的情况下,向资源设备发送恢复请求。
S709、云平台向客户端发送第二资源信息;客户端接收云平台发送的第二资源信息。
在一些实施方式中,资源设备与客户端直连的情况下,客户端直接接收资源设备发送的第二资源信息。
S711、客户端确定第二资源状态信息和第一资源状态信息不同,确定第一资源状态信息变化为第二资源状态信息。
S713、客户端基于资源属性信息,确定特定资源的资源状态能够恢复。
S715、客户端获取第一触发指令;第一触发指令用于指示对资源设备的资源状态进行恢复。
S717、客户端向云平台发送恢复请求,云平台接收客户端发送的恢复请求。
S719、云平台向资源设备发送恢复请求,资源设备接收云平台发送的恢复请求。
S721、资源设备响应恢复请求,将状态恢复至与第一资源状态信息对应的状态。
在本申请实施例中,由于云平台通常需要连接大量的客户端和大量的资源设备,而通过客户端确定第一资源状态信息和第二资源状态信息是否相同,可以减少大大降低云平台的资源占用率,从而减少云平台的布局成本,且由于云平台直接将接收到的第二资源信息发送给客户端,数据无需经过云平台的计算,从而也降低了信息传输的时延。另外,基于用户触发客户端得到的第一触发指令发送恢复请求,可以使得资源设备只有在用户确认进行恢复时,才进行资源状态的恢复,进而可以使资源状态的恢复根据用户需求进行,提高了资源恢复的可控性。
图8为本申请又一实施例提供的一种物联网通信方法的流程示意图,如图8所示,该方法包括:
S801、客户端获取第二触发指令;第二触发指令用于指示客户端确定在第一资源状态信息变化为第二资源状态信息的情况下,自动通过云平台向资源设备发送恢复请求。
S803、资源设备向云平台发送第一资源信息;云平台接收资源设备发送的第一资源信息。
S805、云平台向客户端发送第一资源信息;客户端接收云平台发送的第一资源信息。
S807、资源设备中的第一资源状态信息变化为第二资源状态信息。
S809、资源设备向云平台发送第二资源信息;云平台接收资源设备发送的第二资源信息。
S811、云平台向客户端发送第二资源信息;客户端接收云平台发送的第二资源信息。
S813、客户端确定第二资源状态信息和第一资源状态信息不同,确定第一资源状态信息变化为第二资源状态信息。
S815、客户端基于资源属性信息,确定特定资源的资源状态能够恢复。
S817、客户端向云平台发送恢复请求,云平台接收客户端发送的恢复请求。
S819、云平台向资源设备发送恢复请求,资源设备接收云平台发送的恢复请求。
S821、资源设备响应恢复请求,将状态恢复至与第一资源状态信息对应的状态。
在本申请实施例中,由于云平台通常需要连接大量的客户端和大量的资源设备,而通过客户端确定第一资源状态信息和第二资源状态信息是否相同,可以减少大大降低云平台的资源占用率,从而减少云平台的布局成本,且由于云平台直接将接收到的第二资源信息发送给客户端,数据无需经过云平台的计算,从而也降低了信息传输的时延。另外,由于在资源设备断电上电之前,就在客户端上提前设置了资源设备的特定资源能够在断电上电后自动恢复,,从而在资源设备断电上电后,客户端可以自动的向资源设备发送恢复请求,恢复流程无需用户干预,从而提高了物联网***的自动化程度。
图9为本申请再一实施例提供的一种物联网通信方法的流程示意图,如图9所示,该方法包括:
S901、建立Device A到Cloud A的连接。
S903、Client A向Cloud A发送获取Cloud A上设备信息的请求。
在一些实施例中,在使用本申请实施例的方法之前,Device A与Cloud A之间,和/或,Cloud A与Client A之间可以通过HTTP协议、CoAP协议或者MQTT协议等建立安全连接。
Cloud A上可以有至少一个设备信息,至少一个设备信息可以包括Device A的设备信息。Device A的设备信息可以包括Device A上的至少一个资源中每一个资源的资源状态信息。
S905、Cloud A向Client A发送Cloud A上设备信息。
Cloud A上设备信息包括Device A的设备信息。
S907、Client A向Cloud A发送订阅Cloud A上Device A的资源信息的请求。
S909、Cloud A向Device A发送订阅Device A的资源信息的请求。
S911、Device A确定被订阅设备资源中存在一个属性指示该设备重启后资源状态信息可被恢复。
Device A可以获取特定资源的当前资源信息,当前资源信息包括当前资源状态信息和资源属性信息,在当前资源信息中的资源属性信息表征资源状态信息可以恢复时,确定当前资源信息或当前资源状态信息可以被恢复。
S913、Device A向Cloud A发送订阅成功的信息,被订阅设备资源的当前资源信息。
在一些实施例中,订阅成功的信息和被订阅设备资源的当前资源信息可以分别采用两个信令发送。例如,在一些实施例中,Device A向Cloud A可以先发送订阅成功的信息,再发送订阅设备资源的当前资源信息。或者,又例如,Device A向Cloud A可以先发送当前资源信息,再发送订阅成功的信息。在另一些实施例中,订阅成功的信息和被订阅设备资源的当前资源信息可以在一个信令中发送。
S915、Cloud A确定资源状态信息可被恢复,存储当前资源信息。
S917、Cloud A向Client A发送订阅成功的信息,被订阅设备资源的当前资源信息。
S919、Client A确定资源状态信息可被恢复。
S921、Device A中的设备资源状态改变。
S923、Device A向Cloud A发送被订阅设备资源的最新资源信息。
最新资源信息包括最新资源状态信息和资源属性信息。
S925、Cloud A更新之前的当前资源信息为最新资源信息,例如,存储最新资源信息,最新资源信息覆盖之前当前资源信息。
例如,Cloud A可以将之前的当前资源信息存储到寄存器或其它存储空间中,在Cloud A接收到最新资源信息之后,可以对存储的当前资源信息执行reset操作,并将最新资源信息写入到寄存器或其它存储空间中。
S927、Cloud A向Client A发送被订阅设备资源的最新资源信息。
S929、Device A设备断电或故障关机。
S931、Device A到Cloud A的连接断开。
在一些实施例中,Device A与Cloud A之间的连接可以是长连接,Device A可以定时向Cloud A 发送心跳包,Cloud A确定在预设时长内没有接收到Device A发送的心跳包的情况下,确定Device A到Cloud A的连接断开。
S933、Cloud A向Client A发送设备离线的信息。
S935、Client A显示设备离线及被订阅设备资源的状态。
本步骤中的显示的被订阅设备资源的状态为被订阅设备资源的最新资源状态信息对应的状态。
S937、Device A设备上电或故障关机后重启。
S939、Device A到Cloud A的重连。
在Device A上电后,可以向Cloud A发送连接请求,从而使得Device A与Cloud A之间重新建立连接。
S941、Device A向Cloud A发送设备上线的信息,上报设备上线后资源信息。
设备上线的信息和上线后资源信息,可以在一个信令中,或者,可以分别在两个信令中。本申请实施例并不限定设备上线的信息和被上线后资源信息这两者的先后顺序。
在S941之后,可以执行S943-S947、S961,或者,可以执行S949-S961的步骤。
S943、Cloud A确定设备离线前和设备上线后的资源状态信息或资源信息内容相同。
S945、Cloud A向Client A发送设备上线的信息。
S947、Client A显示设备上线。
S949、Cloud A确定设备离线前和设备上线后的资源状态信息或资源信息内容不同。
S951、Cloud A向Client A发送设备上线的信息,被订阅设备资源离线前资源信息(即最新资源信息)。
S953、Client A显示设备上线,且确定该资源状态可被恢复,通过用户操作得到第一触发指令。
S955、Client A向Cloud A发送恢复资源状态的请求。
恢复资源状态的请求中可以包括离线前资源信息或资源状态信息。
S957、Cloud A向Device A发送恢复资源状态的请求。
S959、Device A设备资源状态更新至断电前或故障前的状态。
S961、资源状态上报流程继续执行。
通过本申请实施例中的方式,不仅降低Client A的消耗,且提高了资源恢复的可控性。
图10为本申请另一实施例提供的另一种物联网通信方法的流程示意图,如图10所示,该方法包括:
其中,图10对应的实施例相较于图9对应的实施例的区别在于:
在S919之后,还可以执行S1001的步骤:Client A设置被订阅资源在设备断电上电或故障重启后自动更新。
在一些实施方式中,Client A可以显示是否在设备断电上电或故障重启后自动恢复资源状态的选项,在用户选择是的情况下,Client A可以执行S1001的设置。
图10对应的实施例可以不执行S953中的通过用户操作得到第一触发指令的这一步骤。
通过本申请实施例中的方式,能够降低Client A的消耗,且提高了物联网***的自动化程度。
图11为本申请另一实施例提供的又一种物联网通信方法的流程示意图,如图11所示,该方法包括:
其中,图11对应的实施例相较于图9对应的实施例的区别在于:
在S919之后,还可以执行S1101:Client A存储被订阅设备资源的当前资源信息。
在S927之后,还可以执行S1103:Client A存储被订阅设备资源的最新资源信息。
S943至S953的步骤可以替换为以下S1105至S1111的步骤。在本申请实施例中,S1105之后,可以执行S1107和S961的步骤,或者,可以执行S1109、S1111、S955至S961的步骤。
S1105、Cloud A向Client A发送设备上线的信息,上报设备上线后资源信息。
S1107、Client A显示设备上线,确定设备离线前和设备上线后资源状态信息或资源信息内容相同。
S1109、Client A显示设备上线,确定设备离线前和设备上线后资源状态信息或资源信息内容不同。
其中,离线前的资源状态内容可以是被订阅设备资源的最新资源信息。
S1111、Client A确定该资源状态可被恢复,通过用户操作得到第一触发指令。
通过本申请实施例中的方式,能够降低Cloud A的资源占用率,降低了信息传输的时延,且提高了资源恢复的可控性。
本申请实施例还可以提供一种物联网的通信方法,该方法的实施例相较于图11对应的实施例的区别在于:在S919之后,还可以执行步骤:客户端设置被订阅资源在设备断电上电或故障重启后自动更新,并且,不执行S1111中的通过用户操作得到第一触发指令的这一步骤。
通过本申请实施例中的方式,能够降低Cloud A的资源占用率,降低了信息传输的时延,且提高了物联网***的自动化程度。
基于前述的实施例,本申请实施例提供一种物联网通信装置1200/1300/1400,该装置包括所包括的各单元、以及各单元所包括的各模块,可以通过终端设备中的处理器来实现;当然也可通过具体的逻辑电路实现;在实施的过程中,处理器可以为中央处理器(CPU)、微处理器(MPU)、数字信号处理器(DSP)或现场可编程门阵列(FPGA)等。
图12为本申请实施例提供的一种物联网通信装置的组成结构示意图,如图12所示,物联网通信装置1200包括:
接收单元1201,用于客户端通过云平台接收资源设备发送的第一资源信息;第一资源信息包括或指示资源设备中特定资源的第一资源状态信息;
发送单元1202,用于在第一资源状态信息变化为第二资源状态信息的情况下,客户端通过云平台向资源设备发送恢复请求;恢复请求指示资源设备将状态恢复至与第一资源状态信息对应的状态。
在一些实施例中,第一资源状态信息对应的状态为特定资源在资源设备断电前的状态,第二资源状态信息对应的状态为特定资源在资源设备上电后的状态。
在一些实施例中,物联网通信装置1200还包括:确定单元1203,用于客户端确定第一资源状态信息变化为第二资源状态信息,且客户端确定特定资源的资源状态能够恢复;
发送单元1202,还用于客户端通过云平台向资源设备发送恢复请求。
在一些实施例中,第一资源信息还包括或指示特定资源的资源属性信息,资源属性信息用于指示特定资源的资源状态能够恢复;
确定单元1203,还用于客户端基于资源属性信息,确定特定资源的资源状态能够恢复。
在一些实施例中,物联网通信装置1200还包括:获取单元1204,用于客户端获取第一触发指令;第一触发指令用于指示对资源设备的资源状态进行恢复。
在一些实施例中,获取单元1204,还用于客户端获取第二触发指令;第二触发指令用于指示客户端确定在第一资源状态信息变化为第二资源状态信息的情况下,自动通过云平台向资源设备发送恢复请求。
在一些实施例中,接收单元1201,还用于客户端接收云平台发送的通知消息;通知消息指示第一资源状态信息变化为第二资源状态信息,或者,通知消息指示资源设备的资源状态需要恢复,或者,通知消息包括或者指示第一资源信息;
确定单元1203,还用于客户端基于通知消息,确定第一资源状态信息变化为第二资源状态信息。
在一些实施例中,接收单元1201,还用于客户端通过云平台接收资源设备发送的第二资源信息;第二资源信息包括或指示:资源设备中特定资源的第二资源状态信息,或者,第二资源信息包括或指示:资源设备中特定资源的第二资源状态信息和特定资源的资源属性信息;资源属性信息用于指示特定资源的资源状态能够恢复;
在一些实施例中,确定单元1203,还用于客户端确定第二资源状态信息和第一资源状态信息不同,确定第一资源状态信息变化为第二资源状态信息。
图13为本申请实施例提供的另一种物联网通信装置的组成结构示意图,如图13所示,物联网通信装置1300包括:
发送单元1301,用于资源设备通过云平台向客户端发送第一资源信息;第一资源信息包括或指示资源设备中特定资源的第一资源状态信息;
接收单元1302,用于在第一资源状态信息变化为第二资源状态信息的情况下,资源设备通过云平台接收客户端发送的恢复请求;
恢复单元1303,用于资源设备将状态恢复至与第一资源状态信息对应的状态。
在一些实施例中,恢复单元1303,还用于资源设备将与第二资源状态信息对应的状态,恢复至 与第一资源状态信息对应的状态;
其中,第一资源状态信息对应的状态为特定资源在资源设备断电前的状态,第二资源状态信息对应的状态为特定资源在资源设备上电后的状态。
在一些实施例中,第一资源信息还包括或指示特定资源的资源属性信息,资源属性信息用于指示特定资源的资源状态能够恢复。
在一些实施例中,发送单元1301,还用于资源设备向云平台发送第二资源信息;第二资源信息包括或指示:资源设备中特定资源的第二资源状态信息,或者,第二资源信息包括或指示:资源设备中特定资源的第二资源状态信息和特定资源的资源属性信息;资源属性信息用于指示特定资源的资源状态能够恢复;
其中,第二资源状态信息用于云平台在确定第一资源状态信息和第二资源状态信息不同的情况下,向客户端发送通知消息;通知消息指示第一资源状态信息变化为第二资源状态信息,或者,通知消息指示资源设备的资源状态需要恢复,或者,通知消息包括或者指示第一资源信息。
在一些实施例中,发送单元1301,还用于资源设备通过云平台向客户端发送第二资源信息;第二资源信息包括或指示:资源设备中特定资源的第二资源状态信息,或者,第二资源信息包括或指示:资源设备中特定资源的第二资源状态信息和特定资源的资源属性信息;资源属性信息用于指示特定资源的资源状态能够恢复;
其中,第二资源状态信息用于客户端在确定第一资源状态信息和第二资源状态信息不同的情况下,向资源设备发送恢复请求。
图14为本申请实施例提供的又一种物联网通信装置的组成结构示意图,如图14所示,物联网通信装置1400包括:
第一收发单元1401,用于云平台接收资源设备发送的第一资源信息,向客户端发送第一资源信息;第一资源信息包括或指示资源设备中特定资源的第一资源状态信息;
第二收发单元1402,用于在第一资源状态信息变化为第二资源状态信息的情况下,云平台接收客户端发送的恢复请求,向资源设备发送恢复请求;恢复请求指示资源设备将状态恢复至与第一资源状态信息对应的状态。
在一些实施例中,第一资源状态信息对应的状态为特定资源在资源设备断电前的状态,第二资源状态信息对应的状态为特定资源在资源设备上电后的状态。
在一些实施例中,第一资源信息还包括或指示特定资源的资源属性信息,资源属性信息用于指示特定资源的资源状态能够恢复。
在一些实施例中,物联网通信装置1400还包括:确定单元1403,用于云平台基于资源属性信息,确定特定资源的资源状态能够恢复;
状态更新单元1404,用于云平台将存储在云平台中的第三资源信息,修改为第一资源信息;第三资源信息是云平台在第一资源信息之前接收的。
在一些实施例中,第一收发单元1401,还用于云平台接收资源设备发送的第二资源信息;第二资源信息包括或指示:资源设备中特定资源的第二资源状态信息,或者,第二资源信息包括或指示:资源设备中特定资源的第二资源状态信息和特定资源的资源属性信息;资源属性信息用于指示特定资源的资源状态能够恢复;用于云平台确定第一资源状态信息和第二资源状态信息不同,向客户端发送通知消息;通知消息指示第一资源状态信息变化为第二资源状态信息,或者,通知消息指示资源设备的资源状态需要恢复,或者,通知消息包括或者指示第一资源信息。
在一些实施例中,第一收发单元1401,还用于云平台接收资源设备发送的第二资源信息,向客户端发送第二资源信息;第二资源信息包括或指示:资源设备中特定资源的第二资源状态信息,或者,第二资源信息包括或指示:资源设备中特定资源的第二资源状态信息和特定资源的资源属性信息;资源属性信息用于指示特定资源的资源状态能够恢复;
其中,第二资源状态信息用于客户端在确定第一资源状态信息和第二资源状态信息不同的情况下,向资源设备发送恢复请求。
以上装置实施例的描述,与上述方法实施例的描述是类似的,具有同方法实施例相似的有益效果。对于本申请装置实施例中未披露的技术细节,请参照本申请方法实施例的描述而理解。
需要说明的是,本申请实施例中,如果以软件功能模块的形式实现上述的物联网中消息的传输方法,并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对相关技术做出贡献的部分可以以软件产品的形式体 现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得客户端/云平台/资源设备执行本申请各个实施例方法的全部或部分。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read Only Memory,ROM)、磁碟或者光盘等各种可以存储程序代码的介质。这样,本申请实施例不限制于任何特定的硬件和软件结合。
图15为本申请实施例提供的一种物联网通信设备的硬件实体示意图,如15所示,物联网通信设备1500包括:处理器1501和存储器1502,其中,存储器1502存储有可在处理器1501上运行的计算机程序,处理器1501执行程序时实现上述任一实施例中的客户端/云平台/资源设备执行的方法中的步骤。
在本申请实施例中,物联网通信设备1500可以是上述的客户端/云平台/资源设备。
在本申请实施例中,图12至图14中,任两个单元之间的可以通过电路连接,图15中,处理器1501与存储器1502之间可以通过电路连接。
本申请实施例提供一种计算机存储介质,计算机存储介质存储有一个或者多个程序,一个或者多个程序可被一个或者多个处理器执行,以实现上述方法中客户端执行的方法的步骤。
本申请实施例提供一种计算机存储介质,计算机存储介质存储有一个或者多个程序,一个或者多个程序可被一个或者多个处理器执行,以实现上述方法中云平台执行的方法的步骤。
本申请实施例提供一种计算机存储介质,计算机存储介质存储有一个或者多个程序,一个或者多个程序可被一个或者多个处理器执行,以实现上述方法中资源设备执行的方法的步骤。
图16是本申请实施例提供的一种芯片的结构示意图。图16所示的芯片1600包括处理器1601和存储器1602,处理器1601,用于从存储器1602中调用并运行计算机程序,使得安装有所述芯片1600的客户端/云平台/资源设备,执行本申请实施例中客户端/云平台/资源设备执行的方法的步骤。
其中,存储器1602可以是独立于处理器1601的一个单独的器件,也可以集成在处理器1601中。
在一些实施方式中,该芯片1600还可以包括输入接口1603。其中,处理器1601可以控制该输入接口1603与其他设备或芯片进行通信,具体地,可以获取其他设备或芯片发送的信息或数据。
在一些实施方式中,该芯片1600还可以包括输出接口1604。其中,处理器1601可以控制该输出接口1604与其他设备或芯片进行通信,具体地,可以向其他设备或芯片输出信息或数据。
在一些实施方式中,该芯片1600可应用于本申请实施例中的客户端/云平台/资源设备,并且该芯片可以实现本申请实施例的各个方法中由客户端/云平台/资源设备实现的相应流程,为了简洁,在此不再赘述。
应理解,本申请实施例提到的芯片1600还可以称为***级芯片,***芯片,芯片***或片上***芯片等。
本申请实施例提供一种计算机程序产品,计算机程序产品包括计算机存储介质,计算机存储介质存储计算机程序代码,计算机程序代码包括能够由至少一个处理器执行的指令,当指令由至少一个处理器执行时实现上述方法中客户端/云平台/资源设备执行的方法的步骤。
在一些实施方式中,该计算机程序产品可应用于本申请实施例中的客户端/云平台/资源设备,并且该计算机程序指令使得计算机执行本申请实施例的各个方法中由客户端/云平台/资源设备实现的相应流程,为了简洁,在此不再赘述。
应理解,本申请实施例的处理器可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法实施例的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器可以是通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法的步骤。
可以理解,本申请实施例中的存储器或其它存储空间可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器 (Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DR RAM)。应注意,本文描述的***和方法的存储器旨在包括但不限于这些和任意其它适合类型的存储器。
应理解,上述存储器或其它存储空间为示例性但不是限制性说明,例如,本申请实施例中的存储器还可以是静态随机存取存储器(static RAM,SRAM)、动态随机存取存储器(dynamic RAM,DRAM)、同步动态随机存取存储器(synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(double data rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synch link DRAM,SLDRAM)以及直接内存总线随机存取存储器(Direct Rambus RAM,DR RAM)等等。也就是说,本申请实施例中的存储器旨在包括但不限于这些和任意其它适合类型的存储器。
这里需要指出的是:以上计算机存储介质、计算机程序、芯片和计算机程序产品实施例的描述,与上述方法实施例的描述是类似的,具有同方法实施例相似的有益效果。对于本申请存储介质和设备实施例中未披露的技术细节,请参照本申请方法实施例的描述而理解。
应理解,说明书通篇中提到的“一个实施例”或“一实施例”或“本申请实施例”或“前述实施例”或“一些实施例”或“一些实施方式”意味着与实施例有关的特定特征、结构或特性包括在本申请的至少一个实施例中。因此,在整个说明书各处出现的“一个实施例”或“一实施例”或“本申请实施例”或“前述实施例”或“一些实施例”或“一些实施方式”未必一定指相同的实施例。此外,这些特定的特征、结构或特性可以任意适合的方式结合在一个或多个实施例中。应理解,在本申请的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
在未做特殊说明的情况下,客户端/云平台/资源设备执行本申请实施例中的任一步骤,可以是客户端/云平台/资源设备的处理器执行该步骤。除非特殊说明,本申请实施例并不限定客户端/云平台/资源设备执行下述步骤的先后顺序。另外,不同实施例中对数据进行处理所采用的方式可以是相同的方法或不同的方法。还需说明的是,本申请实施例中的任一步骤是客户端/云平台/资源设备可以独立执行的,即客户端/云平台/资源设备执行下述实施例中的任一步骤时,可以不依赖于其它步骤的执行。
还值得注意的是,虽然本申请在每个实施例中都提供了很多个步骤,但是在实际应用或实际执行的过程中的,客户端/云平台/资源设备可以从提供的每个实施例的多个步骤中选择部分步骤执行,而不必每个步骤都要执行,只要所执行的步骤对应的方法是一个完整的方案即可。
在本申请所提供的几个实施例中,应该理解到,所揭露的客户端/云平台/资源设备和方法,可以通过其它的方式实现。以上所描述的客户端/云平台/资源设备实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,如:多个单元或组件可以结合,或可以集成到另一个***,或一些特征可以忽略,或不执行。另外,所显示或讨论的各组成部分相互之间的耦合、或直接耦合、或通信连接可以是通过一些接口,资源设备或单元的间接耦合或通信连接,可以是电性的、机械的或其它形式的。
本申请所提供的几个方法实施例中所揭露的方法,在不冲突的情况下可以任意组合,得到新的方法实施例。
本申请所提供的几个产品实施例中所揭露的特征,在不冲突的情况下可以任意组合,得到新的产品实施例。
本申请所提供的几个方法或客户端/云平台/资源设备实施例中所揭露的特征,在不冲突的情况下可以任意组合,得到新的方法实施例或客户端/云平台/资源设备实施例。
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:移动存储资源设备、只读存储器(Read Only Memory, ROM)、磁碟或者光盘等各种可以存储程序代码的介质。
或者,本申请上述集成的单元如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对相关技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得客户端/云平台/资源设备执行本申请各个实施例所述方法的全部或部分。而前述的存储介质包括:移动存储资源设备、ROM、磁碟或者光盘等各种可以存储程序代码的介质。
在本申请实施例中,不同实施例中相同步骤和相同内容的说明,可以互相参照。在本申请实施例中,术语“并”不对步骤的先后顺序造成影响,例如,客户端/云平台/资源设备执行A,并执行B,可以是客户端/云平台/资源设备先执行A,再执行B,或者是客户端/云平台/资源设备先执行B,再执行A,或者是客户端/云平台/资源设备执行A的同时执行B。
应需理解,本申请中一个消息中包括A,表示一个消息中具有A。一个消息中指示A,表示一个消息中包括A的标识,从而可以基于A的标识获取到A。应需理解,不同资源设备执行相同的步骤时,执行的方式可以相同。
以上所述,仅为本申请的实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。
工业实用性
本申请实施例提供了一种物联网通信方法、装置、设备、计算机存储介质、芯片及计算机程序产品,采用本申请中的物联网通信方法,在由于资源设备掉电或故障而导致资源的状态发生变化的情况下,使资源设备能够将状态恢复至之前的正常工作状态,进而能够提高物联网通信的可靠性。

Claims (26)

  1. 一种物联网通信方法,包括:
    客户端通过云平台接收资源设备发送的第一资源信息;所述第一资源信息包括或指示所述资源设备中特定资源的第一资源状态信息;
    在所述第一资源状态信息变化为第二资源状态信息的情况下,所述客户端通过所述云平台向所述资源设备发送恢复请求;所述恢复请求指示所述资源设备将状态恢复至与所述第一资源状态信息对应的状态。
  2. 根据权利要求1所述的方法,其中,所述第一资源状态信息对应的状态为所述特定资源在所述资源设备断电前的状态,所述第二资源状态信息对应的状态为所述特定资源在所述资源设备上电后的状态。
  3. 根据权利要求1或2所述的方法,其中,所述在所述第一资源状态信息变化为第二资源状态信息的情况下,所述客户端通过所述云平台向所述资源设备发送恢复请求,包括:
    在所述第一资源状态信息变化为所述第二资源状态信息,且所述客户端确定所述特定资源的资源状态能够恢复的情况下,所述客户端通过所述云平台向所述资源设备发送所述恢复请求。
  4. 根据权利要求3所述的方法,其中,所述第一资源信息还包括或指示所述特定资源的资源属性信息,所述资源属性信息用于指示所述特定资源的资源状态能够恢复;
    所述客户端确定所述特定资源的资源状态能够恢复,包括:
    所述客户端基于所述资源属性信息,确定所述特定资源的资源状态能够恢复。
  5. 根据权利要求1至4任一项所述的方法,其中,所述客户端通过所述云平台向所述资源设备发送恢复请求之前,所述方法还包括:
    所述客户端获取第一触发指令;所述第一触发指令用于指示对所述资源设备的资源状态进行恢复。
  6. 根据权利要求1至4任一项所述的方法,其中,所述客户端通过云平台接收资源设备发送的第一资源信息之前,所述方法还包括:
    所述客户端获取第二触发指令;所述第二触发指令用于指示所述客户端确定在所述第一资源状态信息变化为所述第二资源状态信息的情况下,自动通过所述云平台向所述资源设备发送所述恢复请求。
  7. 根据权利要求1至6任一项所述的方法,其中,所述客户端确定所述第一资源状态信息变化为所述第二资源状态信息,包括:
    所述客户端接收所述云平台发送的通知消息;所述通知消息指示所述第一资源状态信息变化为所述第二资源状态信息,或者,所述通知消息指示所述资源设备的资源状态需要恢复,或者,所述通知消息包括或者指示所述第一资源信息;
    所述客户端基于所述通知消息,确定所述第一资源状态信息变化为所述第二资源状态信息。
  8. 根据权利要求1至6任一项所述的方法,其中,所述客户端确定所述第一资源状态信息变化为所述第二资源状态信息,包括:
    所述客户端通过所述云平台接收所述资源设备发送的第二资源信息;所述第二资源信息包括或指示:所述资源设备中特定资源的第二资源状态信息,或者,所述第二资源信息包括或指示:所述资源设备中特定资源的第二资源状态信息和所述特定资源的资源属性信息;所述资源属性信息用于指示所述特定资源的资源状态能够恢复;
    所述客户端确定所述第二资源状态信息和所述第一资源状态信息不同,确定所述第一资源状态信息变化为所述第二资源状态信息。
  9. 一种物联网通信方法,包括:
    资源设备通过云平台向客户端发送第一资源信息;所述第一资源信息包括或指示所述资源设备中特定资源的第一资源状态信息;
    在所述第一资源状态信息变化为第二资源状态信息的情况下,所述资源设备通过所述云平台接收所述客户端发送的恢复请求;
    所述资源设备将状态恢复至与所述第一资源状态信息对应的状态。
  10. 根据权利要求9所述的方法,其中,所述资源设备将状态恢复至与所述第一资源状态信息对应的状态,包括:
    所述资源设备将与所述第二资源状态信息对应的状态,恢复至与所述第一资源状态信息对应的状态;
    其中,所述第一资源状态信息对应的状态为所述特定资源在所述资源设备断电前的状态,所述第二 资源状态信息对应的状态为所述特定资源在所述资源设备上电后的状态。
  11. 根据权利要求9或10所述的方法,其中,
    所述第一资源信息还包括或指示所述特定资源的资源属性信息,所述资源属性信息用于指示所述特定资源的资源状态能够恢复。
  12. 根据权利要求9至11任一项所述的方法,所述资源设备通过所述云平台接收所述客户端发送的恢复请求之前,所述方法还包括:
    所述资源设备向云平台发送第二资源信息;所述第二资源信息包括或指示:所述资源设备中特定资源的第二资源状态信息,或者,所述第二资源信息包括或指示:所述资源设备中特定资源的第二资源状态信息和所述特定资源的资源属性信息;所述资源属性信息用于指示所述特定资源的资源状态能够恢复;
    其中,所述第二资源状态信息用于所述云平台在确定所述第一资源状态信息和所述第二资源状态信息不同的情况下,向所述客户端发送通知消息;所述通知消息指示所述第一资源状态信息变化为所述第二资源状态信息,或者,所述通知消息指示所述资源设备的资源状态需要恢复,或者,所述通知消息包括或者指示所述第一资源信息。
  13. 根据权利要求9至11任一项所述的方法,所述资源设备通过所述云平台接收所述客户端发送的恢复请求之前,所述方法还包括:
    所述资源设备通过所述云平台向所述客户端发送第二资源信息;所述第二资源信息包括或指示:所述资源设备中特定资源的第二资源状态信息,或者,所述第二资源信息包括或指示:所述资源设备中特定资源的第二资源状态信息和所述特定资源的资源属性信息;所述资源属性信息用于指示所述特定资源的资源状态能够恢复;
    其中,所述第二资源状态信息用于所述客户端在确定所述第一资源状态信息和所述第二资源状态信息不同的情况下,向所述资源设备发送恢复请求。
  14. 一种物联网通信方法,包括:
    云平台接收资源设备发送的第一资源信息,向客户端发送所述第一资源信息;所述第一资源信息包括或指示所述资源设备中特定资源的第一资源状态信息;
    在所述第一资源状态信息变化为第二资源状态信息的情况下,所述云平台接收所述客户端发送的恢复请求,向所述资源设备发送所述恢复请求;所述恢复请求指示所述资源设备将状态恢复至与所述第一资源状态信息对应的状态。
  15. 根据权利要求14所述的方法,其中,所述第一资源状态信息对应的状态为所述特定资源在所述资源设备断电前的状态,所述第二资源状态信息对应的状态为所述特定资源在所述资源设备上电后的状态。
  16. 根据权利要求14或15所述的方法,其中,
    所述第一资源信息还包括或指示所述特定资源的资源属性信息,所述资源属性信息用于指示所述特定资源的资源状态能够恢复。
  17. 根据权利要求16所述的方法,其中,所述云平台接收资源设备发送的第一资源信息之后,所述方法还包括:
    所述云平台基于所述资源属性信息,确定所述特定资源的资源状态能够恢复;
    所述云平台将存储在所述云平台中的第三资源信息,修改为所述第一资源信息;所述第三资源信息是所述云平台在所述第一资源信息之前接收的。
  18. 根据权利要求14至17任一项所述的方法,其中,所述云平台接收所述客户端发送的恢复请求之前,所述方法还包括:
    所述云平台接收所述资源设备发送的第二资源信息;所述第二资源信息包括或指示:所述资源设备中特定资源的第二资源状态信息,或者,所述第二资源信息包括或指示:所述资源设备中特定资源的第二资源状态信息和所述特定资源的资源属性信息;所述资源属性信息用于指示所述特定资源的资源状态能够恢复;
    所述云平台确定所述第一资源状态信息和所述第二资源状态信息不同,向所述客户端发送通知消息;所述通知消息指示所述第一资源状态信息变化为所述第二资源状态信息,或者,所述通知消息指示所述资源设备的资源状态需要恢复,或者,所述通知消息包括或者指示所述第一资源信息。
  19. 根据权利要求14至17任一项所述的方法,其中,所述云平台接收所述客户端发送的恢复请求之前,所述方法还包括:
    所述云平台接收所述资源设备发送的第二资源信息,向所述客户端发送所述第二资源信息;所述第二资源信息包括或指示:所述资源设备中特定资源的第二资源状态信息,或者,所述第二资源信息包括 或指示:所述资源设备中特定资源的第二资源状态信息和所述特定资源的资源属性信息;所述资源属性信息用于指示所述特定资源的资源状态能够恢复;
    其中,所述第二资源状态信息用于所述客户端在确定所述第一资源状态信息和所述第二资源状态信息不同的情况下,向所述资源设备发送恢复请求。
  20. 一种物联网通信装置,包括:
    接收单元,用于客户端通过云平台接收资源设备发送的第一资源信息;所述第一资源信息包括或指示所述资源设备中特定资源的第一资源状态信息;
    发送单元,用于在所述第一资源状态信息变化为第二资源状态信息的情况下,所述客户端通过所述云平台向所述资源设备发送恢复请求;所述恢复请求指示所述资源设备将状态恢复至与所述第一资源状态信息对应的状态。
  21. 一种物联网通信装置,包括:
    发送单元,用于资源设备通过云平台向客户端发送第一资源信息;所述第一资源信息包括或指示所述资源设备中特定资源的第一资源状态信息;
    接收单元,用于在所述第一资源状态信息变化为第二资源状态信息的情况下,所述资源设备通过所述云平台接收所述客户端发送的恢复请求;
    恢复单元,用于所述资源设备将状态恢复至与所述第一资源状态信息对应的状态。
  22. 一种物联网通信装置,包括:
    第一收发单元,用于云平台接收资源设备发送的第一资源信息,向客户端发送所述第一资源信息;所述第一资源信息包括或指示所述资源设备中特定资源的第一资源状态信息;
    第二收发单元,用于在所述第一资源状态信息变化为第二资源状态信息的情况下,所述云平台接收所述客户端发送的恢复请求,向所述资源设备发送所述恢复请求;所述恢复请求指示所述资源设备将状态恢复至与所述第一资源状态信息对应的状态。
  23. 一种物联网通信设备,包括:存储器和处理器,
    所述存储器存储有可在处理器上运行的计算机程序,
    所述处理器执行所述程序时实现权利要求1至8任一项所述方法中的步骤,或者,所述处理器执行所述程序时实现权利要求9至13任一项所述方法中的步骤,或者,所述处理器执行所述程序时实现权利要求14至19任一项所述方法中的步骤。
  24. 一种计算机存储介质,所述计算机存储介质存储有一个或者多个程序,所述一个或者多个程序可被一个或者多个处理器执行,以实现权利要求1至8任一项所述方法中的步骤;或者,所述一个或者多个程序可被一个或者多个处理器执行,以实现权利要求9至13任一项所述方法中的步骤;或者,所述一个或者多个程序可被一个或者多个处理器执行,以实现权利要求14至19任一项所述方法中的步骤。
  25. 一种芯片,包括:处理器,用于从存储器中调用并运行计算机程序,使得安装有所述芯片的设备执行如权利要求1至8任一项所述方法中的步骤;或者,用于从存储器中调用并运行计算机程序,使得安装有所述芯片的设备执行如权利要求9至13任一项所述方法中的步骤;或者,用于从存储器中调用并运行计算机程序,使得安装有所述芯片的设备执行如权利要求14至19任一项所述方法中的步骤。
  26. 一种计算机程序产品,所述计算机程序产品包括计算机存储介质,所述计算机存储介质存储计算机程序代码,所述计算机程序代码包括能够由至少一个处理器执行的指令,当所述指令由所述至少一个处理器执行时实现权利要求1至8中任一项所述的方法中的步骤;或者,当所述指令由所述至少一个处理器执行时实现权利要求9至13中任一项所述的方法中的步骤;或者,当所述指令由所述至少一个处理器执行时实现权利要求14至19中任一项所述的方法中的步骤。
PCT/CN2020/110634 2020-08-21 2020-08-21 物联网通信方法、装置、设备、计算机存储介质及芯片 WO2022036722A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202080102066.5A CN115699707A (zh) 2020-08-21 2020-08-21 物联网通信方法、装置、设备、计算机存储介质及芯片
PCT/CN2020/110634 WO2022036722A1 (zh) 2020-08-21 2020-08-21 物联网通信方法、装置、设备、计算机存储介质及芯片

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/110634 WO2022036722A1 (zh) 2020-08-21 2020-08-21 物联网通信方法、装置、设备、计算机存储介质及芯片

Publications (1)

Publication Number Publication Date
WO2022036722A1 true WO2022036722A1 (zh) 2022-02-24

Family

ID=80322492

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/110634 WO2022036722A1 (zh) 2020-08-21 2020-08-21 物联网通信方法、装置、设备、计算机存储介质及芯片

Country Status (2)

Country Link
CN (1) CN115699707A (zh)
WO (1) WO2022036722A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130016377A1 (en) * 2011-07-15 2013-01-17 Somasundaram Meiyappan System and method for automatic recovery of cloud print jobs after printer error
CN105177918A (zh) * 2015-08-05 2015-12-23 无锡小天鹅股份有限公司 洗衣机的耗电量的监测方法、洗衣机和洗衣机***
CN105177919A (zh) * 2015-08-05 2015-12-23 无锡小天鹅股份有限公司 洗衣机***、洗衣机及其耗水量的监测方法
CN106410521A (zh) * 2016-10-19 2017-02-15 上海紫光乐联物联网科技有限公司 一种基于Zigbee的智能插座
CN111173836A (zh) * 2020-01-03 2020-05-19 珠海格力电器股份有限公司 一种数据机房变频磁悬浮空调控制方法、***及空调

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130016377A1 (en) * 2011-07-15 2013-01-17 Somasundaram Meiyappan System and method for automatic recovery of cloud print jobs after printer error
CN105177918A (zh) * 2015-08-05 2015-12-23 无锡小天鹅股份有限公司 洗衣机的耗电量的监测方法、洗衣机和洗衣机***
CN105177919A (zh) * 2015-08-05 2015-12-23 无锡小天鹅股份有限公司 洗衣机***、洗衣机及其耗水量的监测方法
CN106410521A (zh) * 2016-10-19 2017-02-15 上海紫光乐联物联网科技有限公司 一种基于Zigbee的智能插座
CN111173836A (zh) * 2020-01-03 2020-05-19 珠海格力电器股份有限公司 一种数据机房变频磁悬浮空调控制方法、***及空调

Also Published As

Publication number Publication date
CN115699707A (zh) 2023-02-03

Similar Documents

Publication Publication Date Title
CN108092861B (zh) 实现设备联动的配置方法、设备联动控制方法及装置
CN107710689B (zh) 用于家庭自动化***的云同步架构
US20150077231A1 (en) Method, apparatus, and system for intelligently controlling device, and plug-and-play device
US20170034468A1 (en) User terminal apparatus and controlling method thereof
US20150134727A1 (en) Cloud-based data server providing home appliance management service and method thereof
US20170228213A1 (en) Audio processing device and audio processing method
EP4013003A1 (en) Communication protocol switching method, apparatus and system
WO2020228040A1 (zh) 智能家居***的控制方法、装置、电子设备及存储介质
CN109617963B (zh) 设备控制方法、装置以及物联网***
EP3852484B1 (en) Electronic device and operating method thereof for operating a bluetooth-wifi combo module
CN110855460B (zh) 一种场景恢复方法、云平台及计算机存储介质
US11385690B2 (en) Electronic device for switching between communication channels and control method thereof
WO2023221948A1 (zh) 信息处理方法、设备、存储介质及程序产品
KR20190047598A (ko) 데이터를 전송하는 방법 및 장치
WO2020034908A1 (zh) 一种遥控器与移动终端的通信方法、装置和遥控器
CN110012527B (zh) 唤醒方法及电子设备
KR20140100909A (ko) 안전한 컨플루언스 모달리티를 제공하는 시스템 및 방법
US20190114183A1 (en) Terminal Configuration Method and Terminal Based on Provision Protocol for Transmission
AU2013388030A1 (en) Method, apparatus, and system for intelligently controlling device, and plug-and-play device
CN113114778A (zh) 一种数据传输方法、装置、电子设备以及存储介质
WO2022036722A1 (zh) 物联网通信方法、装置、设备、计算机存储介质及芯片
CN113965889B (zh) 数据处理、过滤信息数量确定与配置方法、设备及介质
CN112491810B (zh) 一种数据连接的方法及移动终端
US11362856B2 (en) Processing operation requesting method and device
US11812487B2 (en) Method, device, extender, and computer medium for automatically restoring connection

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20949929

Country of ref document: EP

Kind code of ref document: A1