CN115428422A - Device state notification method, cloud platform, user equipment and storage medium - Google Patents

Device state notification method, cloud platform, user equipment and storage medium Download PDF

Info

Publication number
CN115428422A
CN115428422A CN202080099974.3A CN202080099974A CN115428422A CN 115428422 A CN115428422 A CN 115428422A CN 202080099974 A CN202080099974 A CN 202080099974A CN 115428422 A CN115428422 A CN 115428422A
Authority
CN
China
Prior art keywords
resource
cloud platform
user equipment
notification message
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202080099974.3A
Other languages
Chinese (zh)
Inventor
吕小强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Publication of CN115428422A publication Critical patent/CN115428422A/en
Pending legal-status Critical Current

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/50Network services
    • H04L67/55Push-based network services
    • 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

Landscapes

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

Abstract

The embodiment of the application discloses a device state notification method, a cloud platform, user equipment and a storage medium, wherein the method comprises the following steps: if the first user equipment is online on the first cloud platform, generating a first resource notification message; the first resource notification message is used for indicating the state change of the corresponding first resource of the first user equipment during offline; the first resource is a resource belonging to first user equipment on a first cloud platform subscribed by a second cloud platform; and sending the first resource notification message to the second cloud platform.

Description

Device state notification method, cloud platform, user equipment and storage medium Technical Field
The application relates to the technical field of internet of things, in particular to a device state notification method, a cloud platform, user equipment and a storage medium.
Background
The Internet of Things (The Internet of Things, IOT) is an important component of a new-generation information technology, and after The user equipment is successfully registered on The cloud platform, resource information can be published on The registered cloud platform. In order to enable a user equipment to subscribe to a resource published by the user equipment on another Cloud platform through a registered Cloud platform, a connection (C2C) between the Cloud platform and the Cloud platform is proposed. If the Original Cloud platform (Original Cloud) subscribes to the resource of the device on the Target Cloud platform (Target Cloud), the user device will notify the subscribed resource of the change of the attribute through the Target Cloud in the on-line state. However, in the case that the device is in the offline state, the attribute of the resource may also change, that is, the current method for notifying the device status only enables the Original Cloud to acquire the attribute change of the user device during the online period, thereby affecting the accuracy of the Cloud platform acquiring the attribute of the subscribed resource.
Disclosure of Invention
The embodiment of the application provides an equipment state notification method, a cloud platform, user equipment and a storage medium, and improves the accuracy of acquiring the state information of subscribed resources by the cloud platform.
The technical scheme of the embodiment of the application can be realized as follows:
the embodiment of the application provides an equipment state notification method, which is applied to a first cloud platform and comprises the following steps:
if the first user equipment is online on the first cloud platform, generating a first resource notification message; the first resource notification message is used for indicating the state change of the corresponding first resource of the first user equipment during offline; the first resource is a resource belonging to the first user equipment on the first cloud platform subscribed by the second cloud platform; and sending the first resource notification message to the second cloud platform.
The embodiment of the application further provides an equipment state notification method, which is applied to a second cloud platform and comprises the following steps:
receiving a first resource notification message from a first cloud platform; the first resource notification message is used for indicating the state change of the first resource during the period that the first user equipment is offline; the first resource is a resource belonging to the first user equipment on the first cloud platform subscribed by the second cloud platform.
The embodiment of the application further provides a device status notification method, which is applied to the first user equipment, and the method comprises the following steps:
if the first user equipment is online on the first cloud platform, generating a second resource notification message; the second resource is a resource which belongs to the first user equipment and is subscribed by the first cloud platform; the second resource notification message is used for indicating the state change of the second resource; the second resource comprises a first resource; the first resource is a resource belonging to the first user equipment on the first cloud platform subscribed by the second cloud platform;
and sending the second resource notification message to the first cloud platform.
The embodiment of the application provides a first cloud platform, which comprises:
the generating module is used for generating a first resource notification message if the first user equipment is online on the first cloud platform; the first resource notification message is used for indicating the state change of the corresponding first resource of the first user equipment during offline; the first resource is a resource belonging to the first user equipment on the first cloud platform subscribed by the second cloud platform;
and the sending module is used for sending the first resource notification message to the second cloud platform.
The embodiment of the application provides a second cloud platform, which comprises:
the receiving module is used for receiving a first resource notification message from a first cloud platform; the first resource notification message is used for indicating the state change of the first resource during the offline of the first user equipment; the first resource is a resource belonging to the first user equipment on the first cloud platform subscribed by the second cloud platform.
An embodiment of the present application provides a first user equipment, including:
the generating module is used for generating a second resource notification message if the first user equipment is online on the first cloud platform; the second resource is a resource belonging to the first user equipment and subscribed by the first cloud platform; the second resource notification message is used for indicating the state change of the second resource; the second resource comprises a first resource; the first resource is a resource belonging to the first user equipment on the first cloud platform subscribed by the second cloud platform;
a sending module, configured to send the second resource notification message to the first cloud platform.
An embodiment of the present application provides a first cloud platform, including: a memory and a processor, wherein the processor is capable of,
the memory stores a computer program operable on the processor,
and the processor realizes the steps in the device state notification method on the first cloud platform side when executing the program.
The embodiment of the application provides a second cloud platform, which comprises: a memory and a processor, wherein the processor is capable of,
the memory stores a computer program operable on the processor,
and when the processor executes the program, the steps in the device state notification method on the second cloud platform side are realized.
An embodiment of the present application provides a first user equipment, including: a memory and a processor, wherein the processor is capable of,
the memory stores a computer program operable on the processor,
the processor implements the steps in the device status notification method of the first user equipment side when executing the program.
The embodiment of the application provides a storage medium, which is applied to a first cloud platform and stores a computer program, wherein when the computer program is executed by one or more first processors, the method for notifying the device state on the first cloud platform side is realized.
The embodiment of the application provides a storage medium applied to a second cloud platform, wherein a computer program is stored, and when the computer program is executed by one or more first processors, the method for notifying the device state on the side of the second cloud platform is realized.
The embodiment of the application provides a storage medium, which is applied to first user equipment and stores a computer program, and when the computer program is executed by one or more first processors, the method for notifying the equipment state of the first user equipment side is realized.
The beneficial effects brought by the technical scheme provided by the embodiment of the application at least comprise:
according to the device state notification method, the cloud platform, the device and the storage medium provided by the embodiment of the application, if the first user equipment is online on the first cloud platform, a first resource notification message is generated; the first resource notification message is used for indicating the state change of the first resource corresponding to the first user equipment; the first resource is a resource belonging to first user equipment on a first cloud platform subscribed by a second cloud platform; sending the resource notification message to a second cloud platform; that is to say, after the first user equipment is online, the first cloud platform notifies the second cloud platform of the change of the state of the resource of the first user equipment subscribed by the second cloud platform, so that even if the resource state of the first user equipment changes during offline, the second cloud platform can acquire the state information of the subscribed first resource through the first resource notification message, thereby improving the accuracy of the cloud platform in acquiring the state information.
Drawings
Fig. 1 is a C2C-based internet of things system architecture diagram provided in an embodiment of the present application;
fig. 2 is a first flowchart illustrating a device status notification method according to an embodiment of the present application;
fig. 3 is a schematic flowchart illustrating a device status notification method according to an embodiment of the present application;
fig. 4 is a schematic flowchart of a device status notification method provided in an embodiment of the present application;
fig. 5 is a fourth schematic flowchart of a device status notification method according to an embodiment of the present application;
fig. 6 is a schematic flowchart of a device status notification method according to an embodiment of the present application;
fig. 7 is a flowchart illustrating a sixth method for notifying a device status according to an embodiment of the present application;
fig. 8 is a seventh flowchart illustrating a device status notification method according to an embodiment of the present application;
fig. 9 is a schematic flowchart of an eighth method for notifying a device status according to an embodiment of the present application;
fig. 10 is a flowchart illustrating a device status notification method according to an embodiment of the present application;
fig. 11 is a schematic flowchart illustrating a device status notification method according to an embodiment of the present application;
fig. 12 is an eleventh flowchart illustrating an apparatus status notification method according to an embodiment of the present application;
fig. 13 is a first schematic flowchart of interaction between a first cloud platform, a second cloud platform, a first user equipment, and a second user equipment according to an embodiment of the present disclosure;
fig. 14 is a schematic flowchart of interaction between a first cloud platform, a second cloud platform, and first user equipment and second user equipment according to an embodiment of the present application;
fig. 15 is a schematic flowchart of interaction among a first cloud platform, a second cloud platform, and first user equipment according to an embodiment of the present application;
fig. 16 is a first schematic structural diagram of a first cloud platform according to an embodiment of the present disclosure;
fig. 17 is a first structural diagram of a second cloud platform according to an embodiment of the present disclosure;
fig. 18 is a first schematic structural diagram of a first user equipment according to an embodiment of the present application;
fig. 19 is a schematic structural diagram of a first cloud platform according to an embodiment of the present application;
fig. 20 is a schematic structural diagram of a second cloud platform according to an embodiment of the present application;
fig. 21 is a schematic structural diagram of a first user equipment according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
An architecture diagram of an internet of things system based on C2C is provided in the embodiment of the present application, as shown in fig. 1, the internet of things system includes a first cloud platform 100, a second cloud platform 200, a first user equipment 300, and a second user equipment 400; the first cloud platform 100 is connected with a first user device, the first cloud platform 100 is connected with a second cloud platform 200, and the second cloud platform 200 is connected with a second user device 400; the first user equipment 300 is registered on the first cloud platform 100, and the second user equipment 400 is registered on the second cloud platform.
The first cloud platform is used for sending state information of resources of the first user equipment subscribed by the second cloud platform to the second cloud platform; the second cloud platform is used for sending the state information of the resources of the first user equipment subscribed by the at least one second user equipment to the corresponding at least one second user equipment; the first user equipment is used for sending the state information of the subscribed resources on the first user equipment to the first cloud platform.
In the application embodiment, the first cloud platform and the second cloud platform need to perform mutual authentication, and after the authentication is passed, the first cloud platform and the second cloud platform can establish C2C connection; after the first user equipment successfully registers on the first cloud platform, the access token distributed by the first cloud platform for the first user equipment can be obtained, so that the first user equipment can publish resources on the first cloud platform so that other equipment can discover and subscribe; after the second user equipment successfully registers on the second cloud platform, at least one access token distributed by the second cloud platform can be obtained, so that the second user equipment can discover the first user equipment on the first cloud platform through the second cloud platform and subscribe the resources of the first user equipment on the first cloud platform.
In this embodiment, the first user equipment and the second user equipment generally belong to the same user, so that the second user equipment can subscribe to the resource of the first user equipment.
In the embodiment of the application, the second user equipment subscribes to the resource of the first user equipment on the second cloud platform, and then the second cloud platform subscribes to the resource of the first user equipment on the first cloud platform; and finally, the first cloud platform subscribes the resources of the first user equipment, so that the second user equipment subscribes the resources of the first user equipment.
It should be noted that the first user equipment releases the resource information on the first cloud platform, so as to release the resource; here, the resource information may be a resource itself or a resource link, and the embodiment of the present application is not limited thereto.
In this embodiment of the application, the second cloud platform may discover resource information published by the first user equipment on the first cloud platform, and subscribe to the resource information of the first user equipment, which is equivalent to subscribe to a resource corresponding to the resource information.
In this embodiment of the application, based on the C2C connection, the second cloud platform may subscribe to some device state events of the first user device, and when the device states of the first user device change, a corresponding notification message is generated by the first cloud platform and sent to the second cloud platform, so as to notify the second cloud platform that the device state events of the first user device subscribed by the second cloud platform occur.
Here, the device state event includes at least the following events:
device resource change event: when a certain value of a certain resource of equipment changes, triggering a resource change event of the resource;
device registration event: when the equipment is registered on the cloud platform, an equipment registration event is triggered;
the equipment logs out the event: when the equipment logs out on the cloud platform, the equipment logging-out event is triggered;
device online events: when the equipment is online on the cloud platform, an online event of the equipment is triggered;
a device offline event: when the equipment is offline on the cloud platform, an equipment offline event is triggered;
device resource Publish (Publish) event: when the device issues a new resource on the cloud platform, the device Publish event is triggered;
device resource Unpublish (Unpublish) event: when the user equipment withdraws the published resources on the cloud platform, a device Unpublish event is triggered.
In this embodiment of the present application, the second user equipment subscribes to some resources on the first user equipment, and then subscribes to resource change events of these resources, and during an online period, if attributes of the subscribed resources change, the first user equipment triggers a resource change event, so that the first cloud platform generates a corresponding resource change event notification and sends the attributes of the resources to the second cloud platform, that is, a resource change event notification corresponds to a resource.
Exemplarily, a mobile phone of a user a is registered on the second cloud platform, a desk lamp of the user a is registered on the first cloud platform, and the user a can subscribe the light brightness of the desk lamp of the user a through the mobile phone; if the desk lamp of the user A is changed in light brightness during the on-line period of the first cloud platform, the desk lamp of the user A sends the light brightness to the second cloud platform through the first cloud platform, and the second cloud platform sends the light brightness of the desk lamp of the user A to the mobile phone of the user A.
In this embodiment of the application, the second cloud platform may subscribe to a device state event of the first user equipment; the registration event, the logout event, the online event and the offline event of the first user equipment can be subscribed by the second cloud platform; the Publish event, the Unpublish event, and the resource change event of the first user equipment may be subscribed to by at least one second user equipment through the second cloud platform.
In this embodiment, the second user equipment subscribes to the state change event of the first user equipment through the client.
At present, if a second user equipment subscribes to a certain attribute of a certain resource on a first user equipment, and the first user equipment changes the attribute of the resource in an offline state, after the first user equipment is online again, a first cloud platform sends an online notification message of the first user equipment to a second cloud platform, that is, the second cloud platform does not know that the resource attribute of the first user equipment has changed during offline, which affects the accuracy of the second cloud platform in acquiring the attribute of the subscribed resource.
An embodiment of the present application provides a method for notifying an apparatus status, as shown in fig. 2, which is applied to a first cloud platform, and includes:
s201, if the first user equipment is online on a first cloud platform, generating a first resource notification message; the first resource notification message is used for indicating the state change of the first resource during the offline of the first user equipment; the first resource is a resource from the first cloud platform subscribed by the second cloud platform and belonging to the first user equipment;
in the embodiment of the application, the second cloud platform subscribes to resources, namely first resources, belonging to the first user equipment on the first cloud platform, and if the state of the first resources changes, the first cloud platform needs to notify the second cloud platform; since the state change of the resource may also occur during a period from when the first user equipment is offline on the first cloud platform to before when the first user equipment is online on the first cloud platform, that is, during the period when the first user equipment is offline, the first cloud platform may generate a first resource notification message after the first user equipment is online, and the first resource notification message indicates the state change of the first resource.
In the embodiment of the application, the C2C connection is established between the first cloud platform and the second cloud platform, so that the second cloud platform can discover the first user equipment on the first cloud platform, and thus subscribe to the first resource of the first user equipment.
It should be noted that the status information of the resource may include at least one of the following: the name of the resource, the attribute of the resource and the identifier of the resource; here, the state of the resource includes, but is not limited to, the above three.
Wherein a resource has an identity, a name, but may have at least one attribute; the change of any attribute in a resource indicates that the state of the resource changes; the attribute of the resource may include an attribute name and an attribute value, for example, a temperature attribute is represented as "temp =20 ℃", where "temp" is the attribute name, "20" is the attribute value, and "deg.c" is the unit of the attribute value.
In this embodiment, a change in any one of the states of a resource may indicate that the state of the resource changes.
S202, the first resource notification message is sent to a second cloud platform.
In this embodiment of the application, after the first cloud platform generates the first resource notification message, the first cloud platform needs to send the first resource notification message to the second cloud platform, and the second cloud platform is notified of the state change of the first resource subscribed by the second cloud platform through the first resource notification message.
It should be noted that, when the state of the first resource is not changed, the first resource notification message may indicate that the state of the first resource is changed to be the state of the first resource, and the state of the first resource remains unchanged.
It can be understood that, according to the device status notification method provided in the embodiment of the present application, after the first user equipment is online on the first cloud platform, the first cloud platform indicates, to the second cloud platform, the change in the status of the resource of the first user equipment subscribed by the second cloud platform, so that even if the resource status of the first user equipment changes during offline, the second cloud platform can timely learn that the resource of the first user equipment subscribed by the second cloud platform has changed in the status, thereby improving the accuracy of the cloud platform in acquiring the status information.
In some embodiments of the present application, the implementation of generating the first resource notification message in S201 may include:
s301, acquiring state information of the first resource;
in the embodiment of the application, the state information of the first resource is used for representing the state change of the first resource during the period that the first user equipment is offline; here, the state information of the first resource may be a final state of the first resource, that is, state information after the last change, that is, state information before the first user equipment is online on the first cloud platform, among a plurality of pieces of state information of the first resource that are changed during the period when the first user equipment is offline; or may be resource change information of the first resource; the resource change information of the first resource includes information related to a change of the first resource during the offline period, for example, all state information of the first resource that is changed during the offline period of the first user equipment, or may further include a time corresponding to each state information, and the like.
It should be noted that the first cloud platform may obtain different state information for each resource in the first resource.
Illustratively, the first resource includes a resource a and a resource b, and the first cloud platform may acquire a final state of the resource a after the resource a changes during the first user equipment is offline and all states of the resource b changes during the first user equipment is offline, so that state information of the resource a and the resource b in the first resource are different.
In this embodiment of the application, the first resource is a resource of the first user equipment, and therefore, the first cloud platform acquires state information of the first resource from the first user equipment.
Here, the first cloud platform may acquire state information of all resources on the first user equipment from the first user equipment, and then determine the state information of the first resource from the state information; or directly acquiring the state information of the first resource from the first user equipment; the specific obtaining mode may be set as needed, and the embodiment of the present application is not limited thereto.
S302, generating the first resource notification message based on the state information of the first resource.
In an embodiment of the present application, the first resource may include at least one resource; the first cloud platform can generate a corresponding first resource notification message for each resource, and the state change of each corresponding resource is indicated through each first resource notification message; the resource notification message may also be generated, and the state change of all the resources in the first resource is indicated by the one first resource notification message, which is not limited in the embodiment of the present application.
In the embodiment of the application, the first cloud platform generates the first resource notification message based on the state information of the first resource, and indicates the state change of the first resource through the first resource notification message.
In some embodiments of the present application, the first cloud platform may also directly indicate the state change of the first resource through the first resource notification message itself; for example, the first cloud platform may generate a first notification message corresponding to a resource change trend of the first resource according to the state information of the first resource, and indicate the state change trend of the first resource through a preset first notification message.
In some embodiments of the present application, the first cloud platform may indicate a state change of the first resource through information carried in the first resource notification message, where the information carried in the first resource notification message may be state information of the first resource itself, or may be a processing result obtained after processing the state information of the first resource; for example, a resource trend of the first resource.
Here, the embodiment of the present application is not limited to the manner of generating the first resource notification message based on the status information of the first resource.
In some embodiments of the present application, the implementation of generating the first resource notification message in S201 may include:
s401, determining a first resource subscribed by a second cloud platform in first user equipment;
in the embodiment of the application, if the first user equipment is online, the first cloud platform determines the first resource, and then only acquires the state information of the first resource from the first user equipment according to the first resource, so that the information amount acquired by the first cloud platform is reduced, and the system consumption is reduced.
S402, obtaining attribute information of a first resource from first user equipment, wherein the attribute information of the first resource represents state information of the first resource;
in the embodiment of the application, after determining the first resource, the first cloud platform acquires the attribute information of the first resource from the first user equipment, and represents the state information of the first resource through the attribute information of the first resource.
The attribute information of the first resource may be an attribute value of the first resource, or may be attribute change information of the first resource; the first resource attribute value is the current attribute value of the first resource after the first user equipment is online; the first resource attribute change information is used for characterizing the attribute change process of the first resource during the offline period of the first user equipment.
In this embodiment of the present application, the attribute change information of the first resource may include an attribute value of each change of the attribute of the first resource; initial attribute values and final attribute values may also be included; wherein, these attribute values can be arranged in time sequence; based on this, the attribute change information of the first resource may further include change times corresponding to these attribute values; and, information of the resource to which the attribute belongs, such as the name of the resource, etc.; the embodiment of the present application is not limited to setting the attribute change information.
In this embodiment of the present application, the attribute information of the first resource may be attribute information of all attributes of the first resource; attribute information of all attributes of the resource with the attribute change in the first resource may also be included; the attribute information may also be attribute information of a resource with an attribute changed in the first resource, which is not limited in this embodiment of the present application.
Illustratively, the first resource is resource a; the resource a comprises an attribute a1 and an attribute a2, and the change process of the attribute value of a1 during the offline of the first user equipment is as follows: the value of the attribute a2 is 10, and the value is not changed during the period that the first user equipment is off-line; after the first user equipment is online, the attribute value of a1 is 20, the attribute change information of a1 is (10, 15, 20), the attribute value of a2 is 10, and the attribute change information of a2 is also 10; the attribute information of the first resource may be an attribute value 20 of an attribute a1 and an attribute value 10 of an attribute a2 of the resource a; the attribute value 20 of the attribute a1 of the resource a; the attribute change information (10, 15, 20) of the attribute a1 and the attribute change information 10 of the attribute a2 of the resource a; it may also be the attribute change information (10, 15, 20) of the resource a.
In this embodiment of the application, the first cloud platform may send a first resource request to the first user equipment based on the first resource, and request attribute information of the first resource from the first user equipment; attribute information for a first resource from a first user device is received based on a first resource request.
In this embodiment of the application, the first resource request may include identification information of the first resource, so that after receiving the first resource request, the first user equipment may determine the first resource based on the identification information of the first resource, and acquire attribute information of the first resource from all resources of the first user equipment.
Here, the identification information of the first resource may include a resource name of the first resource and/or an identification of the first resource; the identifier of the resource is represented by a Uniform Resource Identifier (URI).
An embodiment of the present application provides an apparatus status notification method, as shown in fig. 3, the method may include:
s501, if the first user equipment is on line, generating an on-line notification message of the first user equipment;
s502, sending an online notification message of the first user equipment to a second cloud platform;
in the embodiment of the application, the first cloud platform subscribes to the online event and the resource change event of the first user equipment, and after the first user equipment is online, the first cloud platform generates the online notification message of the first user equipment and sends the online notification message of the first user equipment to the second cloud platform.
S503, determining a first resource subscribed by a second cloud platform in the first user equipment;
s504, obtaining attribute information of the first resource from the first user equipment, wherein the attribute information of the first resource represents state information of the first resource;
in the embodiment of the present application, the implementation of S503-S504 is the same as S401-S402, and is not described herein again.
S505, aiming at the first resource, generating an event notification message of a resource change event corresponding to the first resource; the event notification message of the resource change event carries attribute information of the first resource; the event notification message is a first resource notification message;
in this embodiment of the application, after the first cloud platform generates an online notification message of the first user equipment and sends the notification message of the first user equipment to the second cloud platform, an event notification message corresponding to each resource may be generated based on a resource change event subscribed to each resource in the first resource; and respectively carrying the attribute information of each resource in corresponding event notification messages, wherein the event notification messages are first resource notification messages.
Exemplarily, the second cloud platform requests the first cloud platform to subscribe to a resource a on the device 1 and b resource on the device 2, and then, for the a resource on the device 1 and the b resource on the device 2, the second cloud platform generates an event notification message 1 and an event notification message 2, where the event notification message 1 carries attribute information of the a resource of the device 1, and the event notification message 2 carries attribute information of the b resource of the device 2; in this way, the second cloud platform acquires the attribute information of the resource a of the device 1 when receiving the event notification message 1, thereby determining the change of the attribute of the resource a of the device 1; and when the event notification message 2 is received, acquiring the attribute information of the resource b of the device 2 from the event notification message 2, so as to determine the change of the attribute of the resource b of the device 2.
In some embodiments of the present application, the first cloud platform may determine, from the resource attributes of the first resource, a resource whose attribute is changed, and generate a corresponding event notification message for each of the resources; and respectively carrying the resource attributes of the resources in corresponding event notification messages, wherein the corresponding event notification messages are taken as first resource notification messages together.
In some embodiments of the application, the event notification message may further carry a device identifier of a device to which the corresponding resource belongs, so that after receiving the event notification message, the second cloud platform determines, according to the device identifier, the device to which the resource carried in the event notification message belongs.
S506, the first resource notification message is sent to the second cloud platform.
In the embodiment of the application, after the first cloud platform generates the corresponding event notification message for each resource, each event notification message is respectively sent to the second cloud platform.
It can be understood that, in response to a subscribed resource change event, the first cloud platform generates a corresponding event notification message for each resource in the first resource, where the event notification message carries attribute information of the corresponding resource, and indicates, by using one event notification message, an attribute change of one corresponding resource, so that complexity of carrying the attribute information in the information is reduced, and generation efficiency of the first resource notification message is improved.
An embodiment of the present application provides an apparatus status notification method, as shown in fig. 4, the method may include:
s601, if the first user equipment is online, generating an online notification message of the first user equipment;
s602, determining a first resource subscribed by a second cloud platform in the first user equipment;
s603, acquiring attribute information of the first resource from the first user equipment, wherein the attribute information of the first resource represents state information of the first resource;
in the embodiment of the present application, the implementation of S602-S603 is the same as S401-S402, and is not described herein again.
S604, carrying the attribute information of the first resource in the online notification message of the first user equipment to obtain the first resource notification message.
S605, sending the first resource notification message to a second cloud platform.
In this embodiment of the application, the second cloud platform subscribes to an online event and a resource change event of the first user equipment, and after the first user equipment is online, the first cloud platform may generate an online notification message of the first user equipment corresponding to the online event, and send the online notification message of the first user equipment to the second cloud platform to indicate that the first user equipment is online.
The second cloud platform determines that the first user equipment is online through the equipment identifier and the equipment online identifier.
In some embodiments of the application, the first cloud platform may determine resources with changed attributes from the first resource attribute information, carry the attribute information of the resources in the online notification message of the first user equipment, and then send the online notification message of the first user equipment to the second cloud platform.
It should be noted that the online notification message carries a carried identifier, where the carried identifier is used to represent that the online notification message carries attribute information of the first resource.
In some embodiments of the present application, the attribute information of the first resource may be carried in a preset field.
Here, the preset field may be a links field; the first cloud platform may carry the resource attributes of the first resource within the links field.
The resource attribute of each resource in the first resources can be stored in the links field respectively; for example, the attribute information of each resource may be stored under the resource name of the resource, so that after the second cloud platform receives the online notification message, the attribute of each resource may be identified from the links field.
It can be understood that, after the first user equipment is online, the first cloud platform indicates that the first user equipment is online through an online notification message of the first user equipment, and also indicates the attribute change of the first resource; that is to say, the first cloud platform may directly carry the attribute information of the first resource in the online notification message of the first user equipment, which reduces resource consumption of the first cloud platform for generating and sending the first resource notification message.
In some embodiments of the present application, the obtaining of the state information of the first resource in S301 may include:
s701, determining the information of the second cloud platform subscribing the first user equipment based on the first subscription information; the first subscription information is the condition that equipment on the first cloud platform is subscribed;
in the embodiment of the application, first subscription information is stored on the first cloud platform, and the first subscription information includes a condition that equipment of the first cloud platform is subscribed; here, the case where the device of the first cloud platform is subscribed includes information of all device state events to which the device on the first cloud platform is subscribed; according to the first subscription information, the first cloud platform can determine that the second cloud platform subscribes to the information of the first user equipment, namely the information of the subscribed equipment state event on the first user equipment.
S702, determining a first resource based on the information subscribed by the second cloud platform to the first user equipment; the first resource is a resource corresponding to a resource change event of the first user equipment subscribed by the second cloud platform.
In the embodiment of the application, the first cloud platform can further determine the information of the resource change event in the device state event of the first user device according to the information of the first user device subscribed by the second cloud platform; the information of the resource change event of the first user equipment comprises resource information subscribed by the first user equipment.
In some embodiments of the present application, the first subscription information may be a first subscription list, and the first subscription list may include: user identification, subscription type, subscription target and subscription expiration time; wherein the user identification represents a user subscribing to the device state event; the subscription type represents the type of the device state event; the subscription target represents a device subscribing to the device state event, the subscription expiration time represents a time range subscribing to the device state event, and the subscription is cancelled if the time range is exceeded.
It should be noted that, if the subscription type is a resource change event, the subscription target represents a device subscribing to the resource change event and a resource subscribed by the device.
The subscription target may include the following three types: 1) All devices belonging to a certain user; 2) A specific device, which can be represented by a device identifier; 3) A Resource of a device may be represented by a device identifier and a Resource identifier, e.g., "device ID + Resource URI".
Illustratively, if all devices belonging to the user a on the first cloud platform are subscribed to the device online event, the user identifier recorded in the first subscription table is a, the subscription type is the device online event, and the subscription target is all the devices.
In some embodiments of the present application, the first subscription list may further include subscriber information, and the subscriber may include the second cloud platform, the first cloud platform itself, and a user device registered on the first cloud platform.
In the embodiment of the application, the first cloud platform determines, according to the device identifier device ID of the first user device included in the subscription target in the first subscription list, all subscription types of the first user device, and then determines, from all subscription types, the URI of the resource in the subscription target corresponding to the resource change event, to obtain the URI of each resource in the first resource.
In this embodiment of the application, the first cloud platform obtains a URI of each resource in the first resource, and obtains attribute information of the resource corresponding to the resource identifier from the first user equipment based on the URI of each resource, that is, the attribute information of the first resource.
It can be understood that the first cloud platform may determine the resource identifier of the first resource through the first subscription list, and obtain, from the first user equipment, attribute information of a resource corresponding to the resource identifier of the first resource, that is, attribute information of the first resource, based on the resource identifier of the first resource.
In some embodiments of the present application, the obtaining of the state information of the first resource in S301 may include:
s801, receiving a second resource notification message reported by a first user equipment; the second resource notification message carries the state information of the second resource; the second resource is a resource belonging to the first user equipment and subscribed by the first cloud platform; the second resource comprises the first resource;
in the embodiment of the application, the first cloud platform can subscribe the resource information of the resource published by the first user equipment on the first cloud platform, so that the subscription of the resource belonging to the first user equipment is realized; the second resource is a resource belonging to the first user equipment and subscribed by the first cloud platform.
In this embodiment of the application, after the first user equipment is on line, the first cloud platform may receive a second resource notification message, where the second resource notification message carries status information of the second resource, and therefore, the second cloud platform may obtain the status information of the second resource based on the second resource notification message.
The second resources are resources of the first user equipment subscribed by the first cloud platform, and the resources include the first resources and also include resources of the first user equipment subscribed by other user equipment on the first cloud platform.
In some embodiments of the present application, the state information of the second resource may be a final state of the second resource.
In this embodiment, the final state of the second resource is state information after the last change of the plurality of changes of the second resource during the offline period of the first user equipment.
In some embodiments of the present application, the status information of the second resource may be resource change information of the second resource.
In this embodiment of the present application, the resource change information of the second resource includes information related to a change of the second resource during offline, for example, all state information of the second resource that is changed during offline of the first user equipment, or may further include a time corresponding to each state information, and the like.
S802, acquiring the state information of the first resource based on the state information of the second resource;
in the embodiment of the application, after receiving the second resource notification message, the first cloud platform acquires the state information of the second resource from the second resource notification message; since the second resource may not include only the first resource, it is necessary to determine the first resource, and then determine the state information of the first resource from the state information of the second resource based on the first resource.
In some embodiments of the present application, the state information of the second resource is a final state of the second resource.
In this embodiment of the present application, the second resource may change many times during the period when the first user equipment is offline, each change corresponds to one state, and the final state of the second resource is a state after the last change.
In some embodiments of the present application, the status information of the second resource is resource change information of the second resource.
In this embodiment, the second resource may change many times during the period when the first user equipment is offline, each change corresponds to one state, and the resource change information of the second resource may include information of each change of the second resource.
The information of each change may include state information corresponding to each change, and may also include time of occurrence of each change, and the like.
An embodiment of the present application provides an apparatus status notification method, as shown in fig. 5, the method may include:
s901, if the first user equipment is online, generating an online notification message of the first user equipment;
s902, sending an online notification message of the first user equipment to a second cloud platform;
s903, receiving a second resource notification message reported by the first user equipment; the second resource notification message carries the status information of the second resource; the second resource is a resource which belongs to the first user equipment and is subscribed by the first cloud platform; the second resource comprises the first resource;
in the embodiment of the application, the first cloud platform subscribes to an online event and a resource change event of the first user equipment, the first cloud platform generates an online notification message of the first user equipment after the first user equipment is online, and after the online notification message of the first user equipment is sent to the second cloud platform, the second cloud platform also receives a second resource notification message reported by the first user equipment.
S904, determining a first resource subscribed by a second cloud platform in the first user equipment;
in this embodiment of the application, the first cloud platform may determine the first resource based on the first subscription information as described in S701-S702, and then obtain state information corresponding to the first resource from state information of the second resource as state information of the first resource.
S905, acquiring attribute information of the first resource based on the state information of the second resource; the attribute information of the first resource is the state information of the first resource;
in this embodiment of the application, after determining the first resource, the first cloud platform may obtain the attribute information of the first resource from the state information of the second resource carried in the second resource notification message, and use the attribute information of the first resource as the state information of the first resource.
S906, aiming at the first resource, generating an event notification message of a resource change event corresponding to the first resource; the event notification message of the resource change event carries attribute information of the first resource; the event notification message is a first resource notification message;
it should be noted that, after receiving the second resource notification message, the first cloud platform may first obtain attribute information of the first resource; generating event notification messages for the resource change events corresponding to the first resources, and finally carrying attribute information of the corresponding resources in each event notification message; or generating event notification messages for the resource change events corresponding to the first resources, then acquiring the attribute information of the first resources, and finally carrying the attribute information of the corresponding resources in each event notification message; the embodiments of the present application are not limited thereto.
And S907, sending the first resource notification message to a second cloud platform.
It can be understood that, after the first user equipment is online, the first cloud platform may receive the state information of the second resource actively reported by the first user equipment, and the first cloud platform may obtain the state information of the first resource from the state information of the second resource, so that an interaction process between the first cloud platform and the first user platform in a process of obtaining the state information of the first resource is reduced, and efficiency of obtaining the state information of the first resource is improved.
The embodiment of the application provides a notification method of a device state, which is applied to a second cloud platform and comprises the following steps:
s1001, receiving a first resource notification message from a first cloud platform; the first resource notification message is used for indicating the state change of the first resource during the offline of the first user equipment; the first resource is a resource belonging to first user equipment on a first cloud platform subscribed by a second cloud platform; the second cloud platform is in communication with the first cloud platform.
In the embodiment of the application, if the second cloud platform subscribes to the first resource belonging to the first user equipment on the first cloud platform; the second cloud platform may receive the first resource notification message from the first cloud platform, and the second cloud platform may learn, through the first resource notification message, a state change of the first resource during the offline period of the first user equipment.
Here, the C2C connection is established between the first cloud platform and the second cloud platform, so the second cloud platform may discover the first user equipment on the first cloud platform and subscribe to the first resource from the first user equipment.
In some embodiments of the present application, the first resource notification message carries attribute information of the first resource; the attribute information of the first resource serves as the state information of the first resource.
In this embodiment of the application, the second cloud platform may determine, according to the attribute information of the first resource carried in the first resource notification message, an attribute change of the first resource during an offline period of the first user equipment, thereby determining a state information change of the first resource.
An embodiment of the present application provides an apparatus status notification method, as shown in fig. 6, the method may include:
s1101, receiving an online notification message from first user equipment of a first cloud platform;
in this embodiment of the present application, the second cloud platform subscribes to an online event of the first user equipment and a resource change event of the first resource, and after the first user equipment is online, the second cloud platform may receive an online notification message of the first user equipment.
S1102, if the online notification message of the first user equipment does not carry the carried identifier, receiving an event notification message of a resource change event corresponding to the first resource from the first cloud platform; and carrying attribute information used for representing the first resource by the carried identifier in the online notification message.
In this embodiment of the present application, if a second cloud platform subscribes to a resource on a certain device, the second cloud platform subscribes to a resource change event of the resource, and the second cloud platform may receive event notification messages corresponding to the resource change event, where the event notification messages corresponding to the resource change event are first resource notification messages.
Wherein, one event notification message carries the attribute information of one corresponding resource.
In the embodiment of the application, the online notification message of the first user equipment may carry a carried identifier, and if the online notification message of the first user equipment carries the carried identifier, it indicates that the online notification message of the first user equipment carries attribute information of the first resource; if the first resource notification message does not carry the identifier, the first cloud platform receives the first resource notification message, and the first resource notification message carries the attribute information of the first resource.
In this embodiment of the application, the second cloud platform receives an event notification message, may obtain attribute information of a corresponding resource, and may obtain an attribute change of the resource based on the attribute information of the resource.
An embodiment of the present application provides an apparatus status notification method, as shown in fig. 7, the method may include:
s1201, receiving an online notification message from first user equipment of a first cloud platform;
s1202, if the online notification message carries the carried identifier, the online notification message is used as a first resource notification message.
In this embodiment of the application, if the online notification message of the first user equipment carries the carried identifier, the second cloud platform receives the online notification message, which is equivalent to receiving the first resource notification message.
In the embodiment of the application, an online notification message of a first user equipment carries an equipment identifier of the first user equipment, and the equipment identifier indicates which equipment an online equipment is; that is to say, after receiving the online notification message, the second cloud platform may query the device identifier carried in the online notification message, so as to determine which device is online.
In some embodiments of the present application, the attribute information of the first resource is carried in the online notification message through a preset field.
Here, the preset field may be a links field; the second cloud platform may receive attributes of the respective resources within the links field according to different resources in the first resources.
In this embodiment of the application, the second cloud platform may determine whether the online notification message carries the attribute information of the first resource by determining whether the online notification message contains a links identifier.
In some embodiments of the present application, after receiving the first resource notification message from the first cloud platform in S1001, as shown in fig. 8, the method may further include:
s1002, generating a third resource notification message based on the first resource notification message; the third resource notification message is used for indicating the attribute change of the corresponding third resource of the first user equipment during offline; the third resource is a resource belonging to the first user equipment and subscribed by the second user equipment on the second cloud platform; the first resource comprises a third resource; the second user equipment is registered on the second cloud platform;
in this embodiment of the application, a second user equipment is registered on a second cloud platform, the second cloud platform establishes a C2C connection with the first cloud platform, the second user equipment may discover the first user equipment of the first cloud platform, and the second user equipment may subscribe to resources of the first user equipment through the second cloud platform, that is, the first resources may include resources of the first user equipment subscribed by the second user equipment, that is, third resources; therefore, the second cloud platform needs to inform the second user equipment of the change of the attribute of the third resource.
In this embodiment of the application, after receiving the first notification message, the second cloud platform may acquire the attribute information of the first resource, determine attribute information of a third resource subscribed by the second user equipment, generate a third resource notification message based on the attribute information of the third resource, and indicate a state change of the third resource through the third resource notification message.
In some embodiments of the present application, the third resource notification message may be a message in the first resource notification message, and the second cloud platform confirms the event notification message corresponding to the third resource from the event notification message of each resource in the first resource, and takes the event notification message corresponding to the third resource as the third resource notification message.
In some embodiments of the application, the second cloud platform may further determine, from the event notification messages corresponding to the third resources, the resources whose attributes have changed, and select, from the event notification messages corresponding to the third resources, the event notification messages corresponding to the resources as the third resource notification messages.
And S1003, sending the third resource notification message to the second user equipment.
In this embodiment of the application, after generating the third resource notification message, the second cloud platform sends the third resource notification message to the second user equipment, and indicates an attribute change of the third resource during an offline period of the first user equipment.
In some embodiments of the present application, the generating, based on the first resource notification message in S1002, an implementation of a third resource notification message may include:
s1301, acquiring attribute information of a third resource of the first user equipment subscribed by the second user equipment based on the first resource notification message;
in the embodiment of the application, after receiving the first resource notification message, the second cloud platform may acquire attribute information of the first resource; then, the second cloud platform can determine attribute information corresponding to the third resource from the first resource attribute information as third resource attribute information; the attribute information of the resource with the changed attribute may also be selected from the attribute information corresponding to the third resource as the third resource attribute information, which is not limited in the embodiment of the present application.
S1302, generating a third resource notification message based on the attribute information of the third resource.
In the embodiment of the application, after determining the attribute information of the third resource, the second cloud platform generates a third resource notification message based on the attribute information of the third resource, and carries the attribute information of the third resource in the third resource notification message to notify the second user equipment.
In some embodiments of the present application, the second cloud platform generates, for the third resource, an event notification message of a resource change event corresponding to the third resource; and carrying the attribute information of the third resource in the event notification message to obtain a third resource notification message.
In an embodiment of the present application, the second user equipment may subscribe to a plurality of resources on the first user equipment; that is, the third resource may include at least one resource; the second cloud platform may generate a corresponding event notification message for each resource in the third resources, and carry the attribute information of each resource in the corresponding event notification messages, respectively, where the corresponding event notification messages serve as the third resource notification messages.
In some embodiments of the present application, the second cloud platform may determine, from the attribute information of the third resource, a resource with a changed attribute, and generate a corresponding event notification message for each of the resources; and respectively carrying the resource attributes of the resources in corresponding event notification messages, wherein the corresponding event notification messages are used as third resource notification messages together.
In some embodiments of the present application, the event notification message may also carry a device identifier of a device to which the corresponding resource belongs.
It can be understood that the second cloud platform carries the attribute information of the corresponding resource in each event notification message, and indicates the attribute change of the corresponding resource through one event notification message, thereby reducing the complexity of carrying the attribute information in the information and improving the generation efficiency of the third resource notification message.
In this embodiment of the application, after the second cloud platform generates the third resource notification message, each event notification message of the third resource notification message may be sent to the second user equipment separately, or the event notification messages may be sent to the second user equipment together.
The second user equipment comprises a plurality of user equipment; the third resource notification message comprises sub-resource notification messages which are in one-to-one correspondence with the plurality of user equipment; the sub-resource notification message carries attribute information of the third resource of each user equipment.
In some embodiments of the present application, in S1301, based on the first resource notification message, the obtaining of the attribute information of the third resource of the first user equipment subscribed by the second user equipment is implemented, as shown in fig. 9, the method may include:
s13011, acquiring first resource attribute information from the first resource notification message;
s13012, determining a third resource based on the second subscription information; the second subscription information is the subscription condition of the second user equipment;
in this embodiment of the application, after the second cloud platform acquires the attribute information of the first resource from the first resource notification message, if the attribute information of the third resource needs to be acquired from the attribute information of the first resource, it needs to determine which resources in the first resource are resources subscribed by the second user equipment, that is, the third resource.
In the embodiment of the application, second subscription information is stored on the second cloud platform, and the second subscription information includes a device subscription condition of the second cloud platform; here, the device subscription condition of the second cloud platform is information of all device state events subscribed by the user device on the second cloud platform; according to the second subscription information, the second cloud platform can determine information of all devices subscribed by each second user device in the user devices on the second cloud platform, namely information of all device state events, and then further determine information of resource change events in the device state events subscribed by the second user devices; the information of the resource change event of the second user equipment comprises the resource information subscribed by the first user equipment.
In some embodiments of the present application, the second subscription information may be a second subscription list, and the second subscription list may include: user identification, subscriber, subscription type, subscription target and subscription expiration time; wherein the user identification represents a user subscribing to the device state event; the subscription type represents the type of device state event; the subscription target represents a device subscribing to the device state event, the subscription expiration time represents a time range subscribing to the device state event, and the subscription is cancelled if the time range is exceeded.
The content represented by the user identification, the subscription type, the subscription target and the subscription expiration time is the same as a first subscription list in the first cloud platform; a subscriber represents a subscriber to the corresponding device state event.
In this embodiment of the application, the second cloud platform determines, based on the subscriber in the second subscription list, the resource change event subscribed by the second user equipment, searches the device identifier of the first user equipment from the subscription target corresponding to the resource change event, and determines the resource identifier corresponding to the device identifier of the first user equipment in the subscription target as the resource identifier of the third resource, which is equivalent to determining the third resource.
S13013, based on the first resource, acquires the attribute information of the third resource corresponding to the third resource from the attribute information of the first resource.
In this embodiment, after determining the third resource, the second cloud platform may find out attribute information corresponding to the third resource from the attribute information of the first resource, so as to obtain the attribute information of the third resource.
In some implementations of the present application, the second user equipment comprises a plurality of user equipments; the third resource notification message includes sub-resource notification messages corresponding to the plurality of user equipments one to one; the sub-resource notification message carries attribute information of the third resource of each user equipment.
In this embodiment of the application, the second cloud platform generates a corresponding sub-resource notification message for each second user equipment, and sends each sub-resource notification message to each corresponding second user equipment.
An embodiment of the present application provides a method for notifying a device status, which is applied to a first user equipment, and as shown in fig. 10, the method includes:
s1401, if the first user equipment is online on the first cloud platform, generating a second resource notification message; the second resource is a resource belonging to the first user equipment and subscribed by the first cloud platform; the second resource notification message is used for indicating the state change of the second resource; the second resource comprises the first resource; the first resource is a resource belonging to first user equipment on a first cloud platform subscribed by a second cloud platform;
s1402, sending the second resource notification message to the first cloud platform.
In the embodiment of the application, after the first user equipment is registered on the first cloud platform, the resource information can be published on the first cloud platform, so that the resource can be published; here, the resource information may be a resource itself or a resource link, and the embodiment of the present application is not limited to this.
In the embodiment of the application, the first cloud platform subscribes to the resource information corresponding to the second resource, and then subscribes to the second resource; and the second cloud platform subscribes the resource information corresponding to the first resource and then subscribes the first resource.
Here, the second resource is a resource to which the first cloud platform subscribes; since the first resource of the first user equipment subscribed by the second cloud platform is also subscribed by the first cloud platform, the second resource includes the first resource.
In the embodiment of the application, after the first user equipment is online on the first cloud platform, a second resource notification message is generated for a second resource subscribed on the first user equipment, and the state change of the second resource is indicated through the second resource notification message.
In some embodiments of the present application, the first user equipment generates a corresponding second event notification message for each resource in all subscribed resources, and indicates, through the second event notification message, a state change of the corresponding resource in the second resource.
In the embodiment of the application, the second resource is a resource of the first user equipment subscribed by the first cloud platform, wherein the second resource comprises a resource of the first user equipment subscribed by the second cloud platform through the first cloud platform, namely the first resource; thus, the second resource notification message may indicate a resource change of the first resource.
In the embodiment of the application, after the first user equipment generates the second resource notification message, the second resource notification message is sent to the first cloud platform.
In some embodiments of the present application, before generating the second resource notification message if the first user equipment is online on the first cloud platform in S1401, as shown in fig. 11, the method may further include:
s14011, the first user equipment records the resource change condition of the second resource during the off-line period, and generates resource change record information;
in this embodiment of the present application, once the first user equipment goes offline, the first user equipment starts to record each change of the state information of the second resource, and generates resource change record information of the second resource.
In some embodiments of the present application, in S14011, the first user equipment records a resource change condition of the second resource during offline, and generates an implementation of resource change record information, as shown in fig. 12, the method may include:
s14011a, determining a second resource based on the third subscription information; the third subscription information is the situation that the first user equipment is subscribed by the first cloud platform;
s14011b records the resource change status of the second resource, and generates resource change record information.
In this embodiment of the application, the resources on the first user equipment may only be a part of the resources subscribed by the first cloud platform, and therefore, the third subscription information may be stored on the first user equipment; the third subscription information is the situation that the first user equipment is subscribed by the first cloud platform.
Here, the third subscription information may be a third subscription list, and the third subscription list may include a subscription type, a subscription target, and an expiration time; and according to the third subscription list, the first user equipment determines the second resource from the subscription target corresponding to the subscription type as the resource change event.
In the embodiment of the application, a resource record list is set in the first user equipment and used for recording the condition that the first user equipment is subscribed; the resource record list may include subscription type, resource state, subscribed resource and occurrence time; the subscribed resource represents a resource subscribed on the first user equipment when the equipment state event is a resource change event, namely a second resource; the resource state represents the current state of the resource in the subscription target when the subscription type is the resource change event; recording the current state once when the resource state changes every time; the occurrence time indicates the time at which the resource change occurs.
In some embodiments of the present application, the first user equipment may record the resource change record information in the resource record list after generating the resource change record information.
S14012, if the first user equipment is on line, acquiring the state information of the second resource from the resource change information;
s14013 generates a second resource notification message based on the status information of the second resource.
In the embodiment of the application, if the first user equipment is online, the first user equipment acquires the state information of the second resource from the resource record list.
Here, what state information of the second resource is obtained by the first user equipment is determined by the reporting policy; that is, the first ue determines what the status information of the second resource needs to be obtained based on the reporting policy.
In some embodiments of the present application, if the reporting policy of the second resource is detailed reporting, the resource change information of the second resource is obtained from the resource change record information, and the resource change information of the second resource is used as the state information of the second resource.
In some embodiments of the present application, if the reporting policy is final reporting, the final state of the second resource is obtained from the resource change record information, and the final state of the second resource is used as the state information of the second resource.
And the final state of the second resource is the state information recorded by the second resource in the resource record table at the last time.
In some embodiments of the present application, the status information of the second resource includes attribute information of the second resource.
It can be understood that after the first user equipment is online, the first user equipment actively reports the state information of the second resource, so that the interaction process between the first cloud platform and the first user equipment is reduced, and the efficiency of the first user equipment indicating the change of the first state information is improved; in addition, the first user equipment records the change process of the subscribed second resource during the offline period, so that the first user equipment can report not only the final state of the second resource but also the change process of the second resource, and richer information can be indicated through the state information of the second resource.
An embodiment of the present application provides a method for notifying a device status, which is applied to interaction between a first cloud platform, a second cloud platform, and first user equipment and second user equipment, and as shown in fig. 13, the method includes:
s1501, if the first user equipment is online, the first cloud platform generates an online notification message of the first user equipment;
s1502, the first cloud platform sends an online notification message of the first user equipment to the second cloud platform;
s1503, the first cloud platform determines subscription information of the second cloud platform for subscribing the first user equipment based on the first subscription information; the first subscription list is the situation that the equipment on the first cloud platform is subscribed;
s1504, the first cloud platform subscribes subscription information of the first user equipment based on the second cloud platform, and determines a first resource; the first resource is a resource subscribed by the second cloud platform to a resource change event of the first user equipment;
s1505, the first cloud platform sends a resource subscription request to the first user equipment to request an attribute value of the first resource;
s1506, the first user equipment sends the attribute value of the first resource to the first cloud platform based on the resource subscription request;
s1507, the first cloud platform generates an event notification message of the resource change event corresponding to the first resource based on the attribute value of the first resource; the event notification message of the resource change event carries attribute information of the first resource; the event notification message is a first resource notification message;
s1508, the first cloud platform sends the first resource notification message to the second cloud platform;
exemplarily, the second cloud platform subscribes to a registration event, a logout event, an online event and an offline event of all devices of a certain user on the first cloud platform, a publish resource event and an unpublish event resource of the first user device in the devices, and an attribute change event of the resource; the first user equipment goes offline and then goes online again, and an online notification message of the first user equipment is generated.
The first cloud platform inquires whether the second cloud platform subscribes to the attribute change event of the first user equipment in the first subscription list, if so, after the first user equipment is online, the first subscription list is checked according to the equipment identification of the first user equipment, and the resource subscribed by the second cloud platform and belonging to the first user equipment, namely the first resource, is determined from the first subscription list.
After the first resource is determined by the first cloud platform, the final attribute value of the first resource is acquired from the first user equipment, a corresponding attribute change event notification message is generated for each resource in the first resource, each attribute change notification message carries the final attribute value of the corresponding resource, and then each attribute change notification message is sent to the second cloud platform.
S1509, the second cloud platform acquires the attribute value of the first resource based on the first resource notification message;
in this embodiment of the application, after receiving the event notification messages, the second cloud platform acquires the attribute information of the corresponding resource carried in each event notification message, so as to acquire the attribute information of the first resource.
S1510, the second cloud platform determines a third resource based on the second subscription information; the third resource is a resource belonging to the first user equipment on a second cloud platform subscribed by the second user equipment;
s1511, the second cloud platform obtains an attribute value of a third resource corresponding to the third resource from the first resource attribute value based on the third resource;
s1512, the second cloud platform generates a third resource notification message based on the attribute value of the third resource;
and S1513, the second cloud platform sends the third resource notification message to the second user equipment.
In this embodiment of the present application, there may be a plurality of resources of the first user equipment subscribed by the second user equipment registered on the second cloud platform, and the resource subscribed by each second user equipment may be different; for one of the second user equipment, the second cloud platform acquires attribute information of a third resource of the first user equipment subscribed by the second user equipment, generates a corresponding third resource notification message, carries the attribute information of the third resource in the corresponding third resource notification message, and sends the attribute information of the third resource to the second user equipment.
It can be understood that, after the first cloud platform is online with the first user equipment, the first cloud platform generates an event notification message corresponding to a resource change event corresponding to each resource in the first resource, and one event notification message carries attribute information of one resource in the first resource, so that even if the first user equipment is offline and online, the second cloud platform can acquire the subscribed attribute information of the first resource, and accuracy of acquiring the state information of the first resource is improved.
An embodiment of the present application provides a method for notifying an equipment state, which is applied to interaction among a first cloud platform, a second cloud platform, a first user equipment, and a second user equipment, where the second cloud platform subscribes to a resource of the first user equipment and an online event of the first user equipment, and as shown in fig. 14, the method includes:
s1601, if the first user equipment is online, the first cloud platform generates an online notification message of the first user equipment;
s1602, the first cloud platform determines subscription information of the second cloud platform for subscribing the first user equipment based on the first subscription information; the first subscription information is the condition that equipment on the first cloud platform is subscribed;
s1603, the first cloud platform subscribes subscription information of the first user equipment based on the second cloud platform and determines a first resource; the first resource is a resource subscribed to a resource change event of the first user equipment by the second cloud platform;
s1604, the first cloud platform sends a resource subscription request to the first user equipment to request a resource attribute value of the first resource;
s1605, the first user equipment sends the resource attribute value of the first resource to the first cloud platform based on the resource subscription request;
s1606, the first cloud platform carries the attribute value of the first resource in an online notification message of the first user equipment;
s1607, the first cloud platform sends the online notification message of the first user equipment to the second cloud platform;
in this embodiment of the application, after the first user equipment is online, the first cloud platform needs to send an online notification message of the first user equipment to the second cloud platform, and then the first cloud platform can carry an attribute value of the first resource of the first user equipment subscribed by the second cloud platform in the online notification message of the first user equipment and send the online notification message to the second cloud platform.
S1608, if the online notification message contains the carrying identifier, the second cloud platform acquires the attribute value of the first resource from the online notification message;
s1609, the second cloud platform determines a third resource based on the second subscription information; the third resource is a resource belonging to the first user equipment on a second cloud platform subscribed by the second user equipment;
s1610, the second cloud platform acquires an attribute value corresponding to the third resource from the first resource attribute value as an attribute value of the third resource based on the third resource;
s1611, the second cloud platform generates a third resource notification message based on the attribute value of the third resource;
s1612, the second cloud platform sends the third resource notification message to the second user equipment.
In the embodiment of the application, after the first user equipment is online, the first cloud platform carries the attribute value of the first resource in the online notification message of the first user equipment, so that even if the first user equipment is offline and then online, the second cloud platform can acquire the attribute value of the subscribed first resource from the received online notification message to acquire the attribute change of the first resource; the accuracy of the second cloud platform for obtaining the attribute value of the first resource is improved, and the system consumption is reduced.
Illustratively, the second cloud platform subscribes to registration events, logout events, online events and offline events of all devices of a certain user on the first cloud platform, resource publish events and resource unpublish events of the first user device in the devices, and attribute change events of the resources; the first user equipment goes offline and then goes online again, and an online notification message of the first user equipment is generated.
In the embodiment of the application, when the first user equipment is offline and then online again, the first cloud platform generates an online notification message of the first user equipment, wherein the online notification message carries an online identifier of the first user equipment and also carries an attribute value of the first resource.
In this embodiment of the application, the first cloud platform places the attribute value of the first resource in a links field in the online notification message, and in the links field, the attribute value of each resource in the first resource may be placed respectively.
In the embodiment of the application, after receiving an online notification message, the second cloud platform checks whether the online notification message carries a links identifier, and if the online notification message carries the links identifier, the second cloud platform indicates that the online notification message carries an attribute value of the first resource, and the second cloud platform can acquire the attribute value of the first resource from the online notification message; then, the second cloud platform may determine, based on the second subscription list, which second user devices subscribe to the online event of the first user device, and then generate an online notification message of the first user device and send the online notification message to the second user devices; and the second cloud platform further determines which second user equipment subscribes to the resources of the first user equipment and which resources on the first user equipment are subscribed to by each second user equipment based on the second subscription list, generates a corresponding resource change event notification message for each resource, and sends a resource change event notification message corresponding to the subscribed resources to each second user equipment.
It should be noted that, for a second user equipment, the second cloud platform may send event notification messages corresponding to the device state events subscribed by the second cloud platform to the second user equipment together, or may send event notification messages corresponding to the respective events separately, which is not limited in the embodiment of the present application.
For a second user device, the second cloud platform may only send a resource change notification message corresponding to the resource change event, and after receiving the resource change event notification message, the second user device may determine that the first user device is online.
An embodiment of the present application provides a method for notifying an equipment status, which is applied to interaction between a first cloud platform, a second cloud platform, and a first user equipment, and as shown in fig. 15, the method includes:
s1701, the first user equipment determines a second resource based on third subscription information during offline; the second resource is a resource which belongs to the first user equipment and is subscribed by the first cloud platform; the second resource comprises the first resource; the first resource is a resource belonging to first user equipment on a first cloud platform subscribed by a second cloud platform;
s1702, the first user equipment records the resource change condition of the second resource to generate resource change record information;
s1703, if the first user equipment is online, obtaining an attribute value of the second resource from the resource change record information;
s1704, the first user equipment generates a second resource notification message based on the attribute value of the second resource; the second resource notification message carries an attribute value of the second resource;
s1705, the first user equipment sends a second resource notification message to the first cloud platform;
s1706, the first cloud platform acquires the attribute value of the first resource based on the attribute value of the second resource;
s1707, the first cloud platform generates an event notification message of a resource change event corresponding to the first resource based on the attribute value of the first resource;
s1708, the first cloud platform carries the attribute value of the first resource in the event notification message to obtain a first resource notification message;
s1709, the first cloud platform sends the first resource notification message to the second cloud platform.
In the embodiment of the application, after the first user equipment is offline, the resource change record information of the subscribed second resource is recorded in the whole offline period, so that after the first user equipment is online, the first user equipment can identify the state information of the second resource in the record information from the resource; and the first user equipment directly reports the information, so that the interaction process between the first cloud platform and the first user equipment is reduced, the first user equipment can directly receive the state information of the second resource after the first user equipment is on line, and the efficiency of acquiring the state information of the first resource is improved.
Exemplarily, after the first user equipment is offline, the first user equipment continuously monitors the third subscription list, and determines the second resource subscribed by the first cloud platform from the third subscription list; when the second resource has an attribute change event, recording the attribute change event in a resource record list; if the first user equipment is online, the first user equipment acquires the attribute value of the second resource, carries the attribute value of the second resource in a resource change event notification message corresponding to the second resource and sends the resource change event notification message to the first cloud platform.
Here, according to the reporting policy corresponding to each attribute change event recorded in the resource record list, the first user equipment may determine whether the reported state information of the first resource is an attribute value of the first resource or attribute change information of the first resource; if the reporting strategy is detailed reporting, the first user equipment acquires the attribute change information of the resource; and if the reporting strategy is the final reporting, the first user equipment acquires the attribute value of the resource.
It should be noted that, after acquiring the resource attribute value or the attribute change information of the first resource from the resource record list according to the reporting policy, the first user equipment may determine which attributes of the resource in the first resource have changed, and the first user equipment may report the attributes of the resource whose attributes have changed, or report the changed attributes of the resource, which is not limited in the embodiment of the present application.
An embodiment of the present application provides a first cloud platform, as shown in fig. 16, where the first cloud platform 16 includes:
a generating module 161, configured to generate a first resource notification message if the first user equipment is online on the first cloud platform; the first resource notification message is used for indicating the state change of the corresponding first resource of the first user equipment during offline; the first resource is a resource belonging to the first user equipment on the first cloud platform subscribed by the second cloud platform;
a sending module 162, configured to send the first resource notification message to the second cloud platform.
In some embodiments, the generating module 161 is specifically configured to obtain state information of the first resource; generating the first resource notification message based on the state information of the first resource.
In some embodiments, the generating module 161 is specifically configured to determine the first resource, which is subscribed to by the second cloud platform, in the first user equipment; and acquiring attribute information of the first resource from the first user equipment, wherein the attribute information of the first resource represents the state information of the first resource.
In some embodiments, the generating module 161 is specifically configured to determine, based on the first subscription information, that the second cloud platform subscribes to the information of the first user equipment; the first subscription information is the condition that the user equipment on the first cloud platform is subscribed; determining the first resource based on the information that the second cloud platform subscribes to the first user equipment; the first resource is a resource corresponding to a resource change event subscribed to the first user equipment by the second cloud platform.
In some embodiments, the generating module 161 is specifically configured to generate, for the first resource, an event notification message of a resource change event corresponding to the first resource; the event notification message of the resource change event carries the attribute information of the first resource; the event notification message is a first resource notification message.
In some embodiments, the generating module 161 is specifically configured to generate the online notification message of the first user equipment after the first cloud platform is online and before the first resource notification message is generated; and sending the online notification message to the second cloud platform.
In some embodiments, the generating module 161 is specifically configured to generate an online notification message of the first user equipment; and carrying the attribute information of the first resource in an online notification message of the first user equipment to obtain the first resource notification message.
In some embodiments, the attribute information of the first resource is carried in the online notification message by a preset field.
In some embodiments, the generating module 161 is specifically configured to receive a second resource notification message reported by the first user equipment; the second resource notification message carries state information of a second resource; the second resource is a resource which belongs to the first user equipment and is subscribed by the first cloud platform; the second resource comprises the first resource; and acquiring the state information of the first resource based on the state information of the second resource.
In some embodiments, the state information of the second resource comprises a final state of the second resource.
In some embodiments, the status information of the second resource comprises resource change information of the second resource.
An embodiment of the present application provides a second cloud platform, as shown in fig. 17, where the second cloud platform 17 includes:
a receiving module 171, configured to receive a first resource notification message from a first cloud platform; the first resource notification message is used for indicating the state change of the first resource during the period that the first user equipment is offline; the first resource is a resource belonging to first user equipment on the first cloud platform subscribed by the second cloud platform.
In some embodiments, the first resource notification message carries attribute information of the first resource; the attribute information of the first resource characterizes state information of the first resource.
In some embodiments, the first resource notification message comprises an event notification message of a resource change event corresponding to the first resource.
In some embodiments, the first resource notification message comprises an online notification message of the first user equipment.
In some embodiments, the receiving module 171 is specifically configured to receive, before receiving the first resource notification message from the first cloud platform, an online notification message of the first user equipment sent by the first cloud platform; the receiving a first resource notification message from a first cloud platform includes: if the online notification message does not carry the carried identifier, receiving a first resource notification message from a first cloud platform; the attribute information carrying the identifier for representing the first resource is carried in the online notification message.
In some embodiments, the receiving module 171 is specifically configured to, after receiving an online notification message of a first user equipment sent by the first cloud platform, if the online notification message carries a carried identifier, use the online notification message as the first resource notification message.
In some embodiments, the second cloud platform 17 further comprises:
a generating module 172 (not shown in the figure) configured to generate a third resource notification message based on the first resource notification message; the third resource notification message is used for indicating the attribute change of the corresponding third resource of the first user equipment during offline; the third resource is a resource belonging to the first user equipment on a second cloud platform subscribed by the second user equipment; the first resource comprises the third resource; the second user equipment is registered on the second cloud platform.
A sending module 173 (not shown in the figure), configured to send the third resource notification message to the second user equipment.
In some embodiments, the generating module 172 is specifically configured to, based on the first resource notification message, obtain attribute information of a third resource of the first user equipment subscribed by the second user equipment; and generating a third resource notification message based on the attribute information of the third resource.
In some embodiments, the generating module 172 is specifically configured to obtain the first resource attribute information from the first resource notification message; determining the third resource based on second subscription information; the second subscription information is the subscription condition of the user equipment of the second cloud platform; and acquiring attribute information of a third resource corresponding to the third resource from the first resource attribute information based on the third resource.
In some embodiments, the second user equipment comprises a plurality of user equipments; the third resource notification message comprises sub-resource notification messages which are in one-to-one correspondence with the plurality of user equipment; the sub-resource notification message carries attribute information of the third resource of each user equipment.
An embodiment of the present application provides a first user equipment, as shown in fig. 18, where the first user equipment 18 includes:
a generating module 181, configured to generate a second resource notification message if the first user equipment is online on the first cloud platform; the second resource is a resource belonging to the first user equipment and subscribed by the first cloud platform; the second resource notification message is used for indicating the state change of the second resource; the second resource comprises a first resource; the first resource is a resource belonging to the first user equipment on the first cloud platform subscribed by the second cloud platform;
a sending module 182, configured to send the second resource notification message to the first cloud platform.
In some embodiments, the generating module 181 is specifically configured to, before generating the second resource notification message, record a resource change condition of the second resource during an offline period of the first user equipment, and generate resource change record information; if the first user equipment is on line, acquiring the state information of the second resource from the resource change record information; generating the second resource notification message based on the status information of the second resource.
In some embodiments, the generating module 181 is specifically configured to determine the second resource based on the third subscription information; the third subscription information is the condition that the first user equipment is subscribed by the first cloud platform; and recording the resource change condition of the second resource, and generating the resource change record information.
In some embodiments, the generating module 181 is specifically configured to acquire the resource change information of the second resource from the resource change record information, and use the resource change information of the second resource as the status information of the second resource.
In some embodiments, the generating module 181 is specifically configured to acquire the final state of the second resource from the resource change record information, and use the final state of the second resource as the state information of the second resource.
An embodiment of the present application provides a first cloud platform, as shown in fig. 19, where the first cloud platform 19 includes: the processor 1901 and the memory 1902, where the memory 1902 stores a computer program that can be executed on the processor 1901, and when the computer program is executed by the processor 1901, the steps of the device status notification method on the first cloud platform side according to the embodiment of the present application are implemented.
The Memory 1902 is configured to store computer programs and applications executed by the processor 1901, and may also buffer data (e.g., image data, audio data, voice communication data, and video communication data) to be processed or already processed by the processor 1901 and modules in the terminal, and may be implemented by a FLASH Memory (FLASH) or a Random Access Memory (RAM).
The processor 1901 implements any of the steps of the device status notification method on the first cloud platform side when executing the program. The processor 1901 generally controls the overall operation of the first cloud platform 19.
An embodiment of the present application provides a second cloud platform, as shown in fig. 20, where the second cloud platform 20 includes: a processor 2001 and a memory 2002, where the memory 2002 stores a computer program operable on the processor 2001, and when the processor 2001 executes the computer program, the processor 2001 implements the steps of any one of the second cloud platform-side device status notification methods according to the embodiments of the present application.
The Memory 2002 is configured to store computer programs and applications to be processed by the processor 2001, and may also buffer data (e.g., image data, audio data, voice communication data, and video communication data) to be processed or already processed by the processor 2001 and modules in the terminal, and may be implemented by a FLASH Memory (FLASH) or a Random Access Memory (RAM).
The processor 2001 implements the steps of any one of the above-described device status notification methods on the second cloud platform side when executing a program. The processor 2001 generally controls the overall operation of the second cloud platform 20.
An embodiment of the present application provides a first user equipment, as shown in fig. 21, where the first user equipment 21 includes: a processor 2101 and a memory 2102, wherein the memory 2102 stores a computer program operable on the processor 2101, and the processor 2101 executes the computer program to perform the steps of any one of the first user equipment-side device status notification methods according to embodiments of the present disclosure.
The Memory 2102 is configured to store computer programs and applications to be processed by the processor 2101, and may also buffer data (e.g., image data, audio data, voice communication data, and video communication data) to be processed or already processed by the processor 2101 and various modules in the terminal, and may be implemented by a FLASH Memory (FLASH) or a Random Access Memory (RAM).
The processor 2101 executes a program to implement any of the above-described steps of the device status notification method on the first user equipment side. The processor 2101 generally controls the overall operation of the first user equipment station 21.
The Processor may be at least one of an Application Specific Integrated Circuit (ASIC), a Digital Signal Processor (DSP), a Digital Signal Processing Device (DSPD), a Programmable Logic Device (PLD), a Field Programmable Gate Array (FPGA), a Central Processing Unit (CPU), a controller, a microcontroller, and a microprocessor. It is understood that the electronic device implementing the above-described processor function may be other electronic devices, and the embodiments of the present application are not limited thereto.
The computer storage medium/Memory may be a Memory such as a Read Only Memory (ROM), a Programmable Read Only Memory (PROM), an Erasable Programmable Read Only Memory (EPROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a magnetic Random Access Memory (FRAM), a Flash Memory (Flash Memory), a magnetic surface Memory, an optical Disc, or a Compact Disc Read-Only Memory (CD-ROM); but may also be various terminals such as mobile phones, computers, tablet devices, personal digital assistants, etc., that include one or any combination of the above-mentioned memories.
Here, it should be noted that: the above description of the storage medium and device embodiments is similar to the description of the method embodiments above, with similar advantageous effects as the method embodiments. For technical details not disclosed in the embodiments of the storage medium and apparatus of the present application, reference is made to the description of the embodiments of the method of the present application for understanding.
It should be appreciated that reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present application. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. It should be understood that, in the various embodiments of the present application, the sequence numbers of the above-mentioned processes do not imply any order of execution, and the order of execution of the processes should be determined by their functions and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application. The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a component of' 8230; \8230;" does not exclude the presence of another like element in a process, method, article, or apparatus that comprises the element.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described device embodiments are merely illustrative, for example, the division of the unit is only a logical functional division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units; can be located in one place or distributed on a plurality of network units; some or all of the units can be selected according to actual needs to achieve the purpose of the scheme of the embodiment of the application.
In addition, all functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may be separately regarded as one unit, or two or more units may be integrated into one unit; the integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
Alternatively, the integrated units described above in the present application may be stored in a computer-readable storage medium if they are implemented in the form of software functional modules and sold or used as independent products. Based on such understanding, the technical solutions of the embodiments of the present application, in essence or parts contributing to the related art, may be embodied in the form of a software product, where the computer software product is stored in a storage medium and includes several instructions for causing an automatic test line of a device to perform all or part of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: various media that can store program code, such as removable storage devices, ROMs, magnetic or optical disks, etc.
The methods disclosed in the several method embodiments provided in the present application may be combined arbitrarily without conflict to obtain new method embodiments.
The features disclosed in the several method or apparatus embodiments provided in the present application may be combined arbitrarily, without conflict, to arrive at new method embodiments or apparatus embodiments.
The above description is only for the embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Industrial applicability
In the embodiment of the application, if the first user equipment is online on the first cloud platform, a first resource notification message is generated; indicating the state change of the corresponding first resource of the first user equipment during offline through the first resource notification; the first resource is a resource belonging to first user equipment on a first cloud platform subscribed by a second cloud platform; that is to say, if the second cloud platform subscribes to the first resource, even if the resource state of the first user equipment changes during offline, the second cloud platform can acquire the resource state of the first resource, so that the accuracy of acquiring the state information by the second cloud platform is improved.

Claims (36)

  1. A device state notification method is applied to a first cloud platform and comprises the following steps:
    if the first user equipment is online on the first cloud platform, generating a first resource notification message; the first resource notification message is used for indicating the state change of the corresponding first resource of the first user equipment during offline; the first resource is a resource belonging to the first user equipment on the first cloud platform subscribed by the second cloud platform;
    and sending the first resource notification message to the second cloud platform.
  2. The method of claim 1, wherein the generating a first resource notification message comprises:
    acquiring state information of a first resource;
    generating the first resource notification message based on the state information of the first resource.
  3. The method of claim 2, wherein the obtaining the status information of the first resource comprises:
    determining the first resource subscribed by the second cloud platform in the first user equipment;
    and acquiring attribute information of the first resource from the first user equipment, wherein the attribute information of the first resource represents the state information of the first resource.
  4. The method of claim 3, wherein the determining the first resource of the first user device that is subscribed to by the second cloud platform comprises:
    determining information that the second cloud platform subscribes to the first user equipment based on the first subscription information; the first subscription information is the condition that the user equipment on the first cloud platform is subscribed;
    determining the first resource based on the information that the second cloud platform subscribes to the first user equipment; the first resource is a resource corresponding to a resource change event of the first user equipment subscribed by the second cloud platform.
  5. The method of any of claims 2 to 4, wherein the generating the first resource notification message based on the status information of the first resource comprises:
    generating an event notification message of a resource change event corresponding to the first resource for the first resource; the event notification message of the resource change event carries attribute information of the first resource; the event notification message is a first resource notification message.
  6. The method of any of claims 2 to 4, wherein after the first user equipment comes online on the first cloud platform and before the generating the first resource notification message, the method further comprises:
    generating an online notification message of the first user equipment;
    and sending the online notification message to the second cloud platform.
  7. The method of any of claims 2 to 4, wherein the generating the first resource notification message based on the attribute information of the first resource comprises:
    generating an online notification message of the first user equipment;
    and carrying the attribute information of the first resource in an online notification message of the first user equipment to obtain the first resource notification message.
  8. The method of claim 7, wherein the attribute information of the first resource is carried in the online notification message by a preset field.
  9. The method of claim 2, wherein the obtaining the status information of the first resource comprises:
    receiving a second resource notification message reported by the first user equipment; the second resource notification message carries state information of the second resource; the second resource is a resource which belongs to the first user equipment and is subscribed by the first cloud platform; the second resource comprises the first resource;
    and acquiring the state information of the first resource based on the state information of the second resource.
  10. The method of claim 9, wherein the state information of the second resource comprises a final state of the second resource.
  11. The method of claim 9, wherein the status information of the second resource comprises resource change information of the second resource.
  12. A device state notification method is applied to a second cloud platform and comprises the following steps:
    receiving a first resource notification message from a first cloud platform; the first resource notification message is used for indicating the state change of the first resource during the offline of the first user equipment; the first resource is a resource belonging to the first user equipment on the first cloud platform subscribed by the second cloud platform.
  13. The method according to claim 12, wherein the first resource notification message carries attribute information of the first resource; the attribute information of the first resource characterizes state information of the first resource.
  14. The method of claim 13, wherein the first resource notification message comprises an event notification message of a resource change event corresponding to the first resource.
  15. The method of claim 13, wherein the first resource notification message comprises an online notification message of a first user equipment.
  16. The method of claim 12 or 13, wherein prior to said receiving the first resource notification message from the first cloud platform, the method further comprises:
    receiving an online notification message of first user equipment sent by the first cloud platform;
    the receiving a first resource notification message from a first cloud platform includes:
    if the online notification message does not carry the carried identifier, receiving a first resource notification message from a first cloud platform; the attribute information carrying the identifier for representing the first resource is carried in the online notification message.
  17. The method of claim 16, wherein after receiving the online notification message sent by the first cloud platform, the method further comprises:
    and if the online notification message carries the carried identifier, taking the online notification message as the first resource notification message.
  18. The method of claim 15, wherein the attribute information of the first resource is carried in the online notification message by a preset field.
  19. The method of claim 13, wherein after receiving the first resource notification message from the first cloud platform, the method further comprises:
    generating a third resource notification message based on the first resource notification message; the third resource notification message is used for indicating the attribute change of the corresponding third resource of the first user equipment during offline; the third resource is a resource belonging to the first user equipment on the second cloud platform subscribed by the second user equipment; the first resource comprises the third resource; the second user equipment is registered on the second cloud platform;
    and sending the third resource notification message to the second user equipment.
  20. The method of claim 19, wherein the generating a third resource notification message based on the first resource notification message comprises:
    acquiring attribute information of a third resource of the first user equipment subscribed by the second user equipment based on the first resource notification message;
    generating the third resource notification message based on the attribute information of the third resource.
  21. The method of claim 20, wherein the obtaining attribute information of a third resource based on the first resource notification message comprises:
    acquiring attribute information of the first resource from the first resource notification message;
    determining the third resource based on second subscription information; the second subscription information is the subscription condition of the user equipment of the second cloud platform;
    and acquiring attribute information of a third resource corresponding to the third resource from the attribute information of the first resource based on the third resource.
  22. The method according to any one of claims 20 to 21, wherein the second user equipment comprises a plurality of user equipments; the third resource notification message comprises sub-resource notification messages which are in one-to-one correspondence with the plurality of user equipment; the sub-resource notification message carries attribute information of the third resource of each ue.
  23. A device state notification method is applied to first user equipment and comprises the following steps:
    if the first user equipment is online on the first cloud platform, generating a second resource notification message; the second resource is a resource belonging to the first user equipment and subscribed by the first cloud platform; the second resource notification message is used for indicating the state change of the second resource; the second resource comprises a first resource; the first resource is a resource belonging to the first user equipment on the first cloud platform subscribed by the second cloud platform;
    and sending the second resource notification message to the first cloud platform.
  24. The method of claim 23, wherein prior to the generating the second resource notification message, the method further comprises:
    recording the resource change condition of the second resource during the offline period of the first user equipment, and generating resource change record information;
    if the first user equipment is online, acquiring the state information of the second resource from the resource change record information;
    generating the generate second resource notification message based on the status information of the second resource.
  25. The method of claim 24, wherein the recording the resource change condition of the second resource, and the generating resource change record information comprises:
    determining the second resource based on third subscription information; the third subscription information is the situation that the first user equipment is subscribed by the first cloud platform;
    and recording the resource change condition of the second resource, and generating the resource change record information.
  26. The method of claim 24, wherein the obtaining the status information of the second resource from the resource change log information comprises:
    and acquiring the resource change information of the second resource from the resource change record information, and taking the resource change information of the second resource as the state information of the second resource.
  27. The method of claim 24, wherein the obtaining the status information of the second resource from the resource change log information comprises:
    and acquiring the final state of the second resource from the resource change record information, and taking the final state of the second resource as the state information of the second resource.
  28. A first cloud platform, the first cloud platform comprising:
    the generating module is used for generating a first resource notification message if the first user equipment is online on the first cloud platform; the first resource notification message is used for indicating the state change of the corresponding first resource of the first user equipment during offline; the first resource is a resource belonging to the first user equipment on the first cloud platform subscribed by the second cloud platform;
    a sending module, configured to send the first resource notification message to the second cloud platform.
  29. A second cloud platform, the second cloud platform comprising:
    the receiving module is used for receiving a first resource notification message from a first cloud platform; the first resource notification message is used for indicating the state change of the first resource during the offline of the first user equipment; the first resource is a resource belonging to the first user equipment on the first cloud platform subscribed by the second cloud platform; the second cloud platform is in communication with the first cloud platform.
  30. A first user equipment, the first user equipment comprising:
    the generating module is used for generating a second resource notification message if the first user equipment is on line on the first cloud platform; the second resource is a resource belonging to the first user equipment and subscribed by the first cloud platform; the second resource notification message is used for indicating the state change of the second resource; the second resource comprises a first resource; the first resource is a resource belonging to the first user equipment on the first cloud platform subscribed by the second cloud platform;
    a sending module, configured to send the second resource notification message to the first cloud platform.
  31. A first cloud platform, comprising: a memory and a processor, wherein the processor is capable of,
    the memory stores a computer program operable on the processor,
    the processor, when executing the program, implements the steps in the method of any one of claims 1 to 11.
  32. A second cloud platform, comprising: a memory and a processor, wherein the processor is configured to,
    the memory stores a computer program operable on the processor,
    the processor, when executing the program, performs the steps of the method of any one of claims 12 to 22.
  33. A first user equipment, comprising: a memory and a processor, wherein the processor is capable of,
    the memory stores a computer program operable on the processor,
    the processor when executing the program performs the steps of the method of any one of claims 23 to 27.
  34. A storage medium applied to a first cloud platform, storing a computer program which, when executed by one or more first processors, implements the device status notification method according to any one of claims 1 to 11.
  35. A storage medium, for use in a second cloud platform, storing a computer program that, when executed by one or more first processors, implements the method of device status notification according to any one of claims 12 to 22.
  36. A storage medium for use in a first user device, storing a computer program which, when executed by one or more first processors, implements a method of device status notification as claimed in any one of claims 23 to 27.
CN202080099974.3A 2020-06-22 2020-06-22 Device state notification method, cloud platform, user equipment and storage medium Pending CN115428422A (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/097547 WO2021258268A1 (en) 2020-06-22 2020-06-22 Equipment state notification method, cloud platform, user equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115428422A true CN115428422A (en) 2022-12-02

Family

ID=79282619

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202080099974.3A Pending CN115428422A (en) 2020-06-22 2020-06-22 Device state notification method, cloud platform, user equipment and storage medium

Country Status (2)

Country Link
CN (1) CN115428422A (en)
WO (1) WO2021258268A1 (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110137991A1 (en) * 2009-12-01 2011-06-09 Lester Paul Russell Systems and methods for management and collaboration in a private network
US9904720B2 (en) * 2013-09-18 2018-02-27 Facebook, Inc. Generating offline content
CN104639429B (en) * 2015-02-12 2019-06-28 青岛海尔智能家电科技有限公司 A kind of message informing method and device of cloud platform
CN106453648B (en) * 2016-11-29 2020-04-28 海信集团有限公司 Equipment state determination method and device for intelligent household equipment

Also Published As

Publication number Publication date
WO2021258268A1 (en) 2021-12-30

Similar Documents

Publication Publication Date Title
CN109089168B (en) Video sharing method, device and system and storage medium
CN109587044B (en) Group creation and message interaction method and device
CN105025189B (en) The control method of communication system, image processing apparatus and image processing apparatus
US10198238B2 (en) Data transmission method, and relevant device and system
KR102391277B1 (en) Method, apparatus and system for notification
WO2015069735A2 (en) Method and apparatus of providing application program information in mobile terminal device
US20130054635A1 (en) Procuring communication session records
CN108512814B (en) Media data processing method, device and system
TW201242315A (en) Providing a witness service
US20090112926A1 (en) Utilizing Presence Data Associated with a Resource
CN112506670B (en) Multi-node automatic operation and maintenance task processing method, system and storage medium
CN112689202B (en) Live broadcast room message processing method and device, server and storage medium
CN113746722B (en) Information processing method, device, equipment and storage medium
WO2023159879A1 (en) Message processing method and system, storage medium, and electronic device
CN113645304A (en) Data service processing method and related equipment
US20170296928A1 (en) Method and apparatus for storing user data
CN115022318A (en) Message publishing method and system based on micro-service architecture
CN111490931B (en) Session management method, device, session management equipment and storage medium
CN110311794B (en) Social group joining method and device, server and storage medium
CN113315689B (en) Information processing method, system, electronic device and readable storage medium
CN115428422A (en) Device state notification method, cloud platform, user equipment and storage medium
CN102469039A (en) Intelligent network communication system and method
WO2019201111A1 (en) Information processing method, apparatus and device, and computer-readable storage medium
JP2024521097A (en) Live distribution screen display method, live distribution screen display device, computer program, and electronic device
CN114979097A (en) MQTT-based message pushing method and device and electronic equipment

Legal Events

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