Device status notification method, cloud platform, user device and storage medium
By generating and sending resource notification messages when the user device comes online, the problem in the existing technology that status changes cannot be notified in a timely manner while the device is offline is solved, improving the accuracy of the cloud platform in obtaining resource status information and ensuring the reliability of resource management.
Patent Information
- Application Number
- CN202080099974.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-22
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2040-06-22
AI Technical Summary
Existing device status notification methods can only update resource attribute changes on the cloud platform when the user device is online, causing the cloud platform to obtain inaccurate attribute information of subscribed resources. Especially when the device is offline, status changes cannot be notified in time.
Generate and send resource notification messages when the user device comes online, indicating resource status changes during its offline period, and transmit this information to the second cloud platform through the first cloud platform, thereby ensuring that resource status changes during the device's offline period can be detected. Prompt notification.
It improves the accuracy of the cloud platform in obtaining resource status information and ensures that resource status changes can be learned in a timely manner even when the device is offline, thereby enhancing the reliability of resource management.
Smart Images

Figure CN115428422B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of Internet of Things, and in particular to a device status notification method, a cloud platform, a user device and a storage medium. Background Art
[0002] The Internet of Things (IOT) is an important part of the new generation of information technology. After the user device is successfully registered on the cloud platform, the resource information can be published on the registered cloud platform. In order to enable the user device to subscribe to the resources published by the user device on another cloud platform through the registered cloud platform, the connection between cloud platforms (Cloud to Cloud, C2C) is proposed. If the original cloud platform (Original Cloud) subscribes to the resources of the device on the target cloud platform (Target Cloud), the user device will notify the Original Cloud of the changes in the attributes of the subscribed resources through the Target Cloud when it is online. However, when the device is offline, the attributes of its resources will also change. In other words, the current method of device status notification can only enable OriginalCloud to obtain the attribute changes of the user device during the online period, thereby affecting the accuracy of the cloud platform in obtaining the attributes of the subscribed resources. Summary of the invention
[0003] The embodiments of the present application provide a device status notification method, a cloud platform, a user device and a storage medium, which improve the accuracy of the cloud platform in acquiring the status information of subscribed resources.
[0004] The technical solution of the embodiment of the present application can be implemented as follows:
[0005] The present application provides a device status notification method, which is applied to a first cloud platform, and the method includes:
[0006] If the first user device is online on the first cloud platform, a first resource notification message is generated; the first resource notification message is used to indicate the state change of the first resource corresponding to the first user device during the offline period; the first resource is a resource on the first cloud platform subscribed by the second cloud platform and belonging to the first user device; the first resource notification message is sent to the second cloud platform.
[0007] The embodiment of the present application also provides a device status notification method, which is applied to the second cloud platform, and the method includes:
[0008] Receive a first resource notification message from a first cloud platform; the first resource notification message is used to indicate a state change of a first resource during the period when the first user device is offline; the first resource is a resource belonging to the first user device on the first cloud platform subscribed by the second cloud platform.
[0009] The embodiment of the present application further provides a device status notification method, which is applied to a first user device, and the method includes:
[0010] If the first user device is online on the first cloud platform, a second resource notification message is generated; the second resource is a resource that belongs to the first user device and is subscribed to by the first cloud platform; the second resource notification message is used to indicate a state change of the second resource; the second resource includes the first resource; the first resource is a resource that belongs to the first user device and is subscribed to by the second cloud platform;
[0011] The second resource notification message is sent to the first cloud platform.
[0012] The embodiment of the present application provides a first cloud platform, including:
[0013] A generation module, configured to generate a first resource notification message if the first user device is online on the first cloud platform; the first resource notification message is used to indicate a state change of a first resource corresponding to the first user device during an offline period; the first resource is a resource on the first cloud platform subscribed by the second cloud platform and belonging to the first user device;
[0014] A sending module is used to send the first resource notification message to the second cloud platform.
[0015] The embodiment of the present application provides a second cloud platform, including:
[0016] A receiving module, used to receive a first resource notification message from a first cloud platform; the first resource notification message is used to indicate a state change of a first resource during a period when a first user device is offline; the first resource is a resource belonging to the first user device on the first cloud platform subscribed by the second cloud platform.
[0017] An embodiment of the present application provides a first user equipment, including:
[0018] A generation module, configured to generate a second resource notification message if the first user device is online on the first cloud platform; the second resource is a resource that belongs to the first user device and is subscribed to by the first cloud platform; the second resource notification message is used to indicate a state change of the second resource; the second resource includes the first resource; the first resource is a resource that belongs to the first user device and is subscribed to by the second cloud platform;
[0019] A sending module is used to send the second resource notification message to the first cloud platform.
[0020] The embodiment of the present application provides a first cloud platform, including: a memory and a processor,
[0021] The memory stores a computer program executable on the processor.
[0022] When the processor executes the program, the steps in the device status notification method on the first cloud platform side are implemented.
[0023] The embodiment of the present application provides a second cloud platform, including: a memory and a processor,
[0024] The memory stores a computer program executable on the processor.
[0025] When the processor executes the program, the steps in the device status notification method on the second cloud platform side are implemented.
[0026] The embodiment of the present application provides a first user equipment, including: a memory and a processor,
[0027] The memory stores a computer program executable on the processor.
[0028] When the processor executes the program, the steps in the device status notification method on the first user equipment side are implemented.
[0029] An embodiment of the present application provides a storage medium, which is applied to a first cloud platform and stores a computer program. When the computer program is executed by one or more first processors, a device status notification method on the first cloud platform side is implemented.
[0030] An embodiment of the present application provides a storage medium, which is applied to a second cloud platform and stores a computer program. When the computer program is executed by one or more first processors, a device status notification method on the second cloud platform side is implemented.
[0031] An embodiment of the present application provides a storage medium, which is applied to a first user device and stores a computer program. When the computer program is executed by one or more first processors, a device status notification method on the first user device side is implemented.
[0032] The beneficial effects brought by the technical solution provided by the embodiment of the present application include at least:
[0033] A device status notification method, cloud platform, device and storage medium provided in an embodiment of the present application generate a first resource notification message if a first user device is online on a first cloud platform; the first resource notification message is used to indicate a status change of a first resource corresponding to the first user device; the first resource is a resource belonging to the first user device on the first cloud platform subscribed by a second cloud platform; the resource notification message is sent to the second cloud platform; that is, after the first user device is online, the first cloud platform notifies the second cloud platform of the status change of the resource of the first user device subscribed by the second cloud platform, so that even if the resource status of the first user device changes during the offline period, the second cloud platform can obtain the status information of the subscribed first resource through the first resource notification message, thereby improving the accuracy of the cloud platform in obtaining status information. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 A C2C-based Internet of Things system architecture diagram provided in an embodiment of the present application;
[0035] Figure 2 A device status notification method process diagram provided in an embodiment of the present application Figure 1 ;
[0036] Figure 3 A device status notification method process diagram provided in an embodiment of the present application Figure 2 ;
[0037] Figure 4 A device status notification method process diagram provided in an embodiment of the present application Figure 3 ;
[0038] Figure 5 A device status notification method process diagram provided in an embodiment of the present application Figure 4 ;
[0039] Figure 6 A device status notification method process diagram provided in an embodiment of the present application Figure 5 ;
[0040] Figure 7 A device status notification method process diagram provided in an embodiment of the present application Figure 6 ;
[0041] Figure 8 A device status notification method process diagram provided in an embodiment of the present application Figure 7 ;
[0042] Fig. 9 A device status notification method process diagram provided in an embodiment of the present application Figure 8 ;
[0043] Fig.10 A device status notification method process diagram provided in an embodiment of the present application Figure 9 ;
[0044] Fig.11 A device status notification method process diagram provided in an embodiment of the present application Figure 10 ;
[0045] Fig.12 A device status notification method process diagram provided in an embodiment of the present application Figure 10 one;
[0046] Fig.13 A schematic diagram of a process of interaction between a first cloud platform, a second cloud platform, a first user device and a second user device provided in an embodiment of the present application Figure 1 ;
[0047] Fig.14 A schematic diagram of a process of interaction between a first cloud platform, a second cloud platform, a first user device and a second user device provided in an embodiment of the present application Figure 2 ;
[0048] Fig.15 A schematic diagram of a flow chart of interaction between a first cloud platform, a second cloud platform, and a first user device provided in an embodiment of the present application;
[0049] Fig.16 A schematic diagram of the structure of a first cloud platform provided in an embodiment of the present application Figure 1 ;
[0050] Fig.17 A schematic diagram of the structure of a second cloud platform provided in an embodiment of the present application Figure 1 ;
[0051] Fig.18 A schematic diagram of the structure of a first user equipment provided in an embodiment of the present application Figure 1 ;
[0052] Fig.19 A schematic diagram of the structure of a first cloud platform provided in an embodiment of the present application Figure 2 ;
[0053] Fig. 20 A schematic diagram of the structure of a second cloud platform provided in an embodiment of the present application Figure 2 ;
[0054] Fig.21 A schematic diagram of the structure of a first user equipment provided in an embodiment of the present application Figure 2 . DETAILED DESCRIPTION
[0055] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0056] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
[0057] The present application embodiment provides a schematic diagram of a C2C-based Internet of Things system architecture, such as Figure 1 As shown, the Internet of Things system includes a first cloud platform 100, a second cloud platform 200, a first user device 300 and a second user device 400; wherein, the first cloud platform 100 is connected to the first user device, the first cloud platform 100 is connected to the second cloud platform 200, and the second cloud platform 200 is connected to the second user device 400; the first user device 300 is registered on the first cloud platform 100, and the second user device 400 is registered on the second cloud platform.
[0058] Among them, the first cloud platform is used to send the status information of the resources of the first user device subscribed by the second cloud platform to the second cloud platform; the second cloud platform is used to send the status information of the resources of the first user device subscribed by at least one second user device to the corresponding at least one second user device; the first user device is used to send the status information of the subscribed resources on the first user device to the first cloud platform.
[0059] In the application embodiment, the first cloud platform and the second cloud platform need to perform mutual authentication first. After the authentication is passed, a C2C connection can be established between the first cloud platform and the second cloud platform; after the first user device is successfully registered on the first cloud platform, it can obtain an access token allocated by the first cloud platform to the first user device, thereby, the first user device can publish resources on the first cloud platform so that other devices can discover and subscribe; after the second user device is successfully registered on the second cloud platform, it can obtain at least one access token allocated by the second cloud platform, thereby, the second user device can discover the first user device on the first cloud platform through the second cloud platform, and subscribe to the resources of the first user device on the first cloud platform.
[0060] In the embodiment of the present application, the first user equipment and the second user equipment usually belong to the same user, so that the second user equipment can subscribe to the resources of the first user equipment.
[0061] In an embodiment of the present application, the second user device subscribes to the resources of the first user device on the second cloud platform, and then the second cloud platform subscribes to the resources of the first user device on the first cloud platform; finally, the first cloud platform subscribes to the resources of the first user device, thereby enabling the second user device to subscribe to the resources of the first user device.
[0062] It should be noted that the first user device publishes resources by publishing resource information on the first cloud platform; here, the resource information can be the resource itself or a resource link, which is not limited in this embodiment of the present application.
[0063] In an embodiment of the present application, the second cloud platform can discover the resource information published by the first user device on the first cloud platform, and subscribe to the resource information of the first user device, which is equivalent to subscribing to the resources corresponding to the resource information.
[0064] In an embodiment of the present application, based on the C2C connection, the second cloud platform can subscribe to some device status events of the first user device. When these device statuses of the first user device change, a corresponding notification message will be generated by the first cloud platform and sent to the second cloud platform, informing the second cloud platform that the device status event of the first user device to which it has subscribed has occurred.
[0065] Here, the device status events include at least the following events:
[0066] Device resource change event: When a value of a resource of a device changes, a resource change event of the resource is triggered;
[0067] Device registration event: When a device is registered on the cloud platform, a device registration event will be triggered;
[0068] Device deregistration event: When a device is deregistered from the cloud platform, a device deregistration event will be triggered;
[0069] Device online event: When a device goes online on the cloud platform, a device online event will be triggered;
[0070] Device offline event: When a device goes offline on the cloud platform, a device offline event will be triggered;
[0071] Device resource publishing (Publish) event: When a device publishes new resources on the cloud platform, the device Publish event will be triggered;
[0072] Device resource unpublish event: When a user device revokes a published resource on the cloud platform, a device Unpublish event is triggered.
[0073] In an embodiment of the present application, the second user device subscribes to some resources on the first user device, and subscribes to the resource change events of these resources. When the first user device is online, if the attributes of the subscribed resources change, a resource change event will be triggered. As a result, the first cloud platform will generate a corresponding resource change event notification and send the attributes of the resource to the second cloud platform. In other words, one resource change event notification corresponds to one resource.
[0074] For example, user A's mobile phone is registered on the second cloud platform, and user A's desk lamp is registered on the first cloud platform. User A can subscribe to the light brightness of user A's desk lamp through his mobile phone; if the brightness of user A's desk lamp changes during the period when user A's desk lamp is online on the first cloud platform, user A's desk lamp will send the light brightness to the second cloud platform through the first cloud platform, and the second cloud platform will then send the light brightness of user A's desk lamp to user A's mobile phone.
[0075] In an embodiment of the present application, the second cloud platform can subscribe to the device status events of the first user device; wherein, the registration events, deregistration events, online events and offline events of the first user device can be subscribed to by the second cloud platform; the Publish events, Unpublish events, and resource change events of the first user device can be subscribed to by at least one second user device through the second cloud platform.
[0076] In the embodiment of the present application, the second user equipment subscribes to the state change event of the first user equipment through the client.
[0077] Currently, if the second user device subscribes to a certain attribute of a resource on the first user device, and the attribute of the resource changes when the first user device is offline, after the first user device goes online again, the first cloud platform will send an online notification message of the first user device to the second cloud platform. In other words, the second cloud platform does not know that the resource attribute of the first user device has changed while it is offline, which affects the accuracy of the second cloud platform in obtaining the attributes of the subscribed resources.
[0078] The present application embodiment provides a method for notifying a device status, such as Figure 2 As shown, applied to the first cloud platform, the method includes:
[0079] S201. If the first user device is online on the first cloud platform, a first resource notification message is generated; the first resource notification message is used to indicate a state change of the first resource during the period when the first user device is offline; the first resource is a resource belonging to the first user device from the first cloud platform subscribed by the second cloud platform;
[0080] In an embodiment of the present application, the second cloud platform subscribes to the resources on the first cloud platform belonging to the first user device, namely, the first resource. If the state of the first resource changes, the first cloud platform needs to notify the second cloud platform; since the state of the resource may also change during the period from when the first user device is offline on the first cloud platform to when the first user device is online on the first cloud platform, namely, during the period when the first user device is offline, the first cloud platform may generate a first resource notification message after the first user device is online, and the first resource notification message may indicate the state change of the first resource.
[0081] In an embodiment of the present application, a C2C connection is established between the first cloud platform and the second cloud platform, whereby the second cloud platform can discover the first user device on the first cloud platform and subscribe to the first resource of the first user device.
[0082] It should be noted that the resource status information 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 resource status includes but is not limited to the above three.
[0083] Among them, a resource has an identifier and a name, but can have at least one attribute; a change in any attribute of a resource indicates that the state of the resource has changed; wherein the attributes of a resource may include an attribute name and an attribute value, for example, the temperature attribute is expressed as "temp=20℃", wherein "temp" is the attribute name, "20" is the attribute value, and "℃" is the unit of the attribute value.
[0084] In the embodiment of the present application, a change in any one of the states of a resource may indicate a change in the state of the resource.
[0085] S202: Send the first resource notification message to the second cloud platform.
[0086] In an embodiment of the present application, after generating a first resource notification message, the first cloud platform needs to send the first resource notification message to the second cloud platform, and inform the second cloud platform of the status change of the subscribed first resource through the first resource notification message.
[0087] It should be noted that, when the state of the first resource has not changed, the first resource notification message may indicate that the state of the first resource has changed to that the state of the first resource remains unchanged.
[0088] It can be understood that in a device status notification method provided in an embodiment of the present application, after the first user device goes online on the first cloud platform, the first cloud platform indicates the status change of the resources of the first user device subscribed by the second cloud platform to the second cloud platform. In this way, even if the resource status of the first user device changes during the offline period, the second cloud platform can promptly be informed of the status change of the resources on the first user device to which it has subscribed, thereby improving the accuracy of the cloud platform in obtaining status information.
[0089] In some embodiments of the present application, the implementation of generating the first resource notification message in S201 may include:
[0090] S301, obtaining status information of a first resource;
[0091] In an embodiment of the present application, the status information of the first resource is used to characterize the status change of the first resource during the period when the first user device is offline; here, the status information of the first resource can be the final state of the first resource, that is, the status information after the last change among the multiple status information of the first resource that changes during the period when the first user device is offline, that is, the status information before the first user device goes online on the first cloud platform; it can also be the resource change information of the first resource; wherein the resource change information of the first resource includes relevant information of the changes that occurred in the first resource during the offline period, for example, all status information of the first resource that changes during the period when the first user device is offline, or can also include the time corresponding to each status information, etc., and the embodiment of the present application does not limit this.
[0092] It should be noted that the first cloud platform can obtain different status information for each resource in the first resource.
[0093] Exemplarily, the first resource includes resource a and resource b. The first cloud platform can obtain the final state of resource a after the change during the first user device is offline, as well as all states of resource b after the change during the first user device is offline. In this way, the state information of resource a and resource b in the first resource is different.
[0094] In the embodiment of the present application, the first resource is a resource of the first user device, and therefore, the first cloud platform obtains the status information of the first resource from the first user device.
[0095] Here, the first cloud platform can obtain the status information of all resources on the first user device from the first user device, and then determine the status information of the first resource therefrom; it can also directly obtain the status information of the first resource from the first user device; the specific acquisition method can be set as needed, and the embodiments of the present application are not limited to this.
[0096] S302: Generate the first resource notification message based on the status information of the first resource.
[0097] In an embodiment of the present application, the first resource may include at least one resource; the first cloud platform may generate a corresponding first resource notification message for each resource, and indicate the status change of each corresponding resource through each first resource notification message; or it may generate a resource notification message, and indicate the status change of all resources in the first resource through this first resource notification message, and the embodiment of the present application is not limited to this.
[0098] In an embodiment of the present application, the first cloud platform generates a first resource notification message based on the status information of the first resource, and indicates the status change of the first resource through the first resource notification message.
[0099] In some embodiments of the present application, the first cloud platform may also directly indicate the status 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 the resource change trend of the first resource based on the status information of the first resource, and indicate the status change trend of the first resource through the preset first notification message.
[0100] In some embodiments of the present application, the first cloud platform may indicate the status change of the first resource through the information carried in the first resource notification message. Here, the information carried in the first resource notification message may be the status information of the first resource itself, or it may be the processing result obtained after processing the status information of the first resource; for example, the resource change trend of the first resource.
[0101] Here, the embodiment of the present application does not limit the manner of generating the first resource notification message based on the status information of the first resource.
[0102] In some embodiments of the present application, the implementation of generating the first resource notification message in S201 may include:
[0103] S401, determining a first resource subscribed by a second cloud platform in a first user device;
[0104] In an embodiment of the present application, if the first user device is online, the first cloud platform first determines the first resource, and then obtains only the status information of the first resource from the first user device for the first resource, thereby reducing the amount of information obtained by the first cloud platform and reducing system consumption.
[0105] S402: Acquire attribute information of a first resource from a first user equipment, where the attribute information of the first resource represents state information of the first resource;
[0106] In an embodiment of the present application, after determining the first resource, the first cloud platform obtains attribute information of the first resource from the first user device, and represents state information of the first resource through the attribute information of the first resource.
[0107] It should be noted that the attribute information of the first resource can be the attribute value of the first resource or the attribute change information of the first resource; wherein the first resource attribute value is the current attribute value of the first resource after the first user device goes online; the first resource attribute change information is used to characterize the attribute change process of the first resource during the period when the first user device is offline.
[0108] In an embodiment of the present application, the attribute change information of the first resource may include the attribute value of each change of the first resource attribute; it may also include an initial attribute value and a final attribute value; wherein these attribute values may be arranged in chronological order; based on this, the attribute change information of the first resource may also include the change time corresponding to these attribute values; and it may include information about the resource to which the attribute belongs, such as the name of the resource, etc.; the embodiment of the present application does not limit the setting of the attribute change information.
[0109] In an embodiment of the present application, the attribute information of the first resource may be the attribute information of all attributes of the first resource; it may also be the attribute information of all attributes of resources whose attributes have changed in the first resource; it may also be the changed attribute information of resources whose attributes have changed in the first resource, and the embodiment of the present application does not impose any restrictions on this.
[0110] Exemplarily, the first resource is resource a; resource a includes attribute a1 and attribute a2, and the attribute value of a1 changes during the period when the first user device is offline: from 10 to 15, and then from 15 to 20. The attribute value of attribute a2 is 10, and there is no change during the period when the first user device is offline; then after the first user device 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; then the attribute information of the first resource can be the attribute value 20 of attribute a1 of resource a and the attribute value 10 of attribute a2; it can also be the attribute value 20 of attribute a1 of resource a; it can also be the attribute change information (10, 15, 20) of attribute a1 of resource a and the attribute change information 10 of attribute a2; it can also be the attribute change information (10, 15, 20) of attribute a1 of resource a and the attribute change information 10 of attribute a2; it can also be the attribute change information (10, 15, 20) of resource a.
[0111] In an embodiment of the present application, the first cloud platform can send a first resource request to the first user device based on the first resource, requesting attribute information of the first resource from the first user device; and receive attribute information of the first resource from the first user device based on the first resource request.
[0112] In an embodiment of the present application, the first resource request may include identification information of the first resource. In this way, after the first user device receives the first resource request, it can determine the first resource based on the identification information of the first resource and obtain attribute information of the first resource from all resources of the first user device.
[0113] Here, the identification information of the first resource may include a resource name of the first resource and / or an identifier of the first resource; wherein the identifier of the resource is represented by a uniform resource identifier (URI).
[0114] The present application embodiment provides a device status notification method, such as Figure 3 As shown, the method may include:
[0115] S501. If a first user equipment is online, generating an online notification message of the first user equipment;
[0116] S502, sending an online notification message of the first user device to the second cloud platform;
[0117] In an embodiment of the present application, the first cloud platform subscribes to the online events and resource change events of the first user device. After the first user device goes online, the first cloud platform generates an online notification message for the first user device and sends the online notification message of the first user device to the second cloud platform.
[0118] S503: Determine a first resource in the first user device that is subscribed to by the second cloud platform;
[0119] S504: Acquire attribute information of a first resource from a first user equipment, where the attribute information of the first resource represents state information of the first resource;
[0120] In the embodiment of the present application, the implementation of S503-S504 is consistent with S401-S402, and will not be repeated here.
[0121] S505: Generate 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;
[0122] In an embodiment of the present application, after the first cloud platform generates an online notification message for the first user device and sends the notification message of the first user device to the second cloud platform, it can generate an event notification message corresponding to each resource based on the resource change events subscribed to each resource in the first resource; the attribute information of each resource is carried in the corresponding event notification message, and these event notification messages are first resource notification messages.
[0123] Exemplarily, the second cloud platform requests the first cloud platform to subscribe to resource a on device 1 and resource b on device 2. For resource a on device 1 and resource b on device 2, the second cloud platform generates event notification message 1 and event notification message 2, carrying attribute information of resource a of device 1 in event notification message 1 and attribute information of resource b of device 2 in event notification message 2. In this way, when the second cloud platform receives event notification message 1, it obtains attribute information of resource a of device 1, thereby determining changes in attributes of resource a of device 1; when the second cloud platform receives event notification message 2, it obtains attribute information of resource b of device 2 from event notification message 2, thereby determining changes in attributes of resource b of device 2.
[0124] In some embodiments of the present application, the first cloud platform can determine the resources whose attributes have changed from the resource attributes of the first resource, and generate corresponding event notification messages for each of these resources; the resource attributes of these resources are respectively carried in the corresponding event notification messages, and these corresponding event notification messages are collectively used as the first resource notification message.
[0125] In some embodiments of the present application, the event notification message may also carry the device identifier of the device to which the corresponding resource belongs, so that after receiving the event notification message, the second cloud platform can determine the device to which the resource carried in the event notification message belongs based on the device identifier.
[0126] S506: Send the first resource notification message to the second cloud platform.
[0127] In an embodiment of the present application, after the first cloud platform generates a corresponding event notification message for each resource, each event notification message is sent to the second cloud platform respectively.
[0128] It can be understood that the first cloud platform generates a corresponding event notification message for each resource in the first resource in response to the subscribed resource change event, carries the attribute information of the corresponding resource in the event notification message, and indicates the attribute change of a corresponding resource through an event notification message, thereby reducing the complexity of carrying the attribute information in the information and improving the generation efficiency of the first resource notification message.
[0129] The present application embodiment provides a device status notification method, such as Figure 4 As shown, the method may include:
[0130] S601: If the first user equipment is online, generate an online notification message of the first user equipment;
[0131] S602: Determine a first resource in a first user device that is subscribed to by a second cloud platform;
[0132] S603: Acquire attribute information of a first resource from a first user equipment, where the attribute information of the first resource represents state information of the first resource;
[0133] In the embodiment of the present application, the implementation of S602-S603 is consistent with S401-S402, and will not be repeated here.
[0134] S604: Carry the attribute information of the first resource in an online notification message of the first user equipment to obtain a first resource notification message.
[0135] S605: Send the first resource notification message to the second cloud platform.
[0136] In an embodiment of the present application, the second cloud platform subscribes to the online events and resource change events of the first user device. After the first user device goes online, the first cloud platform can generate an online notification message for the first user device corresponding to the online event, and send the online notification message of the first user device to the second cloud platform to indicate that the first user device is online.
[0137] The online notification message of the first user device carries the device identifier and the device online identifier of the first user device, and the second cloud platform determines that the first user device is online through the device identifier and the device online identifier.
[0138] In some embodiments of the present application, the first cloud platform can determine the resources whose attributes have changed from the first resource attribute information, carry the attribute information of these resources in the online notification message of the first user device, and then send the online notification message of the first user device to the second cloud platform.
[0139] It should be noted that the online notification message carries a carrying identifier, and the carrying identifier is used to indicate that the online notification message carries attribute information of the first resource.
[0140] In some embodiments of the present application, the attribute information of the first resource may be carried in a preset field.
[0141] Here, the preset field may be a links field; the first cloud platform may carry resource attributes of the first resource in the links field.
[0142] Among them, the resource attributes of each resource in the first resource can be stored separately in the links field; for example, the attribute information of the resource can be stored under the resource name of each resource, so that after the second cloud platform receives the online notification message, it can identify the attributes of each resource from the links field.
[0143] It can be understood that after the first user device comes online, the first cloud platform indicates the online status of the first user device through the online notification message of the first user device, and also indicates the attribute change of the first resource; that is, the first cloud platform can directly carry the attribute information of the first resource in the online notification message of the first user device, thereby reducing the resource consumption of the first cloud platform in generating and sending the first resource notification message.
[0144] In some embodiments of the present application, the implementation of obtaining the state information of the first resource in S301 may include:
[0145] S701, based on first subscription information, determine that the second cloud platform subscribes to information about the first user device; the first subscription information is a situation in which the device on the first cloud platform is subscribed;
[0146] In an embodiment of the present application, first subscription information is saved on the first cloud platform, and the first subscription information includes the situation in which the device of the first cloud platform is subscribed; here, the situation in which the device of the first cloud platform is subscribed includes the information of all device status events subscribed by the device on the first cloud platform; based on the first subscription information, the first cloud platform can determine the information that the second cloud platform is subscribed to the first user device, that is, the information of the device status events subscribed on the first user device.
[0147] S702. Determine a first resource based on information about the first user device subscribed by the second cloud platform; the first resource is a resource corresponding to a resource change event of the first user device subscribed by the second cloud platform.
[0148] In an embodiment of the present application, the first cloud platform can further determine the information of the resource change event in the device status event of the first user device based on the information that the second cloud platform subscribes to the first user device; the information of the resource change event of the first user device includes the resource information subscribed by the first user device.
[0149] In some embodiments of the present application, the first subscription information may be a first subscription list, which may include: user identification, subscription type, subscription target and subscription expiration time; wherein the user identification indicates the user who subscribes to the device status event; the subscription type indicates the type of the device status event; the subscription target indicates the device that subscribes to the device status event, and the subscription expiration time indicates the time range for subscribing to the device status event, and the subscription expiration time indicates the time range for subscribing to the device status event, and the subscription is canceled if the time range is exceeded.
[0150] It should be noted that, if the subscription type is a resource change event, the subscription target represents a device that subscribes to the resource change event and the resource subscribed by the device.
[0151] Among them, the subscription targets 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 certain device, which can be represented by a device identifier and a resource identifier, for example, "device ID+Resource URI".
[0152] Exemplarily, if all devices belonging to user A on the first cloud platform are subscribed to device online events, the user identifier recorded in the first subscription table is A, the subscription type is device online events, and the subscription target is all devices.
[0153] In some embodiments of the present application, the first subscription list may also include subscriber information, and the subscribers may include the second cloud platform, the first cloud platform itself, and user devices registered on the first cloud platform.
[0154] In an embodiment of the present application, the first cloud platform determines all subscription types of the first user device based on the device ID of the first user device included in the subscription target in the first subscription list, and then determines the URI of the resource in the subscription target corresponding to the resource change event from all subscription types to obtain the URI of each resource in the first resource.
[0155] In an embodiment of the present application, the first cloud platform obtains the URI of each resource in the first resource, and obtains attribute information of the resource corresponding to the resource identifier from the first user device based on the URI of each resource, that is, the attribute information of the first resource.
[0156] It is understandable that the first cloud platform can first determine the resource identifier of the first resource through the first subscription list, and obtain the attribute information of the resource corresponding to the resource identifier of the first resource, that is, the attribute information of the first resource, from the first user device based on the resource identifier of the first resource.
[0157] In some embodiments of the present application, the implementation of obtaining the state information of the first resource in S301 may include:
[0158] S801, receiving a second resource notification message reported by a first user device; the second resource notification message carries status information of a second resource; the second resource is a resource belonging to the first user device subscribed by the first cloud platform; the second resource includes the first resource;
[0159] In an embodiment of the present application, the first cloud platform can subscribe to the resource information of the resources published by the first user device on the first cloud platform, thereby realizing the subscription of the resources belonging to the first user device; wherein the second resource is the resource belonging to the first user device subscribed by the first cloud platform.
[0160] In an embodiment of the present application, after the first user device goes online, the first cloud platform can receive a second resource notification message, and the second resource notification message carries status information of the second resource. Therefore, the second cloud platform can obtain the status information of the second resource based on the second resource notification message.
[0161] The second resources are resources of the first user device subscribed by the first cloud platform, and these resources include the first resources, and may also include resources of the first user device subscribed by other user devices on the first cloud platform.
[0162] In some embodiments of the present application, the state information of the second resource may be the final state of the second resource.
[0163] In the embodiment of the present application, the final state of the second resource is state information of the second resource after the last change among multiple changes during the period when the first user equipment is offline.
[0164] In some embodiments of the present application, the state information of the second resource may be resource change information of the second resource.
[0165] In an embodiment of the present application, the resource change information of the second resource includes relevant information about changes that occurred in the second resource during the offline period, for example, all status information of changes that occurred in the second resource during the offline period of the first user device, or may also include the time corresponding to each status information, etc., which is not limited by the embodiment of the present application.
[0166] S802: Acquire status information of the first resource based on the status information of the second resource;
[0167] In an embodiment of the present application, after the first cloud platform receives the second resource notification message, it obtains the status information of the second resource from the second resource notification message; since the second resource may not only include the first resource, it is necessary to determine the first resource, and then based on the first resource, determine the status information of the first resource from the status information of the second resource.
[0168] In some embodiments of the present application, the state information of the second resource is the final state of the second resource.
[0169] In the embodiment of the present application, the second resource may change multiple times while the first user equipment is offline, each change corresponds to a state, and the final state of the second resource is the state after the last change.
[0170] In some embodiments of the present application, the state information of the second resource is resource change information of the second resource.
[0171] In an embodiment of the present application, the second resource may change multiple times while the first user equipment is offline, each change corresponds to a state, and the resource change information of the second resource may include information of each change of the second resource.
[0172] The information of each change may include the status information corresponding to each change, and may also include the time when each change occurs, etc., which is not limited by the embodiments of the present application.
[0173] The present application embodiment provides a device status notification method, such as Figure 5 As shown, the method may include:
[0174] S901. If a first user equipment is online, generate an online notification message of the first user equipment;
[0175] S902, sending an online notification message of the first user equipment to the second cloud platform;
[0176] S903, receiving a second resource notification message reported by the first user device; the second resource notification message carries status information of the second resource; the second resource is a resource belonging to the first user device subscribed by the first cloud platform; the second resource includes the first resource;
[0177] In an embodiment of the present application, the first cloud platform subscribes to the online event and resource change event of the first user device. After the first user device goes online, the first cloud platform generates an online notification message for the first user device, sends the online notification message of the first user device to the second cloud platform, and then receives the second resource notification message reported by the first user device.
[0178] S904: Determine a first resource in the first user device that is subscribed to by the second cloud platform;
[0179] In an embodiment of the present application, the first cloud platform may determine the first resource based on the first subscription information as described in S701-S702, and then obtain the status information corresponding to the first resource from the status information of the second resource as the status information of the first resource.
[0180] S905. Based on the status information of the second resource, obtain the attribute information of the first resource; the attribute information of the first resource is the status information of the first resource;
[0181] In an embodiment of the present application, after determining the first resource, the first cloud platform can obtain attribute information of the first resource from the status information of the second resource carried in the second resource notification message, and use the attribute information of the first resource as the status information of the first resource.
[0182] S906. 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 attribute information of the first resource; the event notification message is a first resource notification message;
[0183] It should be noted that after receiving the second resource notification message, the first cloud platform can first obtain the attribute information of the first resource; then generate an event notification message for the resource change event corresponding to the first resource, and finally carry the attribute information of the corresponding resource in each event notification message; or first generate an event notification message for the resource change event corresponding to the first resource, then obtain the attribute information of the first resource, and finally carry the attribute information of the corresponding resource in each event notification message; this is not limited to the embodiments of the present application.
[0184] S907. Send the first resource notification message to the second cloud platform.
[0185] It is understandable that if the first user device comes online, the first cloud platform will receive the status information of the second resource actively reported by the first user device, then the first cloud platform can obtain the status information of the first resource from the status information of the second resource, thereby reducing the interaction process between the first cloud platform and the first user platform in the process of obtaining the status information of the first resource, and improving the efficiency of obtaining the status information of the first resource.
[0186] The embodiment of the present application provides a device status notification method, which is applied to a second cloud platform, and the method includes:
[0187] S1001. Receive a first resource notification message from a first cloud platform; the first resource notification message is used to indicate a state change of a first resource during a period when a first user device is offline; the first resource is a resource belonging to a first user device on the first cloud platform subscribed by a second cloud platform; the second cloud platform communicates with the first cloud platform.
[0188] In an embodiment of the present application, if the second cloud platform subscribes to the first resource belonging to the first user device on the first cloud platform; then the second cloud platform will receive the first resource notification message from the first cloud platform, and the second cloud platform can learn about the status change of the first resource during the period when the first user device is offline through the first resource notification message.
[0189] Here, a 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 device on the first cloud platform and subscribe to the first resource from the first user device.
[0190] 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.
[0191] In an embodiment of the present application, the second cloud platform can determine the attribute changes of the first resource during the period when the first user device is offline based on the attribute information of the first resource carried in the first resource notification message, thereby determining the status information changes of the first resource.
[0192] The present application embodiment provides a device status notification method, such as Figure 6 As shown, the method may include:
[0193] S1101, receiving an online notification message from a first user device of a first cloud platform;
[0194] In an embodiment of the present application, the second cloud platform subscribes to the online event of the first user device and the resource change event of the first resource. After the first user device goes online, the second cloud platform can receive the online notification message of the first user device.
[0195] S1102. If the online notification message of the first user device does not carry a carrying identifier, an event notification message of a resource change event corresponding to the first resource is received from the first cloud platform; the carrying identifier is used to represent the attribute information of the first resource carried in the online notification message.
[0196] In an embodiment of the present application, the second cloud platform subscribes to a resource on a certain device and subscribes to the resource change event of the resource. The second cloud platform can receive event notification messages corresponding to the resource change event. These event notification messages corresponding to the resource change event are first resource notification messages.
[0197] Among them, an event notification message carries attribute information of a corresponding resource.
[0198] In an embodiment of the present application, the online notification message of the first user device may carry a carrying identifier. If it carries the carrying identifier, it indicates that the online notification message of the first user device carries attribute information of the first resource; if it does not carry the carrying identifier, the first cloud platform will receive the first resource notification message, and the first resource notification message carries the attribute information of the first resource.
[0199] In an embodiment of the present application, the second cloud platform receives an event notification message and can obtain attribute information of a corresponding resource. Based on the attribute information of the resource, the attribute change of the resource can be known.
[0200] The present application embodiment provides a device status notification method, such as Figure 7 As shown, the method may include:
[0201] S1201, receiving an online notification message from a first user device of a first cloud platform;
[0202] S1202: If the online notification message carries a carrying identifier, use the online notification message as the first resource notification message.
[0203] In an embodiment of the present application, if the online notification message of the first user device carries a carrying identifier, then the second cloud platform receiving the online notification message is equivalent to receiving the first resource notification message.
[0204] In an embodiment of the present application, the online notification message of the first user device carries the device identifier of the first user device, and the device identifier indicates which device is online; that is, after the second cloud platform receives the online notification message, it can query the device identifier carried in the online notification message to determine which device is online.
[0205] In some embodiments of the present application, the attribute information of the first resource is carried in the online notification message via a preset field.
[0206] Here, the preset field may be a links field; the second cloud platform may receive attributes of each resource in the links field according to different resources in the first resource.
[0207] In an embodiment of the present application, the second cloud platform can determine whether the online notification message carries the attribute information of the first resource by whether the online notification message contains a links identifier.
[0208] In some embodiments of the present application, after receiving the first resource notification message from the first cloud platform in S1001, such as Figure 8 As shown, the method may also include:
[0209] S1002, based on the first resource notification message, generating a third resource notification message; the third resource notification message is used to indicate the attribute change of the third resource corresponding to the first user equipment during the offline period; the third resource is a resource belonging to the first user equipment subscribed by the second user equipment on the second cloud platform; the first resource includes the third resource; the second user equipment is registered on the second cloud platform;
[0210] In an embodiment of the present application, the second user device is registered on the second cloud platform, and the second cloud platform and the first cloud platform establish a C2C connection. The second user device can discover the first user device of the first cloud platform, and the second user device can subscribe to the resources of the first user device through the second cloud platform. In other words, the first resources may include the resources of the first user device subscribed by the second user device, that is, the third resources; therefore, the second cloud platform needs to inform the second user device of the attribute changes of the third resource.
[0211] In an embodiment of the present application, after receiving the first notification message, the second cloud platform can obtain the attribute information of the first resource, and then confirm the attribute information of the third resource subscribed by the second user device, generate a third resource notification message based on the attribute information of the third resource, and indicate the status change of the third resource through the third resource notification message.
[0212] In some embodiments of the present application, the third resource notification message may be a message in the first resource notification message. The second cloud platform identifies the event notification message corresponding to the third resource from the event notification message of each resource in the first resource, and uses the event notification message corresponding to the third resource as the third resource notification message.
[0213] In some embodiments of the present application, the second cloud platform can also identify resources whose attributes have changed from the event notification messages corresponding to the third resources, and select the event notification messages corresponding to these resources from the event notification messages corresponding to the third resources as the third resource notification messages.
[0214] S1003: Send a third resource notification message to the second user equipment.
[0215] In an embodiment of the present application, after generating the third resource notification message, the second cloud platform sends the third resource notification message to the second user device, indicating the attribute change of the third resource during the period when the first user device is offline.
[0216] In some embodiments of the present application, the implementation of generating the third resource notification message based on the first resource notification message in S1002 may include:
[0217] S1301. Acquire attribute information of a third resource of a first user equipment subscribed by a second user equipment based on a first resource notification message;
[0218] In an embodiment of the present application, after receiving the first resource notification message, the second cloud platform can obtain the attribute information of the first resource; then, the second cloud platform can determine the attribute information corresponding to the third resource from the first resource attribute information as the third resource attribute information; or the second cloud platform can select the attribute information of the resource whose attributes have changed from the attribute information corresponding to the third resource as the third resource attribute information, and the embodiment of the present application does not impose any restrictions on this.
[0219] S1302: Generate a third resource notification message based on the attribute information of the third resource.
[0220] In an embodiment of the present application, after the second cloud platform determines the attribute information of the third resource, it 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 device.
[0221] In some embodiments of the present application, the second cloud platform generates an event notification message of a resource change event corresponding to the third resource for the third resource; carries the attribute information of the third resource in the event notification message to obtain a third resource notification message.
[0222] In an embodiment of the present application, the second user device may subscribe to multiple resources on the first user device; that is, the third resources may include at least one resource; the second cloud platform can 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 message, and these corresponding event notification messages serve as third resource notification messages.
[0223] In some embodiments of the present application, the second cloud platform can determine the resources whose attributes have changed from the attribute information of the third resource, and generate a corresponding event notification message for each of these resources; the resource attributes of these resources are respectively carried in the corresponding event notification messages, and these corresponding event notification messages are collectively used as the third resource notification message.
[0224] 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.
[0225] It can be understood that the second cloud platform carries the attribute information of a corresponding resource in each event notification message, and indicates the attribute change of a corresponding resource through an event notification message, thereby reducing the complexity of carrying attribute information in the information and improving the generation efficiency of the third resource notification message.
[0226] In an embodiment of the present application, after the second cloud platform generates a third resource notification message, it can send each event notification message of the third resource notification message to the second user device separately, or it can send these event notification messages to the second user device together. This embodiment of the present application does not impose any restrictions on this.
[0227] The second user equipment includes multiple user equipments; the third resource notification message includes sub-resource notification messages corresponding to the multiple user equipments one by one; and the sub-resource notification message carries attribute information of the third resource of each user equipment.
[0228] In some embodiments of the present application, in S1301, based on the first resource notification message, the attribute information of the third resource of the first user equipment subscribed by the second user equipment is obtained, such as Fig. 9 As shown, the method may include:
[0229] S13011. Obtain first resource attribute information from a first resource notification message;
[0230] S13012. Determine a third resource based on the second subscription information; the second subscription information is a subscription of the second user equipment;
[0231] In an embodiment of the present application, after the second cloud platform obtains the attribute information of the first resource from the first resource notification message, it needs to obtain the attribute information of the third resource from the attribute information of the first resource, and then it needs to determine which resources in the first resource are the resources subscribed by the second user device, that is, the third resources.
[0232] In an embodiment of the present application, second subscription information is saved on the second cloud platform, and the second subscription information includes the device subscription status of the second cloud platform; here, the device subscription status of the second cloud platform is the information of all device status events subscribed by user devices on the second cloud platform; based on the second subscription information, the second cloud platform can determine the information of all devices subscribed by each second user device in the user devices on the second cloud platform, that is, the information of all device status events, and then further determine the information of resource change events in the device status events subscribed by the second user device; the information of the resource change events of the second user device includes the resource information subscribed by the first user device.
[0233] In some embodiments of the present application, the second subscription information may be a second subscription list, which may include: user identification, subscriber, subscription type, subscription target and subscription expiration time; wherein the user identification indicates the user who subscribes to the device status event; the subscription type indicates the type of the device status event; the subscription target indicates the device that subscribes to the device status event, and the subscription expiration time indicates the time range for subscribing to the device status event, and the subscription expiration time indicates the time range for subscribing to the device status event, and the subscription is canceled if the time range is exceeded.
[0234] The contents represented by the user identifier, subscription type, subscription target and subscription expiration time are the same as those in the first subscription list in the first cloud platform; the subscriber represents the subscriber of the corresponding device status event.
[0235] In an embodiment of the present application, the second cloud platform determines the resource change events subscribed to by the second user device based on the subscribers in the second subscription list, and then searches for the device identifier of the first user device from the subscription targets corresponding to these resource change events, and determines the resource identifier corresponding to the device identifier of the first user device in the subscription target as the resource identifier of the third resource, which is equivalent to determining the third resource.
[0236] S13013. Based on the first resource, obtain attribute information of a third resource corresponding to the third resource from the attribute information of the first resource.
[0237] In an embodiment of the present application, after determining the third resource, the second cloud platform can find the attribute information corresponding to the third resource from the attribute information of the first resource, thereby obtaining the attribute information of the third resource.
[0238] In some implementations of the present application, the second user equipment includes multiple user equipment; the third resource notification message includes sub-resource notification messages corresponding to the multiple user equipment; the sub-resource notification message carries attribute information of the third resource of each user equipment.
[0239] In an embodiment of the present application, the second cloud platform generates a corresponding sub-resource notification message for each second user device, and sends each sub-resource notification message to each corresponding second user device.
[0240] The present application embodiment provides a device status notification method, which is applied to a first user device, such as Fig.10 As shown, the method includes:
[0241] S1401. If the first user device is online on the first cloud platform, a second resource notification message is generated; the second resource is a resource belonging to the first user device subscribed by the first cloud platform; the second resource notification message is used to indicate a state change of the second resource; the second resource includes the first resource; the first resource is a resource belonging to the first user device on the first cloud platform subscribed by the second cloud platform;
[0242] S1402. Send the second resource notification message to the first cloud platform.
[0243] In an embodiment of the present application, after the first user device is registered on the first cloud platform, it can publish resource information on the first cloud platform, thereby publishing resources; here, the resource information can be the resource itself or a resource link, and the embodiment of the present application does not limit this.
[0244] In the embodiment of the present application, when the first cloud platform subscribes to the resource information corresponding to the second resource, it subscribes to the second resource; when the second cloud platform subscribes to the resource information corresponding to the first resource, it subscribes to the first resource.
[0245] Here, the second resource is a resource subscribed by the first cloud platform; since the first resource of the first user device subscribed by the second cloud platform is also subscribed by the first cloud platform, the second resource includes the first resource.
[0246] In an embodiment of the present application, after the first user device goes online on the first cloud platform, a second resource notification message is generated for the second resource subscribed on the first user device, and the state change of the second resource is indicated by the second resource notification message.
[0247] In some embodiments of the present application, the first user equipment generates a corresponding second event notification message for each resource among all subscribed resources, and indicates a state change of a corresponding resource in the second resources through the second event notification message.
[0248] In an embodiment of the present application, the second resource is the information of the first user device subscribed by the first cloud platform, including the resources of the first user device subscribed by the second cloud platform through the first cloud platform, that is, the first resource; therefore, the second resource notification message can indicate the resource change of the first resource.
[0249] In an embodiment of the present application, after the first user device generates the second resource notification message, the second resource notification message is sent to the first cloud platform.
[0250] In some embodiments of the present application, if the first user device is online on the first cloud platform in S1401, before generating the second resource notification message, such as Fig.11 As shown, the method may also include:
[0251] S14011. The first user equipment records resource changes of the second resource during an offline period and generates resource change record information;
[0252] In the embodiment of the present application, once the first user equipment is 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.
[0253] In some embodiments of the present application, in S14011, the first user equipment records the resource change of the second resource during the offline period, and generates the resource change record information, such as Fig.12 As shown, the method may include:
[0254] S14011a. Determine a second resource based on third subscription information; the third subscription information is a situation in which the first user device is subscribed by the first cloud platform;
[0255] S14011b. Record resource changes of the second resource and generate resource change record information.
[0256] In an embodiment of the present application, only a portion of the resources on the first user device may be subscribed to the first cloud platform. Therefore, the third subscription information can be saved on the first user device; the third subscription information is the situation in which the first user device is subscribed to the first cloud platform.
[0257] Here, the third subscription information may be a third subscription list, which may include a subscription type, a subscription target, and an expiration time; according to the third subscription list, the first user equipment determines the second resource from the subscription target corresponding to the resource change event whose subscription type is a resource change event.
[0258] In an embodiment of the present application, a resource record list is provided in the first user device for recording the subscription status of the first user device; wherein the resource record list may include a subscription type, a resource status, a subscribed resource and an occurrence time; wherein the subscribed resource indicates a resource subscribed on the first user device when the device status event is a resource change event, that is, a second resource; the resource status indicates the current status of the resource in the subscription target when the subscription type is a resource change event; the current status is recorded once each time the resource status changes; and the occurrence time indicates the time when the resource change occurs.
[0259] In some embodiments of the present application, after generating the resource change record information, the first user equipment may record it in a resource record list.
[0260] S14012. If the first user device is online, obtain status information of the second resource from the resource change information;
[0261] S14013. Generate a second resource notification message based on the status information of the second resource.
[0262] In the embodiment of the present application, if the first user equipment is online, the first user equipment obtains the status information of the second resource from the resource record list.
[0263] Here, what kind of state information of the second resource the first user equipment obtains is determined by the reporting policy; that is, the first user equipment determines what kind of state information of the second resource to be obtained based on the reporting policy.
[0264] In some embodiments of the present application, if the reporting strategy of the second resource is detailed reporting, 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 status information of the second resource.
[0265] In some embodiments of the present application, if the reporting strategy 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.
[0266] The final state of the second resource is the state information of the second resource last recorded in the resource record table.
[0267] In some embodiments of the present application, the state information of the second resource includes attribute information of the second resource.
[0268] It can be understood that after the first user device comes online, the first user device actively reports the status information of the second resource, which reduces the interaction process between the first cloud platform and the first user device and improves the efficiency of the first user device in indicating changes in the first status information; and, the first user device records the change process of the subscribed second resource during the offline period, so that the first user device can not only report the final state of the second resource, but also report the change process of the second resource, so that richer information can be indicated through the status information of the second resource.
[0269] The present application embodiment provides a device status notification method, which is applied to the interaction between a first cloud platform, a second cloud platform, a first user device and a second user device, such as Fig.13 As shown, the method includes:
[0270] S1501. If the first user device is online, the first cloud platform generates an online notification message for the first user device;
[0271] S1502, the first cloud platform sends an online notification message of the first user device to the second cloud platform;
[0272] S1503: The first cloud platform determines, based on the first subscription information, that the second cloud platform subscribes to the subscription information of the first user device; the first subscription list is a situation in which the device on the first cloud platform is subscribed;
[0273] S1504. The first cloud platform determines a first resource based on the subscription information of the first user device subscribed by the second cloud platform; the first resource is a resource for which the resource change event of the first user device is subscribed by the second cloud platform;
[0274] S1505. The first cloud platform sends a resource subscription request to the first user device to request an attribute value of the first resource;
[0275] S1506. The first user device sends the attribute value of the first resource to the first cloud platform based on the resource subscription request;
[0276] S1507. 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; 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;
[0277] S1508. The first cloud platform sends the first resource notification message to the second cloud platform;
[0278] Exemplarily, the second cloud platform subscribes to the registration events, deregistration events, online events, offline events of all devices of a user on the first cloud platform, as well as the publish resource events and unpublish event resources of the first user's devices among these devices, and the attribute change events of the resources; then when the first user's device goes online again after being offline, an online notification message for the first user's device will be generated.
[0279] The first cloud platform queries the first subscription list whether the second cloud platform has subscribed to the attribute change event of the first user device. If so, after the first user device comes online, the first cloud platform checks the first subscription list based on the device identifier of the first user device, and determines from the first subscription list the resources subscribed by the second cloud platform belonging to the first user device, namely, the first resources.
[0280] After the first cloud platform determines the first resource, it obtains the final attribute value of the first resource from the first user device, generates a corresponding attribute change event notification message for each resource in the first resource, carries the final attribute value of the corresponding resource in each attribute change notification message, and then sends each attribute change notification message to the second cloud platform.
[0281] S1509. The second cloud platform obtains the attribute value of the first resource based on the first resource notification message;
[0282] In an embodiment of the present application, after receiving these event notification messages, the second cloud platform will obtain the attribute information of the corresponding resource carried in each event notification message, thereby obtaining the attribute information of the first resource.
[0283] 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 device on the second cloud platform subscribed by the second user device;
[0284] S1511. The second cloud platform obtains an attribute value of a third resource corresponding to the third resource from the attribute value of the first resource based on the third resource;
[0285] S1512. The second cloud platform generates a third resource notification message based on the attribute value of the third resource;
[0286] S1513. The second cloud platform sends a third resource notification message to the second user device.
[0287] In an embodiment of the present application, there may be multiple second user devices registered on the second cloud platform subscribed to resources of the first user device, and the resources subscribed to by each second user device may be different; for one of the second user devices, the second cloud platform obtains the attribute information of the third resource of the first user device subscribed by the second user device, generates a corresponding third resource notification message, carries the attribute information of the third resource in the corresponding third resource notification message, and sends it to the second user device.
[0288] It can be understood that after the first user device comes online, the first cloud platform generates an event notification message corresponding to the corresponding resource change event for each resource in the first resource, and carries the attribute information of a resource in the first resource through an event notification message. In this way, even if the first user device is offline and then online, the second cloud platform can obtain the attribute information of the subscribed first resource, thereby improving the accuracy of obtaining the status information of the first resource.
[0289] The present application embodiment provides a device status notification method, which is applied to the interaction between a first cloud platform, a second cloud platform, a first user device and a second user device, wherein the second cloud platform subscribes to the resources of the first user device and the online events of the first user device, such as Fig.14 As shown, the method includes:
[0290] S1601. If the first user device is online, the first cloud platform generates an online notification message of the first user device;
[0291] S1602: The first cloud platform determines, based on the first subscription information, that the second cloud platform subscribes to the subscription information of the first user device; the first subscription information is the situation in which the device on the first cloud platform is subscribed;
[0292] S1603: The first cloud platform determines a first resource based on the subscription information of the first user device subscribed by the second cloud platform; the first resource is a resource for which the resource change event of the first user device is subscribed by the second cloud platform;
[0293] S1604: The first cloud platform sends a resource subscription request to the first user device to request a resource attribute value of the first resource;
[0294] S1605. The first user device sends a resource attribute value of the first resource to the first cloud platform based on the resource subscription request;
[0295] S1606. The first cloud platform carries the attribute value of the first resource in an online notification message of the first user device;
[0296] S1607. The first cloud platform sends an online notification message of the first user device to the second cloud platform;
[0297] In an embodiment of the present application, after the first user device comes online, the first cloud platform needs to send an online notification message of the first user device to the second cloud platform. The first cloud platform can carry the attribute value of the first resource of the first user device subscribed by the second cloud platform in the online notification message of the first user device and send it to the second cloud platform.
[0298] S1608: If the online notification message contains a carrying identifier, the second cloud platform obtains the attribute value of the first resource from the online notification message;
[0299] 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 device on the second cloud platform subscribed by the second user device;
[0300] S1610. The second cloud platform obtains, based on the third resource, an attribute value corresponding to the third resource from the attribute value of the first resource as the attribute value of the third resource;
[0301] S1611. The second cloud platform generates a third resource notification message based on the attribute value of the third resource;
[0302] S1612. The second cloud platform sends a third resource notification message to the second user device.
[0303] In an embodiment of the present application, after the first user device comes online, the first cloud platform carries the attribute value of the first resource in the online notification message of the first user device. In this way, even if the first user device is offline and then comes online again, the second cloud platform can obtain the attribute value of the subscribed first resource from the received online notification message and learn about the attribute changes of the first resource; thereby improving the accuracy of the second cloud platform in obtaining the attribute value of the first resource and reducing system consumption.
[0304] Exemplarily, the second cloud platform subscribes to the registration events, deregistration events, online events, offline events of all devices of a user on the first cloud platform, as well as the resource publish events and resource unpublish events of the first user's devices among these devices, and the resource attribute change events; then when the first user's device goes online again after being offline, an online notification message for the first user's device will be generated.
[0305] In an embodiment of the present application, when the first user device goes online again after being offline, the first cloud platform generates an online notification message for the first user device. The online notification message carries an online identifier of the first user device and also carries an attribute value of the first resource.
[0306] In an embodiment of the present application, the first cloud platform places the attribute value of the first resource in the links field in the online notification message, and the attribute value of each resource in the first resource can be placed in the links field respectively.
[0307] In an embodiment of the present application, after receiving the online notification message, the second cloud platform checks whether the online notification message carries the links identifier. If the links identifier is carried, it indicates that the online notification message carries the attribute value of the first resource. The second cloud platform can obtain the attribute value of the first resource from the online notification message; thereafter, the second cloud platform can determine which second user devices have subscribed to the online event of the first user device based on the second subscription list, and then generate an online notification message of the first user device and send it to these second user devices; and the second cloud platform also determines which second user devices have subscribed to the resources of the first user device based on the second subscription list, and which resources on the first user device each second user device has subscribed to, generates a corresponding resource change event notification message for each resource, and sends a resource change event notification message corresponding to the subscribed resource to each second user device.
[0308] It should be noted that, for a second user device, the second cloud platform can send the event notification message corresponding to the device status event to which it subscribes to the second user device, or it can send the event notification message corresponding to each event separately. This embodiment of the present application does not impose any restrictions on this.
[0309] Among them, for a second user device, the second cloud platform may only send a resource change notification message corresponding to the resource change event. After the second user device receives the resource change event notification message, it can be determined that the first user device is online.
[0310] The present application embodiment provides a device status notification method, which is applied to the interaction between a first cloud platform, a second cloud platform and a first user device, such as Fig.15 As shown, the method includes:
[0311] S1701. The first user device determines a second resource based on the third subscription information while the first user device is offline; the second resource is a resource that belongs to the first user device and is subscribed to by the first cloud platform; the second resource includes the first resource; the first resource is a resource that belongs to the first user device and is on the first cloud platform and is subscribed to by the second cloud platform;
[0312] S1702. The first user equipment records resource changes of the second resource and generates resource change record information;
[0313] S1703: If the first user device is online, obtain the attribute value of the second resource from the resource change record information;
[0314] 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 the attribute value of the second resource;
[0315] S1705. The first user device sends a second resource notification message to the first cloud platform;
[0316] S1706. The first cloud platform obtains the attribute value of the first resource based on the attribute value of the second resource;
[0317] 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;
[0318] 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;
[0319] S1709. The first cloud platform sends the first resource notification message to the second cloud platform.
[0320] In an embodiment of the present application, after the first user device goes offline, resource change record information of the subscribed second resource is recorded during the entire offline period. In this way, after the first user device goes online, the first user device can obtain the status information of the second resource from the resource defense record information; and the first user device directly reports it, reducing the interaction process between the first cloud platform and the first user device, so that the first user device can directly receive the status information of the second resource after the first user device goes online, thereby improving the efficiency of obtaining the status information of the first resource.
[0321] Exemplarily, after going offline, the first user device will continue to monitor the third subscription list, and determine the second resource subscribed to by the first cloud platform from the third subscription list; when an attribute change event occurs in the second resource, the attribute change event is recorded in the resource record list; if the first user device is online, the first user device will obtain the attribute value of the second resource, and send the attribute value of the second resource to the first cloud platform by carrying it in the resource change event notification message corresponding to the second resource.
[0322] Here, according to the reporting strategy corresponding to each attribute change event recorded in the resource record list, the first user device can determine whether the reported status information of the first resource is the attribute value of the first resource or the attribute change information of the first resource; if the reporting strategy is detailed reporting, the first user device will obtain the attribute change information of the resource; if the reporting strategy is final reporting, the first user device obtains the attribute value of the resource.
[0323] It should be noted that after the first user device obtains the attribute value or attribute change information of the first resource from the resource record list according to the reporting strategy, it can determine which resources in the first resource have changed attributes. The first user device can report the attributes of the resources whose attributes have changed, or report the changed attributes of these resources. This embodiment of the present application does not impose any restrictions on this.
[0324] The present application embodiment provides a first cloud platform, such as Fig.16 As shown, the first cloud platform 16 includes:
[0325] A generating module 161 is configured to generate a first resource notification message if the first user device is online on the first cloud platform; the first resource notification message is used to indicate a state change of a first resource corresponding to the first user device during an offline period; the first resource is a resource on the first cloud platform subscribed by the second cloud platform and belonging to the first user device;
[0326] The sending module 162 is used to send the first resource notification message to the second cloud platform.
[0327] In some embodiments, the generation module 161 is specifically used to obtain the status information of the first resource; and generate the first resource notification message based on the status information of the first resource.
[0328] In some embodiments, the generation module 161 is specifically used to determine the first resource subscribed by the second cloud platform in the first user device; obtain attribute information of the first resource from the first user device, and the attribute information of the first resource represents status information of the first resource.
[0329] In some embodiments, the generation module 161 is specifically used to determine, based on the first subscription information, the information that the second cloud platform subscribes to the first user device; the first subscription information is the situation in which the user device on the first cloud platform is subscribed; based on the information that the second cloud platform subscribes to the first user device, determine the first resource; the first resource is the resource corresponding to the resource change event subscribed by the second cloud platform to the first user device.
[0330] In some embodiments, the generation module 161 is specifically used to generate 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.
[0331] In some embodiments, the generation module 161 is specifically used to generate an online notification message for the first user device after the first cloud platform goes online and before generating the first resource notification message; and send the online notification message to the second cloud platform.
[0332] In some embodiments, the generation module 161 is specifically used to generate an online notification message of the first user equipment; carry the attribute information of the first resource in the online notification message of the first user equipment, and obtain the first resource notification message.
[0333] In some embodiments, the attribute information of the first resource is carried in the online notification message via a preset field.
[0334] In some embodiments, the generation module 161 is specifically used to receive a second resource notification message reported by the first user device; the second resource notification message carries status information of a second resource; the second resource is a resource belonging to the first user device subscribed by the first cloud platform; the second resource includes the first resource; based on the status information of the second resource, the status information of the first resource is obtained.
[0335] In some embodiments, the state information of the second resource includes a final state of the second resource.
[0336] In some embodiments, the state information of the second resource includes resource change information of the second resource.
[0337] The present application embodiment provides a second cloud platform, such as Fig.17 As shown, the second cloud platform 17 includes:
[0338] Receiving module 171 is used to receive a first resource notification message from a first cloud platform; the first resource notification message is used to indicate a state change of a first resource during a period when the first user device is offline; the first resource is a resource belonging to the first user device on the first cloud platform subscribed by the second cloud platform.
[0339] In some embodiments, the first resource notification message carries attribute information of the first resource; the attribute information of the first resource represents status information of the first resource.
[0340] In some embodiments, the first resource notification message includes an event notification message of a resource change event corresponding to the first resource.
[0341] In some embodiments, the first resource notification message includes an online notification message of the first user equipment.
[0342] In some embodiments, the receiving module 171 is specifically used to receive an online notification message of a first user device sent by the first cloud platform before receiving a first resource notification message from the first cloud platform; the receiving of the first resource notification message from the first cloud platform includes: if the online notification message does not carry a carrying identifier, then receiving the first resource notification message from the first cloud platform; the carrying identifier is used to represent that the attribute information of the first resource is carried in the online notification message.
[0343] In some embodiments, the receiving module 171 is specifically used to receive an online notification message of a first user device sent by the first cloud platform, and if the online notification message carries a carrying identifier, use the online notification message as the first resource notification message.
[0344] In some embodiments, the second cloud platform 17 further includes:
[0345] Generation module 172 (not shown in the figure) is used to generate a third resource notification message based on the first resource notification message; the third resource notification message is used to indicate the attribute change of the third resource corresponding to the first user device during the offline period; the third resource is a resource belonging to the first user device on the second cloud platform subscribed by the second user device; the first resource includes the third resource; the second user device is registered on the second cloud platform.
[0346] The sending module 173 (not shown in the figure) is used to send the third resource notification message to the second user equipment.
[0347] In some embodiments, the generation module 172 is specifically used to obtain attribute information of a third resource of the first user equipment subscribed by the second user equipment based on the first resource notification message; and generate a third resource notification message based on the attribute information of the third resource.
[0348] In some embodiments, the generation module 172 is specifically used to obtain the first resource attribute information from the first resource notification message; based on the second subscription information, determine the third resource; the second subscription information is the subscription situation of the user device of the second cloud platform; based on the third resource, obtain the attribute information of the third resource corresponding to the third resource from the first resource attribute information.
[0349] In some embodiments, the second user equipment includes multiple user equipments; the third resource notification message includes sub-resource notification messages corresponding to the multiple user equipments one by one; and the sub-resource notification message carries attribute information of the third resource of each user equipment.
[0350] The present application embodiment provides a first user equipment, such as Fig.18 As shown, the first user equipment 18 includes:
[0351] A generation module 181 is used to generate a second resource notification message if the first user device is online on the first cloud platform; the second resource is a resource that belongs to the first user device and is subscribed to by the first cloud platform; the second resource notification message is used to indicate a state change of the second resource; the second resource includes the first resource; the first resource is a resource that belongs to the first user device and is subscribed to by the second cloud platform;
[0352] The sending module 182 is used to send the second resource notification message to the first cloud platform.
[0353] In some embodiments, the generation module 181 is specifically used to record the resource changes of the second resource and generate resource change record information before generating the second resource notification message while the first user device is offline; if the first user device is online, obtain the status information of the second resource from the resource change record information; and generate the second resource notification message based on the status information of the second resource.
[0354] In some embodiments, the generation module 181 is specifically used to determine the second resource based on third subscription information; the third subscription information is the situation that the first user device is subscribed to by the first cloud platform; record the resource changes of the second resource and generate the resource change record information.
[0355] In some embodiments, the generation module 181 is specifically configured to obtain 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.
[0356] In some embodiments, the generation module 181 is specifically configured to obtain 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.
[0357] The present application embodiment provides a first cloud platform, such as Fig.19 As shown, the first cloud platform 19 includes: a processor 1901 and a memory 1902, the memory 1902 stores a computer program that can be run on the processor 1901, and when the processor 1901 executes the computer program, the steps of any one of the device status notification methods on the first cloud platform side of the embodiment of the present application are implemented.
[0358] The memory 1902 is configured to store computer programs and applications generated by the processor 1901, and can also cache data to be processed or already processed by the processor 1901 and various modules in the terminal (e.g., image data, audio data, voice communication data, and video communication data), which can be implemented through flash memory (FLASH) or random access memory (Random Access Memory, RAM).
[0359] When the processor 1901 executes the program, the steps of any of the above-mentioned device status notification methods on the first cloud platform side are implemented. The processor 1901 usually controls the overall operation of the first cloud platform 19.
[0360] The present application embodiment provides a second cloud platform, such as Fig. 20 As shown, the second cloud platform 20 includes: a processor 2001 and a memory 2002, the memory 2002 stores a computer program that can be run on the processor 2001, and when the processor 2001 executes the computer program, the steps of any one of the second cloud platform side device status notification methods of the embodiments of the present application are implemented.
[0361] The memory 2002 is configured to store computer programs and applications generated by the processor 2001, and can also cache data to be processed or already processed by the processor 2001 and various modules in the terminal (e.g., image data, audio data, voice communication data, and video communication data), which can be implemented through flash memory (FLASH) or random access memory (Random Access Memory, RAM).
[0362] When the processor 2001 executes the program, the processor 2001 implements any of the steps of the device status notification method on the second cloud platform side. The processor 2001 usually controls the overall operation of the second cloud platform 20.
[0363] The present application embodiment provides a first user equipment, such as Fig.21 As shown, the first user device 21 includes: a processor 2101 and a memory 2102, the memory 2102 stores a computer program that can be run on the processor 2101, and when the processor 2101 executes the computer program, it implements the steps of any one of the first user device side device status notification methods of the embodiments of the present application.
[0364] The memory 2102 is configured to store computer programs and applications used by the processor 2101, and can also cache data to be processed or processed by the processor 2101 and various modules in the terminal (for example, image data, audio data, voice communication data, and video communication data), which can be stored via flash memory (FLASH) or random access memory (Random Access Memory, RAM).
[0365] When the processor 2101 executes the program, the processor 2101 implements any of the 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.
[0366] 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 understandable that the electronic device that implements the functions of the processor may also be other, which is not limited by the embodiments of the present application.
[0367] The above-mentioned computer storage medium / memory can be 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 disk, or a compact disc read-only memory (CD-ROM) and the like; it can also be various terminals including one or any combination of the above-mentioned memories, such as mobile phones, computers, tablet devices, personal digital assistants, etc.
[0368] It should be noted here that the description of the above storage medium and device embodiments is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments. For technical details not disclosed in the storage medium and device embodiments of this application, please refer to the description of the method embodiments of this application for understanding.
[0369] It should be understood that "one embodiment" or "an embodiment" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present application, the size of the sequence number of the above-mentioned processes does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application. The above-mentioned sequence numbers of the embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments.
[0370] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0371] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0372] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the embodiment of the present application.
[0373] In addition, all functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may be a separate unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0374] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application can essentially or in other words, the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for the automatic test line of the device to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks or optical disks.
[0375] The methods disclosed in several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.
[0376] The features disclosed in several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.
[0377] The above is only an implementation method of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0378] Industrial Applicability
[0379] In an embodiment of the present application, if the first user device is online on the first cloud platform, a first resource notification message is generated; the first resource notification indicates the status change of the first resource corresponding to the first user device during the offline period; the first resource is a resource belonging to the first user device on the first cloud platform subscribed by the second cloud platform; that is, if the second cloud platform subscribes to the first resource, even if the resource status of the first user device changes during the offline period, the second cloud platform can also obtain the resource status of the first resource, thereby improving the accuracy of the second cloud platform in obtaining status information.
Claims
1. A device status notification method, applied to a first cloud platform, comprising: 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 to indicate a state change of a first resource corresponding to the first user equipment during an offline period; the first resource notification message is also used to indicate that when the state of the first resource has not changed, the state change of the first resource is that the state of the first resource remains unchanged; the first resource is a resource belonging to the first user equipment on the first cloud platform subscribed by the second cloud platform; Sending the first resource notification message to the second cloud platform; so that the second cloud platform generates a third resource notification message based on the first resource notification message, and then sends the third resource notification message to the second user device; wherein the third resource notification message is used to indicate the attribute change of the third resource corresponding to the first user device during the offline period; the third resource is a resource belonging to the first user device on the second cloud platform subscribed by the second user device; the first resource includes the third resource; The generating of the first resource notification message includes: Acquire state information of the first resource; the state information of the first resource is used to characterize a state change of the first resource during the period when the first user equipment is offline; the state information of the first resource includes a final state of the first resource and / or resource change information of the first resource; the resource change information of the first resource includes all relevant information of changes that occur to the first resource during the period when the first user equipment is offline; Based on the status information of the first resource, the first resource notification message is generated.
2. The method according to claim 1, wherein: The obtaining the status information of the first resource includes: Determining, in the first user device, the first resource subscribed by the second cloud platform; Attribute information of the first resource is acquired from the first user equipment, where the attribute information of the first resource represents state information of the first resource.
3. The method according to claim 2, wherein: The determining the first resource in the first user device that is subscribed by the second cloud platform includes: Based on the first subscription information, determine the information that the second cloud platform subscribes to the first user device; the first subscription information is the subscription status of the user device on the first cloud platform; Based on the information that the second cloud platform subscribes to the first user device, the first resource is determined; the first resource is a resource corresponding to the resource change event of the first user device subscribed by the second cloud platform.
4. The method according to claim 2 or 3, wherein: The generating the first resource notification message based on the state information of the first resource includes: For the first resource, an event notification message of a resource change event corresponding to the first resource is generated; the event notification message of the resource change event carries attribute information of the first resource; and the event notification message is a notification message of the first resource.
5. The method according to claim 2 or 3, wherein: After the first user equipment goes online on the first cloud platform and before the first resource notification message is generated, the method further includes: generating an online notification message of the first user equipment; Send the online notification message to the second cloud platform.
6. The method according to claim 2 or 3, wherein: The generating the first resource notification message based on the attribute information of the first resource includes: generating an online notification message of the first user equipment; The attribute information of the first resource is carried in the online notification message of the first user equipment to obtain the first resource notification message.
7. The method according to claim 6, wherein: The attribute information of the first resource is carried in the online notification message through a preset field.
8. The method according to claim 1, wherein: The obtaining the status information of the first resource includes: receiving a second resource notification message reported by the first user device; the second resource notification message carries status information of a second resource; the second resource is a resource subscribed by the first cloud platform and belonging to the first user device; the second resource includes the first resource; Based on the status information of the second resource, the status information of the first resource is acquired.
9. The method according to claim 8, wherein: The state information of the second resource includes a final state of the second resource.
10. The method according to claim 8, wherein: The state information of the second resource includes resource change information of the second resource.
11. A device status notification method, applied to a second cloud platform, comprising: Receiving a first resource notification message from a first cloud platform; The first resource notification message is used to indicate a state change of the first resource during the period when the first user device is offline; the first resource notification message is also used to indicate that when the state of the first resource has not changed, the state change of the first resource is that the state of the first resource remains unchanged; the first resource notification message is generated by the first cloud platform based on the state information of the first resource after obtaining the state information of the first resource; the state information of the first resource is used to characterize the state change of the first resource during the period when the first user device is offline; the state information of the first resource includes the final state of the first resource, and / or, the resource change information of the first resource; the resource change information of the first resource includes all relevant information of the changes that occurred to the first resource during the offline period; The first resource is a resource belonging to the first user device on the first cloud platform subscribed by the second cloud platform; Based on the first resource notification message, generating a third resource notification message; The third resource notification message is used to indicate a property change of a third resource corresponding to the first user equipment during an offline period; 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 includes the third resource; the second user equipment is registered on the second cloud platform; The third resource notification message is sent to the second user equipment.
12. The method according to claim 11, wherein: The first resource notification message carries attribute information of the first resource; the attribute information of the first resource represents status information of the first resource.
13. The method according to claim 12, wherein: The first resource notification message includes an event notification message of a resource change event corresponding to the first resource.
14. The method according to claim 12, wherein: The first resource notification message includes an online notification message of the first user equipment.
15. The method according to claim 11 or 12, wherein: Before receiving the first resource notification message from the first cloud platform, the method further includes: Receiving an online notification message of the first user device sent by the first cloud platform; The receiving a first resource notification message from the first cloud platform includes: If the online notification message does not carry the carrying identifier, the first resource notification message from the first cloud platform is received; the carrying identifier is used to represent that the attribute information of the first resource is carried in the online notification message.
16. The method according to claim 15, wherein: After receiving the online notification message of the first user device sent by the first cloud platform, The method further comprises: If the online notification message carries the carrying identifier, the online notification message is used as the first resource notification message.
17. The method according to claim 14, wherein: The attribute information of the first resource is carried in the online notification message through a preset field.
18. The method according to claim 11, wherein: The generating a third resource notification message based on the first resource notification message includes: Based on the first resource notification message, acquiring attribute information of the third resource of the first user equipment subscribed by the second user equipment; Based on the attribute information of the third resource, the third resource notification message is generated.
19. The method according to claim 18, wherein: The acquiring, based on the first resource notification message, attribute information of the third resource of the first user equipment subscribed by the second user equipment includes: Acquire attribute information of the first resource from the first resource notification message; Determine the third resource based on second subscription information; the second subscription information is a subscription status of a user device of the second cloud platform; Based on the third resource, attribute information of a third resource corresponding to the third resource is acquired from the attribute information of the first resource.
20. The method according to claim 18, wherein: The second user equipment includes multiple user equipments; the third resource notification message includes sub-resource notification messages corresponding to the multiple user equipments one by one; and the sub-resource notification message carries attribute information of the third resource of each user equipment.
21. A device status notification method, applied to a first user device, comprising: If the first user equipment is online on the first cloud platform, a second resource notification message is generated; The second resource is a resource belonging to the first user device subscribed by the first cloud platform; the second resource notification message is used to indicate a state change of the second resource; the second resource includes the first resource; the first resource is a resource belonging to the first user device on the first cloud platform subscribed by the second cloud platform; The second resource notification message is sent to the first cloud platform, so that the first cloud platform generates the first resource notification message based on the second resource notification message and then sends the first resource notification message to the second cloud platform; wherein the second cloud platform is used to generate the third resource notification message based on the first resource notification message and then send the third resource notification message to the second user device; the third resource notification message is used to indicate the attribute change of the third resource corresponding to the first user device during the offline period; the third resource is a resource on the second cloud platform subscribed by the second user device and belonging to the first user device; the first resource includes the third resource; the first resource notification message is used to indicate the state change of the first resource corresponding to the first user device during the offline period; the first resource notification message is also used to indicate that when the state of the first resource does not change, the state change of the first resource is that the state of the first resource remains unchanged; the first resource notification message is generated by the first cloud platform based on the state information of the first resource after obtaining the state information of the first resource; the state information of the first resource is used to characterize the state change of the first resource during the offline period of the first user device; the state information of the first resource includes the final state of the first resource and / or the resource change information of the first resource; the resource change information of the first resource includes all relevant information of the changes of the first resource during the offline period.
22. The method according to claim 21, wherein: Before generating the second resource notification message, the method further includes: During the period when the first user equipment is offline, recording resource changes of the second resource and generating resource change record information; If the first user equipment is online, obtaining the status information of the second resource from the resource change record information; The generating of the second resource notification message is generated based on the status information of the second resource.
23. The method according to claim 22, wherein: The recording of the resource change of the second resource and generating resource change record information includes: Determine the second resource based on third subscription information; the third subscription information is a situation in which the first user device is subscribed by the first cloud platform; Record resource changes of the second resource and generate the resource change record information.
24. The method according to claim 22, wherein: The acquiring the state information of the second resource from the resource change record information includes: The resource change information of the second resource is acquired from the resource change record information, and the resource change information of the second resource is used as the status information of the second resource.
25. The method according to claim 22, wherein: The acquiring the state information of the second resource from the resource change record information includes: 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.
26. A first cloud platform, the first cloud platform comprising: A generating module, 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 to indicate a state change of a first resource corresponding to the first user equipment during an offline period; the first resource notification message is also used to indicate that when the state of the first resource has not changed, the state change of the first resource is that the state of the first resource remains unchanged; 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, so that the second cloud platform generates a third resource notification message based on the first resource notification message, and then sends the third resource notification message to the second user equipment; wherein the third resource notification message is used to indicate a property change of a third resource corresponding to the first user equipment during an offline period; the third resource is a resource on the second cloud platform subscribed by the second user equipment and belonging to the first user equipment; the first resource includes the third resource; The generating module is further used to obtain the state information of the first resource; the state information of the first resource is used to characterize the state change of the first resource during the period when the first user equipment is offline; the state information of the first resource includes the final state of the first resource and / or the resource change information of the first resource; the resource change information of the first resource includes the relevant information of the change of the first resource during the period when the first user equipment is offline; Based on the status information of the first resource, the first resource notification message is generated.
27. A second cloud platform, the second cloud platform comprising: A receiving module, used to receive a first resource notification message from a first cloud platform; The first resource notification message is used to indicate a state change of the first resource during the period when the first user device is offline; the first resource notification message is also used to indicate that when the state of the first resource has not changed, the state change of the first resource is that the state of the first resource remains unchanged; the first resource notification message is generated by the first cloud platform based on the state information of the first resource after acquiring the state information of the first resource; the state information of the first resource is used to characterize the state change of the first resource during the period when the first user device is offline; the state information of the first resource includes the final state of the first resource, and / or the resource change information of the first resource; the resource change information of the first resource includes all relevant information of the changes that occurred in the first resource during the offline period; the first resource is a resource belonging to the first user device on the first cloud platform subscribed by the second cloud platform; the second cloud platform communicates with the first cloud platform; A generating module, configured to generate a third resource notification message based on the first resource notification message; The third resource notification message is used to indicate a property change of a third resource corresponding to the first user equipment during an offline period; 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 includes the third resource; A sending module is used to send the third resource notification message to the second user equipment.
28. A first user equipment, the first user equipment comprising: A generating module, 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 device subscribed by the first cloud platform; the second resource notification message is used to indicate a state change of the second resource; the second resource includes the first resource; the first resource is a resource belonging to the first user device 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, so that the first cloud platform generates a first resource notification message based on the second resource notification message and then sends the first resource notification message to the second cloud platform; wherein the second cloud platform is configured to generate a third resource notification message based on the first resource notification message and then send the third resource notification message to a second user device; the third resource notification message is used to indicate a property change of a third resource corresponding to the first user device during an offline period; the third resource is a resource belonging to the first user device on the second cloud platform subscribed by the second user device; the first resource includes the third resource; the first resource notification message is used to indicate a state change of the first resource corresponding to the first user device during an offline period; the first resource notification message is also used to indicate that when the state of the first resource has not changed, the state change of the first resource is that the state of the first resource remains unchanged; the first resource notification message is generated by the first cloud platform based on the state information of the first resource after acquiring the state information of the first resource; the state information of the first resource is used to characterize the state change of the first resource during the offline period of the first user device; the state information of the first resource includes the final state of the first resource and / or the resource change information of the first resource; the resource change information of the first resource includes all relevant information of changes that occurred in the first resource during the offline period.
29. A first cloud platform, comprising: Memory and processor, The memory stores a computer program executable on the processor. When the processor executes the program, the steps in the method according to any one of claims 1 to 10 are implemented.
30. A second cloud platform, comprising: Memory and processor, The memory stores a computer program executable on the processor. When the processor executes the program, the steps in the method according to any one of claims 11 to 20 are implemented.
31. A first user equipment, comprising: Memory and processor, The memory stores a computer program executable on the processor. When the processor executes the program, the steps in the method according to any one of claims 21 to 25 are implemented.
32. 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 as described in any one of claims 1 to 10.
33. A storage medium, applied to a second cloud platform, storing a computer program, which, when executed by one or more first processors, implements the method for device status notification as described in any one of claims 11 to 20.
34. A storage medium, applied to a first user device, storing a computer program, which, when executed by one or more first processors, implements the method for device status notification as described in any one of claims 21 to 25.
Citation Information
Patent Citations
Method, device and medium for achieving notification of equipment state information
CN108600295A
Generating offline content
CN111179105A
