WO2021012235A1 - 一种影子设备的生成方法、设备及存储介质 - Google Patents

一种影子设备的生成方法、设备及存储介质 Download PDF

Info

Publication number
WO2021012235A1
WO2021012235A1 PCT/CN2019/097580 CN2019097580W WO2021012235A1 WO 2021012235 A1 WO2021012235 A1 WO 2021012235A1 CN 2019097580 W CN2019097580 W CN 2019097580W WO 2021012235 A1 WO2021012235 A1 WO 2021012235A1
Authority
WO
WIPO (PCT)
Prior art keywords
shadow
resource
server
cloud
cloud proxy
Prior art date
Application number
PCT/CN2019/097580
Other languages
English (en)
French (fr)
Inventor
张军
Original Assignee
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Priority to PCT/CN2019/097580 priority Critical patent/WO2021012235A1/zh
Priority to CN201980092672.0A priority patent/CN113454966B/zh
Publication of WO2021012235A1 publication Critical patent/WO2021012235A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols

Definitions

  • the present invention relates to the field of information processing technology, in particular to a method, device and storage medium for generating shadow devices.
  • a shadow device is generated for the Open Connectivity Foundation (OCF) server device, and the shadow device communicates with the OCF client device remotely to improve communication processing efficiency.
  • OCF server device is required to have the ability to establish and maintain a transport layer security (TLS) long connection with the cloud server.
  • TLS transport layer security
  • shadow devices cannot be generated on the cloud server.
  • embodiments of the present invention provide a shadow device generation method, device, and storage medium, which can generate shadow devices on cloud servers for cloud-constrained devices.
  • an embodiment of the present invention provides a method for generating a shadow device, including: a cloud proxy device receives a first request message; the cloud proxy device generates a first shadow device of a server device based on the first request message .
  • an embodiment of the present invention provides a method for generating a shadow device, including: a server device sends a first request message to a cloud proxy device, and the first request message is used to request the cloud proxy device to generate the service The first shadow device of the end device; the server device receives the first request response message.
  • an embodiment of the present invention provides a method for generating a shadow device, including: a cloud server receives a second request message; the cloud server generates a first shadow device for the first shadow device of the server device based on the second request message. Two shadow devices.
  • an embodiment of the present invention provides a method for generating a shadow device, which includes: a configurator sends a first request message to a cloud proxy device, and the first request message is used to request the cloud proxy device to generate a server device The first shadow device; the configurator receives the first request response message.
  • an embodiment of the present invention provides a cloud proxy device, and the cloud proxy device includes:
  • the first receiving unit is configured to receive the first request message
  • the first processing unit is configured to generate a first shadow device of the server device based on the first request message.
  • an embodiment of the present invention provides a server device, and the server device includes:
  • the sixth sending unit is configured to send a first request message to the cloud proxy device, where the first request message is used to request the cloud proxy device to generate the first shadow device of the server device;
  • the second receiving unit is configured to receive the first request response message.
  • an embodiment of the present invention provides a cloud server, and the cloud server includes:
  • the third receiving unit is configured to receive the second request message
  • the fourth processing unit is configured to generate a second shadow device for the first shadow device of the server device based on the second request message.
  • an embodiment of the present invention provides a configurator, and the configurator includes:
  • An eighth sending unit configured to send a first request message to the cloud proxy device, where the first request message is used to request the cloud proxy device to generate the first shadow device of the server device;
  • the fourth receiving unit is configured to receive the first request response message.
  • an embodiment of the present invention provides a cloud proxy device, including a processor and a memory for storing a computer program that can run on the processor, wherein the processor is configured to execute the above-mentioned computer program when the computer program is running.
  • the steps of the shadow device generation method executed by the cloud proxy device are not limited to a processor and a memory for storing a computer program that can run on the processor, wherein the processor is configured to execute the above-mentioned computer program when the computer program is running.
  • an embodiment of the present invention provides a server device, including a processor and a memory for storing a computer program that can run on the processor, wherein the processor is used to execute the computer program when the computer program is running.
  • the steps of the shadow device generation method executed by the server device are not limited to a processor and a memory for storing a computer program that can run on the processor, wherein the processor is used to execute the computer program when the computer program is running. The steps of the shadow device generation method executed by the server device.
  • an embodiment of the present invention provides a cloud server, including a processor and a memory for storing a computer program that can run on the processor, wherein the processor is configured to execute the above The steps of the shadow device generation method executed by the cloud server.
  • an embodiment of the present invention provides a configurator, including a processor and a memory for storing a computer program that can run on the processor, where the processor is used to run the computer program to execute the above The steps of the shadow device generation method performed by the configurator.
  • an embodiment of the present invention provides a storage medium that stores an executable program, and when the executable program is executed by a processor, the method for generating a shadow device executed by the cloud proxy device is implemented.
  • an embodiment of the present invention provides a storage medium storing an executable program, and when the executable program is executed by a processor, the method for generating a shadow device executed by the server device is implemented.
  • an embodiment of the present invention provides a storage medium that stores an executable program, and when the executable program is executed by a processor, the method for generating a shadow device executed by the cloud server is implemented.
  • an embodiment of the present invention provides a storage medium that stores an executable program, and when the executable program is executed by a processor, the method for generating a shadow device executed by the configurator is implemented.
  • the method for generating a shadow device includes: a cloud proxy device receives a first request message; the cloud proxy device generates a first shadow device of a server device based on the first request message.
  • the cloud server receives the second request message; the cloud server generates a second shadow device for the first shadow device of the server device based on the second request message.
  • server devices that do not have the ability to directly access the cloud server can generate shadow devices on the cloud proxy device and the cloud server.
  • the client device can communicate with the first shadow device or the second shadow device, thereby improving service The communication efficiency of the end device.
  • Figure 1 is a schematic diagram of the communication process between a client device and a server device according to the present invention
  • FIG. 2 is a schematic diagram of the process of creating a shadow device for the server device and the synchronization between the server device and the shadow device according to the present invention
  • FIG. 3 is a schematic diagram of an optional processing flow of a method for generating a shadow device applied to a cloud proxy device according to an embodiment of the present invention
  • FIG. 4 is a schematic diagram of an optional processing flow of a method for generating a shadow device applied to a server device according to an embodiment of the present invention
  • FIG. 5 is a schematic diagram of an optional processing flow of a method for generating a shadow device applied to a cloud server according to an embodiment of the present invention
  • FIG. 6 is a schematic diagram of an optional processing flow of a shadow device generation method applied to a configurator according to an embodiment of the present invention
  • FIG. 7 is a schematic diagram of a detailed processing flow of a method for generating a shadow device according to an embodiment of the present invention.
  • FIG. 8 is a schematic diagram of a detailed processing flow of another method for generating a shadow device according to an embodiment of the present invention.
  • FIG. 9 is a schematic diagram of the composition structure of a cloud proxy device according to an embodiment of the present invention.
  • FIG. 10 is a schematic diagram of the composition structure of a server device according to an embodiment of the present invention.
  • FIG. 11 is a schematic diagram of the composition structure of a cloud server according to an embodiment of the present invention.
  • FIG. 12 is a schematic diagram of the composition structure of the configurator according to the embodiment of the present invention.
  • FIG. 13 is a schematic diagram of the hardware composition structure of an electronic device according to an embodiment of the present invention.
  • the configurator provides a tool for the server equipment to access the configuration function of the cloud server.
  • the function of the configurator can be implemented by application software.
  • Endpoint which is the source or destination of the request message and the response message.
  • the server device is an OCF server.
  • the shadow device is a digital twin device generated by the server device. Other devices can directly communicate with the shadow device, thereby reducing the workload of message processing on the server device and improving the communication efficiency of the system.
  • Resource catalog supporting OCF equipment to publish resources and discover the logical functional entities of resources.
  • OCF is an emerging technology standards organization for the application layer of the Internet of Things.
  • OCF develops a Restful service framework for interconnection between Internet of Things devices; in the OCF Restful service framework, resources are used to express Internet of Things devices, functional services of OCF devices, and OCF devices The status and other information.
  • the entity that provides the resource is the OCF server device (hereinafter referred to as the server device), and the entity that accesses the resource is the OCF client (hereinafter referred to as the client device).
  • control terminal that obtains the indoor environment status data is the client device
  • the sensor device that monitors the indoor environment status data is the server device.
  • the business interaction between the client device and the server device is through the creation, reading, and updating of resources. It is realized by resource operation methods such as deletion or notification.
  • the communication process between the client device and the server device is shown in Figure 1:
  • the client device sends a resource update request for resources on the server device to the server device.
  • the server device performs a corresponding resource operation according to the update resource request, and sends an update resource response to the client device; wherein the update resource response carries a resource expression.
  • the form of the resource update request is:
  • the resource update request carries the Uniform Resource Identifier (URI) of the resource and the resource operation method; taking Figure 1 as an example, the server device has an environmental temperature resource, and the URI of the resource is "/environmentTemperature” ;
  • the resource operation method requested by the client device from the server device is the update method POST.
  • the description of the resource includes: the URI of the resource, the resource type, the resource interface, and the functional attributes of the resource, etc.
  • the information included in the description of the resource is described below:
  • the URI of the resource provides the address of the OCF server device resource.
  • the value of "href” is the URI of the specific resource.
  • the OCF client device accesses the OCF server device through the resource URI.
  • the resource; in Figure 1, the URI of the environmental temperature resource is "/environmentTemperature”.
  • the resource type represented by "rt” in the description of the resource, represents the type of resource.
  • the resource type “rt” is "oic.r.temperature”, which represents the temperature resource type.
  • the resource interface represented by "if” in the description of the resource, provides a response to the resource view and resource support.
  • the resource interface "if” is "oic.if.a”, which means the controller interface.
  • TargetTemperature represents the target temperature attribute of the temperature resource
  • currentTemperature represents the current temperature attribute of the temperature resource
  • temperatureRange represents the temperature range attribute of the temperature resource
  • OCF defines the resource discovery resource "/oic/res" that all OCF devices must support.
  • Resource discovery resources are used for OCF device and resource discovery; resource discovery resources provide device resource discovery functions, and the URI of resource discovery resources is fixed as " /oic/res”.
  • OCF defines resource links, namely resource Links;
  • OCF server devices can provide their own resources in the form of resource links, so that OCF client devices can discover the resources of OCF server devices.
  • the content of the resource link is as follows:
  • the content of the resource link includes:
  • Context URI which represents the URI of the owner resource that contains the resource link.
  • Target URI that is, the URI of the target resource referenced in the resource link.
  • eps The endpoint that can access the target resource.
  • each OCF server device needs to have an endpoint, and each OCF device must be associated with at least one endpoint for sending and receiving messages;
  • the client device can access the target resource of the server device 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 device can access the target resource "/myLightSwitch" through the message endpoint "coaps://[2001:db8:b::c2e5]:22222".
  • the client device communicates with the shadow device of the server device, which can improve the communication efficiency of the system.
  • OCF cloud server implements shadow service.
  • the shadow service of OCF cloud service creates a shadow device for each OCF server device.
  • the shadow device can directly respond to the request of the client device without obtaining the resource representation of the server device; in this way The client device does not need to communicate with the server device to obtain the resource representation of the server device, thereby reducing the workload of message processing on the server device and improving the communication efficiency of the system.
  • the configurator configures the server device: the configurator executes the shadow configuration process for the server device, sends a resource update request to the shadow configuration resource of the server device, and provides shadow service information for the server device to generate the shadow device; among them.
  • the shadow service information includes: the shadow service identifier, the URI of the shadow generation resource, and the instructions for generating the shadow device; among them, the shadow service identifier represents the identification information of the shadow service, and the URI of the shadow generation resource provides access to the shadow generation resource "oic.wk.shadow.
  • the URI of "gen” for example, the URI of the shadow generation resource is /oic/shadow/gen), and the instruction for generating a shadow device is used to indicate whether the original device generates a shadow device.
  • step 1 the server device obtains the shadow service information, which includes the URI of the shadow generation resource.
  • the server device sends a request for creating the shadow device to the cloud server for the URI of the shadow generation resource.
  • the request provides the original resource information that needs to be copied; after receiving the request from the server device, the cloud server generates a shadow device for the server device; where the shadow device includes the copied resource information corresponding to the original resource information.
  • the configurator configures the shadow device: the configurator executes the configuration process for the shadow device, and the shadow device obtains access control information.
  • the cloud server receives the resource update request: the cloud server receives the update request from the client device for the resources copied on the shadow device.
  • the shadow device and the server device synchronize resources: the server device and the shadow device establish a synchronization relationship through the shadow synchronization resource, and the server device and the shadow device synchronize information.
  • the shadow device sends a synchronization message to the client device.
  • the server device is required to have the ability to establish and maintain a TLS long connection with the cloud server, that is, the server device has the ability to directly access the cloud server.
  • the server device has the ability to directly access the cloud server.
  • shadow devices cannot be generated on the cloud server; therefore, the characteristics of shadow devices cannot be used to improve communication processing efficiency.
  • the present invention provides a method for generating a shadow device.
  • An optional processing flow of the method for generating a shadow device applied to a cloud proxy device provided by an embodiment of the present invention, as shown in FIG. 3, includes the following steps:
  • Step S201 The cloud proxy device receives the first request message.
  • Step S202 The cloud proxy device generates a first shadow device of the server device based on the first request message.
  • step S201 before step S201 is executed, the method further includes:
  • Step S200a The cloud proxy device receives the first resource discovery request message sent by the configurator.
  • the first resource discovery request message indicates the resource type of the cloud proxy device; for example, the resource type of the cloud proxy device is oic.r.cloudproxy.
  • Step S200b The cloud proxy device sends a first resource discovery request response message to the configurator.
  • the first resource discovery request response message includes: the resource link of the cloud proxy device; the resource link of the cloud proxy device includes at least one of the following: the resource type of the cloud proxy device and the The endpoint of the resource of the cloud proxy device.
  • the resource link of the cloud proxy device may also include the URI of the resource of the cloud proxy device.
  • the resource type of the cloud proxy device is oic.r.cloudproxy
  • the URI of the cloud proxy device resource is /oic/cloudproxy
  • the endpoint of the cloud proxy resource is coaps://[fe80::2]:3333.
  • Step S200c The cloud proxy device receives the request message for obtaining shadow service information sent by the configurator.
  • step S200d the cloud proxy device sends a request response message for obtaining shadow service information to the configurator.
  • the request response message for obtaining shadow service information includes at least one of the following: an identifier of the shadow service and an endpoint of the shadow service.
  • the cloud proxy device receives the first request message sent by the configurator. Moreover, before the cloud proxy device receives the first request message sent by the configurator, the method further includes:
  • the cloud proxy device receives the shadow service information of the cloud proxy device sent by the configurator.
  • the configurator sends an update request message to the cloud proxy device for the shadow configuration resource of the server device.
  • the shadow configuration resource of the server device is: /oic/shadow/conf;
  • the shadow service information of the cloud proxy device includes at least one of the following: the identifier of the shadow service on the cloud proxy device and The endpoint of the shadow service.
  • the shadow service information of the cloud proxy device may further include: an original resource link that needs to be copied to the cloud proxy device; wherein, the original resource link refers to a resource link of the server device.
  • the cloud proxy device For step S202, the cloud proxy device generates a first shadow device for the server device; in specific implementation, the shadow service in the cloud proxy device generates the first shadow device for the server device.
  • the URL of the replication resource of the first shadow device includes the device identifier of the server device.
  • the description information of the first shadow device includes second indication information, and the second indication information is used to indicate that the first shadow device does not have the ability to directly access the cloud server.
  • the first shadow device does not have the ability to directly access the cloud server, which can be characterized by the device type in the description information of the first shadow device.
  • step S202 the method further includes:
  • Step S203 The cloud proxy device sends a first request response message to the configurator.
  • the first request response message includes: the resource link of the first shadow device; the resource link of the first shadow device may include at least one of the following: the identifier of the first shadow device and the resource link; Describe the endpoint of the first shadow device.
  • the first request response message further includes third indication information, and the third indication information is used to indicate that the first shadow device does not have the ability to directly access the cloud server.
  • the first shadow device does not have the ability to directly access the cloud server, which can be characterized by the device type in the description information of the first shadow device.
  • the method further includes:
  • Step S204 the cloud proxy device associates the first shadow device with the second shadow device.
  • the cloud proxy device receives an update request message for the shadow configuration resource sent by the configurator; where the shadow configuration resource is: /oic/shadow/conf.
  • the update request message for the shadow configuration resource includes at least one of the following: the identifier of the second shadow device, the endpoint of the second shadow device, and the shadow synchronization resource of the second shadow device;
  • the update request message for the shadow configuration resource may also include the shadow service identifier of the cloud server.
  • the update request message for the shadow configuration resource includes: the identifier of the second shadow device, the endpoint of the second shadow device, and the shadow synchronization resource of the second shadow device.
  • the update request message for the shadow configuration resource may also include the shadow service identifier of the cloud server.
  • the update request message for the shadow configuration resource includes: the identifier of the second shadow device, the endpoint of the second shadow device, the shadow synchronization resource of the second shadow device, and the shadow service of the cloud server Logo.
  • step S204 the method further includes:
  • Step S205 the configurator starts resource synchronization between the first shadow device and the second shadow device, and resource synchronization between the first shadow device and the server device.
  • Step S206 The cloud proxy device receives the resource synchronization request sent by the cloud server.
  • the target resource in the resource synchronization request is the shadow synchronization resource /oic/shadow/sync
  • the device identifier is the device identifier of the second shadow device
  • the URI of the resource includes the device identifier of the server device.
  • Step S207 The cloud proxy device sends a resource synchronization request to the server device.
  • the target resource in the resource synchronization request is shadow synchronization resource/oic/shadow/sync;
  • the device identifier in the resource synchronization request is the device identifier of the first shadow device;
  • the resource value in the resource synchronization request The URI does not include the device identification of the server device.
  • Step S208 The cloud proxy device receives the synchronization result sent by the server device, and sends the synchronization result to the cloud server.
  • step S201 before step S201 is executed, the method further includes:
  • Step S200a' the cloud proxy device receives the first resource discovery request message sent by the server device.
  • the first resource discovery request message indicates the resource type of the cloud proxy device; for example, the resource type of the cloud proxy device is oic.r.cloudproxy.
  • step S200b' the cloud proxy device sends a first resource discovery request response message to the server device.
  • the first resource discovery request response message includes: the resource link of the cloud proxy device; the resource link of the cloud proxy device includes at least one of the following: the resource type of the cloud proxy device and the The endpoint of the resource of the cloud proxy device.
  • the resource link of the cloud proxy device may also include the URI of the resource of the cloud proxy device.
  • the resource type of the cloud proxy device is oic.r.cloudproxy
  • the URI of the cloud proxy device resource is /oic/cloudproxy
  • the endpoint of the cloud proxy resource is coaps://[fe80::2]:3333.
  • Step S200c' the cloud proxy device receives the request message for obtaining shadow service information sent by the server device.
  • step S200d' the cloud proxy device sends a request response message for obtaining shadow service information to the server device.
  • the request response message for obtaining shadow service information includes at least one of the following: an identifier of the shadow service and an endpoint of the shadow service.
  • step S202 in the second embodiment is the same as the description of step S202 in the first embodiment, and will not be repeated here.
  • step S202 the method further includes:
  • Step S203' the cloud proxy device sends a first request response message to the server device.
  • step S203' is the same as the description of the first request response message in step S203, and will not be repeated here.
  • the method further includes:
  • the cloud proxy device sends a second request message to the cloud server, where the second request message is used to request the cloud server to generate a second shadow device for the first shadow device.
  • the second request message includes at least one of the following: the shadow synchronization resource of the first shadow device, the replication resource link of the first shadow device, and the endpoint of the first shadow device.
  • the second request message includes fourth indication information, and the fourth indication information is used to indicate that the server device does not have the ability to directly access the cloud server.
  • the server device does not have the ability to directly access the cloud server, which can be characterized by the device type in the description information of the server device.
  • the method further includes: the cloud proxy device receives a second request response message sent by the cloud server; the second request response message includes: the resource link of the second shadow device.
  • the resource link of the second shadow device includes at least one of the following: an identifier of the second shadow device and an endpoint of the second shadow device.
  • the second request response message further includes fifth indication information, and the fifth indication information is used to indicate that the second shadow device does not have the ability to directly access the cloud server.
  • the second shadow device does not have the ability to directly access the cloud server, and it can be characterized by the device type in the description information of the second shadow device.
  • the method further includes:
  • Step S204' the cloud proxy device associates the first shadow device with the second shadow device.
  • the first shadow device on the cloud proxy device updates its own shadow configuration resource /oic/shadow/conf, and configures itself the identity of the second shadow device on the cloud server, the endpoint of the second shadow device, and the second shadow device.
  • the shadow synchronization resource /oic/shadow/sync of the shadow device; optionally, the first shadow device on the cloud proxy device can also configure itself with the shadow service identifier on the cloud server.
  • Step S205' the cloud proxy device starts resource synchronization between the first shadow device and the server device, and resource synchronization between the cloud proxy device and the second shadow device.
  • step S206 to step S208 in the first embodiment described above are executed.
  • the optional processing flow of the method for generating a shadow device applied to a server device provided by the embodiment of the present invention, as shown in FIG. 4, includes:
  • Step S301 The server device sends a first request message to the cloud proxy device, where the first request message is used to request the cloud proxy device to generate a first shadow device of the server device.
  • Step S302 The server device receives the first request response message.
  • the server device receives the first request response message sent by the cloud proxy device.
  • the description of the first request response message in the embodiment of the present invention is the same as the description of the first request response message in step S203, which is not repeated here.
  • step S302 the method further includes:
  • Step S303 The server device associates itself with the first shadow device.
  • the server device configures itself at least one of the following by updating its own shadow configuration resources: the identifier of the first shadow device, the endpoint of the first shadow device, and the first shadow device.
  • the shadow synchronization resource of the shadow device is not limited to the following shadow configuration resources.
  • the server device updates its shadow configuration resource /oic/shadow/conf, and configures itself the identity of the shadow device on the cloud proxy device, the endpoint of the shadow device, and the shadow synchronization resource of the shadow device /oic/shadow/sync At least one of.
  • step S303 After step S303 is performed, the method further includes:
  • Step S304 the server device starts resource synchronization between the server device and the first shadow device.
  • Step S305 The server device receives the resource synchronization request sent by the cloud proxy device.
  • step S301 before step S301 is executed, the method further includes:
  • Step S300a' the server device sends a first resource discovery request message to the cloud proxy device.
  • the description of the first resource discovery request message is the same as the description of the first resource discovery request message in step S200a', and will not be repeated here.
  • step S300b' the server device receives the first resource discovery request response message sent by the cloud proxy device.
  • the description of the first resource discovery request response message is the same as the description of the first resource discovery request response message in step S200b', and will not be repeated here.
  • step S300c' the server device sends a request message for obtaining shadow service information to the cloud proxy device.
  • step S300d' the server device receives a request response message for obtaining shadow service information sent by the cloud proxy device.
  • the description of the request response message for obtaining shadow service information is the same as the description of the request response message for obtaining shadow service information in step S300d', and will not be repeated here.
  • the optional processing flow of the method for generating a shadow device applied to a cloud server provided by the embodiment of the present invention, as shown in FIG. 5, includes:
  • Step S401 The cloud server receives the second request message.
  • Step S402 The cloud server generates a second shadow device for the first shadow device of the server device based on the second request message.
  • the cloud server receives the second request message sent by the configurator.
  • the cloud server receives the second request message sent by the cloud proxy device.
  • the second request message includes at least one of the following: the shadow synchronization resource of the first shadow device, the replication resource link of the first shadow device, and the link of the first shadow device Endpoint.
  • the second request message includes fourth indication information, and the fourth indication information is used to indicate that the server device does not have the ability to directly access the cloud server.
  • the server device does not have the ability to directly access the cloud server can be characterized by the device type in the description information of the cloud server.
  • step S402 the URI of the copy resource of the second shadow device remains unchanged, that is, the target URI of the second shadow device does not add the device identifier of the cloud proxy device.
  • step S402 the method further includes:
  • Step S403 The cloud server sends a second request response message; the second request response message includes: the resource link of the second shadow device.
  • the resource link of the second shadow device includes at least one of the following: an identifier of the second shadow device and an endpoint of the second shadow device.
  • the second request response message further includes fifth indication information, and the fifth indication information is used to indicate that the second shadow device does not have the ability to directly access the cloud server.
  • that the second shadow device does not have the ability to directly access the cloud server can be characterized by the device type of the second shadow device.
  • Step S404 the cloud server starts resource synchronization between the second shadow device and the first shadow device.
  • Step S405 The cloud server publishes the copy resource link of the second shadow device to the resource discovery directory of the cloud server.
  • step S405 may be executed after step S402, there is no execution order between step S405 and step S403, and there is no execution order between step S405 and step S404.
  • the optional processing flow of the shadow device generation method applied to the configurator provided by the embodiment of the present invention, as shown in FIG. 6, includes:
  • Step S501 The configurator sends a first request message to the cloud proxy device, where the first request message is used to request the cloud proxy device to generate a first shadow device of the server device.
  • Step S502 The configurator receives the first request response message.
  • the configurator receives the first request response message sent by the cloud proxy device.
  • the description of the first request response message in the embodiment of the present invention is the same as the description of the first request response message in step S203, which is not repeated here.
  • the configurator receives the first request response message and associates the server device with the first shadow device on the cloud proxy device.
  • the configurator sends an update request message to the shadow configuration resource /oic/shadow/conf of the server device; the update request message includes at least one of the following: the first shadow device on the cloud proxy device , The endpoint of the first shadow device, and the shadow synchronization resource /oic/shadow/sync of the first shadow device.
  • step S502 the method further includes:
  • Step S503 The configurator sends a second request message to the cloud server, where the second request message is used to request the cloud server to generate a second shadow device for the first shadow device.
  • Step S504 The configurator receives the second request response message sent by the cloud server.
  • Step S505 The configurator associates the first shadow device with the second shadow device.
  • the configurator sends an update request message for shadow configuration resources to the cloud proxy device;
  • the update request message for shadow configuration resources includes at least one of the following: the identifier of the second shadow device, The endpoint of the second shadow device, the shadow synchronization resource of the second shadow device, and the shadow service identifier of the cloud server.
  • the shadow configuration resource is /oic/shadow/conf
  • the shadow synchronization resource is /oic/shadow/sync.
  • Step S506 The configurator configures resource synchronization between the first shadow device and the second shadow device, and resource synchronization between the first shadow device and the server device.
  • step S501 the method further includes:
  • Step S500a The configurator sends a second resource discovery request message to the server device.
  • Step S500b The configurator receives the second resource discovery request response message sent by the server device.
  • Step S500c The configurator sends a first resource discovery request message to the cloud proxy device.
  • the description of the first resource discovery request message is the same as the description of the first resource discovery request message in step S200a', and will not be repeated here.
  • Step S500d The configurator receives the first resource discovery request response message sent by the cloud proxy device.
  • the description of the first resource discovery request response message is the same as the description of the first resource discovery request response message in step S200b', and will not be repeated here.
  • step S500e the configurator sends a request message for obtaining shadow service information to the cloud proxy device.
  • the description of the request message for obtaining shadow service information is the same as the description of the request message for obtaining shadow service information in step S200c', and will not be repeated here.
  • Step S500f The configurator receives a request response message for obtaining shadow service information sent by the cloud proxy device.
  • the description of the request response message for obtaining shadow service information is the same as the description of the request response message for obtaining shadow service information in step S200d', and will not be repeated here.
  • FIG. 7 The detailed processing flow of a method for generating a shadow device provided by an embodiment of the present invention is shown in FIG. 7.
  • the generation of a shadow device controlled by a configurator includes the following steps:
  • Step S601 the configurator discovers the server device.
  • the configurator sends a resource discovery request to the server device; the request message specifies the resource type of the server device.
  • the resource type of the server device is oic.r.cloudconstrained.
  • step S602 the server device sends a discovery server device response to the configurator.
  • the server device response carries the resource link of the server device;
  • the resource link of the server device includes at least one of the following: server device resource type, server device resource URI, server device The endpoint information of the resource.
  • the resource type of the server device returned by the server device to the configurator is oic.r.cloudconstrained
  • the URI of the server device resource is /oic/cloudconstrained
  • the endpoint of the server device resource is coaps://[fe80 ::1]:2222.
  • Step S603 the configurator discovers the cloud proxy device.
  • the configurator sends a resource discovery request to the cloud proxy device; the resource discovery request specifies the resource type of the cloud proxy device.
  • the resource type of the cloud proxy device is oic.r.cloudproxy.
  • step S604 the cloud proxy device sends a cloud proxy device discovery response to the configurator.
  • the cloud proxy device response carries the resource link of the cloud proxy device;
  • the resource link of the cloud proxy device includes at least one of the following: the resource type of the cloud proxy device, the URI of the cloud proxy device resource, and the cloud proxy
  • the endpoint of the device resource is the resource link of the cloud proxy device.
  • the resource type of the cloud proxy device returned by the cloud proxy device to the configurator is oic.r.cloudproxy
  • the URI of the cloud proxy device resource is /oic/cloudproxy
  • the endpoint of the cloud proxy resource is coaps://[fe80: :2]:3333.
  • Step S605 The configurator requests the cloud proxy device for shadow service information.
  • Step S606 The cloud proxy device returns shadow service information to the configurator.
  • the shadow service information includes at least one of the following: the identifier of the shadow service and the endpoint of the shadow service.
  • Step S607 the configurator configures the server device.
  • the configurator configures the shadow service information of the cloud proxy device for the server device.
  • the configurator sends an update request to the shadow configuration resource /oic/shadow/conf of the server device, and the update request provides the identifier of the shadow service on the cloud proxy device and the endpoint of the shadow service.
  • the configurator can also configure the original resource link that needs to be copied to the cloud proxy device for the server device.
  • step S608 the configurator requests a shadow service from the cloud proxy device to generate a shadow device for the server device.
  • the request for generating the shadow device may include: an indication of the cloud restricted device, which is used to indicate that the original device (ie, the server device) generating the shadow device is a cloud restricted device.
  • the configurator sends a creation request to the shadow generation resource /oic/shadow/gen of the cloud proxy device, and the creation request carries the original resource link of the server device and the endpoint of the server device.
  • the original resource link of the server device is used to generate corresponding duplicate resources for the original resource of the server device.
  • the creation request may also carry an indication of the server device, which is used to indicate that the original device (that is, the server device) generating the shadow device is a cloud restricted device.
  • Step S609 The shadow service of the cloud proxy device generates a first shadow device for the server device.
  • the URI of the replication resource of the first shadow device includes the device identifier of the server device.
  • the description information of the first shadow device may indicate that the first shadow device is a cloud-restricted device.
  • the cloud proxy device publishes the copy resource link of the first shadow device to the resource discovery directory of the cloud proxy device.
  • step S610 the cloud proxy device sends a first shadow device generation response to the configurator.
  • the first shadow device generation response carries the resource link of the first shadow device generated on the cloud proxy device.
  • the resource link includes at least one of the following: the resource link of the /oic/res resource of the shadow device and the resource link of the shadow synchronization resource (/oic/shadow/sync resource); the /oic/res resource and/ Or the shadow synchronization resource link includes the identifier of the shadow device on the cloud proxy device and the endpoint of the shadow device.
  • the response for generating the first shadow device may also indicate that the first shadow device is a cloud restricted device.
  • Step S611 The configurator associates the server device with the first shadow device on the cloud proxy device.
  • the configurator sends an update request to the shadow configuration resource /oic/shadow/conf of the server device; the update request includes at least one of the following: the identity of the first shadow device on the cloud proxy device, The endpoint of the first shadow device and the shadow synchronization resource /oic/shadow/sync of the first shadow device.
  • the shadow synchronization resource /oic/shadow/sync of the first shadow device is obtained in step S610.
  • the configurator After the server device is associated with the corresponding first shadow device, the configurator generates a second shadow device on the cloud server for the first shadow device on the cloud proxy device.
  • Step S612 the configurator configures the first shadow device on the cloud proxy device, and configures the copy resource link that needs to be copied to the cloud server for the first shadow device.
  • the configurator sends an update request to the shadow configuration resource /oic/shadow/conf of the cloud proxy device, and the update request provides a copy resource link that the first shadow device on the cloud proxy device needs to copy to the cloud server.
  • Step S613 The configurator makes a shadow service request from the cloud server to generate a second shadow device on the cloud server for the first shadow device.
  • the shadow device generation request may indicate that the original device (the first shadow device) requesting to generate the shadow device is a cloud restricted device.
  • the configurator sends a creation request to the shadow generation resource /oic/shadow/gen of the cloud server, and the creation request carries at least one of the following: the shadow synchronization resource of the first shadow device /oic/shadow/sync , The copy resource link on the first shadow device (that is, the copy resource generated by the cloud proxy device for the original resource of the server device), and the endpoint of the first shadow device.
  • the creation request further indicates that the original device that generated the shadow device (ie, the first shadow device) is a cloud-restricted device.
  • Step S614 The shadow service of the cloud server generates a second shadow device for the first shadow device.
  • the generated URI of the replication resource of the second shadow device remains unchanged, that is, the target URI of the shadow device does not include the device identifier of the cloud proxy device.
  • the generated second shadow device may indicate that the second shadow device is a cloud restricted device.
  • the cloud server publishes the replication resource link of the second shadow device to the resource discovery directory of the cloud server.
  • step S615 the cloud server sends a response for generating a second shadow device to the configurator.
  • the resource link of the second shadow device is carried in the generated shadow device response.
  • the resource link includes the resource link of the shadow device's /oic/res resource and the resource link of the shadow synchronization resource (/oic/shadow/sync resource) ;
  • the link of the /oic/res resource and/or shadow synchronization resource includes the identifier of the second shadow device on the cloud server and the endpoint of the second shadow device.
  • the shadow device generation response may also indicate that the second shadow device is a cloud restricted device.
  • Step S616 The configurator associates the first shadow device on the cloud proxy device with the second shadow device on the cloud server.
  • the configurator sends an update request to the shadow configuration resource /oic/shadow/conf on the cloud proxy device.
  • the update request provides the identification of the second shadow device on the cloud server, the endpoint of the second shadow device, and the second shadow device.
  • the shadow synchronization resource /oic/shadow/sync of the shadow device (obtained in step S615); optionally, the shadow service identifier of the cloud server can also be included in the update request; at this time, the configurator has configured the shadow of the cloud server by default Service ID.
  • the configurator may first associate the server device with the first shadow device, and then request the generation of the second shadow device; that is, first perform step S611, and then perform step S612 to step S615.
  • the configurator may also first request the generation of a second shadow device, and then associate the server device with the first shadow device; that is, first perform step S612 to step S615, and then perform step S611.
  • the configurator may first associate the server device with the first shadow device, and then associate the first shadow device with the second shadow device; that is, step S611 is executed first, and then step S616 is executed.
  • the configurator may first associate the first shadow device with the second shadow device, and then associate the server device with the first shadow device; that is, step S616 is performed first, and then step S611 is performed.
  • Step S617 The configurator starts resource synchronization for the server device, the first shadow device on the cloud proxy device, and the second shadow device on the cloud server.
  • the server device and the first shadow device on the cloud proxy device perform resource synchronization
  • the first shadow device on the cloud proxy device and the second shadow device on the cloud server perform resource synchronization. Synchronize.
  • Step S618 The second shadow device on the cloud server sends a resource synchronization request to the first shadow device on the cloud proxy device.
  • the target resource in the resource synchronization request is a shadow synchronization resource (/oic/shadow/sync resource)
  • the device identifier is the device identifier of the second shadow device on the cloud server
  • the resource URI contains the cloud The device ID of the restricted device.
  • Step S619 The first shadow device on the cloud proxy device sends a resource synchronization request to the server device.
  • the target resource of the resource synchronization request is a shadow synchronization resource (/oic/shadow/sync resource)
  • the device identifier is the device identifier of the first shadow device on the cloud proxy device
  • the resource URI removes the service The device ID of the end device.
  • the server device sends the resource synchronization result to the first shadow device on the cloud proxy device, and the first shadow device on the cloud proxy device sends the resource synchronization result to the second shadow device on the cloud server.
  • FIG. 8 The detailed processing flow of another shadow device generation method provided by the embodiment of the present invention is shown in FIG. 8.
  • the server device controls the generation of the shadow device, including the following steps:
  • Step S801 the server device discovers the cloud proxy device.
  • the server device sends a resource discovery request to the cloud proxy device.
  • the resource discovery request specifies the resource type of the cloud proxy device.
  • the resource type of the cloud proxy device is oic.r.cloudproxy.
  • Step S802 The cloud proxy device sends a cloud proxy device discovery response to the server device.
  • the cloud proxy device response carries the resource link of the cloud proxy device;
  • the resource link of the cloud proxy device includes at least one of the following: the resource type of the cloud proxy device, the URI of the cloud proxy device resource, and the cloud proxy
  • the endpoint of the device resource is the resource link of the cloud proxy device.
  • the resource type of the cloud proxy device returned by the cloud proxy device to the server device is oic.r.cloudproxy
  • the URI of the cloud proxy device resource is /oic/cloudproxy
  • the endpoint of the cloud proxy resource is coaps://[fe80 ::2]:3333.
  • Step S803 The server device requests the cloud proxy device to obtain shadow service information.
  • Step S804 The cloud proxy device returns shadow service information to the server device.
  • the shadow service information includes at least one of the following: the identifier of the shadow service and the endpoint of the shadow service.
  • Step S805 the shadow service request from the server device to the cloud proxy device generates a shadow device for the server device.
  • the request for generating the shadow device may include an indication of the cloud restricted device, which is used to indicate that the original device requesting the generation of the shadow device is a cloud restricted device.
  • the server device sends a creation request to the shadow generation resource /oic/shadow/gen of the cloud proxy device, and the creation request carries the original resource link of the server device and the endpoint of the server device.
  • the original resource link of the server device is used to generate corresponding duplicate resources for the original resource of the server device.
  • the creation request may also carry an indication of the server device, which is used to indicate that the original device generating the shadow device is a cloud-restricted device.
  • Step S806 the shadow service of the cloud proxy device generates a first shadow device for the server device.
  • the URI of the replication resource of the first shadow device includes the device identifier of the server device.
  • the description information of the first shadow device may indicate that the first shadow device is a cloud-restricted device.
  • the cloud proxy device publishes the copy resource link of the first shadow device to the resource discovery directory of the cloud proxy device.
  • step S807 the cloud proxy device sends a first shadow device response to the server device.
  • the first shadow device generation response carries the resource link of the first shadow device generated on the cloud proxy device.
  • the resource link includes at least one of the following: the resource link of the /oic/res resource of the shadow device and the resource link of the shadow synchronization resource (/oic/shadow/sync resource); the /oic/res resource and/ Or the shadow synchronization resource link includes the identifier of the shadow device on the cloud proxy device and the endpoint of the shadow device.
  • the response for generating the first shadow device may also indicate that the first shadow device is a cloud restricted device.
  • step S808 the server device associates itself with the first shadow device on the cloud proxy device.
  • the server device updates its own shadow configuration resource /oic/shadow/conf, and configures itself with the identity of the first shadow device on the cloud proxy device, the endpoint of the first shadow device and the shadow synchronization of the first shadow device Resources /oic/shadow/sync.
  • the shadow synchronization resource /oic/shadow/sync of the first shadow device is obtained in step S807.
  • Step S809 The cloud proxy device requests a shadow service from the cloud server to generate a second shadow device on the cloud server for the first shadow device.
  • the shadow device generation request may indicate that the original device (the first shadow device) requesting to generate the shadow device is a cloud restricted device.
  • the cloud proxy device sends a creation request to the shadow generation resource /oic/shadow/gen of the cloud server, and the creation request carries at least one of the following: the shadow synchronization resource of the first shadow device /oic/shadow/ sync, the copy resource link on the first shadow device (that is, the copy resource generated by the cloud proxy device for the original resource of the server device), and the endpoint of the first shadow device.
  • the creation request further indicates that the original device that generated the shadow device (ie, the first shadow device) is a cloud-restricted device.
  • Step S810 The shadow service of the cloud server generates a second shadow device for the first shadow device.
  • the generated URI of the replication resource of the second shadow device remains unchanged, that is, the target URI of the shadow device does not include the device identifier of the cloud proxy device.
  • the generated second shadow device may indicate that the second shadow device is a cloud restricted device.
  • the cloud server publishes the replication resource link of the second shadow device to the resource discovery directory of the cloud server.
  • step S811 the cloud server sends a shadow device generation response to the cloud proxy device.
  • the resource link of the second shadow device is carried in the generated shadow device response.
  • the resource link includes the resource link of the shadow device's /oic/res resource and the resource link of the shadow synchronization resource (/oic/shadow/sync resource) ;
  • the link of the /oic/res resource and/or shadow synchronization resource includes the identifier of the second shadow device on the cloud server and the endpoint of the second shadow device.
  • the shadow device generation response may also indicate that the second shadow device is a cloud restricted device.
  • Step S812 the first shadow device on the cloud proxy device is associated with the second shadow device on the cloud server.
  • the first shadow device on the cloud proxy device updates its own shadow configuration resource /oic/shadow/conf, and configures itself with the identity of the second shadow device on the cloud server, the endpoint of the second shadow device, and the second shadow device.
  • the shadow synchronization resource /oic/shadow/sync of the shadow device; optionally, the first shadow device on the cloud proxy device can also be configured with a shadow service identifier on the cloud server.
  • the association between the server device and the first shadow device may occur before the cloud server generates the second shadow device; that is, step S808 is performed first, and then steps S809 to S811 are performed.
  • the association between the server device and the first shadow device may also occur after the cloud server generates the second shadow device; that is, step S809 to step S811 are executed first, and then step S808 is executed.
  • the server device is associated with the first shadow device, and there is no order of execution between the first shadow device and the second shadow device. That is, step S809 can be performed first, and then step S812; or step S812 can be performed first, Step S809 is executed again.
  • resource synchronization can be started by any one of the server device, the first shadow device on the cloud management device, and the second shadow device on the cloud server.
  • the server device and the first shadow device on the cloud proxy device perform resource synchronization
  • the first shadow device on the cloud proxy device and the second shadow device on the cloud server perform resource synchronization. Synchronize.
  • Step S815 The second shadow device on the cloud server sends a resource synchronization request to the first shadow device on the cloud proxy device.
  • the target resource in the resource synchronization request is a shadow synchronization resource (/oic/shadow/sync resource)
  • the device identifier is the device identifier of the second shadow device on the cloud server
  • the resource URI contains the cloud The device ID of the restricted device.
  • Step S816 The first shadow device on the cloud proxy device sends a resource synchronization request to the server device.
  • the target resource of the resource synchronization request is a shadow synchronization resource (/oic/shadow/sync resource)
  • the device identifier is the device identifier of the first shadow device on the cloud proxy device
  • the resource URI removes the service The device ID of the end device.
  • the server device sends the resource synchronization result to the first shadow device on the cloud proxy device, and the first shadow device on the cloud proxy device sends the resource synchronization result to the second shadow device on the cloud server.
  • an embodiment of the present invention also provides a cloud proxy device.
  • the composition structure of the cloud proxy device 900 as shown in FIG. 9, includes:
  • the first receiving unit 901 is configured to receive a first request message
  • the first processing unit 902 is configured to generate a first shadow device of the server device based on the first request message.
  • the first request message is sent to the cloud proxy device by a configurator, or the first request message is sent to the cloud proxy device by the server device.
  • the first receiving unit 901 is further configured to receive the shadow service information of the cloud proxy device sent by the configurator.
  • the shadow service information of the cloud proxy device includes at least one of the following: an identifier of the shadow service on the cloud proxy device, and an endpoint of the shadow service.
  • the shadow service information of the cloud proxy device includes: the original resource link that needs to be copied to the cloud proxy device.
  • the first request message includes at least one of the following: the original resource link of the server device and the endpoint of the server device.
  • the first request message includes first indication information, and the first indication information is used to indicate that the server device does not have the ability to directly access the cloud server.
  • the uniform resource identifier of the replication resource of the first shadow device includes the device identifier of the server device.
  • the description information of the first shadow device includes second indication information, and the second indication information is used to indicate that the first shadow device does not have the ability to directly access the cloud server.
  • the first processing unit 902 is further configured to publish the copy resource link of the first shadow device to the resource discovery directory of the cloud proxy device.
  • the cloud proxy device 900 further includes:
  • the first sending unit 903 is configured to send a first request response message; the first request response message includes: the resource link of the first shadow device.
  • the first request response message is sent to the configurator, or the first request response message is sent to the server device.
  • the resource link of the first shadow device includes at least one of the following: an identifier of the first shadow device and an endpoint of the first shadow device.
  • the first request response message further includes third indication information, and the third indication information is used to indicate that the first shadow device does not have the ability to directly access the cloud server.
  • the cloud proxy device 900 further includes: a second sending unit 904 configured to send a second request message to the cloud server, where the second request message is used to request that the cloud server be the first
  • the shadow device generates a second shadow device.
  • the second request message includes at least one of the following: the shadow synchronization resource of the first shadow device, the replication resource link of the first shadow device, and the endpoint of the first shadow device.
  • the second request message includes fourth indication information, and the fourth indication information is used to indicate that the server device does not have the ability to directly access the cloud server.
  • the first receiving unit 901 is further configured to receive a second request response message sent by the cloud server; the second request response message includes: the resource link of the second shadow device.
  • the resource link of the second shadow device includes at least one of the following: an identifier of the second shadow device and an endpoint of the second shadow device.
  • the second request response message further includes fifth indication information, and the fifth indication information is used to indicate that the second shadow device does not have the ability to directly access the cloud server.
  • the first processing unit 902 is further configured to associate the first shadow device with the second shadow device.
  • the first processing unit 902 is configured to configure at least one of the following for the cloud proxy device: the identifier of the second shadow device, the endpoint of the second shadow device, and the The shadow synchronization resource of the second shadow device and the shadow service identifier of the cloud server are described.
  • the first processing unit 902 is configured to receive an update request message for shadow configuration resources sent by the configurator
  • the update request message for the shadow configuration resource includes at least one of the following: the identifier of the second shadow device, the endpoint of the second shadow device, the shadow synchronization resource of the second shadow device, and the cloud The shadow service ID of the server.
  • the first processing unit 902 is further configured to enable resource synchronization between the first shadow device and the second shadow device, and the first shadow device and the server device Synchronization of resources between.
  • the cloud proxy device 900 further includes:
  • the third sending unit 905 is configured to send a resource synchronization request to the server device.
  • the device identifier in the resource synchronization request is the device identifier of the first shadow device; and/or the uniform resource identifier of the resource in the resource synchronization request does not include the device identifier of the server device.
  • the first receiving unit 901 is further configured to receive a first resource discovery request message
  • the cloud proxy device 900 further includes a fourth sending unit 906 configured to send a first resource discovery request response message, where the first resource discovery request response message includes: the resource link of the cloud proxy device.
  • the first resource discovery request message indicates the resource type of the cloud proxy device; the resource link of the cloud proxy device includes at least one of the following: the resource type of the cloud proxy device and the cloud proxy The endpoint of the device's resource.
  • the first resource discovery request message is sent by the configurator or the server device; correspondingly, the first resource discovery request response message is sent to the configurator or the server equipment.
  • the first receiving unit 901 is further configured to receive a request message for obtaining shadow service information
  • the cloud proxy device 900 further includes a fifth sending unit 907 configured to send a request response message for obtaining shadow service information.
  • the request response message for obtaining shadow service information includes at least one of the following: the identifier of the shadow service and the endpoint of the shadow service.
  • the request message for obtaining shadow service information is sent by the configurator or the server device; accordingly, the request response message for obtaining the shadow service information is sent to the configurator or the server device.
  • an embodiment of the present invention also provides a server device.
  • the composition structure of the server device 1000 includes:
  • the sixth sending unit 1001 is configured to send a first request message to the cloud proxy device, where the first request message is used to request the cloud proxy device to generate the first shadow device of the server device;
  • the second receiving unit 1002 is configured to receive the first request response message.
  • the first request message includes at least one of the following: the original resource link of the server device and the endpoint of the server device.
  • the first request message further includes first indication information, and the first indication information is used to indicate that the server device does not have the ability to directly access the cloud server.
  • the uniform resource identifier of the replication resource of the first shadow device includes the device identifier of the server device.
  • the description information of the first shadow device includes second indication information, and the second indication information is used to indicate that the first shadow device does not have the ability to directly access the cloud server.
  • the server device 1000 further includes: a second processing unit 1003 configured to associate the server device with the first shadow device.
  • the second processing unit 1003 is configured to configure at least one of the following for the server device by updating the shadow configuration resource of the server device: Identifies, the endpoint of the first shadow device, and the shadow synchronization resource of the first shadow device.
  • the server device 1000 further includes:
  • the third processing unit 1004 is configured to enable resource synchronization between the server device and the first shadow device.
  • the second receiving unit 1002 is further configured to receive a resource synchronization request sent by the cloud proxy device.
  • the device identifier in the resource synchronization request is the device identifier of the first shadow device; and/or the uniform resource identifier of the resource in the resource synchronization request does not include the device identifier of the server device.
  • the sixth sending unit 1001 is further configured to send a first resource discovery request message to the cloud proxy device;
  • the server device receives a first resource discovery response message sent by the cloud proxy device, where the first resource discovery request response message includes: the resource link of the cloud proxy device.
  • the first resource discovery request message indicates the resource type of the cloud proxy device; the resource link of the cloud proxy device includes at least one of the following: the resource type of the cloud proxy device and the cloud proxy The endpoint of the device's resource.
  • the sixth sending unit 1001 is further configured to send a request message for obtaining shadow service information to the cloud proxy device;
  • the second receiving unit 1002 is further configured to receive a request response message for obtaining shadow service information sent by the cloud proxy device.
  • the request response message for obtaining shadow service information includes at least one of the following: an identifier of the shadow service and an endpoint of the shadow service.
  • an embodiment of the present invention further provides a cloud server.
  • the composition structure of the cloud server 1100 includes:
  • the third receiving unit 1101 is configured to receive the second request message
  • the fourth processing unit 1102 is configured to generate a second shadow device for the first shadow device of the server device based on the second request message.
  • the second request message includes at least one of the following: the shadow synchronization resource of the first shadow device, the replication resource link of the first shadow device, and the endpoint of the first shadow device.
  • the second request message further includes fourth indication information, and the fourth indication information is used to indicate that the server device does not have the ability to directly access the cloud server.
  • the cloud server 1100 further includes:
  • the seventh sending unit 1103 is configured to send a second request response message; the second request response message includes: the resource link of the second shadow device.
  • the resource link of the second shadow device includes at least one of the following: an identifier of the second shadow device and an endpoint of the second shadow device.
  • the second request response message further includes fifth indication information, and the fifth indication information is used to indicate that the second shadow device does not have the ability to directly access the cloud server.
  • the fourth processing unit 1102 is further configured to enable resource synchronization between the second shadow device and the first shadow device.
  • the second request message is sent by a configurator, or the second request message is sent by a cloud proxy device.
  • the second request response message is sent to the configurator, or sent to the cloud proxy device.
  • the fourth processing unit 1102 is further configured to publish the replication resource link of the second shadow device to the resource discovery directory of the cloud server.
  • an embodiment of the present invention also provides a configurator.
  • the composition structure of the configurator 1200 includes:
  • the eighth sending unit 1201 is configured to send a first request message to the cloud proxy device, where the first request message is used to request the cloud proxy device to generate the first shadow device of the server device;
  • the fourth receiving unit 1202 is configured to receive the first request response message.
  • the first request message includes at least one of the following: the original resource link of the server device and the endpoint of the server device.
  • the first request message further includes first indication information, and the first indication information is used to indicate that the server device does not have the ability to directly access the cloud server.
  • the uniform resource identifier of the replication resource of the first shadow device includes the device identifier of the server device.
  • the description information of the first shadow device includes second indication information, and the second indication information is used to indicate that the first shadow device does not have the ability to directly access the cloud server.
  • the eighth sending unit 1201 is further configured to send a second request message to the cloud server, where the second request message is used to request the cloud server to generate a second shadow for the first shadow device equipment.
  • the second request message includes at least one of the following: the shadow synchronization resource of the first shadow device, the replication resource link of the first shadow device, and the endpoint of the first shadow device.
  • the second request message includes fourth indication information, and the fourth indication information is used to indicate that the server device does not have the ability to directly access the cloud server.
  • the fourth receiving unit 1202 is further configured to receive a second request response message sent by the cloud server; the second request response message includes: the resource link of the second shadow device.
  • the resource link of the second shadow device includes at least one of the following: an identifier of the second shadow device and an endpoint of the second shadow device.
  • the second request response message includes fifth indication information, and the fifth indication information is used to indicate that the second shadow device does not have the ability to directly access the cloud server.
  • the configurator 1200 further includes: a fifth processing unit 1203 configured to associate the first shadow device with the second shadow device.
  • the fifth processing unit 1203 is configured to send an update request message for shadow configuration resources to the server device;
  • the update request message for the shadow configuration resource includes at least one of the following: the identifier of the second shadow device, the endpoint of the second shadow device, the shadow synchronization resource of the second shadow device, and the cloud The shadow service ID of the server.
  • the configurator 1200 further includes: a sixth processing unit 1204 configured to configure resource synchronization between the first shadow device and the second shadow device, and the first shadow device and Resource synchronization between the server devices.
  • the eighth sending unit 1201 is further configured to send a second resource discovery request message to the server device;
  • the fourth receiving unit 1202 is further configured to receive a second resource discovery request response message sent by the server device, where the second resource discovery response message includes: the resource link of the server device.
  • the second resource discovery request message indicates the resource type of the server device;
  • the resource link of the server device includes at least one of the following: the resource type of the server device and the resource type of the server device The endpoint of the resource.
  • the eighth sending unit 1201 is further configured to send a first resource discovery request message to the cloud proxy device;
  • the fourth receiving unit 1202 is further configured to receive a first resource discovery request response message sent by the cloud proxy device, where the first resource discovery request response message includes: the resource link of the cloud proxy device.
  • the first resource discovery request message indicates the resource type of the cloud proxy device, and the resource link of the cloud proxy device includes at least one of the following: the resource type of the cloud proxy device and the cloud proxy The endpoint of the device's resource.
  • the eighth sending unit 1201 is further configured to send a request message for obtaining shadow service information to the cloud proxy device;
  • the fourth receiving unit 1202 is further configured to receive a request response message for obtaining shadow service information sent by the cloud proxy device.
  • the request response message for obtaining shadow service information includes at least one of the following:
  • An embodiment of the present invention also provides a cloud proxy device, including a processor and a memory for storing a computer program that can run on the processor, where the processor is used to execute the cloud proxy device when the computer program is running Perform the steps of the shadow device generation method.
  • the embodiment of the present invention also provides a server device, including a processor and a memory for storing a computer program that can run on the processor, wherein the processor is used to execute the server device when the computer program is running Perform the steps of the shadow device generation method.
  • the embodiment of the present invention also provides a cloud server, including a processor and a memory for storing a computer program that can run on the processor, wherein the processor is used to execute the above-mentioned cloud server when the computer program is running.
  • the steps of the shadow device generation method are described in detail below.
  • An embodiment of the present invention also provides a configurator, including a processor and a memory for storing a computer program that can run on the processor, where the processor is used to execute the above-mentioned configurator when the computer program is running.
  • the steps of the shadow device generation method are described in detail below.
  • cloud proxy device server device, cloud server, and configurator in the embodiment of the present invention may all be OCF devices.
  • the electronic device 700 includes: at least one processor 701, a memory 702, and at least one network interface 704 .
  • the various components in the electronic device 700 are coupled together through the bus system 705. It can be understood that the bus system 705 is used to implement connection and communication between these components.
  • the bus system 705 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, various buses are marked as the bus system 705 in FIG. 13.
  • the memory 702 may be a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memory.
  • the non-volatile memory can be ROM, Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), and electrically erasable Programmable read-only memory (EEPROM, Electrically Erasable Programmable Read-Only Memory), magnetic random access memory (FRAM, ferromagnetic random access memory), flash memory (Flash Memory), magnetic surface memory, optical disk, or CD-ROM (CD) -ROM, Compact Disc Read-Only Memory); Magnetic surface memory can be disk storage or tape storage.
  • the volatile memory may be random access memory (RAM, Random Access Memory), which is used as an external cache.
  • RAM random access memory
  • SRAM static random access memory
  • SSRAM synchronous static random access memory
  • DRAM Dynamic Random Access Memory
  • SDRAM Synchronous Dynamic Random Access Memory
  • DDRSDRAM Double Data Rate Synchronous Dynamic Random Access Memory
  • ESDRAM enhanced -Type synchronous dynamic random access memory
  • SLDRAM SyncLink Dynamic Random Access Memory
  • direct memory bus random access memory DRRAM, Direct Rambus Random Access Memory
  • DRRAM Direct Rambus Random Access Memory
  • the memory 702 described in the embodiment of the present invention is intended to include, but is not limited to, these and any other suitable types of memory.
  • the memory 702 in the embodiment of the present invention is used to store various types of data to support the operation of the electronic device 700. Examples of these data include: any computer program used to operate on the electronic device 700, such as the application program 7022.
  • the program for implementing the method of the embodiment of the present invention may be included in the application program 7022.
  • the method disclosed in the foregoing embodiment of the present invention may be applied to the processor 701 or implemented by the processor 701.
  • the processor 701 may be an integrated circuit chip with signal processing capabilities. In the implementation process, the steps of the foregoing method can be completed by hardware integrated logic circuits in the processor 701 or instructions in the form of software.
  • the aforementioned processor 701 may be a general-purpose processor, a digital signal processor (DSP, Digital Signal Processor), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.
  • the processor 701 may implement or execute various methods, steps, and logical block diagrams disclosed in the embodiments of the present invention.
  • the general-purpose processor may be a microprocessor or any conventional processor.
  • the steps of the method disclosed in the embodiments of the present invention can be directly embodied as being executed and completed by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor.
  • the software module may be located in a storage medium, and the storage medium is located in the memory 702.
  • the processor 701 reads the information in the memory 702 and completes the steps of the foregoing method in combination with its hardware.
  • the electronic device 700 may be used by one or more application specific integrated circuits (ASIC, Application Specific Integrated Circuit), DSP, programmable logic device (PLD, Programmable Logic Device), and complex programmable logic device (CPLD). , Complex Programmable Logic Device), FPGA, general-purpose processor, controller, MCU, MPU, or other electronic components to implement the foregoing method.
  • ASIC Application Specific Integrated Circuit
  • DSP digital signal processor
  • PLD programmable logic device
  • CPLD complex programmable logic device
  • FPGA field-programmable Logic Device
  • controller MCU
  • MPU or other electronic components to implement the foregoing method.
  • the embodiment of the present application also provides a storage medium for storing computer programs.
  • the 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 in each method executed by the cloud proxy device in the embodiment of the present application.
  • the computer program causes the computer to execute the corresponding process in each method executed by the cloud proxy device in the embodiment of the present application.
  • the storage medium may be applied to the server device in the embodiment of the present application, and the computer program causes the computer to execute the corresponding process in each method executed by the server device in the embodiment of the present application.
  • the computer program causes the computer to execute the corresponding process in each method executed by the server device in the embodiment of the present application.
  • the storage medium may be applied to the server device in the embodiment of the present application, and the computer program causes the computer to execute the corresponding process in each method executed by the server device in the embodiment of the present application.
  • the storage medium can be applied to the cloud server in the embodiment of the present application, and the computer program causes the computer to execute the corresponding process in each method executed by the cloud server in the embodiment of the present application.
  • the computer program causes the computer to execute the corresponding process in each method executed by the cloud server in the embodiment of the present application.
  • the storage medium can be applied to the cloud server in the embodiment of the present application, and the computer program causes the computer to execute the corresponding process in each method executed by the cloud server in the embodiment of the present application.
  • the computer program causes the computer to execute the corresponding process in each method executed by the cloud server in the embodiment of the present application.
  • the storage medium can be applied to the configurator in the embodiment of the present application, and the computer program causes the computer to execute the corresponding process in each method executed by the configurator in the embodiment of the present application.
  • the computer program causes the computer to execute the corresponding process in each method executed by the configurator in the embodiment of the present application.
  • the storage medium can be applied to the configurator in the embodiment of the present application, and the computer program causes the computer to execute the corresponding process in each method executed by the configurator in the embodiment of the present application.
  • These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device.
  • the device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
  • These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment.
  • the instructions provide steps for implementing functions specified in a flow or multiple flows in the flowchart and/or a block or multiple blocks in the block diagram.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

本发明公开了一种影子设备的生成方法,包括:云端代理设备接收第一请求消息;所述云端代理设备基于所述第一请求消息,生成服务端设备的第一影子设备。云服务器接收第二请求消息;所述云服务器基于所述第二请求消息,为服务端设备的第一影子设备生成第二影子设备。本发明还公开了另一种影子设备的生成方法、设备及存储介质。

Description

一种影子设备的生成方法、设备及存储介质 技术领域
本发明涉及信息处理技术领域,尤其涉及一种影子设备的生成方法、设备及存储介质。
背景技术
相关技术中,为开放连接基金会(Open Connectivity Foundation,OCF)服务端设备生成影子设备,通过影子设备与OCF客户端设备进行远程通信,来提高通信处理效率。此时,要求OCF服务端设备具有与云服务器建立并维持安全传输层(Transport Layer Security,TLS)长连接的能力。但是,对于不具有与云服务器建立并维持TLS长连接能力的OCF服务端设备(也称为云端受限设备),无法在云服务器上生成影子设备。
发明内容
为解决上述技术问题,本发明实施例提供一种影子设备的生成方法、设备及存储介质,能够为云端受限设备在云服务器上生成影子设备。
第一方面,本发明实施例提供一种影子设备的生成方法,包括:云端代理设备接收第一请求消息;所述云端代理设备基于所述第一请求消息,生成服务端设备的第一影子设备。
第二方面,本发明实施例提供一种影子设备的生成方法,包括:服务端设备向云端代理设备发送第一请求消息,所述第一请求消息用于请求所述云端代理设备生成所述服务端设备的第一影子设备;所述服务端设备接收第一请求响应消息。
第三方面,本发明实施例提供一种影子设备的生成方法,包括:云服务器接收第二请求消息;所述云服务器基于所述第二请求消息,为服务端设备的第一影子设备生成第二影子设备。
第四方面,本发明实施例提供一种影子设备的生成方法,包括:配置器向云端代理设备发送第一请求消息,所述第一请求消息用于请求所述云端代理设备生成服务端设备的第一影子设备;所述配置器接收第一请求响应消息。
第五方面,本发明实施例提供一种云端代理设备,所述云端代理设备包括:
第一接收单元,配置为接收第一请求消息;
第一处理单元,配置为基于所述第一请求消息,生成服务端设备的第一影子设备。
第六方面,本发明实施例提供一种服务端设备,所述服务端设备包括:
第六发送单元,配置为向云端代理设备发送第一请求消息,所述第一请求消息用于请求所述云端代理设备生成所述服务端设备的第一影子设备;
第二接收单元,配置为接收第一请求响应消息。
第七方面,本发明实施例提供一种云服务器,所述云服务器包括:
第三接收单元,配置为接收第二请求消息;
第四处理单元,配置为基于所述第二请求消息,为服务端设备的第一影子设备生成第二影子设备。
第八方面,本发明实施例提供一种配置器,所述配置器包括:
第八发送单元,配置为向云端代理设备发送第一请求消息,所述第一请求消息用于请求所述云端代理设备生成服务端设备的第一影子设备;
第四接收单元,配置为接收第一请求响应消息。
第九方面,本发明实施例提供一种云端代理设备,包括处理器和用于存储能够在处理器上运行的计算机程序的存储器,其中,所述处理器用于运行所述计算机程序时,执行上述云端代理设备执行的影子设备的生成方法的步骤。
第十方面,本发明实施例提供一种服务端设备,包括处理器和用于存储能够在处理器上运行的计算机程序的存储器,其中,所述处理器用于运行所述计算机程序时,执行上述服务端设备执行的 影子设备的生成方法的步骤。
第十一方面,本发明实施例提供一种云服务器,包括处理器和用于存储能够在处理器上运行的计算机程序的存储器,其中,所述处理器用于运行所述计算机程序时,执行上述云服务器执行的影子设备的生成方法的步骤。
第十二方面,本发明实施例提供一种配置器,包括处理器和用于存储能够在处理器上运行的计算机程序的存储器,其中,所述处理器用于运行所述计算机程序时,执行上述配置器执行的影子设备的生成方法的步骤。
第十三方面,本发明实施例提供一种存储介质,存储有可执行程序,所述可执行程序被处理器执行时,实现上述云端代理设备执行的影子设备的生成方法。
第十四方面,本发明实施例提供一种存储介质,存储有可执行程序,所述可执行程序被处理器执行时,实现上述服务端设备执行的影子设备的生成方法。
第十五方面,本发明实施例提供一种存储介质,存储有可执行程序,所述可执行程序被处理器执行时,实现上述云服务器执行的影子设备的生成方法。
第十六方面,本发明实施例提供一种存储介质,存储有可执行程序,所述可执行程序被处理器执行时,实现上述配置器执行的影子设备的生成方法。
本发明实施例提供的影子设备的生成方法,包括:云端代理设备接收第一请求消息;所述云端代理设备基于所述第一请求消息,生成服务端设备的第一影子设备。云服务器接收第二请求消息;所述云服务器基于所述第二请求消息,为服务端设备的第一影子设备生成第二影子设备。如此,使得不具备直接接入云服务器的能力服务端设备,能够在云端代理设备及云服务器上生成影子设备。并且,通过服务端设备与第一影子设备、以及第一影子设备与第二影子设备之间的资源同步,使得客户端设备能够与第一影子设备或第二影子设备进行通信,进而提高了服务端设备的通信效率。
附图说明
图1为本发明客户端设备和服务端设备通信的流程示意图;
图2为本发明为服务端设备创建影子设备,以及服务端设备与影子设备的同步的流程示意图;
图3为本发明实施例应用于云端代理设备的影子设备的生成方法可选处理流程示意图;
图4为本发明实施例应用于服务端设备的影子设备的生成方法可选处理流程示意图;
图5为本发明实施例应用于云服务器的影子设备的生成方法可选处理流程示意图;
图6为本发明实施例应用于配置器的影子设备的生成方法可选处理流程示意图;
图7为本发明实施例一种影子设备的生成方法的详细处理流程示意图;
图8为本发明实施例另一种影子设备的生成方法的详细处理流程示意图;
图9为本发明实施例云端代理设备的组成结构示意图;
图10为本发明实施例服务端设备的组成结构示意图;
图11为本发明实施例云服务器的组成结构示意图;
图12为本发明实施例配置器的组成结构示意图;
图13为本发明实施例电子设备的硬件组成结构示意图。
具体实施方式
为了能够更加详尽地了解本发明实施例的特点和技术内容,下面结合附图对本发明实施例的实现进行详细阐述,所附附图仅供参考说明之用,并非用来限定本发明实施例。
在对本发明实施例提供的影子设备的生成方法进行详细说明之前,先对本发明实施例涉及的名词进行简要说明。
1)配置器,为服务端设备提供云服务器接入配置功能的工具,配置器的功能可以由应用软件实现。
2)资源链接,表示OCF资源之间的引用关系。
3)端点,为请求消息和响应消息的源端或者目的端。
4)服务端设备,为OCF服务器。
5)影子设备,为服务端设备生成的数字孪生设备,其他设备可以与影子设备直接通信,从而减轻服务端设备上消息处理的工作量,提高系统的通信效率。
6)资源目录,支持OCF设备发布资源和发现资源的逻辑功能实体。
再对OCF设备以及OCF设备之间的通信进行简要说明。
OCF是新兴的物联网应用层技术标准组织,OCF为物联网设备之间实现互联互通制定Restful服务框架;在OCF Restful服务框架中,通过资源来表述物联网设备、OCF设备的功能服务和OCF设备的状态等信息。其中,提供资源的实体是OCF服务端设备(以下简称服务端设备),访问资源的实体是OCF客户端(以下简称客户端设备)。
例如,获取室内环境状态数据的控制终端是客户端设备,监测室内环境状态数据的传感器设备是服务端设备,客户端设备和服务端设备的业务交互是通过对资源的创建、读取、更新、删除或者通知等资源操作方法而实现。
客户端设备和服务端设备通信的流程,如图1所示:客户端设备向服务端设备发送针对服务端设备上的资源的更新资源请求。服务端设备根据所述更新资源请求,执行相应的资源操作,并向客户端设备发送更新资源响应;其中,所述更新资源响应中携带资源的表述。
可选实施例中,资源更新请求的形式为:
Figure PCTCN2019097580-appb-000001
相应的,更新资源响应的形式为:
Figure PCTCN2019097580-appb-000002
这里,所述更新资源请求中携带资源的统一资源标识符(Uniform Resource Identifier,URI)以及资源操作方法;以图1为例,服务端设备上具有环境温度资源,资源的URI为“/environmentTemperature”;客户端设备向服务端设备请求的资源操作方法是更新方法POST。
资源的表述包括:资源的URI、资源类型、资源接口和资源的功能属性等,下面对资源的表述所包括的信息分别进行说明:
资源的URI,在资源的表述中用“href”表示,提供OCF服务端设备资源的地址,“href”的值是具体的资源的URI,OCF客户端设备通过资源的URI来访问OCF服务端设备的资源;在图1中环境温度资源的URI是“/environmentTemperature”。
资源类型,在资源的表述中用“rt”表示,表示资源的类型,在图1中资源类型“rt”是“oic.r.temperature”,表示温度资源类型。
资源接口,在资源的表述中用“if”表示,提供对资源的查看以及资源支持的响应,在图1中资源接口“if”是“oic.if.a”,表示控制器接口。
资源属性,在资源的表述中描述资源的属性信息,在图1中“targetTemperature”表示温度资源的目标温度属性,“currentTemperature”表示温度资源的当前温度属性,“temperatureRange”表示温度资源的温度范围属性。
OCF定义了所有OCF设备都必须支持的资源发现资源“/oic/res”,资源发现资源用于OCF设备以及资源的发现;资源发现资源提供设备资源发现的功能,资源发现资源的URI固定为“/oic/res”。
为表示资源之间的关联关系,OCF定义了资源链接,即资源Links;OCF服务端设备可以以资源链接的形式提供自己所拥有的资源,便于OCF客户端设备发现OCF服务端设备的资源。其中,资源链接的内容如下所示:
Figure PCTCN2019097580-appb-000003
资源链接的内容包括:
anchor:上下文URI,表示包含资源链接的属主资源的URI。
href:目标URI,即资源链接中引用的目标资源的URI。
rt:目标资源的资源类型标识。
if:目标资源支持的接口。
eps:可以访问目标资源的端点。
由于OCF标准协议在传输层采用受限制的应用协议(Constrained Application Protocol,CoAP)承载OCF消息,每个OCF服务端设备需要具有端点,每一个OCF设备必须关联至少一个端点用于发送和接收消息;客户端设备通过端点可以访问服务端设备的目标资源。在资源链接的参数中用“eps”数组表示目标资源的端点,具体端点用“ep”表示,即可以通过"eps"参数中"ep"值的地址访问目标资源。例如上面资源链接的例子中,客户端设备可以通过消息端点"coaps://[2001:db8:b::c2e5]:22222"访问目标资源"/myLightSwitch"。
对于一些特定的场景,例如不需要频繁更新状态的IoT设备,客户端设备通过和服务端设备的影子设备通信,可以提高系统通信效率。OCF云服务器实现影子服务,OCF云服务的影子服务为每个OCF服务端设备创建一个影子设备,影子设备可以直接响应客户端设备的请求,而无需获取服务端设备的资源表述;通过这种方式客户端设备不需要和服务端设备通信就可以获取服务端设备的资源表述,从而减轻服务端设备上的消息处理工作量,提高系统的通信效率。
相关技术中,为服务端设备创建影子设备,以及服务端设备与影子设备的同步过程如图2所示,包括以下步骤:
1、配置器配置服务端设备:配置器为服务端设备执行影子配置过程,向服务端设备的影子配置资源发送资源更新请求,为服务端设备生成影子设备提供影子服务信息;其中。影子服务信息包括:影子服务标识、影子生成资源的URI、生成影子设备的指示;其中,影子服务标识表示影子服务的标识信息,影子生成资源的URI提供访问影子生成资源“oic.wk.shadow.gen”的URI(例如影子生成资源的URI是/oic/shadow/gen),生成影子设备的指示用于指示原始设备是否生成影子设备。
2、为服务端设备生成影子设备:通过第1步服务端设备获得了影子服务信息,其中包括影子生成资源的URI,服务端设备针对影子生成资源的URI向云服务器发送创建影子设备的请求,请求中提供需要复制的原始资源信息;云服务器接收服务端设备的请求后,为服务端设备生成影子设备;其中,影子设备包括与原始资源信息对应的复制资源信息。
3、配置器配置影子设备:配置器为影子设备执行配置过程,影子设备获取访问控制信息。
4、云服务器收到资源更新请求:云服务器接收到客户端设备针对影子设备上复制资源的更新请求。
5、影子设备和服务端设备同步资源:服务端设备和影子设备通过影子同步资源建立同步关系,服务端设备和影子设备进行信息同步。
6、影子设备向客户端设备发送同步消息。
在执行图2所示的流程中,要求服务端设备具有与云服务器建立并维持TLS长连接能力,即服务端设备具备直接接入云服务器的能力。然而,对于不具备直接接入云服务器的能力的服务端设备来说,无法在云服务器上生成影子设备;因此,也无法通过影子设备的特性提高通信处理效率。
基于上述问题,本发明提供一种影子设备的生成方法,本发明实施例提供的应用于云端代理设备的影子设备的生成方法的一种可选处理流程,如图3所示,包括以下步骤:
步骤S201,云端代理设备接收第一请求消息。
步骤S202,云端代理设备基于所述第一请求消息,生成服务端设备的第一影子设备。
在第一种实施例中,在执行步骤S201之前,所述方法还包括:
步骤S200a,云端代理设备接收配置器发送的第一资源发现请求消息。
其中,第一资源发现请求消息指示所述云端代理设备的资源类型;例如,云端代理设备的资源类型为oic.r.cloudproxy。
步骤S200b,云端代理设备向配置器发送第一资源发现请求响应消息。
其中,所述第一资源发现请求响应消息包括:所述云端代理设备的资源链接;所述云端代理设备的资源链接包括下述中的至少一项:所述云端代理设备的资源类型和所述云端代理设备的资源的端点。可选地,所述云端代理设备的资源链接还可以包括服云端代理设备资源的URI。例如,云端代理设备的资源类型为oic.r.cloudproxy,云端代理设备资源的URI为/oic/cloudproxy,云端代理资源的端点为coaps://[fe80::2]:3333。
步骤S200c,云端代理设备接收配置器发送的获取影子服务信息的请求消息。
步骤S200d,云端代理设备向配置器发送获取影子服务信息的请求响应消息。
其中,所述获取影子服务信息的请求响应消息包括下述中的至少一项:影子服务的标识和影子服务的端点。
针对步骤S201,云端代理设备接收配置器发送的第一请求消息。并且,云端代理设备在接收配置器发送的第一请求消息之前,所述方法还包括:
所述云端代理设备接收配置器发送的云端代理设备的影子服务信息。
在具体实施时,配置器针对服务端设备的影子配置资源,向云端代理设备发送更新请求消息。其中,所述服务端设备的影子配置资源为:/oic/shadow/conf;所述云端代理设备的影子服务信息包括下述中的至少一项:所述云端代理设备上的影子服务的标识和影子服务的端点。可选地,所述云端代理设备的影子服务信息还可以包括:需要复制到所述云端代理设备的原始资源链接;其中,所述原始资源链接,是指服务端设备的资源链接。
针对步骤S202,云端代理设备为服务端设备生成第一影子设备;在具体实施时,由云端代理设备内的影子服务为服务端设备生成第一影子设备。
其中,所述第一影子设备的复制资源的URL包括所述服务端设备的设备标识。
可选地,所述第一影子设备的描述信息包括第二指示信息,所述第二指示信息用于指示所述第一影子设备不具备直接接入云服务器的能力。在具体实施时,所述第一影子设备不具备直接接入云服务器的能力,可通过所述第一影子设备的描述信息中的设备类型来表征。
在执行步骤S202之后,所述方法还包括:
步骤S203,云端代理设备向配置器发送第一请求响应消息。
其中,所述第一请求响应消息包括:所述第一影子设备的资源链接;所述第一影子设备的资源链接可以包括下述中的至少一项:所述第一影子设备的标识和所述第一影子设备的端点。
可选地,所述第一请求响应消息还包括第三指示信息,所述第三指示信息用于指示所述第一影子设备不具备直接接入云服务器的能力。在具体实施时,所述第一影子设备不具备直接接入云服务器的能力,可通过所述第一影子设备的描述信息中的设备类型来表征。
在执行完步骤S203之后,并且云服务器为第一影子设备生成第二影子设备之后,所述方法还包括:
步骤S204,云端代理设备关联第一影子设备和第二影子设备。
在具体实施时,云端代理设备接收配置器发送的针对影子配置资源的更新请求消息;其中,影子配置资源为:/oic/shadow/conf。所述针对影子配置资源的更新请求消息包括下述中的至少一项:所述第二影子设备的标识、所述第二影子设备的端点、和所述第二影子设备的影子同步资源;可选地,所述针对影子配置资源的更新请求消息还可以包括云服务器的影子服务标识。举例来说,所述针对影子配置资源的更新请求消息包括:所述第二影子设备的标识、所述第二影子设备的端点、和所述第二影子设备的影子同步资源。或者,所述针对影子配置资源的更新请求消息还可以包括云服务器的影子服务标识。举例来说,所述针对影子配置资源的更新请求消息包括:所述第二影子设备的标识、所述第二影子设备的端点、所述第二影子设备的影子同步资源和云服务器的影子服务标识。
在执行步骤S204之后,所述方法还包括:
步骤S205,配置器开启第一影子设备与第二影子设备之间的资源同步,以及第一影子设备与服务端设备之间的资源同步。
步骤S206,云端代理设备接收云服务器发送的资源同步请求。
其中,所述资源同步请求中目标资源为影子同步资源/oic/shadow/sync,设备标识为第二影子设备的设备标识,资源的URI包括服务端设备的设备标识。
步骤S207,云端代理设备向服务端设备发送资源同步请求。
其中,所述资源同步请求中目标资源为影子同步资源/oic/shadow/sync;所述资源同步请求中的设备标识为,所述第一影子设备的设备标识;所述资源同步请求中资源的URI不包括所述服务端设备的设备标识。
步骤S208,云端代理设备接收服务端设备发送的同步结果,并将同步结果发送给云服务器。
在第二种实施例中,在执行步骤S201之前,所述方法还包括:
步骤S200a’,云端代理设备接收服务端设备发送的第一资源发现请求消息。
其中,第一资源发现请求消息指示所述云端代理设备的资源类型;例如,云端代理设备的资源类型为oic.r.cloudproxy。
步骤S200b’,云端代理设备向服务端设备发送第一资源发现请求响应消息。
其中,所述第一资源发现请求响应消息包括:所述云端代理设备的资源链接;所述云端代理设备的资源链接包括下述中的至少一项:所述云端代理设备的资源类型和所述云端代理设备的资源的端点。可选地,所述云端代理设备的资源链接还可以包括服云端代理设备资源的URI。例如,云端代理设备的资源类型为oic.r.cloudproxy,云端代理设备资源的URI为/oic/cloudproxy,云端代理资源的端点为coaps://[fe80::2]:3333。
步骤S200c’,云端代理设备接收服务端设备发送的获取影子服务信息的请求消息。
步骤S200d’,云端代理设备向服务端设备发送获取影子服务信息的请求响应消息。
其中,所述获取影子服务信息的请求响应消息包括下述中的至少一项:影子服务的标识和影子服务的端点。
第二种实施例中针对步骤S202的说明,与第一种实施例中针对步骤S202的说明相同,这里不再赘述。
在执行步骤S202之后,所述方法还包括:
步骤S203’,云端代理设备向服务端设备发送第一请求响应消息。
需要说明的是,步骤S203’中针对第一请求响应消息的说明,与步骤S203中针对第一请求响应消息的说明相同,这里不再赘述。
在执行完步骤S203’之后,所述方法还包括:
云端代理设备向云服务器发送第二请求消息,所述第二请求消息用于请求云服务器为第一影子设备生成第二影子设备。其中,所述第二请求消息包括下述中的至少一项:所述第一影子设备的影子同步资源、所述第一影子设备的复制资源链接和所述第一影子设备的端点。可选地,所述第二请求消息包括第四指示信息,所述第四指示信息用于指示所述服务端设备不具备直接接入云服务器的能力。在具体实施时,所述服务端设备不具备直接接入云服务器的能力,可通过服务端设备的描述信息中的设备类型来表征。
相应的,所述方法还包括:云端代理设备接收所述云服务器发送的第二请求响应消息;所述第二请求响应消息包括:所述第二影子设备的资源链接。其中,所述第二影子设备的资源链接包括下述中的至少一项:所述第二影子设备的标识和所述第二影子设备的端点。可选地,所述第二请求响应消息还包括第五指示信息,所述第五指示信息用于指示所述第二影子设备不具备直接接入云服务器的能力。在具体实施时,所述第二影子设备不具备直接接入云服务器的能力,可通过第二影子设备的描述信息中的设备类型来表征。
云服务器为第一影子设备生成第二影子设备之后,所述方法还包括:
步骤S204’,云端代理设备关联第一影子设备和第二影子设备。
在具体实施时,云端代理设备上的第一影子设备更新自己的影子配置资源/oic/shadow/conf,为自己配置云服务器上的第二影子设备的标识、第二影子设备的端点和第二影子设备的影子同步资源/oic/shadow/sync;可选地,云端代理设备上的第一影子设备还可以为自己配置云服务器上的影子服务标识。
步骤S205’,云端代理设备开启第一影子设备与服务端设备之间的资源同步,以及云端代理设备与第二影子设备之间的资源同步。
在执行步骤S205’之后,执行上述第一种实施例中的步骤S206至步骤S208。
本发明实施例提供的应用于服务端设备的影子设备的生成方法可选处理流程,如图4所示,包括:
步骤S301,服务端设备向云端代理设备发送第一请求消息,所述第一请求消息用于请求所述云端代理设备生成所述服务端设备的第一影子设备。
需要说明的是,本发明实施例中针对第一请求消息的说明,与上述步骤S201中针对第一请求消息的说明相同,这里不再赘述。
步骤S302,服务端设备接收第一请求响应消息。
在具体实施时,服务端设备接收云端代理设备发送的第一请求响应消息。本发明实施例中针对第一请求响应消息,与上述步骤S203中针对第一请求响应消息的说明相同,这里不再赘述。
在执行步骤S302之后,所述方法还包括:
步骤S303,服务端设备将自身与所述第一影子设备进行关联。
在具体实施时,服务端设备通过更新自身的影子配置资源,为自身配置下述中的至少一项:所述第一影子设备的标识、所述第一影子设备的端点、和所述第一影子设备的影子同步资源。
举例来说,服务端设备更新自己的影子配置资源/oic/shadow/conf,为自己配置云端代理设备上的影子设备的标识、影子设备的端点和影子设备的影子同步资源/oic/shadow/sync中的至少一项。
在执行步骤S303之后,所述方法还包括:
步骤S304,服务端设备开启服务端设备与第一影子设备之间的资源同步。
步骤S305,服务端设备接收云端代理设备发送的资源同步请求。
需要说明的是,本发明实施例针对资源同步请求的说明,与步骤S207中针对资源同步请求的说明相同,这里不再赘述。
本发明实施例中,在执行步骤S301之前,所述方法还包括:
步骤S300a’,服务端设备向云端代理设备发送第一资源发现请求消息。
需要说明的是,本发明实施例中,针对第一资源发现请求消息的说明,与上述步骤S200a’中针对第一资源发现请求消息的说明相同,这里不再赘述。
步骤S300b’,服务端设备接收云端代理设备发送的第一资源发现请求响应消息。
需要说明的是,本发明实施例中,针对第一资源发现请求响应消息的说明,与上述步骤S200b’中针对第一资源发现请求响应消息的说明相同,这里不再赘述。
步骤S300c’,服务端设备向云端代理设备发送获取影子服务信息的请求消息。
步骤S300d’,服务端设备接收云端代理设备发送的获取影子服务信息的请求响应消息。
需要说明的是,本发明实施例中,针对获取影子服务信息的请求响应消息的说明,与上述步骤S300d’中针对获取影子服务信息的请求响应消息的说明相同,这里不再赘述。
本发明实施例提供的应用于云服务器的影子设备的生成方法可选处理流程,如图5所示,包括:
步骤S401,云服务器接收第二请求消息。
步骤S402,云服务器基于第二请求消息,为服务端设备的第一影子设备生成第二影子设备。
在第一种实施例中,针对步骤S401,云服务器接收配置器发送的第二请求消息。
在第二种实施例中,针对步骤S401,云服务器接收云端代理设备发送的第二请求消息。
本发明实施例中,所述第二请求消息包括下述中的至少一项:所述第一影子设备的影子同步资源、所述第一影子设备的复制资源链接和所述第一影子设备的端点。可选地,所述第二请求消息包括第四指示信息,所述第四指示信息用于指示服务端设备不具备直接接入云服务器的能力。在具体实施时,服务端设备不具备直接接入云服务器的能力可通过云服务器的描述信息中的设备类型来表征。
针对步骤S402,第二影子设备的复制资源的URI保持不变,即第二影子设备的目标URI不加上云端代理设备的设备标识。
在执行步骤S402之后,所述方法还包括:
步骤S403,所述云服务器发送第二请求响应消息;所述第二请求响应消息包括:所述第二影子设备的资源链接。
其中,所述第二影子设备的资源链接包括下述中的至少一项:所述第二影子设备的标识和所述第二影子设备的端点。可选地,所述第二请求响应消息还包括第五指示信息,所述第五指示信息用于指示所述第二影子设备不具备直接接入云服务器的能力。可选地,所述第二影子设备不具备直接接入云服务器的能力可通过第二影子设备的设备类型表征。
步骤S404,云服务器开启第二影子设备与第一影子设备之间的资源同步。
步骤S405,云服务器将第二影子设备的复制资源链接发布至云服务器的资源发现目录。
在具体实施时,步骤S405可在步骤S402之后执行,步骤S405与步骤S403之间不存在执行的先后顺序,步骤S405与步骤S404之间也不存在执行的先后顺序。
本发明实施例提供的应用于配置器的影子设备的生成方法可选处理流程,如图6所示,包括:
步骤S501,配置器向云端代理设备发送第一请求消息,所述第一请求消息用于请求所述云端代理设备生成服务端设备的第一影子设备。
需要说明的是,本发明实施例中针对第一请求消息的说明,与上述步骤S201中针对第一请求消息的说明相同,这里不再赘述。
步骤S502,配置器接收第一请求响应消息。
在具体实施时,配置器接收云端代理设备发送的第一请求响应消息。本发明实施例中针对第一请求响应消息,与上述步骤S203中针对第一请求响应消息的说明相同,这里不再赘述。
配置器接收到第一请求响应消息,关联服务端设备与云端代理设备上的第一影子设备。在具体实施时,配置器向服务端设备的影子配置资源/oic/shadow/conf发送更新请求消息;所述更新请求消 息中包括下述中的至少一项:云端代理设备上的第一影子设备的标识、第一影子设备的端点、以及第一影子设备的影子同步资源/oic/shadow/sync。
在执行步骤S502之后,所述方法还包括:
步骤S503,配置器向云服务器发送第二请求消息,所述第二请求消息用于请求所述云服务器为所述第一影子设备生成第二影子设备。
需要说明的是,本发明实施例中针对第二请求消息的说明,与上述步骤S401中针对第二请求消息的说明相同,这里不再赘述。
步骤S504,配置器接收所述云服务器发送的第二请求响应消息。
需要说明的是,本发明实施例中针对第二请求响应消息的说明,与上述步骤S402中针对第二请求响应消息的说明相同,这里不再赘述。
步骤S505,配置器关联第一影子设备和第二影子设备。
在具体实施时,配置器向云端代理设备发送针对影子配置资源的更新请求消息;所述针对影子配置资源的更新请求消息包括下述中的至少一项:所述第二影子设备的标识、所述第二影子设备的端点、所述第二影子设备的影子同步资源、和云服务器的影子服务标识。
其中,影子配置资源为/oic/shadow/conf,影子同步资源为/oic/shadow/sync。
步骤S506,配置器配置所述第一影子设备与所述第二影子设备之间的资源同步,以及所述第一影子设备与所述服务端设备之间的资源同步。
在执行步骤S501之前,所述方法还包括:
步骤S500a,配置器向服务端设备发送第二资源发现请求消息。
步骤S500b,配置器接收服务端设备发送的第二资源发现请求响应消息。
需要说明的是,本发明实施例中,针对第二资源发现请求消息和第二资源发现请求响应消息的说明,与上述实施例中针对二资源发现请求消息和第二资源发现请求响应消息的说明相同,这里不再赘述。
步骤S500c,配置器向云端代理设备发送第一资源发现请求消息。
需要说明的是,本发明实施例中,针对第一资源发现请求消息的说明,与上述步骤S200a’中针对第一资源发现请求消息的说明相同,这里不再赘述。
步骤S500d,配置器接收云端代理设备发送的第一资源发现请求响应消息。
需要说明的是,本发明实施例中,针对第一资源发现请求响应消息的说明,与上述步骤S200b’中针对第一资源发现请求响应消息的说明相同,这里不再赘述。
步骤S500e,配置器向云端代理设备发送获取影子服务信息的请求消息。
需要说明的是,本发明实施例中,针对获取影子服务信息的请求消息的说明,与上述步骤S200c’中针对获取影子服务信息的请求消息的说明相同,这里不再赘述。
步骤S500f,配置器接收云端代理设备发送的获取影子服务信息的请求响应消息。
需要说明的是,本发明实施例中,针对获取影子服务信息的请求响应消息的说明,与上述步骤S200d’中针对获取影子服务信息的请求响应消息的说明相同,这里不再赘述。
本发明实施例提供的一种影子设备的生成方法的详细处理流程,如图7所示,由配置器控制影子设备的生成,包括以下步骤:
步骤S601,配置器发现服务端设备。
在具体实施时,配置器向服务端设备发送资源发现请求;请求消息中指定服务端设备资源类型。例如,服务端设备的资源类型为oic.r.cloudconstrained。
步骤S602,服务端设备向配置器发送发现服务端设备响应。
在具体实施时,发现服务端设备响应中携带服务端设备的资源链接;服务端设备的资源链接包括下述中的至少一项:服务端设备资源类型、服务端设备资源的URI、服务端设备资源的端点信息。
举例来说,服务端设备向配置器返回的服务端设备的资源类型为oic.r.cloudconstrained,服务端设备资源的URI为/oic/cloudconstrained,服务端设备资源的端点为coaps://[fe80::1]:2222。
步骤S603,配置器发现云端代理设备。
在具体实施时,配置器向云端代理设备发送资源发现请求;所述资源发现请求中指定云端代理设备的资源类型。例如,云端代理设备的资源类型为oic.r.cloudproxy。
步骤S604,云端代理设备向配置器发送发现云端代理设备响应。
在具体实施时,发现云端代理设备响应中携带云端代理设备的资源链接;云端代理设备的资源链接包括下述中的至少一项:云端代理设备的资源类型、云端代理设备资源的URI、云端代理设备 资源的端点云端代理设备的资源链接。
举例来说,云端代理设备向配置器返回的云端代理设备的资源类型为oic.r.cloudproxy,云端代理设备资源的URI为/oic/cloudproxy,云端代理资源的端点为coaps://[fe80::2]:3333。
步骤S605,配置器向云端代理设备请求获取影子服务信息。
步骤S606,云端代理设备向配置器返回影子服务信息。
其中,影子服务信息包括下述中的至少一项:影子服务的标识和影子服务的端点。
步骤S607,配置器配置服务端设备。
在一些实施例中,配置器为服务端设备配置云端代理设备的影子服务信息。
在具体实施时,配置器向服务端设备的影子配置资源/oic/shadow/conf发送更新请求,更新请求中提供云端代理设备上的影子服务的标识和影子服务的端点。
可选的,配置器还可以为服务端设备配置需要复制到云端代理设备的原始资源链接。
步骤S608,配置器向云端代理设备的影子服务请求为服务端设备生成影子设备。
在一些实施例中,生成影子设备的请求中可以包括:云端受限设备的指示,用于指示生成影子设备的原始设备(即服务端设备)是云端受限设备。
在具体实施时,配置器向云端代理设备的影子生成资源/oic/shadow/gen发送创建请求,创建请求中携带服务端设备的原始资源链接和服务端设备的端点。其中,服务端设备的原始资源链接用于为服务端设备的原始资源生成对应的复制资源。可选的,创建请求中还可以携带服务端设备的指示,用于指示生成影子设备的原始设备(即服务端设备)是云端受限设备。
步骤S609,云端代理设备的影子服务为服务端设备生成第一影子设备。
这里,第一影子设备的复制资源的URI包括服务端设备的设备标识。
在一些实施例中,第一影子设备的描述信息中可以指示第一影子设备是云端受限设备。
可选的,云端代理设备将第一影子设备的复制资源链接发布到云端代理设备的资源发现目录。
步骤S610,云端代理设备向配置器发送生成第一影子设备响应。
在一些实施例中,生成第一影子设备响应中携带云端代理设备上生成的第一影子设备的资源链接。
其中,所述资源链接包括下述中的至少一项:影子设备的/oic/res资源的资源链接和影子同步资源(/oic/shadow/sync资源)的资源链接;/oic/res资源和/或影子同步资源的链接中包括云端代理设备上的影子设备的标识和影子设备的端点。
可选的,生成第一影子设备响应中还可以指示第一影子设备是云端受限设备。
步骤S611,配置器将服务端设备关联到云端代理设备上的第一影子设备。
在具体实施时,配置器向服务端设备的影子配置资源/oic/shadow/conf发送更新请求;所述更新请求包括下述中的至少一项:云端代理设备上的第一影子设备的标识、第一影子设备的端点和第一影子设备的影子同步资源/oic/shadow/sync。
其中,第一影子设备的影子同步资源/oic/shadow/sync在步骤S610中获得。
服务端设备和对应的第一影子设备关联后,配置器为云端代理设备上的第一影子设备生成云服务器上的第二影子设备。
步骤S612,配置器配置云端代理设备上的第一影子设备,为第一影子设备配置需要复制到云服务器的复制资源链接。
在具体实施时,配置器向云端代理设备的影子配置资源/oic/shadow/conf发送更新请求,更新请求中提供云端代理设备上的第一影子设备需要复制到云服务器的复制资源链接。
步骤S613,配置器向云服务器的影子服务请求为第一影子设备生成云服务器上的第二影子设备。
可选的,生成影子设备请求中可以指示请求生成影子设备的原始设备(第一影子设备)是云端受限设备。
在具体实施时,配置器向云服务器的影子生成资源/oic/shadow/gen发送创建请求,创建请求中携带下述中的至少一项:第一影子设备的影子同步资源/oic/shadow/sync、第一影子设备上的复制资源链接(即云端代理设备为服务端设备的原始资源生成的复制资源)、第一影子设备的端点。
在一些可选实施例中,创建请求还指示生成影子设备的原始设备(即第一影子设备)是云端受限设备。
步骤S614,云服务器的影子服务为第一影子设备生成第二影子设备。
本发明实施例中,生成的第二影子设备的复制资源的URI保持不变,即影子设备的目标URI不包括云端代理设备的设备标识。
可选的,生成的第二影子设备可以指示第二影子设备是云端受限设备。
可选的,云服务器将第二影子设备的复制资源链接发布到云服务器的资源发现目录。
步骤S615,云服务器向配置器发送生成第二影子设备响应。
本发明实施例中,生成影子设备响应中携带第二影子设备的资源链接,资源链接包括影子设备的/oic/res资源的资源链接和影子同步资源(/oic/shadow/sync资源)的资源链接;/oic/res资源和/或影子同步资源的链接中包括云服务器上的第二影子设备的标识、第二影子设备的端点。
可选的,生成影子设备响应中还可以指示第二影子设备是云端受限设备。
步骤S616,配置器将云端代理设备上的第一影子设备关联到云服务器上的第二影子设备。
在具体实施时,配置器向云端代理设备上的影子配置资源/oic/shadow/conf发送更新请求,更新请求中提供云服务器上的第二影子设备的标识、第二影子设备的端点和第二影子设备的影子同步资源/oic/shadow/sync(在步骤S615中获得);可选地,更新请求中还可以包括云服务器的影子服务标识;此时,配置器已默认配置了云服务器的影子服务标识。
需要说明的是,配置器可以先关联服务端设备与第一影子设备,再请求生成第二影子设备;即先执行步骤S611,再执行步骤S612至步骤S615。配置器也可以先请求生成第二影子设备,再关联服务端设备与第一影子设备;即先执行步骤S612至步骤S615,再执行步骤S611。并且,配置器可以先关联服务端设备与第一影子设备,再关联第一影子设备与第二影子设备;即先执行步骤S611,再执行步骤S616。配置器可以先关联第一影子设备与第二影子设备,再关联服务端设备与第一影子设备;即先执行步骤S616,再执行步骤S611。
步骤S617,配置器为服务端设备、云端代理设备上的第一影子设备、云服务器上的第二影子设备开启资源同步。
本发明实施例中,开启资源同步后,服务端设备和云端代理设备上的第一影子设备之间进行资源同步,云端代理设备上的第一影子设备和云服务器上的第二影子设备进行资源同步。
步骤S618,云服务器上的第二影子设备向云端代理设备上的第一影子设备发送资源同步请求。
本发明实施例中,所述资源同步请求中的目标资源为影子同步资源(/oic/shadow/sync资源),设备标识为云服务器上的第二影子设备的设备标识,资源的URI带有云端受限设备的设备标识。
步骤S619,云端代理设备上的第一影子设备向服务端设备发送资源同步请求。
本发明实施例中,所述资源同步请求的目标资源为影子同步资源(/oic/shadow/sync资源),设备标识为云端代理设备上的第一影子设备的设备标识,资源的URI去掉了服务端设备的设备标识。
步骤S620-S621,服务端设备将资源同步结果发送给云端代理设备上的第一影子设备,云端代理设备上的第一影子设备将资源同步结果发送给云服务器上的第二影子设备。
本发明实施例提供的另一种影子设备的生成方法的详细处理流程,如图8所示,由服务端设备控制影子设备的生成,包括以下步骤:
步骤S801,服务端设备发现云端代理设备。
在具体实施时,服务端设备向云端代理设备发送资源发现请求所述资源发现请求中指定云端代理设备的资源类型。例如,云端代理设备的资源类型为oic.r.cloudproxy。
步骤S802,云端代理设备向服务端设备发送发现云端代理设备响应。
在具体实施时,发现云端代理设备响应中携带云端代理设备的资源链接;云端代理设备的资源链接包括下述中的至少一项:云端代理设备的资源类型、云端代理设备资源的URI、云端代理设备资源的端点云端代理设备的资源链接。
举例来说,云端代理设备向服务端设备返回的云端代理设备的资源类型为oic.r.cloudproxy,云端代理设备资源的URI为/oic/cloudproxy,云端代理资源的端点为coaps://[fe80::2]:3333。
步骤S803,服务端设备向云端代理设备请求获取影子服务信息。
步骤S804,云端代理设备向服务端设备返回影子服务信息。
其中,影子服务信息包括下述中的至少一项:影子服务的标识和影子服务的端点。
步骤S805,服务端设备向云端代理设备的影子服务请求为服务端设备生成影子设备。
在一些实施例中,生成影子设备的请求中可以包括:云端受限设备的指示,用于指示请求生成影子设备的原始设备是云端受限设备。
在具体实施时,服务端设备向云端代理设备的影子生成资源/oic/shadow/gen发送创建请求,创建请求中携带服务端设备的原始资源链接和服务端设备的端点。其中,服务端设备的原始资源链接用于为服务端设备的原始资源生成对应的复制资源。
可选的,创建请求中还可以携带服务端设备的指示,用于指示生成影子设备的原始设备是云端 受限设备。
步骤S806,云端代理设备的影子服务为服务端设备生成第一影子设备。
这里,第一影子设备的复制资源的URI包括服务端设备的设备标识。
在一些实施例中,第一影子设备的描述信息中可以指示第一影子设备是云端受限设备。
可选的,云端代理设备将第一影子设备的复制资源链接发布到云端代理设备的资源发现目录。
步骤S807,云端代理设备向服务端设备发送生成第一影子设备响应。
在一些实施例中,生成第一影子设备响应中携带云端代理设备上生成的第一影子设备的资源链接。
其中,所述资源链接包括下述中的至少一项:影子设备的/oic/res资源的资源链接和影子同步资源(/oic/shadow/sync资源)的资源链接;/oic/res资源和/或影子同步资源的链接中包括云端代理设备上的影子设备的标识和影子设备的端点。
可选的,生成第一影子设备响应中还可以指示第一影子设备是云端受限设备。
步骤S808,服务端设备将自身关联到云端代理设备上的第一影子设备。
在具体实施时,服务端设备更新自身的影子配置资源/oic/shadow/conf,为自身配置云端代理设备上的第一影子设备的标识、第一影子设备的端点和第一影子设备的影子同步资源/oic/shadow/sync。
其中,第一影子设备的影子同步资源/oic/shadow/sync在步骤S807中获得。
步骤S809,云端代理设备向云服务器的影子服务请求为第一影子设备生成云服务器上的第二影子设备。
可选的,生成影子设备请求中可以指示请求生成影子设备的原始设备(第一影子设备)是云端受限设备。
在具体实施时,云端代理设备向云服务器的影子生成资源/oic/shadow/gen发送创建请求,创建请求中携带下述中的至少一项:第一影子设备的影子同步资源/oic/shadow/sync、第一影子设备上的复制资源链接(即云端代理设备为服务端设备的原始资源生成的复制资源)、第一影子设备的端点。
在一些可选实施例中,创建请求还指示生成影子设备的原始设备(即第一影子设备)是云端受限设备。
步骤S810,云服务器的影子服务为第一影子设备生成第二影子设备。
本发明实施例中,生成的第二影子设备的复制资源的URI保持不变,即影子设备的目标URI不包括云端代理设备的设备标识。
可选的,生成的第二影子设备可以指示第二影子设备是云端受限设备。
可选的,云服务器将第二影子设备的复制资源链接发布到云服务器的资源发现目录。
步骤S811,云服务器向云端代理设备发送生成影子设备响应。
本发明实施例中,生成影子设备响应中携带第二影子设备的资源链接,资源链接包括影子设备的/oic/res资源的资源链接和影子同步资源(/oic/shadow/sync资源)的资源链接;/oic/res资源和/或影子同步资源的链接中包括云服务器上的第二影子设备的标识、第二影子设备的端点。
可选的,生成影子设备响应中还可以指示第二影子设备是云端受限设备。
步骤S812,云端代理设备上的第一影子设备关联到云服务器上的第二影子设备关联。
在具体实施时,云端代理设备上的第一影子设备更新自身的影子配置资源/oic/shadow/conf,为自身配置云服务器上的第二影子设备的标识、第二影子设备的端点和第二影子设备的影子同步资源/oic/shadow/sync;可选地,云端代理设备上的第一影子设备还可以为自身配云服务器上的影子服务标识。
需要说明的是,服务端设备与第一影子设备关联可以发生在云服务器生成第二影子设备之前;即先执行步骤S808,再执行步骤S809至步骤S811。服务端设备与第一影子设备关联也可以发生在云服务器生成第二影子设备之后;即先执行步骤S809至步骤S811,再执行步骤S808。并且,服务端设备与第一影子设备关联,和第一影子设备与第二影子设备关联也不存在执行的前后顺序,即可以先执行步骤S809,再执行步骤S812;也可以先执行步骤S812,再执行步骤S809。
步骤S813-S814,服务端设备、云端代理设备上的第一影子设备、云服务器上的第二影子设备开启资源同步。
在具体实施时,可以由服务端设备、云端理设备上的第一影子设备、云服务器上的第二影子设备中的任意一个开启资源同步。
本发明实施例中,开启资源同步后,服务端设备和云端代理设备上的第一影子设备之间进行资源同步,云端代理设备上的第一影子设备和云服务器上的第二影子设备进行资源同步。
步骤S815,云服务器上的第二影子设备向云端代理设备上的第一影子设备发送资源同步请求。
本发明实施例中,所述资源同步请求中的目标资源为影子同步资源(/oic/shadow/sync资源),设备标识为云服务器上的第二影子设备的设备标识,资源的URI带有云端受限设备的设备标识。
步骤S816,云端代理设备上的第一影子设备向服务端设备发送资源同步请求。
本发明实施例中,所述资源同步请求的目标资源为影子同步资源(/oic/shadow/sync资源),设备标识为云端代理设备上的第一影子设备的设备标识,资源的URI去掉了服务端设备的设备标识。
步骤S817-S818,服务端设备将资源同步结果发送给云端代理设备上的第一影子设备,云端代理设备上的第一影子设备将资源同步结果发送给云服务器上的第二影子设备。
为实现上述影子设备的生成方法,本发明实施例还提供一种云端代理设备,所述云端代理设备900的组成结构,如图9所示,包括:
第一接收单元901,配置为接收第一请求消息;
第一处理单元902,配置为基于所述第一请求消息,生成服务端设备的第一影子设备。
本发明实施例中,所述第一请求消息由配置器发送至所述云端代理设备,或者所述第一请求消息由所述服务端设备发送至所述云端代理设备。
本发明实施例中,所述第一接收单元901,还配置为接收配置器发送的所述云端代理设备的影子服务信息。其中,所述云端代理设备的影子服务信息包括下述中的至少一项:所述云端代理设备上的影子服务的标识、和影子服务的端点。
本发明实施例中,所述云端代理设备的影子服务信息包括:需要复制到所述云端代理设备的原始资源链接。
本发明实施例中,所述第一请求消息包括下述中的至少一项:所述服务端设备的原始资源链接和所述服务端设备的端点。
本发明实施例中,所述第一请求消息包括第一指示信息,所述第一指示信息用于指示所述服务端设备不具备直接接入云服务器的能力。
本发明实施例中,所述第一影子设备的复制资源的统一资源标识符包括所述服务端设备的设备标识。
本发明实施例中,所述第一影子设备的描述信息包括第二指示信息,所述第二指示信息用于指示所述第一影子设备不具备直接接入云服务器的能力。
本发明实施例中,所述第一处理单元902,还配置为将所述第一影子设备的复制资源链接发布至所述云端代理设备的资源发现目录。
本发明实施例中,所述云端代理设备900还包括:
第一发送单元903,配置为发送第一请求响应消息;所述第一请求响应消息包括:所述第一影子设备的资源链接。所述第一请求响应消息发送至配置器,或者所述第一请求响应消息发送至所述服务端设备。
其中,所述第一影子设备的资源链接包括下述中的至少一项:所述第一影子设备的标识和所述第一影子设备的端点。
在一些实施例中,所述第一请求响应消息还包括第三指示信息,所述第三指示信息用于指示所述第一影子设备不具备直接接入云服务器的能力。
本发明实施例中,所述云端代理设备900还包括:第二发送单元904,配置为向云服务器发送第二请求消息,所述第二请求消息用于请求所述云服务器为所述第一影子设备生成第二影子设备。
其中,所述第二请求消息包括下述中的至少一项:所述第一影子设备的影子同步资源、所述第一影子设备的复制资源链接和所述第一影子设备的端点。
在一些实施例中,所述第二请求消息包括第四指示信息,所述第四指示信息用于指示所述服务端设备不具备直接接入云服务器的能力。
本发明实施例中,所述第一接收单元901,还配置为接收所述云服务器发送的第二请求响应消息;所述第二请求响应消息包括:所述第二影子设备的资源链接。
其中,所述第二影子设备的资源链接包括下述中的至少一项:所述第二影子设备的标识和所述第二影子设备的端点。
在一些实施例中,所述第二请求响应消息还包括第五指示信息,所述第五指示信息用于指示所述第二影子设备不具备直接接入云服务器的能力。
本发明实施例中,所述第一处理单元902,还配置为关联所述第一影子设备和所述第二影子设备。
在一些实施例中,所述第一处理单元902,配置为为所述云端代理设备配置下述中的至少一项:所述第二影子设备的标识、所述第二影子设备的端点、所述第二影子设备的影子同步资源、和云服务器的影子服务标识。
在另一些实施例中,所述第一处理单元902,配置为接收配置器发送的针对影子配置资源的更新请求消息;
所述针对影子配置资源的更新请求消息包括下述中的至少一项:所述第二影子设备的标识、所述第二影子设备的端点、所述第二影子设备的影子同步资源、和云服务器的影子服务标识。
本发明实施例中,所述第一处理单元902,还配置为开启所述第一影子设备与所述第二影子设备之间的资源同步,以及所述第一影子设备与所述服务端设备之间的资源同步。
本发明实施例中,所述云端代理设备900还包括:
第三发送单元905,配置为向所述服务端设备发送资源同步请求。
其中,所述资源同步请求中的设备标识为,所述第一影子设备的设备标识;和/或,所述资源同步请求中资源的统一资源标识符不包括所述服务端设备的设备标识。
本发明实施例中,所述第一接收单元901,还配置为接收第一资源发现请求消息;
相应的,所述云端代理设备900还包括第四发送单元906,配置为发送第一资源发现请求响应消息,所述第一资源发现请求响应消息包括:所述云端代理设备的资源链接。
其中,所述第一资源发现请求消息指示所述云端代理设备的资源类型;所述云端代理设备的资源链接包括下述中的至少一项:所述云端代理设备的资源类型和所述云端代理设备的资源的端点。
本发明实施例中,所述第一资源发现请求消息由配置器发送,或者由所述服务端设备发送;相应的,第一资源发现请求响应消息发送至配置器,或者发送至所述服务端设备。
本发明实施例中,所述第一接收单元901,还配置为接收获取影子服务信息的请求消息;
相应的,所述云端代理设备900还包括第五发送单元907,配置为发送获取影子服务信息的请求响应消息。
其中,获取影子服务信息的请求响应消息包括下述中的至少一项:影子服务的标识和影子服务的端点。
所述获取影子服务信息的请求消息由配置器发送,或者由服务端设备发送;相应的,所述获取影子服务信息的请求响应消息发送至配置器,或者发送至服务端设备。
为实现上述影子设备的生成方法,本发明实施例还提供一种服务端设备,所述服务端设备1000的组成结构,如图10所示,包括:
第六发送单元1001,配置为向云端代理设备发送第一请求消息,所述第一请求消息用于请求所述云端代理设备生成所述服务端设备的第一影子设备;
第二接收单元1002,配置为接收第一请求响应消息。
本发明实施例中,所述第一请求消息包括下述中的至少一项:所述服务端设备的原始资源链接和所述服务端设备的端点。
在一些实施例中,所述第一请求消息还包括第一指示信息,所述第一指示信息用于指示所述服务端设备不具备直接接入云服务器的能力。
其中,所述第一影子设备的复制资源的统一资源标识符包括所述服务端设备的设备标识。所述第一影子设备的描述信息包括第二指示信息,所述第二指示信息用于指示所述第一影子设备不具备直接接入云服务器的能力。
所述服务端设备1000还包括:第二处理单元1003,配置为将所述服务端设备与所述第一影子设备进行关联。
本发明实施例中,所述第二处理单元1003,配置为通过更新所述服务端设备的影子配置资源,为所述服务端设备配置下述中的至少一项:所述第一影子设备的标识、所述第一影子设备的端点、和所述第一影子设备的影子同步资源。
本发明实施例中,所述服务端设备1000还包括:
第三处理单元1004,配置为开启所述服务端设备与所述第一影子设备之间的资源同步。
本发明实施例中,所述第二接收单元1002,还配置为接收所述云端代理设备发送的资源同步请求。
其中,所述资源同步请求中的设备标识为,所述第一影子设备的设备标识;和/或,所述资源同步请求中资源的统一资源标识符不包括所述服务端设备的设备标识。
本发明实施例中,所述第六发送单元1001,还配置为向所述云端代理设备发送第一资源发现请 求消息;
所述服务端设备接收所述云端代理设备发送的第一资源发现响应消息,所述第一资源发现请求响应消息包括:所述云端代理设备的资源链接。
其中,所述第一资源发现请求消息指示所述云端代理设备的资源类型;所述云端代理设备的资源链接包括下述中的至少一项:所述云端代理设备的资源类型和所述云端代理设备的资源的端点。
本发明实施例中,所述第六发送单元1001,还配置为向所述云端代理设备发送获取影子服务信息的请求消息;
所述第二接收单元1002,还配置为接收所述云端代理设备发送的获取影子服务信息的请求响应消息。其中,所述获取影子服务信息的请求响应消息包括下述中的至少一项:影子服务的标识和影子服务的端点。
为实现上述影子设备的生成方法,本发明实施例还提供一种云服务器,所述云服务器1100的组成结构,如图11所示,包括:
第三接收单元1101,配置为接收第二请求消息;
第四处理单元1102,配置为基于所述第二请求消息,为服务端设备的第一影子设备生成第二影子设备。
其中,所述第二请求消息包括下述中的至少一项:所述第一影子设备的影子同步资源、所述第一影子设备的复制资源链接和所述第一影子设备的端点。
在一些实施例中,所述第二请求消息还包括第四指示信息,所述第四指示信息用于指示所述服务端设备不具备直接接入云服务器的能力。
本发明实施例中,所述云服务器1100还包括:
第七发送单元1103,配置为发送第二请求响应消息;所述第二请求响应消息包括:所述第二影子设备的资源链接。其中,所述第二影子设备的资源链接包括下述中的至少一项:所述第二影子设备的标识和所述第二影子设备的端点。
在一些实施例中,所述第二请求响应消息还包括第五指示信息,所述第五指示信息用于指示所述第二影子设备不具备直接接入云服务器的能力。
本发明实施例中,所述第四处理单元1102,还配置为开启所述第二影子设备与所述第一影子设备之间的资源同步。
本发明实施例中,所述第二请求消息由配置器发送,或者所述第二请求消息由云端代理设备发送。相应的,所述第二请求响应消息发送至配置器,或者发送至云端代理设备。
本发明实施例中,所述第四处理单元1102,还配置为将所述第二影子设备的复制资源链接发布至所述云服务器的资源发现目录。
为实现上述影子设备的生成方法,本发明实施例还提供一种配置器,所述配置器1200的组成结构,如图12所示,包括:
第八发送单元1201,配置为向云端代理设备发送第一请求消息,所述第一请求消息用于请求所述云端代理设备生成服务端设备的第一影子设备;
第四接收单元1202,配置为接收第一请求响应消息。
本发明实施例中,所述第一请求消息包括下述中的至少一项:所述服务端设备的原始资源链接和所述服务端设备的端点。
在一些实施例中,所述第一请求消息还包括第一指示信息,所述第一指示信息用于指示所述服务端设备不具备直接接入云服务器的能力。
本发明实施例中,所述第一影子设备的复制资源的统一资源标识符包括所述服务端设备的设备标识。
本发明实施例中,所述第一影子设备的描述信息包括第二指示信息,所述第二指示信息用于指示所述第一影子设备不具备直接接入云服务器的能力。
本发明实施例中,所述第八发送单元1201,还配置为向云服务器发送第二请求消息,所述第二请求消息用于请求所述云服务器为所述第一影子设备生成第二影子设备。
其中,所述第二请求消息包括下述中的至少一项:所述第一影子设备的影子同步资源、所述第一影子设备的复制资源链接和所述第一影子设备的端点。
在一些实施例中,所述第二请求消息包括第四指示信息,所述第四指示信息用于指示所述服务端设备不具备直接接入云服务器的能力。
本发明实施例中,所述第四接收单元1202,还配置为接收所述云服务器发送的第二请求响应消 息;所述第二请求响应消息包括:所述第二影子设备的资源链接。其中,所述第二影子设备的资源链接包括下述中的至少一项:所述第二影子设备的标识和所述第二影子设备的端点。
本发明实施例中,所述第二请求响应消息包括第五指示信息,所述第五指示信息用于指示所述第二影子设备不具备直接接入云服务器的能力。
本发明实施例中,所述配置器1200还包括:第五处理单元1203,配置为关联所述第一影子设备和所述第二影子设备。
本发明实施例中,所述第五处理单元1203,配置为向所述服务端设备发送针对影子配置资源的更新请求消息;
所述针对影子配置资源的更新请求消息包括下述中的至少一项:所述第二影子设备的标识、所述第二影子设备的端点、所述第二影子设备的影子同步资源、和云服务器的影子服务标识。
本发明实施例中,所述配置器1200还包括:第六处理单元1204,配置为配置所述第一影子设备与所述第二影子设备之间的资源同步,以及所述第一影子设备与所述服务端设备之间的资源同步。
本发明实施例中,所述第八发送单元1201,还配置为向所述服务端设备发送第二资源发现请求消息;
所述第四接收单元1202,还配置为接收所述服务端设备发送的第二资源发现请求响应消息,所述第二资源发现响应消息包括:所述服务端设备的资源链接。
其中,所述第二资源发现请求消息指示服务端设备的资源类型;所述服务端设备的资源链接包括下述中的至少一项:所述服务端设备的资源类型和所述服务端设备的资源的端点。
本发明实施例中,所述第八发送单元1201,还配置为向所述云端代理设备发送第一资源发现请求消息;
所述第四接收单元1202,还配置为接收所述云端代理设备发送的第一资源发现请求响应消息,所述第一资源发现请求响应消息包括:所述云端代理设备的资源链接。
其中,所述第一资源发现请求消息指示所述云端代理设备的资源类型,所述云端代理设备的资源链接包括下述中的至少一项:所述云端代理设备的资源类型和所述云端代理设备的资源的端点。
本发明实施例中,所述第八发送单元1201,还配置为向所述云端代理设备发送获取影子服务信息的请求消息;
所述第四接收单元1202,还配置为接收所述云端代理设备发送的获取影子服务信息的请求响应消息。
其中,所述获取影子服务信息的请求响应消息包括下述中的至少一项:
影子服务的标识和影子服务的端点。
本发明实施例还提供一种云端代理设备,包括处理器和用于存储能够在处理器上运行的计算机程序的存储器,其中,所述处理器用于运行所述计算机程序时,执行上述云端代理设备执行的影子设备的生成方法的步骤。
本发明实施例还提供一种服务端设备,包括处理器和用于存储能够在处理器上运行的计算机程序的存储器,其中,所述处理器用于运行所述计算机程序时,执行上述服务端设备执行的影子设备的生成方法的步骤。
本发明实施例还提供一种云服务器,包括处理器和用于存储能够在处理器上运行的计算机程序的存储器,其中,所述处理器用于运行所述计算机程序时,执行上述云服务器执行的影子设备的生成方法的步骤。
本发明实施例还提供一种配置器,包括处理器和用于存储能够在处理器上运行的计算机程序的存储器,其中,所述处理器用于运行所述计算机程序时,执行上述配置器执行的影子设备的生成方法的步骤。
需要说明的是,本发明实施例中云端代理设备、服务端设备、云服务器和配置器均可以为OCF设备。
图13是本发明实施例的电子设备(云端代理设备、服务端设备、云服务器和配置器)的硬件组成结构示意图,电子设备700包括:至少一个处理器701、存储器702和至少一个网络接口704。电子设备700中的各个组件通过总线系统705耦合在一起。可理解,总线系统705用于实现这些组件之间的连接通信。总线系统705除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图13中将各种总线都标为总线系统705。
可以理解,存储器702可以是易失性存储器或非易失性存储器,也可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是ROM、可编程只读存储器(PROM,Programmable Read-Only  Memory)、可擦除可编程只读存储器(EPROM,Erasable Programmable Read-Only Memory)、电可擦除可编程只读存储器(EEPROM,Electrically Erasable Programmable Read-Only Memory)、磁性随机存取存储器(FRAM,ferromagnetic random access memory)、快闪存储器(Flash Memory)、磁表面存储器、光盘、或只读光盘(CD-ROM,Compact Disc Read-Only Memory);磁表面存储器可以是磁盘存储器或磁带存储器。易失性存储器可以是随机存取存储器(RAM,Random Access Memory),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(SRAM,Static Random Access Memory)、同步静态随机存取存储器(SSRAM,Synchronous Static Random Access Memory)、动态随机存取存储器(DRAM,Dynamic Random Access Memory)、同步动态随机存取存储器(SDRAM,Synchronous Dynamic Random Access Memory)、双倍数据速率同步动态随机存取存储器(DDRSDRAM,Double Data Rate Synchronous Dynamic Random Access Memory)、增强型同步动态随机存取存储器(ESDRAM,Enhanced Synchronous Dynamic Random Access Memory)、同步连接动态随机存取存储器(SLDRAM,SyncLink Dynamic Random Access Memory)、直接内存总线随机存取存储器(DRRAM,Direct Rambus Random Access Memory)。本发明实施例描述的存储器702旨在包括但不限于这些和任意其它适合类型的存储器。
本发明实施例中的存储器702用于存储各种类型的数据以支持电子设备700的操作。这些数据的示例包括:用于在电子设备700上操作的任何计算机程序,如应用程序7022。实现本发明实施例方法的程序可以包含在应用程序7022中。
上述本发明实施例揭示的方法可以应用于处理器701中,或者由处理器701实现。处理器701可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过处理器701中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器701可以是通用处理器、数字信号处理器(DSP,Digital Signal Processor),或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。处理器701可以实现或者执行本发明实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者任何常规的处理器等。结合本发明实施例所公开的方法的步骤,可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于存储介质中,该存储介质位于存储器702,处理器701读取存储器702中的信息,结合其硬件完成前述方法的步骤。
在示例性实施例中,电子设备700可以被一个或多个应用专用集成电路(ASIC,Application Specific Integrated Circuit)、DSP、可编程逻辑器件(PLD,Programmable Logic Device)、复杂可编程逻辑器件(CPLD,Complex Programmable Logic Device)、FPGA、通用处理器、控制器、MCU、MPU、或其他电子元件实现,用于执行前述方法。
本申请实施例还提供了一种存储介质,用于存储计算机程序。
可选的,该存储介质可应用于本申请实施例中的云端代理设备,并且该计算机程序使得计算机执行本申请实施例云端代理设备执行的各个方法中的相应流程,为了简洁,在此不再赘述。
可选的,该存储介质可应用于本申请实施例中的服务端设备,并且该计算机程序使得计算机执行本申请实施例的服务端设备执行的各个方法中的相应流程,为了简洁,在此不再赘述。
可选的,该存储介质可应用于本申请实施例中的云服务器,并且该计算机程序使得计算机执行本申请实施例的云服务器执行的各个方法中的相应流程,为了简洁,在此不再赘述。
可选的,该存储介质可应用于本申请实施例中的配置器,并且该计算机程序使得计算机执行本申请实施例的配置器执行的各个方法中的相应流程,为了简洁,在此不再赘述。
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能 的步骤。
以上所述,仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围,凡在本发明的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本发明的保护范围之内。

Claims (176)

  1. 一种影子设备的生成方法,所述方法包括:
    云端代理设备接收第一请求消息;
    所述云端代理设备基于所述第一请求消息,生成服务端设备的第一影子设备。
  2. 根据权利要求1所述的方法,其中,所述第一请求消息由配置器发送至所述云端代理设备。
  3. 根据权利要求1或2所述的方法,其中,所述方法还包括:
    所述云端代理设备接收配置器发送的所述云端代理设备的影子服务信息。
  4. 根据权利要求3所述的方法,其中,所述云端代理设备的影子服务信息包括下述中的至少一项:
    所述云端代理设备上的影子服务的标识和影子服务的端点。
  5. 根据权利要求3或4所述的方法,其中,所述云端代理设备的影子服务信息包括:
    需要复制到所述云端代理设备的原始资源链接。
  6. 根据权利要求1所述的方法,其中,所述第一请求消息由所述服务端设备发送至所述云端代理设备。
  7. 根据权利要求1至6任一项所述的方法,其中,所述第一请求消息包括下述中的至少一项:
    所述服务端设备的原始资源链接和所述服务端设备的端点。
  8. 根据权利要求1至7任一项所述的方法,其中,所述第一请求消息包括第一指示信息,所述第一指示信息用于指示所述服务端设备不具备直接接入云服务器的能力。
  9. 根据权利要求1至8任一项所述的方法,其中,所述第一影子设备的复制资源的统一资源标识符包括所述服务端设备的设备标识。
  10. 根据权利要求1至9任一项所述的方法,其中,所述第一影子设备的描述信息包括第二指示信息,所述第二指示信息用于指示所述第一影子设备不具备直接接入云服务器的能力。
  11. 根据权利要求1至10任一项所述的方法,其中,所述方法还包括:
    所述云端代理设备将所述第一影子设备的复制资源链接发布至所述云端代理设备的资源发现目录。
  12. 根据权利要求1至11任一项所述的方法,其中,所述方法还包括:
    所述云端代理设备发送第一请求响应消息;
    所述第一请求响应消息包括:所述第一影子设备的资源链接。
  13. 根据权利要求12所述的方法,其中,所述第一影子设备的资源链接包括下述中的至少一项:所述第一影子设备的标识和所述第一影子设备的端点。
  14. 根据权利要求12或13所述的方法,其中,所述第一请求响应消息还包括第三指示信息,所述第三指示信息用于指示所述第一影子设备不具备直接接入云服务器的能力。
  15. 根据权利要求12至14任一项所述的方法,其中,所述第一请求响应消息发送至配置器。
  16. 根据权利要求12至14任一项所述的方法,其中,所述第一请求响应消息发送至所述服务端设备。
  17. 根据权利要求1、6至14、以及16任一项所述的方法,其中,所述方法还包括:
    所述云端代理设备向云服务器发送第二请求消息,所述第二请求消息用于请求所述云服务器为所述第一影子设备生成第二影子设备。
  18. 根据权利要求17所述的方法,其中,所述第二请求消息包括下述中的至少一项:
    所述第一影子设备的影子同步资源、所述第一影子设备的复制资源链接和所述第一影子设备的端点。
  19. 根据权利要求17或18所述的方法,其中,所述第二请求消息包括第四指示信息,所述第四指示信息用于指示所述服务端设备不具备直接接入云服务器的能力。
  20. 根据权利要求17至19任一项所述的方法,其中,所述方法还包括:
    所述云端代理设备接收所述云服务器发送的第二请求响应消息;
    所述第二请求响应消息包括:所述第二影子设备的资源链接。
  21. 根据权利要求20所述的方法,其中,所述第二影子设备的资源链接包括下述中的至少一项:所述第二影子设备的标识和所述第二影子设备的端点。
  22. 根据权利要求20或21所述的方法,其中,所述第二请求响应消息还包括第五指示信息, 所述第五指示信息用于指示所述第二影子设备不具备直接接入云服务器的能力。
  23. 根据权利要求20至22任一项所述的方法,其中,所述方法还包括:
    所述云端代理设备关联所述第一影子设备和所述第二影子设备。
  24. 根据权利要求23所述的方法,其中,所述云端代理设备关联所述第一影子设备和所述第二影子设备,包括:
    所述云端代理设备为自身配置下述中的至少一项:所述第二影子设备的标识、所述第二影子设备的端点、所述第二影子设备的影子同步资源、和云服务器的影子服务标识。
  25. 根据权利要求23所述的方法,其中,所述云端代理设备关联所述第一影子设备和所述第二影子设备,包括:
    所述云端代理设备接收配置器发送的针对影子配置资源的更新请求消息;
    所述针对影子配置资源的更新请求消息包括下述中的至少一项:所述第二影子设备的标识、所述第二影子设备的端点、所述第二影子设备的影子同步资源、和云服务器的影子服务标识。
  26. 根据权利要求1至25任一项所述的方法,其中,所述方法还包括:
    所述云端代理设备开启所述第一影子设备与所述第二影子设备之间的资源同步,以及所述第一影子设备与所述服务端设备之间的资源同步。
  27. 根据权利要求26所述的方法,其中,所述方法还包括:
    所述云端代理设备向所述服务端设备发送资源同步请求。
  28. 根据权利要求27所述的方法,其中,所述资源同步请求中的设备标识为,所述第一影子设备的设备标识;
    和/或,所述资源同步请求中资源的统一资源标识符不包括所述服务端设备的设备标识。
  29. 根据权利要求1至28任一项所述的方法,其中,所述方法还包括:
    所述云端代理设备接收第一资源发现请求消息;
    所述云端代理设备发送第一资源发现请求响应消息,所述第一资源发现请求响应消息包括:所述云端代理设备的资源链接。
  30. 根据权利要求29所述的方法,其中,所述第一资源发现请求消息指示所述云端代理设备的资源类型。
  31. 根据权利要求29或30所述的方法,其中,所述云端代理设备的资源链接包括下述中的至少一项:
    所述云端代理设备的资源类型和所述云端代理设备的资源的端点。
  32. 根据权利要求29至31任一项所述的方法,其中,所述第一资源发现请求消息由配置器发送,或者由所述服务端设备发送。
  33. 根据权利要求29至32任一项所述的方法,其中,所述第一资源发现请求响应消息发送至配置器,或者发送至所述服务端设备。
  34. 根据权利要求1至33任一项所述的方法,其中,所述方法还包括:
    所述云端代理设备接收获取影子服务信息的请求消息;
    所述云端代理设备发送获取影子服务信息的请求响应消息。
  35. 根据权利要求34所述的方法,其中,所述获取影子服务信息的请求响应消息包括下述中的至少一项:
    影子服务的标识和影子服务的端点。
  36. 根据权利要求34或35所述的方法,其中,所述获取影子服务信息的请求消息由配置器发送,或者由服务端设备发送。
  37. 根据权利要求34至36所述的方法,其中,所述获取影子服务信息的请求响应消息发送至配置器,或者发送至服务端设备。
  38. 一种影子设备的生成方法,所述方法包括:
    服务端设备向云端代理设备发送第一请求消息,所述第一请求消息用于请求所述云端代理设备生成所述服务端设备的第一影子设备;
    所述服务端设备接收第一请求响应消息。
  39. 根据权利要求38所述的方法,其中,所述第一请求消息包括下述中的至少一项:
    所述服务端设备的原始资源链接和所述服务端设备的端点。
  40. 根据权利要求38或39所述的方法,其中,所述第一请求消息包括第一指示信息,所述第一指示信息用于指示所述服务端设备不具备直接接入云服务器的能力。
  41. 根据权利要求38至40任一项所述的方法,其中,所述第一影子设备的复制资源的统一资源标识符包括所述服务端设备的设备标识。
  42. 根据权利要求38至41任一项所述的方法,其中,所述第一影子设备的描述信息包括第二指示信息,所述第二指示信息用于指示所述第一影子设备不具备直接接入云服务器的能力。
  43. 根据权利要求38至42任一项所述的方法,其中,所述方法还包括:
    所述服务端设备将自身与所述第一影子设备进行关联。
  44. 根据权利要求43所述的方法,其中,所述服务端设备将自身与所述第一影子设备进行关联,包括:
    所述服务端设备通过更新自身的影子配置资源,为自身配置下述中的至少一项:所述第一影子设备的标识、所述第一影子设备的端点、和所述第一影子设备的影子同步资源。
  45. 根据权利要求38至44任一项所述的方法,其中,所述方法还包括:
    所述服务端设备开启所述服务端设备与所述第一影子设备之间的资源同步。
  46. 根据权利要求45所述的方法,其中,所述方法还包括:
    所述服务端设备接收所述云端代理设备发送的资源同步请求。
  47. 根据权利要求46所述的方法,其中,所述资源同步请求中的设备标识为,所述第一影子设备的设备标识;
    和/或,所述资源同步请求中资源的统一资源标识符不包括所述服务端设备的设备标识。
  48. 根据权利要求38至47任一项所述的方法,其中,所述方法还包括:
    所述服务端设备向所述云端代理设备发送第一资源发现请求消息;
    所述服务端设备接收所述云端代理设备发送的第一资源发现响应消息,所述第一资源发现请求响应消息包括:所述云端代理设备的资源链接。
  49. 根据权利要求48所述的方法,其中,所述第一资源发现请求消息指示所述云端代理设备的资源类型。
  50. 根据权利要求48或49所述的方法,其中,所述云端代理设备的资源链接包括下述中的至少一项:
    所述云端代理设备的资源类型和所述云端代理设备的资源的端点。
  51. 根据权利要求38至50任一项所述的方法,其中,所述方法还包括:
    所述服务端设备向所述云端代理设备发送获取影子服务信息的请求消息;
    所述服务端设备接收所述云端代理设备发送的获取影子服务信息的请求响应消息。
  52. 根据权利要求51所述的方法,其中,所述获取影子服务信息的请求响应消息包括下述中的至少一项:
    影子服务的标识和影子服务的端点。
  53. 一种影子设备的生成方法,所述方法包括:
    云服务器接收第二请求消息;
    所述云服务器基于所述第二请求消息,为服务端设备的第一影子设备生成第二影子设备。
  54. 根据权利要求53所述的方法,其中,所述第二请求消息包括下述中的至少一项:
    所述第一影子设备的影子同步资源、所述第一影子设备的复制资源链接和所述第一影子设备的端点。
  55. 根据权利要求53或54所述的方法,其中,所述第二请求消息包括第四指示信息,所述第四指示信息用于指示所述服务端设备不具备直接接入云服务器的能力。
  56. 根据权利要求53至55所述的方法,其中,所述方法还包括:
    所述云服务器发送第二请求响应消息;
    所述第二请求响应消息包括:所述第二影子设备的资源链接。
  57. 根据权利要求56所述的方法,其中,所述第二影子设备的资源链接包括下述中的至少一项:所述第二影子设备的标识和所述第二影子设备的端点。
  58. 根据权利要求56或57所述的方法,其中,所述第二请求响应消息还包括第五指示信息,所述第五指示信息用于指示所述第二影子设备不具备直接接入云服务器的能力。
  59. 根据权利要求53至58任一项所述的方法,其中,所述方法还包括:
    所述云服务器开启所述第二影子设备与所述第一影子设备之间的资源同步。
  60. 根据权利要求53至59任一项所述的方法,其中,所述第二请求消息由配置器发送,或者所述第二请求消息由云端代理设备发送。
  61. 根据权利要求56至60任一项所述的方法,其中,所述第二请求响应消息发送至配置器,或者发送至云端代理设备。
  62. 根据权利要求53至61任一项所述的方法,其中,所述方法还包括:
    所述云服务器将所述第二影子设备的复制资源链接发布至所述云服务器的资源发现目录。
  63. 一种影子设备的生成方法,所述方法包括:
    配置器向云端代理设备发送第一请求消息,所述第一请求消息用于请求所述云端代理设备生成服务端设备的第一影子设备;
    所述配置器接收第一请求响应消息。
  64. 根据权利要求63所述的方法,其中,所述第一请求消息包括下述中的至少一项:
    所述服务端设备的原始资源链接和所述服务端设备的端点。
  65. 根据权利要求63或64所述的方法,其中,所述第一请求消息包括第一指示信息,所述第一指示信息用于指示所述服务端设备不具备直接接入云服务器的能力。
  66. 根据权利要求63至65任一项所述的方法,其中,所述第一影子设备的复制资源的统一资源标识符包括所述服务端设备的设备标识。
  67. 根据权利要求63至66任一项所述的方法,其中,所述第一影子设备的描述信息包括第二指示信息,所述第二指示信息用于指示所述第一影子设备不具备直接接入云服务器的能力。
  68. 根据权利要求63至67任一项所述的方法,其中,所述方法还包括:
    所述配置器向云服务器发送第二请求消息,所述第二请求消息用于请求所述云服务器为所述第一影子设备生成第二影子设备。
  69. 根据权利要求68所述的方法,其中,所述第二请求消息包括下述中的至少一项:
    所述第一影子设备的影子同步资源、所述第一影子设备的复制资源链接和所述第一影子设备的端点。
  70. 根据权利要求68或69所述的方法,其中,所述第二请求消息包括第四指示信息,所述第四指示信息用于指示所述服务端设备不具备直接接入云服务器的能力。
  71. 根据权利要求68至70任一项所述的方法,其中,所述方法还包括:
    所述配置器接收所述云服务器发送的第二请求响应消息;
    所述第二请求响应消息包括:所述第二影子设备的资源链接。
  72. 根据权利要求71所述的方法,其中,所述第二影子设备的资源链接包括下述中的至少一项:所述第二影子设备的标识和所述第二影子设备的端点。
  73. 根据权利要求71或72所述的方法,其中,所述第二请求响应消息包括第五指示信息,所述第五指示信息用于指示所述第二影子设备不具备直接接入云服务器的能力。
  74. 根据权利要求71至73任一项所述的方法,其中,所述方法还包括:
    所述配置器关联所述第一影子设备和所述第二影子设备。
  75. 根据权利要求74所述的方法,其中,所述配置器关联所述第一影子设备和所述第二影子设备,包括:
    所述配置器向所述服务端设备发送针对影子配置资源的更新请求消息;
    所述针对影子配置资源的更新请求消息包括下述中的至少一项:所述第二影子设备的标识、所述第二影子设备的端点、所述第二影子设备的影子同步资源、和云服务器的影子服务标识。
  76. 根据权利要求63至75任一项所述的方法,其中,所述方法还包括:
    所述配置器配置所述第一影子设备与所述第二影子设备之间的资源同步,以及所述第一影子设备与所述服务端设备之间的资源同步。
  77. 根据权利要求63至76任一项所述的方法,其中,所述方法还包括:
    所述配置器向所述服务端设备发送第二资源发现请求消息;
    所述配置器接收所述服务端设备发送的第二资源发现请求响应消息,所述第二资源发现响应消息包括:所述服务端设备的资源链接。
  78. 根据权利要求77所述的方法,其中,所述第二资源发现请求消息指示服务端设备的资源类型。
  79. 根据权利要求77或78所述的方法,其中,所述服务端设备的资源链接包括下述中的至少一项:
    所述服务端设备的资源类型和所述服务端设备的资源的端点。
  80. 根据权利要求63至79任一项所述的方法,其中,所述方法还包括:
    所述配置器向所述云端代理设备发送第一资源发现请求消息;
    所述配置器接收所述云端代理设备发送的第一资源发现请求响应消息,所述第一资源发现请求响应消息包括:所述云端代理设备的资源链接。
  81. 根据权利要求80所述的方法,其中,所述第一资源发现请求消息指示所述云端代理设备的资源类型。
  82. 根据权利要求80或81所述的方法,其中,所述云端代理设备的资源链接包括下述中的至少一项:
    所述云端代理设备的资源类型和所述云端代理设备的资源的端点。
  83. 根据权利要求63至82任一项所述的方法,其中,所述方法还包括:
    所述配置器向所述云端代理设备发送获取影子服务信息的请求消息;
    所述配置器接收所述云端代理设备发送的获取影子服务信息的请求响应消息。
  84. 根据权利要求83所述的方法,其中,所述获取影子服务信息的请求响应消息包括下述中的至少一项:
    影子服务的标识和影子服务的端点。
  85. 一种云端代理设备,所述云端代理设备包括:
    第一接收单元,配置为接收第一请求消息;
    第一处理单元,配置为基于所述第一请求消息,生成服务端设备的第一影子设备。
  86. 根据权利要求85所述的云端代理设备,其中,所述第一请求消息由配置器发送至所述云端代理设备。
  87. 根据权利要求85或86所述的云端代理设备,其中,所述第一接收单元,还配置为接收配置器发送的所述云端代理设备的影子服务信息。
  88. 根据权利要求87所述的云端代理设备,其中,所述云端代理设备的影子服务信息包括下述中的至少一项:
    所述云端代理设备上的影子服务的标识、和影子服务的端点。
  89. 根据权利要求87或88所述的云端代理设备,其中,所述云端代理设备的影子服务信息包括:
    需要复制到所述云端代理设备的原始资源链接。
  90. 根据权利要求85所述的云端代理设备,其中,所述第一请求消息由所述服务端设备发送至所述云端代理设备。
  91. 根据权利要求85至90任一项所述的云端代理设备,其中,所述第一请求消息包括下述中的至少一项:
    所述服务端设备的原始资源链接和所述服务端设备的端点。
  92. 根据权利要求85至91任一项所述的云端代理设备,其中,所述第一请求消息包括第一指示信息,所述第一指示信息用于指示所述服务端设备不具备直接接入云服务器的能力。
  93. 根据权利要求85至92任一项所述的云端代理设备,其中,所述第一影子设备的复制资源的统一资源标识符包括所述服务端设备的设备标识。
  94. 根据权利要求85至93任一项所述的云端代理设备,其中,所述第一影子设备的描述信息包括第二指示信息,所述第二指示信息用于指示所述第一影子设备不具备直接接入云服务器的能力。
  95. 根据权利要求85至94任一项所述的云端代理设备,其中,所述第一处理单元,还配置为将所述第一影子设备的复制资源链接发布至所述云端代理设备的资源发现目录。
  96. 根据权利要求85至95任一项所述的云端代理设备,其中,所述云端代理设备还包括:
    第一发送单元,配置为发送第一请求响应消息;所述第一请求响应消息包括:所述第一影子设备的资源链接。
  97. 根据权利要求96所述的云端代理设备,其中,所述第一影子设备的资源链接包括下述中的至少一项:所述第一影子设备的标识和所述第一影子设备的端点。
  98. 根据权利要求96或97所述的云端代理设备,其中,所述第一请求响应消息还包括第三指示信息,所述第三指示信息用于指示所述第一影子设备不具备直接接入云服务器的能力。
  99. 根据权利要求96至98任一项所述的云端代理设备,其中,所述第一请求响应消息发送至配置器。
  100. 根据权利要求96至98任一项所述的云端代理设备,其中,所述第一请求响应消息发送至所述服务端设备。
  101. 根据权利要求85、90至98以及100任一项所述的云端代理设备,其中,所述云端代理设备还包括:
    第二发送单元,配置为向云服务器发送第二请求消息,所述第二请求消息用于请求所述云服务器为所述第一影子设备生成第二影子设备。
  102. 根据权利要求101所述的云端代理设备,其中,所述第二请求消息包括下述中的至少一项:
    所述第一影子设备的影子同步资源、所述第一影子设备的复制资源链接和所述第一影子设备的端点。
  103. 根据权利要求101或102所述的云端代理设备,其中,所述第二请求消息包括第四指示信息,所述第四指示信息用于指示所述服务端设备不具备直接接入云服务器的能力。
  104. 根据权利要求103所述的云端代理设备,其中,所述第一接收单元,还配置为接收所述云服务器发送的第二请求响应消息;所述第二请求响应消息包括:所述第二影子设备的资源链接。
  105. 根据权利要求104所述的云端代理设备,其中,所述第二影子设备的资源链接包括下述中的至少一项:所述第二影子设备的标识和所述第二影子设备的端点。
  106. 根据权利要求104或105所述的云端代理设备,其中,所述第二请求响应消息还包括第五指示信息,所述第五指示信息用于指示所述第二影子设备不具备直接接入云服务器的能力。
  107. 根据权利要求104至106任一项所述的云端代理设备,其中,所述第一处理单元,还配置为关联所述第一影子设备和所述第二影子设备。
  108. 根据权利要求107所述的云端代理设备,其中,所述第一处理单元,配置为为所述云端代理设备配置下述中的至少一项:所述第二影子设备的标识、所述第二影子设备的端点、所述第二影子设备的影子同步资源、和云服务器的影子服务标识。
  109. 根据权利要求107所述的云端代理设备,其中,所述第一处理单元,配置为接收配置器发送的针对影子配置资源的更新请求消息;
    所述针对影子配置资源的更新请求消息包括下述中的至少一项:所述第二影子设备的标识、所述第二影子设备的端点、所述第二影子设备的影子同步资源、和云服务器的影子服务标识。
  110. 根据权利要求85至109所述的云端代理设备,其中,所述第一处理单元,还配置为开启所述第一影子设备与所述第二影子设备之间的资源同步,以及所述第一影子设备与所述服务端设备之间的资源同步。
  111. 根据权利要求110所述的云端代理设备,其中,所述云端代理设备还包括:
    第三发送单元,配置为向所述服务端设备发送资源同步请求。
  112. 根据权利要求111所述的云端代理设备,其中,所述资源同步请求中的设备标识为,所述第一影子设备的设备标识;
    和/或,所述资源同步请求中资源的统一资源标识符不包括所述服务端设备的设备标识。
  113. 根据权利要求85至112任一项所述的云端代理设备,其中,所述第一接收单元,还配置为接收第一资源发现请求消息;
    相应的,所述云端代理设备还包括第四发送单元,配置为发送第一资源发现请求响应消息,所述第一资源发现请求响应消息包括:所述云端代理设备的资源链接。
  114. 根据权利要求113所述的云端代理设备,其中,所述第一资源发现请求消息指示所述云端代理设备的资源类型。
  115. 根据权利要求113或114所述的云端代理设备,其中,所述云端代理设备的资源链接包括下述中的至少一项:
    所述云端代理设备的资源类型和所述云端代理设备的资源的端点。
  116. 根据权利要求113至115任一项所述的云端代理设备,其中,所述第一资源发现请求消息由配置器发送,或者由所述服务端设备发送。
  117. 根据权利要求113至116任一项所述的云端代理设备,其中,所述第一资源发现请求响应消息发送至配置器,或者发送至所述服务端设备。
  118. 根据权利要求85至117任一项所述的云端代理设备,其中,所述第一接收单元,还配置为接收获取影子服务信息的请求消息;
    相应的,所述云端代理设备还包括第五发送单元,配置为发送获取影子服务信息的请求响应消息。
  119. 根据权利要求118所述的云端代理设备,其中,所述获取影子服务信息的请求响应消息 包括下述中的至少一项:
    影子服务的标识和影子服务的端点。
  120. 根据权利要求118或119所述的云端代理设备,其中,所述获取影子服务信息的请求消息由配置器发送,或者由服务端设备发送。
  121. 根据权利要求118至120任一项所述的云端代理设备,其中,所述获取影子服务信息的请求响应消息发送至配置器,或者发送至服务端设备。
  122. 一种服务端设备,所述服务端设备包括:
    第六发送单元,配置为向云端代理设备发送第一请求消息,所述第一请求消息用于请求所述云端代理设备生成所述服务端设备的第一影子设备;
    第二接收单元,配置为接收第一请求响应消息。
  123. 根据权利要求122所述的服务端设备,其中,所述第一请求消息包括下述中的至少一项:
    所述服务端设备的原始资源链接和所述服务端设备的端点。
  124. 根据权利要求122或123所述的服务端设备,其中,所述第一请求消息包括第一指示信息,所述第一指示信息用于指示所述服务端设备不具备直接接入云服务器的能力。
  125. 根据权利要求122至124任一项所述的服务端设备,其中,所述第一影子设备的复制资源的统一资源标识符包括所述服务端设备的设备标识。
  126. 根据权利要求122至125任一项所述的服务端设备,其中,所述第一影子设备的描述信息包括第二指示信息,所述第二指示信息用于指示所述第一影子设备不具备直接接入云服务器的能力。
  127. 根据权利要求122至126任一项所述的服务端设备,其中,所述服务端设备还包括:
    第二处理单元,配置为将所述服务端设备与所述第一影子设备进行关联。
  128. 根据权利要求127所述的服务端设备,其中,所述第二处理单元,配置为通过更新所述服务端设备的影子配置资源,为所述服务端设备配置下述中的至少一项:所述第一影子设备的标识、所述第一影子设备的端点、和所述第一影子设备的影子同步资源。
  129. 根据权利要求122至128任一项所述的服务端设备,其中,所述服务端设备还包括:
    第三处理单元,配置为开启所述服务端设备与所述第一影子设备之间的资源同步。
  130. 根据权利要求129所述的服务端设备,其中,所述第二接收单元,还配置为接收所述云端代理设备发送的资源同步请求。
  131. 根据权利要求130所述的服务端设备,其中,所述资源同步请求中的设备标识为,所述第一影子设备的设备标识;
    和/或,所述资源同步请求中资源的统一资源标识符不包括所述服务端设备的设备标识。
  132. 根据权利要求122至131任一项所述的服务端设备,其中,所述第六发送单元,还配置为向所述云端代理设备发送第一资源发现请求消息;
    所述服务端设备接收所述云端代理设备发送的第一资源发现响应消息,所述第一资源发现请求响应消息包括:所述云端代理设备的资源链接。
  133. 根据权利要求132所述的服务端设备,其中,所述第一资源发现请求消息指示所述云端代理设备的资源类型。
  134. 根据权利要求132或133所述的服务端设备,其中,所述云端代理设备的资源链接包括下述中的至少一项:
    所述云端代理设备的资源类型和所述云端代理设备的资源的端点。
  135. 根据权利要求122至134任一项所述的服务端设备,其中,所述第六发送单元,还配置为向所述云端代理设备发送获取影子服务信息的请求消息;
    所述第二接收单元,还配置为接收所述云端代理设备发送的获取影子服务信息的请求响应消息。
  136. 根据权利要求135所述的服务端设备,其中,所述获取影子服务信息的请求响应消息包括下述中的至少一项:
    影子服务的标识和影子服务的端点。
  137. 一种云服务器,所述云服务器包括:
    第三接收单元,配置为接收第二请求消息;
    第四处理单元,配置为基于所述第二请求消息,为服务端设备的第一影子设备生成第二影子设备。
  138. 根据权利要求137所述的云服务器,其中,所述第二请求消息包括下述中的至少一项:
    所述第一影子设备的影子同步资源、所述第一影子设备的复制资源链接和所述第一影子设备的端点。
  139. 根据权利要求137或138所述的云服务器,其中,所述第二请求消息包括第四指示信息,所述第四指示信息用于指示所述服务端设备不具备直接接入云服务器的能力。
  140. 根据权利要求137至139任一项所述的云服务器,其中,所述云服务器还包括:
    第七发送单元,配置为发送第二请求响应消息;所述第二请求响应消息包括:所述第二影子设备的资源链接。
  141. 根据权利要求140所述的云服务器,其中,所述第二影子设备的资源链接包括下述中的至少一项:所述第二影子设备的标识和所述第二影子设备的端点。
  142. 根据权利要求140或141所述的云服务器,其中,所述第二请求响应消息还包括第五指示信息,所述第五指示信息用于指示所述第二影子设备不具备直接接入云服务器的能力。
  143. 根据权利要求137至142任一项所述的云服务器,其中,所述第四处理单元,还配置为开启所述第二影子设备与所述第一影子设备之间的资源同步。
  144. 根据权利要求137至143任一项所述的云服务器,其中,所述第二请求消息由配置器发送,或者所述第二请求消息由云端代理设备发送。
  145. 根据权利要求140至144任一项所述的云服务器,其中,所述第二请求响应消息发送至配置器,或者发送至云端代理设备。
  146. 根据权利要求137至145任一项所述的云服务器,其中,所述第四处理单元,还配置为将所述第二影子设备的复制资源链接发布至所述云服务器的资源发现目录。
  147. 一种配置器,所述配置器包括:
    第八发送单元,配置为向云端代理设备发送第一请求消息,所述第一请求消息用于请求所述云端代理设备生成服务端设备的第一影子设备;
    第四接收单元,配置为接收第一请求响应消息。
  148. 根据权利要求147所述的配置器,其中,所述第一请求消息包括下述中的至少一项:
    所述服务端设备的原始资源链接和所述服务端设备的端点。
  149. 根据权利要求147或148所述的配置器,其中,所述第一请求消息包括第一指示信息,所述第一指示信息用于指示所述服务端设备不具备直接接入云服务器的能力。
  150. 根据权利要求147至149任一项所述的配置器,其中,所述第一影子设备的复制资源的统一资源标识符包括所述服务端设备的设备标识。
  151. 根据权利要求147至150任一项所述的配置器,其中,所述第一影子设备的描述信息包括第二指示信息,所述第二指示信息用于指示所述第一影子设备不具备直接接入云服务器的能力。
  152. 根据权利要求147至151任一项所述的配置器,其中,所述第八发送单元,还配置为向云服务器发送第二请求消息,所述第二请求消息用于请求所述云服务器为所述第一影子设备生成第二影子设备。
  153. 根据权利要求152所述的配置器,其中,所述第二请求消息包括下述中的至少一项:
    所述第一影子设备的影子同步资源、所述第一影子设备的复制资源链接和所述第一影子设备的端点。
  154. 根据权利要求152或153所述的配置器,其中,所述第二请求消息包括第四指示信息,所述第四指示信息用于指示所述服务端设备不具备直接接入云服务器的能力。
  155. 根据权利要求152至154任一项所述的配置器,其中,所述第四接收单元,还配置为接收所述云服务器发送的第二请求响应消息;所述第二请求响应消息包括:所述第二影子设备的资源链接。
  156. 根据权利要求155所述的配置器,其中,所述第二影子设备的资源链接包括下述中的至少一项:所述第二影子设备的标识和所述第二影子设备的端点。
  157. 根据权利要求155或156所述的配置器,其中,所述第二请求响应消息包括第五指示信息,所述第五指示信息用于指示所述第二影子设备不具备直接接入云服务器的能力。
  158. 根据权利要求155至157任一项所述的配置器,其中,所述配置器还包括:
    第五处理单元,配置为关联所述第一影子设备和所述第二影子设备。
  159. 根据权利要求158所述的配置器,其中,所述第五处理单元,配置为向所述服务端设备发送针对影子配置资源的更新请求消息;
    所述针对影子配置资源的更新请求消息包括下述中的至少一项:所述第二影子设备的标识、所述第二影子设备的端点、所述第二影子设备的影子同步资源、和云服务器的影子服务标识。
  160. 根据权利要求147至159任一项所述的配置器,其中,所述配置器还包括:
    第六处理单元,配置为配置所述第一影子设备与所述第二影子设备之间的资源同步,以及所述第一影子设备与所述服务端设备之间的资源同步。
  161. 根据权利要求147至160任一项所述的配置器,其中,
    所述第八发送单元,还配置为向所述服务端设备发送第二资源发现请求消息;
    所述第四接收单元,还配置为接收所述服务端设备发送的第二资源发现请求响应消息,所述第二资源发现响应消息包括:所述服务端设备的资源链接。
  162. 根据权利要求161所述的配置器,其中,所述第二资源发现请求消息指示服务端设备的资源类型。
  163. 根据权利要求161或162所述的配置器,其中,所述服务端设备的资源链接包括下述中的至少一项:
    所述服务端设备的资源类型和所述服务端设备的资源的端点。
  164. 根据权利要求147至163任一项所述的配置器,其中,
    所述第八发送单元,还配置为向所述云端代理设备发送第一资源发现请求消息;
    所述第四接收单元,还配置为接收所述云端代理设备发送的第一资源发现请求响应消息,所述第一资源发现请求响应消息包括:所述云端代理设备的资源链接。
  165. 根据权利要求164所述的配置器,其中,所述第一资源发现请求消息指示所述云端代理设备的资源类型。
  166. 根据权利要求164或165所述的配置器,其中,所述云端代理设备的资源链接包括下述中的至少一项:
    所述云端代理设备的资源类型和所述云端代理设备的资源的端点。
  167. 根据权利要求147至166任一项所述的配置器,其中,
    所述第八发送单元,还配置为向所述云端代理设备发送获取影子服务信息的请求消息;
    所述第四接收单元,还配置为接收所述云端代理设备发送的获取影子服务信息的请求响应消息。
  168. 根据权利要求167所述的配置器,其中,所述获取影子服务信息的请求响应消息包括下述中的至少一项:
    影子服务的标识和影子服务的端点。
  169. 一种云端代理设备,包括处理器和用于存储能够在处理器上运行的计算机程序的存储器,其中,
    所述处理器用于运行所述计算机程序时,执行权利要求1至37任一项所述的影子设备的生成方法的步骤。
  170. 一种服务端设备,包括处理器和用于存储能够在处理器上运行的计算机程序的存储器,其中,
    所述处理器用于运行所述计算机程序时,执行权利要求38至52任一项所述的影子设备的生成方法的步骤。
  171. 一种云服务器,包括处理器和用于存储能够在处理器上运行的计算机程序的存储器,其中,
    所述处理器用于运行所述计算机程序时,执行权利要求53至62任一项所述的影子设备的生成方法的步骤。
  172. 一种配置器,包括处理器和用于存储能够在处理器上运行的计算机程序的存储器,其中,所述处理器用于运行所述计算机程序时,执行权利要求63至84任一项所述的影子设备的生成方法的步骤。
  173. 一种存储介质,存储有可执行程序,所述可执行程序被处理器执行时,实现权利要求1至37任一项所述的影子设备的生成方法。
  174. 一种存储介质,存储有可执行程序,所述可执行程序被处理器执行时,实现权利要求38至52任一项所述的影子设备的生成方法。
  175. 一种存储介质,存储有可执行程序,所述可执行程序被处理器执行时,实现权利要求53至62任一项所述的影子设备的生成方法。
  176. 一种存储介质,存储有可执行程序,所述可执行程序被处理器执行时,实现权利要求63至84任一项所述的影子设备的生成方法。
PCT/CN2019/097580 2019-07-24 2019-07-24 一种影子设备的生成方法、设备及存储介质 WO2021012235A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2019/097580 WO2021012235A1 (zh) 2019-07-24 2019-07-24 一种影子设备的生成方法、设备及存储介质
CN201980092672.0A CN113454966B (zh) 2019-07-24 2019-07-24 一种影子设备的生成方法、设备及存储介质

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/097580 WO2021012235A1 (zh) 2019-07-24 2019-07-24 一种影子设备的生成方法、设备及存储介质

Publications (1)

Publication Number Publication Date
WO2021012235A1 true WO2021012235A1 (zh) 2021-01-28

Family

ID=74193091

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/097580 WO2021012235A1 (zh) 2019-07-24 2019-07-24 一种影子设备的生成方法、设备及存储介质

Country Status (2)

Country Link
CN (1) CN113454966B (zh)
WO (1) WO2021012235A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114726806A (zh) * 2022-03-29 2022-07-08 驭势(上海)汽车科技有限公司 智能设备影子管理方法、系统、装置、设备和介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108809950A (zh) * 2018-05-21 2018-11-13 中国科学院信息工程研究所 一种基于云端影子系统的无线路由器保护方法和系统
CN108880887A (zh) * 2018-06-20 2018-11-23 山东大学 基于微服务的陪护机器人云服务系统及方法
WO2019078489A1 (ko) * 2017-10-19 2019-04-25 에스케이텔레콤 주식회사 사물 인터넷 플랫폼 서비스 제공 방법 및 서버장치
CN109819061A (zh) * 2018-09-11 2019-05-28 华为技术有限公司 一种在云系统中处理云服务的方法、装置和设备

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030101065A1 (en) * 2001-11-27 2003-05-29 International Business Machines Corporation Method and apparatus for maintaining conversation threads in electronic mail
US20080126381A1 (en) * 2006-08-10 2008-05-29 John Gatti Methods for spanning namespaces in a CIM schema
US10545749B2 (en) * 2014-08-20 2020-01-28 Samsung Electronics Co., Ltd. System for cloud computing using web components
US20190199751A1 (en) * 2017-12-21 2019-06-27 Forcepoint, LLC Shadow IT Discovery Using Traffic Signatures
CN109359487B (zh) * 2018-10-09 2022-02-18 湖北文理学院 一种基于硬件隔离的可扩展安全影子存储及标签管理方法
CN109618202B (zh) * 2018-12-24 2020-12-08 深圳创维-Rgb电子有限公司 控制外设的方法、电视及可读存储介质

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019078489A1 (ko) * 2017-10-19 2019-04-25 에스케이텔레콤 주식회사 사물 인터넷 플랫폼 서비스 제공 방법 및 서버장치
CN108809950A (zh) * 2018-05-21 2018-11-13 中国科学院信息工程研究所 一种基于云端影子系统的无线路由器保护方法和系统
CN108880887A (zh) * 2018-06-20 2018-11-23 山东大学 基于微服务的陪护机器人云服务系统及方法
CN109819061A (zh) * 2018-09-11 2019-05-28 华为技术有限公司 一种在云系统中处理云服务的方法、装置和设备

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114726806A (zh) * 2022-03-29 2022-07-08 驭势(上海)汽车科技有限公司 智能设备影子管理方法、系统、装置、设备和介质

Also Published As

Publication number Publication date
CN113454966A (zh) 2021-09-28
CN113454966B (zh) 2023-02-17

Similar Documents

Publication Publication Date Title
US20080104661A1 (en) Managing Policy Settings for Remote Clients
EP2874376A1 (en) Method and system for information synchronization between cloud storage gateways, and cloud storage gateway
WO2019075773A1 (zh) 数据处理方法、装置、计算机设备和存储介质
CN108287894B (zh) 数据处理方法、装置、计算设备及存储介质
US20210092073A1 (en) Resource trees by management controller
JP2008234206A (ja) 情報送信システム、情報処理装置、情報管理装置及び情報送信方法
WO2023216532A1 (zh) 一种数字资产的管理方法及相关装置
US11750716B2 (en) Methods for publishing resource, and gateway
CN112583760B (zh) 一种对象存储的访问方法、装置、设备和计算机存储介质
WO2021012235A1 (zh) 一种影子设备的生成方法、设备及存储介质
CN113454586A (zh) 一种影子设备的生成方法、设备及存储介质
CN113746641B (zh) 一种基于分布式存储的odx协议处理方法
WO2016041342A1 (zh) 一种m2m中管理应用资源的方法和注册节点
KR101759429B1 (ko) 멀티 도메인 환경에서 도메인과 대응되는 피어 및 이의 제어 방법
WO2020010270A1 (en) Dynamic routing using a distributed hash table
US11991171B2 (en) Communication method for device, device and storage medium
CN112631727B (zh) 一种容器组pod的监控方法及装置
TWI714017B (zh) 資料處理方法和裝置、伺服器
WO2021087865A1 (zh) 寻址方法、寻址系统以及寻址装置
CN112612793A (zh) 资源查询方法、装置、节点设备及存储介质
US10541864B1 (en) System and method for connection efficiency
JP6852424B2 (ja) アプリケーションサーバ、その方法及びプログラム
WO2023077846A1 (zh) 数据处理方法、设备、系统及装置
CN117194298B (zh) 一种控制方法、装置、设备及存储介质
US20240028559A1 (en) Method for Obtaining Manufacturer Usage Description Mud File, Device, and System

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: 19938774

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: 19938774

Country of ref document: EP

Kind code of ref document: A1