WO2021012236A1 - 一种资源发布方法和设备 - Google Patents
一种资源发布方法和设备 Download PDFInfo
- Publication number
- WO2021012236A1 WO2021012236A1 PCT/CN2019/097581 CN2019097581W WO2021012236A1 WO 2021012236 A1 WO2021012236 A1 WO 2021012236A1 CN 2019097581 W CN2019097581 W CN 2019097581W WO 2021012236 A1 WO2021012236 A1 WO 2021012236A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- cloud
- resource
- request message
- restricted
- proxy
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 209
- 230000005540 biological transmission Effects 0.000 claims abstract description 104
- 230000004044 response Effects 0.000 claims description 223
- 238000004590 computer program Methods 0.000 claims description 44
- 230000015654 memory Effects 0.000 claims description 43
- 238000009434 installation Methods 0.000 claims 1
- 238000004891 communication Methods 0.000 description 27
- 230000008569 process Effects 0.000 description 26
- 238000010586 diagram Methods 0.000 description 17
- 238000012545 processing Methods 0.000 description 10
- 230000001360 synchronised effect Effects 0.000 description 10
- 230000006870 function Effects 0.000 description 5
- 230000003068 static effect Effects 0.000 description 4
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000003993 interaction Effects 0.000 description 3
- 230000004083 survival effect Effects 0.000 description 3
- 230000007613 environmental effect Effects 0.000 description 2
- 238000010295 mobile communication Methods 0.000 description 2
- 238000013475 authorization Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000007774 longterm Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000008520 organization Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/40—Support for services or applications
Definitions
- This application relates to the field of Internet of Things communication technology, in particular to a method and equipment for publishing resources.
- the Open Connectivity Foundation (OCF, Open Connectivity Foundation) is an emerging IoT application layer technology standard organization. OCF develops a Restful service framework for interconnection among IoT devices.
- the OCF deployment architecture can include OCF equipment and OCF cloud equipment; OCF cloud equipment accepts OCF equipment to release resources. In this case, the OCF device that releases resources to the OCF cloud device needs to have the ability to connect to the cloud.
- the OCF device and the OCF cloud device establish and maintain a secure transport layer protocol (TLS, Transport Layer Security) long connection to achieve resource release and remote Communication.
- TLS Transport Layer Security
- the embodiments of the present application provide a resource release method and device.
- the resource release method provided by the embodiment of the present application includes: a cloud-constrained device establishes a connection with a cloud proxy device; the cloud-constrained device transmits information with the cloud proxy device based on the connection, The information is used by the cloud proxy device to release resources to the cloud device.
- the resource release method provided by the embodiment of the present application includes: a cloud proxy device establishes a connection with a cloud restricted device; the cloud proxy device transmits information with the cloud restricted device based on the connection, based on The information publishes the resources of the cloud restricted device to the cloud device.
- the resource publishing method provided by the embodiment of the present application includes: a cloud device obtains resources published by a cloud proxy device; the resource is obtained by the cloud proxy device based on a connection with a cloud-restricted device The resource of the cloud-restricted device; the cloud device publishes the resource.
- the device includes: a first connection establishment unit and a first transmission unit; wherein,
- the first connection establishing unit is configured to establish a connection with a cloud proxy device
- the first transmission unit is configured to transmit information with the cloud proxy device based on the connection, and the information is used by the cloud proxy device to release resources to the cloud device.
- the cloud proxy device includes: a second connection establishment unit, a second transmission unit, and a third transmission unit; wherein,
- the second connection establishment unit is configured to establish a connection with a cloud restricted device
- the second transmission unit is configured to transmit information with the cloud restricted device based on the connection;
- the third transmission unit is configured to release the resources of the cloud-restricted device to the cloud device based on the information transmitted by the second transmission unit.
- the cloud device includes a fourth transmission unit and a publishing unit; wherein,
- the fourth transmission unit is configured to obtain resources issued by the cloud proxy device; the resources are resources of the cloud restricted device obtained by the cloud proxy device based on the connection with the cloud restricted device;
- the publishing unit is configured to publish the resource.
- the device provided by the embodiment of the present application includes a processor and a memory.
- the memory is used to store a computer program
- the processor is used to call and run the computer program stored in the memory to execute the resource release method of the first aspect, the second aspect, or the third aspect.
- the chip provided in the embodiment of the present application is used to implement the above-mentioned terminal resource release method.
- the chip includes: a processor, configured to call and run a computer program from the memory, so that the device installed with the chip executes the resource release method of the first aspect, the second aspect, or the third aspect.
- the computer-readable storage medium provided by the embodiment of the present application is used to store a computer program that enables a computer to execute the resource release method of the first aspect, the second aspect, or the third aspect.
- the computer program product provided by the embodiments of the present application includes computer program instructions that cause a computer to execute the resource release method of the first aspect, the second aspect, or the third aspect.
- the computer program provided by the embodiment of the present application when it runs on a computer, causes the computer to execute the resource release method of the first aspect, the second aspect, or the third aspect.
- the connection between the cloud proxy device and the cloud restricted device is established, so that the cloud restricted device that cannot interact with the cloud device publishes resources through the cloud proxy device, which solves the problem that the cloud restricted device cannot publish resources to the cloud device .
- FIG. 1a and FIG. 1b are both schematic diagrams of an OCF system architecture provided by an embodiment of the present application.
- FIG. 2 is a schematic flowchart of a resource publishing method provided by an embodiment of the present application
- FIG. 3 is a schematic flowchart 1 of a specific example of a resource publishing method provided by an embodiment of the present application
- FIG. 4 is a second schematic flowchart of a specific example of a resource publishing method provided by an embodiment of the present application.
- FIG. 5 is a third schematic flowchart of a specific example of a resource publishing method provided by an embodiment of the present application.
- FIG. 6 is a schematic diagram of a structural composition of a cloud restricted device provided by an embodiment of the present application.
- FIG. 7 is a schematic diagram of a structural composition of a cloud proxy device provided by an embodiment of the present application.
- FIG. 8 is a schematic diagram 1 of the structural composition of a cloud device provided by an embodiment of the present application.
- FIG. 9 is a second schematic diagram of the structural composition of a cloud device provided by an embodiment of the present application.
- FIG. 10 is a third schematic diagram of the structural composition of a cloud device provided by an embodiment of the present application.
- FIG. 11 is a fourth schematic diagram of the structural composition of a cloud device provided by an embodiment of the present application.
- Figure 12 is a schematic structural diagram of a device provided by an embodiment of the present application.
- FIG. 13 is a schematic structural diagram of a chip of an embodiment of the present application.
- FIGS 1a and 1b are schematic diagrams of an OCF system architecture provided by an embodiment of the present application; as shown in Figure 1a, the entity providing resources can be called an OCF server (hereinafter referred to as a server), and an entity accessing resources It can be called an OCF client (hereinafter referred to as a client).
- OCF server hereinafter referred to as a server
- OCF client hereinafter referred to as a client
- control terminal that obtains indoor environment status data can be the client, and the sensor device that monitors the indoor environment status data can be the server.
- the business interaction between the client and the server is through the creation, reading, updating, deleting or notification of resources These resource operation methods are implemented.
- the interaction between the client and the server can be referred to as shown in Figure 1a.
- the client 11 sends a request to the server 12, and the request is used to operate the resources on the server 12; the server 12 executes the corresponding request
- the resource operation is performed, and a response is returned to the client 11, and the response carries the expression of the resource.
- the client sends an update (POST) resource request to the server to perform operations on the resources on the server.
- the object of the update resource request operation may be, for example, a uniform resource identifier (URI, Uniform Resource Identifier). ).
- URI uniform resource identifier
- the server returns an update resource response to the client, and the update resource response carries an expression of the resource.
- the expression of the resource may include at least one of the following: resource URI, resource type, resource interface, and functional attributes of the resource.
- resource URI resource URI
- resource type resource type
- resource interface resource interface
- functional attributes of the resource.
- Resource URI Use "href” in the resource description to indicate the address of the server resource.
- the value of "href” is the specific resource URI; the client accesses the server resource through the resource URI;
- Resource type "rt” is used in the resource description to indicate the type of resource.
- the resource type “rt” is "oic.r.temperature”, which indicates the temperature resource type;
- Resource interface "if" is used in the resource description to indicate the view of resources and the response to resource support.
- the resource interface “if” is "oic.if.a”, which means the controller interface;
- Resource attribute Describe the attribute information of the resource in the resource description.
- the attribute information of the resource is "targetTemperature”, which represents the target temperature attribute of the temperature resource
- the attribute information of the resource is "currentTemperature”, which represents the current temperature attribute of the temperature resource.
- the attribute information of the resource is "temperatureRange”, which represents the temperature range attribute of the temperature resource.
- OCF defines the resource discovery resource "/oic/res" that all OCF devices must support. It is used for the discovery of OCF devices and resources.
- the resource discovery resource provides the function of device resource discovery.
- the URI of the resource discovery resource is fixed as "/oic/ res”.
- OCF In order to express the association relationship between resources, OCF defines resource links (resource Links).
- the server can provide its own resources in the form of resource links, so that the client can discover the resources of the server.
- the content of the resource link is as follows:
- the content of the resource link includes:
- ⁇ anchor is the context URI, representing the URI of the owner resource that contains the resource link;
- ⁇ href target URI, that is, the URI of the target resource referenced in the resource link;
- ⁇ rt indicates the resource type identifier of the target resource
- ⁇ if indicates the interface supported by the target resource
- ⁇ eps indicates the endpoint that can access the target resource
- each server needs to have an endpoint, and each OCF device must be associated with at least one endpoint to send and receive OCF messages.
- the client can access the target resource of the server through the endpoint.
- the "eps" array is used in the resource link parameters to represent the endpoint of the target resource, and the specific endpoint is represented by "ep", that is, the target resource can be accessed through the address of the "ep" value in the "eps" parameter.
- the client can access the target indicated by the "href” parameter through the endpoint "coaps://[2001:db8:b::c2e5]:22222" indicated by the "ep” value in the "eps” parameter Resource "/myLightSwitch”.
- the OCF device and the control terminal can communicate through the OCF cloud device.
- the OCF device may specifically be the server in FIG. 1a
- the server may be, for example, a sensor capable of collecting environmental data
- the control terminal may specifically be the client in FIG. 1a
- the client may be a mobile phone, for example.
- APP specific application
- OCF cloud devices can include:
- Cloud interface Responsible for the access management of OCF equipment and the message routing of OCF equipment remote communication;
- Authorization server responsible for the registration of OCF devices, and verify the access token of OCF devices
- Resource catalog Responsible for providing resource publishing and query services.
- the OCF device publishes resource links to the resource catalog.
- the resource catalog publishes the resource links published by the OCF device.
- the OCF client can obtain the resource information of the target device by searching the resource catalog.
- OCF cloud devices need to implement resource catalog resources.
- the URI of the resource catalog resource is "/oic/rd", and the resource type is "oic.wk.rd”.
- the publishing device (that is, the OCF device that publishes the resource link) publishes resources to the "/oic/rd" of the OCF cloud device.
- the published content is the resource link of the OCF device.
- the resource catalog service of the OCF cloud device accepts the resource publishing request, it will OCF
- the resource link of the device is published under the "/oic/res" resource of the OCF cloud device.
- the client can discover the resources of other OCF devices by querying the OCF cloud device.
- the resource directory represents the publishing device and provides the resource information of the OCF device. After the client discovers the resource information of the OCF device, it requests interaction with the corresponding OCF device through the OCF cloud device .
- various communication systems can be used to interact between the OCF cloud device and the OCF device, and between the OCF device and the configurator.
- the communication system is, for example, Global System of Mobile communication (GSM) system, Code Division Multiple Access (CDMA) system, Wideband Code Division Multiple Access (WCDMA) system, general Packet Radio Service (General Packet Radio Service, GPRS), Long Term Evolution (LTE) system, LTE Frequency Division Duplex (FDD) system, LTE Time Division Duplex (TDD), General Mobile communication system (Universal Mobile Telecommunication System, UMTS), Worldwide Interoperability for Microwave Access (WiMAX) communication system, Wireless Local Area Networks (WLAN), Internet of Things System (IoT) ) Or 5G system, etc.
- GSM Global System of Mobile communication
- CDMA Code Division Multiple Access
- WCDMA Wideband Code Division Multiple Access
- GPRS General Packet Radio Service
- LTE Long Term Evolution
- FDD Frequency Division Duplex
- TDD Time Division Duplex
- the OCF device when the OCF device and the OCF cloud device cannot be connected, the OCF device is called a cloud restricted device.
- the technical solutions of the embodiments of the present application are mainly applied to IoT systems.
- the technical solutions of the embodiments of the present application are not limited to IoT systems, and can also be applied to other types of communication systems.
- Fig. 2 is a schematic flowchart of a resource release method provided by an embodiment of the present application; as shown in Fig. 2, the method includes:
- Step 201 The cloud restricted device establishes a connection with the cloud proxy device
- Step 202 The cloud-constrained device transmits information with the cloud proxy device based on the connection, and the information is used by the cloud proxy device to release resources to the cloud device;
- Step 203 The cloud restricted device releases the resources of the cloud restricted device to the cloud device based on the information
- Step 204 The cloud device obtains the resource issued by the cloud proxy device, and publishes the resource; the resource is the resource of the cloud restricted device obtained by the cloud proxy device based on the connection with the cloud restricted device.
- establishing the connection between the cloud restricted device and the cloud proxy device includes: the cloud restricted device obtains information of the cloud proxy device, and establishes a connection with the cloud proxy device based on the information.
- establishing a connection between the cloud proxy device and the cloud restricted device includes: the cloud proxy device sends the cloud proxy device information to the cloud restricted device, and the cloud proxy device information is used for the cloud recipient Only the device establishes a connection with the cloud proxy device.
- obtaining the cloud proxy device information by the cloud restricted device includes: the cloud restricted device receiving configuration information sent by a configurator, and the configuration information includes the cloud proxy device information.
- the cloud restricted device cannot establish a connection with the cloud device, it can interact with the configurator.
- the cloud-constrained device may interact with the configurator through, for example, a local area network or short-distance communication, to obtain the configuration information sent by the configurator.
- the local area network is, for example, wireless fidelity (Wi-Fi); the short distance communication is, for example, Bluetooth communication, Near Field Communication (NFC), and so on.
- obtaining the cloud proxy device information by the cloud restricted device includes: the cloud restricted device sends a discovery request message by broadcast or multicast; the discovery request message includes cloud proxy resources Type; the cloud restricted device receives a discovery response message; the discovery response message includes the cloud proxy device information.
- the sending of the cloud proxy device information to the cloud restricted device by the cloud proxy device includes: the cloud proxy device receiving a discovery request message sent by the cloud restricted device in a broadcast or multicast manner The discovery request message includes the cloud proxy resource type; the cloud proxy device sends a discovery response message to the cloud restricted device; the discovery response message includes the cloud proxy device information.
- the cloud-limited device cannot establish a connection with the cloud device, it can interact with the cloud proxy device.
- the cloud-constrained device can exchange information with the cloud proxy device through, for example, a local area network or short-distance communication, and the cloud-constrained device can send discovery request messages through unicast, broadcast, or multicast; in the same local area network
- the cloud proxy device within or within the preset distance range can receive the discovery request message, determine the cloud proxy resource type in the discovery request message, and send a discovery response message to the cloud restricted device .
- the local area network is for example Wi-Fi
- the short-distance communication is for example Bluetooth communication and so on.
- the information of the cloud proxy device includes at least one of the following: a cloud proxy resource identifier of the cloud proxy device, and endpoint information of the cloud proxy resource.
- that the cloud restricted device transmits information to the cloud proxy device based on the connection includes: the cloud restricted device instructs the cloud proxy device to send information to the cloud proxy device based on the connection Cloud devices publish resources.
- the cloud proxy device transmits information to the cloud restricted device based on the connection, and releases resources to the cloud device based on the information, including: the cloud proxy device obtains the cloud restricted device based on the connection Based on the instructions, release resources to the cloud device.
- the cloud-restricted device instructing the cloud proxy device to release resources to the cloud device based on the connection includes: the cloud-restricted device sends a first resource publishing request message to the cloud proxy device, and A resource release request message is used to instruct the cloud proxy device to release resources to the cloud device.
- the cloud proxy device obtains an instruction from the cloud restricted device based on the connection, and releases resources to the cloud device based on the instruction, including: the cloud proxy device receives the cloud restricted device based on the connection The first resource publishing request message sent, the first resource publishing request message is used to instruct the cloud proxy device to publish resources to the cloud device; the cloud proxy device sends a second resource publishing request message to the cloud device; the second resource The resource requested by the publishing request message is a resource catalog resource; the second resource publishing request message includes at least one of the following: the identifier of the cloud restricted device, the second resource link of the cloud restricted device; The endpoint of the resource in the second resource link of the restricted device is the endpoint of the cloud proxy device; the cloud proxy device obtains the first resource release response message sent by the cloud device, and sends the second resource release response message to the cloud restricted device. The resource publishes a response message.
- the cloud restricted device receives the second resource release response message sent by the cloud proxy device.
- the cloud device receiving the resource released by the cloud proxy device includes: the cloud device receives a second resource release request message sent by the cloud proxy device; the resource requested by the second resource release request message Is a resource catalog resource; sending a first resource release response message to the cloud proxy device.
- the resource requested by the first resource release request message includes the following manners:
- the resource requested by the first resource publishing request message is a cloud proxy resource;
- the first resource publishing request message includes at least one of the following: a proxy publishing resource indication, an identifier of the cloud restricted device, The first resource link of the cloud restricted device; the endpoint of the resource in the first resource link of the cloud restricted device is the endpoint of the cloud restricted device.
- the proxy publishing resource indication is used to instruct the cloud proxy device to publish proxy resources for the cloud restricted device;
- the identifier of the cloud restricted device indicates the target cloud restricted device that needs to be proxied by the cloud proxy device to publish resources;
- the first resource link of the cloud restricted device indicates the resource that needs to be published to the cloud device.
- the resource requested by the first resource release request message is a resource catalog resource;
- the first resource release request message includes at least one of the following: the identifier of the cloud restricted device, the cloud receiver The first resource link of the restricted device; the endpoint of the resource in the first resource link of the cloud restricted device is the endpoint of the cloud restricted device.
- the first resource release request message may further include at least one of the following: the effective time of the released resource and an indication of the cloud-restricted device; the second resource release request message may also include at least one of the following One: The effective time of publishing resources, the instructions of cloud-constrained devices.
- the indication of the cloud restricted device indicates that the device publishing the resource is a cloud restricted device.
- the target identifier in the second resource link of the cloud restricted device includes the identifier of the target resource and the identifier of the cloud restricted device.
- the cloud device publishing the resource includes: the cloud device adding the second resource link to the resource catalog; wherein the endpoint of the published resource is the endpoint of the cloud device.
- adding the second resource link to the resource catalog by the cloud device includes: in the case that the second resource release request message includes an indication of the cloud restricted device, or, In the case that the target identifier in the second resource link of the cloud restricted device includes the identifier of the target resource and the identifier of the cloud restricted device, the published identifier of the target resource is the same as the target in the second resource link The identifiers of the resources are the same.
- the method before the cloud restricted device sends the first resource release request message to the cloud proxy device, the method further includes: the cloud restricted device sends the cloud proxy device to the cloud proxy device.
- the device sends a first cloud registration request message; the cloud restricted device receives a second cloud registration response message sent by the cloud proxy device; the second cloud registration response message includes at least one of the following: the user ID, the The access token of the cloud restricted device, the valid duration of the access token, and the update token of the cloud restricted device.
- the method further includes: the cloud proxy device receives the first resource release request message sent by the cloud restricted device A cloud registration request message, sending a second cloud registration request message to the cloud device; the cloud proxy device receives a first cloud registration response message sent by the cloud device; the first cloud registration response message includes at least one of the following One: the user identification, the access token of the cloud restricted device, the validity period of the access token, the update token of the cloud restricted device; the cloud proxy device sends the cloud restricted device Send a second cloud registration response message; the second cloud registration response message includes at least one of the following: the user identifier, the access token of the cloud-restricted device, the effective duration of the access token, the cloud Renewal token for restricted device.
- the cloud restricted device receives a second cloud registration response message sent by the cloud proxy device.
- the method further includes: the cloud device receives a second cloud registration request message sent by the cloud proxy device;
- the cloud restricted device allocates an access token, and associates the cloud restricted device with a user ID;
- the cloud device sends a first cloud registration response message to the cloud proxy device;
- the first cloud registration response message includes the following At least one of: the user identification, the access token of the cloud restricted device, the valid duration of the access token, and the update token of the cloud restricted device.
- the resources requested by the first cloud registration request message and the second cloud registration request message include the following methods:
- the resource requested by the first cloud registration request message is a cloud proxy resource;
- the first cloud registration request message includes at least one of the following: proxy cloud registration instruction, identification of the cloud restricted device, The security credential information of the cloud restricted device;
- the resource requested by the second cloud registration request message is an account resource;
- the second cloud registration request message includes at least one of the following: the identity of the cloud restricted device, The security credential information and user identification of the cloud restricted device.
- the proxy cloud registration instruction is used to instruct the cloud proxy device to perform proxy cloud registration for the cloud restricted device;
- the identifier of the cloud restricted device indicates the target cloud restricted device that needs to be registered by the cloud proxy device proxy;
- the cloud The security credential information of the restricted device is used for the cloud device to perform security authentication on the registered cloud restricted device.
- the resource requested by the first cloud registration request message is an account resource; the first cloud registration request message includes at least one of the following: the identifier of the cloud restricted device, and the access token .
- the access token is the access token of the cloud restricted device obtained by the configurator from the cloud device before the connection between the cloud restricted device and the cloud proxy device is established.
- the resource requested by the second cloud registration request message is an account resource; the second cloud registration request message includes at least one of the following: the identifier of the cloud restricted device and the access token.
- the method further includes: the cloud restricted device obtains an access token sent by the configurator.
- the resource requested by the second cloud registration request message is an account resource; the second cloud registration request message includes at least one of the following: the identifier of the cloud restricted device and the access token.
- the method before the cloud restricted device sends the first resource release request message to the cloud proxy device, the method further includes: the cloud restricted device sends the cloud proxy device to the cloud proxy device.
- the device sends a first cloud login request message; the cloud restricted device receives a second cloud login response message sent by the cloud proxy device; the second cloud login response message includes the valid time of the access token.
- the method further includes: the cloud proxy device receives the first resource release request message sent by the cloud restricted device A cloud login request message, sending a second cloud login request message to the cloud device; the cloud proxy device receives a first cloud login response message sent by the cloud device; the first cloud login response message includes an access token The cloud proxy device sends a second cloud login response message to the cloud restricted device; the second cloud login response message includes the effective time of the access token.
- the cloud restricted device receives a second cloud login response message sent by the cloud proxy device.
- the method further includes: the cloud device receives a second cloud login request message sent by the cloud proxy device; The cloud proxy device sends a first cloud login response message; the first cloud login response message includes the valid time of the access token.
- the resources requested by the first cloud login request message and the second cloud login request message include the following methods:
- the resource requested by the first cloud login request message is a cloud proxy resource; the first cloud login request message includes at least one of the following: proxy cloud login instruction, identification of the cloud restricted device, The access token of the cloud restricted device.
- the resource requested by the second cloud login request message is a session resource; the second cloud login request message includes at least one of the following: a cloud login instruction, an identifier of the cloud restricted device, and access to the cloud restricted device Token, user ID.
- the proxy cloud login instruction is used to instruct the cloud proxy device to perform proxy cloud login as a cloud restricted device.
- the cloud login instruction is for cloud-limited devices to perform cloud login.
- the resource requested by the first cloud login request message is a session resource; the first cloud login request message includes at least one of the following: a cloud login instruction, an identifier of the cloud restricted device, and The access token and user identification of the cloud restricted device.
- the resource requested by the second cloud login request message is a session resource; the second cloud login request message includes at least one of the following: a cloud login instruction, an identifier of the cloud restricted device, and access to the cloud restricted device Token, user ID.
- the cloud login instruction is cloud login by a cloud restricted device.
- the method further includes: the cloud restricted device sends a first update token request message to the cloud proxy device; the cloud restricted device receives the cloud proxy A second update token response message sent by the device; the second update token response message includes at least one of the following: a new access token, an update token, and the validity time of the new access token.
- the method further includes: the cloud proxy device receives a first update token request message sent by the cloud restricted device, and sends a second update token request message to the cloud device; the cloud proxy device Receive a first update token response message sent by the cloud device; the first update token response message includes at least one of the following: a new access token, an update token, and the validity time of the new access token The cloud proxy device sends a second update token response message to the cloud restricted device; the second update token response message includes at least one of the following: a new access token, an update token, the new The effective time of the access token.
- the cloud restricted device receives the second update token response message sent by the cloud proxy device.
- the cloud device receives a second update token request message sent by the cloud proxy device; the cloud device updates a new access token, and sends a first update token response to the cloud proxy device Message; the first update token response message includes at least one of the following: a new access token, an update token, and the validity time of the new access token.
- the resources requested by the first update token request message and the second update token request message include the following manners:
- the resource requested by the first update token request message is a cloud proxy resource; the first update token request message includes at least one of the following: proxy update token indication, the cloud restricted device ID, update token, user ID.
- the resource requested by the second update token request message is an update token resource; the second update token request message includes at least one of the following: an identifier of the cloud restricted device, an update token, and a user identifier.
- the resource requested by the first update token request message is an update token resource; the first update token request message includes at least one of the following: the identification of the cloud restricted device, the update Token, user ID.
- the resource requested by the second update token request message is an update token resource; the second update token request message includes at least one of the following: an identifier of the cloud restricted device, an update token, and a user identifier.
- the method before the cloud restricted device sends the first resource release request message to the cloud proxy device, the method further includes: the cloud restricted device sends the cloud proxy device to the cloud proxy device.
- the device sends a first device binding request message; the resource requested by the first device binding request message is a cloud proxy resource; the cloud restricted device receives a second device binding response message sent by the cloud proxy device.
- the method further includes: the cloud proxy device receives the first resource release request message sent by the cloud restricted device A device binding request message; the resource requested by the first device binding request message is a cloud proxy resource; the cloud proxy device sends a second device binding request message to the cloud device; the second device binding The resource requested by the request message is a binding resource; the cloud proxy device receives the first device binding response message sent by the cloud device; the first device binding response message includes a user identifier; the cloud proxy device sends the The cloud restricted device sends a second device binding response message; the second device binding response message includes a user identifier.
- the cloud restricted device receives the second device binding response message sent by the cloud proxy device.
- the cloud device receives a second device binding request message sent by the cloud proxy device; the resource requested by the second device binding request message is a binding resource; the second device is bound
- the request message includes at least one of the following: the identity of the cloud-restricted device, the security credential, and the security identity of the cloud-restricted device; the cloud device associates the cloud-restricted device with a user identity, and reports to the cloud
- the device sends a first device binding response message; the first device binding response message includes a user identifier.
- the method further includes: the cloud device associating the cloud restricted device with the access token of the cloud proxy device.
- the first device binding request message includes at least one of the following: a proxy device binding instruction, an identifier of the cloud restricted device, and a security credential of the cloud restricted device; and the second device binding response The message includes the user identification.
- the endpoint of the cloud restricted device can be expressed as: "coaps://[fe80::2]:2222"; the identifier of the cloud restricted device can be expressed as: “88b7c7f0-4b51-4e0a- 9faa-cfb439fd7f49"; the endpoint of the cloud proxy device can be expressed as: “coaps://[fe80::3]:3333”; the endpoint of the cloud device can be expressed as: "coaps+tcp://[2001:db8:a ::123]:3333".
- Fig. 3 is a schematic flowchart 1 of a specific example of a resource publishing method provided by an embodiment of the present application; as shown in Fig. 3, the method includes:
- Step 301 The cloud proxy device establishes a connection with the cloud device, and the cloud device establishes an association between the cloud proxy device and the user identity.
- the cloud device has been associated with the cloud proxy device and the user identity.
- the user ID may be an ID assigned to the user by the system after the user completes user registration through the client (or configurator).
- the user ID can be bound to the user account.
- the user can register through the client APP, and the user ID assigned by the system can be obtained after the registration is completed.
- Step 302 The cloud restricted device obtains the information of the cloud proxy device.
- cloud restricted devices there are two ways for cloud restricted devices to obtain cloud proxy device information:
- Method 1 The configurator directly configures the cloud proxy device information for the cloud restricted device, including:
- Step 3021a The configurator sends configuration information to the cloud restricted device, where the configuration information includes cloud proxy device information.
- the configurator may configure cloud proxy device information for the cloud restricted device by updating configuration resources.
- the cloud proxy device configuration resource on the cloud restricted device is expressed as "oic.r.proxyconf”.
- the configuration information may include the cloud proxy resource URI and endpoint information of the cloud proxy device.
- the cloud proxy resource URI is "/oic/cloudproxy”
- the endpoint of the cloud proxy resource is "coaps://[fe80::2" ]:3333”.
- Step 3022a The cloud restricted device sends a response message to the configurator, where the response message is used to confirm that the cloud proxy device information is successfully configured.
- Cloud restricted devices actively discover cloud proxy devices including:
- Step 3021b The cloud restricted device sends a cloud proxy device discovery request, and the cloud proxy device discovery request includes the cloud proxy resource type.
- the cloud-restricted device may send a cloud proxy device discovery request through broadcast or multicast.
- the proxy resource type of the cloud proxy resource can be "oic.r.cloudproxy”.
- Step 3022b The cloud proxy device receives the cloud proxy device discovery request, and sends a cloud proxy device discovery response to the cloud restricted device.
- the cloud proxy device discovery response may include at least one of the following: the proxy resource type of the cloud proxy device, the cloud proxy resource URI, and the endpoint information of the cloud proxy resource.
- the proxy resource type of the returned cloud proxy device is "oic.r.cloudproxy”
- the cloud proxy resource URI is “/oic/cloudproxy”
- the endpoint of the cloud proxy resource is "coaps://[fe80::2]: 3333".
- Step 303 The cloud restricted device and the cloud proxy device establish a secure connection.
- the cloud restricted device establishes a secure connection with the cloud proxy device based on the obtained information of the cloud proxy device.
- Step 304 The cloud restricted device sends a first cloud registration request message to the cloud proxy device, and the resource URI requested by the first cloud registration request message is the cloud proxy resource URI.
- the cloud proxy resource URI is "/oic/cloudproxy”.
- the first cloud registration request message may include at least one of the following: a proxy cloud registration instruction, an identifier of a cloud restricted device, and a security credential of the cloud restricted device.
- the proxy cloud registration instruction is used to instruct the cloud proxy device to perform proxy cloud registration for the cloud restricted device;
- the identifier of the cloud restricted device indicates the target cloud restricted device that needs to be registered by the cloud proxy device proxy, the cloud
- the security certificate of the restricted device is used for the cloud device to perform security authentication on the registered cloud restricted device.
- Step 305 The cloud proxy device sends a second cloud registration request message to the cloud device, and the resource URI requested by the second cloud registration request message is the account resource URI.
- the second cloud registration request message may include at least one of the following: the identity of the cloud restricted device, the security credential of the cloud restricted device, and the user identity.
- Step 306 The cloud device accepts the cloud registration request corresponding to the second cloud registration request message, allocates an access token to the cloud restricted device, and associates the identity of the cloud restricted device with the user identity.
- the cloud restricted device and the cloud proxy device are both associated with the user identification.
- the cloud device allocates an access token to the cloud proxy device, and the allocated access token information may include access token, update token, and access Information such as the expiration time of the token.
- the access token information allocated by the cloud device to the cloud restricted device may be the same as the access token information allocated to the cloud proxy device, or it may be access token information different from the access token information allocated to the cloud proxy device.
- Step 307 The cloud device sends a first cloud registration response message to the cloud proxy device; the first cloud registration response message may include at least one of the following: user identification, access token of the cloud restricted device, and expiration of the access token Time, the update token of the cloud restricted device.
- Step 308 The cloud proxy device sends a second cloud registration response message to the cloud restricted device; the second cloud registration response message includes at least one of the following: user identification, access token of the cloud restricted device, and access token Expiration time, update token of cloud restricted device.
- Step 309 The cloud restricted device sends a first cloud login request message to the cloud proxy device, and the resource URI requested by the first cloud login request message is the cloud proxy resource URI.
- the cloud proxy resource URI is "/oic/cloudproxy”.
- the first cloud login request message may include at least one of the following: a proxy cloud login instruction, an identifier of the cloud restricted device, and an access token of the cloud restricted device.
- the proxy cloud login instruction is used to instruct the cloud proxy device to perform proxy cloud login for the cloud restricted device;
- the identifier of the cloud restricted device indicates the target cloud restricted device that needs to be proxy login by the cloud proxy device;
- the cloud The access token of the restricted device is used for the cloud device to perform security authentication on the logged-in cloud restricted device.
- Step 310 The cloud proxy device sends a second cloud login request message to the cloud device, and the resource URI requested by the second cloud login request message is a session resource URI; for example, the session resource URI is "/oic/sec/session” .
- the second cloud login request message includes at least one of the following: an identification of the cloud restricted device, an access token of the cloud restricted device, a user identification, and a cloud login instruction.
- the cloud login instruction is for cloud-limited devices to perform cloud login.
- Step 311 The cloud device accepts the second cloud login request message and responds to device login.
- the cloud device sends a first cloud login response message to the cloud proxy device; the first cloud login response message includes the access of the cloud restricted device The remaining expiration time of the token.
- Step 312 The cloud proxy device sends a second cloud login response message to the cloud restricted device, where the second cloud login response message includes the remaining expiration time of the cloud restricted device access token.
- step 309-step 312 are optional steps, that is, the device login process is optional.
- the purpose of device login is to confirm that the device maintains a session with the cloud device for subsequent communication.
- the cloud proxy device is logged in, it means that the session between the cloud proxy device and the cloud device is in a state of being maintained, and the cloud restricted device’s message Routing can reuse the conversation between the cloud proxy device and the cloud device, so the cloud restricted device does not need to log in to the cloud.
- Step 313 The cloud restricted device sends a first resource publishing request message to the cloud proxy device.
- the resource URI requested by the first resource publishing request message is the cloud proxy resource URI; for example, the cloud proxy resource URI is "/oic/cloudproxy" .
- the first resource publishing request message includes at least one of the following: an agent publishing resource indication, an identifier of a cloud-restricted device, and a resource link of the cloud-restricted device; wherein, the endpoint of the resource in the resource link is the Endpoints of restricted devices in the cloud.
- the proxy publishing resource indication is used to instruct the cloud proxy device to publish proxy resources for the cloud restricted device;
- the identifier of the cloud restricted device indicates the target cloud restricted device that needs to be proxied by the cloud proxy device to publish resources;
- the resource link of the cloud restricted device indicates the resource that needs to be published to the cloud device.
- the first resource publishing request message may also include the effective time of publishing the resource, that is, the maximum survival time of the resource link published to the resource catalog of the cloud device. Before the period, the cloud device does not receive the resource release request updated by the cloud restricted device, and the resource catalog of the cloud device no longer saves the published resource link.
- the first resource release request message may also include an indication of a cloud restricted device, and the indication of the cloud restricted device is used to indicate that the device that releases the resource is cloud restricted. equipment.
- the content of a cloud restricted device requesting proxy resource publishing is as follows, where the bold font indicates the resource link of the cloud restricted device; the endpoint information in the resource link is the endpoint information of the cloud restricted device itself:
- “di” is the device identifier of the cloud restricted device
- “ttl” is the published resource link lifetime (that is, the effective time of the resource link)
- “dt” is the cloud restricted device indication
- “proxyaction” is the proxy publishing resource Instructions
- “links” are resource links for restricted devices in the cloud.
- Step 314 The cloud proxy device sends a second resource publishing request message to the cloud device.
- the resource URI requested by the second resource publishing request message is a resource catalog resource URI; for example, the resource catalog resource URI is "/oic/rd".
- the second resource release request message includes at least one of the following: the identifier of the cloud restricted device, and the resource link of the cloud restricted device; wherein, the endpoint of the resource in the resource link is the endpoint of the cloud proxy device;
- the target URI in the resource link includes the identifier of the cloud restricted device.
- the second resource release request message may also include an indication of a cloud-restricted device, and the indication of the cloud-restricted device is used to indicate that the device providing the resource link is a cloud-receiving device. Limited equipment.
- the cloud proxy device maintains the association between the endpoint information in the cloud restricted device resource release and the endpoint information in the resource link issued by the cloud proxy device proxy. That is, for the cloud restricted device resources published to the cloud proxy device, the endpoint of the cloud restricted device resource published by the cloud proxy device to the cloud device proxy is the endpoint of the cloud proxy device itself, not the endpoint of the cloud restricted device.
- the “href” parameter in the resource link provided by them may be the same.
- the “href” parameter of all lights may be "/myLightSwitch”.
- the cloud proxy device is issued in "href "The parameter value is preceded by the device ID of the cloud-restricted device.
- the content requested by the cloud proxy device for resource publishing is as follows, the endpoint "eps" in the resource link is the endpoint information of the cloud proxy device, and the "href" parameter of the target URI in the resource link includes the cloud restricted device identifier:
- “di” is the device ID of the cloud restricted device
- “ttl” is the published resource link lifetime (ie the effective time of the resource link)
- “dt” is the cloud restricted device indication
- “links” is the cloud restricted The resource link of the device.
- the “href” parameter of the target URI in the resource link includes the identification of the cloud restricted device “88b7c7f0-4b51-4e0a-9faa-cfb439fd7f49" (the “di” parameter value)
- “eps” is the cloud
- the endpoint information of the proxy device is "coaps://[fe80::3]:3333".
- Step 315 The cloud device accepts the resource publication request corresponding to the second resource publication request message, and adds the resource link of the cloud restricted device to the resource catalog; for example, the resource link of the cloud restricted device is added to "/oic/res" Resources.
- the cloud device maintains the association between the endpoint information in the device resource publication and the endpoint information in the resource link published in the cloud resource catalog. That is, for the resources published to the cloud device, the endpoint of the resource published by the cloud device is the endpoint of the cloud device itself, not the endpoint of the cloud proxy device.
- the "href" parameter value of the target URI in the resource link of the cloud restricted device published by the resource catalog of the cloud device is the same as the "href" parameter value in the resource release request corresponding to the cloud restricted device.
- the cloud device can add the cloud-restricted device identification “di” parameter value based on the “href” parameter value in the resource release request to determine that it is not necessary to add the cloud device identification to the “href” parameter value, that is, the OCF cloud resource directory
- the target URI "href" parameter value in the resource link of the announced cloud restricted device is the same as the parameter value of the "href" parameter value in the device resource release request.
- the cloud device may determine the second The resource link in the resource release request message belongs to the cloud-restricted device, so it is determined that there is no need to add the cloud device identifier to the "href" parameter value in the published resource link, that is, the cloud-restricted cloud device published in the resource catalog of the cloud device.
- the "href" parameter value of the target URI in the resource link of the device is the same as the "href" parameter value in the resource release request corresponding to the cloud restricted device.
- the resource link of the cloud restricted device added under the resource directory of the cloud device (the resource directory URI is "/oic/res") is as follows, the endpoint "eps" in the resource link is the endpoint information of the cloud proxy device, and the resource link is The "href" parameter value of the target URI is the same as the "href" parameter value in the resource link in the resource release of the cloud proxy device:
- Step 316 The cloud device sends a first resource release response message to the cloud proxy device, where the first resource release response message is used to confirm that the resource is successfully released.
- Step 317 The cloud proxy device sends a second resource release response message to the cloud restricted device, and the second resource release response message confirms that the resource of the cloud restricted device is successfully released.
- Step 318 When the access token of the cloud restricted device expires or before the expiration, the cloud restricted device sends a first update token request message to the cloud proxy device; for example, the cloud restricted device sends the cloud proxy The cloud proxy resource "/oic/cloudproxy" of the device sends the first update token request message.
- the first update token request message includes at least one of the following: proxy update token indication, cloud restricted device identification, update token, and user identification.
- proxy update token indication is used to instruct the cloud proxy device to perform proxy access token update for the cloud restricted device;
- the identifier of the cloud restricted device indicates that the cloud proxy device needs to proxy the target cloud proxy device to update the token.
- the update token is a credential used to update the access token of the cloud restricted device;
- the user ID is the target user associated with the cloud restricted device.
- Step 319 The cloud proxy device sends a second update token request message to the cloud device; the second update token request message requests an update token resource; the token resource URI is "/oic/sec/tokenrefresh".
- the second update token request message includes at least one of the following: the identity of the cloud-restricted device, the update token, and the user identity.
- Step 320 The cloud device updates the access token for the cloud restricted device; the cloud device sends a first update token response message to the cloud proxy device, and the first update token response message includes at least one of the following: said The new access token, the update token, and the validity time of the new access token of the cloud restricted device.
- Step 321 The cloud proxy device sends a second update token response message to the cloud restricted device, where the second update token response message includes at least one of the following: a new access token of the cloud restricted device, an update token , The expiration time of the new access token.
- FIG. 4 is a schematic diagram 2 of a specific example of the resource release method provided by an embodiment of the present application; as shown in FIG. 4, the method includes:
- Step 401 The cloud proxy device establishes a connection with the cloud device, and the cloud device establishes an association between the cloud proxy device and the user identity.
- the cloud device has been associated with the cloud proxy device and the user identity.
- the user ID may be an ID assigned to the user by the system after the user completes user registration through the client (or configurator).
- the user ID can be bound to the user account.
- the user can register through the client APP, and the user ID assigned by the system can be obtained after the registration is completed.
- Step 402 The cloud restricted device obtains the information of the cloud proxy device.
- cloud restricted devices there are two ways for cloud restricted devices to obtain cloud proxy device information:
- Method 1 The configurator directly configures the cloud proxy device information for the cloud restricted device, including:
- Step 4021a The configurator sends configuration information to the cloud restricted device, where the configuration information includes cloud proxy device information.
- the configurator can configure cloud proxy device information for the cloud restricted device by updating configuration resources.
- the cloud proxy device configuration resource on the cloud restricted device is expressed as "oic.r.proxyconf”.
- the configuration information may include the cloud proxy resource URI and endpoint information of the cloud proxy device.
- the cloud proxy resource URI is "/oic/cloudproxy”
- the endpoint of the cloud proxy resource is "coaps://[fe80::2" ]:3333”.
- Step 4022a The cloud restricted device sends a response message to the configurator to confirm that the cloud proxy device information is successfully configured.
- Cloud restricted devices actively discover cloud proxy devices including:
- Step 4021b The cloud restricted device sends a cloud proxy device discovery request, and the cloud proxy device discovery request includes the cloud proxy resource type.
- the cloud-restricted device may send a cloud proxy device discovery request through broadcast or multicast.
- the proxy resource type of the cloud proxy resource can be "oic.r.cloudproxy”.
- Step 4022b The cloud proxy device receives the cloud proxy device discovery request, and sends a cloud proxy device discovery response to the cloud restricted device.
- the cloud proxy device discovery response may include at least one of the following: cloud proxy resource type of the cloud proxy device, cloud proxy resource URI, and endpoint information of the cloud proxy resource.
- the proxy resource type of the returned cloud proxy device is "oic.r.cloudproxy”
- the cloud proxy resource URI is “/oic/cloudproxy”
- the endpoint of the cloud proxy resource is "coaps://[fe80::2]: 3333".
- Step 403 The cloud restricted device and the cloud proxy device establish a secure connection.
- the cloud restricted device establishes a secure connection with the cloud proxy device based on the obtained information of the cloud proxy device.
- Step 404 The cloud restricted device sends a first device binding request message to the cloud proxy device.
- the resource URI requested by the first device binding request message is the cloud proxy resource URI; for example, the cloud proxy resource URI is "/oic/ cloudproxy".
- the first device binding request message includes at least one of the following: a proxy device binding instruction, an identifier of the cloud restricted device, and a security credential of the cloud restricted device.
- the proxy device binding instruction is used to instruct the cloud proxy device to perform proxy binding of the device and the user for the cloud restricted device;
- the cloud restricted device identifier indicates the target cloud restricted that needs to be bound by the cloud proxy device proxy Device;
- the security credential of the cloud restricted device is used for the cloud device to perform security authentication on the cloud restricted device that requests binding.
- Step 405 The cloud proxy device sends a second device binding request message to the cloud device, and the resource URI requested by the second device binding request message is the binding resource URI; for example, the binding resource URI is "/oic/bind" .
- the second device binding request message includes at least one of the following: the identity of the cloud restricted device, the security credential of the cloud restricted device, and the user identity.
- Step 406 The cloud device accepts the device binding request corresponding to the second device binding request message, and associates the cloud restricted device with the user ID.
- the cloud restricted device and the cloud proxy device are associated with the user identification.
- the cloud device may also associate the identity of the cloud restricted device with the access token of the cloud proxy device.
- Step 407 The cloud device sends a first device binding response message to the cloud proxy device, where the first device binding response message includes the user identification.
- Step 408 The cloud proxy device sends a second device binding response message to the cloud restricted device, and the second device binding response message includes the user identifier.
- Step 409 The cloud restricted device sends a first resource publishing request message to the cloud proxy device, and the resource URI requested by the first resource publishing request message is the cloud proxy resource URI; for example, the cloud proxy resource URI is "/oic/cloudproxy" .
- the first resource publishing request message includes at least one of the following: an agent publishing resource indication, an identifier of a cloud-restricted device, and a resource link of the cloud-restricted device; wherein, the endpoint of the resource in the resource link is the Endpoints of restricted devices in the cloud.
- the proxy publishing resource indication is used to instruct the cloud proxy device to publish proxy resources for the cloud restricted device;
- the identifier of the cloud restricted device indicates the target cloud restricted device that needs to be proxied by the cloud proxy device to publish resources;
- the resource link of the cloud restricted device indicates the resource that needs to be published to the cloud device.
- the first resource publishing request message may also include the effective time of publishing the resource, that is, the maximum survival time of the resource link published to the resource catalog of the cloud device. Before the period, the cloud device does not receive the resource release request updated by the cloud restricted device, and the resource catalog of the cloud device no longer saves the published resource link.
- the first resource release request message may also include an indication of a cloud restricted device, and the indication of the cloud restricted device is used to indicate that the device that releases the resource is cloud restricted. equipment.
- Step 410 The cloud proxy device sends a second resource publishing request message to the cloud device, and the resource URI requested by the second resource publishing request message is a resource catalog resource URI; for example, the resource catalog resource URI is "/oic/rd" .
- the second resource release request message includes at least one of the following: the identifier of the cloud restricted device, and the resource link of the cloud restricted device; wherein, the endpoint of the resource in the resource link is the endpoint of the cloud proxy device;
- the target URI in the resource link includes the identifier of the cloud restricted device.
- the second resource release request message may also include an indication of a cloud-restricted device, and the indication of the cloud-restricted device is used to indicate that the device providing the resource link is a cloud-receiving device. Limited equipment.
- the cloud proxy device maintains the association between the endpoint information in the cloud restricted device resource release and the endpoint information in the resource link issued by the cloud proxy device proxy. That is, for the cloud restricted device resources published to the cloud proxy device, the endpoint of the cloud restricted device resource published by the cloud proxy device to the cloud device proxy is the endpoint of the cloud proxy device itself, not the endpoint of the cloud restricted device.
- the “href” parameter in the resource link provided by them may be the same.
- the “href” parameter of all lights may be "/myLightSwitch”.
- the cloud proxy device is issued in "href "The parameter value is preceded by the device ID of the cloud-restricted device.
- Step 411 The cloud device accepts the second resource release request message, and adds the resource link of the cloud restricted device to the resource directory; for example, the resource link of the cloud restricted device is added to the /oic/res resource.
- the cloud device maintains the association between the endpoint information in the device resource publication and the endpoint information in the resource link published in the cloud resource catalog. That is, for the resources published to the cloud device, the endpoint of the resource published by the cloud device is the endpoint of the cloud device itself, not the endpoint of the cloud proxy device.
- the "href" parameter value of the target URI in the resource link of the cloud restricted device published by the resource catalog of the cloud device is the same as the parameter value of the "href" parameter value in the resource release request corresponding to the cloud restricted device.
- the cloud device can add the cloud-restricted device identification “di” parameter value based on the “href” parameter value in the resource release request to determine that it is not necessary to add the cloud device identification to the “href” parameter value, that is, the OCF cloud resource directory
- the target URI "href" parameter value in the resource link of the announced cloud restricted device is the same as the parameter value of the "href" parameter value in the device resource release request.
- the cloud device may determine the second The resource link in the resource release request message belongs to the cloud-restricted device, so it is determined that there is no need to add the cloud device identifier to the "href" parameter value in the published resource link, that is, the cloud-restricted device published by the resource catalog of the cloud device.
- the "href" parameter value of the target URI in the resource link of is the same as the parameter value of the "href" parameter value in the resource release request corresponding to the cloud restricted device.
- Step 412 The cloud device sends a first resource release response message to the cloud proxy device, where the first resource release response message is used to confirm that the resource is successfully released.
- Step 413 The cloud proxy device sends a second resource release response message to the cloud restricted device, and the second resource release response message confirms that the resource of the cloud restricted device is successfully released.
- step 409 to step 413 may refer to the detailed description of step 313 to step 317 in the foregoing example, which will not be repeated here.
- step 318 to step 321 in the foregoing embodiment may be included, which will not be repeated here.
- FIG. 5 is the third schematic flowchart of a specific example of a resource publishing method provided by an embodiment of the present application; as shown in FIG. 5, the method includes:
- Step 500 The cloud proxy device establishes a connection with the cloud device, and the cloud device establishes an association between the cloud proxy device and the user identity.
- the cloud device has been associated with the cloud proxy device and the user identity.
- the user ID may be an ID assigned to the user by the system after the user completes user registration through the client (or configurator).
- the user ID can be bound to the user account.
- the user can register through the client APP, and the user ID assigned by the system can be obtained after the registration is completed.
- Step 501 The configurator obtains the access token of the cloud restricted device from the cloud device.
- the configurator may send a token acquisition request message to the cloud device, where the token acquisition request message includes the identification of the cloud restricted device; the configurator obtains the token sent by the cloud device An acquisition response message; the token acquisition response message includes the access token of the cloud restricted device.
- Step 502 The configurator sends the access token to the cloud restricted device.
- the configurator can send the access token to the cloud restricted device by updating the cloud configuration resource of the cloud restricted device (the resource type of the cloud configuration resource is "oic.r.coapcloudconf").
- the configurator can also configure cloud access URIs and cloud identifiers for cloud configuration resources of cloud-limited devices, that is, the attributes of cloud configuration resources can include: access token, cloud access URI, and Cloud logo.
- the configurator does not need to configure the cloud access URI and the cloud identifier for the cloud configuration resources of the cloud restricted device, because the cloud proxy device already has cloud access information.
- Step 503 The cloud restricted device obtains the information of the cloud proxy device.
- the cloud proxy device discovery request includes a cloud proxy resource type.
- the cloud-restricted device may send a cloud proxy device discovery request through broadcast or multicast.
- the proxy resource type of the cloud proxy resource can be "oic.r.cloudproxy”.
- Step 504 The cloud proxy device receives the cloud proxy device discovery request, and sends a cloud proxy device discovery response to the cloud restricted device.
- the cloud proxy device discovery response may include at least one of the following: the type of the proxy resource of the cloud proxy device, and the endpoint information of the cloud proxy resource.
- the proxy resource type of the returned cloud proxy device is "oic.d.cloudproxy”
- the endpoint of the cloud proxy resource is "coaps://[fe80::2]:3333”.
- Step 505 The cloud restricted device and the cloud proxy device establish a secure connection.
- the cloud restricted device establishes a secure connection with the cloud proxy device based on the obtained information of the cloud proxy device.
- Step 506 The cloud restricted device sends a first cloud registration request message to the cloud proxy device, and the resource URI requested by the first cloud registration request message is the account resource URI.
- the account resource URI is "/oic/sec/account”.
- the first cloud registration request message includes at least one of the following: an identifier of the cloud restricted device and an access token of the cloud restricted device.
- the cloud-restricted device identifier indicates a target cloud-restricted device that needs to be registered to the cloud device; the access token of the cloud-restricted device is used for the cloud device to perform security authentication on the registered cloud-restricted device.
- Step 507 The cloud proxy device sends a second cloud registration request message to the cloud device.
- the resource URI requested by the second cloud registration request message is an account resource; for example, the account resource URI is "/oic/sec/account”.
- the second cloud registration request message includes at least one of the following: an identifier of the cloud restricted device, and an access token of the cloud restricted device.
- Step 508 The cloud device accepts the registration request of the second cloud registration request message, allocates the access token, update token, and expiration time of the access token to the cloud restricted device, and associates the identity of the cloud restricted device with the user Logo.
- the cloud device sends the first cloud registration response message to the cloud proxy device.
- the cloud restricted device and the cloud proxy device are both associated with the user identity.
- the first cloud registration response message includes at least one of the following: a user identification, an access token of a cloud restricted device, a valid time of the access token, and an update token of the cloud restricted device.
- Step 509 The cloud proxy device sends a second cloud registration response message to the cloud restricted device, and the second cloud registration response message includes at least one of the following: a user ID, an access token of the cloud restricted device, and an access token Expiration time, update token of cloud restricted device.
- Step 510 The cloud restricted device sends a first cloud login request message to the cloud proxy device, and the resource URI requested by the first cloud login request message is the session resource URI.
- the session resource URI is "/oic/sec/session”.
- the first cloud login request message may include at least one of the following: an identification of the cloud restricted device, an access token of the cloud restricted device, a user identification, and a cloud login instruction.
- the identifier of the cloud restricted device indicates the target cloud restricted device that needs to log in to the cloud device;
- the access token of the cloud restricted device is used by the cloud device to perform security authentication on the logged in cloud restricted device;
- the user ID is the user ID associated with the cloud restricted device;
- the cloud login instruction is used to instruct cloud login.
- Step 511 The cloud proxy device sends a second cloud login request message to the cloud device, and the resource URI requested by the second cloud login request message is the session resource URI.
- the session resource URI is "/oic/sec/session”.
- the second cloud login request message may include at least one of the following: the identifier of the cloud restricted device, the access token of the cloud restricted device, the user identifier, and the cloud login instruction.
- Step 512 The cloud device accepts the login request corresponding to the second cloud login request message, and responds to device login.
- the cloud device sends a first cloud login response message to the cloud proxy device; the first cloud login response message includes cloud restriction The validity time of the device's access token.
- Step 513 The cloud proxy device sends a second cloud login response message to the cloud restricted device, where the second cloud login response message includes the remaining expiration time of the access token of the cloud restricted device.
- step 510 to step 513 are optional steps, that is, the device login process is optional.
- the purpose of device login is to confirm that the device maintains a session with the cloud device for subsequent communication.
- the cloud proxy device is logged in, it means that the session between the cloud proxy device and the cloud device is in a state of being maintained, and the cloud restricted device’s message Routing can reuse the conversation between the cloud proxy device and the cloud device, so the cloud restricted device does not need to log in to the cloud.
- Step 514 The cloud restricted device sends a first resource publishing request message to the cloud proxy device.
- the resource URI requested by the first resource publishing request message is a resource catalog resource, for example, the resource catalog resource URI is "/oic/rd".
- the first resource release request message includes at least one of the following: the identifier of the cloud restricted device, and the resource link of the cloud restricted device.
- the endpoint of the resource in the resource link is the endpoint of the cloud restricted device.
- the identifier of the cloud restricted device indicates the target cloud restricted device that needs to publish resources; the resource link of the cloud restricted device indicates the resource that needs to be published to the cloud device.
- the first resource publishing request message may also include the effective time of publishing the resource, that is, the maximum survival time of the resource link published to the resource catalog of the cloud device. Before the period, the cloud device does not receive the resource publishing request updated by the cloud restricted device, and the resource catalog of the cloud device no longer saves the published resource link.
- the first resource release request message may also include an indication of a cloud restricted device, and the indication of the cloud restricted device is used to indicate that the device that releases the resource is cloud restricted. equipment.
- the content of a cloud restricted device requesting proxy resource publishing is as follows, where the bold font indicates the resource link of the cloud restricted device; the endpoint information in the resource link is the endpoint information of the cloud restricted device itself:
- “di” is the device ID of the cloud restricted device
- “ttl” is the published resource link lifetime (ie the effective time of the resource link)
- “dt” is the cloud restricted device indication
- “links” is the cloud restricted The resource link of the device.
- the “eps” in the resource link is the endpoint information of the cloud restricted device itself "coaps://[fe80::b1d6]:22222".
- Step 515 The cloud proxy device sends a second resource publishing request message to the cloud device.
- the resource URI requested by the second resource publishing request message is a resource catalog resource URI; for example, the resource catalog resource URI is "/oic/rd" .
- the second resource release request message includes at least one of the following: the identifier of the cloud restricted device, and the resource link of the cloud restricted device.
- the endpoint of the resource in the resource link is the endpoint of the cloud proxy device;
- the target URI in the resource link includes the identifier of the cloud-restricted device.
- the second resource release request message may also include an indication of a cloud-restricted device, and the indication of the cloud-restricted device is used to indicate that the device providing the resource link is a cloud-receiving device. Limited equipment.
- the cloud proxy device maintains the association between the endpoint information in the cloud restricted device resource release and the endpoint information in the resource link issued by the cloud proxy device proxy. That is, for the cloud restricted device resources published to the cloud proxy device, the endpoint of the cloud restricted device resource published by the cloud proxy device to the cloud device proxy is the endpoint of the cloud proxy device itself, not the endpoint of the cloud restricted device.
- the “href” parameter in the resource link provided by them may be the same.
- the “href” parameter of all lights may be "/myLightSwitch”.
- the cloud proxy device is issued in "href "The parameter value is preceded by the device ID of the cloud-restricted device.
- the content requested by the cloud proxy device for resource publishing is as follows, the endpoint "eps" in the resource link is the endpoint information of the cloud proxy device, and the "href" parameter of the target URI in the resource link includes the cloud restricted device identifier:
- “di” is the device ID of the cloud restricted device
- “ttl” is the published resource link lifetime (ie the effective time of the resource link)
- “dt” is the cloud restricted device indication
- “links” is the cloud restricted The resource link of the device.
- the “href” parameter of the target URI in the resource link includes the identification of the cloud-restricted device “88b7c7f0-4b51-4e0a-9faa-cfb439fd7f49" (the “di” parameter value)
- “eps” is the cloud
- the endpoint information of the proxy device is "coaps://[fe80::3]:3333".
- Step 516 The cloud device accepts the resource publication request corresponding to the second resource publication request message, and adds the resource link of the cloud restricted device to the resource catalog; for example, the resource link of the cloud restricted device is added to "/oic/res" Resources.
- the cloud device maintains the association between the endpoint information in the device resource publication and the endpoint information in the resource link published in the cloud resource catalog. That is, for the resources published to the cloud device, the endpoint of the resource published by the cloud device is the endpoint of the cloud device itself, not the endpoint of the cloud proxy device.
- the "href" parameter value of the target URI in the resource link of the cloud restricted device published by the resource catalog of the cloud device is the same as the "href" parameter value in the resource release request corresponding to the cloud restricted device.
- the cloud device can add the cloud-restricted device identification “di” parameter value based on the “href” parameter value in the resource release request to determine that it is not necessary to add the cloud device identification to the “href” parameter value, that is, the OCF cloud resource directory
- the target URI "href" parameter value in the resource link of the announced cloud restricted device is the same as the parameter value of the "href" parameter value in the device resource release request.
- the cloud device may determine the second The resource link in the resource release request message belongs to the cloud-restricted device, so it is determined that there is no need to add the cloud device identifier to the "href" parameter value in the published resource link, that is, the cloud-restricted device published by the resource catalog of the cloud device.
- the "href" parameter value of the target URI in the resource link of is the same as the "href" parameter value in the resource release request corresponding to the cloud restricted device.
- the resource link of the cloud restricted device added under the resource directory of the cloud device (the resource directory URI is "/oic/res") is as follows, the endpoint "eps" in the resource link is the endpoint information of the cloud proxy device, and the resource link is The "href" parameter value of the target URI is the same as the "href" parameter value in the resource link in the resource release of the cloud proxy device:
- Step 517 The cloud device sends a first resource release response message to the cloud proxy device, where the first resource release response message is used to confirm that the resource is successfully released.
- Step 518 The cloud proxy device sends a second resource release response message to the cloud restricted device, and the second resource release response message confirms that the resource of the cloud restricted device is successfully released.
- Step 519 When or before the access token of the cloud restricted device expires, the cloud restricted device sends a first update token request message to the cloud proxy device; the first update token request message Request to update the token resource, the token resource URI is "/oic/sec/tokenrefresh".
- the first update token request message includes at least one of the following: the identity of the cloud-restricted device, the update token, and the user identity.
- the identifier of the cloud restricted device represents the target cloud restricted device that needs to update the token
- the update token is a credential for the cloud restricted device to update the access token
- the user identifier represents the cloud restricted device The target user associated with the device.
- Step 520 The cloud proxy device sends a second update token request message to the cloud device; the second update token request message requests an update token resource, and the token resource URI is "/oic/sec/tokenrefresh".
- the second update token request message includes at least one of the following: cloud restricted device identification, update token, and user identification.
- Step 521 The cloud device updates the access token for the cloud restricted device; after the access token is updated successfully, the cloud device sends a first update token response message to the cloud proxy device.
- the first update token response message includes at least one of the following: a new access token of the cloud restricted device, an update token, and the validity time of the new access token.
- Step 522 The cloud proxy device sends a second update token response message to the cloud restricted device, where the second update token response message includes at least one of the following: a new access token of the cloud restricted device, an update token, and State the validity time of the new access token.
- FIG. 6 is a schematic diagram of a structural composition of a cloud-restricted device provided by an embodiment of the present application; as shown in FIG. 6, the device includes: a first connection establishment unit 31 and a first transmission unit 32; wherein,
- the first connection establishing unit 31 is configured to establish a connection with a cloud proxy device
- the first transmission unit 32 is configured to transmit information with the cloud proxy device based on the connection, and the information is used by the cloud proxy device to release resources to the cloud device.
- the first connection establishing unit 31 is configured to obtain information of the cloud proxy device, and establish a connection with the cloud proxy device based on the information.
- the first connection establishment unit 31 is configured to receive configuration information sent by a configurator, and the configuration information includes information of a cloud proxy device.
- the first connection establishment unit 31 is configured to send a discovery request message by broadcast or multicast; the discovery request message includes the cloud proxy resource type; receives a discovery response message; the discovery The response message includes the information of the cloud proxy device.
- the information of the cloud proxy device includes at least one of the following: a cloud proxy resource identifier of the cloud proxy device, and endpoint information of the cloud proxy resource.
- the first transmission unit 32 is configured to instruct the cloud proxy device to release resources to the cloud device based on the connection.
- the first transmission unit 32 is configured to send a first resource publishing request message to the cloud proxy device, and the first resource publishing request message is used to instruct the cloud proxy device to publish resources to the cloud device.
- the resource requested by the first resource release request message includes the following manners:
- the resource requested by the first resource publishing request message is a cloud proxy resource;
- the first resource publishing request message includes at least one of the following: a proxy publishing resource indication, an identifier of the cloud restricted device, The first resource link of the cloud restricted device; the endpoint of the resource in the first resource link of the cloud restricted device is the endpoint of the cloud restricted device.
- the resource requested by the first resource release request message is a resource catalog resource;
- the first resource release request message includes at least one of the following: the identifier of the cloud restricted device, the cloud receiver The first resource link of the restricted device; the endpoint of the resource in the first resource link of the cloud restricted device is the endpoint of the cloud restricted device.
- the first resource release request message further includes at least one of the following: the effective time of the released resource, and an indication of the cloud restricted device.
- the first transmission unit 32 is further configured to receive a second resource release response message sent by the cloud proxy device.
- the second resource release response message is used to confirm the success of resource release.
- the first transmission unit 32 is further configured to send a first cloud registration request to the cloud proxy device before sending the first resource release request message to the cloud proxy device Message; receiving a second cloud registration response message sent by the cloud proxy device; the second cloud registration response message includes at least one of the following: the user identifier, the access token of the cloud restricted device, the access The valid duration of the token, and the update token of the cloud restricted device.
- the resource requested by the first cloud registration request message includes the following methods:
- the resource requested by the first cloud registration request message is a cloud proxy resource;
- the first cloud registration request message includes at least one of the following: proxy cloud registration instruction, identification of the cloud restricted device, Security credential information of the cloud restricted device.
- the resource requested by the first cloud registration request message is an account resource; the first cloud registration request message includes at least one of the following: the identifier of the cloud restricted device, and the access token .
- the first transmission unit 32 is further configured to obtain an access token sent by the configurator.
- the first transmission unit 32 is further configured to send a first cloud login request to the cloud proxy device before sending the first resource release request message to the cloud proxy device Message; receiving a second cloud login response message sent by the cloud proxy device; the second cloud login response message includes the valid time of the access token.
- the resource requested by the first cloud login request message includes the following methods:
- the resource requested by the first cloud login request message is a cloud proxy resource;
- the first cloud login request message includes at least one of the following: proxy cloud login instruction, identification of the cloud restricted device, The access token of the cloud restricted device.
- the resource requested by the first cloud login request message is a session resource;
- the first cloud login request message includes at least one of the following: a cloud login instruction, an identifier of the cloud restricted device, and The access token and user identification of the cloud restricted device.
- the first transmission unit 32 is further configured to send a first update token request message to the cloud proxy device; receive a second update command sent by the cloud proxy device Card response message; the second update token response message includes at least one of the following: a new access token, an update token, and the validity time of the new access token.
- the resource requested by the first update token request message includes the following manners:
- the resource requested by the first update token request message is a cloud proxy resource; the first update token request message includes at least one of the following: proxy update token indication, the cloud restricted device ID, update token, user ID.
- the resource requested by the first update token request message is an update token resource;
- the first update token request message includes at least one of the following: the identification of the cloud restricted device, the update Token, user ID.
- the first transmission unit 32 is further configured to send the first device binding to the cloud proxy device before sending the first resource release request message to the cloud proxy device Request message; the resource requested by the first device binding request message is a cloud proxy resource; receiving a second device binding response message sent by the cloud proxy device.
- the first device binding request message includes at least one of the following: a proxy device binding instruction, an identifier of the cloud restricted device, and a security credential of the cloud restricted device;
- the second device binding response message includes a user identification.
- the first connection establishment unit 31 in the cloud-constrained device can be implemented by the central processing unit (CPU, Central Processing Unit), digital signal processor (DSP, Digital Signal Processor) in the device in actual applications. Signal Processor), Microcontroller Unit (MCU) or Programmable Gate Array (FPGA, Field-Programmable Gate Array);
- the first transmission unit 32 in the device can be implemented by the communication module ( Including: basic communication suite, operating system, communication module, standardized interface and protocol, etc.) and implementation of transceiver antenna.
- the device provided in the above embodiment performs resource release
- only the division of the above program modules is used as an example.
- the above processing can be allocated by different program modules as needed, that is, the device The internal structure is divided into different program modules to complete all or part of the processing described above.
- the device provided in the foregoing embodiment and the resource release method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
- FIG. 7 is a schematic structural composition diagram of a cloud proxy device provided by an embodiment of the present application; as shown in FIG. 7, the cloud proxy device includes: a second connection establishment unit 41, a second transmission unit 42, and a third transmission unit 43 ;among them,
- the second connection establishment unit 41 is configured to establish a connection with a cloud-restricted device
- the second transmission unit 42 is configured to transmit information with the cloud restricted device based on the connection;
- the third transmission unit 43 is configured to publish the resources of the cloud-restricted device to the cloud device based on the information transmitted by the second transmission unit 42.
- the second connection establishment unit 41 is configured to send information of the cloud proxy device to the cloud restricted device, and the information of the cloud proxy device is used for the cloud restricted device established on the cloud proxy device. connection.
- the second connection establishment unit 41 is configured to receive a discovery request message sent by the cloud-restricted device through broadcast or multicast; in the discovery request message Including the cloud proxy resource type; sending a discovery response message to the cloud restricted device; the discovery response message including the cloud proxy device information.
- the information of the cloud proxy device includes at least one of the following: a cloud proxy resource identifier of the cloud proxy device, and endpoint information of the cloud proxy resource.
- the second transmission unit 42 is configured to obtain an indication of the cloud restricted device based on the connection
- the third transmission unit 43 is configured to release resources to the cloud device based on the instruction obtained by the second transmission unit 42.
- the second transmission unit 42 is configured to receive a first resource release request message sent by the cloud restricted device based on the connection, and the first resource release request message is used to instruct the cloud proxy device to send Cloud device release resources;
- the third transmission unit 43 is configured to send a second resource publishing request message to the cloud device; the resource requested by the second resource publishing request message is a resource catalog resource; the second resource publishing request message includes at least one of the following : The identifier of the cloud restricted device, the second resource link of the cloud restricted device; the endpoint of the resource in the second resource link of the cloud restricted device is the endpoint of the cloud proxy device; and it is also configured to Obtaining the first resource release response message sent by the cloud device;
- the second transmission unit 42 is further configured to send a second resource release response message to the cloud restricted device.
- the resource requested by the first resource release request message includes the following manners:
- the resource requested by the first resource publishing request message is a cloud proxy resource;
- the first resource publishing request message includes at least one of the following: a proxy publishing resource indication, an identifier of the cloud restricted device, The first resource link of the cloud restricted device; the endpoint of the resource in the first resource link of the cloud restricted device is the endpoint of the cloud restricted device.
- the resource requested by the first resource release request message is a resource catalog resource;
- the first resource release request message includes at least one of the following: the identifier of the cloud restricted device, the cloud receiver The first resource link of the restricted device; the endpoint of the resource in the first resource link of the cloud restricted device is the endpoint of the cloud restricted device.
- the first resource release request message further includes at least one of the following: the effective time of the released resource and an indication of the cloud-restricted device; the second resource release request message further includes at least one of the following: release resource The effective time of the cloud, the instructions of the cloud restricted device.
- the target identifier in the second resource link of the cloud restricted device includes the identifier of the target resource and the identifier of the cloud restricted device.
- the second transmission unit 42 is further configured to receive the cloud restricted device before receiving the first resource release request message sent by the cloud restricted device based on the connection.
- the third transmission unit 43 is further configured to send a second cloud registration request message to the cloud device; receive a first cloud registration response message sent by the cloud device; the first cloud registration response message includes at least one of the following One: the user identification, the access token of the cloud restricted device, the valid duration of the access token, and the update token of the cloud restricted device;
- the second transmission unit 42 is further configured to send a second cloud registration response message to the cloud restricted device;
- the second cloud registration response message includes at least one of the following: the user identification, the cloud restricted The access token of the device, the valid duration of the access token, and the update token of the cloud restricted device.
- the resource requested by the first cloud registration request message includes the following methods:
- the resource requested by the first cloud registration request message is a cloud proxy resource;
- the first cloud registration request message includes at least one of the following: proxy cloud registration instruction, identification of the cloud restricted device, Security credential information of the cloud restricted device;
- the resource requested by the second cloud registration request message is an account resource; the second cloud registration request message includes at least one of the following: the identifier of the cloud restricted device, the security credential information of the cloud restricted device, and the user Logo.
- the resource requested by the first cloud registration request message is an account resource;
- the first cloud registration request message includes at least one of the following: the identifier of the cloud restricted device, and the access token ;
- the resource requested by the second cloud registration request message is an account resource; the second cloud registration request message includes at least one of the following: the identifier of the cloud restricted device and the access token.
- the access token is an access token obtained by the configurator from the cloud device for the cloud restricted device before the connection between the cloud restricted device and the cloud proxy device is established.
- the second transmission unit 42 is further configured to receive the cloud restricted device before receiving the first resource release request message sent by the cloud restricted device based on the connection.
- the third transmission unit 43 is further configured to send a second cloud login request message to the cloud device; receive a first cloud login response message sent by the cloud device; the first cloud login response message includes an access token Effective time
- the second transmission unit 42 is further configured to send a second cloud login response message to the cloud restricted device; the second cloud login response message includes the valid time of the access token.
- the resource requested by the first cloud login request message includes the following methods:
- the resource requested by the first cloud login request message is a cloud proxy resource;
- the first cloud login request message includes at least one of the following: proxy cloud login instruction, identification of the cloud restricted device, The access token of the cloud restricted device;
- the resource requested by the second cloud login request message is a session resource; the second cloud login request message includes at least one of the following: a cloud login instruction, an identifier of the cloud restricted device, and access to the cloud restricted device Token, user ID.
- the resource requested by the first cloud login request message is a session resource;
- the first cloud login request message includes at least one of the following: a cloud login instruction, an identifier of the cloud restricted device, and The access token and user ID of the cloud restricted device;
- the resource requested by the second cloud login request message is a session resource; the second cloud login request message includes at least one of the following: a cloud login instruction, an identifier of the cloud restricted device, and access to the cloud restricted device Token, user ID.
- the second transmission unit 42 is further configured to receive a first update token request message sent by the cloud restricted device;
- the third transmission unit 43 is further configured to send a second update token request message to the cloud device; receive a first update token response message sent by the cloud device; the first update token response message includes At least one of the following: a new access token, an update token, and the validity time of the new access token;
- the second transmission unit 42 is further configured to send a second update token response message to the cloud restricted device; the second update token response message includes at least one of the following: a new access token, an update command The valid time of the new access token.
- the resource requested by the first update token request message includes the following manners:
- the resource requested by the first update token request message is a cloud proxy resource;
- the first update token request message includes at least one of the following: proxy update token indication, the cloud restricted device ID, update token, user ID;
- the resource requested by the second update token request message is an update token resource; the second update token request message includes at least one of the following: an identifier of the cloud restricted device, an update token, and a user identifier.
- the resource requested by the first update token request message is an update token resource;
- the first update token request message includes at least one of the following: the identification of the cloud restricted device, the update Token, user ID;
- the resource requested by the second update token request message is an update token resource; the second update token request message includes at least one of the following: an identifier of the cloud restricted device, an update token, and a user identifier.
- the second transmission unit 42 is further configured to receive the cloud restricted device before receiving the first resource release request message sent by the cloud restricted device based on the connection.
- the third transmission unit 43 is further configured to send a second device binding request message to the cloud device; the resource requested by the second device binding request message is a binding resource; and receive the first device sent by the cloud device A device binding response message; the first device binding response message includes a user identification;
- the second transmission unit 42 is further configured to send a second device binding response message to the cloud restricted device; the second device binding response message includes a user identifier.
- the first device binding request message includes at least one of the following: a proxy device binding instruction, an identifier of the cloud restricted device, and a security credential of the cloud restricted device;
- the second device binding request message includes at least one of the following: an identifier of the cloud restricted device, a security credential of the cloud restricted device, and a security identifier.
- the second connection establishment unit 41 in the cloud-restricted device can be implemented by the CPU, DSP, MCU, or FPGA in the device in actual applications; the second transmission unit 42 in the device
- the third transmission unit 43 and the third transmission unit 43 can be implemented by a communication module (including: a basic communication kit, an operating system, a communication module, a standardized interface and a protocol, etc.) and a transceiver antenna in practical applications.
- the device provided in the above embodiment performs resource release
- only the division of the above program modules is used as an example.
- the above processing can be allocated by different program modules as needed, that is, the device The internal structure is divided into different program modules to complete all or part of the processing described above.
- the device provided in the foregoing embodiment and the resource release method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, and will not be repeated here.
- FIG. 8 is a schematic diagram 1 of the structural composition of a cloud device provided by an embodiment of the present application; as shown in FIG. 8, the cloud device includes a fourth transmission unit 51 and a publishing unit 52; wherein,
- the fourth transmission unit 51 is configured to obtain resources issued by a cloud proxy device; the resources are resources of the cloud restricted device obtained by the cloud proxy device based on the connection with the cloud restricted device;
- the publishing unit 52 is configured to publish the resource.
- the fourth transmission unit 51 is configured to receive a second resource release request message sent by the cloud proxy device; the resource requested by the second resource release request message is a resource Directory resource; the second resource release request message includes at least one of the following: the identifier of the cloud restricted device, the second resource link of the cloud restricted device; the second resource link of the cloud restricted device The endpoint of the resource is the endpoint of the cloud proxy device.
- the second resource release request message further includes at least one of the following: the effective time of the released resource, and an indication of the cloud restricted device.
- the target identifier in the second resource link of the cloud restricted device includes the identifier of the target resource and the identifier of the cloud restricted device.
- the publishing unit 52 is configured to add the second resource link to the resource catalog; wherein the endpoint of the published resource is the endpoint of the cloud device.
- the publishing unit 52 is further configured to include an indication of a cloud-restricted device in the second resource publishing request message, or to be restricted in the cloud
- the target identifier in the second resource link of the device includes the identifier of the target resource and the identifier of the cloud restricted device
- the published identifier of the target resource is the same as the identifier of the target resource in the second resource link.
- the fourth transmission unit 51 is further configured to send a first resource release response message to the cloud proxy device.
- the device further includes a registration unit 53;
- the fourth transmission unit 51 is further configured to receive a second cloud registration request message sent by the cloud proxy device before obtaining the resources issued by the cloud proxy device;
- the registration unit 53 is configured to allocate an access token to the cloud restricted device, and associate the cloud restricted device with a user ID;
- the fourth transmission unit 51 is further configured to send a first cloud registration response message to the cloud proxy device;
- the first cloud registration response message includes at least one of the following: the user identification, the cloud restricted device The access token of the access token, the valid duration of the access token, and the update token of the cloud restricted device.
- the resource requested by the second cloud registration request message is an account resource;
- the second cloud registration request message includes at least one of the following: an identifier of the cloud restricted device, Security credential information, user ID;
- the resource requested by the second cloud registration request message is an account resource; the second cloud registration request message includes at least one of the following: the identifier of the cloud restricted device and the access token.
- the access token is an access token obtained by the configurator from the cloud device for the cloud restricted device before the connection between the cloud restricted device and the cloud proxy device is established.
- the fourth transmission unit 51 is further configured to receive a second cloud login request message sent by the cloud proxy device before obtaining the resources issued by the cloud proxy device;
- the cloud proxy device sends a first cloud login response message;
- the first cloud login response message includes the valid time of the access token.
- the resource requested by the second cloud login request message is a session resource;
- the second cloud login request message includes at least one of the following: a cloud login instruction, an identifier of the cloud restricted device, and the cloud Access token and user ID of the restricted device.
- the device further includes an update unit 54;
- the fourth transmission unit 51 is further configured to receive a second update token request message sent by the cloud proxy device;
- the update unit 54 is configured to update a new access token
- the fourth transmission unit 51 is further configured to send a first update token response message to the cloud proxy device; the first update token response message includes at least one of the following: a new access token, an update token , The valid time of the new access token.
- the resource requested by the second update token request message is an update token resource;
- the second update token request message includes at least one of the following: the identifier of the cloud restricted device, the update token , User ID.
- the device further includes a binding unit 55;
- the fourth transmission unit 51 is further configured to receive a second device binding request message sent by the cloud proxy device before obtaining the resources issued by the cloud proxy device; the resource requested by the second device binding request message is binding
- the second device binding request message includes at least one of the following: the identity of the cloud restricted device, the security credential, and the security identity of the cloud restricted device;
- the binding unit 55 is configured to associate the cloud restricted device with a user identity
- the fourth transmission unit 51 is further configured to send a first device binding response message to the cloud proxy device; the first device binding response message includes a user identifier.
- the binding unit 55 is further configured to associate the access token of the cloud restricted device and the cloud proxy device.
- the registration unit 53, the update unit 54, the publishing unit 52, and the binding unit 55 in the cloud device can be implemented by the CPU, DSP, MCU or FPGA in the device in practical applications;
- the fourth transmission unit 51 in the device can be implemented by a communication module (including: a basic communication kit, an operating system, a communication module, a standardized interface and a protocol, etc.) and a transceiver antenna in practical applications.
- the device provided in the above embodiment performs resource release
- only the division of the above program modules is used as an example.
- the above processing can be allocated by different program modules as needed, that is, the device The internal structure is divided into different program modules to complete all or part of the processing described above.
- the device provided in the foregoing embodiment and the resource release method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
- FIG. 12 is a schematic structural diagram of a device provided by an embodiment of the present application.
- the device may be a cloud-restricted device, a cloud proxy device, or a cloud device.
- the device 600 includes a processor 610.
- the processor 610 can call and run a computer program from the memory to implement the method.
- the device may further include a memory 620.
- the processor 610 may call and run a computer program from the memory 620 to implement the method in the embodiment of the present application.
- the memory 620 may be a separate device independent of the processor 610, or may be integrated in the processor 610.
- the device may further include a transceiver 630, and the processor 610 may control the transceiver 630 to communicate with other devices. Specifically, it may send information or data to other devices, or receive other devices. Information or data.
- the transceiver 630 may include a transmitter and a receiver.
- the transceiver 630 may further include an antenna, and the number of antennas may be one or more.
- the device may specifically be a cloud-restricted device in an embodiment of this application, and the device may implement the corresponding process implemented by the cloud-restricted device in each method of the embodiment of this application.
- the device may specifically be a cloud-restricted device in an embodiment of this application, and the device may implement the corresponding process implemented by the cloud-restricted device in each method of the embodiment of this application.
- details are not repeated here .
- the device may specifically be a cloud proxy device of an embodiment of the present application, and the device may implement the corresponding process implemented by the cloud proxy device in each method of the embodiment of the present application.
- the device may specifically be a cloud proxy device of an embodiment of the present application, and the device may implement the corresponding process implemented by the cloud proxy device in each method of the embodiment of the present application.
- the device may specifically be a cloud device in an embodiment of the present application, and the device may implement the corresponding process implemented by the cloud device in each method of the embodiment of the present application.
- the device may specifically be a cloud device in an embodiment of the present application, and the device may implement the corresponding process implemented by the cloud device in each method of the embodiment of the present application.
- the device may implement the corresponding process implemented by the cloud device in each method of the embodiment of the present application.
- FIG. 13 is a schematic structural diagram of a chip of an embodiment of the present application.
- the chip 700 shown in FIG. 13 includes a processor 710, and the processor 710 can call and run a computer program from the memory to implement the method in the embodiment of the present application.
- the chip 700 may further include a memory 720.
- the processor 710 may call and run a computer program from the memory 720 to implement the method in the embodiment of the present application.
- the memory 720 may be a separate device independent of the processor 710, or may be integrated in the processor 710.
- the chip 700 may further include an input interface 730.
- the processor 710 may control the input interface 730 to communicate with other devices or chips, and specifically, may obtain information or data sent by other devices or chips.
- the chip 700 may further include an output interface 740.
- the processor 710 can control the output interface 740 to communicate with other devices or chips, and specifically, can output information or data to other devices or chips.
- the chip can be applied to the cloud-restricted device in the embodiment of the present application, and the chip can implement the corresponding process implemented by the cloud-restricted device in each method of the embodiment of the present application.
- the chip can implement the corresponding process implemented by the cloud-restricted device in each method of the embodiment of the present application.
- it will not be omitted here. Repeat.
- the chip can be applied to the cloud proxy device in the embodiments of the present application, and the chip can implement the corresponding processes implemented by the cloud proxy device in the various methods of the embodiments of the present application. For brevity, details are not repeated here.
- the chip can be applied to the cloud device in the embodiment of the present application, and the chip can implement the corresponding process implemented by the cloud device in each method of the embodiment of the present application.
- the chip can implement the corresponding process implemented by the cloud device in each method of the embodiment of the present application.
- the chip mentioned in the embodiment of the present application may also be referred to as a system-level chip, a system-on-chip, a system-on-chip, or a system-on-chip, etc.
- the processor of the embodiment of the present application may be an integrated circuit chip with signal processing capability.
- the steps of the foregoing method embodiments can be completed by hardware integrated logic circuits in the processor or instructions in the form of software.
- the aforementioned processor may be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (ASIC), a ready-made programmable gate array (Field Programmable Gate Array, FPGA) or other Programming logic devices, discrete gates or transistor logic devices, discrete hardware components.
- DSP Digital Signal Processor
- ASIC application specific integrated circuit
- FPGA ready-made programmable gate array
- the methods, steps, and logical block diagrams disclosed in the embodiments of the present application can be implemented or executed.
- the general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
- the steps of the method disclosed in the embodiments of the present application may be directly embodied as being executed and completed by a hardware decoding processor, or executed and completed by a combination of hardware and software modules in the decoding processor.
- the software module can be located in a mature storage medium in the field such as random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, registers.
- the storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
- the memory in the embodiment of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory.
- the non-volatile memory can be read-only memory (Read-Only Memory, ROM), programmable read-only memory (Programmable ROM, PROM), erasable programmable read-only memory (Erasable PROM, EPROM), and electrically available Erase programmable read-only memory (Electrically EPROM, EEPROM) or flash memory.
- the volatile memory may be a random access memory (Random Access Memory, RAM), which is used as an external cache.
- RAM random access memory
- SRAM static random access memory
- DRAM dynamic random access memory
- DRAM synchronous dynamic random access memory
- SDRAM double data rate synchronous dynamic random access memory
- Double Data Rate SDRAM DDR SDRAM
- ESDRAM enhanced synchronous dynamic random access memory
- Synchlink DRAM SLDRAM
- DR RAM Direct Rambus RAM
- the memory in the embodiment of the present application may also be static random access memory (Static RAM, SRAM), dynamic random access memory (Dynamic RAM, DRAM), Synchronous dynamic random access memory (Synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (Double Data Rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (Enhanced SDRAM, ESDRAM), synchronous connection Dynamic random access memory (Synch Link DRAM, SLDRAM) and direct memory bus random access memory (Direct Rambus RAM, DR RAM), etc. That is to say, the memory in the embodiment of the present application is intended to include but not limited to these and any other suitable types of memory.
- the embodiment of the present application also provides a computer-readable storage medium for storing computer programs.
- the computer-readable storage medium may be applied to the cloud-constrained device in the embodiment of the present application, and the computer program enables the computer to execute the corresponding process implemented by the cloud-constrained device in each method of the embodiment of the present application, for It's concise, so I won't repeat it here.
- the computer-readable storage medium can be applied to the cloud proxy device in the embodiment of the present application, and the computer program causes the computer to execute the corresponding process implemented by the cloud proxy device in each method of the embodiment of the present application.
- the computer program causes the computer to execute the corresponding process implemented by the cloud proxy device in each method of the embodiment of the present application.
- I will not repeat them here.
- the computer-readable storage medium may be applied to the cloud device in the embodiment of the present application, and the computer program enables the computer to execute the corresponding process implemented by the cloud device in each method of the embodiment of the present application.
- the computer program enables the computer to execute the corresponding process implemented by the cloud device in each method of the embodiment of the present application.
- the embodiments of the present application also provide a computer program product, including computer program instructions.
- the computer program product can be applied to the cloud-restricted device in the embodiment of this application, and the computer program instructions cause the computer to execute the corresponding process implemented by the cloud-restricted device in each method of the embodiment of this application.
- I will not repeat them here.
- the computer program product can be applied to the cloud proxy device in the embodiment of this application, and the computer program instructions cause the computer to execute the corresponding process implemented by the cloud proxy device in each method of the embodiment of this application.
- the computer program instructions cause the computer to execute the corresponding process implemented by the cloud proxy device in each method of the embodiment of this application.
- the computer program product can be applied to the cloud device in the embodiment of the present application, and the computer program instructions cause the computer to execute the corresponding process implemented by the cloud device in each method of the embodiment of the present application.
- the computer program instructions cause the computer to execute the corresponding process implemented by the cloud device in each method of the embodiment of the present application.
- it will not be omitted here. Repeat.
- the embodiment of the present application also provides a computer program.
- the computer program can be applied to the cloud-restricted device in the embodiment of the present application, and the computer program enables the computer to execute the corresponding process implemented by the cloud-restricted device in each method as in the embodiment of the present application. For brevity, This will not be repeated here.
- the embodiment of the present application also provides a computer program.
- the computer program can be applied to the cloud proxy device in the embodiment of the present application.
- the computer program enables the computer to execute the corresponding process implemented by the cloud proxy device in each method as in the embodiment of the present application. For the sake of brevity, it is not here. Repeat it again.
- the embodiment of the present application also provides a computer program.
- the computer program can be applied to the cloud device in the embodiment of the present application.
- the computer program enables the computer to execute the corresponding process implemented by the cloud device in each method of the embodiment of the present application. For brevity, details are not repeated here .
- the disclosed device and method may be implemented in other ways.
- the device embodiments described above are only illustrative.
- the division of the units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components can be combined or It can be integrated into another system, or some features can be ignored or not implemented.
- the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
- the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
- each unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
- the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
- the technical solution of this application essentially or the part that contributes to the existing technology or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the method described in each embodiment of the present application.
- the aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other media that can store program code .
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
本申请实施例公开了一种资源发布方法和设备,所述方法包括:云端受限设备建立与云端代理设备的连接;所述云端受限设备基于所述连接与所述云端代理设备传输信息,所述信息用于所述云端代理设备向云端设备发布资源。
Description
本申请涉及物联网通信技术领域,具体涉及一种资源发布方法和设备。
开放连接基金会(OCF,Open Connectivity Foundation)是新兴的物联网应用层技术标准组织,OCF为物联网设备之间实现互联互通制定Restful服务框架。OCF部署架构中可包括OCF设备和OCF云端设备;OCF云端设备接受OCF设备发布资源。这种情况下,向OCF云端设备发布资源的OCF设备需要具有连云的能力,OCF设备和OCF云端设备通过建立并维持安全传输层协议(TLS,Transport Layer Security)长连接,实现资源发布和远程通信。
然而,对于不具备连接OCF云端设备的OCF设备,由于无法连接OCF云端设备,也无法进行资源发布。对于该问题,目前尚无有效解决方案。
发明内容
本申请实施例提供一种资源发布方法和设备。
第一方面,本申请实施例提供的资源发布方法,所述方法包括:云端受限设备建立与云端代理设备的连接;所述云端受限设备基于所述连接与所述云端代理设备传输信息,所述信息用于所述云端代理设备向云端设备发布资源。
第二方面,本申请实施例提供的资源发布方法,所述方法包括:云端代理设备与云端受限设备建立连接;所述云端代理设备基于所述连接与所述云端受限设备传输信息,基于所述信息向云端设备发布所述云端受限设备的资源。
第三方面,本申请实施例提供的资源发布方法,所述方法包括:云端设备获得云端代理设备发布的资源;所述资源为所述云端代理设备基于与云端受限设备之间的连接获得的所述云端受限设备的资源;所述云端设备公布所述资源。
第四方面,本申请实施例提供的云端受限设备,所述设备包括:第一连接建立单元和第一传输单元;其中,
所述第一连接建立单元,配置为建立与云端代理设备的连接;
所述第一传输单元,配置为基于所述连接与所述云端代理设备传输信息,所述信息用于所述云端代理设备向云端设备发布资源。
第五方面,本申请实施例提供的云端代理设备,所述云端代理设备包括:第二连接建立单元、第二传输单元和第三传输单元;其中,
所述第二连接建立单元,配置为与云端受限设备建立连接;
所述第二传输单元,配置为基于所述连接与所述云端受限设备传输信息;
所述第三传输单元,配置为基于所述第二传输单元传输的所述信息向云端设备发布所述云端受限设备的资源。
第六方面,本申请实施例提供的云端设备,所述云端设备包括第四传输单元和公布单元;其中,
所述第四传输单元,配置为获得云端代理设备发布的资源;所述资源为所述云端代理设备基于与云端受限设备之间的连接获得的所述云端受限设备的资源;
所述公布单元,配置为公布所述资源。
第七方面,本申请实施例提供的设备,包括处理器和存储器。该存储器用于存储计算机程序,该处理器用于调用并运行该存储器中存储的计算机程序,执行上述第一方面、第二方面或第三方面的资源发布方法。
本申请实施例提供的芯片,用于实现上述的终端的资源发布方法。
具体地,该芯片包括:处理器,用于从存储器中调用并运行计算机程序,使得安装有该芯片的 设备执行上述第一方面、第二方面或第三方面的资源发布方法。
本申请实施例提供的计算机可读存储介质,用于存储计算机程序,该计算机程序使得计算机执行上述第一方面、第二方面或第三方面的资源发布方法。
本申请实施例提供的计算机程序产品,包括计算机程序指令,该计算机程序指令使得计算机执行上述第一方面、第二方面或第三方面的资源发布方法。
本申请实施例提供的计算机程序,当其在计算机上运行时,使得计算机执行上述第一方面、第二方面或第三方面的资源发布方法。
通过上述技术方案,通过云端代理设备与云端受限设备建立连接,使得无法与云端设备进行交互的云端受限设备通过云端代理设备发布资源,解决了云端受限设备无法发布资源到云端设备的问题。
此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:
图1a和图1b均是本申请实施例提供的一种OCF***架构的示意性图;
图2是本申请实施例提供的资源发布方法的流程示意图;
图3是本申请实施例提供的资源发布方法的具体示例的流程示意图一;
图4是本申请实施例提供的资源发布方法的具体示例的流程示意图二;
图5是本申请实施例提供的资源发布方法的具体示例的流程示意图三;
图6是本申请实施例提供的云端受限设备的一种结构组成示意图;
图7是本申请实施例提供的云端代理设备的一种结构组成示意图;
图8是本申请实施例提供的云端设备的结构组成示意图一;
图9是本申请实施例提供的云端设备的结构组成示意图二;
图10是本申请实施例提供的云端设备的结构组成示意图三;
图11是本申请实施例提供的云端设备的结构组成示意图四;
图12是本申请实施例提供的一种设备示意性结构图;
图13是本申请实施例的芯片的示意性结构图。
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
本申请实施例的技术方案可以应用于OCF***,OCF为物联网设备之间实现互联互通制定Restful服务框架,在OCF Restful服务框架中,可通过资源来表述物联网设备、物联网设备的功能服务以及状态数据等信息;其中,所述状态数据可以是物联网设备获得的环境状态数据。图1a和图1b均是本申请实施例提供的一种OCF***架构的示意性图;如图1a所示,提供资源的实体可称为OCF服务端(以下简称服务端),访问资源的实体可称为OCF客户端(以下简称客户端)。例如,获取室内环境状态数据的控制终端可以是客户端,监测室内环境状态数据的传感器设备可以是服务端,客户端和服务端的业务交互是通过对资源的创建、读取、更新、删除或者通知这些资源操作方法而实现。
客户端和服务端之间的交互方式可参照图1a所示,客户端11向服务端12发送请求,所述请求用于对服务端12上的资源进行操作;服务端12执行所述请求对应的资源操作,并向客户端11返回响应,响应中携带资源的表述。
作为一种实施方式,客户端向服务端发送更新(POST)资源请求,对服务端上的资源进行操作,所述更新资源请求操作的对象例如可以是资源统一资源标识符(URI,Uniform Resource Identifier)。例如,服务端上有环境温度资源,则资源URI可以为“/environmentTemperature”。服务端向客户端返回更新资源响应,所述更新资源响应中携带资源的表述。
其中,资源的表述可包括以下至少之一:资源URI、资源类型、资源接口和资源的功能属性等,具体定义如下:
资源URI:在资源表述中用“href”表示,表示服务端资源的地址,“href”的值是具体的资源URI;客户端通过资源URI访问服务端的资源;
资源类型:在资源表述中用“rt”表示,表示资源的类型,例如资源类型“rt”是“oic.r.temperature”,表示温度资源类型;
资源接口:在资源表述中用“if”表示,表示对资源的查看以及资源支持的响应,例如资源接口“if”是“oic.if.a”,表示控制器接口;
资源属性:在资源表述中描述资源的属性信息,例如资源的属性信息是“targetTemperature”,表示温度资源的目标温度属性,又例如资源的属性信息是“currentTemperature”,表示温度资源的当前温度属性,再例如资源的属性信息是“temperatureRange”,表示温度资源的温度范围属性。
OCF定义了所有OCF设备都必须支持的资源发现资源“/oic/res”,用于OCF设备及资源的发现,资源发现资源提供设备资源发现的功能,资源发现资源的URI固定为“/oic/res”。
为表示资源之间的关联关系,OCF定义了资源链接(即资源Links),服务端可以资源链接的形式提供自身所拥有的资源,便于客户端发现服务端的资源。
其中,资源链接的内容如下:
资源链接的内容包括:
■anchor:为上下文URI,表示包含资源链接的属主资源的URI;
■href:目标URI,即资源链接中引用的目标资源的URI;
■rt:表示目标资源的资源类型标识;
■if:表示目标资源支持的接口;
■eps:表示可以访问目标资源的端点;
由于OCF标准协议在传输层采用CoAP协议承载OCF消息,每个服务端需要具有端点,每一个OCF设备必须关联至少一个端点用于发送和接收OCF消息,客户端通过端点可以访问服务端的目标资源。在资源链接的参数中用“eps”数组表示目标资源的端点,具体端点用“ep”表示,即可以通过“eps”参数中“ep”值的地址访问目标资源。例如前述资源链接的示例中,客户端可以通过“eps”参数中“ep”值表示的端点“coaps://[2001:db8:b::c2e5]:22222”访问“href”参数表示的目标资源“/myLightSwitch”。
当OCF设备和控制端不在同一个本地网络中时,如图1b所示,OCF设备和控制端之间可通过OCF云端设备进行通信。其中,所述OCF设备具体可以为图1a中的服务端,所述服务端例如是能够采集环境数据的传感器,所述控制端具体可以是图1a中的客户端,所述客户端例如是手机、电脑等电子设备;电子设备中可安装有特定应用(APP),通过该特定应用进行资源的访问。
其中,OCF云端设备可包括:
云端接口:负责OCF设备的接入管理,以及OCF设备远程通信的消息路由;
授权服务器:负责OCF设备的注册,对OCF设备的访问令牌进行验证;
资源目录:负责提供资源发布和查询服务,OCF设备向资源目录发布资源链接,由资源目录公布OCF设备发布的资源链接,OCF客户端通过检索资源目录可以获取目标设备的资源信息。
为了支持资源发布和资源发现,OCF云端设备需要实现资源目录资源。资源目录资源的URI是“/oic/rd”,资源类型为“oic.wk.rd”。发布设备(即发布资源链接的OCF设备)向OCF云端设备的“/oic/rd”发布资源,发布的内容是OCF设备的资源链接,OCF云端设备的资源目录服务接受资源发布请求后,将OCF设备的资源链接发布到OCF云端设备的“/oic/res”资源下。客户端可以通过查询OCF云端设备以发现其他OCF设备的资源,资源目录代表发布设备提供OCF设备的资源信息,客户端发现OCF设备的资源信息后,通过OCF云端设备请求与相应的OCF设备进行交互。
本申请实施例中,OCF云端设备与OCF设备之间、OCF设备与配置器之间可通过各种通信***进行交互。所述通信***例如全球移动通讯(Global System of Mobile communication,GSM)***、码分多址(Code Division Multiple Access,CDMA)***、宽带码分多址(Wideband Code Division Multiple Access,WCDMA)***、通用分组无线业务(General Packet Radio Service,GPRS)、长期 演进(Long Term Evolution,LTE)***、LTE频分双工(Frequency Division Duplex,FDD)***、LTE时分双工(Time Division Duplex,TDD)、通用移动通信***(Universal Mobile Telecommunication System,UMTS)、全球互联微波接入(Worldwide Interoperability for Microwave Access,WiMAX)通信***、无线局域网(Wireless Local Area Networks,WLAN)、物联网***(Internet of Things System,IoT)或5G***等。其中,5G***或5G网络还可以称为新无线(New Radio,NR)***或NR网络。
本申请各实施例中,在OCF设备与OCF云端设备之间无法连接的情况下,OCF设备称为云端受限设备。
应理解,本文中术语“***”和“网络”在本文中常被可互换使用。本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。
本申请实施例的技术方案主要应用于物联网***,当然,本申请实施例的技术方案并不局限于物联网***,还可以应用于其他类型的通信***。
本申请实施例提供了一种资源发布方法。图2是本申请实施例提供的资源发布方法的流程示意图;如图2所示,所述方法包括:
步骤201:云端受限设备建立与云端代理设备的连接;
步骤202:所述云端受限设备基于所述连接与所述云端代理设备传输信息,所述信息用于所述云端代理设备向云端设备发布资源;
步骤203:所述云端受限设备基于所述信息向云端设备发布所述云端受限设备的资源;
步骤204:云端设备获得云端代理设备发布的资源,公布所述资源;所述资源为所述云端代理设备基于与云端受限设备之间的连接获得的所述云端受限设备的资源。
本实施例步骤201中,所述云端受限设备建立与云端代理设备的连接,包括:所述云端受限设备获得云端代理设备的信息,基于所述信息建立与云端代理设备的连接。相应的,云端代理设备与云端受限设备建立连接,包括:所述云端代理设备向所述云端受限设备发送所述云端代理设备的信息,所述云端代理设备的信息用于所述云端受限设备建立于所述云端代理设备的连接。
本实施例中获得云端代理设备的信息可包括以下方式:
作为一种实施方式,所述云端受限设备获得云端代理设备的信息,包括:所述云端受限设备接收配置器发送的配置信息,所述配置信息中包括云端代理设备的信息。
可以理解,所述云端受限设备虽然无法与云端设备建立连接,但可以与配置器进行交互。其中,所述云端受限设备可通过例如局域网或短距离通信的方式与配置器进行交互,获得所述配置器发送的配置信息。其中,所述局域网例如无线保真(Wi-Fi);所述短距离通信例如蓝牙通信、近场通信(Near Field Communication,NFC)等等。
作为另一种实施方式,所述云端受限设备获得云端代理设备的信息,包括:所述云端受限设备通过广播或组播的方式发送发现请求消息;所述发现请求消息中包括云端代理资源类型;所述云端受限设备接收发现响应消息;所述发现响应消息包括所述云端代理设备的信息。相应的,所述云端代理设备向所述云端受限设备发送所述云端代理设备的信息,包括:所述云端代理设备接收所述云端受限设备通过广播或组播的方式发送的发现请求消息;所述发现请求消息中包括云端代理资源类型;所述云端代理设备向所述云端受限设备发送发现响应消息;所述发现响应消息包括所述云端代理设备的信息。
可以理解,所述云端受限设备虽然无法与云端设备建立连接,但可以与云端代理设备进行交互。其中,所述云端受限设备可通过例如局域网或短距离通信的方式与云端代理设备进行信息交互,云端受限设备可通过单播、广播或组播的方式发送发现请求消息;处在同一局域网之内的云端代理设备,或者通信距离在预设距离范围内的云端代理设备可接收到所述发现请求消息,确定发现请求消息中的云端代理资源类型后,向云端受限设备发送发现响应消息。其中,所述局域网例如Wi-Fi;所述短距离通信例如蓝牙通信等等。
其中,所述云端代理设备的信息包括以下至少之一:云端代理设备的云端代理资源标识、云端代理资源的端点信息。
在本申请的一种可选实施例中,所述云端受限设备基于所述连接与所述云端代理设备传输信息,包括:所述云端受限设备基于所述连接指示所述云端代理设备向云端设备发布资源。相应的,所述云端代理设备基于所述连接与所述云端受限设备传输信息,基于所述信息向云端设备发布资源,包 括:所述云端代理设备基于所述连接获得所述云端受限设备的指示,基于所述指示向云端设备发布资源。
本实施例中,所述云端受限设备基于所述连接指示所述云端代理设备向云端设备发布资源,包括:所述云端受限设备向所述云端代理设备发送第一资源发布请求消息,第一资源发布请求消息用于指示所述云端代理设备向云端设备发布资源。相应的,所述云端代理设备基于所述连接获得所述云端受限设备的指示,基于所述指示向云端设备发布资源,包括:所述云端代理设备基于所述连接接收所述云端受限设备发送的第一资源发布请求消息,第一资源发布请求消息用于指示所述云端代理设备向云端设备发布资源;所述云端代理设备向云端设备发送第二资源发布请求消息;所述第二资源发布请求消息请求的资源为资源目录资源;所述第二资源发布请求消息包括以下至少之一:所述云端受限设备的标识、所述云端受限设备的第二资源链接;所述云端受限设备的第二资源链接中的资源的端点为所述云端代理设备的端点;所述云端代理设备获得所述云端设备发送的第一资源发布响应消息,向所述云端受限设备发送第二资源发布响应消息。相应的,所述云端受限设备接收所述云端代理设备发送的第二资源发布响应消息。
对于云端设备来说,所述云端设备接收云端代理设备发布的资源,包括:所述云端设备接收所述云端代理设备发送的第二资源发布请求消息;所述第二资源发布请求消息请求的资源为资源目录资源;向所述云端代理设备发送第一资源发布响应消息。
本实施例中,所述第一资源发布请求消息请求的资源包括以下方式:
作为一种实施方式,所述第一资源发布请求消息请求的资源为云端代理资源;所述第一资源发布请求消息包括以下至少之一:代理发布资源指示、所述云端受限设备的标识、所述云端受限设备的第一资源链接;所述云端受限设备的第一资源链接中的资源的端点为所述云端受限设备的端点。其中,所述代理发布资源指示用于指示云端代理设备为云端受限设备进行代理资源发布;所述云端受限设备的标识表示需要由云端代理设备代理发布资源的目标云端受限设备;所述云端受限设备的第一资源链接表示需要发布到云端设备的资源。
作为另一种实施方式,所述第一资源发布请求消息请求的资源为资源目录资源;所述第一资源发布请求消息包括以下至少之一:所述云端受限设备的标识、所述云端受限设备的第一资源链接;所述云端受限设备的第一资源链接中的资源的端点为所述云端受限设备的端点。
其中,可选地,所述第一资源发布请求消息还可以包括以下至少之一:发布资源的有效时间、云端受限设备的指示;所述第二资源发布请求消息中还可以包括以下至少之一:发布资源的有效时间、云端受限设备的指示。其中,所述云端受限设备的指示表示发布资源的设备为云端受限设备。
其中,可选地,所述云端受限设备的第二资源链接中的目标标识包括目标资源的标识和所述云端受限设备的标识。
本实施例中,所述云端设备公布所述资源,包括:所述云端设备将所述第二资源链接添加至资源目录中;其中,公布的资源的端点为所述云端设备的端点。
作为一种可选实施方式,所述云端设备将所述第二资源链接添加至资源目录中,包括:在所述第二资源发布请求消息中包括云端受限设备的指示的情况下,或者,在所述云端受限设备的第二资源链接中的目标标识包括目标资源的标识和所述云端受限设备的标识的情况下,公布的目标资源的标识与所述第二资源链接中的目标资源的标识相同。
在本申请的一种可选实施例中,所述云端受限设备向所述云端代理设备发送第一资源发布请求消息之前,所述方法还包括:所述云端受限设备向所述云端代理设备发送第一云端注册请求消息;所述云端受限设备接收所述云端代理设备发送的第二云端注册响应消息;所述第二云端注册响应消息包括以下至少之一:所述用户标识、所述云端受限设备的访问令牌、所述访问令牌的有效时长、所述云端受限设备的更新令牌。相应的,所述云端代理设备基于所述连接接收所述云端受限设备发送的第一资源发布请求消息之前,所述方法还包括:所述云端代理设备接收所述云端受限设备发送的第一云端注册请求消息,向所述云端设备发送第二云端注册请求消息;所述云端代理设备接收所述云端设备发送的第一云端注册响应消息;所述第一云端注册响应消息包括以下至少之一:所述用户标识、所述云端受限设备的访问令牌、所述访问令牌的有效时长、所述云端受限设备的更新令牌;所述云端代理设备向所述云端受限设备发送第二云端注册响应消息;所述第二云端注册响应消息包括以下至少之一:所述用户标识、所述云端受限设备的访问令牌、所述访问令牌的有效时长、所述云端受限设备的更新令牌。相应的,所述云端受限设备接收所述云端代理设备发送的第二云端注册响应消息。
对于云端设备来说,所述云端设备获得云端代理设备发布的资源之前,所述方法还包括:所述 云端设备接收所述云端代理设备发送的第二云端注册请求消息;所述云端设备为所述云端受限设备分配访问令牌,以及关联所述云端受限设备和用户标识;所述云端设备向所述云端代理设备发送第一云端注册响应消息;所述第一云端注册响应消息包括以下至少之一:所述用户标识、所述云端受限设备的访问令牌、所述访问令牌的有效时长、所述云端受限设备的更新令牌。
本实施例中,所述第一云端注册请求消息和第二云端注册请求消息请求的资源包括以下方式:
作为一种实施方式,所述第一云端注册请求消息请求的资源为云端代理资源;所述第一云端注册请求消息包括以下至少之一:代理云端注册指示、所述云端受限设备的标识、所述云端受限设备的安全凭证信息;所述第二云端注册请求消息请求的资源为账号资源;所述第二云端注册请求消息包括以下至少之一:所述云端受限设备的标识、所述云端受限设备的安全凭证信息、用户标识。其中,所述代理云端注册指示用于指示云端代理设备为云端受限设备进行代理云端注册;所述云端受限设备的标识表示需要由云端代理设备代理注册的目标云端受限设备;所述云端受限设备的安全凭证信息用于云端设备对注册的云端受限设备进行安全认证。
作为另一种实施方式,所述第一云端注册请求消息请求的资源为账号资源;所述第一云端注册请求消息包括以下至少之一:所述云端受限设备的标识、所述访问令牌。其中,所述访问令牌为所述云端受限设备与所述云端代理设备建立连接之前、由配置器从云端设备获得的所述云端受限设备的访问令牌。所述第二云端注册请求消息请求的资源为账号资源;所述第二云端注册请求消息包括以下至少之一:所述云端受限设备的标识、所述访问令牌。则本实施例中,所述方法还包括:所述云端受限设备获得配置器发送的访问令牌。所述第二云端注册请求消息请求的资源为账号资源;所述第二云端注册请求消息包括以下至少之一:所述云端受限设备的标识、所述访问令牌。
在本申请的一种可选实施例中,所述云端受限设备向所述云端代理设备发送第一资源发布请求消息之前,所述方法还包括:所述云端受限设备向所述云端代理设备发送第一云端登陆请求消息;所述云端受限设备接收所述云端代理设备发送的第二云端登陆响应消息;所述第二云端登陆响应消息包括访问令牌的有效时间。相应的,所述云端代理设备基于所述连接接收所述云端受限设备发送的第一资源发布请求消息之前,所述方法还包括:所述云端代理设备接收所述云端受限设备发送的第一云端登陆请求消息,向所述云端设备发送第二云端登陆请求消息;所述云端代理设备接收所述云端设备发送的第一云端登陆响应消息;所述第一云端登陆响应消息包括访问令牌的有效时间;所述云端代理设备向所述云端受限设备发送第二云端登陆响应消息;所述第二云端登陆响应消息包括访问令牌的有效时间。相应的,所述云端受限设备接收所述云端代理设备发送的第二云端登陆响应消息。
对于云端设备来说,所述云端设备获得云端代理设备发布的资源之前,所述方法还包括:所述云端设备接收所述云端代理设备发送的第二云端登陆请求消息;所述云端设备向所述云端代理设备发送第一云端登陆响应消息;所述第一云端登陆响应消息包括访问令牌的有效时间。
本实施例中,所述第一云端登陆请求消息和第二云端登陆请求消息请求的资源包括以下方式:
作为一种实施方式,所述第一云端登陆请求消息请求的资源为云端代理资源;所述第一云端登陆请求消息包括以下至少之一:代理云端登陆指示、所述云端受限设备的标识、所述云端受限设备的访问令牌。所述第二云端登陆请求消息请求的资源为会话资源;所述第二云端登陆请求消息包括以下至少之一:云端登陆指示、所述云端受限设备的标识、所述云端受限设备的访问令牌、用户标识。其中,所述代理云端登陆指示用于指示云端代理设备为云端受限设备进行代理云端登录。而所述云端登陆指示为云端受限设备进行云端登录。
作为另一种实施方式,所述第一云端登陆请求消息请求的资源为会话资源;所述第一云端登陆请求消息包括以下至少之一:云端登陆指示、所述云端受限设备的标识、所述云端受限设备的访问令牌、用户标识。所述第二云端登陆请求消息请求的资源为会话资源;所述第二云端登陆请求消息包括以下至少之一:云端登陆指示、所述云端受限设备的标识、所述云端受限设备的访问令牌、用户标识。其中,所述云端登陆指示为云端受限设备进行云端登录。
在本申请的一种可选实施例中,所述方法还包括:所述云端受限设备向所述云端代理设备发送第一更新令牌请求消息;所述云端受限设备接收所述云端代理设备发送的第二更新令牌响应消息;所述第二更新令牌响应消息包括以下至少之一:新的访问令牌、更新令牌、所述新的访问令牌的有效时间。相应的,所述方法还包括:所述云端代理设备接收所述云端受限设备发送的第一更新令牌请求消息,向所述云端设备发送第二更新令牌请求消息;所述云端代理设备接收所述云端设备发送的第一更新令牌响应消息;所述第一更新令牌响应消息包括以下至少之一:新的访问令牌、更新令牌、所述新的访问令牌的有效时间;所述云端代理设备向所述云端受限设备发送第二更新令牌响应 消息;所述第二更新令牌响应消息包括以下至少之一:新的访问令牌、更新令牌、所述新的访问令牌的有效时间。相应的,所述云端受限设备接收所述云端代理设备发送的第二更新令牌响应消息。
对于云端设备来说,所述云端设备接收所述云端代理设备发送的第二更新令牌请求消息;所述云端设备更新新的访问令牌,向所述云端代理设备发送第一更新令牌响应消息;所述第一更新令牌响应消息包括以下至少之一:新的访问令牌、更新令牌、所述新的访问令牌的有效时间。
本实施例中,所述第一更新令牌请求消息和第二更新令牌请求消息请求的资源包括以下方式:
作为一种实施方式,所述第一更新令牌请求消息请求的资源为云端代理资源;所述第一更新令牌请求消息包括以下至少之一:代理更新令牌指示、所述云端受限设备的标识、更新令牌、用户标识。所述第二更新令牌请求消息请求的资源为更新令牌资源;所述第二更新令牌请求消息包括以下至少之一:所述云端受限设备的标识、更新令牌、用户标识。
作为另一种实施方式,所述第一更新令牌请求消息请求的资源为更新令牌资源;所述第一更新令牌请求消息包括以下至少之一:所述云端受限设备的标识、更新令牌、用户标识。所述第二更新令牌请求消息请求的资源为更新令牌资源;所述第二更新令牌请求消息包括以下至少之一:所述云端受限设备的标识、更新令牌、用户标识。
在本申请的一种可选实施例中,所述云端受限设备向所述云端代理设备发送第一资源发布请求消息之前,所述方法还包括:所述云端受限设备向所述云端代理设备发送第一设备绑定请求消息;所述第一设备绑定请求消息请求的资源为云端代理资源;所述云端受限设备接收所述云端代理设备发送的第二设备绑定响应消息。相应的,所述云端代理设备基于所述连接接收所述云端受限设备发送的第一资源发布请求消息之前,所述方法还包括:所述云端代理设备接收所述云端受限设备发送的第一设备绑定请求消息;所述第一设备绑定请求消息请求的资源为云端代理资源;所述云端代理设备向所述云端设备发送第二设备绑定请求消息;所述第二设备绑定请求消息请求的资源为绑定资源;所述云端代理设备接收所述云端设备发送的第一设备绑定响应消息;所述第一设备绑定响应消息包括用户标识;所述云端代理设备向所述云端受限设备发送第二设备绑定响应消息;所述第二设备绑定响应消息包括用户标识。相应的,所述云端受限设备接收所述云端代理设备发送的第二设备绑定响应消息。
对于云端设备来说,所述云端设备接收所述云端代理设备发送的第二设备绑定请求消息;所述第二设备绑定请求消息请求的资源为绑定资源;所述第二设备绑定请求消息包括以下至少之一:所述云端受限设备的标识、所述云端受限设备的安全凭证、安全标识;所述云端设备关联所述云端受限设备和用户标识,向所述云端代理设备发送第一设备绑定响应消息;所述第一设备绑定响应消息包括用户标识。
在一种可选实施例中,所述方法还包括:所述云端设备关联所述云端受限设备和所述云端代理设备的访问令牌。
其中,所述第一设备绑定请求消息包括以下至少之一:代理设备绑定指示、所述云端受限设备的标识、所述云端受限设备的安全凭证;所述第二设备绑定响应消息包括用户标识。
下面结合具体的示例对本申请实施例的资源发布方法进行详细说明。在本申请以下各示例中,云端受限设备的端点可表示为:“coaps://[fe80::2]:2222”;云端受限设备的标识可表示为:“88b7c7f0-4b51-4e0a-9faa-cfb439fd7f49”;云端代理设备的端点可表示为:“coaps://[fe80::3]:3333”;云端设备的端点可表示为:“coaps+tcp://[2001:db8:a::123]:3333”。
示例一
图3是本申请实施例提供的资源发布方法的具体示例的流程示意图一;如图3所示,所述方法包括:
步骤301:云端代理设备与云端设备建立连接,云端设备建立云端代理设备与用户标识的关联。
这里,云端代理设备在接入云端设备的过程中或者接入云端设备完成后,云端设备已关联云端代理设备和用户标识。其中,用户标识可以是用户通过客户端(或配置器)完成用户注册后、***分配给该用户的标识。该用户标识可以与用户账号绑定。例如,用户可通过客户端APP进行注册,注册完成后可获得***分配的用户标识。
步骤302:云端受限设备获得云端代理设备的信息。
其中,云端受限设备获得云端代理设备的信息包括有两种方式:
方式1:由配置器为云端受限设备直接配置云端代理设备信息,具体包括:
步骤3021a:配置器向云端受限设备发送配置信息,所述配置信息中包括云端代理设备信息。
作为一种实施方式,配置器可通过更新配置资源的方式为云端受限设备配置云端代理设备信息, 例如云端受限设备上的云端代理设备配置资源表示为“oic.r.proxyconf”。其中,所述配置信息可包括云端代理设备的云端代理资源URI和端点信息,例如,云端代理资源URI为“/oic/cloudproxy”,云端代理资源的端点为“coaps://[fe80::2]:3333”。
步骤3022a:云端受限设备向配置器发送响应消息,所述响应消息用于确认云端代理设备信息配置成功。
方式2:云端受限设备主动发现云端代理设备,具体包括:
步骤3021b:云端受限设备发送云端代理设备发现请求,所述云端代理设备发现请求中包括云端代理资源类型。
其中,所述云端受限设备可通过广播或组播的方式发送云端代理设备发现请求。其中,云端代理资源的代理资源类型可以为“oic.r.cloudproxy”。
步骤3022b:云端代理设备接收到所述云端代理设备发现请求,向所述云端受限设备发送云端代理设备发现响应。
其中,所述云端代理设备发现响应中可包括以下至少之一:云端代理设备的代理资源类型、云端代理资源URI、云端代理资源的端点信息。例如,返回的云端代理设备的代理资源类型为“oic.r.cloudproxy”,云端代理资源URI为“/oic/cloudproxy”,云端代理资源的端点为“coaps://[fe80::2]:3333”。
步骤303:云端受限设备和云端代理设备建立安全连接。
其中,云端受限设备基于获得的云端代理设备的信息与云端代理设备建立安全连接。
步骤304:云端受限设备向云端代理设备发送第一云端注册请求消息,所述第一云端注册请求消息请求的资源URI为云端代理资源URI。例如,云端代理资源URI为“/oic/cloudproxy”。
所述第一云端注册请求消息中可包括以下至少之一:代理云端注册指示、云端受限设备的标识、云端受限设备的安全凭证。其中,所述代理云端注册指示用于指示云端代理设备为云端受限设备进行代理云端注册;所述云端受限设备的标识表示需要由云端代理设备代理注册的目标云端受限设备,所述云端受限设备的安全凭证用于云端设备对注册的云端受限设备进行安全认证。
步骤305:云端代理设备向云端设备发送第二云端注册请求消息,所述第二云端注册请求消息请求的资源URI为账号资源URI。
其中,账号资源URI为“/oic/sec/account”。所述第二云端注册请求消息中可包括以下至少之一:云端受限设备的标识、云端受限设备的安全凭证、用户标识。
步骤306:云端设备接受第二云端注册请求消息对应的云端注册请求,为云端受限设备分配访问令牌,并关联该云端受限设备的标识和用户标识。
通过该步骤,云端受限设备、云端代理设备均关联所述用户标识。
需要说明的是,在步骤301中,云端代理设备接入云端设备的过程中,云端设备为云端代理设备分配了访问令牌,分配的访问令牌信息可包括访问令牌、更新令牌和访问令牌的过期时间等信息。这里,云端设备为云端受限设备分配的访问令牌信息可以与为云端代理设备分配的访问令牌信息相同,也可以是与为云端代理设备分配的访问令牌信息不同的访问令牌信息。
步骤307:云端设备向云端代理设备发送第一云端注册响应消息;所述第一云端注册响应消息中可包括以下至少之一:用户标识、云端受限设备的访问令牌、访问令牌的过期时间、云端受限设备的更新令牌。
步骤308:云端代理设备向云端受限设备发送第二云端注册响应消息;所述第二云端注册响应消息中包括以下至少之一:用户标识、云端受限设备的访问令牌、访问令牌的过期时间、云端受限设备的更新令牌。
步骤309:云端受限设备向云端代理设备发送第一云端登录请求消息,所述第一云端登录请求消息请求的资源URI为云端代理资源URI。例如,云端代理资源URI为“/oic/cloudproxy”。
这里,所述第一云端登录请求消息中可包括以下至少之一:代理云端登录指示、云端受限设备的标识、云端受限设备的访问令牌。其中,所述代理云端登录指示用于指示云端代理设备为云端受限设备进行代理云端登录;所述云端受限设备的标识表示需要由云端代理设备代理登录的目标云端受限设备;所述云端受限设备的访问令牌用于云端设备对登录的云端受限设备进行安全认证。
步骤310:云端代理设备向云端设备发送第二云端登录请求消息,所述第二云端登录请求消息请求的资源URI为会话资源URI;例如,所述会话资源URI为“/oic/sec/session”。
这里,所述第二云端登录请求消息中包括以下至少之一:云端受限设备的标识、云端受限设备的访问令牌、用户标识、云端登录指示。所述云端登陆指示为云端受限设备进行云端登录。
步骤311:云端设备接受第二云端登录请求消息,进行设备登录的响应,云端设备向云端代理设备发送第一云端登陆响应消息;所述第一云端登陆响应消息包括所述云端受限设备的访问令牌的剩余过期时间。
步骤312:云端代理设备向云端受限设备发送第二云端登录响应消息,所述第二云端登录响应消息中包括所述云端受限设备访问令牌的剩余过期时间。
需要说明的是,步骤309-步骤312是可选步骤,即设备登陆过程为可选步骤。设备登录的目的是确认设备维持着与云端设备的会话用于后续通信,云端代理设备已经登录的情况下,说明云端代理设备与云端设备的会话处于正在维护的状态,而云端受限设备的消息路由可以重用云端代理设备与云端设备的会话,因此云端受限设备不进行云端登录也可以。
步骤313:云端受限设备向云端代理设备发送第一资源发布请求消息,所述第一资源发布请求消息请求的资源URI为云端代理资源URI;例如,云端代理资源URI为“/oic/cloudproxy”。
这里,所述第一资源发布请求消息中包括以下至少之一:代理发布资源指示、云端受限设备的标识、云端受限设备的资源链接;其中,所述资源链接中资源的端点是所述云端受限设备的端点。其中,所述代理发布资源指示用于指示云端代理设备为云端受限设备进行代理资源发布;所述云端受限设备的标识表示需要由云端代理设备代理发布资源的目标云端受限设备;所述云端受限设备的资源链接表示需要发布到云端设备的资源。
在本申请的一种可选实施例中,所述第一资源发布请求消息中还可以包括发布资源的有效时间,即发布到云端设备的资源目录的资源链接的最大生存时间,如果生存时间到期以前,云端设备没有收到所述云端受限设备更新的资源发布请求,则所述云端设备的资源目录会不再保存已发布的资源链接。
在本申请的一种可选实施例中,所述第一资源发布请求消息中还可以包括云端受限设备的指示,所述云端受限设备的指示用于指示发布资源的设备是云端受限设备。
例如,云端受限设备请求进行代理资源发布的内容如下,其中的加粗字体表示云端受限设备的资源链接;资源链接中的端点信息是云端受限设备自身的端点信息:
其中,"di"是云端受限设备的设备标识,"ttl"是发布的资源链接生存时间(即资源链接的有效时间),"dt"是云端受限设备指示,"proxyaction"是代理发布资源指示,"links"是云端受限设备的资源链接。
步骤314云端代理设备向云端设备发送第二资源发布请求消息,所述第二资源发布请求消息请求的资源URI为资源目录资源URI;例如,所述资源目录资源URI为“/oic/rd”。
这里,所述第二资源发布请求消息中包括以下至少之一:云端受限设备的标识、云端受限设备的资源链接;其中,所述资源链接中资源的端点是云端代理设备的端点;所述资源链接中目标URI包括所述云端受限设备的标识。
在本申请的一种可选实施例中,所述第二资源发布请求消息中还可以包括云端受限设备的指示,所述云端受限设备的指示用于指示提供资源链接的设备是云端受限设备。
本实施例中,云端代理设备维护云端受限设备资源发布中的端点信息和云端代理设备代理发布的资源链接中的端点信息之间的关联。即对于发布到云端代理设备的云端受限设备资源,云端代理设备向云端设备代理发布的云端受限设备的资源的端点是云端代理设备自身的端点,而不是云端受限设备的端点。
由于同一类型的云端受限设备发布资源时,它们提供的资源链接中“href”参数可能是相同的。例如所有的灯的“href”参数可能都是“/myLightSwitch”,为了保证云端代理设备收到的所有资源发布请求对于每个发布的资源都有唯一的资源URI,云端代理设备发布时在“href”参数值前面加上云端受限设备的设备标识。
例如,云端代理设备请求进行资源发布的内容如下,资源链接中的端点“eps”是云端代理设备的端点信息,资源链接中的目标URI的“href”参数中包括云端受限设备标识:
其中,"di"是云端受限设备的设备标识,"ttl"是发布的资源链接生存时间(即资源链接的有效时间),"dt"是云端受限设备指示,"links"是云端受限设备的资源链接,该资源链接中的目标URI的"href"参数中包括云端受限设备的标识"88b7c7f0-4b51-4e0a-9faa-cfb439fd7f49"(即"di"参数值),"eps"是云端代理设备的端点信息"coaps://[fe80::3]:3333"。
步骤315:云端设备接受第二资源发布请求消息对应的资源发布请求,将云端受限设备的资源链接添加到资源目录下;例如,将云端受限设备的资源链接添加到“/oic/res”资源下。
这里,云端设备维护设备资源发布中的端点信息和云端资源目录公布的资源链接中的端点信息之间的关联。即对于发布到云端设备的资源,云端设备公布的资源的端点是云端设备自身的端点,而不是云端代理设备的端点。另外,云端设备的资源目录公布的云端受限设备的资源链接中目标URI的“href”参数值和所述云端受限设备对应的资源发布请求中的“href”参数值相同。
云端设备可以根据资源发布请求中“href”参数值加上了云端受限设备的标识“di”参数值,从而确定不需要在“href”参数值加上云端的设备标识,即OCF云端资源目录公布的云端受限设备的资源链接中目标URI“href”参数值和设备资源发布请求中“href”参数值的参数值相同。
在本申请的一种可选实施例中,在所述第二资源发布请求消息中包括云端受限设备的指示的情况下,则云端设备可以根据该云端受限设备的指示确定所述第二资源发布请求消息中的资源链接属于云端受限设备,从而确定不需要再在公布的资源链接中的“href”参数值中加上云端设备的标识,即云端设备的资源目录公布的云端受限设备的资源链接中目标URI的“href”参数值和所述云端受限设备对应的资源发布请求中的“href”的参数值相同。
例如,云端设备的资源目录(资源目录URI为“/oic/res”)下添加的云端受限设备的资源链接如下,资源链接中的端点“eps”是云端代理设备的端点信息,资源链接中的目标URI的“href”参数值和云端代理设备的资源发布中的资源链接中的“href”参数值相同:
步骤316:云端设备向云端代理设备发送第一资源发布响应消息,所述第一资源发布响应消息用于确认资源发布成功。
步骤317:云端代理设备向云端受限设备发送第二资源发布响应消息,所述第二资源发布响应消息确认云端受限设备的资源发布成功。
步骤318:当所述云端受限设备的访问令牌到期时或到期之前,所述云端受限设备向云端代理 设备发送第一更新令牌请求消息;例如,云端受限设备向云端代理设备的云端代理资源“/oic/cloudproxy”发送第一更新令牌请求消息。
这里,所述第一更新令牌请求消息中包括以下至少之一:代理更新令牌指示、云端受限设备标识、更新令牌、用户标识。其中,所述代理更新令牌指示用于指示云端代理设备为云端受限设备进行代理访问令牌更新;所述云端受限设备的标识表示需要由云端代理设备代理更新令牌的目标云端受限设备;所述更新令牌是云端受限设备的用于更新访问令牌的凭证;所述用户标识是云端受限设备关联的目标用户。
步骤319:云端代理设备向云端设备发送第二更新令牌请求消息;所述第二更新令牌请求消息请求更新令牌资源;所述令牌资源URI为“/oic/sec/tokenrefresh”。其中,所述第二更新令牌请求消息中包括以下至少之一:云端受限设备的标识、更新令牌、用户标识。
步骤320:云端设备为所述云端受限设备更新访问令牌;云端设备向云端代理设备发送第一更新令牌响应消息,所述第一更新令牌响应消息中包括以下至少之一:所述云端受限设备的新的访问令牌、更新令牌、所述新的访问令牌的有效时间。
步骤321:云端代理设备向云端受限设备发送第二更新令牌响应消息,所述第二更新令牌响应消息包括以下至少之一:所述云端受限设备新的访问令牌、更新令牌、所述新的访问令牌的过期时间。
示例二
图4是本申请实施例提供的资源发布方法的具体示例的流程示意图二;如图4所示,所述方法包括:
步骤401:云端代理设备与云端设备建立连接,云端设备建立云端代理设备与用户标识的关联。
这里,云端代理设备在接入云端设备的过程中或者接入云端设备完成后,云端设备已关联云端代理设备和用户标识。其中,用户标识可以是用户通过客户端(或配置器)完成用户注册后、***分配给该用户的标识。该用户标识可以与用户账号绑定。例如,用户可通过客户端APP进行注册,注册完成后可获得***分配的用户标识。
步骤402:云端受限设备获得云端代理设备的信息。
其中,云端受限设备获得云端代理设备的信息包括有两种方式:
方式1:由配置器为云端受限设备直接配置云端代理设备信息,具体包括:
步骤4021a:配置器向云端受限设备发送配置信息,所述配置信息中包括云端代理设备信息。
作为一种实施方式,配置器可通过更新配置资源的方式为云端受限设备配置云端代理设备信息,例如云端受限设备上的云端代理设备配置资源表示为“oic.r.proxyconf”。其中,所述配置信息可包括云端代理设备的云端代理资源URI和端点信息,例如,云端代理资源URI为“/oic/cloudproxy”,云端代理资源的端点为“coaps://[fe80::2]:3333”。
步骤4022a:云端受限设备向配置器发送响应消息,确认云端代理设备信息配置成功。
方式2:云端受限设备主动发现云端代理设备,具体包括:
步骤4021b:云端受限设备发送云端代理设备发现请求,所述云端代理设备发现请求中包括云端代理资源类型。
其中,所述云端受限设备可通过广播或组播的方式发送云端代理设备发现请求。其中,云端代理资源的代理资源类型可以为“oic.r.cloudproxy”。
步骤4022b:云端代理设备接收到所述云端代理设备发现请求,向所述云端受限设备发送云端代理设备发现响应。
其中,所述云端代理设备发现响应中可包括以下至少之一:云端代理设备的云端代理资源类型、云端代理资源URI、云端代理资源的端点信息。例如,返回的云端代理设备的代理资源类型为“oic.r.cloudproxy”,云端代理资源URI为“/oic/cloudproxy”,云端代理资源的端点为“coaps://[fe80::2]:3333”。
步骤403:云端受限设备和云端代理设备建立安全连接。
其中,云端受限设备基于获得的云端代理设备的信息与云端代理设备建立安全连接。
步骤404:云端受限设备向云端代理设备发送第一设备绑定请求消息,所述第一设备绑定请求消息请求的资源URI为云端代理资源URI;例如,云端代理资源URI为“/oic/cloudproxy”。
这里,所述第一设备绑定请求消息中包括以下至少之一:代理设备绑定指示、云端受限设备的标识、云端受限设备的安全凭证。其中,所述代理设备绑定指示用于指示云端代理设备为云端受限设备进行设备和用户的代理绑定;所述云端受限设备标识表示需要由云端代理设备代理绑定的目标 云端受限设备;所述云端受限设备的安全凭证用于云端设备对请求绑定的云端受限设备进行安全认证。
步骤405:云端代理设备向云端设备发送第二设备绑定请求消息,所述第二设备绑定请求消息请求的资源URI为绑定资源URI;例如,绑定资源URI为“/oic/bind”。其中,第二设备绑定请求消息中包括以下至少之一:云端受限设备的标识、云端受限设备的安全凭证、用户标识。
步骤406:云端设备接受第二设备绑定请求消息对应的设备绑定请求,关联云端受限设备与用户标识。
通过该步骤,云端受限设备、云端代理设备都关联所述用户标识。
在本申请的一种可选实施例中,云端设备还可以关联云端受限设备的标识和云端代理设备的访问令牌。
步骤407:云端设备向云端代理设备发送第一设备绑定响应消息,所述第一设备绑定响应消息中包括用户标识。
步骤408:云端代理设备向云端受限设备发送第二设备绑定响应消息,第二设备绑定响应消息中包括所述用户标识。
步骤409:云端受限设备向云端代理设备发送第一资源发布请求消息,所述第一资源发布请求消息请求的资源URI为云端代理资源URI;例如,云端代理资源URI为“/oic/cloudproxy”。
这里,所述第一资源发布请求消息中包括以下至少之一:代理发布资源指示、云端受限设备的标识、云端受限设备的资源链接;其中,所述资源链接中资源的端点是所述云端受限设备的端点。其中,所述代理发布资源指示用于指示云端代理设备为云端受限设备进行代理资源发布;所述云端受限设备的标识表示需要由云端代理设备代理发布资源的目标云端受限设备;所述云端受限设备的资源链接表示需要发布到云端设备的资源。
在本申请的一种可选实施例中,所述第一资源发布请求消息中还可以包括发布资源的有效时间,即发布到云端设备的资源目录的资源链接的最大生存时间,如果生存时间到期以前,云端设备没有收到所述云端受限设备更新的资源发布请求,则所述云端设备的资源目录会不再保存已发布的资源链接。
在本申请的一种可选实施例中,所述第一资源发布请求消息中还可以包括云端受限设备的指示,所述云端受限设备的指示用于指示发布资源的设备是云端受限设备。
步骤410:云端代理设备向云端设备发送第二资源发布请求消息,所述第二资源发布请求消息请求的资源URI为资源目录资源URI;例如,所述资源目录资源URI为“/oic/rd”。
这里,所述第二资源发布请求消息中包括以下至少之一:云端受限设备的标识、云端受限设备的资源链接;其中,所述资源链接中资源的端点是云端代理设备的端点;所述资源链接中目标URI包括所述云端受限设备的标识。
在本申请的一种可选实施例中,所述第二资源发布请求消息中还可以包括云端受限设备的指示,所述云端受限设备的指示用于指示提供资源链接的设备是云端受限设备。
本实施例中,云端代理设备维护云端受限设备资源发布中的端点信息和云端代理设备代理发布的资源链接中的端点信息之间的关联。即对于发布到云端代理设备的云端受限设备资源,云端代理设备向云端设备代理发布的云端受限设备的资源的端点是云端代理设备自身的端点,而不是云端受限设备的端点。
由于同一类型的云端受限设备发布资源时,它们提供的资源链接中“href”参数可能是相同的。例如所有的灯的“href”参数可能都是“/myLightSwitch”,为了保证云端代理设备收到的所有资源发布请求对于每个发布的资源都有唯一的资源URI,云端代理设备发布时在“href”参数值前面加上云端受限设备的设备标识。
步骤411:云端设备接受第二资源发布请求消息,将云端受限设备的资源链接添加到资源目录下;例如,将云端受限设备的资源链接添加到/oic/res资源下。
这里,云端设备维护设备资源发布中的端点信息和云端资源目录公布的资源链接中的端点信息之间的关联。即对于发布到云端设备的资源,云端设备公布的资源的端点是云端设备自身的端点,而不是云端代理设备的端点。另外,云端设备的资源目录公布的云端受限设备的资源链接中目标URI的“href”参数值和所述云端受限设备对应的资源发布请求中的“href”参数值的参数值相同。
云端设备可以根据资源发布请求中“href”参数值加上了云端受限设备的标识“di”参数值,从而确定不需要在“href”参数值加上云端的设备标识,即OCF云端资源目录公布的云端受限设备的资源链接中目标URI“href”参数值和设备资源发布请求中“href”参数值的参数值相同。
在本申请的一种可选实施例中,在所述第二资源发布请求消息中包括云端受限设备的指示的情况下,则云端设备可以根据该云端受限设备的指示确定所述第二资源发布请求消息中的资源链接属于云端受限设备,从而确定不需要再在公布的资源链接中的“href”参数值加上云端设备的标识,即云端设备的资源目录公布的云端受限设备的资源链接中目标URI的“href”参数值和所述云端受限设备对应的资源发布请求中的“href”参数值的参数值相同。
步骤412:云端设备向云端代理设备发送第一资源发布响应消息,所述第一资源发布响应消息用于确认资源发布成功。
步骤413:云端代理设备向云端受限设备发送第二资源发布响应消息,所述第二资源发布响应消息确认云端受限设备的资源发布成功。
本实施例中,步骤409至步骤413的详细描述具体可参照前述示例中的步骤313至步骤317的详细描述,这里不再赘述。
本示例中,可选地,步骤413之后,还可以包括前述实施例中的步骤318至步骤321,这里不再赘述。
示例三
图5是本申请实施例提供的资源发布方法的具体示例的流程示意图三;如图5所示,所述方法包括:
步骤500:云端代理设备与云端设备建立连接,云端设备建立云端代理设备与用户标识的关联。
这里,云端代理设备在接入云端设备的过程中或者接入云端设备完成后,云端设备已关联云端代理设备和用户标识。其中,用户标识可以是用户通过客户端(或配置器)完成用户注册后、***分配给该用户的标识。该用户标识可以与用户账号绑定。例如,用户可通过客户端APP进行注册,注册完成后可获得***分配的用户标识。
步骤501:配置器从云端设备获得云端受限设备的访问令牌。
作为一种实施方式,配置器可向云端设备发送令牌获取请求消息,所述令牌获取请求消息中包括所述云端受限设备的标识;所述配置器获得所述云端设备发送的令牌获取响应消息;所述令牌获取响应消息中包括所述云端受限设备的访问令牌。
步骤502:配置器向云端受限设备发送所述访问令牌。其中,配置器可通过更新云端受限设备的云端配置资源(云端配置资源的资源类型为“oic.r.coapcloudconf”)的方式向云端受限设备发送所述访问令牌。
可选地,作为一种实施方式,配置器还可为云端受限设备的云端配置资源配置云端接入URI和云端标识,即云端配置资源的属性可包括:访问令牌、云端接入URI和云端标识。作为另一种实施方式,配置器不需要为云端受限设备的云端配置资源配置云端接入URI和云端标识,因为云端代理设备已经具有云端接入信息。
步骤503:云端受限设备获得云端代理设备的信息。作为一种实施方式,所述云端代理设备发现请求中包括云端代理资源类型。
其中,所述云端受限设备可通过广播或组播的方式发送云端代理设备发现请求。其中,云端代理资源的代理资源类型可以为“oic.r.cloudproxy”。
步骤504:云端代理设备接收到所述云端代理设备发现请求,向所述云端受限设备发送云端代理设备发现响应。
其中,所述云端代理设备发现响应中可包括以下至少之一:云端代理设备的代理资源类型、云端代理资源的端点信息。例如,返回的云端代理设备的代理资源类型为“oic.d.cloudproxy”,云端代理资源的端点为“coaps://[fe80::2]:3333”。
步骤505:云端受限设备和云端代理设备建立安全连接。
其中,云端受限设备基于获得的云端代理设备的信息与云端代理设备建立安全连接。
步骤506:云端受限设备向云端代理设备发送第一云端注册请求消息,所述第一云端注册请求消息请求的资源URI为账号资源URI。例如,所述账号资源URI为“/oic/sec/account”。
这里,所述第一云端注册请求消息中包括以下至少之一:云端受限设备的标识以及云端受限设备的访问令牌。其中,所述云端受限的设备标识表示需要注册到云端设备的目标云端受限设备;所述云端受限设备的访问令牌用于云端设备对注册的云端受限设备进行安全认证。
步骤507:云端代理设备向云端设备发送第二云端注册请求消息,所述第二云端注册请求消息请求的资源URI为账号资源;例如,账号资源URI为“/oic/sec/account”。其中,所述第二云端注册请求消息中包括以下至少之一:云端受限设备的标识、云端受限设备的访问令牌。
步骤508:云端设备接受该第二云端注册请求消息的注册请求,为云端受限设备分配访问令牌、更新令牌和访问令牌的过期时间,并关联所述云端受限设备的标识和用户标识。云端设备向云端代理设备发送第一云端注册响应消息。
通过该步骤,云端受限设备、云端代理设备都关联到所述用户标识。
其中,所述第一云端注册响应消息包括以下至少之一:用户标识、云端受限设备的访问令牌、访问令牌的有效时间、云端受限设备的更新令牌。
步骤509:云端代理设备向云端受限设备发送第二云端注册响应消息,所述第二云端注册响应消息中包括以下至少之一:用户标识、云端受限设备的访问令牌、访问令牌的过期时间、云端受限设备的更新令牌。
步骤510:云端受限设备向云端代理设备发送第一云端登录请求消息,第一云端登录请求消息请求的资源URI为会话资源URI。例如,会话资源URI为“/oic/sec/session”。
其中,所述第一云端登录请求消息中可包括以下至少之一:云端受限设备的标识、云端受限设备的访问令牌、用户标识、云端登录指示。其中,所述云端受限设备的标识表示需要登录到云端设备的目标云端受限设备;所述云端受限设备的访问令牌用于云端设备对登录的云端受限设备进行安全认证;所述用户标识是所述云端受限设备关联的用户标识;所述云端登录指示用于指示进行云端登录。
步骤511:云端代理设备向云端设备发送第二云端登录请求消息,所述第二云端登录请求消息请求的资源URI为会话资源URI。例如,所述会话资源URI为“/oic/sec/session”。
其中,第二云端登录请求消息中可包括以下至少之一:云端受限设备的标识、云端受限设备的访问令牌、用户标识、云端登录指示。
步骤512:云端设备接受该第二云端登录请求消息对应的登录请求,进行设备登录的响应,云端设备向云端代理设备发送第一云端登陆响应消息;所述第一云端登陆响应消息包括云端受限设备的访问令牌的有效时间。
步骤513:云端代理设备向云端受限设备发送第二云端登录响应消息,第二云端登录响应消息包括云端受限设备的访问令牌的剩余过期时间。
需要说明的是,步骤510-步骤513是可选步骤,即设备登陆过程为可选步骤。设备登录的目的是确认设备维持着与云端设备的会话用于后续通信,云端代理设备已经登录的情况下,说明云端代理设备与云端设备的会话处于正在维护的状态,而云端受限设备的消息路由可以重用云端代理设备与云端设备的会话,因此云端受限设备不进行云端登录也可以。
步骤514:云端受限设备向云端代理设备发送第一资源发布请求消息,所述第一资源发布请求消息请求的资源URI为资源目录资源,例如,资源目录资源URI为“/oic/rd”。
这里,所述第一资源发布请求消息中包括以下至少之一:云端受限设备的标识、云端受限设备的资源链接。其中,所述资源链接中资源的端点是云端受限设备的端点。所述云端受限设备的标识表示需要发布资源的目标云端受限设备;所述云端受限设备的资源链接表示需要发布到云端设备的资源。
在本申请的一种可选实施例中,所述第一资源发布请求消息中还可以包括发布资源的有效时间,即发布到云端设备的资源目录的资源链接的最大生存时间,如果生存时间到期以前,云端设备没有收到所述云端受限设备更新的资源发布请求,则所述云端设备的资源目录会不再保存已发布的资源链接。
在本申请的一种可选实施例中,所述第一资源发布请求消息中还可以包括云端受限设备的指示,所述云端受限设备的指示用于指示发布资源的设备是云端受限设备。
例如,云端受限设备请求进行代理资源发布的内容如下,其中的加粗字体表示云端受限设备的资源链接;资源链接中的端点信息是云端受限设备自身的端点信息:
其中,"di"是云端受限设备的设备标识,"ttl"是发布的资源链接生存时间(即资源链接的有效时间),"dt"是云端受限设备指示,"links"是云端受限设备的资源链接,该资源链接中的"eps"是云端受限设备自身的端点信息"coaps://[fe80::b1d6]:22222"。
步骤515:云端代理设备向云端设备发送第二资源发布请求消息,所述第二资源发布请求消息请求的资源URI为资源目录资源URI;例如,所述资源目录资源URI为“/oic/rd”。
这里,所述第二资源发布请求消息中包括以下至少之一:云端受限设备的标识、云端受限设备的资源链接。其中,资源链接中资源的端点是云端代理设备的端点;所述资源链接中的目标URI包括云端受限设备的标识。
在本申请的一种可选实施例中,所述第二资源发布请求消息中还可以包括云端受限设备的指示,所述云端受限设备的指示用于指示提供资源链接的设备是云端受限设备。
本实施例中,云端代理设备维护云端受限设备资源发布中的端点信息和云端代理设备代理发布的资源链接中的端点信息之间的关联。即对于发布到云端代理设备的云端受限设备资源,云端代理设备向云端设备代理发布的云端受限设备的资源的端点是云端代理设备自身的端点,而不是云端受限设备的端点。
由于同一类型的云端受限设备发布资源时,它们提供的资源链接中“href”参数可能是相同的。例如所有的灯的“href”参数可能都是“/myLightSwitch”,为了保证云端代理设备收到的所有资源发布请求对于每个发布的资源都有唯一的资源URI,云端代理设备发布时在“href”参数值前面加上云端受限设备的设备标识。
例如,云端代理设备请求进行资源发布的内容如下,资源链接中的端点“eps”是云端代理设备的端点信息,资源链接中的目标URI的“href”参数中包括云端受限设备标识:
其中,"di"是云端受限设备的设备标识,"ttl"是发布的资源链接生存时间(即资源链接的有效时间),"dt"是云端受限设备指示,"links"是云端受限设备的资源链接,该资源链接中的目标URI的"href"参数中包括云端受限设备的标识"88b7c7f0-4b51-4e0a-9faa-cfb439fd7f49"(即"di"参数值),"eps"是云端代理设备的端点信息"coaps://[fe80::3]:3333"。
步骤516:云端设备接受第二资源发布请求消息对应的资源发布请求,将云端受限设备的资源链接添加到资源目录下;例如,将云端受限设备的资源链接添加到“/oic/res”资源下。
这里,云端设备维护设备资源发布中的端点信息和云端资源目录公布的资源链接中的端点信息之间的关联。即对于发布到云端设备的资源,云端设备公布的资源的端点是云端设备自身的端点,而不是云端代理设备的端点。另外,云端设备的资源目录公布的云端受限设备的资源链接中目标URI的“href”参数值和所述云端受限设备对应的资源发布请求中的“href”参数值相同。
云端设备可以根据资源发布请求中“href”参数值加上了云端受限设备的标识“di”参数值,从而确定不需要在“href”参数值加上云端的设备标识,即OCF云端资源目录公布的云端受限设备的资源链接中目标URI“href”参数值和设备资源发布请求中“href”参数值的参数值相同。
在本申请的一种可选实施例中,在所述第二资源发布请求消息中包括云端受限设备的指示的情况下,则云端设备可以根据该云端受限设备的指示确定所述第二资源发布请求消息中的资源链接属于云端受限设备,从而确定不需要再在公布的资源链接中的“href”参数值加上云端设备的标识,即 云端设备的资源目录公布的云端受限设备的资源链接中目标URI的“href”参数值和所述云端受限设备对应的资源发布请求中的“href”的参数值相同。
例如,云端设备的资源目录(资源目录URI为“/oic/res”)下添加的云端受限设备的资源链接如下,资源链接中的端点“eps”是云端代理设备的端点信息,资源链接中的目标URI的“href”参数值和云端代理设备的资源发布中的资源链接中的“href”参数值相同:
步骤517:云端设备向云端代理设备发送第一资源发布响应消息,所述第一资源发布响应消息用于确认资源发布成功。
步骤518:云端代理设备向云端受限设备发送第二资源发布响应消息,所述第二资源发布响应消息确认云端受限设备的资源发布成功。
步骤519:当所述云端受限设备的访问令牌到期时或到期之前,所述云端受限设备向云端代理设备发送第一更新令牌请求消息;所述第一更新令牌请求消息请求更新令牌资源,所述令牌资源URI为“/oic/sec/tokenrefresh”。
这里,所述第一更新令牌请求消息中包括以下至少之一:云端受限设备的标识、更新令牌、用户标识。其中,所述云端受限设备的标识表示需要更新令牌的目标云端受限设备;所述更新令牌是云端受限设备的用于更新访问令牌的凭证;所述用户标识表示云端受限设备关联的目标用户。
步骤520:云端代理设备向云端设备发送第二更新令牌请求消息;所述第二更新令牌请求消息请求更新令牌资源,所述令牌资源URI为“/oic/sec/tokenrefresh”。其中,所述第二更新令牌请求消息中包括以下至少之一:云端受限设备标识、更新令牌、用户标识。
步骤521:云端设备为所述云端受限设备更新访问令牌;访问令牌更新成功后,云端设备向云端代理设备发送第一更新令牌响应消息。其中,所述第一更新令牌响应消息中包括以下至少之一:云端受限设备新的访问令牌、更新令牌、所述新的访问令牌的有效时间。
步骤522:云端代理设备向云端受限设备发送第二更新令牌响应消息,所述第二更新令牌响应消息包括以下至少之一:云端受限设备新的访问令牌、更新令牌、所述新的访问令牌的有效时间。
通过云端代理设备与云端受限设备建立连接,使得无法与云端设备进行交互的云端受限设备通过云端代理设备发布资源,解决了云端受限设备无法发布资源到云端设备的问题。
本申请实施例还提供了一种云端受限设备。图6是本申请实施例提供的云端受限设备的一种结构组成示意图;如图6所示,所述设备包括:第一连接建立单元31和第一传输单元32;其中,
所述第一连接建立单元31,配置为建立与云端代理设备的连接;
所述第一传输单元32,配置为基于所述连接与所述云端代理设备传输信息,所述信息用于所述云端代理设备向云端设备发布资源。
在本申请的一种可选实施例中,所述第一连接建立单元31,配置为获得云端代理设备的信息,基于所述信息建立与云端代理设备的连接。
本实施例中获得云端代理设备的信息可包括以下方式:
作为一种实施方式,所述第一连接建立单元31,配置为接收配置器发送的配置信息,所述配置信息中包括云端代理设备的信息。
作为另一种实施方式,所述第一连接建立单元31,配置为通过广播或组播的方式发送发现请求消息;所述发现请求消息中包括云端代理资源类型;接收发现响应消息;所述发现响应消息包括所述云端代理设备的信息。
其中,所述云端代理设备的信息包括以下至少之一:云端代理设备的云端代理资源标识、云端代理资源的端点信息。
在本申请的一种可选实施例中,所述第一传输单元32,配置为基于所述连接指示所述云端代理设备向云端设备发布资源。
本实施例中,所述第一传输单元32,配置为向所述云端代理设备发送第一资源发布请求消息,第一资源发布请求消息用于指示所述云端代理设备向云端设备发布资源。
本实施例中,所述第一资源发布请求消息请求的资源包括以下方式:
作为一种实施方式,所述第一资源发布请求消息请求的资源为云端代理资源;所述第一资源发布请求消息包括以下至少之一:代理发布资源指示、所述云端受限设备的标识、所述云端受限设备的第一资源链接;所述云端受限设备的第一资源链接中的资源的端点为所述云端受限设备的端点。
作为另一种实施方式,所述第一资源发布请求消息请求的资源为资源目录资源;所述第一资源发布请求消息包括以下至少之一:所述云端受限设备的标识、所述云端受限设备的第一资源链接;所述云端受限设备的第一资源链接中的资源的端点为所述云端受限设备的端点。
可选地,所述第一资源发布请求消息还包括以下至少之一:发布资源的有效时间、云端受限设备的指示。
在本申请的一种可选实施例中,所述第一传输单元32,还配置为接收所述云端代理设备发送的第二资源发布响应消息。所述第二资源发布响应消息用于确认资源发布成功。
在本申请的一种可选实施例中,所述第一传输单元32,还配置为向所述云端代理设备发送第一资源发布请求消息之前,向所述云端代理设备发送第一云端注册请求消息;接收所述云端代理设备发送的第二云端注册响应消息;所述第二云端注册响应消息包括以下至少之一:所述用户标识、所述云端受限设备的访问令牌、所述访问令牌的有效时长、所述云端受限设备的更新令牌。
本实施例中,所述第一云端注册请求消息请求的资源包括以下方式:
作为一种实施方式,所述第一云端注册请求消息请求的资源为云端代理资源;所述第一云端注册请求消息包括以下至少之一:代理云端注册指示、所述云端受限设备的标识、所述云端受限设备的安全凭证信息。
作为另一种实施方式,所述第一云端注册请求消息请求的资源为账号资源;所述第一云端注册请求消息包括以下至少之一:所述云端受限设备的标识、所述访问令牌。
在本申请的一种可选实施例中,所述第一传输单元32,还配置为获得配置器发送的访问令牌。
在本申请的一种可选实施例中,所述第一传输单元32,还配置为向所述云端代理设备发送第一资源发布请求消息之前,向所述云端代理设备发送第一云端登陆请求消息;接收所述云端代理设备发送的第二云端登陆响应消息;所述第二云端登陆响应消息包括访问令牌的有效时间。
本实施例中,所述第一云端登陆请求消息请求的资源包括以下方式:
作为一种实施方式,所述第一云端登陆请求消息请求的资源为云端代理资源;所述第一云端登陆请求消息包括以下至少之一:代理云端登陆指示、所述云端受限设备的标识、所述云端受限设备的访问令牌。
作为另一种实施方式,所述第一云端登陆请求消息请求的资源为会话资源;所述第一云端登陆请求消息包括以下至少之一:云端登陆指示、所述云端受限设备的标识、所述云端受限设备的访问令牌、用户标识。
在本申请的一种可选实施例中,所述第一传输单元32,还配置为向所述云端代理设备发送第一更新令牌请求消息;接收所述云端代理设备发送的第二更新令牌响应消息;所述第二更新令牌响应消息包括以下至少之一:新的访问令牌、更新令牌、所述新的访问令牌的有效时间。
本实施例中,所述第一更新令牌请求消息请求的资源包括以下方式:
作为一种实施方式,所述第一更新令牌请求消息请求的资源为云端代理资源;所述第一更新令牌请求消息包括以下至少之一:代理更新令牌指示、所述云端受限设备的标识、更新令牌、用户标识。
作为另一种实施方式,所述第一更新令牌请求消息请求的资源为更新令牌资源;所述第一更新令牌请求消息包括以下至少之一:所述云端受限设备的标识、更新令牌、用户标识。
在本申请的一种可选实施例中,所述第一传输单元32,还配置为向所述云端代理设备发送第一资源发布请求消息之前,向所述云端代理设备发送第一设备绑定请求消息;所述第一设备绑定请求消息请求的资源为云端代理资源;接收所述云端代理设备发送的第二设备绑定响应消息。
其中,所述第一设备绑定请求消息包括以下至少之一:代理设备绑定指示、所述云端受限设备的标识、所述云端受限设备的安全凭证;
所述第二设备绑定响应消息包括用户标识。
本申请实施例中,所述云端受限设备中的第一连接建立单元31,在实际应用中可由所述设备中的中央处理器(CPU,Central Processing Unit)、数字信号处理器(DSP,Digital Signal Processor)、微控制单元(MCU,Microcontroller Unit)或可编程门阵列(FPGA,Field-Programmable Gate Array)实现;所述设备中的第一传输单元32,在实际应用中可通过通信模组(包含:基础通信套件、操作 ***、通信模块、标准化接口和协议等)及收发天线实现。
需要说明的是:上述实施例提供的设备在进行资源发布时,仅以上述各程序模块的划分进行举例说明,实际应用中,可以根据需要而将上述处理分配由不同的程序模块完成,即将设备的内部结构划分成不同的程序模块,以完成以上描述的全部或者部分处理。另外,上述实施例提供的设备与资源发布方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。
本申请实施例还提供了一种云端代理设备。图7是本申请实施例提供的云端代理设备的一种结构组成示意图;如图7所示,所述云端代理设备包括:第二连接建立单元41、第二传输单元42和第三传输单元43;其中,
所述第二连接建立单元41,配置为与云端受限设备建立连接;
所述第二传输单元42,配置为基于所述连接与所述云端受限设备传输信息;
所述第三传输单元43,配置为基于所述第二传输单元42传输的所述信息向云端设备发布所述云端受限设备的资源。
所述第二连接建立单元41,配置为向所述云端受限设备发送所述云端代理设备的信息,所述云端代理设备的信息用于所述云端受限设备建立于所述云端代理设备的连接。
在本申请的一种可选实施例中,,所述第二连接建立单元41,配置为接收所述云端受限设备通过广播或组播的方式发送的发现请求消息;所述发现请求消息中包括云端代理资源类型;向所述云端受限设备发送发现响应消息;所述发现响应消息包括所述云端代理设备的信息。
其中,所述云端代理设备的信息包括以下至少之一:云端代理设备的云端代理资源标识、云端代理资源的端点信息。
在本申请的一种可选实施例中,所述第二传输单元42,配置为基于所述连接获得所述云端受限设备的指示;
所述第三传输单元43,配置为基于所述第二传输单元42获得的所述指示向云端设备发布资源。
本实施例中,所述第二传输单元42,配置为基于所述连接接收所述云端受限设备发送的第一资源发布请求消息,第一资源发布请求消息用于指示所述云端代理设备向云端设备发布资源;
所述第三传输单元43,配置为向云端设备发送第二资源发布请求消息;所述第二资源发布请求消息请求的资源为资源目录资源;所述第二资源发布请求消息包括以下至少之一:所述云端受限设备的标识、所述云端受限设备的第二资源链接;所述云端受限设备的第二资源链接中的资源的端点为所述云端代理设备的端点;还配置为获得所述云端设备发送的第一资源发布响应消息;
所述第二传输单元42,还配置为向所述云端受限设备发送第二资源发布响应消息。
本实施例中,所述第一资源发布请求消息请求的资源包括以下方式:
作为一种实施方式,所述第一资源发布请求消息请求的资源为云端代理资源;所述第一资源发布请求消息包括以下至少之一:代理发布资源指示、所述云端受限设备的标识、所述云端受限设备的第一资源链接;所述云端受限设备的第一资源链接中的资源的端点为所述云端受限设备的端点。
作为另一种实施方式,所述第一资源发布请求消息请求的资源为资源目录资源;所述第一资源发布请求消息包括以下至少之一:所述云端受限设备的标识、所述云端受限设备的第一资源链接;所述云端受限设备的第一资源链接中的资源的端点为所述云端受限设备的端点。
可选地,所述第一资源发布请求消息还包括以下至少之一:发布资源的有效时间、云端受限设备的指示;所述第二资源发布请求消息中还包括以下至少之一:发布资源的有效时间、云端受限设备的指示。
在本申请的一种可选实施例中,所述云端受限设备的第二资源链接中的目标标识包括目标资源的标识和所述云端受限设备的标识。
在本申请的一种可选实施例中,所述第二传输单元42,还配置为基于所述连接接收所述云端受限设备发送的第一资源发布请求消息之前,接收所述云端受限设备发送的第一云端注册请求消息;
所述第三传输单元43,还配置为向所述云端设备发送第二云端注册请求消息;接收所述云端设备发送的第一云端注册响应消息;所述第一云端注册响应消息包括以下至少之一:所述用户标识、所述云端受限设备的访问令牌、所述访问令牌的有效时长、所述云端受限设备的更新令牌;
所述第二传输单元42,还配置为向所述云端受限设备发送第二云端注册响应消息;所述第二云端注册响应消息包括以下至少之一:所述用户标识、所述云端受限设备的访问令牌、所述访问令牌的有效时长、所述云端受限设备的更新令牌。
本实施例中,所述第一云端注册请求消息请求的资源包括以下方式:
作为一种实施方式,所述第一云端注册请求消息请求的资源为云端代理资源;所述第一云端注 册请求消息包括以下至少之一:代理云端注册指示、所述云端受限设备的标识、所述云端受限设备的安全凭证信息;
所述第二云端注册请求消息请求的资源为账号资源;所述第二云端注册请求消息包括以下至少之一:所述云端受限设备的标识、所述云端受限设备的安全凭证信息、用户标识。
作为另一种实施方式,所述第一云端注册请求消息请求的资源为账号资源;所述第一云端注册请求消息包括以下至少之一:所述云端受限设备的标识、所述访问令牌;
所述第二云端注册请求消息请求的资源为账号资源;所述第二云端注册请求消息包括以下至少之一:所述云端受限设备的标识、所述访问令牌。
其中,所述访问令牌为所述云端受限设备与所述云端代理设备建立连接之前、由配置器从所述云端设备为所述云端受限设备获得的访问令牌。
在本申请的一种可选实施例中,所述第二传输单元42,还配置为基于所述连接接收所述云端受限设备发送的第一资源发布请求消息之前,接收所述云端受限设备发送的第一云端登陆请求消息;
所述第三传输单元43,还配置为向所述云端设备发送第二云端登陆请求消息;接收所述云端设备发送的第一云端登陆响应消息;所述第一云端登陆响应消息包括访问令牌的有效时间;
所述第二传输单元42,还配置为向所述云端受限设备发送第二云端登陆响应消息;所述第二云端登陆响应消息包括访问令牌的有效时间。
本实施例中,所述第一云端登陆请求消息请求的资源包括以下方式:
作为一种实施方式,所述第一云端登陆请求消息请求的资源为云端代理资源;所述第一云端登陆请求消息包括以下至少之一:代理云端登陆指示、所述云端受限设备的标识、所述云端受限设备的访问令牌;
所述第二云端登陆请求消息请求的资源为会话资源;所述第二云端登陆请求消息包括以下至少之一:云端登陆指示、所述云端受限设备的标识、所述云端受限设备的访问令牌、用户标识。
作为另一种实施方式,所述第一云端登陆请求消息请求的资源为会话资源;所述第一云端登陆请求消息包括以下至少之一:云端登陆指示、所述云端受限设备的标识、所述云端受限设备的访问令牌、用户标识;
所述第二云端登陆请求消息请求的资源为会话资源;所述第二云端登陆请求消息包括以下至少之一:云端登陆指示、所述云端受限设备的标识、所述云端受限设备的访问令牌、用户标识。
在本申请的一种可选实施例中,所述第二传输单元42,还配置为接收所述云端受限设备发送的第一更新令牌请求消息;
所述第三传输单元43,还配置为向所述云端设备发送第二更新令牌请求消息;接收所述云端设备发送的第一更新令牌响应消息;所述第一更新令牌响应消息包括以下至少之一:新的访问令牌、更新令牌、所述新的访问令牌的有效时间;
所述第二传输单元42,还配置为向所述云端受限设备发送第二更新令牌响应消息;所述第二更新令牌响应消息包括以下至少之一:新的访问令牌、更新令牌、所述新的访问令牌的有效时间。
本实施例中,所述第一更新令牌请求消息请求的资源包括以下方式:
作为一种实施方式,所述第一更新令牌请求消息请求的资源为云端代理资源;所述第一更新令牌请求消息包括以下至少之一:代理更新令牌指示、所述云端受限设备的标识、更新令牌、用户标识;
所述第二更新令牌请求消息请求的资源为更新令牌资源;所述第二更新令牌请求消息包括以下至少之一:所述云端受限设备的标识、更新令牌、用户标识。
作为另一种实施方式,所述第一更新令牌请求消息请求的资源为更新令牌资源;所述第一更新令牌请求消息包括以下至少之一:所述云端受限设备的标识、更新令牌、用户标识;
所述第二更新令牌请求消息请求的资源为更新令牌资源;所述第二更新令牌请求消息包括以下至少之一:所述云端受限设备的标识、更新令牌、用户标识。
在本申请的一种可选实施例中,所述第二传输单元42,还配置为基于所述连接接收所述云端受限设备发送的第一资源发布请求消息之前,接收所述云端受限设备发送的第一设备绑定请求消息;所述第一设备绑定请求消息请求的资源为云端代理资源;
所述第三传输单元43,还配置为向所述云端设备发送第二设备绑定请求消息;所述第二设备绑定请求消息请求的资源为绑定资源;接收所述云端设备发送的第一设备绑定响应消息;所述第一设备绑定响应消息包括用户标识;
所述第二传输单元42,还配置为向所述云端受限设备发送第二设备绑定响应消息;所述第二设 备绑定响应消息包括用户标识。
其中,所述第一设备绑定请求消息包括以下至少之一:代理设备绑定指示、所述云端受限设备的标识、所述云端受限设备的安全凭证;
所述第二设备绑定请求消息包括以下至少之一:所述云端受限设备的标识、所述云端受限设备的安全凭证、安全标识。
本申请实施例中,所述云端受限设备中的第二连接建立单元41,在实际应用中可由所述设备中的CPU、DSP、MCU或FPGA实现;所述设备中的第二传输单元42和第三传输单元43,在实际应用中可通过通信模组(包含:基础通信套件、操作***、通信模块、标准化接口和协议等)及收发天线实现。
需要说明的是:上述实施例提供的设备在进行资源发布时,仅以上述各程序模块的划分进行举例说明,实际应用中,可以根据需要而将上述处理分配由不同的程序模块完成,即将设备的内部结构划分成不同的程序模块,以完成以上描述的全部或者部分处理。另外,上述实施例提供的设备与资源发布方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。
本发明实施例还提供了一种云端设备。图8是本申请实施例提供的云端设备的结构组成示意图一;如图8所示,所述云端设备包括第四传输单元51和公布单元52;其中,
所述第四传输单元51,配置为获得云端代理设备发布的资源;所述资源为所述云端代理设备基于与云端受限设备之间的连接获得的所述云端受限设备的资源;
所述公布单元52,配置为公布所述资源。
在本申请的一种可选实施例中,所述第四传输单元51,配置为接收所述云端代理设备发送的第二资源发布请求消息;所述第二资源发布请求消息请求的资源为资源目录资源;所述第二资源发布请求消息包括以下至少之一:所述云端受限设备的标识、所述云端受限设备的第二资源链接;所述云端受限设备的第二资源链接中的资源的端点为所述云端代理设备的端点。
可选地,所述第二资源发布请求消息中还包括以下至少之一:发布资源的有效时间、云端受限设备的指示。
可选地,所述云端受限设备的第二资源链接中的目标标识包括目标资源的标识和所述云端受限设备的标识。
在本申请的一种可选实施例中,所述公布单元52,配置为将所述第二资源链接添加至资源目录中;其中,公布的资源的端点为所述云端设备的端点。
在本申请的一种可选实施例中,所述公布单元52,还配置为在所述第二资源发布请求消息中包括云端受限设备的指示的情况下,或者,在所述云端受限设备的第二资源链接中的目标标识包括目标资源的标识和所述云端受限设备的标识的情况下,公布的目标资源的标识与所述第二资源链接中的目标资源的标识相同。
在本申请的一种可选实施例中,所述第四传输单元51,还配置为向所述云端代理设备发送第一资源发布响应消息。
在本申请的一种可选实施例中,如图9所示,所述设备还包括注册单元53;
所述第四传输单元51,还配置为获得云端代理设备发布的资源之前,接收所述云端代理设备发送的第二云端注册请求消息;
所述注册单元53,配置为为所述云端受限设备分配访问令牌,以及关联所述云端受限设备和用户标识;
所述第四传输单元51,还配置为向所述云端代理设备发送第一云端注册响应消息;所述第一云端注册响应消息包括以下至少之一:所述用户标识、所述云端受限设备的访问令牌、所述访问令牌的有效时长、所述云端受限设备的更新令牌。
本实施例中,所述第二云端注册请求消息请求的资源为账号资源;所述第二云端注册请求消息包括以下至少之一:所述云端受限设备的标识、所述云端受限设备的安全凭证信息、用户标识;
或者,所述第二云端注册请求消息请求的资源为账号资源;所述第二云端注册请求消息包括以下至少之一:所述云端受限设备的标识、所述访问令牌。其中,所述访问令牌为所述云端受限设备与所述云端代理设备建立连接之前、由配置器从所述云端设备为所述云端受限设备获得的访问令牌。
在本申请的一种可选实施例中,所述第四传输单元51,还配置为获得云端代理设备发布的资源之前,接收所述云端代理设备发送的第二云端登陆请求消息;向所述云端代理设备发送第一云端登陆响应消息;所述第一云端登陆响应消息包括访问令牌的有效时间。
本实施例中,所述第二云端登陆请求消息请求的资源为会话资源;所述第二云端登陆请求消息 包括以下至少之一:云端登陆指示、所述云端受限设备的标识、所述云端受限设备的访问令牌、用户标识。
在本申请的一种可选实施例中,如图10所示,所述设备还包括更新单元54;
所述第四传输单元51,还配置为接收所述云端代理设备发送的第二更新令牌请求消息;
所述更新单元54,配置为更新新的访问令牌;
所述第四传输单元51,还配置为向所述云端代理设备发送第一更新令牌响应消息;所述第一更新令牌响应消息包括以下至少之一:新的访问令牌、更新令牌、所述新的访问令牌的有效时间。
本实施例中,所述第二更新令牌请求消息请求的资源为更新令牌资源;所述第二更新令牌请求消息包括以下至少之一:所述云端受限设备的标识、更新令牌、用户标识。
在本申请的一种可选实施例中,如图11所示,所述设备还包括绑定单元55;
所述第四传输单元51,还配置为获得云端代理设备发布的资源之前,接收所述云端代理设备发送的第二设备绑定请求消息;所述第二设备绑定请求消息请求的资源为绑定资源;所述第二设备绑定请求消息包括以下至少之一:所述云端受限设备的标识、所述云端受限设备的安全凭证、安全标识;
所述绑定单元55,配置为关联所述云端受限设备和用户标识;
所述第四传输单元51,还配置为向所述云端代理设备发送第一设备绑定响应消息;所述第一设备绑定响应消息包括用户标识。
可选地,所述绑定单元55,还配置为关联所述云端受限设备和所述云端代理设备的访问令牌。
本申请实施例中,所述云端设备中的注册单元53、更新单元54、公布单元52和绑定单元55,在实际应用中可由所述设备中的CPU、DSP、MCU或FPGA实现;所述设备中的第四传输单元51,在实际应用中可通过通信模组(包含:基础通信套件、操作***、通信模块、标准化接口和协议等)及收发天线实现。
需要说明的是:上述实施例提供的设备在进行资源发布时,仅以上述各程序模块的划分进行举例说明,实际应用中,可以根据需要而将上述处理分配由不同的程序模块完成,即将设备的内部结构划分成不同的程序模块,以完成以上描述的全部或者部分处理。另外,上述实施例提供的设备与资源发布方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。
图12是本申请实施例提供的一种设备示意性结构图。该设备可以是云端受限设备、云端代理设备或云端设备,如图12所示,设备600包括处理器610,处理器610可以从存储器中调用并运行计算机程序,以实现本申请实施例中的方法。
可选地,如图12所示,设备还可以包括存储器620。其中,处理器610可以从存储器620中调用并运行计算机程序,以实现本申请实施例中的方法。
其中,存储器620可以是独立于处理器610的一个单独的器件,也可以集成在处理器610中。
可选地,如图12所示,设备还可以包括收发器630,处理器610可以控制该收发器630与其他设备进行通信,具体地,可以向其他设备发送信息或数据,或接收其他设备发送的信息或数据。
其中,收发器630可以包括发射机和接收机。收发器630还可以进一步包括天线,天线的数量可以为一个或多个。
可选地,该设备具体可为本申请实施例的云端受限设备,并且该设备可以实现本申请实施例的各个方法中由云端受限设备实现的相应流程,为了简洁,在此不再赘述。
可选地,该设备具体可为本申请实施例的云端代理设备,并且该设备可以实现本申请实施例的各个方法中由云端代理设备实现的相应流程,为了简洁,在此不再赘述。
可选地,该设备具体可为本申请实施例的云端设备,并且该设备可以实现本申请实施例的各个方法中由云端设备实现的相应流程,为了简洁,在此不再赘述。
图13是本申请实施例的芯片的示意性结构图。图13所示的芯片700包括处理器710,处理器710可以从存储器中调用并运行计算机程序,以实现本申请实施例中的方法。
可选地,如图13所示,芯片700还可以包括存储器720。其中,处理器710可以从存储器720中调用并运行计算机程序,以实现本申请实施例中的方法。
其中,存储器720可以是独立于处理器710的一个单独的器件,也可以集成在处理器710中。
可选地,该芯片700还可以包括输入接口730。其中,处理器710可以控制该输入接口730与其他设备或芯片进行通信,具体地,可以获取其他设备或芯片发送的信息或数据。
可选地,该芯片700还可以包括输出接口740。其中,处理器710可以控制该输出接口740与其他设备或芯片进行通信,具体地,可以向其他设备或芯片输出信息或数据。
可选地,该芯片可应用于本申请实施例中的云端受限设备,并且该芯片可以实现本申请实施例的各个方法中由云端受限设备实现的相应流程,为了简洁,在此不再赘述。
可选地,该芯片可应用于本申请实施例中的云端代理设备,并且该芯片可以实现本申请实施例的各个方法中由云端代理设备实现的相应流程,为了简洁,在此不再赘述。
可选地,该芯片可应用于本申请实施例中的云端设备,并且该芯片可以实现本申请实施例的各个方法中由云端设备实现的相应流程,为了简洁,在此不再赘述。
应理解,本申请实施例提到的芯片还可以称为***级芯片,***芯片,芯片***或片上***芯片等。
应理解,本申请实施例的处理器可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法实施例的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器可以是通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法的步骤。
可以理解,本申请实施例中的存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DR RAM)。应注意,本文描述的***和方法的存储器旨在包括但不限于这些和任意其它适合类型的存储器。
应理解,上述存储器为示例性但不是限制性说明,例如,本申请实施例中的存储器还可以是静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synch Link DRAM,SLDRAM)以及直接内存总线随机存取存储器(Direct Rambus RAM,DR RAM)等等。也就是说,本申请实施例中的存储器旨在包括但不限于这些和任意其它适合类型的存储器。
本申请实施例还提供了一种计算机可读存储介质,用于存储计算机程序。可选的,该计算机可读存储介质可应用于本申请实施例中的云端受限设备,所述计算机程序使得计算机执行本申请实施例的各个方法中由云端受限设备实现的相应流程,为了简洁,在此不再赘述。
可选的,该计算机可读存储介质可应用于本申请实施例中的云端代理设备,所述计算机程序使得计算机执行本申请实施例的各个方法中由云端代理设备实现的相应流程,为了简洁,在此不再赘述。
可选的,该计算机可读存储介质可应用于本申请实施例中的云端设备,所述计算机程序使得计算机执行本申请实施例的各个方法中由云端设备实现的相应流程,为了简洁,在此不再赘述。
本申请实施例还提供了一种计算机程序产品,包括计算机程序指令。可选的,该计算机程序产品可应用于本申请实施例中的云端受限设备,该计算机程序指令使得计算机执行本申请实施例的各个方法中由云端受限设备实现的相应流程,为了简洁,在此不再赘述。
可选的,该计算机程序产品可应用于本申请实施例中的云端代理设备,该计算机程序指令使得计算机执行本申请实施例的各个方法中由云端代理设备实现的相应流程,为了简洁,在此不再赘述。
可选的,该计算机程序产品可应用于本申请实施例中的云端设备,该计算机程序指令使得计算机执行本申请实施例的各个方法中由云端设备实现的相应流程,为了简洁,在此不再赘述。
本申请实施例还提供了一种计算机程序。可选的,该计算机程序可应用于本申请实施例中的云端受限设备,所述计算机程序使得计算机执行如本申请实施例各个的方法中由云端受限设备实现相应流程,为了简洁,在此不再赘述。
本申请实施例还提供了一种计算机程序。可选的,该计算机程序可应用于本申请实施例中的云端代理设备,所述计算机程序使得计算机执行如本申请实施例各个的方法中由云端代理设备实现相应流程,为了简洁,在此不再赘述。
本申请实施例还提供了一种计算机程序。可选的,该计算机程序可应用于本申请实施例中的云端设备,所述计算机程序使得计算机执行如本申请实施例各个的方法中由云端设备实现相应流程,为了简洁,在此不再赘述。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的***、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的设备和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个***,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应所述以权利要求的保护范围为准。
Claims (127)
- 一种资源发布方法,所述方法包括:云端受限设备建立与云端代理设备的连接;所述云端受限设备基于所述连接与所述云端代理设备传输信息,所述信息用于所述云端代理设备向云端设备发布资源。
- 根据权利要求1所述的方法,其中,所述云端受限设备建立与云端代理设备的连接,包括:所述云端受限设备获得云端代理设备的信息,基于所述信息建立与云端代理设备的连接。
- 根据权利要求2所述的方法,其中,所述云端受限设备获得云端代理设备的信息,包括:所述云端受限设备接收配置器发送的配置信息,所述配置信息中包括云端代理设备的信息。
- 根据权利要求2所述的方法,其中,所述云端受限设备获得云端代理设备的信息,包括:所述云端受限设备通过广播或组播的方式发送发现请求消息;所述发现请求消息中包括云端代理资源类型;所述云端受限设备接收发现响应消息;所述发现响应消息包括所述云端代理设备的信息。
- 根据权利要求2至4任一项所述的方法,其中,所述云端代理设备的信息包括以下至少之一:云端代理设备的云端代理资源标识、云端代理资源的端点信息。
- 根据权利要求1所述的方法,其中,所述云端受限设备基于所述连接与所述云端代理设备传输信息,包括:所述云端受限设备基于所述连接指示所述云端代理设备向云端设备发布资源。
- 根据权利要求6所述的方法,其中,所述云端受限设备基于所述连接指示所述云端代理设备向云端设备发布资源,包括:所述云端受限设备向所述云端代理设备发送第一资源发布请求消息,第一资源发布请求消息用于指示所述云端代理设备向云端设备发布资源。
- 根据权利要求7所述的方法,其中,所述第一资源发布请求消息请求的资源为云端代理资源;所述第一资源发布请求消息包括以下至少之一:代理发布资源指示、所述云端受限设备的标识、所述云端受限设备的第一资源链接;所述云端受限设备的第一资源链接中的资源的端点为所述云端受限设备的端点。
- 根据权利要求8所述的方法,其中,所述第一资源发布请求消息还包括以下至少之一:发布资源的有效时间、云端受限设备的指示。
- 根据权利要求7至9任一项所述的方法,其中,所述方法还包括:所述云端受限设备接收所述云端代理设备发送的第二资源发布响应消息。
- 根据权利要求7至10任一项所述的方法,其中,所述云端受限设备向所述云端代理设备发送第一资源发布请求消息之前,所述方法还包括:所述云端受限设备向所述云端代理设备发送第一云端注册请求消息;所述云端受限设备接收所述云端代理设备发送的第二云端注册响应消息;所述第二云端注册响应消息包括以下至少之一:所述用户标识、所述云端受限设备的访问令牌、所述访问令牌的有效时长、所述云端受限设备的更新令牌。
- 根据权利要求11所述的方法,其中,所述第一云端注册请求消息请求的资源为云端代理资源;所述第一云端注册请求消息包括以下至少之一:代理云端注册指示、所述云端受限设备的标识、所述云端受限设备的安全凭证信息。
- 根据权利要求7至12任一项所述的方法,其中,所述云端受限设备向所述云端代理设备发送第一资源发布请求消息之前,所述方法还包括:所述云端受限设备向所述云端代理设备发送第一云端登陆请求消息;所述云端受限设备接收所述云端代理设备发送的第二云端登陆响应消息;所述第二云端登陆响应消息包括访问令牌的有效时间。
- 根据权利要求13所述的方法,其中,所述第一云端登陆请求消息请求的资源为云端代理资源;所述第一云端登陆请求消息包括以下至少之一:代理云端登陆指示、所述云端受限设备的标识、所述云端受限设备的访问令牌。
- 根据权利要求1至14任一项所述的方法,其中,所述方法还包括:所述云端受限设备向所述云端代理设备发送第一更新令牌请求消息;所述云端受限设备接收所述云端代理设备发送的第二更新令牌响应消息;所述第二更新令牌响应消息包括以下至少之一:新的访问令牌、更新令牌、所述新的访问令牌的有效时间。
- 根据权利要求15所述的方法,其中,所述第一更新令牌请求消息请求的资源为云端代理资源;所述第一更新令牌请求消息包括以下至少之一:代理更新令牌指示、所述云端受限设备的标识、更新令牌、用户标识。
- 根据权利要求1至10任一项所述的方法,其中,所述云端受限设备向所述云端代理设备发送第一资源发布请求消息之前,所述方法还包括:所述云端受限设备向所述云端代理设备发送第一设备绑定请求消息;所述第一设备绑定请求消息请求的资源为云端代理资源;所述云端受限设备接收所述云端代理设备发送的第二设备绑定响应消息。
- 根据权利要求17所述的方法,其中,所述第一设备绑定请求消息包括以下至少之一:代理设备绑定指示、所述云端受限设备的标识、所述云端受限设备的安全凭证;所述第二设备绑定响应消息包括用户标识。
- 根据权利要求7所述的方法,其中,所述第一资源发布请求消息请求的资源为资源目录资源;所述第一资源发布请求消息包括以下至少之一:所述云端受限设备的标识、所述云端受限设备的第一资源链接;所述云端受限设备的第一资源链接中的资源的端点为所述云端受限设备的端点。
- 根据权利要求19所述的方法,其中,所述第一资源发布请求消息还包括以下至少之一:发布资源的有效时间、云端受限设备的指示。
- 根据权利要求11所述的方法,其中,所述方法还包括:所述云端受限设备获得配置器发送的访问令牌。
- 根据权利要求21所述的方法,其中,所述第一云端注册请求消息请求的资源为账号资源;所述第一云端注册请求消息包括以下至少之一:所述云端受限设备的标识、所述访问令牌。
- 根据权利要求13所述的方法,其中,所述第一云端登陆请求消息请求的资源为会话资源;所述第一云端登陆请求消息包括以下至少之一:云端登陆指示、所述云端受限设备的标识、所述云端受限设备的访问令牌、用户标识。
- 根据权利要求15所述的方法,其中,所述第一更新令牌请求消息请求的资源为更新令牌资源;所述第一更新令牌请求消息包括以下至少之一:所述云端受限设备的标识、更新令牌、用户标识。
- 一种资源发布方法,所述方法包括:云端代理设备与云端受限设备建立连接;所述云端代理设备基于所述连接与所述云端受限设备传输信息,基于所述信息向云端设备发布所述云端受限设备的资源。
- 根据权利要求25所述的方法,其中,所述云端代理设备与云端受限设备建立连接,包括:所述云端代理设备向所述云端受限设备发送所述云端代理设备的信息,所述云端代理设备的信息用于所述云端受限设备建立于所述云端代理设备的连接。
- 根据权利要求26所述的方法,其中,所述云端代理设备向所述云端受限设备发送所述云端代理设备的信息,包括:所述云端代理设备接收所述云端受限设备通过广播或组播的方式发送的发现请求消息;所述发现请求消息中包括云端代理资源类型;所述云端代理设备向所述云端受限设备发送发现响应消息;所述发现响应消息包括所述云端代理设备的信息。
- 根据权利要求26或27所述的方法,其中,所述云端代理设备的信息包括以下至少之一:云端代理设备的云端代理资源标识、云端代理资源的端点信息。
- 根据权利要求25所述的方法,其中,所述云端代理设备基于所述连接与所述云端受限设备传输信息,基于所述信息向云端设备发布资源,包括:所述云端代理设备基于所述连接获得所述云端受限设备的指示,基于所述指示向云端设备发布资源。
- 根据权利要求29所述的方法,其中,所述云端代理设备基于所述连接获得所述云端受限设备的指示,基于所述指示向云端设备发布资源,包括:所述云端代理设备基于所述连接接收所述云端受限设备发送的第一资源发布请求消息,第一资源发布请求消息用于指示所述云端代理设备向云端设备发布资源;所述云端代理设备向云端设备发送第二资源发布请求消息;所述第二资源发布请求消息请求的资源为资源目录资源;所述第二资源发布请求消息包括以下至少之一:所述云端受限设备的标识、所述云端受限设备的第二资源链接;所述云端受限设备的第二资源链接中的资源的端点为所述云端代理设备的端点;所述云端代理设备获得所述云端设备发送的第一资源发布响应消息,向所述云端受限设备发送第二资源发布响应消息。
- 根据权利要求30所述的方法,其中,所述第一资源发布请求消息请求的资源为云端代理资源;所述第一资源发布请求消息包括以下至少之一:代理发布资源指示、所述云端受限设备的标识、所述云端受限设备的第一资源链接;所述云端受限设备的第一资源链接中的资源的端点为所述云端受限设备的端点。
- 根据权利要求31所述的方法,其中,所述第一资源发布请求消息还包括以下至少之一:发布资源的有效时间、云端受限设备的指示;所述第二资源发布请求消息中还包括以下至少之一:发布资源的有效时间、云端受限设备的指示。
- 根据权利要求30至32任一项所述的方法,其中,所述云端受限设备的第二资源链接中的目标标识包括目标资源的标识和所述云端受限设备的标识。
- 根据权利要求30至33任一项所述的方法,其中,所述云端代理设备基于所述连接接收所述云端受限设备发送的第一资源发布请求消息之前,所述方法还包括:所述云端代理设备接收所述云端受限设备发送的第一云端注册请求消息,向所述云端设备发送第二云端注册请求消息;所述云端代理设备接收所述云端设备发送的第一云端注册响应消息;所述第一云端注册响应消息包括以下至少之一:所述用户标识、所述云端受限设备的访问令牌、所述访问令牌的有效时长、所述云端受限设备的更新令牌;所述云端代理设备向所述云端受限设备发送第二云端注册响应消息;所述第二云端注册响应消息包括以下至少之一:所述用户标识、所述云端受限设备的访问令牌、所述访问令牌的有效时长、所述云端受限设备的更新令牌。
- 根据权利要求34所述的方法,其中,所述第一云端注册请求消息请求的资源为云端代理资源;所述第一云端注册请求消息包括以下至少之一:代理云端注册指示、所述云端受限设备的标识、所述云端受限设备的安全凭证信息;所述第二云端注册请求消息请求的资源为账号资源;所述第二云端注册请求消息包括以下至少之一:所述云端受限设备的标识、所述云端受限设备的安全凭证信息、用户标识。
- 根据权利要求30至35任一项所述的方法,其中,所述云端代理设备基于所述连接接收所述云端受限设备发送的第一资源发布请求消息之前,所述方法还包括:所述云端代理设备接收所述云端受限设备发送的第一云端登陆请求消息,向所述云端设备发送第二云端登陆请求消息;所述云端代理设备接收所述云端设备发送的第一云端登陆响应消息;所述第一云端登陆响应消息包括访问令牌的有效时间;所述云端代理设备向所述云端受限设备发送第二云端登陆响应消息;所述第二云端登陆响应消息包括访问令牌的有效时间。
- 根据权利要求36所述的方法,其中,所述第一云端登陆请求消息请求的资源为云端代理资源;所述第一云端登陆请求消息包括以下至少之一:代理云端登陆指示、所述云端受限设备的标识、所述云端受限设备的访问令牌;所述第二云端登陆请求消息请求的资源为会话资源;所述第二云端登陆请求消息包括以下至少之一:云端登陆指示、所述云端受限设备的标识、所述云端受限设备的访问令牌、用户标识。
- 根据权利要求25至37任一项所述的方法,其中,所述方法还包括:所述云端代理设备接收所述云端受限设备发送的第一更新令牌请求消息,向所述云端设备发送第二更新令牌请求消息;所述云端代理设备接收所述云端设备发送的第一更新令牌响应消息;所述第一更新令牌响应消息包括以下至少之一:新的访问令牌、更新令牌、所述新的访问令牌的有效时间;所述云端代理设备向所述云端受限设备发送第二更新令牌响应消息;所述第二更新令牌响应消息包括以下至少之一:新的访问令牌、更新令牌、所述新的访问令牌的有效时间。
- 根据权利要求38所述的方法,其中,所述第一更新令牌请求消息请求的资源为云端代理资源;所述第一更新令牌请求消息包括以下至少之一:代理更新令牌指示、所述云端受限设备的标识、更新令牌、用户标识;所述第二更新令牌请求消息请求的资源为更新令牌资源;所述第二更新令牌请求消息包括以下至少之一:所述云端受限设备的标识、更新令牌、用户标识。
- 根据权利要求25至33任一项所述的方法,其中,所述云端代理设备基于所述连接接收所述云端受限设备发送的第一资源发布请求消息之前,所述方法还包括:所述云端代理设备接收所述云端受限设备发送的第一设备绑定请求消息;所述第一设备绑定请求消息请求的资源为云端代理资源;所述云端代理设备向所述云端设备发送第二设备绑定请求消息;所述第二设备绑定请求消息请求的资源为绑定资源;所述云端代理设备接收所述云端设备发送的第一设备绑定响应消息;所述第一设备绑定响应消息包括用户标识;所述云端代理设备向所述云端受限设备发送第二设备绑定响应消息;所述第二设备绑定响应消息包括用户标识。
- 根据权利要求40所述的方法,其中,所述第一设备绑定请求消息包括以下至少之一:代理设备绑定指示、所述云端受限设备的标识、所述云端受限设备的安全凭证;所述第二设备绑定请求消息包括以下至少之一:所述云端受限设备的标识、所述云端受限设备的安全凭证、安全标识。
- 根据权利要求30所述的方法,其中,所述第一资源发布请求消息请求的资源为资源目录资源;所述第一资源发布请求消息包括以下至少之一:所述云端受限设备的标识、所述云端受限设备的第一资源链接;所述云端受限设备的第一资源链接中的资源的端点为所述云端受限设备的端点。
- 根据权利要求42所述的方法,其中,所述第一资源发布请求消息还包括以下至少之一:发布资源的有效时间、云端受限设备的指示。
- 根据权利要求34所述的方法,其中,所述第一云端注册请求消息请求的资源为账号资源;所述第一云端注册请求消息包括以下至少之一:所述云端受限设备的标识、所述访问令牌;所述第二云端注册请求消息请求的资源为账号资源;所述第二云端注册请求消息包括以下至少之一:所述云端受限设备的标识、所述访问令牌。
- 根据权利要求36所述的方法,其中,所述第一云端登陆请求消息请求的资源为会话资源;所述第一云端登陆请求消息包括以下至少之一:云端登陆指示、所述云端受限设备的标识、所述云端受限设备的访问令牌、用户标识;所述第二云端登陆请求消息请求的资源为会话资源;所述第二云端登陆请求消息包括以下至少之一:云端登陆指示、所述云端受限设备的标识、所述云端受限设备的访问令牌、用户标识。
- 根据权利要求38所述的方法,其中,所述第一更新令牌请求消息请求的资源为更新令牌资源;所述第一更新令牌请求消息包括以下至少之一:所述云端受限设备的标识、更新令牌、用户标识;所述第二更新令牌请求消息请求的资源为更新令牌资源;所述第二更新令牌请求消息包括以下至少之一:所述云端受限设备的标识、更新令牌、用户标识。
- 一种资源发布方法,所述方法包括:云端设备获得云端代理设备发布的资源;所述资源为所述云端代理设备基于与云端受限设备之间的连接获得的所述云端受限设备的资源;所述云端设备公布所述资源。
- 根据权利要求47所述的方法,其中,所述云端设备接收云端代理设备发布的资源,包括:所述云端设备接收所述云端代理设备发送的第二资源发布请求消息;所述第二资源发布请求消息请求的资源为资源目录资源;所述第二资源发布请求消息包括以下至少之一:所述云端受限设备的标识、所述云端受限设备的第二资源链接;所述云端受限设备的第二资源链接中的资源的端点为所述云端代理设备的端点。
- 根据权利要求48所述的方法,其中,所述第二资源发布请求消息中还包括以下至少之一:发布资源的有效时间、云端受限设备的指示。
- 根据权利要求48或49所述的方法,其中,所述云端受限设备的第二资源链接中的目标标识包括目标资源的标识和所述云端受限设备的标识。
- 根据权利要求47至50任一项所述的方法,其中,所述云端设备公布所述资源,包括:所述云端设备将所述第二资源链接添加至资源目录中;其中,公布的资源的端点为所述云端设备的端点。
- 根据权利要求51所述的方法,其中,所述云端设备将所述第二资源链接添加至资源目录中,包括:在所述第二资源发布请求消息中包括云端受限设备的指示的情况下,或者,在所述云端受限设备的第二资源链接中的目标标识包括目标资源的标识和所述云端受限设备的标识的情况下,公布的目标资源的标识与所述第二资源链接中的目标资源的标识相同。
- 根据权利要求47至52任一项所述的方法,其中,所述方法还包括:所述云端设备向所述云端代理设备发送第一资源发布响应消息。
- 根据权利要求47至53任一项所述的方法,其中,所述云端设备获得云端代理设备发布的资源之前,所述方法还包括:所述云端设备接收所述云端代理设备发送的第二云端注册请求消息;所述云端设备为所述云端受限设备分配访问令牌,以及关联所述云端受限设备和用户标识;所述云端设备向所述云端代理设备发送第一云端注册响应消息;所述第一云端注册响应消息包括以下至少之一:所述用户标识、所述云端受限设备的访问令牌、所述访问令牌的有效时长、所述云端受限设备的更新令牌。
- 根据权利要求54所述的方法,其中,所述第二云端注册请求消息请求的资源为账号资源;所述第二云端注册请求消息包括以下至少之一:所述云端受限设备的标识、所述云端受限设备的安全凭证信息、用户标识;或者,所述第二云端注册请求消息请求的资源为账号资源;所述第二云端注册请求消息包括以下至少之一:所述云端受限设备的标识、所述访问令牌。
- 根据权利要求47至55任一项所述的方法,其中,所述云端设备获得云端代理设备发布的资源之前,所述方法还包括:所述云端设备接收所述云端代理设备发送的第二云端登陆请求消息;所述云端设备向所述云端代理设备发送第一云端登陆响应消息;所述第一云端登陆响应消息包括访问令牌的有效时间。
- 根据权利要求56所述的方法,其中,所述第二云端登陆请求消息请求的资源为会话资源;所述第二云端登陆请求消息包括以下至少之一:云端登陆指示、所述云端受限设备的标识、所述云端受限设备的访问令牌、用户标识。
- 根据权利要求47至57任一项所述的方法,其中,所述方法还包括:所述云端设备接收所述云端代理设备发送的第二更新令牌请求消息;所述云端设备更新新的访问令牌,向所述云端代理设备发送第一更新令牌响应消息;所述第一更新令牌响应消息包括以下至少之一:新的访问令牌、更新令牌、所述新的访问令牌的有效时间。
- 根据权利要求58所述的方法,其中,所述第二更新令牌请求消息请求的资源为更新令牌资源;所述第二更新令牌请求消息包括以下至少之一:所述云端受限设备的标识、更新令牌、用户标识。
- 根据权利要求47至53任一项所述的方法,其中,所述云端设备获得云端代理设备发布的资源之前,所述方法还包括:所述云端设备接收所述云端代理设备发送的第二设备绑定请求消息;所述第二设备绑定请求消息请求的资源为绑定资源;所述第二设备绑定请求消息包括以下至少之一:所述云端受限设备的标识、所述云端受限设备的安全凭证、安全标识;所述云端设备关联所述云端受限设备和用户标识,向所述云端代理设备发送第一设备绑定响应消息;所述第一设备绑定响应消息包括用户标识。
- 根据权利要求60所述的方法,其中,所述方法还包括:所述云端设备关联所述云端受限设备和所述云端代理设备的访问令牌。
- 一种云端受限设备,所述设备包括:第一连接建立单元和第一传输单元;其中,所述第一连接建立单元,配置为建立与云端代理设备的连接;所述第一传输单元,配置为基于所述连接与所述云端代理设备传输信息,所述信息用于所述云端代理设备向云端设备发布资源。
- 根据权利要求62所述的设备,其中,所述第一连接建立单元,配置为获得云端代理设备的信息,基于所述信息建立与云端代理设备的连接。
- 根据权利要求63所述的设备,其中,所述第一连接建立单元,配置为接收配置器发送的配置信息,所述配置信息中包括云端代理设备的信息。
- 根据权利要求63所述的设备,其中,所述第一连接建立单元,配置为通过广播或组播的方式发送发现请求消息;所述发现请求消息中包括云端代理资源类型;接收发现响应消息;所述发现响应消息包括所述云端代理设备的信息。
- 根据权利要求63至65任一项所述的设备,其中,所述云端代理设备的信息包括以下至少之一:云端代理设备的云端代理资源标识、云端代理资源的端点信息。
- 根据权利要求62所述的设备,其中,所述第一传输单元,配置为基于所述连接指示所述云端代理设备向云端设备发布资源。
- 根据权利要求67所述的设备,其中,所述第一传输单元,配置为向所述云端代理设备发送第一资源发布请求消息,第一资源发布请求消息用于指示所述云端代理设备向云端设备发布资源。
- 根据权利要求68所述的设备,其中,所述第一资源发布请求消息请求的资源为云端代理资源;所述第一资源发布请求消息包括以下至少之一:代理发布资源指示、所述云端受限设备的标识、所述云端受限设备的第一资源链接;所述云端受限设备的第一资源链接中的资源的端点为所述云端受限设备的端点。
- 根据权利要求69所述的设备,其中,所述第一资源发布请求消息还包括以下至少之一:发布资源的有效时间、云端受限设备的指示。
- 根据权利要求68至70任一项所述的设备,其中,所述第一传输单元,还配置为接收所述云端代理设备发送的第二资源发布响应消息。
- 根据权利要求68至71任一项所述的设备,其中,所述第一传输单元,还配置为向所述云端代理设备发送第一资源发布请求消息之前,向所述云端代理设备发送第一云端注册请求消息;接收所述云端代理设备发送的第二云端注册响应消息;所述第二云端注册响应消息包括以下至少之一:所述用户标识、所述云端受限设备的访问令牌、所述访问令牌的有效时长、所述云端受限设备的更新令牌。
- 根据权利要求72所述的设备,其中,所述第一云端注册请求消息请求的资源为云端代理资源;所述第一云端注册请求消息包括以下至少之一:代理云端注册指示、所述云端受限设备的标识、所述云端受限设备的安全凭证信息。
- 根据权利要求68至73任一项所述的设备,其中,所述第一传输单元,还配置为向所述云端代理设备发送第一资源发布请求消息之前,向所述云端代理设备发送第一云端登陆请求消息;接收所述云端代理设备发送的第二云端登陆响应消息;所述第二云端登陆响应消息包括访问令牌的有效时间。
- 根据权利要求74所述的设备,其中,所述第一云端登陆请求消息请求的资源为云端代理资源;所述第一云端登陆请求消息包括以下至少之一:代理云端登陆指示、所述云端受限设备的标识、所述云端受限设备的访问令牌。
- 根据权利要求62至75任一项所述的设备,其中,所述第一传输单元,还配置为向所述云端代理设备发送第一更新令牌请求消息;接收所述云端代理设备发送的第二更新令牌响应消息;所述第二更新令牌响应消息包括以下至少之一:新的访问令牌、更新令牌、所述新的访问令牌的有效时间。
- 根据权利要求76所述的设备,其中,所述第一更新令牌请求消息请求的资源为云端代理资源;所述第一更新令牌请求消息包括以下至少之一:代理更新令牌指示、所述云端受限设备的标识、更新令牌、用户标识。
- 根据权利要求62至71任一项所述的设备,其中,所述第一传输单元,还配置为向所述云端代理设备发送第一资源发布请求消息之前,向所述云端代理设备发送第一设备绑定请求消息;所述第一设备绑定请求消息请求的资源为云端代理资源;接收所述云端代理设备发送的第二设备绑定响应消息。
- 根据权利要求78所述的设备,其中,所述第一设备绑定请求消息包括以下至少之一:代理设备绑定指示、所述云端受限设备的标识、所述云端受限设备的安全凭证;所述第二设备绑定响应消息包括用户标识。
- 根据权利要求68所述的设备,其中,所述第一资源发布请求消息请求的资源为资源目录资源;所述第一资源发布请求消息包括以下至少之一:所述云端受限设备的标识、所述云端受限设备的第一资源链接;所述云端受限设备的第一资源链接中的资源的端点为所述云端受限设备的端点。
- 根据权利要求80所述的设备,其中,所述第一资源发布请求消息还包括以下至少之一:发布资源的有效时间、云端受限设备的指示。
- 根据权利要求72所述的设备,其中,所述第一传输单元,还配置为获得配置器发送的访问令牌。
- 根据权利要求82所述的设备,其中,所述第一云端注册请求消息请求的资源为账号资源;所述第一云端注册请求消息包括以下至少之一:所述云端受限设备的标识、所述访问令牌。
- 根据权利要求74所述的设备,其中,所述第一云端登陆请求消息请求的资源为会话资源;所述第一云端登陆请求消息包括以下至少之一:云端登陆指示、所述云端受限设备的标识、所述云端受限设备的访问令牌、用户标识。
- 根据权利要求76所述的设备,其中,所述第一更新令牌请求消息请求的资源为更新令牌资源;所述第一更新令牌请求消息包括以下至少之一:所述云端受限设备的标识、更新令牌、用户标识。
- 一种云端代理设备,所述云端代理设备包括:第二连接建立单元、第二传输单元和第三传输单元;其中,所述第二连接建立单元,配置为与云端受限设备建立连接;所述第二传输单元,配置为基于所述连接与所述云端受限设备传输信息;所述第三传输单元,配置为基于所述第二传输单元传输的所述信息向云端设备发布所述云端受限设备的资源。
- 根据权利要求86所述的设备,其中,所述第二连接建立单元,配置为向所述云端受限设备发送所述云端代理设备的信息,所述云端代理设备的信息用于所述云端受限设备建立于所述云端代理设备的连接。
- 根据权利要求87所述的设备,其中,所述第二连接建立单元,配置为接收所述云端受限设备通过广播或组播的方式发送的发现请求消息;所述发现请求消息中包括云端代理资源类型;向所述云端受限设备发送发现响应消息;所述发现响应消息包括所述云端代理设备的信息。
- 根据权利要求87或88所述的设备,其中,所述云端代理设备的信息包括以下至少之一:云端代理设备的云端代理资源标识、云端代理资源的端点信息。
- 根据权利要求86所述的设备,其中,所述第二传输单元,配置为基于所述连接获得所述云端受限设备的指示;所述第三传输单元,配置为基于所述第二传输单元获得的所述指示向云端设备发布资源。
- 根据权利要求90所述的设备,其中,所述第二传输单元,配置为基于所述连接接收所述云端受限设备发送的第一资源发布请求消息,第一资源发布请求消息用于指示所述云端代理设备向云端设备发布资源;所述第三传输单元,配置为向云端设备发送第二资源发布请求消息;所述第二资源发布请求消息请求的资源为资源目录资源;所述第二资源发布请求消息包括以下至少之一:所述云端受限设备的标识、所述云端受限设备的第二资源链接;所述云端受限设备的第二资源链接中的资源的端点为所述云端代理设备的端点;还配置为获得所述云端设备发送的第一资源发布响应消息;所述第二传输单元,还配置为向所述云端受限设备发送第二资源发布响应消息。
- 根据权利要求91所述的设备,其中,所述第一资源发布请求消息请求的资源为云端代理资源;所述第一资源发布请求消息包括以下至少之一:代理发布资源指示、所述云端受限设备的标识、所述云端受限设备的第一资源链接;所述云端受限设备的第一资源链接中的资源的端点为所述云端受限设备的端点。
- 根据权利要求92所述的设备,其中,所述第一资源发布请求消息还包括以下至少之一:发布资源的有效时间、云端受限设备的指示;所述第二资源发布请求消息中还包括以下至少之一:发布资源的有效时间、云端受限设备的指示。
- 根据权利要求91至93任一项所述的设备,其中,所述云端受限设备的第二资源链接中的目标标识包括目标资源的标识和所述云端受限设备的标识。
- 根据权利要求91至94任一项所述的设备,其中,所述第二传输单元,还配置为基于所述连接接收所述云端受限设备发送的第一资源发布请求消息之前,接收所述云端受限设备发送的第一云端注册请求消息;所述第三传输单元,还配置为向所述云端设备发送第二云端注册请求消息;接收所述云端设备发送的第一云端注册响应消息;所述第一云端注册响应消息包括以下至少之一:所述用户标识、所述云端受限设备的访问令牌、所述访问令牌的有效时长、所述云端受限设备的更新令牌;所述第二传输单元,还配置为向所述云端受限设备发送第二云端注册响应消息;所述第二云端注册响应消息包括以下至少之一:所述用户标识、所述云端受限设备的访问令牌、所述访问令牌的有效时长、所述云端受限设备的更新令牌。
- 根据权利要求95所述的设备,其中,所述第一云端注册请求消息请求的资源为云端代理资源;所述第一云端注册请求消息包括以下至少之一:代理云端注册指示、所述云端受限设备的标识、所述云端受限设备的安全凭证信息;所述第二云端注册请求消息请求的资源为账号资源;所述第二云端注册请求消息包括以下至少之一:所述云端受限设备的标识、所述云端受限设备的安全凭证信息、用户标识。
- 根据权利要求91至96任一项所述的设备,其中,所述第二传输单元,还配置为基于所述连接接收所述云端受限设备发送的第一资源发布请求消息之前,接收所述云端受限设备发送的第一云端登陆请求消息;所述第三传输单元,还配置为向所述云端设备发送第二云端登陆请求消息;接收所述云端设备发送的第一云端登陆响应消息;所述第一云端登陆响应消息包括访问令牌的有效时间;所述第二传输单元,还配置为向所述云端受限设备发送第二云端登陆响应消息;所述第二云端登陆响应消息包括访问令牌的有效时间。
- 根据权利要求97所述的设备,其中,所述第一云端登陆请求消息请求的资源为云端代理资源;所述第一云端登陆请求消息包括以下至少之一:代理云端登陆指示、所述云端受限设备的标识、所述云端受限设备的访问令牌;所述第二云端登陆请求消息请求的资源为会话资源;所述第二云端登陆请求消息包括以下至少之一:云端登陆指示、所述云端受限设备的标识、所述云端受限设备的访问令牌、用户标识。
- 根据权利要求86至98任一项所述的设备,其中,所述第二传输单元,还配置为接收所述云端受限设备发送的第一更新令牌请求消息;所述第三传输单元,还配置为向所述云端设备发送第二更新令牌请求消息;接收所述云端设备发送的第一更新令牌响应消息;所述第一更新令牌响应消息包括以下至少之一:新的访问令牌、更新令牌、所述新的访问令牌的有效时间;所述第二传输单元,还配置为向所述云端受限设备发送第二更新令牌响应消息;所述第二更新令牌响应消息包括以下至少之一:新的访问令牌、更新令牌、所述新的访问令牌的有效时间。
- 根据权利要求99所述的设备,其中,所述第一更新令牌请求消息请求的资源为云端代理资源;所述第一更新令牌请求消息包括以下至少之一:代理更新令牌指示、所述云端受限设备的标识、更新令牌、用户标识;所述第二更新令牌请求消息请求的资源为更新令牌资源;所述第二更新令牌请求消息包括以下至少之一:所述云端受限设备的标识、更新令牌、用户标识。
- 根据权利要求86至94任一项所述的设备,其中,所述第二传输单元,还配置为基于所述连接接收所述云端受限设备发送的第一资源发布请求消息之前,接收所述云端受限设备发送的第一 设备绑定请求消息;所述第一设备绑定请求消息请求的资源为云端代理资源;所述第三传输单元,还配置为向所述云端设备发送第二设备绑定请求消息;所述第二设备绑定请求消息请求的资源为绑定资源;接收所述云端设备发送的第一设备绑定响应消息;所述第一设备绑定响应消息包括用户标识;所述第二传输单元,还配置为向所述云端受限设备发送第二设备绑定响应消息;所述第二设备绑定响应消息包括用户标识。
- 根据权利要求101所述的设备,其中,所述第一设备绑定请求消息包括以下至少之一:代理设备绑定指示、所述云端受限设备的标识、所述云端受限设备的安全凭证;所述第二设备绑定请求消息包括以下至少之一:所述云端受限设备的标识、所述云端受限设备的安全凭证、安全标识。
- 根据权利要求91所述的设备,其中,所述第一资源发布请求消息请求的资源为资源目录资源;所述第一资源发布请求消息包括以下至少之一:所述云端受限设备的标识、所述云端受限设备的第一资源链接;所述云端受限设备的第一资源链接中的资源的端点为所述云端受限设备的端点。
- 根据权利要求103所述的设备,其中,所述第一资源发布请求消息还包括以下至少之一:发布资源的有效时间、云端受限设备的指示。
- 根据权利要求95所述的设备,其中,所述第一云端注册请求消息请求的资源为账号资源;所述第一云端注册请求消息包括以下至少之一:所述云端受限设备的标识、所述访问令牌;所述第二云端注册请求消息请求的资源为账号资源;所述第二云端注册请求消息包括以下至少之一:所述云端受限设备的标识、所述访问令牌。
- 根据权利要求97所述的设备,其中,所述第一云端登陆请求消息请求的资源为会话资源;所述第一云端登陆请求消息包括以下至少之一:云端登陆指示、所述云端受限设备的标识、所述云端受限设备的访问令牌、用户标识;所述第二云端登陆请求消息请求的资源为会话资源;所述第二云端登陆请求消息包括以下至少之一:云端登陆指示、所述云端受限设备的标识、所述云端受限设备的访问令牌、用户标识。
- 根据权利要求99所述的设备,其中,所述第一更新令牌请求消息请求的资源为更新令牌资源;所述第一更新令牌请求消息包括以下至少之一:所述云端受限设备的标识、更新令牌、用户标识;所述第二更新令牌请求消息请求的资源为更新令牌资源;所述第二更新令牌请求消息包括以下至少之一:所述云端受限设备的标识、更新令牌、用户标识。
- 一种云端设备,所述云端设备包括第四传输单元和公布单元;其中,所述第四传输单元,配置为获得云端代理设备发布的资源;所述资源为所述云端代理设备基于与云端受限设备之间的连接获得的所述云端受限设备的资源;所述公布单元,配置为公布所述资源。
- 根据权利要求108所述的设备,其中,所述第四传输单元,配置为接收所述云端代理设备发送的第二资源发布请求消息;所述第二资源发布请求消息请求的资源为资源目录资源;所述第二资源发布请求消息包括以下至少之一:所述云端受限设备的标识、所述云端受限设备的第二资源链接;所述云端受限设备的第二资源链接中的资源的端点为所述云端代理设备的端点。
- 根据权利要求109所述的设备,其中,所述第二资源发布请求消息中还包括以下至少之一:发布资源的有效时间、云端受限设备的指示。
- 根据权利要求109或110所述的设备,其中,所述云端受限设备的第二资源链接中的目标标识包括目标资源的标识和所述云端受限设备的标识。
- 根据权利要求108至111任一项所述的设备,其中,所述公布单元,配置为将所述第二资源链接添加至资源目录中;其中,公布的资源的端点为所述云端设备的端点。
- 根据权利要求112所述的设备,其中,所述公布单元,还配置为在所述第二资源发布请求消息中包括云端受限设备的指示的情况下,或者,在所述云端受限设备的第二资源链接中的目标标识包括目标资源的标识和所述云端受限设备的标识的情况下,公布的目标资源的标识与所述第二资源链接中的目标资源的标识相同。
- 根据权利要求108至113任一项所述的设备,其中,所述第四传输单元,还配置为向所述云端代理设备发送第一资源发布响应消息。
- 根据权利要求108至114任一项所述的设备,其中,所述设备还包括注册单元;所述第四传输单元,还配置为获得云端代理设备发布的资源之前,接收所述云端代理设备发送 的第二云端注册请求消息;所述注册单元,配置为为所述云端受限设备分配访问令牌,以及关联所述云端受限设备和用户标识;所述第四传输单元,还配置为向所述云端代理设备发送第一云端注册响应消息;所述第一云端注册响应消息包括以下至少之一:所述用户标识、所述云端受限设备的访问令牌、所述访问令牌的有效时长、所述云端受限设备的更新令牌。
- 根据权利要求115所述的设备,其中,所述第二云端注册请求消息请求的资源为账号资源;所述第二云端注册请求消息包括以下至少之一:所述云端受限设备的标识、所述云端受限设备的安全凭证信息、用户标识;或者,所述第二云端注册请求消息请求的资源为账号资源;所述第二云端注册请求消息包括以下至少之一:所述云端受限设备的标识、所述访问令牌。
- 根据权利要求108至116任一项所述的设备,其中,所述第四传输单元,还配置为获得云端代理设备发布的资源之前,接收所述云端代理设备发送的第二云端登陆请求消息;向所述云端代理设备发送第一云端登陆响应消息;所述第一云端登陆响应消息包括访问令牌的有效时间。
- 根据权利要求117所述的设备,其中,所述第二云端登陆请求消息请求的资源为会话资源;所述第二云端登陆请求消息包括以下至少之一:云端登陆指示、所述云端受限设备的标识、所述云端受限设备的访问令牌、用户标识。
- 根据权利要求108至118任一项所述的设备,其中,所述设备还包括更新单元;所述第四传输单元,还配置为接收所述云端代理设备发送的第二更新令牌请求消息;所述更新单元,配置为更新新的访问令牌;所述第四传输单元,还配置为向所述云端代理设备发送第一更新令牌响应消息;所述第一更新令牌响应消息包括以下至少之一:新的访问令牌、更新令牌、所述新的访问令牌的有效时间。
- 根据权利要求119所述的设备,其中,所述第二更新令牌请求消息请求的资源为更新令牌资源;所述第二更新令牌请求消息包括以下至少之一:所述云端受限设备的标识、更新令牌、用户标识。
- 根据权利要求108至114任一项所述的设备,其中,所述设备还包括绑定单元;所述第四传输单元,还配置为获得云端代理设备发布的资源之前,接收所述云端代理设备发送的第二设备绑定请求消息;所述第二设备绑定请求消息请求的资源为绑定资源;所述第二设备绑定请求消息包括以下至少之一:所述云端受限设备的标识、所述云端受限设备的安全凭证、安全标识;所述绑定单元,配置为关联所述云端受限设备和用户标识;所述第四传输单元,还配置为向所述云端代理设备发送第一设备绑定响应消息;所述第一设备绑定响应消息包括用户标识。
- 根据权利要求121所述的设备,其中,所述绑定单元,还配置为关联所述云端受限设备和所述云端代理设备的访问令牌。
- 一种设备,包括:处理器和存储器,该存储器用于存储计算机程序,所述处理器用于调用并运行所述存储器中存储的计算机程序,执行如权利要求1至24中任一项所述的方法;或者,执行如权利要求25至46中任一项所述的方法;或者,执行如权利要求47至61中任一项所述的方法。
- 一种芯片,包括:处理器,用于从存储器中调用并运行计算机程序,使得安装有所述芯片的设备执行如权利要求1至24中任一项所述的方法;或者,使得安装有所述芯片的设备执行如权利要求25至46中任一项所述的方法;使得安装有所述芯片的设备执行如权利要求47至61中任一项所述的方法。
- 一种计算机可读存储介质,用于存储计算机程序,所述计算机程序使得计算机执行如权利要求1至24中任一项所述的方法;或者,所述计算机程序使得计算机执行如权利要求25至46中任一项所述的方法;或者,所述计算机程序使得计算机执行如权利要求47至61中任一项所述的方法。
- 一种计算机程序产品,包括计算机程序指令,该计算机程序指令使得计算机执行如权利要求1至24中任一项所述的方法;或者,使得计算机执行如权利要求25至46中任一项所述的方法;或者,使得计算机执行如权利要求47至61中任一项所述的方法。
- 一种计算机程序,所述计算机程序使得计算机执行如权利要求1至24中任一项所述的方法;或者,所述计算机程序使得计算机执行如权利要求25至46中任一项所述的方法;或者,所述计算机程序使得计算机执行如权利要求47至61中任一项所述的方法。
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2019/097581 WO2021012236A1 (zh) | 2019-07-24 | 2019-07-24 | 一种资源发布方法和设备 |
CN201980092309.9A CN113439427B (zh) | 2019-07-24 | 2019-07-24 | 一种资源发布方法和设备 |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2019/097581 WO2021012236A1 (zh) | 2019-07-24 | 2019-07-24 | 一种资源发布方法和设备 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2021012236A1 true WO2021012236A1 (zh) | 2021-01-28 |
Family
ID=74192487
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2019/097581 WO2021012236A1 (zh) | 2019-07-24 | 2019-07-24 | 一种资源发布方法和设备 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN113439427B (zh) |
WO (1) | WO2021012236A1 (zh) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20180263069A1 (en) * | 2017-03-07 | 2018-09-13 | Canon Kabushiki Kaisha | Communication apparatus, communication control method, and storage medium |
US20190014117A1 (en) * | 2017-07-10 | 2019-01-10 | Intel Corporation | SCALABLE AND SECURE RESOURCE ISOLATION AND SHARING FOR IoT NETWORKS |
CN109446439A (zh) * | 2018-09-30 | 2019-03-08 | 青岛海尔科技有限公司 | 一种资源目录的选择方法、装置、***及存储介质 |
CN109547524A (zh) * | 2018-09-30 | 2019-03-29 | 青岛海尔科技有限公司 | 基于物理网的用户行为存储方法、装置、设备及存储介质 |
WO2019112734A1 (en) * | 2017-12-06 | 2019-06-13 | Intel Corporation | Plugin management for internet of things (iot) network optimization |
CN110036619A (zh) * | 2016-12-27 | 2019-07-19 | 英特尔Ip公司 | 用于iot协议标识和管理的框架 |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1264463A2 (en) * | 2000-03-17 | 2002-12-11 | AT & T Corp. | Web-based single-sign-on authentication mechanism |
US9300652B2 (en) * | 2014-04-14 | 2016-03-29 | Adobe Systems Incorporated | Scoped access to user content |
KR101845671B1 (ko) * | 2017-08-23 | 2018-04-05 | 서울과학기술대학교 산학협력단 | 제한적 네트워크 내 센서 노드의 리소스 발견 방법 및 시스템 |
CN109743705A (zh) * | 2019-01-25 | 2019-05-10 | 欧普照明股份有限公司 | 一种可穿戴设备和Mesh网络的结合方法及*** |
-
2019
- 2019-07-24 CN CN201980092309.9A patent/CN113439427B/zh active Active
- 2019-07-24 WO PCT/CN2019/097581 patent/WO2021012236A1/zh active Application Filing
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110036619A (zh) * | 2016-12-27 | 2019-07-19 | 英特尔Ip公司 | 用于iot协议标识和管理的框架 |
US20180263069A1 (en) * | 2017-03-07 | 2018-09-13 | Canon Kabushiki Kaisha | Communication apparatus, communication control method, and storage medium |
US20190014117A1 (en) * | 2017-07-10 | 2019-01-10 | Intel Corporation | SCALABLE AND SECURE RESOURCE ISOLATION AND SHARING FOR IoT NETWORKS |
WO2019112734A1 (en) * | 2017-12-06 | 2019-06-13 | Intel Corporation | Plugin management for internet of things (iot) network optimization |
CN109446439A (zh) * | 2018-09-30 | 2019-03-08 | 青岛海尔科技有限公司 | 一种资源目录的选择方法、装置、***及存储介质 |
CN109547524A (zh) * | 2018-09-30 | 2019-03-29 | 青岛海尔科技有限公司 | 基于物理网的用户行为存储方法、装置、设备及存储介质 |
Also Published As
Publication number | Publication date |
---|---|
CN113439427B (zh) | 2023-10-27 |
CN113439427A (zh) | 2021-09-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
AU2021277736B2 (en) | Pdu type setting method, ue policy setting method, and related entity | |
US11412473B2 (en) | PDU session management | |
US20200296142A1 (en) | User Group Establishment Method and Apparatus | |
WO2021072749A1 (zh) | 设备权限控制方法、设备及存储介质 | |
US20180063879A1 (en) | Apparatus and method for interoperation between internet-of-things devices | |
EP3687259B1 (en) | Communication method and device | |
US11082893B2 (en) | Session migration method and device applied to a UE tracking area update | |
WO2018157551A1 (zh) | 数据传输的方法与装置 | |
WO2020042848A1 (zh) | 一种网络切片管理方法及装置 | |
WO2017167027A1 (zh) | 一种网络接入方法、相关设备和*** | |
US20230232196A1 (en) | Data communication method and communication apparatus | |
WO2021068171A1 (zh) | 用于共享服务端的方法、客户端和云平台 | |
WO2021142849A1 (zh) | 安全域的配置、发现和加入方法及装置、电子设备 | |
WO2013185696A2 (zh) | 一种数据处理的方法与设备 | |
CN110278558B (zh) | 报文的交互方法及wlan*** | |
CN110535746B (zh) | 虚拟专用网络vpn共享的方法、装置、电子设备及存储介质 | |
CN113243097B (zh) | 一种设备绑定方法、云端服务器、第一设备 | |
WO2021012236A1 (zh) | 一种资源发布方法和设备 | |
EP2424162A1 (en) | Method, apparatus and system for device management | |
US11765226B2 (en) | Method for provisioning internet of things device and internet of things device | |
EP4199475A1 (en) | Data offloading method and device | |
WO2018082574A1 (zh) | 一种信息发送方法、单元和*** | |
CN115734173A (zh) | 用于设备间通信的方法和装置 | |
WO2017091949A1 (zh) | 通讯方法、微基站、微基站控制器、终端和*** | |
WO2021035740A1 (zh) | 访问控制方法、服务器、访问设备及存储介质 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 19938840 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 19938840 Country of ref document: EP Kind code of ref document: A1 |