WO2021012236A1 - Resource publishing method and device - Google Patents

Resource publishing method and device Download PDF

Info

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
Application number
PCT/CN2019/097581
Other languages
French (fr)
Chinese (zh)
Inventor
张军
Original Assignee
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Priority to CN201980092309.9A priority Critical patent/CN113439427B/en
Priority to PCT/CN2019/097581 priority patent/WO2021012236A1/en
Publication of WO2021012236A1 publication Critical patent/WO2021012236A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support 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 .

Abstract

Disclosed are a resource publishing method and device. The method comprises: a cloud limited device establishing a connection with a cloud proxy device; and the cloud limited device carrying out the transmission of information with the cloud proxy device on the basis of the connection, wherein the information is used for the cloud proxy device to issue a resource to a cloud device.

Description

一种资源发布方法和设备Method and equipment for publishing resources 技术领域Technical field
本申请涉及物联网通信技术领域,具体涉及一种资源发布方法和设备。This application relates to the field of Internet of Things communication technology, in particular to a method and equipment for publishing resources.
背景技术Background technique
开放连接基金会(OCF,Open Connectivity Foundation)是新兴的物联网应用层技术标准组织,OCF为物联网设备之间实现互联互通制定Restful服务框架。OCF部署架构中可包括OCF设备和OCF云端设备;OCF云端设备接受OCF设备发布资源。这种情况下,向OCF云端设备发布资源的OCF设备需要具有连云的能力,OCF设备和OCF云端设备通过建立并维持安全传输层协议(TLS,Transport Layer Security)长连接,实现资源发布和远程通信。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.
然而,对于不具备连接OCF云端设备的OCF设备,由于无法连接OCF云端设备,也无法进行资源发布。对于该问题,目前尚无有效解决方案。However, for OCF devices that do not have access to OCF cloud devices, because they cannot connect to OCF cloud devices, they cannot publish resources. There is no effective solution to this problem.
发明内容Summary of the invention
本申请实施例提供一种资源发布方法和设备。The embodiments of the present application provide a resource release method and device.
第一方面,本申请实施例提供的资源发布方法,所述方法包括:云端受限设备建立与云端代理设备的连接;所述云端受限设备基于所述连接与所述云端代理设备传输信息,所述信息用于所述云端代理设备向云端设备发布资源。In the first aspect, 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.
第二方面,本申请实施例提供的资源发布方法,所述方法包括:云端代理设备与云端受限设备建立连接;所述云端代理设备基于所述连接与所述云端受限设备传输信息,基于所述信息向云端设备发布所述云端受限设备的资源。In the second aspect, 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.
第三方面,本申请实施例提供的资源发布方法,所述方法包括:云端设备获得云端代理设备发布的资源;所述资源为所述云端代理设备基于与云端受限设备之间的连接获得的所述云端受限设备的资源;所述云端设备公布所述资源。In the third aspect, 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.
第四方面,本申请实施例提供的云端受限设备,所述设备包括:第一连接建立单元和第一传输单元;其中,In a fourth aspect, in the cloud-restricted device provided by an embodiment of the present application, 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.
第五方面,本申请实施例提供的云端代理设备,所述云端代理设备包括:第二连接建立单元、第二传输单元和第三传输单元;其中,In the fifth aspect, in the cloud proxy device provided by the embodiment of the present application, 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.
第六方面,本申请实施例提供的云端设备,所述云端设备包括第四传输单元和公布单元;其中,In the sixth aspect, in the cloud device provided by the embodiment of the present application, 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.
第七方面,本申请实施例提供的设备,包括处理器和存储器。该存储器用于存储计算机程序,该处理器用于调用并运行该存储器中存储的计算机程序,执行上述第一方面、第二方面或第三方面的资源发布方法。In the seventh aspect, 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, and 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.
具体地,该芯片包括:处理器,用于从存储器中调用并运行计算机程序,使得安装有该芯片的 设备执行上述第一方面、第二方面或第三方面的资源发布方法。Specifically, 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.
通过上述技术方案,通过云端代理设备与云端受限设备建立连接,使得无法与云端设备进行交互的云端受限设备通过云端代理设备发布资源,解决了云端受限设备无法发布资源到云端设备的问题。Through the above technical solution, 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 .
附图说明Description of the drawings
此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:The drawings described here are used to provide a further understanding of the application and constitute a part of the application. The exemplary embodiments and descriptions of the application are used to explain the application and do not constitute an improper limitation of the application. In the attached picture:
图1a和图1b均是本申请实施例提供的一种OCF系统架构的示意性图;FIG. 1a and FIG. 1b are both schematic diagrams of an OCF system architecture provided by an embodiment of the present application;
图2是本申请实施例提供的资源发布方法的流程示意图;FIG. 2 is a schematic flowchart of a resource publishing method provided by an embodiment of the present application;
图3是本申请实施例提供的资源发布方法的具体示例的流程示意图一;FIG. 3 is a schematic flowchart 1 of a specific example of a resource publishing method provided by an embodiment of the present application;
图4是本申请实施例提供的资源发布方法的具体示例的流程示意图二;FIG. 4 is a second schematic flowchart of a specific example of a resource publishing method provided by an embodiment of the present application;
图5是本申请实施例提供的资源发布方法的具体示例的流程示意图三;FIG. 5 is a third schematic flowchart of a specific example of a resource publishing method provided by an embodiment of the present application;
图6是本申请实施例提供的云端受限设备的一种结构组成示意图;FIG. 6 is a schematic diagram of a structural composition of a cloud restricted device provided by an embodiment of the present application;
图7是本申请实施例提供的云端代理设备的一种结构组成示意图;FIG. 7 is a schematic diagram of a structural composition of a cloud proxy device provided by an embodiment of the present application;
图8是本申请实施例提供的云端设备的结构组成示意图一;FIG. 8 is a schematic diagram 1 of the structural composition of a cloud device provided by an embodiment of the present application;
图9是本申请实施例提供的云端设备的结构组成示意图二;FIG. 9 is a second schematic diagram of the structural composition of a cloud device provided by an embodiment of the present application;
图10是本申请实施例提供的云端设备的结构组成示意图三;FIG. 10 is a third schematic diagram of the structural composition of a cloud device provided by an embodiment of the present application;
图11是本申请实施例提供的云端设备的结构组成示意图四;FIG. 11 is a fourth schematic diagram of the structural composition of a cloud device provided by an embodiment of the present application;
图12是本申请实施例提供的一种设备示意性结构图;Figure 12 is a schematic structural diagram of a device provided by an embodiment of the present application;
图13是本申请实施例的芯片的示意性结构图。FIG. 13 is a schematic structural diagram of a chip of an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are a part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of this application.
本申请实施例的技术方案可以应用于OCF系统,OCF为物联网设备之间实现互联互通制定Restful服务框架,在OCF Restful服务框架中,可通过资源来表述物联网设备、物联网设备的功能服务以及状态数据等信息;其中,所述状态数据可以是物联网设备获得的环境状态数据。图1a和图1b均是本申请实施例提供的一种OCF系统架构的示意性图;如图1a所示,提供资源的实体可称为OCF服务端(以下简称服务端),访问资源的实体可称为OCF客户端(以下简称客户端)。例如,获取室内环境状态数据的控制终端可以是客户端,监测室内环境状态数据的传感器设备可以是服务端,客户端和服务端的业务交互是通过对资源的创建、读取、更新、删除或者通知这些资源操作方法而实现。The technical solutions of the embodiments of this application can be applied to the OCF system. OCF develops a Restful service framework for interconnection and intercommunication between IoT devices. In the OCF Restful service framework, resources can be used to express the functional services of IoT devices and IoT devices And information such as status data; wherein, the status data may be environmental status data obtained by an Internet of Things device. Figures 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). For example, the 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.
客户端和服务端之间的交互方式可参照图1a所示,客户端11向服务端12发送请求,所述请求用于对服务端12上的资源进行操作;服务端12执行所述请求对应的资源操作,并向客户端11返回响应,响应中携带资源的表述。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.
作为一种实施方式,客户端向服务端发送更新(POST)资源请求,对服务端上的资源进行操作,所述更新资源请求操作的对象例如可以是资源统一资源标识符(URI,Uniform Resource Identifier)。例如,服务端上有环境温度资源,则资源URI可以为“/environmentTemperature”。服务端向客户端返回更新资源响应,所述更新资源响应中携带资源的表述。As an implementation manner, 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). ). For example, if there is an environment temperature resource on the server, the resource URI can be "/environmentTemperature". The server returns an update resource response to the client, and the update resource response carries an expression of the resource.
其中,资源的表述可包括以下至少之一:资源URI、资源类型、资源接口和资源的功能属性等,具体定义如下:Among them, 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. The specific definition is as follows:
资源URI:在资源表述中用“href”表示,表示服务端资源的地址,“href”的值是具体的资源URI;客户端通过资源URI访问服务端的资源;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;
资源类型:在资源表述中用“rt”表示,表示资源的类型,例如资源类型“rt”是“oic.r.temperature”,表示温度资源类型;Resource type: "rt" is used in the resource description to indicate the type of resource. For example, the resource type "rt" is "oic.r.temperature", which indicates the temperature resource type;
资源接口:在资源表述中用“if”表示,表示对资源的查看以及资源支持的响应,例如资源接口“if”是“oic.if.a”,表示控制器接口;Resource interface: "if" is used in the resource description to indicate the view of resources and the response to resource support. For example, the resource interface "if" is "oic.if.a", which means the controller interface;
资源属性:在资源表述中描述资源的属性信息,例如资源的属性信息是“targetTemperature”,表示温度资源的目标温度属性,又例如资源的属性信息是“currentTemperature”,表示温度资源的当前温度属性,再例如资源的属性信息是“temperatureRange”,表示温度资源的温度范围属性。Resource attribute: Describe the attribute information of the resource in the resource description. For example, the attribute information of the resource is "targetTemperature", which represents the target temperature attribute of the temperature resource, and the attribute information of the resource is "currentTemperature", which represents the current temperature attribute of the temperature resource. For another example, the attribute information of the resource is "temperatureRange", which represents the temperature range attribute of the temperature resource.
OCF定义了所有OCF设备都必须支持的资源发现资源“/oic/res”,用于OCF设备及资源的发现,资源发现资源提供设备资源发现的功能,资源发现资源的URI固定为“/oic/res”。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定义了资源链接(即资源Links),服务端可以资源链接的形式提供自身所拥有的资源,便于客户端发现服务端的资源。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.
其中,资源链接的内容如下:Among them, the content of the resource link is as follows:
Figure PCTCN2019097581-appb-000001
Figure PCTCN2019097581-appb-000001
资源链接的内容包括:The content of the resource link includes:
■anchor:为上下文URI,表示包含资源链接的属主资源的URI;■ anchor: is the context URI, representing the URI of the owner resource that contains the resource link;
■href:目标URI,即资源链接中引用的目标资源的URI;■ href: target URI, that is, the URI of the target resource referenced in the resource link;
■rt:表示目标资源的资源类型标识;■rt: indicates the resource type identifier of the target resource;
■if:表示目标资源支持的接口;■if: indicates the interface supported by the target resource;
■eps:表示可以访问目标资源的端点;■eps: indicates the endpoint that can access the target resource;
由于OCF标准协议在传输层采用CoAP协议承载OCF消息,每个服务端需要具有端点,每一个OCF设备必须关联至少一个端点用于发送和接收OCF消息,客户端通过端点可以访问服务端的目标资源。在资源链接的参数中用“eps”数组表示目标资源的端点,具体端点用“ep”表示,即可以通过“eps”参数中“ep”值的地址访问目标资源。例如前述资源链接的示例中,客户端可以通过“eps”参数中“ep”值表示的端点“coaps://[2001:db8:b::c2e5]:22222”访问“href”参数表示的目标资源“/myLightSwitch”。Since the OCF standard protocol uses the CoAP protocol to carry OCF messages in the transport layer, 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. For example, in the aforementioned resource link example, 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".
当OCF设备和控制端不在同一个本地网络中时,如图1b所示,OCF设备和控制端之间可通过OCF云端设备进行通信。其中,所述OCF设备具体可以为图1a中的服务端,所述服务端例如是能够采集环境数据的传感器,所述控制端具体可以是图1a中的客户端,所述客户端例如是手机、电脑等电子设备;电子设备中可安装有特定应用(APP),通过该特定应用进行资源的访问。When the OCF device and the control terminal are not in the same local network, as shown in Figure 1b, the OCF device and the control terminal can communicate through the OCF cloud device. Wherein, the OCF device may specifically be the server in FIG. 1a, the server may be, for example, a sensor capable of collecting environmental data, and the control terminal may specifically be the client in FIG. 1a, and the client may be a mobile phone, for example. , Computers and other electronic equipment; the electronic equipment can be installed with a specific application (APP), and the resource can be accessed through the specific application.
其中,OCF云端设备可包括:Among them, OCF cloud devices can include:
云端接口:负责OCF设备的接入管理,以及OCF设备远程通信的消息路由;Cloud interface: Responsible for the access management of OCF equipment and the message routing of OCF equipment remote communication;
授权服务器:负责OCF设备的注册,对OCF设备的访问令牌进行验证;Authorization server: Responsible for the registration of OCF devices, and verify the access token of OCF devices;
资源目录:负责提供资源发布和查询服务,OCF设备向资源目录发布资源链接,由资源目录公布OCF设备发布的资源链接,OCF客户端通过检索资源目录可以获取目标设备的资源信息。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云端设备需要实现资源目录资源。资源目录资源的URI是“/oic/rd”,资源类型为“oic.wk.rd”。发布设备(即发布资源链接的OCF设备)向OCF云端设备的“/oic/rd”发布资源,发布的内容是OCF设备的资源链接,OCF云端设备的资源目录服务接受资源发布请求后,将OCF设备的资源链接发布到OCF云端设备的“/oic/res”资源下。客户端可以通过查询OCF云端设备以发现其他OCF设备的资源,资源目录代表发布设备提供OCF设备的资源信息,客户端发现OCF设备的资源信息后,通过OCF云端设备请求与相应的OCF设备进行交互。In order to support resource release and resource discovery, 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. After 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 .
本申请实施例中,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网络。In the embodiments of the present application, 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. Among them, the 5G system or 5G network may also be referred to as a New Radio (NR) system or NR network.
本申请各实施例中,在OCF设备与OCF云端设备之间无法连接的情况下,OCF设备称为云端受限设备。In the embodiments of the present application, when the OCF device and the OCF cloud device cannot be connected, the OCF device is called a cloud restricted device.
应理解,本文中术语“系统”和“网络”在本文中常被可互换使用。本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。It should be understood that the terms "system" and "network" in this article are often used interchangeably in this article. The term "and/or" in this article is only an association relationship describing associated objects, which means that there can be three relationships, for example, A and/or B, which can mean: A alone exists, A and B exist at the same time, exist alone B these three situations. In addition, the character "/" in this text generally indicates that the associated objects before and after are in an "or" relationship.
本申请实施例的技术方案主要应用于物联网系统,当然,本申请实施例的技术方案并不局限于物联网系统,还可以应用于其他类型的通信系统。The technical solutions of the embodiments of the present application are mainly applied to IoT systems. Of course, 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.
本申请实施例提供了一种资源发布方法。图2是本申请实施例提供的资源发布方法的流程示意图;如图2所示,所述方法包括:The embodiment of the present application provides a resource release method. 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:
步骤201:云端受限设备建立与云端代理设备的连接;Step 201: The cloud restricted device establishes a connection with the cloud proxy device;
步骤202:所述云端受限设备基于所述连接与所述云端代理设备传输信息,所述信息用于所述云端代理设备向云端设备发布资源;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;
步骤203:所述云端受限设备基于所述信息向云端设备发布所述云端受限设备的资源;Step 203: The cloud restricted device releases the resources of the cloud restricted device to the cloud device based on the information;
步骤204:云端设备获得云端代理设备发布的资源,公布所述资源;所述资源为所述云端代理设备基于与云端受限设备之间的连接获得的所述云端受限设备的资源。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.
本实施例步骤201中,所述云端受限设备建立与云端代理设备的连接,包括:所述云端受限设备获得云端代理设备的信息,基于所述信息建立与云端代理设备的连接。相应的,云端代理设备与云端受限设备建立连接,包括:所述云端代理设备向所述云端受限设备发送所述云端代理设备的信息,所述云端代理设备的信息用于所述云端受限设备建立于所述云端代理设备的连接。In step 201 of this embodiment, 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. Correspondingly, 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 in this embodiment may include the following methods:
作为一种实施方式,所述云端受限设备获得云端代理设备的信息,包括:所述云端受限设备接收配置器发送的配置信息,所述配置信息中包括云端代理设备的信息。As an implementation manner, 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.
可以理解,所述云端受限设备虽然无法与云端设备建立连接,但可以与配置器进行交互。其中,所述云端受限设备可通过例如局域网或短距离通信的方式与配置器进行交互,获得所述配置器发送的配置信息。其中,所述局域网例如无线保真(Wi-Fi);所述短距离通信例如蓝牙通信、近场通信(Near Field Communication,NFC)等等。It can be understood that although the cloud restricted device cannot establish a connection with the cloud device, it can interact with the configurator. Wherein, 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. Wherein, 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.
作为另一种实施方式,所述云端受限设备获得云端代理设备的信息,包括:所述云端受限设备通过广播或组播的方式发送发现请求消息;所述发现请求消息中包括云端代理资源类型;所述云端受限设备接收发现响应消息;所述发现响应消息包括所述云端代理设备的信息。相应的,所述云端代理设备向所述云端受限设备发送所述云端代理设备的信息,包括:所述云端代理设备接收所述云端受限设备通过广播或组播的方式发送的发现请求消息;所述发现请求消息中包括云端代理资源类型;所述云端代理设备向所述云端受限设备发送发现响应消息;所述发现响应消息包括所述云端代理设备的信息。As another implementation manner, 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. Correspondingly, 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.
可以理解,所述云端受限设备虽然无法与云端设备建立连接,但可以与云端代理设备进行交互。其中,所述云端受限设备可通过例如局域网或短距离通信的方式与云端代理设备进行信息交互,云端受限设备可通过单播、广播或组播的方式发送发现请求消息;处在同一局域网之内的云端代理设备,或者通信距离在预设距离范围内的云端代理设备可接收到所述发现请求消息,确定发现请求消息中的云端代理资源类型后,向云端受限设备发送发现响应消息。其中,所述局域网例如Wi-Fi;所述短距离通信例如蓝牙通信等等。It can be understood that although the cloud-limited device cannot establish a connection with the cloud device, it can interact with the cloud proxy device. Wherein, 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 . Wherein, the local area network is for example Wi-Fi; the short-distance communication is for example Bluetooth communication and so on.
其中,所述云端代理设备的信息包括以下至少之一:云端代理设备的云端代理资源标识、云端代理资源的端点信息。Wherein, 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.
在本申请的一种可选实施例中,所述云端受限设备基于所述连接与所述云端代理设备传输信息,包括:所述云端受限设备基于所述连接指示所述云端代理设备向云端设备发布资源。相应的,所述云端代理设备基于所述连接与所述云端受限设备传输信息,基于所述信息向云端设备发布资源,包 括:所述云端代理设备基于所述连接获得所述云端受限设备的指示,基于所述指示向云端设备发布资源。In an optional embodiment of the present application, 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. Correspondingly, 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.
本实施例中,所述云端受限设备基于所述连接指示所述云端代理设备向云端设备发布资源,包括:所述云端受限设备向所述云端代理设备发送第一资源发布请求消息,第一资源发布请求消息用于指示所述云端代理设备向云端设备发布资源。相应的,所述云端代理设备基于所述连接获得所述云端受限设备的指示,基于所述指示向云端设备发布资源,包括:所述云端代理设备基于所述连接接收所述云端受限设备发送的第一资源发布请求消息,第一资源发布请求消息用于指示所述云端代理设备向云端设备发布资源;所述云端代理设备向云端设备发送第二资源发布请求消息;所述第二资源发布请求消息请求的资源为资源目录资源;所述第二资源发布请求消息包括以下至少之一:所述云端受限设备的标识、所述云端受限设备的第二资源链接;所述云端受限设备的第二资源链接中的资源的端点为所述云端代理设备的端点;所述云端代理设备获得所述云端设备发送的第一资源发布响应消息,向所述云端受限设备发送第二资源发布响应消息。相应的,所述云端受限设备接收所述云端代理设备发送的第二资源发布响应消息。In this embodiment, 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. Correspondingly, 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. Correspondingly, the cloud restricted device receives the second resource release response message sent by the cloud proxy device.
对于云端设备来说,所述云端设备接收云端代理设备发布的资源,包括:所述云端设备接收所述云端代理设备发送的第二资源发布请求消息;所述第二资源发布请求消息请求的资源为资源目录资源;向所述云端代理设备发送第一资源发布响应消息。For a cloud 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.
本实施例中,所述第一资源发布请求消息请求的资源包括以下方式:In this embodiment, the resource requested by the first resource release request message includes the following manners:
作为一种实施方式,所述第一资源发布请求消息请求的资源为云端代理资源;所述第一资源发布请求消息包括以下至少之一:代理发布资源指示、所述云端受限设备的标识、所述云端受限设备的第一资源链接;所述云端受限设备的第一资源链接中的资源的端点为所述云端受限设备的端点。其中,所述代理发布资源指示用于指示云端代理设备为云端受限设备进行代理资源发布;所述云端受限设备的标识表示需要由云端代理设备代理发布资源的目标云端受限设备;所述云端受限设备的第一资源链接表示需要发布到云端设备的资源。As an implementation manner, 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. Wherein, 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.
作为另一种实施方式,所述第一资源发布请求消息请求的资源为资源目录资源;所述第一资源发布请求消息包括以下至少之一:所述云端受限设备的标识、所述云端受限设备的第一资源链接;所述云端受限设备的第一资源链接中的资源的端点为所述云端受限设备的端点。As another implementation manner, 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.
其中,可选地,所述第一资源发布请求消息还可以包括以下至少之一:发布资源的有效时间、云端受限设备的指示;所述第二资源发布请求消息中还可以包括以下至少之一:发布资源的有效时间、云端受限设备的指示。其中,所述云端受限设备的指示表示发布资源的设备为云端受限设备。Wherein, optionally, 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. Wherein, the indication of the cloud restricted device indicates that the device publishing the resource is a cloud restricted device.
其中,可选地,所述云端受限设备的第二资源链接中的目标标识包括目标资源的标识和所述云端受限设备的标识。Wherein, optionally, 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.
本实施例中,所述云端设备公布所述资源,包括:所述云端设备将所述第二资源链接添加至资源目录中;其中,公布的资源的端点为所述云端设备的端点。In this embodiment, 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.
作为一种可选实施方式,所述云端设备将所述第二资源链接添加至资源目录中,包括:在所述第二资源发布请求消息中包括云端受限设备的指示的情况下,或者,在所述云端受限设备的第二资源链接中的目标标识包括目标资源的标识和所述云端受限设备的标识的情况下,公布的目标资源的标识与所述第二资源链接中的目标资源的标识相同。As an optional implementation manner, 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.
在本申请的一种可选实施例中,所述云端受限设备向所述云端代理设备发送第一资源发布请求消息之前,所述方法还包括:所述云端受限设备向所述云端代理设备发送第一云端注册请求消息;所述云端受限设备接收所述云端代理设备发送的第二云端注册响应消息;所述第二云端注册响应消息包括以下至少之一:所述用户标识、所述云端受限设备的访问令牌、所述访问令牌的有效时长、所述云端受限设备的更新令牌。相应的,所述云端代理设备基于所述连接接收所述云端受限设备发送的第一资源发布请求消息之前,所述方法还包括:所述云端代理设备接收所述云端受限设备发送的第一云端注册请求消息,向所述云端设备发送第二云端注册请求消息;所述云端代理设备接收所述云端设备发送的第一云端注册响应消息;所述第一云端注册响应消息包括以下至少之一:所述用户标识、所述云端受限设备的访问令牌、所述访问令牌的有效时长、所述云端受限设备的更新令牌;所述云端代理设备向所述云端受限设备发送第二云端注册响应消息;所述第二云端注册响应消息包括以下至少之一:所述用户标识、所述云端受限设备的访问令牌、所述访问令牌的有效时长、所述云端受限设备的更新令牌。相应的,所述云端受限设备接收所述云端代理设备发送的第二云端注册响应消息。In an optional embodiment of the present application, 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. Correspondingly, before the cloud proxy device receives the first resource release request message sent by the cloud restricted device based on the connection, 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. Correspondingly, the cloud restricted device receives a second cloud registration response message sent by the cloud proxy device.
对于云端设备来说,所述云端设备获得云端代理设备发布的资源之前,所述方法还包括:所述 云端设备接收所述云端代理设备发送的第二云端注册请求消息;所述云端设备为所述云端受限设备分配访问令牌,以及关联所述云端受限设备和用户标识;所述云端设备向所述云端代理设备发送第一云端注册响应消息;所述第一云端注册响应消息包括以下至少之一:所述用户标识、所述云端受限设备的访问令牌、所述访问令牌的有效时长、所述云端受限设备的更新令牌。For a cloud device, before the cloud device obtains the resources released 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.
本实施例中,所述第一云端注册请求消息和第二云端注册请求消息请求的资源包括以下方式:In this embodiment, the resources requested by the first cloud registration request message and the second cloud registration request message include the following methods:
作为一种实施方式,所述第一云端注册请求消息请求的资源为云端代理资源;所述第一云端注册请求消息包括以下至少之一:代理云端注册指示、所述云端受限设备的标识、所述云端受限设备的安全凭证信息;所述第二云端注册请求消息请求的资源为账号资源;所述第二云端注册请求消息包括以下至少之一:所述云端受限设备的标识、所述云端受限设备的安全凭证信息、用户标识。其中,所述代理云端注册指示用于指示云端代理设备为云端受限设备进行代理云端注册;所述云端受限设备的标识表示需要由云端代理设备代理注册的目标云端受限设备;所述云端受限设备的安全凭证信息用于云端设备对注册的云端受限设备进行安全认证。As an implementation manner, 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. Wherein, 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.
作为另一种实施方式,所述第一云端注册请求消息请求的资源为账号资源;所述第一云端注册请求消息包括以下至少之一:所述云端受限设备的标识、所述访问令牌。其中,所述访问令牌为所述云端受限设备与所述云端代理设备建立连接之前、由配置器从云端设备获得的所述云端受限设备的访问令牌。所述第二云端注册请求消息请求的资源为账号资源;所述第二云端注册请求消息包括以下至少之一:所述云端受限设备的标识、所述访问令牌。则本实施例中,所述方法还包括:所述云端受限设备获得配置器发送的访问令牌。所述第二云端注册请求消息请求的资源为账号资源;所述第二云端注册请求消息包括以下至少之一:所述云端受限设备的标识、所述访问令牌。As another implementation manner, 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 . Wherein, 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. In this embodiment, 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.
在本申请的一种可选实施例中,所述云端受限设备向所述云端代理设备发送第一资源发布请求消息之前,所述方法还包括:所述云端受限设备向所述云端代理设备发送第一云端登陆请求消息;所述云端受限设备接收所述云端代理设备发送的第二云端登陆响应消息;所述第二云端登陆响应消息包括访问令牌的有效时间。相应的,所述云端代理设备基于所述连接接收所述云端受限设备发送的第一资源发布请求消息之前,所述方法还包括:所述云端代理设备接收所述云端受限设备发送的第一云端登陆请求消息,向所述云端设备发送第二云端登陆请求消息;所述云端代理设备接收所述云端设备发送的第一云端登陆响应消息;所述第一云端登陆响应消息包括访问令牌的有效时间;所述云端代理设备向所述云端受限设备发送第二云端登陆响应消息;所述第二云端登陆响应消息包括访问令牌的有效时间。相应的,所述云端受限设备接收所述云端代理设备发送的第二云端登陆响应消息。In an optional embodiment of the present application, 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. Correspondingly, before the cloud proxy device receives the first resource release request message sent by the cloud restricted device based on the connection, 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. Correspondingly, the cloud restricted device receives a second cloud login response message sent by the cloud proxy device.
对于云端设备来说,所述云端设备获得云端代理设备发布的资源之前,所述方法还包括:所述云端设备接收所述云端代理设备发送的第二云端登陆请求消息;所述云端设备向所述云端代理设备发送第一云端登陆响应消息;所述第一云端登陆响应消息包括访问令牌的有效时间。For a cloud device, before the cloud device obtains the resources issued 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.
本实施例中,所述第一云端登陆请求消息和第二云端登陆请求消息请求的资源包括以下方式:In this embodiment, the resources requested by the first cloud login request message and the second cloud login request message include the following methods:
作为一种实施方式,所述第一云端登陆请求消息请求的资源为云端代理资源;所述第一云端登陆请求消息包括以下至少之一:代理云端登陆指示、所述云端受限设备的标识、所述云端受限设备的访问令牌。所述第二云端登陆请求消息请求的资源为会话资源;所述第二云端登陆请求消息包括以下至少之一:云端登陆指示、所述云端受限设备的标识、所述云端受限设备的访问令牌、用户标识。其中,所述代理云端登陆指示用于指示云端代理设备为云端受限设备进行代理云端登录。而所述云端登陆指示为云端受限设备进行云端登录。As an implementation manner, 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. Wherein, 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.
作为另一种实施方式,所述第一云端登陆请求消息请求的资源为会话资源;所述第一云端登陆请求消息包括以下至少之一:云端登陆指示、所述云端受限设备的标识、所述云端受限设备的访问令牌、用户标识。所述第二云端登陆请求消息请求的资源为会话资源;所述第二云端登陆请求消息包括以下至少之一:云端登陆指示、所述云端受限设备的标识、所述云端受限设备的访问令牌、用户标识。其中,所述云端登陆指示为云端受限设备进行云端登录。As another implementation manner, 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. Wherein, the cloud login instruction is cloud login by a cloud restricted device.
在本申请的一种可选实施例中,所述方法还包括:所述云端受限设备向所述云端代理设备发送第一更新令牌请求消息;所述云端受限设备接收所述云端代理设备发送的第二更新令牌响应消息;所述第二更新令牌响应消息包括以下至少之一:新的访问令牌、更新令牌、所述新的访问令牌的有效时间。相应的,所述方法还包括:所述云端代理设备接收所述云端受限设备发送的第一更新令牌请求消息,向所述云端设备发送第二更新令牌请求消息;所述云端代理设备接收所述云端设备发送的第一更新令牌响应消息;所述第一更新令牌响应消息包括以下至少之一:新的访问令牌、更新令牌、所述新的访问令牌的有效时间;所述云端代理设备向所述云端受限设备发送第二更新令牌响应 消息;所述第二更新令牌响应消息包括以下至少之一:新的访问令牌、更新令牌、所述新的访问令牌的有效时间。相应的,所述云端受限设备接收所述云端代理设备发送的第二更新令牌响应消息。In an optional embodiment of the present application, 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. Correspondingly, 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. Correspondingly, the cloud restricted device receives the second update token response message sent by the cloud proxy device.
对于云端设备来说,所述云端设备接收所述云端代理设备发送的第二更新令牌请求消息;所述云端设备更新新的访问令牌,向所述云端代理设备发送第一更新令牌响应消息;所述第一更新令牌响应消息包括以下至少之一:新的访问令牌、更新令牌、所述新的访问令牌的有效时间。For a cloud 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.
本实施例中,所述第一更新令牌请求消息和第二更新令牌请求消息请求的资源包括以下方式:In this embodiment, the resources requested by the first update token request message and the second update token request message include the following manners:
作为一种实施方式,所述第一更新令牌请求消息请求的资源为云端代理资源;所述第一更新令牌请求消息包括以下至少之一:代理更新令牌指示、所述云端受限设备的标识、更新令牌、用户标识。所述第二更新令牌请求消息请求的资源为更新令牌资源;所述第二更新令牌请求消息包括以下至少之一:所述云端受限设备的标识、更新令牌、用户标识。As an implementation manner, 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.
作为另一种实施方式,所述第一更新令牌请求消息请求的资源为更新令牌资源;所述第一更新令牌请求消息包括以下至少之一:所述云端受限设备的标识、更新令牌、用户标识。所述第二更新令牌请求消息请求的资源为更新令牌资源;所述第二更新令牌请求消息包括以下至少之一:所述云端受限设备的标识、更新令牌、用户标识。As another implementation manner, 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.
在本申请的一种可选实施例中,所述云端受限设备向所述云端代理设备发送第一资源发布请求消息之前,所述方法还包括:所述云端受限设备向所述云端代理设备发送第一设备绑定请求消息;所述第一设备绑定请求消息请求的资源为云端代理资源;所述云端受限设备接收所述云端代理设备发送的第二设备绑定响应消息。相应的,所述云端代理设备基于所述连接接收所述云端受限设备发送的第一资源发布请求消息之前,所述方法还包括:所述云端代理设备接收所述云端受限设备发送的第一设备绑定请求消息;所述第一设备绑定请求消息请求的资源为云端代理资源;所述云端代理设备向所述云端设备发送第二设备绑定请求消息;所述第二设备绑定请求消息请求的资源为绑定资源;所述云端代理设备接收所述云端设备发送的第一设备绑定响应消息;所述第一设备绑定响应消息包括用户标识;所述云端代理设备向所述云端受限设备发送第二设备绑定响应消息;所述第二设备绑定响应消息包括用户标识。相应的,所述云端受限设备接收所述云端代理设备发送的第二设备绑定响应消息。In an optional embodiment of the present application, 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. Correspondingly, before the cloud proxy device receives the first resource release request message sent by the cloud restricted device based on the connection, 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. Correspondingly, the cloud restricted device receives the second device binding response message sent by the cloud proxy device.
对于云端设备来说,所述云端设备接收所述云端代理设备发送的第二设备绑定请求消息;所述第二设备绑定请求消息请求的资源为绑定资源;所述第二设备绑定请求消息包括以下至少之一:所述云端受限设备的标识、所述云端受限设备的安全凭证、安全标识;所述云端设备关联所述云端受限设备和用户标识,向所述云端代理设备发送第一设备绑定响应消息;所述第一设备绑定响应消息包括用户标识。For a cloud 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.
在一种可选实施例中,所述方法还包括:所述云端设备关联所述云端受限设备和所述云端代理设备的访问令牌。In an optional embodiment, the method further includes: the cloud device associating the cloud restricted device with the access token of the cloud proxy device.
其中,所述第一设备绑定请求消息包括以下至少之一:代理设备绑定指示、所述云端受限设备的标识、所述云端受限设备的安全凭证;所述第二设备绑定响应消息包括用户标识。Wherein, 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.
下面结合具体的示例对本申请实施例的资源发布方法进行详细说明。在本申请以下各示例中,云端受限设备的端点可表示为:“coaps://[fe80::2]:2222”;云端受限设备的标识可表示为:“88b7c7f0-4b51-4e0a-9faa-cfb439fd7f49”;云端代理设备的端点可表示为:“coaps://[fe80::3]:3333”;云端设备的端点可表示为:“coaps+tcp://[2001:db8:a::123]:3333”。The resource release method of the embodiment of the present application will be described in detail below with reference to specific examples. In the following examples of this application, 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".
示例一Example one
图3是本申请实施例提供的资源发布方法的具体示例的流程示意图一;如图3所示,所述方法包括: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:
步骤301:云端代理设备与云端设备建立连接,云端设备建立云端代理设备与用户标识的关联。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.
这里,云端代理设备在接入云端设备的过程中或者接入云端设备完成后,云端设备已关联云端代理设备和用户标识。其中,用户标识可以是用户通过客户端(或配置器)完成用户注册后、系统分配给该用户的标识。该用户标识可以与用户账号绑定。例如,用户可通过客户端APP进行注册,注册完成后可获得系统分配的用户标识。Here, during the process of connecting the cloud proxy device to the cloud device or after the cloud device is connected, the cloud device has been associated with the cloud proxy device and the user identity. Wherein, 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. For example, the user can register through the client APP, and the user ID assigned by the system can be obtained after the registration is completed.
步骤302:云端受限设备获得云端代理设备的信息。Step 302: The cloud restricted device obtains the information of the cloud proxy device.
其中,云端受限设备获得云端代理设备的信息包括有两种方式:Among them, there are two ways for cloud restricted devices to obtain cloud proxy device information:
方式1:由配置器为云端受限设备直接配置云端代理设备信息,具体包括:Method 1: The configurator directly configures the cloud proxy device information for the cloud restricted device, including:
步骤3021a:配置器向云端受限设备发送配置信息,所述配置信息中包括云端代理设备信息。Step 3021a: The configurator sends configuration information to the cloud restricted device, where the configuration information includes cloud proxy device information.
作为一种实施方式,配置器可通过更新配置资源的方式为云端受限设备配置云端代理设备信息, 例如云端受限设备上的云端代理设备配置资源表示为“oic.r.proxyconf”。其中,所述配置信息可包括云端代理设备的云端代理资源URI和端点信息,例如,云端代理资源URI为“/oic/cloudproxy”,云端代理资源的端点为“coaps://[fe80::2]:3333”。As an implementation manner, the configurator may configure cloud proxy device information for the cloud restricted device by updating configuration resources. For example, the cloud proxy device configuration resource on the cloud restricted device is expressed as "oic.r.proxyconf". Wherein, the configuration information may include the cloud proxy resource URI and endpoint information of the cloud proxy device. For example, the cloud proxy resource URI is "/oic/cloudproxy", and the endpoint of the cloud proxy resource is "coaps://[fe80::2" ]:3333".
步骤3022a:云端受限设备向配置器发送响应消息,所述响应消息用于确认云端代理设备信息配置成功。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.
方式2:云端受限设备主动发现云端代理设备,具体包括:Method 2: Cloud restricted devices actively discover cloud proxy devices, including:
步骤3021b:云端受限设备发送云端代理设备发现请求,所述云端代理设备发现请求中包括云端代理资源类型。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.
其中,所述云端受限设备可通过广播或组播的方式发送云端代理设备发现请求。其中,云端代理资源的代理资源类型可以为“oic.r.cloudproxy”。Wherein, the cloud-restricted device may send a cloud proxy device discovery request through broadcast or multicast. Among them, the proxy resource type of the cloud proxy resource can be "oic.r.cloudproxy".
步骤3022b:云端代理设备接收到所述云端代理设备发现请求,向所述云端受限设备发送云端代理设备发现响应。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.
其中,所述云端代理设备发现响应中可包括以下至少之一:云端代理设备的代理资源类型、云端代理资源URI、云端代理资源的端点信息。例如,返回的云端代理设备的代理资源类型为“oic.r.cloudproxy”,云端代理资源URI为“/oic/cloudproxy”,云端代理资源的端点为“coaps://[fe80::2]:3333”。Wherein, 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. For example, the proxy resource type of the returned cloud proxy device is "oic.r.cloudproxy", the cloud proxy resource URI is "/oic/cloudproxy", and the endpoint of the cloud proxy resource is "coaps://[fe80::2]: 3333".
步骤303:云端受限设备和云端代理设备建立安全连接。Step 303: The cloud restricted device and the cloud proxy device establish a secure connection.
其中,云端受限设备基于获得的云端代理设备的信息与云端代理设备建立安全连接。Among them, the cloud restricted device establishes a secure connection with the cloud proxy device based on the obtained information of the cloud proxy device.
步骤304:云端受限设备向云端代理设备发送第一云端注册请求消息,所述第一云端注册请求消息请求的资源URI为云端代理资源URI。例如,云端代理资源URI为“/oic/cloudproxy”。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. For example, 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. Wherein, 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.
步骤305:云端代理设备向云端设备发送第二云端注册请求消息,所述第二云端注册请求消息请求的资源URI为账号资源URI。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.
其中,账号资源URI为“/oic/sec/account”。所述第二云端注册请求消息中可包括以下至少之一:云端受限设备的标识、云端受限设备的安全凭证、用户标识。Among them, the account resource URI is "/oic/sec/account". 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.
步骤306:云端设备接受第二云端注册请求消息对应的云端注册请求,为云端受限设备分配访问令牌,并关联该云端受限设备的标识和用户标识。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.
通过该步骤,云端受限设备、云端代理设备均关联所述用户标识。Through this step, the cloud restricted device and the cloud proxy device are both associated with the user identification.
需要说明的是,在步骤301中,云端代理设备接入云端设备的过程中,云端设备为云端代理设备分配了访问令牌,分配的访问令牌信息可包括访问令牌、更新令牌和访问令牌的过期时间等信息。这里,云端设备为云端受限设备分配的访问令牌信息可以与为云端代理设备分配的访问令牌信息相同,也可以是与为云端代理设备分配的访问令牌信息不同的访问令牌信息。It should be noted that in step 301, when the cloud proxy device is connected to the cloud device, 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. Here, 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.
步骤307:云端设备向云端代理设备发送第一云端注册响应消息;所述第一云端注册响应消息中可包括以下至少之一:用户标识、云端受限设备的访问令牌、访问令牌的过期时间、云端受限设备的更新令牌。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.
步骤308:云端代理设备向云端受限设备发送第二云端注册响应消息;所述第二云端注册响应消息中包括以下至少之一:用户标识、云端受限设备的访问令牌、访问令牌的过期时间、云端受限设备的更新令牌。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.
步骤309:云端受限设备向云端代理设备发送第一云端登录请求消息,所述第一云端登录请求消息请求的资源URI为云端代理资源URI。例如,云端代理资源URI为“/oic/cloudproxy”。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. For example, the cloud proxy resource URI is "/oic/cloudproxy".
这里,所述第一云端登录请求消息中可包括以下至少之一:代理云端登录指示、云端受限设备的标识、云端受限设备的访问令牌。其中,所述代理云端登录指示用于指示云端代理设备为云端受限设备进行代理云端登录;所述云端受限设备的标识表示需要由云端代理设备代理登录的目标云端受限设备;所述云端受限设备的访问令牌用于云端设备对登录的云端受限设备进行安全认证。Here, 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. Wherein, 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.
步骤310:云端代理设备向云端设备发送第二云端登录请求消息,所述第二云端登录请求消息请求的资源URI为会话资源URI;例如,所述会话资源URI为“/oic/sec/session”。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" .
这里,所述第二云端登录请求消息中包括以下至少之一:云端受限设备的标识、云端受限设备的访问令牌、用户标识、云端登录指示。所述云端登陆指示为云端受限设备进行云端登录。Here, 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.
步骤311:云端设备接受第二云端登录请求消息,进行设备登录的响应,云端设备向云端代理设备发送第一云端登陆响应消息;所述第一云端登陆响应消息包括所述云端受限设备的访问令牌的剩余过期时间。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.
步骤312:云端代理设备向云端受限设备发送第二云端登录响应消息,所述第二云端登录响应消息中包括所述云端受限设备访问令牌的剩余过期时间。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.
需要说明的是,步骤309-步骤312是可选步骤,即设备登陆过程为可选步骤。设备登录的目的是确认设备维持着与云端设备的会话用于后续通信,云端代理设备已经登录的情况下,说明云端代理设备与云端设备的会话处于正在维护的状态,而云端受限设备的消息路由可以重用云端代理设备与云端设备的会话,因此云端受限设备不进行云端登录也可以。It should be noted that 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. When 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.
步骤313:云端受限设备向云端代理设备发送第一资源发布请求消息,所述第一资源发布请求消息请求的资源URI为云端代理资源URI;例如,云端代理资源URI为“/oic/cloudproxy”。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" .
这里,所述第一资源发布请求消息中包括以下至少之一:代理发布资源指示、云端受限设备的标识、云端受限设备的资源链接;其中,所述资源链接中资源的端点是所述云端受限设备的端点。其中,所述代理发布资源指示用于指示云端代理设备为云端受限设备进行代理资源发布;所述云端受限设备的标识表示需要由云端代理设备代理发布资源的目标云端受限设备;所述云端受限设备的资源链接表示需要发布到云端设备的资源。Here, 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. Wherein, 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.
在本申请的一种可选实施例中,所述第一资源发布请求消息中还可以包括发布资源的有效时间,即发布到云端设备的资源目录的资源链接的最大生存时间,如果生存时间到期以前,云端设备没有收到所述云端受限设备更新的资源发布请求,则所述云端设备的资源目录会不再保存已发布的资源链接。In an optional embodiment of the present application, 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.
在本申请的一种可选实施例中,所述第一资源发布请求消息中还可以包括云端受限设备的指示,所述云端受限设备的指示用于指示发布资源的设备是云端受限设备。In an optional embodiment of the present application, 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.
例如,云端受限设备请求进行代理资源发布的内容如下,其中的加粗字体表示云端受限设备的资源链接;资源链接中的端点信息是云端受限设备自身的端点信息:For example, 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:
Figure PCTCN2019097581-appb-000002
Figure PCTCN2019097581-appb-000002
其中,"di"是云端受限设备的设备标识,"ttl"是发布的资源链接生存时间(即资源链接的有效时间),"dt"是云端受限设备指示,"proxyaction"是代理发布资源指示,"links"是云端受限设备的资源链接。Among them, "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, and "proxyaction" is the proxy publishing resource Instructions, "links" are resource links for restricted devices in the cloud.
步骤314云端代理设备向云端设备发送第二资源发布请求消息,所述第二资源发布请求消息请求的资源URI为资源目录资源URI;例如,所述资源目录资源URI为“/oic/rd”。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".
这里,所述第二资源发布请求消息中包括以下至少之一:云端受限设备的标识、云端受限设备的资源链接;其中,所述资源链接中资源的端点是云端代理设备的端点;所述资源链接中目标URI包括所述云端受限设备的标识。Here, 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.
在本申请的一种可选实施例中,所述第二资源发布请求消息中还可以包括云端受限设备的指示,所述云端受限设备的指示用于指示提供资源链接的设备是云端受限设备。In an optional embodiment of the present application, 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.
本实施例中,云端代理设备维护云端受限设备资源发布中的端点信息和云端代理设备代理发布的资源链接中的端点信息之间的关联。即对于发布到云端代理设备的云端受限设备资源,云端代理设备向云端设备代理发布的云端受限设备的资源的端点是云端代理设备自身的端点,而不是云端受限设备的端点。In this embodiment, 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.
由于同一类型的云端受限设备发布资源时,它们提供的资源链接中“href”参数可能是相同的。例如所有的灯的“href”参数可能都是“/myLightSwitch”,为了保证云端代理设备收到的所有资源发布请求对于每个发布的资源都有唯一的资源URI,云端代理设备发布时在“href”参数值前面加上云端受限设备的设备标识。When the same type of cloud restricted devices publish resources, the "href" parameter in the resource link provided by them may be the same. For example, the "href" parameter of all lights may be "/myLightSwitch". In order to ensure that all resource publishing requests received by the cloud proxy device have a unique resource URI for each published resource, the cloud proxy device is issued in "href "The parameter value is preceded by the device ID of the cloud-restricted device.
例如,云端代理设备请求进行资源发布的内容如下,资源链接中的端点“eps”是云端代理设备的端点信息,资源链接中的目标URI的“href”参数中包括云端受限设备标识:For example, 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:
Figure PCTCN2019097581-appb-000003
Figure PCTCN2019097581-appb-000003
其中,"di"是云端受限设备的设备标识,"ttl"是发布的资源链接生存时间(即资源链接的有效时间),"dt"是云端受限设备指示,"links"是云端受限设备的资源链接,该资源链接中的目标URI的"href"参数中包括云端受限设备的标识"88b7c7f0-4b51-4e0a-9faa-cfb439fd7f49"(即"di"参数值),"eps"是云端代理设备的端点信息"coaps://[fe80::3]:3333"。Among them, "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, and "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".
步骤315:云端设备接受第二资源发布请求消息对应的资源发布请求,将云端受限设备的资源链接添加到资源目录下;例如,将云端受限设备的资源链接添加到“/oic/res”资源下。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.
这里,云端设备维护设备资源发布中的端点信息和云端资源目录公布的资源链接中的端点信息之间的关联。即对于发布到云端设备的资源,云端设备公布的资源的端点是云端设备自身的端点,而不是云端代理设备的端点。另外,云端设备的资源目录公布的云端受限设备的资源链接中目标URI的“href”参数值和所述云端受限设备对应的资源发布请求中的“href”参数值相同。Here, 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. In addition, 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.
云端设备可以根据资源发布请求中“href”参数值加上了云端受限设备的标识“di”参数值,从而确定不需要在“href”参数值加上云端的设备标识,即OCF云端资源目录公布的云端受限设备的资源链接中目标URI“href”参数值和设备资源发布请求中“href”参数值的参数值相同。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.
在本申请的一种可选实施例中,在所述第二资源发布请求消息中包括云端受限设备的指示的情况下,则云端设备可以根据该云端受限设备的指示确定所述第二资源发布请求消息中的资源链接属于云端受限设备,从而确定不需要再在公布的资源链接中的“href”参数值中加上云端设备的标识,即云端设备的资源目录公布的云端受限设备的资源链接中目标URI的“href”参数值和所述云端受限设备对应的资源发布请求中的“href”的参数值相同。In an optional embodiment of the present application, if the second resource release request message includes an indication of a cloud-restricted device, 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.
例如,云端设备的资源目录(资源目录URI为“/oic/res”)下添加的云端受限设备的资源链接如下,资源链接中的端点“eps”是云端代理设备的端点信息,资源链接中的目标URI的“href”参数值和云端代理设备的资源发布中的资源链接中的“href”参数值相同:For example, 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:
Figure PCTCN2019097581-appb-000004
Figure PCTCN2019097581-appb-000004
步骤316:云端设备向云端代理设备发送第一资源发布响应消息,所述第一资源发布响应消息用于确认资源发布成功。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.
步骤317:云端代理设备向云端受限设备发送第二资源发布响应消息,所述第二资源发布响应消息确认云端受限设备的资源发布成功。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.
步骤318:当所述云端受限设备的访问令牌到期时或到期之前,所述云端受限设备向云端代理 设备发送第一更新令牌请求消息;例如,云端受限设备向云端代理设备的云端代理资源“/oic/cloudproxy”发送第一更新令牌请求消息。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.
这里,所述第一更新令牌请求消息中包括以下至少之一:代理更新令牌指示、云端受限设备标识、更新令牌、用户标识。其中,所述代理更新令牌指示用于指示云端代理设备为云端受限设备进行代理访问令牌更新;所述云端受限设备的标识表示需要由云端代理设备代理更新令牌的目标云端受限设备;所述更新令牌是云端受限设备的用于更新访问令牌的凭证;所述用户标识是云端受限设备关联的目标用户。Here, 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. Wherein, the 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. Device; 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.
步骤319:云端代理设备向云端设备发送第二更新令牌请求消息;所述第二更新令牌请求消息请求更新令牌资源;所述令牌资源URI为“/oic/sec/tokenrefresh”。其中,所述第二更新令牌请求消息中包括以下至少之一:云端受限设备的标识、更新令牌、用户标识。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". Wherein, 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.
步骤320:云端设备为所述云端受限设备更新访问令牌;云端设备向云端代理设备发送第一更新令牌响应消息,所述第一更新令牌响应消息中包括以下至少之一:所述云端受限设备的新的访问令牌、更新令牌、所述新的访问令牌的有效时间。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.
步骤321:云端代理设备向云端受限设备发送第二更新令牌响应消息,所述第二更新令牌响应消息包括以下至少之一:所述云端受限设备新的访问令牌、更新令牌、所述新的访问令牌的过期时间。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.
示例二Example two
图4是本申请实施例提供的资源发布方法的具体示例的流程示意图二;如图4所示,所述方法包括: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:
步骤401:云端代理设备与云端设备建立连接,云端设备建立云端代理设备与用户标识的关联。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.
这里,云端代理设备在接入云端设备的过程中或者接入云端设备完成后,云端设备已关联云端代理设备和用户标识。其中,用户标识可以是用户通过客户端(或配置器)完成用户注册后、系统分配给该用户的标识。该用户标识可以与用户账号绑定。例如,用户可通过客户端APP进行注册,注册完成后可获得系统分配的用户标识。Here, during the process of connecting the cloud proxy device to the cloud device or after the cloud device is connected, the cloud device has been associated with the cloud proxy device and the user identity. Wherein, 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. For example, the user can register through the client APP, and the user ID assigned by the system can be obtained after the registration is completed.
步骤402:云端受限设备获得云端代理设备的信息。Step 402: The cloud restricted device obtains the information of the cloud proxy device.
其中,云端受限设备获得云端代理设备的信息包括有两种方式:Among them, there are two ways for cloud restricted devices to obtain cloud proxy device information:
方式1:由配置器为云端受限设备直接配置云端代理设备信息,具体包括:Method 1: The configurator directly configures the cloud proxy device information for the cloud restricted device, including:
步骤4021a:配置器向云端受限设备发送配置信息,所述配置信息中包括云端代理设备信息。Step 4021a: The configurator sends configuration information to the cloud restricted device, where the configuration information includes cloud proxy device information.
作为一种实施方式,配置器可通过更新配置资源的方式为云端受限设备配置云端代理设备信息,例如云端受限设备上的云端代理设备配置资源表示为“oic.r.proxyconf”。其中,所述配置信息可包括云端代理设备的云端代理资源URI和端点信息,例如,云端代理资源URI为“/oic/cloudproxy”,云端代理资源的端点为“coaps://[fe80::2]:3333”。As an implementation manner, the configurator can configure cloud proxy device information for the cloud restricted device by updating configuration resources. For example, the cloud proxy device configuration resource on the cloud restricted device is expressed as "oic.r.proxyconf". Wherein, the configuration information may include the cloud proxy resource URI and endpoint information of the cloud proxy device. For example, the cloud proxy resource URI is "/oic/cloudproxy", and the endpoint of the cloud proxy resource is "coaps://[fe80::2" ]:3333".
步骤4022a:云端受限设备向配置器发送响应消息,确认云端代理设备信息配置成功。Step 4022a: The cloud restricted device sends a response message to the configurator to confirm that the cloud proxy device information is successfully configured.
方式2:云端受限设备主动发现云端代理设备,具体包括:Method 2: Cloud restricted devices actively discover cloud proxy devices, including:
步骤4021b:云端受限设备发送云端代理设备发现请求,所述云端代理设备发现请求中包括云端代理资源类型。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.
其中,所述云端受限设备可通过广播或组播的方式发送云端代理设备发现请求。其中,云端代理资源的代理资源类型可以为“oic.r.cloudproxy”。Wherein, the cloud-restricted device may send a cloud proxy device discovery request through broadcast or multicast. Among them, the proxy resource type of the cloud proxy resource can be "oic.r.cloudproxy".
步骤4022b:云端代理设备接收到所述云端代理设备发现请求,向所述云端受限设备发送云端代理设备发现响应。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.
其中,所述云端代理设备发现响应中可包括以下至少之一:云端代理设备的云端代理资源类型、云端代理资源URI、云端代理资源的端点信息。例如,返回的云端代理设备的代理资源类型为“oic.r.cloudproxy”,云端代理资源URI为“/oic/cloudproxy”,云端代理资源的端点为“coaps://[fe80::2]:3333”。Wherein, 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. For example, the proxy resource type of the returned cloud proxy device is "oic.r.cloudproxy", the cloud proxy resource URI is "/oic/cloudproxy", and the endpoint of the cloud proxy resource is "coaps://[fe80::2]: 3333".
步骤403:云端受限设备和云端代理设备建立安全连接。Step 403: The cloud restricted device and the cloud proxy device establish a secure connection.
其中,云端受限设备基于获得的云端代理设备的信息与云端代理设备建立安全连接。Among them, the cloud restricted device establishes a secure connection with the cloud proxy device based on the obtained information of the cloud proxy device.
步骤404:云端受限设备向云端代理设备发送第一设备绑定请求消息,所述第一设备绑定请求消息请求的资源URI为云端代理资源URI;例如,云端代理资源URI为“/oic/cloudproxy”。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".
这里,所述第一设备绑定请求消息中包括以下至少之一:代理设备绑定指示、云端受限设备的标识、云端受限设备的安全凭证。其中,所述代理设备绑定指示用于指示云端代理设备为云端受限设备进行设备和用户的代理绑定;所述云端受限设备标识表示需要由云端代理设备代理绑定的目标 云端受限设备;所述云端受限设备的安全凭证用于云端设备对请求绑定的云端受限设备进行安全认证。Here, 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. Wherein, 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.
步骤405:云端代理设备向云端设备发送第二设备绑定请求消息,所述第二设备绑定请求消息请求的资源URI为绑定资源URI;例如,绑定资源URI为“/oic/bind”。其中,第二设备绑定请求消息中包括以下至少之一:云端受限设备的标识、云端受限设备的安全凭证、用户标识。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.
步骤406:云端设备接受第二设备绑定请求消息对应的设备绑定请求,关联云端受限设备与用户标识。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.
通过该步骤,云端受限设备、云端代理设备都关联所述用户标识。Through this step, the cloud restricted device and the cloud proxy device are associated with the user identification.
在本申请的一种可选实施例中,云端设备还可以关联云端受限设备的标识和云端代理设备的访问令牌。In an optional embodiment of the present application, the cloud device may also associate the identity of the cloud restricted device with the access token of the cloud proxy device.
步骤407:云端设备向云端代理设备发送第一设备绑定响应消息,所述第一设备绑定响应消息中包括用户标识。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.
步骤408:云端代理设备向云端受限设备发送第二设备绑定响应消息,第二设备绑定响应消息中包括所述用户标识。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.
步骤409:云端受限设备向云端代理设备发送第一资源发布请求消息,所述第一资源发布请求消息请求的资源URI为云端代理资源URI;例如,云端代理资源URI为“/oic/cloudproxy”。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" .
这里,所述第一资源发布请求消息中包括以下至少之一:代理发布资源指示、云端受限设备的标识、云端受限设备的资源链接;其中,所述资源链接中资源的端点是所述云端受限设备的端点。其中,所述代理发布资源指示用于指示云端代理设备为云端受限设备进行代理资源发布;所述云端受限设备的标识表示需要由云端代理设备代理发布资源的目标云端受限设备;所述云端受限设备的资源链接表示需要发布到云端设备的资源。Here, 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. Wherein, 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.
在本申请的一种可选实施例中,所述第一资源发布请求消息中还可以包括发布资源的有效时间,即发布到云端设备的资源目录的资源链接的最大生存时间,如果生存时间到期以前,云端设备没有收到所述云端受限设备更新的资源发布请求,则所述云端设备的资源目录会不再保存已发布的资源链接。In an optional embodiment of the present application, 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.
在本申请的一种可选实施例中,所述第一资源发布请求消息中还可以包括云端受限设备的指示,所述云端受限设备的指示用于指示发布资源的设备是云端受限设备。In an optional embodiment of the present application, 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.
步骤410:云端代理设备向云端设备发送第二资源发布请求消息,所述第二资源发布请求消息请求的资源URI为资源目录资源URI;例如,所述资源目录资源URI为“/oic/rd”。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" .
这里,所述第二资源发布请求消息中包括以下至少之一:云端受限设备的标识、云端受限设备的资源链接;其中,所述资源链接中资源的端点是云端代理设备的端点;所述资源链接中目标URI包括所述云端受限设备的标识。Here, 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.
在本申请的一种可选实施例中,所述第二资源发布请求消息中还可以包括云端受限设备的指示,所述云端受限设备的指示用于指示提供资源链接的设备是云端受限设备。In an optional embodiment of the present application, 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.
本实施例中,云端代理设备维护云端受限设备资源发布中的端点信息和云端代理设备代理发布的资源链接中的端点信息之间的关联。即对于发布到云端代理设备的云端受限设备资源,云端代理设备向云端设备代理发布的云端受限设备的资源的端点是云端代理设备自身的端点,而不是云端受限设备的端点。In this embodiment, 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.
由于同一类型的云端受限设备发布资源时,它们提供的资源链接中“href”参数可能是相同的。例如所有的灯的“href”参数可能都是“/myLightSwitch”,为了保证云端代理设备收到的所有资源发布请求对于每个发布的资源都有唯一的资源URI,云端代理设备发布时在“href”参数值前面加上云端受限设备的设备标识。When the same type of cloud restricted devices publish resources, the "href" parameter in the resource link provided by them may be the same. For example, the "href" parameter of all lights may be "/myLightSwitch". In order to ensure that all resource publishing requests received by the cloud proxy device have a unique resource URI for each published resource, the cloud proxy device is issued in "href "The parameter value is preceded by the device ID of the cloud-restricted device.
步骤411:云端设备接受第二资源发布请求消息,将云端受限设备的资源链接添加到资源目录下;例如,将云端受限设备的资源链接添加到/oic/res资源下。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.
这里,云端设备维护设备资源发布中的端点信息和云端资源目录公布的资源链接中的端点信息之间的关联。即对于发布到云端设备的资源,云端设备公布的资源的端点是云端设备自身的端点,而不是云端代理设备的端点。另外,云端设备的资源目录公布的云端受限设备的资源链接中目标URI的“href”参数值和所述云端受限设备对应的资源发布请求中的“href”参数值的参数值相同。Here, 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. In addition, 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.
云端设备可以根据资源发布请求中“href”参数值加上了云端受限设备的标识“di”参数值,从而确定不需要在“href”参数值加上云端的设备标识,即OCF云端资源目录公布的云端受限设备的资源链接中目标URI“href”参数值和设备资源发布请求中“href”参数值的参数值相同。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.
在本申请的一种可选实施例中,在所述第二资源发布请求消息中包括云端受限设备的指示的情况下,则云端设备可以根据该云端受限设备的指示确定所述第二资源发布请求消息中的资源链接属于云端受限设备,从而确定不需要再在公布的资源链接中的“href”参数值加上云端设备的标识,即云端设备的资源目录公布的云端受限设备的资源链接中目标URI的“href”参数值和所述云端受限设备对应的资源发布请求中的“href”参数值的参数值相同。In an optional embodiment of the present application, if the second resource release request message includes an indication of a cloud-restricted device, 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.
步骤412:云端设备向云端代理设备发送第一资源发布响应消息,所述第一资源发布响应消息用于确认资源发布成功。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.
步骤413:云端代理设备向云端受限设备发送第二资源发布响应消息,所述第二资源发布响应消息确认云端受限设备的资源发布成功。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.
本实施例中,步骤409至步骤413的详细描述具体可参照前述示例中的步骤313至步骤317的详细描述,这里不再赘述。In this embodiment, the detailed description of 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.
本示例中,可选地,步骤413之后,还可以包括前述实施例中的步骤318至步骤321,这里不再赘述。In this example, optionally, after step 413, step 318 to step 321 in the foregoing embodiment may be included, which will not be repeated here.
示例三Example three
图5是本申请实施例提供的资源发布方法的具体示例的流程示意图三;如图5所示,所述方法包括: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:
步骤500:云端代理设备与云端设备建立连接,云端设备建立云端代理设备与用户标识的关联。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.
这里,云端代理设备在接入云端设备的过程中或者接入云端设备完成后,云端设备已关联云端代理设备和用户标识。其中,用户标识可以是用户通过客户端(或配置器)完成用户注册后、系统分配给该用户的标识。该用户标识可以与用户账号绑定。例如,用户可通过客户端APP进行注册,注册完成后可获得系统分配的用户标识。Here, during the process of connecting the cloud proxy device to the cloud device or after the cloud device is connected, the cloud device has been associated with the cloud proxy device and the user identity. Wherein, 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. For example, the user can register through the client APP, and the user ID assigned by the system can be obtained after the registration is completed.
步骤501:配置器从云端设备获得云端受限设备的访问令牌。Step 501: The configurator obtains the access token of the cloud restricted device from the cloud device.
作为一种实施方式,配置器可向云端设备发送令牌获取请求消息,所述令牌获取请求消息中包括所述云端受限设备的标识;所述配置器获得所述云端设备发送的令牌获取响应消息;所述令牌获取响应消息中包括所述云端受限设备的访问令牌。As an implementation manner, 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.
步骤502:配置器向云端受限设备发送所述访问令牌。其中,配置器可通过更新云端受限设备的云端配置资源(云端配置资源的资源类型为“oic.r.coapcloudconf”)的方式向云端受限设备发送所述访问令牌。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").
可选地,作为一种实施方式,配置器还可为云端受限设备的云端配置资源配置云端接入URI和云端标识,即云端配置资源的属性可包括:访问令牌、云端接入URI和云端标识。作为另一种实施方式,配置器不需要为云端受限设备的云端配置资源配置云端接入URI和云端标识,因为云端代理设备已经具有云端接入信息。Optionally, as an implementation manner, 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. As another implementation manner, 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.
步骤503:云端受限设备获得云端代理设备的信息。作为一种实施方式,所述云端代理设备发现请求中包括云端代理资源类型。Step 503: The cloud restricted device obtains the information of the cloud proxy device. As an implementation manner, the cloud proxy device discovery request includes a cloud proxy resource type.
其中,所述云端受限设备可通过广播或组播的方式发送云端代理设备发现请求。其中,云端代理资源的代理资源类型可以为“oic.r.cloudproxy”。Wherein, the cloud-restricted device may send a cloud proxy device discovery request through broadcast or multicast. Among them, the proxy resource type of the cloud proxy resource can be "oic.r.cloudproxy".
步骤504:云端代理设备接收到所述云端代理设备发现请求,向所述云端受限设备发送云端代理设备发现响应。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.
其中,所述云端代理设备发现响应中可包括以下至少之一:云端代理设备的代理资源类型、云端代理资源的端点信息。例如,返回的云端代理设备的代理资源类型为“oic.d.cloudproxy”,云端代理资源的端点为“coaps://[fe80::2]:3333”。Wherein, 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. For example, the proxy resource type of the returned cloud proxy device is "oic.d.cloudproxy", and the endpoint of the cloud proxy resource is "coaps://[fe80::2]:3333".
步骤505:云端受限设备和云端代理设备建立安全连接。Step 505: The cloud restricted device and the cloud proxy device establish a secure connection.
其中,云端受限设备基于获得的云端代理设备的信息与云端代理设备建立安全连接。Among them, the cloud restricted device establishes a secure connection with the cloud proxy device based on the obtained information of the cloud proxy device.
步骤506:云端受限设备向云端代理设备发送第一云端注册请求消息,所述第一云端注册请求消息请求的资源URI为账号资源URI。例如,所述账号资源URI为“/oic/sec/account”。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. For example, the account resource URI is "/oic/sec/account".
这里,所述第一云端注册请求消息中包括以下至少之一:云端受限设备的标识以及云端受限设备的访问令牌。其中,所述云端受限的设备标识表示需要注册到云端设备的目标云端受限设备;所述云端受限设备的访问令牌用于云端设备对注册的云端受限设备进行安全认证。Here, 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. Wherein, 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.
步骤507:云端代理设备向云端设备发送第二云端注册请求消息,所述第二云端注册请求消息请求的资源URI为账号资源;例如,账号资源URI为“/oic/sec/account”。其中,所述第二云端注册请求消息中包括以下至少之一:云端受限设备的标识、云端受限设备的访问令牌。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". Wherein, 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.
步骤508:云端设备接受该第二云端注册请求消息的注册请求,为云端受限设备分配访问令牌、更新令牌和访问令牌的过期时间,并关联所述云端受限设备的标识和用户标识。云端设备向云端代理设备发送第一云端注册响应消息。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.
通过该步骤,云端受限设备、云端代理设备都关联到所述用户标识。Through this step, the cloud restricted device and the cloud proxy device are both associated with the user identity.
其中,所述第一云端注册响应消息包括以下至少之一:用户标识、云端受限设备的访问令牌、访问令牌的有效时间、云端受限设备的更新令牌。Wherein, 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.
步骤509:云端代理设备向云端受限设备发送第二云端注册响应消息,所述第二云端注册响应消息中包括以下至少之一:用户标识、云端受限设备的访问令牌、访问令牌的过期时间、云端受限设备的更新令牌。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.
步骤510:云端受限设备向云端代理设备发送第一云端登录请求消息,第一云端登录请求消息请求的资源URI为会话资源URI。例如,会话资源URI为“/oic/sec/session”。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. For example, the session resource URI is "/oic/sec/session".
其中,所述第一云端登录请求消息中可包括以下至少之一:云端受限设备的标识、云端受限设备的访问令牌、用户标识、云端登录指示。其中,所述云端受限设备的标识表示需要登录到云端设备的目标云端受限设备;所述云端受限设备的访问令牌用于云端设备对登录的云端受限设备进行安全认证;所述用户标识是所述云端受限设备关联的用户标识;所述云端登录指示用于指示进行云端登录。Wherein, 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. Wherein, 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.
步骤511:云端代理设备向云端设备发送第二云端登录请求消息,所述第二云端登录请求消息请求的资源URI为会话资源URI。例如,所述会话资源URI为“/oic/sec/session”。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. For example, the session resource URI is "/oic/sec/session".
其中,第二云端登录请求消息中可包括以下至少之一:云端受限设备的标识、云端受限设备的访问令牌、用户标识、云端登录指示。Wherein, 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.
步骤512:云端设备接受该第二云端登录请求消息对应的登录请求,进行设备登录的响应,云端设备向云端代理设备发送第一云端登陆响应消息;所述第一云端登陆响应消息包括云端受限设备的访问令牌的有效时间。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.
步骤513:云端代理设备向云端受限设备发送第二云端登录响应消息,第二云端登录响应消息包括云端受限设备的访问令牌的剩余过期时间。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.
需要说明的是,步骤510-步骤513是可选步骤,即设备登陆过程为可选步骤。设备登录的目的是确认设备维持着与云端设备的会话用于后续通信,云端代理设备已经登录的情况下,说明云端代理设备与云端设备的会话处于正在维护的状态,而云端受限设备的消息路由可以重用云端代理设备与云端设备的会话,因此云端受限设备不进行云端登录也可以。It should be noted that 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. When 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.
步骤514:云端受限设备向云端代理设备发送第一资源发布请求消息,所述第一资源发布请求消息请求的资源URI为资源目录资源,例如,资源目录资源URI为“/oic/rd”。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".
这里,所述第一资源发布请求消息中包括以下至少之一:云端受限设备的标识、云端受限设备的资源链接。其中,所述资源链接中资源的端点是云端受限设备的端点。所述云端受限设备的标识表示需要发布资源的目标云端受限设备;所述云端受限设备的资源链接表示需要发布到云端设备的资源。Here, 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. Wherein, 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.
在本申请的一种可选实施例中,所述第一资源发布请求消息中还可以包括发布资源的有效时间,即发布到云端设备的资源目录的资源链接的最大生存时间,如果生存时间到期以前,云端设备没有收到所述云端受限设备更新的资源发布请求,则所述云端设备的资源目录会不再保存已发布的资源链接。In an optional embodiment of the present application, 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.
在本申请的一种可选实施例中,所述第一资源发布请求消息中还可以包括云端受限设备的指示,所述云端受限设备的指示用于指示发布资源的设备是云端受限设备。In an optional embodiment of the present application, 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.
例如,云端受限设备请求进行代理资源发布的内容如下,其中的加粗字体表示云端受限设备的资源链接;资源链接中的端点信息是云端受限设备自身的端点信息:For example, 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:
Figure PCTCN2019097581-appb-000005
Figure PCTCN2019097581-appb-000005
Figure PCTCN2019097581-appb-000006
Figure PCTCN2019097581-appb-000006
其中,"di"是云端受限设备的设备标识,"ttl"是发布的资源链接生存时间(即资源链接的有效时间),"dt"是云端受限设备指示,"links"是云端受限设备的资源链接,该资源链接中的"eps"是云端受限设备自身的端点信息"coaps://[fe80::b1d6]:22222"。Among them, "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, and "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".
步骤515:云端代理设备向云端设备发送第二资源发布请求消息,所述第二资源发布请求消息请求的资源URI为资源目录资源URI;例如,所述资源目录资源URI为“/oic/rd”。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" .
这里,所述第二资源发布请求消息中包括以下至少之一:云端受限设备的标识、云端受限设备的资源链接。其中,资源链接中资源的端点是云端代理设备的端点;所述资源链接中的目标URI包括云端受限设备的标识。Here, 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.
在本申请的一种可选实施例中,所述第二资源发布请求消息中还可以包括云端受限设备的指示,所述云端受限设备的指示用于指示提供资源链接的设备是云端受限设备。In an optional embodiment of the present application, 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.
本实施例中,云端代理设备维护云端受限设备资源发布中的端点信息和云端代理设备代理发布的资源链接中的端点信息之间的关联。即对于发布到云端代理设备的云端受限设备资源,云端代理设备向云端设备代理发布的云端受限设备的资源的端点是云端代理设备自身的端点,而不是云端受限设备的端点。In this embodiment, 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.
由于同一类型的云端受限设备发布资源时,它们提供的资源链接中“href”参数可能是相同的。例如所有的灯的“href”参数可能都是“/myLightSwitch”,为了保证云端代理设备收到的所有资源发布请求对于每个发布的资源都有唯一的资源URI,云端代理设备发布时在“href”参数值前面加上云端受限设备的设备标识。When the same type of cloud restricted devices publish resources, the "href" parameter in the resource link provided by them may be the same. For example, the "href" parameter of all lights may be "/myLightSwitch". In order to ensure that all resource publishing requests received by the cloud proxy device have a unique resource URI for each published resource, the cloud proxy device is issued in "href "The parameter value is preceded by the device ID of the cloud-restricted device.
例如,云端代理设备请求进行资源发布的内容如下,资源链接中的端点“eps”是云端代理设备的端点信息,资源链接中的目标URI的“href”参数中包括云端受限设备标识:For example, 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:
Figure PCTCN2019097581-appb-000007
Figure PCTCN2019097581-appb-000007
其中,"di"是云端受限设备的设备标识,"ttl"是发布的资源链接生存时间(即资源链接的有效时间),"dt"是云端受限设备指示,"links"是云端受限设备的资源链接,该资源链接中的目标URI的"href"参数中包括云端受限设备的标识"88b7c7f0-4b51-4e0a-9faa-cfb439fd7f49"(即"di"参数值),"eps"是云端代理设备的端点信息"coaps://[fe80::3]:3333"。Among them, "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, and "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), and "eps" is the cloud The endpoint information of the proxy device is "coaps://[fe80::3]:3333".
步骤516:云端设备接受第二资源发布请求消息对应的资源发布请求,将云端受限设备的资源链接添加到资源目录下;例如,将云端受限设备的资源链接添加到“/oic/res”资源下。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.
这里,云端设备维护设备资源发布中的端点信息和云端资源目录公布的资源链接中的端点信息之间的关联。即对于发布到云端设备的资源,云端设备公布的资源的端点是云端设备自身的端点,而不是云端代理设备的端点。另外,云端设备的资源目录公布的云端受限设备的资源链接中目标URI的“href”参数值和所述云端受限设备对应的资源发布请求中的“href”参数值相同。Here, 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. In addition, 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.
云端设备可以根据资源发布请求中“href”参数值加上了云端受限设备的标识“di”参数值,从而确定不需要在“href”参数值加上云端的设备标识,即OCF云端资源目录公布的云端受限设备的资源链接中目标URI“href”参数值和设备资源发布请求中“href”参数值的参数值相同。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.
在本申请的一种可选实施例中,在所述第二资源发布请求消息中包括云端受限设备的指示的情况下,则云端设备可以根据该云端受限设备的指示确定所述第二资源发布请求消息中的资源链接属于云端受限设备,从而确定不需要再在公布的资源链接中的“href”参数值加上云端设备的标识,即 云端设备的资源目录公布的云端受限设备的资源链接中目标URI的“href”参数值和所述云端受限设备对应的资源发布请求中的“href”的参数值相同。In an optional embodiment of the present application, if the second resource release request message includes an indication of a cloud-restricted device, 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.
例如,云端设备的资源目录(资源目录URI为“/oic/res”)下添加的云端受限设备的资源链接如下,资源链接中的端点“eps”是云端代理设备的端点信息,资源链接中的目标URI的“href”参数值和云端代理设备的资源发布中的资源链接中的“href”参数值相同:For example, 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:
Figure PCTCN2019097581-appb-000008
Figure PCTCN2019097581-appb-000008
步骤517:云端设备向云端代理设备发送第一资源发布响应消息,所述第一资源发布响应消息用于确认资源发布成功。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.
步骤518:云端代理设备向云端受限设备发送第二资源发布响应消息,所述第二资源发布响应消息确认云端受限设备的资源发布成功。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.
步骤519:当所述云端受限设备的访问令牌到期时或到期之前,所述云端受限设备向云端代理设备发送第一更新令牌请求消息;所述第一更新令牌请求消息请求更新令牌资源,所述令牌资源URI为“/oic/sec/tokenrefresh”。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".
这里,所述第一更新令牌请求消息中包括以下至少之一:云端受限设备的标识、更新令牌、用户标识。其中,所述云端受限设备的标识表示需要更新令牌的目标云端受限设备;所述更新令牌是云端受限设备的用于更新访问令牌的凭证;所述用户标识表示云端受限设备关联的目标用户。Here, 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. Wherein, 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.
步骤520:云端代理设备向云端设备发送第二更新令牌请求消息;所述第二更新令牌请求消息请求更新令牌资源,所述令牌资源URI为“/oic/sec/tokenrefresh”。其中,所述第二更新令牌请求消息中包括以下至少之一:云端受限设备标识、更新令牌、用户标识。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". Wherein, the second update token request message includes at least one of the following: cloud restricted device identification, update token, and user identification.
步骤521:云端设备为所述云端受限设备更新访问令牌;访问令牌更新成功后,云端设备向云端代理设备发送第一更新令牌响应消息。其中,所述第一更新令牌响应消息中包括以下至少之一:云端受限设备新的访问令牌、更新令牌、所述新的访问令牌的有效时间。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. Wherein, 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.
步骤522:云端代理设备向云端受限设备发送第二更新令牌响应消息,所述第二更新令牌响应消息包括以下至少之一:云端受限设备新的访问令牌、更新令牌、所述新的访问令牌的有效时间。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.
通过云端代理设备与云端受限设备建立连接,使得无法与云端设备进行交互的云端受限设备通过云端代理设备发布资源,解决了云端受限设备无法发布资源到云端设备的问题。Establishing connections with cloud-constrained devices through cloud proxy devices allows cloud-constrained devices that cannot interact with cloud devices to publish resources through the cloud proxy device, which solves the problem that cloud-constrained devices cannot publish resources to cloud devices.
本申请实施例还提供了一种云端受限设备。图6是本申请实施例提供的云端受限设备的一种结构组成示意图;如图6所示,所述设备包括:第一连接建立单元31和第一传输单元32;其中,The embodiment of the present application also provides a cloud restricted device. 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,
所述第一连接建立单元31,配置为建立与云端代理设备的连接;The first connection establishing unit 31 is configured to establish a connection with a cloud proxy device;
所述第一传输单元32,配置为基于所述连接与所述云端代理设备传输信息,所述信息用于所述云端代理设备向云端设备发布资源。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.
在本申请的一种可选实施例中,所述第一连接建立单元31,配置为获得云端代理设备的信息,基于所述信息建立与云端代理设备的连接。In an optional embodiment of the present application, 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.
本实施例中获得云端代理设备的信息可包括以下方式:Obtaining the cloud proxy device information in this embodiment may include the following methods:
作为一种实施方式,所述第一连接建立单元31,配置为接收配置器发送的配置信息,所述配置信息中包括云端代理设备的信息。As an implementation manner, 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.
作为另一种实施方式,所述第一连接建立单元31,配置为通过广播或组播的方式发送发现请求消息;所述发现请求消息中包括云端代理资源类型;接收发现响应消息;所述发现响应消息包括所述云端代理设备的信息。As another implementation manner, 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.
其中,所述云端代理设备的信息包括以下至少之一:云端代理设备的云端代理资源标识、云端代理资源的端点信息。Wherein, 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.
在本申请的一种可选实施例中,所述第一传输单元32,配置为基于所述连接指示所述云端代理设备向云端设备发布资源。In an optional embodiment of the present application, the first transmission unit 32 is configured to instruct the cloud proxy device to release resources to the cloud device based on the connection.
本实施例中,所述第一传输单元32,配置为向所述云端代理设备发送第一资源发布请求消息,第一资源发布请求消息用于指示所述云端代理设备向云端设备发布资源。In this embodiment, 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.
本实施例中,所述第一资源发布请求消息请求的资源包括以下方式:In this embodiment, the resource requested by the first resource release request message includes the following manners:
作为一种实施方式,所述第一资源发布请求消息请求的资源为云端代理资源;所述第一资源发布请求消息包括以下至少之一:代理发布资源指示、所述云端受限设备的标识、所述云端受限设备的第一资源链接;所述云端受限设备的第一资源链接中的资源的端点为所述云端受限设备的端点。As an implementation manner, 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.
作为另一种实施方式,所述第一资源发布请求消息请求的资源为资源目录资源;所述第一资源发布请求消息包括以下至少之一:所述云端受限设备的标识、所述云端受限设备的第一资源链接;所述云端受限设备的第一资源链接中的资源的端点为所述云端受限设备的端点。As another implementation manner, 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.
可选地,所述第一资源发布请求消息还包括以下至少之一:发布资源的有效时间、云端受限设备的指示。Optionally, 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.
在本申请的一种可选实施例中,所述第一传输单元32,还配置为接收所述云端代理设备发送的第二资源发布响应消息。所述第二资源发布响应消息用于确认资源发布成功。In an optional embodiment of the present application, 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.
在本申请的一种可选实施例中,所述第一传输单元32,还配置为向所述云端代理设备发送第一资源发布请求消息之前,向所述云端代理设备发送第一云端注册请求消息;接收所述云端代理设备发送的第二云端注册响应消息;所述第二云端注册响应消息包括以下至少之一:所述用户标识、所述云端受限设备的访问令牌、所述访问令牌的有效时长、所述云端受限设备的更新令牌。In an optional embodiment of the present application, 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.
本实施例中,所述第一云端注册请求消息请求的资源包括以下方式:In this embodiment, the resource requested by the first cloud registration request message includes the following methods:
作为一种实施方式,所述第一云端注册请求消息请求的资源为云端代理资源;所述第一云端注册请求消息包括以下至少之一:代理云端注册指示、所述云端受限设备的标识、所述云端受限设备的安全凭证信息。As an implementation manner, 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.
作为另一种实施方式,所述第一云端注册请求消息请求的资源为账号资源;所述第一云端注册请求消息包括以下至少之一:所述云端受限设备的标识、所述访问令牌。As another implementation manner, 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 .
在本申请的一种可选实施例中,所述第一传输单元32,还配置为获得配置器发送的访问令牌。In an optional embodiment of the present application, the first transmission unit 32 is further configured to obtain an access token sent by the configurator.
在本申请的一种可选实施例中,所述第一传输单元32,还配置为向所述云端代理设备发送第一资源发布请求消息之前,向所述云端代理设备发送第一云端登陆请求消息;接收所述云端代理设备发送的第二云端登陆响应消息;所述第二云端登陆响应消息包括访问令牌的有效时间。In an optional embodiment of the present application, 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.
本实施例中,所述第一云端登陆请求消息请求的资源包括以下方式:In this embodiment, the resource requested by the first cloud login request message includes the following methods:
作为一种实施方式,所述第一云端登陆请求消息请求的资源为云端代理资源;所述第一云端登陆请求消息包括以下至少之一:代理云端登陆指示、所述云端受限设备的标识、所述云端受限设备的访问令牌。As an implementation manner, 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.
作为另一种实施方式,所述第一云端登陆请求消息请求的资源为会话资源;所述第一云端登陆请求消息包括以下至少之一:云端登陆指示、所述云端受限设备的标识、所述云端受限设备的访问令牌、用户标识。As another implementation manner, 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.
在本申请的一种可选实施例中,所述第一传输单元32,还配置为向所述云端代理设备发送第一更新令牌请求消息;接收所述云端代理设备发送的第二更新令牌响应消息;所述第二更新令牌响应消息包括以下至少之一:新的访问令牌、更新令牌、所述新的访问令牌的有效时间。In an optional embodiment of the present application, 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.
本实施例中,所述第一更新令牌请求消息请求的资源包括以下方式:In this embodiment, the resource requested by the first update token request message includes the following manners:
作为一种实施方式,所述第一更新令牌请求消息请求的资源为云端代理资源;所述第一更新令牌请求消息包括以下至少之一:代理更新令牌指示、所述云端受限设备的标识、更新令牌、用户标识。As an implementation manner, 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.
作为另一种实施方式,所述第一更新令牌请求消息请求的资源为更新令牌资源;所述第一更新令牌请求消息包括以下至少之一:所述云端受限设备的标识、更新令牌、用户标识。As another implementation manner, 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.
在本申请的一种可选实施例中,所述第一传输单元32,还配置为向所述云端代理设备发送第一资源发布请求消息之前,向所述云端代理设备发送第一设备绑定请求消息;所述第一设备绑定请求消息请求的资源为云端代理资源;接收所述云端代理设备发送的第二设备绑定响应消息。In an optional embodiment of the present application, 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.
其中,所述第一设备绑定请求消息包括以下至少之一:代理设备绑定指示、所述云端受限设备的标识、所述云端受限设备的安全凭证;Wherein, 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.
本申请实施例中,所述云端受限设备中的第一连接建立单元31,在实际应用中可由所述设备中的中央处理器(CPU,Central Processing Unit)、数字信号处理器(DSP,Digital Signal Processor)、微控制单元(MCU,Microcontroller Unit)或可编程门阵列(FPGA,Field-Programmable Gate Array)实现;所述设备中的第一传输单元32,在实际应用中可通过通信模组(包含:基础通信套件、操作 系统、通信模块、标准化接口和协议等)及收发天线实现。In the embodiment of the present application, 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.
需要说明的是:上述实施例提供的设备在进行资源发布时,仅以上述各程序模块的划分进行举例说明,实际应用中,可以根据需要而将上述处理分配由不同的程序模块完成,即将设备的内部结构划分成不同的程序模块,以完成以上描述的全部或者部分处理。另外,上述实施例提供的设备与资源发布方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。It should be noted that when the device provided in the above embodiment performs resource release, only the division of the above program modules is used as an example. In actual applications, 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. In addition, 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.
本申请实施例还提供了一种云端代理设备。图7是本申请实施例提供的云端代理设备的一种结构组成示意图;如图7所示,所述云端代理设备包括:第二连接建立单元41、第二传输单元42和第三传输单元43;其中,The embodiment of the present application also provides a cloud proxy device. 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,
所述第二连接建立单元41,配置为与云端受限设备建立连接;The second connection establishment unit 41 is configured to establish a connection with a cloud-restricted device;
所述第二传输单元42,配置为基于所述连接与所述云端受限设备传输信息;The second transmission unit 42 is configured to transmit information with the cloud restricted device based on the connection;
所述第三传输单元43,配置为基于所述第二传输单元42传输的所述信息向云端设备发布所述云端受限设备的资源。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.
所述第二连接建立单元41,配置为向所述云端受限设备发送所述云端代理设备的信息,所述云端代理设备的信息用于所述云端受限设备建立于所述云端代理设备的连接。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.
在本申请的一种可选实施例中,,所述第二连接建立单元41,配置为接收所述云端受限设备通过广播或组播的方式发送的发现请求消息;所述发现请求消息中包括云端代理资源类型;向所述云端受限设备发送发现响应消息;所述发现响应消息包括所述云端代理设备的信息。In an optional embodiment of the present application, 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.
其中,所述云端代理设备的信息包括以下至少之一:云端代理设备的云端代理资源标识、云端代理资源的端点信息。Wherein, 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.
在本申请的一种可选实施例中,所述第二传输单元42,配置为基于所述连接获得所述云端受限设备的指示;In an optional embodiment of the present application, the second transmission unit 42 is configured to obtain an indication of the cloud restricted device based on the connection;
所述第三传输单元43,配置为基于所述第二传输单元42获得的所述指示向云端设备发布资源。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.
本实施例中,所述第二传输单元42,配置为基于所述连接接收所述云端受限设备发送的第一资源发布请求消息,第一资源发布请求消息用于指示所述云端代理设备向云端设备发布资源;In this embodiment, 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;
所述第三传输单元43,配置为向云端设备发送第二资源发布请求消息;所述第二资源发布请求消息请求的资源为资源目录资源;所述第二资源发布请求消息包括以下至少之一:所述云端受限设备的标识、所述云端受限设备的第二资源链接;所述云端受限设备的第二资源链接中的资源的端点为所述云端代理设备的端点;还配置为获得所述云端设备发送的第一资源发布响应消息;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;
所述第二传输单元42,还配置为向所述云端受限设备发送第二资源发布响应消息。The second transmission unit 42 is further configured to send a second resource release response message to the cloud restricted device.
本实施例中,所述第一资源发布请求消息请求的资源包括以下方式:In this embodiment, the resource requested by the first resource release request message includes the following manners:
作为一种实施方式,所述第一资源发布请求消息请求的资源为云端代理资源;所述第一资源发布请求消息包括以下至少之一:代理发布资源指示、所述云端受限设备的标识、所述云端受限设备的第一资源链接;所述云端受限设备的第一资源链接中的资源的端点为所述云端受限设备的端点。As an implementation manner, 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.
作为另一种实施方式,所述第一资源发布请求消息请求的资源为资源目录资源;所述第一资源发布请求消息包括以下至少之一:所述云端受限设备的标识、所述云端受限设备的第一资源链接;所述云端受限设备的第一资源链接中的资源的端点为所述云端受限设备的端点。As another implementation manner, 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.
可选地,所述第一资源发布请求消息还包括以下至少之一:发布资源的有效时间、云端受限设备的指示;所述第二资源发布请求消息中还包括以下至少之一:发布资源的有效时间、云端受限设备的指示。Optionally, 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.
在本申请的一种可选实施例中,所述云端受限设备的第二资源链接中的目标标识包括目标资源的标识和所述云端受限设备的标识。In an optional embodiment of the present application, 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.
在本申请的一种可选实施例中,所述第二传输单元42,还配置为基于所述连接接收所述云端受限设备发送的第一资源发布请求消息之前,接收所述云端受限设备发送的第一云端注册请求消息;In an optional embodiment of the present application, 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 first cloud registration request message sent by the device;
所述第三传输单元43,还配置为向所述云端设备发送第二云端注册请求消息;接收所述云端设备发送的第一云端注册响应消息;所述第一云端注册响应消息包括以下至少之一:所述用户标识、所述云端受限设备的访问令牌、所述访问令牌的有效时长、所述云端受限设备的更新令牌;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;
所述第二传输单元42,还配置为向所述云端受限设备发送第二云端注册响应消息;所述第二云端注册响应消息包括以下至少之一:所述用户标识、所述云端受限设备的访问令牌、所述访问令牌的有效时长、所述云端受限设备的更新令牌。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.
本实施例中,所述第一云端注册请求消息请求的资源包括以下方式:In this embodiment, the resource requested by the first cloud registration request message includes the following methods:
作为一种实施方式,所述第一云端注册请求消息请求的资源为云端代理资源;所述第一云端注 册请求消息包括以下至少之一:代理云端注册指示、所述云端受限设备的标识、所述云端受限设备的安全凭证信息;As an implementation manner, 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.
作为另一种实施方式,所述第一云端注册请求消息请求的资源为账号资源;所述第一云端注册请求消息包括以下至少之一:所述云端受限设备的标识、所述访问令牌;As another implementation manner, 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.
其中,所述访问令牌为所述云端受限设备与所述云端代理设备建立连接之前、由配置器从所述云端设备为所述云端受限设备获得的访问令牌。Wherein, 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.
在本申请的一种可选实施例中,所述第二传输单元42,还配置为基于所述连接接收所述云端受限设备发送的第一资源发布请求消息之前,接收所述云端受限设备发送的第一云端登陆请求消息;In an optional embodiment of the present application, 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 first cloud login request message sent by the device;
所述第三传输单元43,还配置为向所述云端设备发送第二云端登陆请求消息;接收所述云端设备发送的第一云端登陆响应消息;所述第一云端登陆响应消息包括访问令牌的有效时间;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
所述第二传输单元42,还配置为向所述云端受限设备发送第二云端登陆响应消息;所述第二云端登陆响应消息包括访问令牌的有效时间。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.
本实施例中,所述第一云端登陆请求消息请求的资源包括以下方式:In this embodiment, the resource requested by the first cloud login request message includes the following methods:
作为一种实施方式,所述第一云端登陆请求消息请求的资源为云端代理资源;所述第一云端登陆请求消息包括以下至少之一:代理云端登陆指示、所述云端受限设备的标识、所述云端受限设备的访问令牌;As an implementation manner, 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.
作为另一种实施方式,所述第一云端登陆请求消息请求的资源为会话资源;所述第一云端登陆请求消息包括以下至少之一:云端登陆指示、所述云端受限设备的标识、所述云端受限设备的访问令牌、用户标识;As another implementation manner, 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.
在本申请的一种可选实施例中,所述第二传输单元42,还配置为接收所述云端受限设备发送的第一更新令牌请求消息;In an optional embodiment of the present application, the second transmission unit 42 is further configured to receive a first update token request message sent by the cloud restricted device;
所述第三传输单元43,还配置为向所述云端设备发送第二更新令牌请求消息;接收所述云端设备发送的第一更新令牌响应消息;所述第一更新令牌响应消息包括以下至少之一:新的访问令牌、更新令牌、所述新的访问令牌的有效时间;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;
所述第二传输单元42,还配置为向所述云端受限设备发送第二更新令牌响应消息;所述第二更新令牌响应消息包括以下至少之一:新的访问令牌、更新令牌、所述新的访问令牌的有效时间。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.
本实施例中,所述第一更新令牌请求消息请求的资源包括以下方式:In this embodiment, the resource requested by the first update token request message includes the following manners:
作为一种实施方式,所述第一更新令牌请求消息请求的资源为云端代理资源;所述第一更新令牌请求消息包括以下至少之一:代理更新令牌指示、所述云端受限设备的标识、更新令牌、用户标识;As an implementation manner, 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.
作为另一种实施方式,所述第一更新令牌请求消息请求的资源为更新令牌资源;所述第一更新令牌请求消息包括以下至少之一:所述云端受限设备的标识、更新令牌、用户标识;As another implementation manner, 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.
在本申请的一种可选实施例中,所述第二传输单元42,还配置为基于所述连接接收所述云端受限设备发送的第一资源发布请求消息之前,接收所述云端受限设备发送的第一设备绑定请求消息;所述第一设备绑定请求消息请求的资源为云端代理资源;In an optional embodiment of the present application, 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. A first device binding request message sent by a device; the resource requested by the first device binding request message is a cloud proxy resource;
所述第三传输单元43,还配置为向所述云端设备发送第二设备绑定请求消息;所述第二设备绑定请求消息请求的资源为绑定资源;接收所述云端设备发送的第一设备绑定响应消息;所述第一设备绑定响应消息包括用户标识;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;
所述第二传输单元42,还配置为向所述云端受限设备发送第二设备绑定响应消息;所述第二设 备绑定响应消息包括用户标识。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.
其中,所述第一设备绑定请求消息包括以下至少之一:代理设备绑定指示、所述云端受限设备的标识、所述云端受限设备的安全凭证;Wherein, 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.
本申请实施例中,所述云端受限设备中的第二连接建立单元41,在实际应用中可由所述设备中的CPU、DSP、MCU或FPGA实现;所述设备中的第二传输单元42和第三传输单元43,在实际应用中可通过通信模组(包含:基础通信套件、操作系统、通信模块、标准化接口和协议等)及收发天线实现。In the embodiment of the present application, 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.
需要说明的是:上述实施例提供的设备在进行资源发布时,仅以上述各程序模块的划分进行举例说明,实际应用中,可以根据需要而将上述处理分配由不同的程序模块完成,即将设备的内部结构划分成不同的程序模块,以完成以上描述的全部或者部分处理。另外,上述实施例提供的设备与资源发布方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。It should be noted that when the device provided in the above embodiment performs resource release, only the division of the above program modules is used as an example. In actual applications, 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. In addition, 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.
本发明实施例还提供了一种云端设备。图8是本申请实施例提供的云端设备的结构组成示意图一;如图8所示,所述云端设备包括第四传输单元51和公布单元52;其中,The embodiment of the present invention also provides a cloud device. 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,
所述第四传输单元51,配置为获得云端代理设备发布的资源;所述资源为所述云端代理设备基于与云端受限设备之间的连接获得的所述云端受限设备的资源;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;
所述公布单元52,配置为公布所述资源。The publishing unit 52 is configured to publish the resource.
在本申请的一种可选实施例中,所述第四传输单元51,配置为接收所述云端代理设备发送的第二资源发布请求消息;所述第二资源发布请求消息请求的资源为资源目录资源;所述第二资源发布请求消息包括以下至少之一:所述云端受限设备的标识、所述云端受限设备的第二资源链接;所述云端受限设备的第二资源链接中的资源的端点为所述云端代理设备的端点。In an optional embodiment of the present application, 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.
可选地,所述第二资源发布请求消息中还包括以下至少之一:发布资源的有效时间、云端受限设备的指示。Optionally, 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.
可选地,所述云端受限设备的第二资源链接中的目标标识包括目标资源的标识和所述云端受限设备的标识。Optionally, 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.
在本申请的一种可选实施例中,所述公布单元52,配置为将所述第二资源链接添加至资源目录中;其中,公布的资源的端点为所述云端设备的端点。In an optional embodiment of the present application, 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.
在本申请的一种可选实施例中,所述公布单元52,还配置为在所述第二资源发布请求消息中包括云端受限设备的指示的情况下,或者,在所述云端受限设备的第二资源链接中的目标标识包括目标资源的标识和所述云端受限设备的标识的情况下,公布的目标资源的标识与所述第二资源链接中的目标资源的标识相同。In an optional embodiment of the present application, 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 In the case that 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.
在本申请的一种可选实施例中,所述第四传输单元51,还配置为向所述云端代理设备发送第一资源发布响应消息。In an optional embodiment of the present application, the fourth transmission unit 51 is further configured to send a first resource release response message to the cloud proxy device.
在本申请的一种可选实施例中,如图9所示,所述设备还包括注册单元53;In an optional embodiment of the present application, as shown in FIG. 9, the device further includes a registration unit 53;
所述第四传输单元51,还配置为获得云端代理设备发布的资源之前,接收所述云端代理设备发送的第二云端注册请求消息;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;
所述注册单元53,配置为为所述云端受限设备分配访问令牌,以及关联所述云端受限设备和用户标识;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;
所述第四传输单元51,还配置为向所述云端代理设备发送第一云端注册响应消息;所述第一云端注册响应消息包括以下至少之一:所述用户标识、所述云端受限设备的访问令牌、所述访问令牌的有效时长、所述云端受限设备的更新令牌。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.
本实施例中,所述第二云端注册请求消息请求的资源为账号资源;所述第二云端注册请求消息包括以下至少之一:所述云端受限设备的标识、所述云端受限设备的安全凭证信息、用户标识;In this embodiment, 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;
或者,所述第二云端注册请求消息请求的资源为账号资源;所述第二云端注册请求消息包括以下至少之一:所述云端受限设备的标识、所述访问令牌。其中,所述访问令牌为所述云端受限设备与所述云端代理设备建立连接之前、由配置器从所述云端设备为所述云端受限设备获得的访问令牌。Alternatively, 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. Wherein, 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.
在本申请的一种可选实施例中,所述第四传输单元51,还配置为获得云端代理设备发布的资源之前,接收所述云端代理设备发送的第二云端登陆请求消息;向所述云端代理设备发送第一云端登陆响应消息;所述第一云端登陆响应消息包括访问令牌的有效时间。In an optional embodiment of the present application, 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.
本实施例中,所述第二云端登陆请求消息请求的资源为会话资源;所述第二云端登陆请求消息 包括以下至少之一:云端登陆指示、所述云端受限设备的标识、所述云端受限设备的访问令牌、用户标识。In this embodiment, 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.
在本申请的一种可选实施例中,如图10所示,所述设备还包括更新单元54;In an optional embodiment of the present application, as shown in FIG. 10, the device further includes an update unit 54;
所述第四传输单元51,还配置为接收所述云端代理设备发送的第二更新令牌请求消息;The fourth transmission unit 51 is further configured to receive a second update token request message sent by the cloud proxy device;
所述更新单元54,配置为更新新的访问令牌;The update unit 54 is configured to update a new access token;
所述第四传输单元51,还配置为向所述云端代理设备发送第一更新令牌响应消息;所述第一更新令牌响应消息包括以下至少之一:新的访问令牌、更新令牌、所述新的访问令牌的有效时间。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.
本实施例中,所述第二更新令牌请求消息请求的资源为更新令牌资源;所述第二更新令牌请求消息包括以下至少之一:所述云端受限设备的标识、更新令牌、用户标识。In this embodiment, 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.
在本申请的一种可选实施例中,如图11所示,所述设备还包括绑定单元55;In an optional embodiment of the present application, as shown in FIG. 11, the device further includes a binding unit 55;
所述第四传输单元51,还配置为获得云端代理设备发布的资源之前,接收所述云端代理设备发送的第二设备绑定请求消息;所述第二设备绑定请求消息请求的资源为绑定资源;所述第二设备绑定请求消息包括以下至少之一:所述云端受限设备的标识、所述云端受限设备的安全凭证、安全标识;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;
所述绑定单元55,配置为关联所述云端受限设备和用户标识;The binding unit 55 is configured to associate the cloud restricted device with a user identity;
所述第四传输单元51,还配置为向所述云端代理设备发送第一设备绑定响应消息;所述第一设备绑定响应消息包括用户标识。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.
可选地,所述绑定单元55,还配置为关联所述云端受限设备和所述云端代理设备的访问令牌。Optionally, the binding unit 55 is further configured to associate the access token of the cloud restricted device and the cloud proxy device.
本申请实施例中,所述云端设备中的注册单元53、更新单元54、公布单元52和绑定单元55,在实际应用中可由所述设备中的CPU、DSP、MCU或FPGA实现;所述设备中的第四传输单元51,在实际应用中可通过通信模组(包含:基础通信套件、操作系统、通信模块、标准化接口和协议等)及收发天线实现。In the embodiment of the present application, 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.
需要说明的是:上述实施例提供的设备在进行资源发布时,仅以上述各程序模块的划分进行举例说明,实际应用中,可以根据需要而将上述处理分配由不同的程序模块完成,即将设备的内部结构划分成不同的程序模块,以完成以上描述的全部或者部分处理。另外,上述实施例提供的设备与资源发布方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。It should be noted that when the device provided in the above embodiment performs resource release, only the division of the above program modules is used as an example. In actual applications, 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. In addition, 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.
图12是本申请实施例提供的一种设备示意性结构图。该设备可以是云端受限设备、云端代理设备或云端设备,如图12所示,设备600包括处理器610,处理器610可以从存储器中调用并运行计算机程序,以实现本申请实施例中的方法。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. As shown in FIG. 12, the device 600 includes a processor 610. The processor 610 can call and run a computer program from the memory to implement the method.
可选地,如图12所示,设备还可以包括存储器620。其中,处理器610可以从存储器620中调用并运行计算机程序,以实现本申请实施例中的方法。Optionally, as shown in FIG. 12, 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.
其中,存储器620可以是独立于处理器610的一个单独的器件,也可以集成在处理器610中。The memory 620 may be a separate device independent of the processor 610, or may be integrated in the processor 610.
可选地,如图12所示,设备还可以包括收发器630,处理器610可以控制该收发器630与其他设备进行通信,具体地,可以向其他设备发送信息或数据,或接收其他设备发送的信息或数据。Optionally, as shown in FIG. 12, 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.
其中,收发器630可以包括发射机和接收机。收发器630还可以进一步包括天线,天线的数量可以为一个或多个。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.
可选地,该设备具体可为本申请实施例的云端受限设备,并且该设备可以实现本申请实施例的各个方法中由云端受限设备实现的相应流程,为了简洁,在此不再赘述。Optionally, 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. For brevity, details are not repeated here .
可选地,该设备具体可为本申请实施例的云端代理设备,并且该设备可以实现本申请实施例的各个方法中由云端代理设备实现的相应流程,为了简洁,在此不再赘述。Optionally, 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. For brevity, details are not repeated here.
可选地,该设备具体可为本申请实施例的云端设备,并且该设备可以实现本申请实施例的各个方法中由云端设备实现的相应流程,为了简洁,在此不再赘述。Optionally, 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. For brevity, details are not repeated here.
图13是本申请实施例的芯片的示意性结构图。图13所示的芯片700包括处理器710,处理器710可以从存储器中调用并运行计算机程序,以实现本申请实施例中的方法。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.
可选地,如图13所示,芯片700还可以包括存储器720。其中,处理器710可以从存储器720中调用并运行计算机程序,以实现本申请实施例中的方法。Optionally, as shown in FIG. 13, the chip 700 may further include a memory 720. Wherein, 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.
其中,存储器720可以是独立于处理器710的一个单独的器件,也可以集成在处理器710中。The memory 720 may be a separate device independent of the processor 710, or may be integrated in the processor 710.
可选地,该芯片700还可以包括输入接口730。其中,处理器710可以控制该输入接口730与其他设备或芯片进行通信,具体地,可以获取其他设备或芯片发送的信息或数据。Optionally, 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.
可选地,该芯片700还可以包括输出接口740。其中,处理器710可以控制该输出接口740与其他设备或芯片进行通信,具体地,可以向其他设备或芯片输出信息或数据。Optionally, 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.
可选地,该芯片可应用于本申请实施例中的云端受限设备,并且该芯片可以实现本申请实施例的各个方法中由云端受限设备实现的相应流程,为了简洁,在此不再赘述。Optionally, 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. For the sake of brevity, it will not be omitted here. Repeat.
可选地,该芯片可应用于本申请实施例中的云端代理设备,并且该芯片可以实现本申请实施例的各个方法中由云端代理设备实现的相应流程,为了简洁,在此不再赘述。Optionally, 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.
可选地,该芯片可应用于本申请实施例中的云端设备,并且该芯片可以实现本申请实施例的各个方法中由云端设备实现的相应流程,为了简洁,在此不再赘述。Optionally, 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. For the sake of brevity, details are not repeated here.
应理解,本申请实施例提到的芯片还可以称为系统级芯片,系统芯片,芯片系统或片上系统芯片等。It should be understood that 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.
应理解,本申请实施例的处理器可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法实施例的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器可以是通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法的步骤。It should be understood that the processor of the embodiment of the present application may be an integrated circuit chip with signal processing capability. In the implementation process, 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. 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.
可以理解,本申请实施例中的存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(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)。应注意,本文描述的系统和方法的存储器旨在包括但不限于这些和任意其它适合类型的存储器。It can be understood that 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. Among them, 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. By way of exemplary but not restrictive description, many forms of RAM are available, such as 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 (Synchlink DRAM, SLDRAM) ) And Direct Rambus RAM (DR RAM). It should be noted that the memories of the systems and methods described herein are intended to include, but are not limited to, these and any other suitable types of memories.
应理解,上述存储器为示例性但不是限制性说明,例如,本申请实施例中的存储器还可以是静态随机存取存储器(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)等等。也就是说,本申请实施例中的存储器旨在包括但不限于这些和任意其它适合类型的存储器。It should be understood that the foregoing memory is illustrative but not restrictive. For example, 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. Optionally, 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.
可选的,该计算机可读存储介质可应用于本申请实施例中的云端代理设备,所述计算机程序使得计算机执行本申请实施例的各个方法中由云端代理设备实现的相应流程,为了简洁,在此不再赘述。Optionally, 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. For the sake of brevity, I will not repeat them here.
可选的,该计算机可读存储介质可应用于本申请实施例中的云端设备,所述计算机程序使得计算机执行本申请实施例的各个方法中由云端设备实现的相应流程,为了简洁,在此不再赘述。Optionally, 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. For brevity, here is No longer.
本申请实施例还提供了一种计算机程序产品,包括计算机程序指令。可选的,该计算机程序产品可应用于本申请实施例中的云端受限设备,该计算机程序指令使得计算机执行本申请实施例的各个方法中由云端受限设备实现的相应流程,为了简洁,在此不再赘述。The embodiments of the present application also provide a computer program product, including computer program instructions. Optionally, 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. For the sake of brevity, I will not repeat them here.
可选的,该计算机程序产品可应用于本申请实施例中的云端代理设备,该计算机程序指令使得计算机执行本申请实施例的各个方法中由云端代理设备实现的相应流程,为了简洁,在此不再赘述。Optionally, 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. For brevity, here No longer.
可选的,该计算机程序产品可应用于本申请实施例中的云端设备,该计算机程序指令使得计算机执行本申请实施例的各个方法中由云端设备实现的相应流程,为了简洁,在此不再赘述。Optionally, 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. For the sake of brevity, it will not be omitted here. Repeat.
本申请实施例还提供了一种计算机程序。可选的,该计算机程序可应用于本申请实施例中的云端受限设备,所述计算机程序使得计算机执行如本申请实施例各个的方法中由云端受限设备实现相应流程,为了简洁,在此不再赘述。The embodiment of the present application also provides a computer program. Optionally, 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. Optionally, 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. Optionally, 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 .
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。A person of ordinary skill in the art may be aware that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware or a combination of computer software and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraint conditions of the technical solution. Professionals and technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered beyond the scope of this application.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and conciseness of description, the specific working process of the above-described system, device, and unit can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的设备和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed device and method may be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, 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. In addition, 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.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, the functional units 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.
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If 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. Based on this understanding, 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 .
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应所述以权利要求的保护范围为准。The above are only specific implementations of this application, but the protection scope of this application is not limited to this. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in this application. Should be covered within the scope of protection of this application. Therefore, the protection scope of this application shall be subject to the protection scope of the claims.

Claims (127)

  1. 一种资源发布方法,所述方法包括:A method for publishing resources, the method includes:
    云端受限设备建立与云端代理设备的连接;Cloud restricted devices establish connections with cloud proxy devices;
    所述云端受限设备基于所述连接与所述云端代理设备传输信息,所述信息用于所述云端代理设备向云端设备发布资源。The cloud restricted device transmits information to 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.
  2. 根据权利要求1所述的方法,其中,所述云端受限设备建立与云端代理设备的连接,包括:The method according to claim 1, wherein the establishment of the connection between the cloud restricted device and the cloud proxy device comprises:
    所述云端受限设备获得云端代理设备的信息,基于所述信息建立与云端代理设备的连接。The cloud restricted device obtains information of the cloud proxy device, and establishes a connection with the cloud proxy device based on the information.
  3. 根据权利要求2所述的方法,其中,所述云端受限设备获得云端代理设备的信息,包括:The method according to claim 2, wherein the obtaining of the cloud proxy device information by the cloud restricted device comprises:
    所述云端受限设备接收配置器发送的配置信息,所述配置信息中包括云端代理设备的信息。The cloud-constrained device receives configuration information sent by the configurator, and the configuration information includes information of the cloud proxy device.
  4. 根据权利要求2所述的方法,其中,所述云端受限设备获得云端代理设备的信息,包括:The method according to claim 2, wherein the obtaining of the cloud proxy device information by the cloud restricted device comprises:
    所述云端受限设备通过广播或组播的方式发送发现请求消息;所述发现请求消息中包括云端代理资源类型;The cloud-constrained device sends a discovery request message through broadcast or multicast; the discovery request message includes the cloud proxy resource type;
    所述云端受限设备接收发现响应消息;所述发现响应消息包括所述云端代理设备的信息。The cloud restricted device receives a discovery response message; the discovery response message includes the information of the cloud proxy device.
  5. 根据权利要求2至4任一项所述的方法,其中,所述云端代理设备的信息包括以下至少之一:云端代理设备的云端代理资源标识、云端代理资源的端点信息。The method according to any one of claims 2 to 4, wherein 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.
  6. 根据权利要求1所述的方法,其中,所述云端受限设备基于所述连接与所述云端代理设备传输信息,包括:The method according to claim 1, wherein the transmission of information between the cloud-restricted device and the cloud proxy device based on the connection comprises:
    所述云端受限设备基于所述连接指示所述云端代理设备向云端设备发布资源。The cloud-constrained device instructs the cloud proxy device to release resources to the cloud device based on the connection.
  7. 根据权利要求6所述的方法,其中,所述云端受限设备基于所述连接指示所述云端代理设备向云端设备发布资源,包括:The method according to claim 6, wherein the cloud-restricted device instructing the cloud proxy device to release resources to the cloud device based on the connection comprises:
    所述云端受限设备向所述云端代理设备发送第一资源发布请求消息,第一资源发布请求消息用于指示所述云端代理设备向云端设备发布资源。The cloud-constrained device sends a first resource publication request message to the cloud proxy device, and the first resource publication request message is used to instruct the cloud proxy device to publish resources to the cloud device.
  8. 根据权利要求7所述的方法,其中,所述第一资源发布请求消息请求的资源为云端代理资源;The method according to claim 7, wherein the resource requested by the first resource release request message is a cloud proxy resource;
    所述第一资源发布请求消息包括以下至少之一:代理发布资源指示、所述云端受限设备的标识、所述云端受限设备的第一资源链接;The first resource release request message includes at least one of the following: an agent release resource indication, an identifier of the cloud restricted device, and a 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.
  9. 根据权利要求8所述的方法,其中,所述第一资源发布请求消息还包括以下至少之一:发布资源的有效时间、云端受限设备的指示。The method according to claim 8, wherein the first resource release request message further includes at least one of the following: effective time of the released resource, and an indication of a cloud-restricted device.
  10. 根据权利要求7至9任一项所述的方法,其中,所述方法还包括:The method according to any one of claims 7 to 9, wherein the method further comprises:
    所述云端受限设备接收所述云端代理设备发送的第二资源发布响应消息。The cloud restricted device receives a second resource release response message sent by the cloud proxy device.
  11. 根据权利要求7至10任一项所述的方法,其中,所述云端受限设备向所述云端代理设备发送第一资源发布请求消息之前,所述方法还包括:The method according to any one of claims 7 to 10, wherein before the cloud restricted device sends the first resource release request message to the cloud proxy device, the method further comprises:
    所述云端受限设备向所述云端代理设备发送第一云端注册请求消息;Sending, by the cloud restricted device, a first cloud registration request message to the cloud proxy device;
    所述云端受限设备接收所述云端代理设备发送的第二云端注册响应消息;所述第二云端注册响应消息包括以下至少之一:所述用户标识、所述云端受限设备的访问令牌、所述访问令牌的有效时长、所述云端受限设备的更新令牌。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, and the access token of the cloud restricted device , The valid duration of the access token, and the update token of the cloud restricted device.
  12. 根据权利要求11所述的方法,其中,所述第一云端注册请求消息请求的资源为云端代理资源;The method according to claim 11, wherein 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: a proxy cloud registration instruction, an identifier of the cloud restricted device, and security credential information of the cloud restricted device.
  13. 根据权利要求7至12任一项所述的方法,其中,所述云端受限设备向所述云端代理设备发送第一资源发布请求消息之前,所述方法还包括:The method according to any one of claims 7 to 12, wherein before the cloud restricted device sends the first resource release request message to the cloud proxy device, the method further comprises:
    所述云端受限设备向所述云端代理设备发送第一云端登陆请求消息;Sending, by the cloud restricted device, a first cloud login request message to the cloud proxy device;
    所述云端受限设备接收所述云端代理设备发送的第二云端登陆响应消息;所述第二云端登陆响应消息包括访问令牌的有效时间。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.
  14. 根据权利要求13所述的方法,其中,所述第一云端登陆请求消息请求的资源为云端代理资源;The method according to claim 13, wherein 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: a proxy cloud login instruction, an identifier of the cloud restricted device, and an access token of the cloud restricted device.
  15. 根据权利要求1至14任一项所述的方法,其中,所述方法还包括:The method according to any one of claims 1 to 14, wherein the method further comprises:
    所述云端受限设备向所述云端代理设备发送第一更新令牌请求消息;Sending, by the cloud restricted device, a first update token request message to the cloud proxy device;
    所述云端受限设备接收所述云端代理设备发送的第二更新令牌响应消息;所述第二更新令牌响应消息包括以下至少之一:新的访问令牌、更新令牌、所述新的访问令牌的有效时间。The cloud restricted device receives a second update token response message sent by the cloud proxy device; the second update token response message includes at least one of the following: a new access token, an update token, and the new The effective time of the access token.
  16. 根据权利要求15所述的方法,其中,所述第一更新令牌请求消息请求的资源为云端代理资源;The method according to claim 15, wherein 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: a proxy update token indication, an identification of the cloud restricted device, an update token, and a user identification.
  17. 根据权利要求1至10任一项所述的方法,其中,所述云端受限设备向所述云端代理设备发送第一资源发布请求消息之前,所述方法还包括:The method according to any one of claims 1 to 10, wherein before the cloud restricted device sends the first resource release request message to the cloud proxy device, the method further comprises:
    所述云端受限设备向所述云端代理设备发送第一设备绑定请求消息;所述第一设备绑定请求消息请求的资源为云端代理资源;The cloud restricted device sends a first device binding request message to the cloud proxy device; 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.
  18. 根据权利要求17所述的方法,其中,所述第一设备绑定请求消息包括以下至少之一:代理设备绑定指示、所述云端受限设备的标识、所述云端受限设备的安全凭证;The method according to claim 17, wherein 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.
  19. 根据权利要求7所述的方法,其中,所述第一资源发布请求消息请求的资源为资源目录资源;The method according to claim 7, wherein the resource requested by the first resource release request message is a resource directory resource;
    所述第一资源发布请求消息包括以下至少之一:所述云端受限设备的标识、所述云端受限设备的第一资源链接;The first resource release request message includes at least one of the following: an identifier of the cloud restricted device, and a 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.
  20. 根据权利要求19所述的方法,其中,所述第一资源发布请求消息还包括以下至少之一:发布资源的有效时间、云端受限设备的指示。The method according to claim 19, wherein the first resource release request message further includes at least one of the following: effective time of the released resource, and an indication of a cloud-restricted device.
  21. 根据权利要求11所述的方法,其中,所述方法还包括:The method according to claim 11, wherein the method further comprises:
    所述云端受限设备获得配置器发送的访问令牌。The cloud restricted device obtains the access token sent by the configurator.
  22. 根据权利要求21所述的方法,其中,所述第一云端注册请求消息请求的资源为账号资源;The method according to claim 21, wherein 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.
  23. 根据权利要求13所述的方法,其中,所述第一云端登陆请求消息请求的资源为会话资源;The method according to claim 13, wherein 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, an access token of the cloud restricted device, and a user identifier.
  24. 根据权利要求15所述的方法,其中,所述第一更新令牌请求消息请求的资源为更新令牌资源;The method according to claim 15, wherein 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: an identifier of the cloud restricted device, an update token, and a user identifier.
  25. 一种资源发布方法,所述方法包括:A method for publishing resources, the method includes:
    云端代理设备与云端受限设备建立连接;The cloud proxy device establishes a connection with the cloud restricted device;
    所述云端代理设备基于所述连接与所述云端受限设备传输信息,基于所述信息向云端设备发布所述云端受限设备的资源。The cloud proxy device transmits information to the cloud-restricted device based on the connection, and publishes the resources of the cloud-restricted device to the cloud device based on the information.
  26. 根据权利要求25所述的方法,其中,所述云端代理设备与云端受限设备建立连接,包括:The method according to claim 25, wherein the establishing a connection between the cloud proxy device and the cloud restricted device comprises:
    所述云端代理设备向所述云端受限设备发送所述云端代理设备的信息,所述云端代理设备的信息用于所述云端受限设备建立于所述云端代理设备的连接。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 restricted device to establish a connection with the cloud proxy device.
  27. 根据权利要求26所述的方法,其中,所述云端代理设备向所述云端受限设备发送所述云端代理设备的信息,包括:The method according to claim 26, wherein the sending of the cloud proxy device information to the cloud restricted device by the cloud proxy device comprises:
    所述云端代理设备接收所述云端受限设备通过广播或组播的方式发送的发现请求消息;所述发现请求消息中包括云端代理资源类型;The cloud proxy device receives 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 information of the cloud proxy device.
  28. 根据权利要求26或27所述的方法,其中,所述云端代理设备的信息包括以下至少之一:云端代理设备的云端代理资源标识、云端代理资源的端点信息。The method according to claim 26 or 27, wherein 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.
  29. 根据权利要求25所述的方法,其中,所述云端代理设备基于所述连接与所述云端受限设备传输信息,基于所述信息向云端设备发布资源,包括:The method according to claim 25, wherein 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, comprising:
    所述云端代理设备基于所述连接获得所述云端受限设备的指示,基于所述指示向云端设备发布资源。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.
  30. 根据权利要求29所述的方法,其中,所述云端代理设备基于所述连接获得所述云端受限设备的指示,基于所述指示向云端设备发布资源,包括:The method according to claim 29, wherein the cloud proxy device obtains an instruction from the cloud-restricted device based on the connection, and publishing resources to the cloud device based on the instruction includes:
    所述云端代理设备基于所述连接接收所述云端受限设备发送的第一资源发布请求消息,第一资源发布请求消息用于指示所述云端代理设备向云端设备发布资源;The cloud proxy device receives, based on the connection, a first resource release request message sent by the cloud restricted device, where the first resource release request message is used to instruct the cloud proxy device to release resources to the cloud device;
    所述云端代理设备向云端设备发送第二资源发布请求消息;所述第二资源发布请求消息请求的资源为资源目录资源;所述第二资源发布请求消息包括以下至少之一:所述云端受限设备的标识、所述云端受限设备的第二资源链接;所述云端受限设备的第二资源链接中的资源的端点为所述云端代理设备的端点;The cloud proxy device sends a second resource release request message to the cloud device; the resource requested by the second resource release request message is a resource catalog resource; the second resource release request message includes at least one of the following: The identifier of the 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;
    所述云端代理设备获得所述云端设备发送的第一资源发布响应消息,向所述云端受限设备发送第二资源发布响应消息。The cloud proxy device obtains the first resource release response message sent by the cloud device, and sends a second resource release response message to the cloud restricted device.
  31. 根据权利要求30所述的方法,其中,所述第一资源发布请求消息请求的资源为云端代理资源;所述第一资源发布请求消息包括以下至少之一:代理发布资源指示、所述云端受限设备的标识、所述云端受限设备的第一资源链接;所述云端受限设备的第一资源链接中的资源的端点为所述云端受限设备的端点。The method according to claim 30, wherein the resource requested by the first resource release request message is a cloud proxy resource; the first resource release request message includes at least one of the following: a proxy release resource indication, and the cloud receiver The identifier of the restricted device and 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.
  32. 根据权利要求31所述的方法,其中,所述第一资源发布请求消息还包括以下至少之一:发布资源的有效时间、云端受限设备的指示;The method according to claim 31, wherein the first resource release request message further comprises at least one of the following: the effective time of the released resource and an indication of a cloud-restricted device;
    所述第二资源发布请求消息中还包括以下至少之一:发布资源的有效时间、云端受限设备的指示。The second resource release request message also includes at least one of the following: the effective time of the released resource, and an indication of the cloud restricted device.
  33. 根据权利要求30至32任一项所述的方法,其中,所述云端受限设备的第二资源链接中的目标标识包括目标资源的标识和所述云端受限设备的标识。The method according to any one of claims 30 to 32, wherein 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.
  34. 根据权利要求30至33任一项所述的方法,其中,所述云端代理设备基于所述连接接收所述云端受限设备发送的第一资源发布请求消息之前,所述方法还包括:The method according to any one of claims 30 to 33, wherein before the cloud proxy device receives the first resource release request message sent by the cloud restricted device based on the connection, the method further comprises:
    所述云端代理设备接收所述云端受限设备发送的第一云端注册请求消息,向所述云端设备发送第二云端注册请求消息;Receiving, by the cloud proxy device, a first cloud registration request message sent by the cloud restricted device, and 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: the user identifier, the access token of the cloud restricted device, and The valid duration of the access token, and the update token of the cloud restricted device;
    所述云端代理设备向所述云端受限设备发送第二云端注册响应消息;所述第二云端注册响应消息包括以下至少之一:所述用户标识、所述云端受限设备的访问令牌、所述访问令牌的有效时长、所述云端受限设备的更新令牌。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: the user ID, the access token of the cloud restricted device, The valid duration of the access token and the update token of the cloud restricted device.
  35. 根据权利要求34所述的方法,其中,所述第一云端注册请求消息请求的资源为云端代理资源;所述第一云端注册请求消息包括以下至少之一:代理云端注册指示、所述云端受限设备的标识、所述云端受限设备的安全凭证信息;The method according to claim 34, wherein 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, the cloud acceptor The identification of the restricted device and 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 identifier of the cloud restricted device, the security credential information of the cloud restricted device, and the user Logo.
  36. 根据权利要求30至35任一项所述的方法,其中,所述云端代理设备基于所述连接接收所述云端受限设备发送的第一资源发布请求消息之前,所述方法还包括:The method according to any one of claims 30 to 35, wherein before the cloud proxy device receives the first resource release request message sent by the cloud restricted device based on the connection, the method further comprises:
    所述云端代理设备接收所述云端受限设备发送的第一云端登陆请求消息,向所述云端设备发送第二云端登陆请求消息;The cloud proxy device receives a first cloud login request message sent by the cloud restricted device, and sends 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 the valid time of the 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 valid time of the access token.
  37. 根据权利要求36所述的方法,其中,所述第一云端登陆请求消息请求的资源为云端代理资源;所述第一云端登陆请求消息包括以下至少之一:代理云端登陆指示、所述云端受限设备的标识、所述云端受限设备的访问令牌;The method according to claim 36, wherein 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, the cloud acceptor The identification of the restricted device and 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.
  38. 根据权利要求25至37任一项所述的方法,其中,所述方法还包括:The method according to any one of claims 25 to 37, wherein the method further comprises:
    所述云端代理设备接收所述云端受限设备发送的第一更新令牌请求消息,向所述云端设备发送第二更新令牌请求消息;Receiving, by the cloud proxy device, a first update token request message sent by the cloud restricted device, and send a second update token request message to the cloud device;
    所述云端代理设备接收所述云端设备发送的第一更新令牌响应消息;所述第一更新令牌响应消息包括以下至少之一:新的访问令牌、更新令牌、所述新的访问令牌的有效时间;The cloud proxy device receives 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 new access The valid time of the 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, and the new The valid time of the access token.
  39. 根据权利要求38所述的方法,其中,所述第一更新令牌请求消息请求的资源为云端代理资源;The method according to claim 38, wherein 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, identification of the cloud restricted device, update token, and user identification;
    所述第二更新令牌请求消息请求的资源为更新令牌资源;所述第二更新令牌请求消息包括以下至少之一:所述云端受限设备的标识、更新令牌、用户标识。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.
  40. 根据权利要求25至33任一项所述的方法,其中,所述云端代理设备基于所述连接接收所述云端受限设备发送的第一资源发布请求消息之前,所述方法还包括:The method according to any one of claims 25 to 33, wherein before the cloud proxy device receives the first resource release request message sent by the cloud restricted device based on the connection, the method further comprises:
    所述云端代理设备接收所述云端受限设备发送的第一设备绑定请求消息;所述第一设备绑定请求消息请求的资源为云端代理资源;The cloud proxy device receives a first device binding request message sent by the cloud restricted device; 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 resource requested by the second device binding request message is a binding resource;
    所述云端代理设备接收所述云端设备发送的第一设备绑定响应消息;所述第一设备绑定响应消息包括用户标识;The cloud proxy device receives a 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 a second device binding response message to the cloud restricted device; the second device binding response message includes a user identifier.
  41. 根据权利要求40所述的方法,其中,所述第一设备绑定请求消息包括以下至少之一:代理设备绑定指示、所述云端受限设备的标识、所述云端受限设备的安全凭证;The method according to claim 40, wherein 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.
  42. 根据权利要求30所述的方法,其中,所述第一资源发布请求消息请求的资源为资源目录资源;所述第一资源发布请求消息包括以下至少之一:所述云端受限设备的标识、所述云端受限设备的第一资源链接;所述云端受限设备的第一资源链接中的资源的端点为所述云端受限设备的端点。The method according to claim 30, wherein 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: 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.
  43. 根据权利要求42所述的方法,其中,所述第一资源发布请求消息还包括以下至少之一:发布资源的有效时间、云端受限设备的指示。The method according to claim 42, wherein the first resource release request message further comprises at least one of the following: effective time of the released resource, and an indication of a cloud-restricted device.
  44. 根据权利要求34所述的方法,其中,所述第一云端注册请求消息请求的资源为账号资源;所述第一云端注册请求消息包括以下至少之一:所述云端受限设备的标识、所述访问令牌;The method according to claim 34, wherein 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: an identifier of the cloud restricted device, a 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.
  45. 根据权利要求36所述的方法,其中,所述第一云端登陆请求消息请求的资源为会话资源;所述第一云端登陆请求消息包括以下至少之一:云端登陆指示、所述云端受限设备的标识、所述云端受限设备的访问令牌、用户标识;The method according to claim 36, wherein 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, the cloud restricted device , The access token of the cloud restricted device, and the user identity;
    所述第二云端登陆请求消息请求的资源为会话资源;所述第二云端登陆请求消息包括以下至少之一:云端登陆指示、所述云端受限设备的标识、所述云端受限设备的访问令牌、用户标识。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.
  46. 根据权利要求38所述的方法,其中,所述第一更新令牌请求消息请求的资源为更新令牌资源;The method according to claim 38, wherein 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: an identifier of the cloud restricted device, an update token, and a user identifier;
    所述第二更新令牌请求消息请求的资源为更新令牌资源;所述第二更新令牌请求消息包括以下至少之一:所述云端受限设备的标识、更新令牌、用户标识。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.
  47. 一种资源发布方法,所述方法包括:A method for publishing resources, the method includes:
    云端设备获得云端代理设备发布的资源;所述资源为所述云端代理设备基于与云端受限设备之间的连接获得的所述云端受限设备的资源;The cloud device obtains the resource issued by the cloud proxy device; 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;
    所述云端设备公布所述资源。The cloud device publishes the resource.
  48. 根据权利要求47所述的方法,其中,所述云端设备接收云端代理设备发布的资源,包括:The method of claim 47, wherein the cloud device receiving resources issued by the cloud proxy device comprises:
    所述云端设备接收所述云端代理设备发送的第二资源发布请求消息;所述第二资源发布请求消息请求的资源为资源目录资源;所述第二资源发布请求消息包括以下至少之一:所述云端受限设备的标识、所述云端受限设备的第二资源链接;所述云端受限设备的第二资源链接中的资源的端点为所述云端代理设备的端点。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; the second resource release request message includes at least one of the following: The identifier of the cloud restricted device and 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.
  49. 根据权利要求48所述的方法,其中,所述第二资源发布请求消息中还包括以下至少之一:发布资源的有效时间、云端受限设备的指示。The method according to claim 48, wherein the second resource release request message further includes at least one of the following: effective time of the released resource, and an indication of a cloud-restricted device.
  50. 根据权利要求48或49所述的方法,其中,所述云端受限设备的第二资源链接中的目标标识包括目标资源的标识和所述云端受限设备的标识。The method according to claim 48 or 49, wherein 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.
  51. 根据权利要求47至50任一项所述的方法,其中,所述云端设备公布所述资源,包括:The method according to any one of claims 47 to 50, wherein the cloud device publishing the resource includes:
    所述云端设备将所述第二资源链接添加至资源目录中;其中,公布的资源的端点为所述云端设备的端点。The cloud device adds the second resource link to the resource catalog; wherein, the endpoint of the published resource is the endpoint of the cloud device.
  52. 根据权利要求51所述的方法,其中,所述云端设备将所述第二资源链接添加至资源目录中,包括:The method of claim 51, wherein the cloud device adding the second resource link to the resource catalog comprises:
    在所述第二资源发布请求消息中包括云端受限设备的指示的情况下,或者,在所述云端受限设备的第二资源链接中的目标标识包括目标资源的标识和所述云端受限设备的标识的情况下,公布的目标资源的标识与所述第二资源链接中的目标资源的标识相同。In the case that the second resource release request message includes an indication of the cloud-restricted device, or the target identifier in the second resource link of the cloud-restricted device includes the identifier of the target resource and the cloud-restricted device In the case of the identifier of the device, the published identifier of the target resource is the same as the identifier of the target resource in the second resource link.
  53. 根据权利要求47至52任一项所述的方法,其中,所述方法还包括:The method according to any one of claims 47 to 52, wherein the method further comprises:
    所述云端设备向所述云端代理设备发送第一资源发布响应消息。The cloud device sends a first resource release response message to the cloud proxy device.
  54. 根据权利要求47至53任一项所述的方法,其中,所述云端设备获得云端代理设备发布的资源之前,所述方法还包括:The method according to any one of claims 47 to 53, wherein before the cloud device obtains the resources issued by the cloud proxy device, the method further comprises:
    所述云端设备接收所述云端代理设备发送的第二云端注册请求消息;Receiving, by the cloud device, a second cloud registration request message sent by the cloud proxy device;
    所述云端设备为所述云端受限设备分配访问令牌,以及关联所述云端受限设备和用户标识;The cloud device allocates an access token to the cloud restricted device, 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 at least one of the following: the user identifier, the access token of the cloud restricted device, and the The valid duration of the access token, and the update token of the cloud restricted device.
  55. 根据权利要求54所述的方法,其中,所述第二云端注册请求消息请求的资源为账号资源;所述第二云端注册请求消息包括以下至少之一:所述云端受限设备的标识、所述云端受限设备的安全凭证信息、用户标识;The method according to claim 54, wherein 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, a The security credential information and user identification of the cloud restricted device;
    或者,所述第二云端注册请求消息请求的资源为账号资源;所述第二云端注册请求消息包括以下至少之一:所述云端受限设备的标识、所述访问令牌。Alternatively, 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.
  56. 根据权利要求47至55任一项所述的方法,其中,所述云端设备获得云端代理设备发布的资源之前,所述方法还包括:The method according to any one of claims 47 to 55, wherein before the cloud device obtains the resources released by the cloud proxy device, the method further comprises:
    所述云端设备接收所述云端代理设备发送的第二云端登陆请求消息;Receiving, by the cloud device, a second cloud login request message sent by the cloud proxy device;
    所述云端设备向所述云端代理设备发送第一云端登陆响应消息;所述第一云端登陆响应消息包括访问令牌的有效时间。The cloud device sends a first cloud login response message to the cloud proxy device; the first cloud login response message includes the valid time of the access token.
  57. 根据权利要求56所述的方法,其中,所述第二云端登陆请求消息请求的资源为会话资源;所述第二云端登陆请求消息包括以下至少之一:云端登陆指示、所述云端受限设备的标识、所述云端受限设备的访问令牌、用户标识。The method according to claim 56, wherein 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, the cloud restricted device , The access token of the cloud restricted device, and the user identity.
  58. 根据权利要求47至57任一项所述的方法,其中,所述方法还包括:The method according to any one of claims 47 to 57, wherein the method further comprises:
    所述云端设备接收所述云端代理设备发送的第二更新令牌请求消息;Receiving, by the cloud device, 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 message to the cloud proxy device; the first update token response message includes at least one of the following: new access token, update token , The valid time of the new access token.
  59. 根据权利要求58所述的方法,其中,所述第二更新令牌请求消息请求的资源为更新令牌资源;The method according to claim 58, wherein 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.
  60. 根据权利要求47至53任一项所述的方法,其中,所述云端设备获得云端代理设备发布的资源之前,所述方法还包括:The method according to any one of claims 47 to 53, wherein before the cloud device obtains the resources issued by the cloud proxy device, the method further comprises:
    所述云端设备接收所述云端代理设备发送的第二设备绑定请求消息;所述第二设备绑定请求消息请求的资源为绑定资源;所述第二设备绑定请求消息包括以下至少之一:所述云端受限设备的标识、所述云端受限设备的安全凭证、安全标识;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 binding request message includes at least one of the following One: the identifier of the cloud-restricted device, the security credential, and the security identifier of the cloud-restricted device;
    所述云端设备关联所述云端受限设备和用户标识,向所述云端代理设备发送第一设备绑定响应消息;所述第一设备绑定响应消息包括用户标识。The cloud device associates the cloud restricted device with the user identifier, and sends a first device binding response message to the cloud proxy device; the first device binding response message includes the user identifier.
  61. 根据权利要求60所述的方法,其中,所述方法还包括:所述云端设备关联所述云端受限设备和所述云端代理设备的访问令牌。The method according to claim 60, wherein the method further comprises: the cloud device associating an access token of the cloud restricted device and the cloud proxy device.
  62. 一种云端受限设备,所述设备包括:第一连接建立单元和第一传输单元;其中,A cloud-restricted device, the device comprising: 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.
  63. 根据权利要求62所述的设备,其中,所述第一连接建立单元,配置为获得云端代理设备的信息,基于所述信息建立与云端代理设备的连接。The device according to claim 62, wherein the first connection establishment unit is configured to obtain information of the cloud proxy device, and establish a connection with the cloud proxy device based on the information.
  64. 根据权利要求63所述的设备,其中,所述第一连接建立单元,配置为接收配置器发送的配置信息,所述配置信息中包括云端代理设备的信息。The device according to claim 63, wherein the first connection establishment unit is configured to receive configuration information sent by the configurator, and the configuration information includes information of the cloud proxy device.
  65. 根据权利要求63所述的设备,其中,所述第一连接建立单元,配置为通过广播或组播的方式发送发现请求消息;所述发现请求消息中包括云端代理资源类型;接收发现响应消息;所述发现响应消息包括所述云端代理设备的信息。The device according to claim 63, wherein the first connection establishment unit is configured to send a discovery request message in a broadcast or multicast manner; the discovery request message includes a cloud proxy resource type; and the discovery response message is received; The discovery response message includes the information of the cloud proxy device.
  66. 根据权利要求63至65任一项所述的设备,其中,所述云端代理设备的信息包括以下至少之一:云端代理设备的云端代理资源标识、云端代理资源的端点信息。The device according to any one of claims 63 to 65, wherein 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.
  67. 根据权利要求62所述的设备,其中,所述第一传输单元,配置为基于所述连接指示所述云端代理设备向云端设备发布资源。The device according to claim 62, wherein the first transmission unit is configured to instruct the cloud proxy device to release resources to the cloud device based on the connection.
  68. 根据权利要求67所述的设备,其中,所述第一传输单元,配置为向所述云端代理设备发送第一资源发布请求消息,第一资源发布请求消息用于指示所述云端代理设备向云端设备发布资源。The device according to claim 67, wherein the first transmission unit 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 send a request to the cloud The device publishes resources.
  69. 根据权利要求68所述的设备,其中,所述第一资源发布请求消息请求的资源为云端代理资源;The device according to claim 68, wherein the resource requested by the first resource release request message is a cloud proxy resource;
    所述第一资源发布请求消息包括以下至少之一:代理发布资源指示、所述云端受限设备的标识、所述云端受限设备的第一资源链接;The first resource release request message includes at least one of the following: an agent release resource indication, an identifier of the cloud restricted device, and a 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.
  70. 根据权利要求69所述的设备,其中,所述第一资源发布请求消息还包括以下至少之一:发布资源的有效时间、云端受限设备的指示。The device according to claim 69, wherein the first resource release request message further includes at least one of the following: effective time of the released resource, and an indication of a cloud-restricted device.
  71. 根据权利要求68至70任一项所述的设备,其中,所述第一传输单元,还配置为接收所述云端代理设备发送的第二资源发布响应消息。The device according to any one of claims 68 to 70, wherein the first transmission unit is further configured to receive a second resource release response message sent by the cloud proxy device.
  72. 根据权利要求68至71任一项所述的设备,其中,所述第一传输单元,还配置为向所述云端代理设备发送第一资源发布请求消息之前,向所述云端代理设备发送第一云端注册请求消息;接收所述云端代理设备发送的第二云端注册响应消息;所述第二云端注册响应消息包括以下至少之一:所述用户标识、所述云端受限设备的访问令牌、所述访问令牌的有效时长、所述云端受限设备的更新令牌。The device according to any one of claims 68 to 71, wherein the first transmission unit is further configured to send a first resource release request message to the cloud proxy device before sending a first resource release request message to the cloud proxy device. Cloud registration request 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 ID, the access token of the cloud restricted device, The valid duration of the access token and the update token of the cloud restricted device.
  73. 根据权利要求72所述的设备,其中,所述第一云端注册请求消息请求的资源为云端代理资源;The device according to claim 72, wherein 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: a proxy cloud registration instruction, an identifier of the cloud restricted device, and security credential information of the cloud restricted device.
  74. 根据权利要求68至73任一项所述的设备,其中,所述第一传输单元,还配置为向所述云端代理设备发送第一资源发布请求消息之前,向所述云端代理设备发送第一云端登陆请求消息;接收所述云端代理设备发送的第二云端登陆响应消息;所述第二云端登陆响应消息包括访问令牌的有效时间。The device according to any one of claims 68 to 73, wherein the first transmission unit is further configured to send a first resource release request message to the cloud proxy device before sending a first resource release request message to the cloud proxy device. Cloud login request 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.
  75. 根据权利要求74所述的设备,其中,所述第一云端登陆请求消息请求的资源为云端代理资源;The device according to claim 74, wherein 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: a proxy cloud login instruction, an identifier of the cloud restricted device, and an access token of the cloud restricted device.
  76. 根据权利要求62至75任一项所述的设备,其中,所述第一传输单元,还配置为向所述云端代理设备发送第一更新令牌请求消息;接收所述云端代理设备发送的第二更新令牌响应消息;所述第二更新令牌响应消息包括以下至少之一:新的访问令牌、更新令牌、所述新的访问令牌的有效时间。The device according to any one of claims 62 to 75, wherein the first transmission unit is further configured to send a first update token request message to the cloud proxy device; receive the first update token request message sent by the cloud proxy device 2. An update token 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.
  77. 根据权利要求76所述的设备,其中,所述第一更新令牌请求消息请求的资源为云端代理资源;所述第一更新令牌请求消息包括以下至少之一:代理更新令牌指示、所述云端受限设备的标识、更新令牌、用户标识。The device according to claim 76, wherein 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 identification, update token, and user identification of the cloud restricted device.
  78. 根据权利要求62至71任一项所述的设备,其中,所述第一传输单元,还配置为向所述云端代理设备发送第一资源发布请求消息之前,向所述云端代理设备发送第一设备绑定请求消息;所述第一设备绑定请求消息请求的资源为云端代理资源;接收所述云端代理设备发送的第二设备绑定响应消息。The device according to any one of claims 62 to 71, wherein the first transmission unit is further configured to send a first resource release request message to the cloud proxy device before sending a first resource release request message to the cloud proxy device. A device binding request message; the resource requested by the first device binding request message is a cloud proxy resource; and a second device binding response message sent by the cloud proxy device is received.
  79. 根据权利要求78所述的设备,其中,所述第一设备绑定请求消息包括以下至少之一:代理设备绑定指示、所述云端受限设备的标识、所述云端受限设备的安全凭证;The device according to claim 78, wherein the first device binding request message comprises 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.
  80. 根据权利要求68所述的设备,其中,所述第一资源发布请求消息请求的资源为资源目录资源;The device according to claim 68, wherein the resource requested by the first resource release request message is a resource directory resource;
    所述第一资源发布请求消息包括以下至少之一:所述云端受限设备的标识、所述云端受限设备的第一资源链接;The first resource release request message includes at least one of the following: an identifier of the cloud restricted device, and a 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.
  81. 根据权利要求80所述的设备,其中,所述第一资源发布请求消息还包括以下至少之一:发布资源的有效时间、云端受限设备的指示。The device according to claim 80, wherein the first resource release request message further comprises at least one of the following: effective time of the released resource and an indication of a cloud-restricted device.
  82. 根据权利要求72所述的设备,其中,所述第一传输单元,还配置为获得配置器发送的访问令牌。The device according to claim 72, wherein the first transmission unit is further configured to obtain the access token sent by the configurator.
  83. 根据权利要求82所述的设备,其中,所述第一云端注册请求消息请求的资源为账号资源;The device according to claim 82, wherein 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.
  84. 根据权利要求74所述的设备,其中,所述第一云端登陆请求消息请求的资源为会话资源;The device according to claim 74, wherein 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, an access token of the cloud restricted device, and a user identifier.
  85. 根据权利要求76所述的设备,其中,所述第一更新令牌请求消息请求的资源为更新令牌资源;所述第一更新令牌请求消息包括以下至少之一:所述云端受限设备的标识、更新令牌、用户标识。The device according to claim 76, wherein 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 cloud restricted device ID, update token, user ID.
  86. 一种云端代理设备,所述云端代理设备包括:第二连接建立单元、第二传输单元和第三传输单元;其中,A 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.
  87. 根据权利要求86所述的设备,其中,所述第二连接建立单元,配置为向所述云端受限设备发送所述云端代理设备的信息,所述云端代理设备的信息用于所述云端受限设备建立于所述云端代理设备的连接。The device according to claim 86, wherein the second connection establishment unit 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 receiving device. Only the device establishes a connection with the cloud proxy device.
  88. 根据权利要求87所述的设备,其中,所述第二连接建立单元,配置为接收所述云端受限设备通过广播或组播的方式发送的发现请求消息;所述发现请求消息中包括云端代理资源类型;向所述云端受限设备发送发现响应消息;所述发现响应消息包括所述云端代理设备的信息。The device according to claim 87, wherein the second connection establishment unit is configured to receive a discovery request message sent by the cloud restricted device in a broadcast or multicast manner; the discovery request message includes a cloud proxy Resource type; sending a discovery response message to the cloud restricted device; the discovery response message includes information of the cloud proxy device.
  89. 根据权利要求87或88所述的设备,其中,所述云端代理设备的信息包括以下至少之一:云端代理设备的云端代理资源标识、云端代理资源的端点信息。The device according to claim 87 or 88, wherein 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.
  90. 根据权利要求86所述的设备,其中,所述第二传输单元,配置为基于所述连接获得所述云端受限设备的指示;The device according to claim 86, wherein the second transmission unit is configured to obtain an indication of the cloud restricted device based on the connection;
    所述第三传输单元,配置为基于所述第二传输单元获得的所述指示向云端设备发布资源。The third transmission unit is configured to release resources to the cloud device based on the instruction obtained by the second transmission unit.
  91. 根据权利要求90所述的设备,其中,所述第二传输单元,配置为基于所述连接接收所述云端受限设备发送的第一资源发布请求消息,第一资源发布请求消息用于指示所述云端代理设备向云端设备发布资源;The device according to claim 90, wherein the second transmission unit is configured to receive a first resource release request message sent by the cloud-limited device based on the connection, and the first resource release request message is used to indicate The cloud proxy device releases resources to the cloud device;
    所述第三传输单元,配置为向云端设备发送第二资源发布请求消息;所述第二资源发布请求消息请求的资源为资源目录资源;所述第二资源发布请求消息包括以下至少之一:所述云端受限设备的标识、所述云端受限设备的第二资源链接;所述云端受限设备的第二资源链接中的资源的端点为所述云端代理设备的端点;还配置为获得所述云端设备发送的第一资源发布响应消息;The third transmission unit is configured to send a second resource publishing request message to a 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 obtain The first resource release response message sent by the cloud device;
    所述第二传输单元,还配置为向所述云端受限设备发送第二资源发布响应消息。The second transmission unit is further configured to send a second resource release response message to the cloud restricted device.
  92. 根据权利要求91所述的设备,其中,所述第一资源发布请求消息请求的资源为云端代理资源;所述第一资源发布请求消息包括以下至少之一:代理发布资源指示、所述云端受限设备的标识、所述云端受限设备的第一资源链接;所述云端受限设备的第一资源链接中的资源的端点为所述云端受限设备的端点。The device according to claim 91, wherein 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, the cloud receiving The identifier of the restricted device and 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.
  93. 根据权利要求92所述的设备,其中,所述第一资源发布请求消息还包括以下至少之一:发布资源的有效时间、云端受限设备的指示;The device according to claim 92, wherein the first resource release request message further comprises 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 also includes at least one of the following: the effective time of the released resource, and an indication of the cloud restricted device.
  94. 根据权利要求91至93任一项所述的设备,其中,所述云端受限设备的第二资源链接中的目标标识包括目标资源的标识和所述云端受限设备的标识。The device according to any one of claims 91 to 93, wherein 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.
  95. 根据权利要求91至94任一项所述的设备,其中,所述第二传输单元,还配置为基于所述连接接收所述云端受限设备发送的第一资源发布请求消息之前,接收所述云端受限设备发送的第一云端注册请求消息;The device according to any one of claims 91 to 94, wherein the second transmission unit is further configured to receive the first resource release request message sent by the cloud restricted device based on the connection The first cloud registration request message sent by the cloud restricted device;
    所述第三传输单元,还配置为向所述云端设备发送第二云端注册请求消息;接收所述云端设备发送的第一云端注册响应消息;所述第一云端注册响应消息包括以下至少之一:所述用户标识、所述云端受限设备的访问令牌、所述访问令牌的有效时长、所述云端受限设备的更新令牌;The third transmission unit 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 : 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 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 identifier, 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.
  96. 根据权利要求95所述的设备,其中,所述第一云端注册请求消息请求的资源为云端代理资源;所述第一云端注册请求消息包括以下至少之一:代理云端注册指示、所述云端受限设备的标识、所述云端受限设备的安全凭证信息;The device according to claim 95, wherein 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: a proxy cloud registration instruction, the cloud acceptor The identification of the restricted device and 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 identifier of the cloud restricted device, the security credential information of the cloud restricted device, and the user Logo.
  97. 根据权利要求91至96任一项所述的设备,其中,所述第二传输单元,还配置为基于所述连接接收所述云端受限设备发送的第一资源发布请求消息之前,接收所述云端受限设备发送的第一云端登陆请求消息;The device according to any one of claims 91 to 96, wherein the second transmission unit is further configured to receive the first resource release request message sent by the cloud restricted device based on the connection The first cloud login request message sent by the cloud restricted device;
    所述第三传输单元,还配置为向所述云端设备发送第二云端登陆请求消息;接收所述云端设备发送的第一云端登陆响应消息;所述第一云端登陆响应消息包括访问令牌的有效时间;The third transmission unit 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 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.
  98. 根据权利要求97所述的设备,其中,所述第一云端登陆请求消息请求的资源为云端代理资源;所述第一云端登陆请求消息包括以下至少之一:代理云端登陆指示、所述云端受限设备的标识、所述云端受限设备的访问令牌;The device according to claim 97, wherein 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, the cloud acceptor The identification of the restricted device and 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.
  99. 根据权利要求86至98任一项所述的设备,其中,所述第二传输单元,还配置为接收所述云端受限设备发送的第一更新令牌请求消息;The device according to any one of claims 86 to 98, wherein the second transmission unit is further configured to receive a first update token request message sent by the cloud restricted device;
    所述第三传输单元,还配置为向所述云端设备发送第二更新令牌请求消息;接收所述云端设备发送的第一更新令牌响应消息;所述第一更新令牌响应消息包括以下至少之一:新的访问令牌、更新令牌、所述新的访问令牌的有效时间;The third transmission unit 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 the following At least one of: a new access token, an update token, and the validity time of the new access token;
    所述第二传输单元,还配置为向所述云端受限设备发送第二更新令牌响应消息;所述第二更新令牌响应消息包括以下至少之一:新的访问令牌、更新令牌、所述新的访问令牌的有效时间。The second transmission unit 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 token , The valid time of the new access token.
  100. 根据权利要求99所述的设备,其中,所述第一更新令牌请求消息请求的资源为云端代理资源;所述第一更新令牌请求消息包括以下至少之一:代理更新令牌指示、所述云端受限设备的标识、更新令牌、用户标识;The device according to claim 99, wherein 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 identification, update token, and user identification of the cloud restricted device;
    所述第二更新令牌请求消息请求的资源为更新令牌资源;所述第二更新令牌请求消息包括以下至少之一:所述云端受限设备的标识、更新令牌、用户标识。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.
  101. 根据权利要求86至94任一项所述的设备,其中,所述第二传输单元,还配置为基于所述连接接收所述云端受限设备发送的第一资源发布请求消息之前,接收所述云端受限设备发送的第一 设备绑定请求消息;所述第一设备绑定请求消息请求的资源为云端代理资源;The device according to any one of claims 86 to 94, wherein the second transmission unit is further configured to receive the first resource release request message sent by the cloud restricted device based on the connection A first device binding request message sent by a cloud restricted device; the resource requested by the first device binding request message is a cloud proxy resource;
    所述第三传输单元,还配置为向所述云端设备发送第二设备绑定请求消息;所述第二设备绑定请求消息请求的资源为绑定资源;接收所述云端设备发送的第一设备绑定响应消息;所述第一设备绑定响应消息包括用户标识;The third transmission unit 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 binding request message sent by the cloud device. A device binding response message; the first device binding response message includes a user identification;
    所述第二传输单元,还配置为向所述云端受限设备发送第二设备绑定响应消息;所述第二设备绑定响应消息包括用户标识。The second transmission unit 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.
  102. 根据权利要求101所述的设备,其中,所述第一设备绑定请求消息包括以下至少之一:代理设备绑定指示、所述云端受限设备的标识、所述云端受限设备的安全凭证;The device according to claim 101, wherein the first device binding request message comprises 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.
  103. 根据权利要求91所述的设备,其中,所述第一资源发布请求消息请求的资源为资源目录资源;所述第一资源发布请求消息包括以下至少之一:所述云端受限设备的标识、所述云端受限设备的第一资源链接;所述云端受限设备的第一资源链接中的资源的端点为所述云端受限设备的端点。The device according to claim 91, wherein the resource requested by the first resource release request message is a resource catalog resource; and the first resource release request message includes at least one of the following: 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.
  104. 根据权利要求103所述的设备,其中,所述第一资源发布请求消息还包括以下至少之一:发布资源的有效时间、云端受限设备的指示。The device according to claim 103, wherein the first resource release request message further comprises at least one of the following: effective time of the released resource, and an indication of a cloud-restricted device.
  105. 根据权利要求95所述的设备,其中,所述第一云端注册请求消息请求的资源为账号资源;所述第一云端注册请求消息包括以下至少之一:所述云端受限设备的标识、所述访问令牌;The device according to claim 95, wherein 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: an identifier of the cloud restricted device, a 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.
  106. 根据权利要求97所述的设备,其中,所述第一云端登陆请求消息请求的资源为会话资源;所述第一云端登陆请求消息包括以下至少之一:云端登陆指示、所述云端受限设备的标识、所述云端受限设备的访问令牌、用户标识;The device according to claim 97, wherein 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, the cloud restricted device , The access token of the cloud restricted device, and the user identity;
    所述第二云端登陆请求消息请求的资源为会话资源;所述第二云端登陆请求消息包括以下至少之一:云端登陆指示、所述云端受限设备的标识、所述云端受限设备的访问令牌、用户标识。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.
  107. 根据权利要求99所述的设备,其中,所述第一更新令牌请求消息请求的资源为更新令牌资源;所述第一更新令牌请求消息包括以下至少之一:所述云端受限设备的标识、更新令牌、用户标识;The device according to claim 99, wherein 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 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.
  108. 一种云端设备,所述云端设备包括第四传输单元和公布单元;其中,A 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.
  109. 根据权利要求108所述的设备,其中,所述第四传输单元,配置为接收所述云端代理设备发送的第二资源发布请求消息;所述第二资源发布请求消息请求的资源为资源目录资源;所述第二资源发布请求消息包括以下至少之一:所述云端受限设备的标识、所述云端受限设备的第二资源链接;所述云端受限设备的第二资源链接中的资源的端点为所述云端代理设备的端点。The device according to claim 108, wherein the fourth transmission unit is configured to receive a second resource publication request message sent by the cloud proxy device; the resource requested by the second resource publication 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 resource in the second resource link of the cloud restricted device The endpoint of is the endpoint of the cloud proxy device.
  110. 根据权利要求109所述的设备,其中,所述第二资源发布请求消息中还包括以下至少之一:发布资源的有效时间、云端受限设备的指示。The device according to claim 109, wherein 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.
  111. 根据权利要求109或110所述的设备,其中,所述云端受限设备的第二资源链接中的目标标识包括目标资源的标识和所述云端受限设备的标识。The device according to claim 109 or 110, wherein 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.
  112. 根据权利要求108至111任一项所述的设备,其中,所述公布单元,配置为将所述第二资源链接添加至资源目录中;其中,公布的资源的端点为所述云端设备的端点。The device according to any one of claims 108 to 111, wherein the publishing unit 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 .
  113. 根据权利要求112所述的设备,其中,所述公布单元,还配置为在所述第二资源发布请求消息中包括云端受限设备的指示的情况下,或者,在所述云端受限设备的第二资源链接中的目标标识包括目标资源的标识和所述云端受限设备的标识的情况下,公布的目标资源的标识与所述第二资源链接中的目标资源的标识相同。The device according to claim 112, wherein the publishing unit is further configured to, when the second resource publishing request message includes an indication of a cloud-restricted device, or, when the cloud-restricted device is In the case that the target identifier in the second resource link 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.
  114. 根据权利要求108至113任一项所述的设备,其中,所述第四传输单元,还配置为向所述云端代理设备发送第一资源发布响应消息。The device according to any one of claims 108 to 113, wherein the fourth transmission unit is further configured to send a first resource release response message to the cloud proxy device.
  115. 根据权利要求108至114任一项所述的设备,其中,所述设备还包括注册单元;The device according to any one of claims 108 to 114, wherein the device further comprises a registration unit;
    所述第四传输单元,还配置为获得云端代理设备发布的资源之前,接收所述云端代理设备发送 的第二云端注册请求消息;The fourth transmission unit 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 is configured to allocate an access token to the cloud restricted device, and associate the cloud restricted device with a user identity;
    所述第四传输单元,还配置为向所述云端代理设备发送第一云端注册响应消息;所述第一云端注册响应消息包括以下至少之一:所述用户标识、所述云端受限设备的访问令牌、所述访问令牌的有效时长、所述云端受限设备的更新令牌。The fourth transmission unit 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, the valid duration of the access token, and the update token of the cloud restricted device.
  116. 根据权利要求115所述的设备,其中,所述第二云端注册请求消息请求的资源为账号资源;所述第二云端注册请求消息包括以下至少之一:所述云端受限设备的标识、所述云端受限设备的安全凭证信息、用户标识;The device according to claim 115, wherein 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, a The security credential information and user identification of the cloud restricted device;
    或者,所述第二云端注册请求消息请求的资源为账号资源;所述第二云端注册请求消息包括以下至少之一:所述云端受限设备的标识、所述访问令牌。Alternatively, 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.
  117. 根据权利要求108至116任一项所述的设备,其中,所述第四传输单元,还配置为获得云端代理设备发布的资源之前,接收所述云端代理设备发送的第二云端登陆请求消息;向所述云端代理设备发送第一云端登陆响应消息;所述第一云端登陆响应消息包括访问令牌的有效时间。The device according to any one of claims 108 to 116, wherein the fourth transmission unit 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; Send a first cloud login response message to the cloud proxy device; the first cloud login response message includes the valid time of the access token.
  118. 根据权利要求117所述的设备,其中,所述第二云端登陆请求消息请求的资源为会话资源;所述第二云端登陆请求消息包括以下至少之一:云端登陆指示、所述云端受限设备的标识、所述云端受限设备的访问令牌、用户标识。The device according to claim 117, wherein 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, the cloud restricted device , The access token of the cloud restricted device, and the user identity.
  119. 根据权利要求108至118任一项所述的设备,其中,所述设备还包括更新单元;The device according to any one of claims 108 to 118, wherein the device further comprises an update unit;
    所述第四传输单元,还配置为接收所述云端代理设备发送的第二更新令牌请求消息;The fourth transmission unit is further configured to receive a second update token request message sent by the cloud proxy device;
    所述更新单元,配置为更新新的访问令牌;The update unit is configured to update a new access token;
    所述第四传输单元,还配置为向所述云端代理设备发送第一更新令牌响应消息;所述第一更新令牌响应消息包括以下至少之一:新的访问令牌、更新令牌、所述新的访问令牌的有效时间。The fourth transmission unit 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.
  120. 根据权利要求119所述的设备,其中,所述第二更新令牌请求消息请求的资源为更新令牌资源;所述第二更新令牌请求消息包括以下至少之一:所述云端受限设备的标识、更新令牌、用户标识。The device according to claim 119, wherein 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 cloud restricted device ID, update token, user ID.
  121. 根据权利要求108至114任一项所述的设备,其中,所述设备还包括绑定单元;The device according to any one of claims 108 to 114, wherein the device further comprises a binding unit;
    所述第四传输单元,还配置为获得云端代理设备发布的资源之前,接收所述云端代理设备发送的第二设备绑定请求消息;所述第二设备绑定请求消息请求的资源为绑定资源;所述第二设备绑定请求消息包括以下至少之一:所述云端受限设备的标识、所述云端受限设备的安全凭证、安全标识;The fourth transmission unit 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 Resource; the second device binding request message includes at least one of the following: the identifier of the cloud restricted device, the security credential, and the security identifier of the cloud restricted device;
    所述绑定单元,配置为关联所述云端受限设备和用户标识;The binding unit is configured to associate the cloud restricted device with a user identity;
    所述第四传输单元,还配置为向所述云端代理设备发送第一设备绑定响应消息;所述第一设备绑定响应消息包括用户标识。The fourth transmission unit 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.
  122. 根据权利要求121所述的设备,其中,所述绑定单元,还配置为关联所述云端受限设备和所述云端代理设备的访问令牌。The device according to claim 121, wherein the binding unit is further configured to associate an access token of the cloud restricted device and the cloud proxy device.
  123. 一种设备,包括:处理器和存储器,该存储器用于存储计算机程序,所述处理器用于调用并运行所述存储器中存储的计算机程序,执行如权利要求1至24中任一项所述的方法;或者,执行如权利要求25至46中任一项所述的方法;或者,执行如权利要求47至61中任一项所述的方法。A device comprising: 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, and execute the computer program according to any one of claims 1 to 24 Method; or, execute the method according to any one of claims 25 to 46; or, execute the method according to any one of claims 47 to 61.
  124. 一种芯片,包括:处理器,用于从存储器中调用并运行计算机程序,使得安装有所述芯片的设备执行如权利要求1至24中任一项所述的方法;或者,使得安装有所述芯片的设备执行如权利要求25至46中任一项所述的方法;使得安装有所述芯片的设备执行如权利要求47至61中任一项所述的方法。A chip comprising: a processor, configured to call and run a computer program from a memory, so that the device installed with the chip executes the method according to any one of claims 1 to 24; or, makes the installation The chip-based device executes the method according to any one of claims 25 to 46; the chip-mounted device executes the method according to any one of claims 47-61.
  125. 一种计算机可读存储介质,用于存储计算机程序,所述计算机程序使得计算机执行如权利要求1至24中任一项所述的方法;或者,所述计算机程序使得计算机执行如权利要求25至46中任一项所述的方法;或者,所述计算机程序使得计算机执行如权利要求47至61中任一项所述的方法。A computer-readable storage medium for storing a computer program that enables the computer to execute the method according to any one of claims 1 to 24; or, the computer program causes the computer to execute the method according to claims 25 to The method according to any one of 46; or, the computer program causes a computer to execute the method according to any one of claims 47 to 61.
  126. 一种计算机程序产品,包括计算机程序指令,该计算机程序指令使得计算机执行如权利要求1至24中任一项所述的方法;或者,使得计算机执行如权利要求25至46中任一项所述的方法;或者,使得计算机执行如权利要求47至61中任一项所述的方法。A computer program product comprising computer program instructions that cause a computer to execute the method according to any one of claims 1 to 24; or, to cause the computer to execute any one of claims 25 to 46 Or, make a computer execute the method according to any one of claims 47 to 61.
  127. 一种计算机程序,所述计算机程序使得计算机执行如权利要求1至24中任一项所述的方法;或者,所述计算机程序使得计算机执行如权利要求25至46中任一项所述的方法;或者,所述计算机程序使得计算机执行如权利要求47至61中任一项所述的方法。A computer program that causes a computer to execute the method according to any one of claims 1 to 24; or, the computer program causes a computer to execute the method according to any one of claims 25 to 46 Or, the computer program causes the computer to execute the method according to any one of claims 47 to 61.
PCT/CN2019/097581 2019-07-24 2019-07-24 Resource publishing method and device WO2021012236A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201980092309.9A CN113439427B (en) 2019-07-24 2019-07-24 Resource release method and device
PCT/CN2019/097581 WO2021012236A1 (en) 2019-07-24 2019-07-24 Resource publishing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/097581 WO2021012236A1 (en) 2019-07-24 2019-07-24 Resource publishing method and device

Publications (1)

Publication Number Publication Date
WO2021012236A1 true WO2021012236A1 (en) 2021-01-28

Family

ID=74192487

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/097581 WO2021012236A1 (en) 2019-07-24 2019-07-24 Resource publishing method and device

Country Status (2)

Country Link
CN (1) CN113439427B (en)
WO (1) WO2021012236A1 (en)

Citations (6)

* Cited by examiner, † Cited by third party
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 (en) * 2018-09-30 2019-03-08 青岛海尔科技有限公司 A kind of selection method of Resource TOC, device, system and storage medium
CN109547524A (en) * 2018-09-30 2019-03-29 青岛海尔科技有限公司 User behavior storage method, device, equipment and storage medium based on Physical Network
WO2019112734A1 (en) * 2017-12-06 2019-06-13 Intel Corporation Plugin management for internet of things (iot) network optimization
CN110036619A (en) * 2016-12-27 2019-07-19 英特尔Ip公司 Frame for IOT protocol-identifier and management

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001072009A2 (en) * 2000-03-17 2001-09-27 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 (en) * 2017-08-23 2018-04-05 서울과학기술대학교 산학협력단 Resource discovery method and system for sensor node in the constrained network
CN109743705A (en) * 2019-01-25 2019-05-10 欧普照明股份有限公司 A kind of combination method and system of wearable device and Mesh network

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110036619A (en) * 2016-12-27 2019-07-19 英特尔Ip公司 Frame for IOT protocol-identifier and management
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 (en) * 2018-09-30 2019-03-08 青岛海尔科技有限公司 A kind of selection method of Resource TOC, device, system and storage medium
CN109547524A (en) * 2018-09-30 2019-03-29 青岛海尔科技有限公司 User behavior storage method, device, equipment and storage medium based on Physical Network

Also Published As

Publication number Publication date
CN113439427B (en) 2023-10-27
CN113439427A (en) 2021-09-24

Similar Documents

Publication Publication Date Title
AU2021277736B2 (en) Pdu type setting method, ue policy setting method, and related entity
WO2018205150A1 (en) Network slice selection policy updating method and apparatus
US20190007921A1 (en) Pdu session management
US20200296142A1 (en) User Group Establishment Method and Apparatus
WO2021072749A1 (en) Device permission control method, device, and storage medium
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 (en) Data transmission method and apparatus
WO2020042848A1 (en) Network slice management method and apparatus
WO2017167027A1 (en) Network access method, and associated equipment and system
US20230232196A1 (en) Data communication method and communication apparatus
JP2023552243A (en) Method and device for transmitting user identifiers
WO2021142849A1 (en) Method and apparatus for configuring, discovering and joining security domain, and electronic device
WO2013185696A2 (en) Data processing method and device
CN110278558B (en) Message interaction method and WLAN system
CN113243097B (en) Equipment binding method, cloud server and first equipment
CN110535746B (en) Virtual private network VPN sharing method and device, electronic equipment and storage medium
WO2021012236A1 (en) Resource publishing method and device
US11765226B2 (en) Method for provisioning internet of things device and internet of things device
EP4199475A1 (en) Data offloading method and device
WO2018082574A1 (en) Information sending method, unit and system
CN115734173A (en) Method and apparatus for inter-device communication
WO2017091949A1 (en) Communication method, small cell base station, small cell base station controller, terminal and system
US20200137726A1 (en) Communications device and communication method

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