WO2021217631A1 - Service sharing method, communication device, and cloud platform - Google Patents

Service sharing method, communication device, and cloud platform Download PDF

Info

Publication number
WO2021217631A1
WO2021217631A1 PCT/CN2020/088454 CN2020088454W WO2021217631A1 WO 2021217631 A1 WO2021217631 A1 WO 2021217631A1 CN 2020088454 W CN2020088454 W CN 2020088454W WO 2021217631 A1 WO2021217631 A1 WO 2021217631A1
Authority
WO
WIPO (PCT)
Prior art keywords
service
cloud platform
services
communication device
subscription
Prior art date
Application number
PCT/CN2020/088454
Other languages
French (fr)
Chinese (zh)
Inventor
吕小强
茹昭
Original Assignee
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Priority to PCT/CN2020/088454 priority Critical patent/WO2021217631A1/en
Priority to CN202080095852.7A priority patent/CN115053505B/en
Publication of WO2021217631A1 publication Critical patent/WO2021217631A1/en

Links

Images

Classifications

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

Definitions

  • This application relates to the field of communication, and more specifically, to a service sharing method, communication device, and cloud platform.
  • Intelligent household appliances include ordinary devices (Normal Device, ND) and resource-constrained devices (Resource Constrained Device, RCD).
  • Ordinary equipment may include equipment with strong capabilities in terms of processing speed, continuous work, and networking.
  • Resource-constrained equipment is a type of equipment relative to ordinary equipment. Due to the relative lack of hardware resources, resource-constrained devices may have poor service processing capabilities and endurance capabilities, and may periodically go to sleep in the network (save power), or cannot process large-scale business requests in real time.
  • IoT devices are limited by their own hardware resources, they cannot implement some basic functions, such as timing functions, password processing functions, camera functions, and multimedia resource storage functions. This not only affects the user experience, but also cannot use the capabilities of the entire Internet of Things system to improve the capabilities of the device.
  • the embodiments of the present application provide a service sharing method, a communication device, and a cloud platform, which can improve the ability of the device to provide services.
  • the embodiment of the application provides a service sharing method, including:
  • the first device sends a subscription service request, where the subscription service request includes subscription information of the first service, and the first service is in the set of discoverable services.
  • the first device receives a response message, and the response message includes the content of the first service.
  • the embodiment of the application provides a service sharing method, including:
  • the second device receives a subscription service request, where the subscription service request includes subscription information of the first service, and the first service is in the set of discoverable services.
  • the second device sends a response message, and the response message includes the content of the first service.
  • the embodiment of the application provides a service sharing method, including:
  • the cloud platform receives a subscription service request from the first device, the subscription service request includes subscription information of the first service, and the first service is in the set of discoverable services;
  • the cloud platform sends a response message to the first device, and the response message includes the content of the first service.
  • An embodiment of the present application provides a communication device, including:
  • the first sending unit is configured to send a subscription service request, where the subscription service request includes subscription information of a first service, and the first service is in a set of discoverable services;
  • the first receiving unit is configured to receive a response message, the response message including the content of the first service.
  • An embodiment of the present application provides a communication device, including:
  • the first receiving unit is configured to receive a subscription service request, where the subscription service request includes subscription information of a first service, and the first service is in a set of discoverable services;
  • the first sending unit is configured to send a response message, and the response message includes the content of the first service.
  • the embodiment of the application provides a cloud platform, including:
  • the first receiving unit is configured to receive a subscription service request from a first device, where the subscription service request includes subscription information of a first service, and the first service is in a set of discoverable services;
  • the first sending unit is configured to send a response message to the first device, and the response message includes the content of the first service.
  • the embodiment of the present application provides a communication device including a processor and a memory.
  • the memory is used to store a computer program
  • the processor is used to call and run the computer program stored in the memory to execute the above-mentioned service sharing method.
  • the embodiment of the present application provides a cloud platform including a processor and a memory.
  • the memory is used to store a computer program
  • the processor is used to call and run the computer program stored in the memory to execute the above-mentioned service sharing method.
  • the embodiment of the present application provides a chip for implementing the above-mentioned service sharing method.
  • the chip includes: a processor, configured to call and run a computer program from the memory, so that the device installed with the chip executes the above-mentioned service sharing method.
  • the embodiment of the present application provides a computer-readable storage medium for storing a computer program, and the computer program enables a computer to execute the above-mentioned service sharing method.
  • the embodiments of the present application provide a computer program product, including computer program instructions, and the computer program instructions cause a computer to execute the above-mentioned service sharing method.
  • the embodiment of the present application provides a computer program, which when running on a computer, causes the computer to execute the above-mentioned service sharing method.
  • service sharing between devices is realized through subscription, thereby improving the ability of the device to provide external services.
  • Fig. 1 is a schematic diagram of an application scenario according to an embodiment of the present application.
  • Fig. 2 is a schematic flowchart of a service sharing method according to an embodiment of the present application.
  • Fig. 3 is a schematic flowchart of a service sharing method according to another embodiment of the present application.
  • Fig. 4 is a schematic flowchart of a service sharing method according to another embodiment of the present application.
  • Fig. 5 is a schematic diagram of an application example of the service sharing method according to an embodiment of the present application.
  • Fig. 6 is a schematic diagram of another application example of the service sharing method according to an embodiment of the present application.
  • Fig. 7 is a schematic block diagram of a communication device according to an embodiment of the present application.
  • Fig. 8 is a schematic block diagram of a communication device according to another embodiment of the present application.
  • Fig. 9 is a schematic block diagram of a communication device according to another embodiment of the present application.
  • Fig. 10 is a schematic block diagram of a communication device according to another embodiment of the present application.
  • Fig. 11 is a schematic block diagram of a communication device according to another embodiment of the present application.
  • Fig. 12 is a schematic block diagram of a communication device according to another embodiment of the present application.
  • Fig. 13 is a schematic block diagram of a communication device according to an embodiment of the present application.
  • Fig. 14 is a schematic block diagram of a chip according to an embodiment of the present application.
  • Fig. 15 is a schematic block diagram of a communication system according to an embodiment of the present application.
  • GSM Global System of Mobile Communication
  • CDMA Code Division Multiple Access
  • WCDMA Wideband Code Division Multiple Access
  • GPRS General Packet Radio Service
  • LTE Long Term Evolution
  • LTE-A Advanced Long Term Evolution
  • NR New Radio
  • UMTS universal mobile telecommunication system
  • WLAN wireless Local Area Networks
  • 5G next-generation communications
  • D2D Device to Device
  • M2M Machine to Machine
  • MTC machine type communication
  • V2V vehicle to vehicle
  • the communication system in the embodiments of the present application can be applied to a carrier aggregation (Carrier Aggregation, CA) scenario, can also be applied to a dual connectivity (DC) scenario, and can also be applied to a standalone (SA) deployment.
  • CA Carrier Aggregation
  • DC dual connectivity
  • SA standalone
  • the embodiment of the application does not limit the applied frequency spectrum.
  • the embodiments of this application can be applied to licensed spectrum or unlicensed spectrum.
  • the embodiments of this application describe various embodiments in combination with network equipment and terminal equipment.
  • the terminal equipment may also be referred to as User Equipment (UE), access terminal, subscriber unit, subscriber station, mobile station, mobile station, and remote. Station, remote terminal, mobile device, user terminal, terminal, wireless communication device, user agent or user device, etc.
  • UE User Equipment
  • access terminal subscriber unit, subscriber station, mobile station, mobile station, and remote.
  • Station remote terminal, mobile device, user terminal, terminal, wireless communication device, user agent or user device, etc.
  • the terminal device can be a station (STAION, ST) in a WLAN, a cellular phone, a cordless phone, a Session Initiation Protocol (SIP) phone, a wireless local loop (Wireless Local Loop, WLL) station, and personal digital processing (Personal Digital Assistant, PDA) devices, handheld devices with wireless communication capabilities, computing devices or other processing devices connected to wireless modems, vehicle-mounted devices, wearable devices, and next-generation communication systems, such as terminal devices in the NR network or Terminal equipment in the public land mobile network (PLMN) network that will evolve in the future.
  • STAION, ST station
  • WLAN Wireless Local Loop
  • PDA Personal Digital Assistant
  • the terminal device may also be a wearable device.
  • Wearable devices can also be called wearable smart devices. It is a general term for using wearable technology to intelligently design everyday wear and develop wearable devices, such as glasses, gloves, watches, clothing and shoes.
  • a wearable device is a portable device that is directly worn on the body or integrated into the user's clothes or accessories. Wearable devices are not only a kind of hardware device, but also realize powerful functions through software support, data interaction, and cloud interaction.
  • wearable smart devices include full-featured, large-sized, complete or partial functions that can be achieved without relying on smart phones, such as smart watches or smart glasses, and only focus on a certain type of application function, and need to cooperate with other devices such as smart phones.
  • a network device can be a device used to communicate with mobile devices.
  • the network device can be an access point (AP) in WLAN, a base station (BTS) in GSM or CDMA, or a device in WCDMA.
  • a base station (NodeB, NB) can also be an Evolutional Node B (eNB or eNodeB) in LTE, or a relay station or access point, or a vehicle-mounted device, a wearable device, and a network device (gNB) in the NR network Or network equipment in the PLMN network that will evolve in the future.
  • AP access point
  • BTS base station
  • gNB network device
  • the network equipment provides services for the cell
  • the terminal equipment communicates with the network equipment through the transmission resources (for example, frequency domain resources, or spectrum resources) used by the cell
  • the cell may be a network equipment (for example, The cell corresponding to the base station.
  • the cell can belong to a macro base station or a base station corresponding to a small cell.
  • the small cell here can include: Metro cell, Micro cell, Pico Cells, Femto cells, etc. These small cells have the characteristics of small coverage and low transmit power, and are suitable for providing high-rate data transmission services.
  • Fig. 1 exemplarily shows a communication system 100.
  • the communication system includes a network device 110 and two terminal devices 120.
  • the communication system 100 may include multiple network devices 110, and the coverage of each network device 110 may include other numbers of terminal devices 120, which is not limited in the embodiment of the present application.
  • the communication system 100 may also include other network entities such as mobility management entities (Mobility Management Entity, MME), access and mobility management functions (Access and Mobility Management Function, AMF). Not limited.
  • MME Mobility Management Entity
  • AMF Access and Mobility Management Function
  • OCF Open Connectivity Foundation
  • resources can represent logical functional entities of each device, each functional service of the device, and the status of the device. These logical functional entities are determined by the server Open to the client for access and operation, and the client interacts with the server through the resource operation CRUDN.
  • the parameters of OCF resources mainly include URI, resource attributes, resource references and interfaces.
  • Each resource has its own URI, and some resources have predefined URIs. This resource can be obtained by accessing the corresponding URI;
  • Each resource contains properties, which are used to describe the relevant information of the resource;
  • Resource reference Establish a reference relationship between resources through links
  • Interface The expression of the open resource and the corresponding operation method.
  • Common attributes include the basic attributes of resources.
  • the common attributes in OCF Core include:
  • n the name of the resource
  • a combination of one or more resources in a device can provide a capability.
  • a timer resource when it is used to provide a capability to the outside world, can be considered as a timing service.
  • one device can be used to improve the capability of another device. For example, use the capabilities of ND in the Internet of Things system to improve the function of RCD.
  • FIG. 2 is a schematic flowchart of a service sharing method 200 according to an embodiment of the present application. This method can optionally be applied to the system shown in FIG. 1 and can also be applied to an Internet of Things system, but is not limited to this. The method includes at least part of the following content.
  • the first device sends a subscription service request, where the subscription service request includes subscription information of the first service, and the first service is in the set of discoverable services.
  • the first device receives a response message, where the response message includes content of the first service.
  • the subscription information of the first service may include a subscription identifier, subscription content, and so on.
  • the subscription identifier may indicate the type of local subscription service. For example, if the subscription identifier is 0, it means that a resource in a certain service in the second device needs to be subscribed. If the resource of the service in the second device changes, the first device is notified. For another example, the subscription identifier being 1 indicates that the resource is unsubscribed, and if the resource of the service in the second device changes, the first device will not be notified. For another example, the subscription identifier 2 indicates the function of the subscription service, and a second service similar to the subscribed first service is generated on the first device, so that other devices can use the second service on the first device to implement the corresponding function.
  • the subscription content may include some basic information of the subscribed first service, such as the service identifier, name, address, and so on.
  • the method further includes: the first device sends a discovery service request; the first device receives a discovery service response, and the discovery service response includes a set of services that the second device can provide externally .
  • the first device may send a service discovery request to the second device, and obtain the set of services that the second device can provide externally from the set of discoverable services of the second device included in the received service discovery response.
  • the first device may send a discovery service request to the cloud platform, and from the set of discoverable services of the cloud platform included in the received service discovery response, the set of discoverable services of the cloud platform may include one or more A collection of services that the second device can provide externally.
  • the first service is in the discoverable service set of the second device, and the discoverable service set of the second device includes a set of services that the second device can provide externally.
  • a collection of discoverable resources can be included in the device.
  • the set of discoverable resources may include a set of discoverable services. Publishing a resource in the discoverable resource collection allows other devices to discover the resource and then access the resource (for example, by accessing the resource to implement a switch operation).
  • a service is published to a set of discoverable services, so that other devices can discover this service, and then use this service (for example, using a timing service).
  • the first device is RCD
  • the second device is ND.
  • ND can put the service link that it can provide externally into the discoverable service collection such as oic.r.service resource, and then ND publishes the oic.r.service resource to the discoverable resource collection such as /res resource; /res resource is The collection of resources that the ND can provide externally.
  • a resource published in the /res resource can enable other devices to discover this resource and then access this resource.
  • the ND publishes the oic.r.service resource to the /res resource, so that other devices can discover the services that this ND can provide to the outside world. In this way, the RCD can discover the services that the ND can provide to the outside world.
  • the services that ND can provide externally include timing, temperature measurement, and camera.
  • the RCD wants to obtain the temperature measurement service, it can send a subscription service request for subscribing to the temperature measurement service to the ND.
  • the subscription service request includes the subscription information of the temperature measurement service.
  • the ND can authenticate the RCD. After the authentication is passed, the content of the temperature measurement service (for example, the current room temperature is 30°C) is sent to the RCD through a response message.
  • the first service is in a set of discoverable services of a cloud platform
  • the set of discoverable services of the cloud platform includes the services that the second device publishes on the cloud platform and can provide externally. Collection of services.
  • the first device is RCD
  • the second device is ND.
  • ND can put the service links that it can provide externally into its own discoverable service collection oic.r.service resource, and then ND publishes oic.r.service resource to /res resource; /res resource means that ND can externally The collection of resources provided.
  • ND can publish the oic.r.service resource to the discoverable resource collection/res resource of the cloud platform.
  • the /res resource of the cloud platform may include one or more sets of services that the ND can provide externally. In this way, RCD can discover the services that one or more NDs can provide externally on the cloud platform.
  • the /res resource of the cloud platform includes services that a certain ND can provide externally, including timing, temperature measurement, and camera.
  • the RCD wants to obtain the temperature measurement service, it can send a subscription service request for subscribing to the temperature measurement service to the cloud platform, and the subscription service request includes the subscription information of the temperature measurement service.
  • the cloud platform After the cloud platform receives the subscription service request, it can authenticate the RCD. After the authentication is passed, the content of the temperature measurement service is sent to the RCD through a response message.
  • the method further includes: the first device generates a second service on the first device based on the response message, and the second service includes the same resources as the first service.
  • the RCD may locally generate a second service that is the same as the resources included in the first service.
  • Each service can include a list of general parameters href, if, it, etc., as well as a list of function parameters.
  • the response message may include a list of function parameters provided by the first service.
  • the first service includes a timing service
  • the list of function parameters includes ⁇ starttime, stoptime, repeat ⁇ .
  • the function parameter list of the second service generated locally by RCD also includes ⁇ starttime, stoptime, repeat ⁇ .
  • the method further includes: the first device publishes the second service to the discoverable resource set of the first device.
  • the RCD after the RCD generates the second service locally, it can publish the second service to its own discoverable resource collection, such as the /res resource. In this way, other devices can also discover the set of resources that the RCD can provide externally. Compared with the resources that the RCD can provide originally, the set has more resources for the second service, such as timing, temperature measurement, and so on.
  • the second service includes a subscription parameter, and the subscription parameter is used to identify that the second service is a subscription service.
  • subscription parameters can be added to services subscribed from other devices to identify that these services are subscribed, which is different from the services that the first device itself can provide.
  • the subscription parameter may be a newly-added parameter, and the newly-added subscription parameter may be used to indicate the location of the service on the ND.
  • the subscription parameter is an anchor parameter.
  • the anchor point parameter is also used to indicate the location of the first service on the second device or cloud platform.
  • the method further includes: the first device receives first operation information from a third device or a cloud platform, the first operation information includes the content to be modified of the second service; The first device sends a modification request to the second device based on the content to be modified of the second service, and the modification request includes the content to be modified of the first service.
  • the discoverable resource set of the first device may include resources of services that can be provided by itself and resources of services that can be provided through subscription.
  • the third device finds that the first device's discoverable resource set contains the content it needs, it can send an access request for query, modification, and other operations to the first device.
  • the first operation information included in the access request sent by the third device to the first device is "write" operation information, which is used to modify the second service.
  • the second service is a service subscribed by the first device from the second device. And, the second service is generated according to the first service of the second device.
  • the first device after receiving the "write" operation that needs to modify the second service, the first device sends a modification request for modifying the first service to the second device.
  • the second device modifies the content of the first service according to the modification request.
  • desk lamp 1 (first device) is RCD
  • TV (second device) is ND.
  • the desk lamp uses the time service A of the TV to generate the time service B locally.
  • Lamp 2 (the third device) wants to use the timer service B of Lamp 1, for example, wants to set an alarm clock at 7 o'clock in the morning.
  • the first operation information sent by the table lamp 2 to the table lamp 1 includes setting the alarm time of the timer service B to 7:00 AM.
  • the modification request sent by the desk lamp 1 to the TV includes the alarm time of the timer service A set to 7:00 AM. Waiting until 7 o'clock in the morning, the timer service A in the TV can send a reminder that the time has reached the lamp 1 and the lamp 1 can forward the reminder to the lamp 2.
  • the method further includes: the first device receives the modification result of the first service returned by the second device; The third device or the cloud platform sends the modification result of the second service.
  • the modification result returned to the first device may carry a success flag, otherwise, it may carry a failure flag or not return the modification result.
  • the first device may return the modification result of the second service corresponding to the first service to the third device or the cloud platform that initiated the first operation information.
  • the method further includes: the first device receives second operation information from a third device, and the second operation information is used to request a second service; the first device is based on the The second operation information sends the second service to the third device.
  • the second operation information included in the access request sent by the third device to the first device is "read" operation information.
  • the second service is a temperature measurement service.
  • the first device can read the current temperature from its own temperature measurement service, and then send the read temperature Give the third device.
  • the method further includes: the first device synchronizing the second service based on the change of the first service in the second device.
  • the synchronization method includes: the first device receives a notification message from the second device or the cloud platform, and the notification message includes the information of the first service that has changed in the second device. Content; the first device updates the content of the second service based on the content of the changed first service.
  • the changed content can be notified to the first device through a notification message, or the notification message can be sent to the cloud platform first, and the cloud platform forwards it Give the first device.
  • the content of the same service of the first device and the second device can be synchronized.
  • the content of the same service of the first device, the second device, and the cloud platform can be synchronized.
  • the room temperature measured last time was 31°C
  • the room temperature measured this time was 30°C.
  • the second device may send a notification message to the first device to inform the first device that the measurement result of the temperature measurement service has become 30°C.
  • the first device can change the room temperature from 31°C to 30°C in the temperature measurement service subscribed to.
  • the timing start time is 7:00AM and the end time is 7:10AM.
  • the second device may send a notification message to the first device to inform the first device of the timing start of the timing service.
  • the first device can modify the status in the timed service subscribed to by the first device to timed start.
  • the second device may send a notification message to the first device to inform the first device that the timing of the timing service is over.
  • the first device can modify the status of the timed service subscribed to by the first device to timed end.
  • the method further includes: the first device sends the notification message to the third device.
  • the third device requests to use a certain subscription service of the first device.
  • the first device may send the notification message to the third device.
  • the first device changes the room temperature of 31°C in the temperature measurement service subscribed to 30°C, and then forwards the notification message to the third device to inform the first device that the measurement result of the temperature measurement service becomes Up to 30°C.
  • FIG. 3 is a schematic flowchart of a service sharing method 300 according to an embodiment of the present application. This method can optionally be applied to the system shown in FIG. 1 and can also be applied to an Internet of Things system, but is not limited to this. The method includes at least part of the following content.
  • the second device receives a subscription service request, where the subscription service request includes subscription information of a first service, and the first service is in a set of discoverable services.
  • the second device sends a response message, where the response message includes the content of the first service.
  • the first service is in the discoverable service set of the second device, and the discoverable service set of the second device includes a set of services that the second device can provide externally.
  • receiving the subscription service request by the second device includes: receiving the subscription service request from the first device or the cloud platform by the second device;
  • the sending of a response message by the second device includes: the second device sending a response message to the first device or the cloud platform.
  • the method further includes: the second device receives a discovery service request; the second device sends a discovery service response, and the discovery service response includes information that the second device or cloud platform can provide externally Collection of services.
  • receiving the discovery service request by the second device includes: receiving the discovery service request by the second device from the first device or the cloud platform;
  • the sending of the discovery service response by the second device includes: the second device sending the discovery service response to the first device or the cloud platform.
  • the method further includes: the second device receives a modification request from the first device or the cloud platform, and the modification request includes the content to be modified of the first service; the second device The first service is modified based on the modification request; the second device sends the modification result of the first service to the first device or the cloud platform.
  • the method further includes: the second device sending a notification message to the first device, and the notification message includes the content of the first service that has changed in the second device.
  • the second device includes a correspondence between the subscribed first service and the first device subscribed to the first service.
  • the second device when multiple first devices subscribe to the first service, includes multiple instances of the first service, and each instance corresponds to a subscription to the first service.
  • the first device to serve.
  • Each management table may include the corresponding relationship between the subscribed service (first service instance) and the subscriber (first device).
  • FIG. 4 is a schematic flowchart of a service sharing method 400 according to an embodiment of the present application. This method can optionally be applied to the system shown in FIG. 1 and can also be applied to an Internet of Things system, but is not limited to this. The method includes at least part of the following content.
  • the cloud platform receives a subscription service request from a first device, where the subscription service request includes subscription information of a first service, and the first service is in a set of discoverable services.
  • the cloud platform sends a response message to the first device, where the response message includes the content of the first service.
  • the first service is in the discoverable service set of the cloud platform, and the discoverable service set of the cloud platform includes the services that the second device publishes on the cloud platform and can be provided externally. Collection.
  • the method further includes: the cloud platform receives a discovery service request from the first device; the cloud platform sends a discovery service response to the first device, and the discovery service response includes the cloud platform A collection of services that can be provided externally.
  • the method further includes: the cloud platform receives a service release message from the second device, the service release message includes a set of services that the second device can provide externally; the cloud platform Publish the set of services that the second device can provide externally to the set of discoverable services of the cloud platform.
  • the method further includes: the cloud platform receives a modification request from the first device, and the modification request includes the content to be modified of the first service; and the cloud platform forwards to the second device The modification request; the cloud platform receives the modification result of the first service returned by the second device; the cloud platform sends the modification result of the first service to the first device.
  • the method further includes: the cloud platform receives a notification message from the second device, and the notification message includes the content of the service changed in the second device; and the cloud platform sends the notification message to the first device.
  • the device forwards the notification message.
  • FIG. 5 is a schematic diagram of an application example of the service sharing method according to an embodiment of the application.
  • the method can include the following steps:
  • the device (ND) that can provide services to the outside world publishes the services that it can provide to the outside world (it can also be considered as the ability of the device to provide to the outside world).
  • ND can provide services externally can include different resources.
  • a service can include one or more resources.
  • oic.r.service type resources abbreviated as oic.r.service resources.
  • Each device may have an oic.r.service resource, which can represent a collection of services that the device can provide to the outside world.
  • An example of an oic.r.service resource is as follows:
  • ND needs to publish resources of type oic.r.service to discoverable resource collections such as /res resources. All resources on the ND that can be discovered by other devices can be published to the /res resource. Other devices can obtain resources of the oic.r.service type by viewing the /res resource of the ND, and then discover the services published by the ND in the resource.
  • the RCD can discover the resources and services that the ND can discover by other devices under the /res resource of the ND, and the /res resource includes the resources/sevice that it publishes to provide external services.
  • the discovery process may include: the RCD sends a service discovery request to the ND to discover the set of services that the ND can provide externally.
  • the ND returns a discovery service response to the RCD, and the RCD obtains the set of services that the ND can provide externally from the response.
  • the RCD selects one or several services (services provided externally by the ND) from the service set obtained in step S52, and completes the registration of the selected service.
  • the registration process can include: RCD sends a subscription service request to ND's resource /oic/service, which provides external services.
  • An example is as follows:
  • the subscription identifier is 0, which can indicate that the resource in a certain service in the ND needs to be subscribed. If the resource of the service in the ND changes, the RCD is notified. For another example, if the subscription identifier is 1, it means that the resource is unsubscribed. If there is a change in the resource of the service in the ND, the RCD will not be notified.
  • the subscription identifier 2 indicates the function of the subscription service, and a second service similar to the subscribed first service is generated on the RCD, so that other devices can use the second service on the RCD to implement the corresponding function.
  • the subscription identifier obs value 2
  • the content of the subscription content included in the links parameter
  • the ND authenticates whether the RCD is eligible to subscribe to the above service. If so, perform service registration on the ND, generate a management table of the subscribed service and the subscriber, perform the registration service completion response, and return a subscription response message to the RCD.
  • the management table of the subscribed service and the subscriber can include multiple forms, which can be different according to specific implementations. The management table can be used to complete the management and matching of the subscribed service and the subscriber.
  • the subscription response message can contain the basic content of the subscribed service.
  • Examples of the subscribed timed service are as follows:
  • the response message can carry a list of function parameters provided by the subscribed service, such as the above ⁇ starttime, stoptime, repeat ⁇ .
  • the service or the resources in the service can include a list of general parameters such as ⁇ href, if, it ⁇ , etc., and can also include a list of function parameters.
  • the function parameter list of each service or resource in the service can be different, and is used to represent the capability of the service or resource.
  • the RCD may locally generate a corresponding second service according to the subscribed first service.
  • the second service can be an image of the subscribed first service or create a copy of the subscribed service.
  • the RCD can publish the second service as a discoverable service to its /res resource. Each device can have a unique /res resource. In the generated second service, it can be identified as a subscribed service. There can be multiple identification methods, examples are as follows:
  • the anchor parameter can identify the real location of the resource (for example, on which device), because generally href only points to a relative position (for example, a specific address on the device); in this way, the network side can accurately locate a certain resource through anchor+href The address of a resource of the service.
  • the RCD can register the service information with the ND. After the ND completes the service information registration, it will return a service information registration response to the RCD to inform the RCD whether the registration is successful. After the registration is successful, RCD publishes its subscribed service in its own /res resource, and then other devices may discover the RCD service and can operate the service.
  • the RCD can directly obtain the content of the service from the locally subscribed service and return it to the third party.
  • the RCD If it is a "write" operation, after the RCD saves the modified content of the service locally, it needs to send the modified content to the ND.
  • the ND saves the above-mentioned modified content in the resource of its corresponding service. What needs to be explained here is that the service published on the ND can maintain a corresponding subscription service example for each subscription service party (RCD), and use the management table generated in step S53 to manage it.
  • RCD subscription service party
  • the ND may return a service activation response to the RCD, and the service activation response may be in the form of a notification message.
  • the RCD will be notified through a notification message, so as to ensure the consistency of the subscribed service on the ND and the service generated on the RCD.
  • TCD can provide richer services with the help of ND.
  • the desk lamp does not have the function of timing due to the limitation of hardware conditions, nor can it complete the function of timing switch of the desk lamp.
  • a television device that can provide a timer in the same network.
  • the desk lamp can subscribe to the timing service resources of the TV and generate a copy locally, which can be discovered by a third party.
  • the desk lamp has a timed service, it can provide the function of a timed switch to the outside.
  • a third party sets a timing time, although there is also a timing service on the desk lamp, it actually completes the actual "timing" task on the TV.
  • the copy of the timing service on the RCD can be synchronized by notification, and the RCD can complete various services related to the corresponding timing service.
  • example 1 can be applied to local sharing services
  • example 2 can be applied to remote sharing services.
  • FIG. 6 is a schematic diagram of an application example of the service sharing method according to an embodiment of the application.
  • a cloud platform is added. The method can include the following steps:
  • the device (ND) that can provide services to the outside world publishes the services that it can provide to the outside world (it can also be considered as the ability of the device to provide to the outside world).
  • ND can provide services externally can include different resources; a service can include one or more resources.
  • oic.r.service resource When ND needs to open its service to the outside world, it can put the service link that it needs to open into the resource of type oic.r.service (referred to as oic.r.service resource).
  • Each device may have an oic.r.service resource, which can represent a collection of services that the device can provide to the outside world.
  • oic.r.service resource refer to Example 1 above.
  • the ND needs to publish its own discoverable service collection, such as oic.r.service type resources, to the discoverable resource collection/res resource of the cloud platform. All resources and services that can be discovered by other devices on the ND can be published in the /res resource. Other devices can obtain resources of the oic.r.service type by viewing the /res resource of the ND, and then discover the services published by the ND in the resource.
  • oic.r.service type resources such as oic.r.service type resources
  • RCD may not know which ND device provides the service, but knows the service provided by the cloud platform. For example, RCD regards the services published by the cloud platform that can be discovered by other devices as the services opened by the cloud platform, and it is not necessary to determine the service of that device.
  • the RCD can discover the services that can be discovered by other devices on the cloud platform under the /res resource of the cloud platform, including the resources/sevices that it publishes to provide external services. This may include services that one or more NDs can provide externally.
  • the discovery process may include: the RCD sends a service discovery request to the cloud platform to discover a set of services that can be provided externally by one or more NDs in the cloud platform.
  • the cloud platform returns a discovery service response to the RCD, and the RCD obtains the set of services that the cloud platform can provide externally.
  • the RCD selects one or several services (services provided by one or more NDs) from the service set obtained in step S62, and completes the registration of the selected service.
  • the registration process can include: RCD sends a subscription service request to /myservice of the cloud platform, an example is as follows:
  • the subscription identifier is 0, which can indicate that the resource in a certain service in the ND needs to be subscribed. If the resource of the service in the ND changes, the RCD is notified through the cloud platform. For another example, if the subscription identifier is 1, it means that the resource is unsubscribed. If there is a change in the resource of the service in the ND, the RCD will not be notified through the cloud platform.
  • the subscription identifier 2 indicates the function of the subscription service, and a second service similar to the subscribed first service is generated on the RCD, so that other devices can use the second service on the RCD to implement the corresponding function.
  • the subscription service request will include the subscription identifier obs (the value is 2), and the content of the subscription (the content contained in the links parameter).
  • the cloud platform After the cloud platform receives the above subscription service request, it forwards the above subscription service request to the ND. It can also be forwarded after the cloud platform authentication or authenticated in the ND.
  • the ND generates a management table of the subscribed service and the subscriber and returns a subscription response message to the cloud platform device, and the cloud platform may return the subscription response message to the RCD.
  • the management table of the subscribed service and the subscriber can include multiple forms, which can be different according to specific implementations. The management table can be used to complete the management and matching of the subscribed service and the subscriber.
  • the subscription response message may include the basic content of the subscription service.
  • the subscribed timing service please refer to the above example 1.
  • the response message can carry a list of function parameters provided by the subscribed service, such as the above ⁇ starttime, stoptime, repeat ⁇ .
  • the service or the resources in the service can include a list of general parameters such as ⁇ href, if, it ⁇ , etc., and can also include a list of function parameters.
  • the function parameter list of each service or resource in the service can be different, and is used to represent the capability of the service or resource.
  • the RCD may locally generate a corresponding second service according to the subscribed first service.
  • the second service can be an image of the subscribed first service or create a copy of the subscribed service.
  • the RCD can publish the second service as a discoverable service to its /res resource. In the generated second service, it can be identified as a subscribed service. There can be multiple identification methods, please refer to the related description of Example 1 above.
  • the RCD can register service information with the ND through the cloud platform. After the ND completes the service information registration, it can return a service information registration response to the RCD through the cloud platform to inform the RCD whether the registration is successful. After the registration is successful, RCD publishes its subscribed service in its own /res resource, and then other devices may discover the RCD service and can operate the service.
  • the RCD can directly obtain the content of the service from the locally subscribed service and return it to the third party.
  • the modified content needs to be sent to the cloud platform, and then the cloud platform sends the modified content to the ND.
  • the ND saves the above-mentioned modified content in the resource of its corresponding service.
  • the service published on the ND device can maintain a corresponding subscription service example for each subscription service party (RCD), and use the management table generated in step S63 to manage it.
  • the ND may return a service activation response to the RCD through the cloud platform, and the service activation response may be in the form of a notification message.
  • the RCD will be notified through a notification message, so as to ensure the consistency of the subscribed service on the ND and the service generated on the RCD, and to ensure that the service published by the ND on the cloud platform is consistent with Consistency of services on ND.
  • a resource-constrained device can use services shared by other devices in the network to solve the problem of its own lack of function caused by limited hardware resources. Service sharing can also improve the integration of services between different devices, which can provide richer scenario realization capabilities.
  • FIG. 7 is a schematic block diagram of a communication device 10 according to an embodiment of the present application.
  • the communication device 10 may include:
  • the first sending unit 101 is configured to send a subscription service request, where the subscription service request includes subscription information of a first service, and the first service is in a set of discoverable services;
  • the first receiving unit 102 is configured to receive a response message, the response message including the content of the first service.
  • the first service is in the discoverable service set of the second device, and the discoverable service set of the second device includes a set of services that the second device can provide externally.
  • the first service is in a set of discoverable services of a cloud platform
  • the set of discoverable services of the cloud platform includes the services that the second device publishes on the cloud platform and can provide externally. Collection of services.
  • the communication device further includes: a generating unit 103, configured to generate a second service on the communication device based on the response message, and the second service is related to the second service.
  • a service includes the same resources.
  • the communication device further includes: a publishing unit 104, configured to publish the second service to a discoverable service set of the communication device.
  • the second service includes a subscription parameter
  • the subscription parameter is used to identify that the second service is a subscription service.
  • the subscription parameter is an anchor point parameter.
  • the anchor point parameter is also used to indicate the location of the first service on the second device or cloud platform.
  • the communication device further includes:
  • the second sending unit 105 is configured to send a discovery service request
  • the second receiving unit 106 is configured to receive a discovery service response, where the discovery service response includes a set of services that the second device can provide externally.
  • the communication device further includes:
  • the third receiving unit 107 is configured to receive first operation information from a third device or cloud platform, where the first operation information includes the content to be modified of the second service;
  • the third sending unit 108 is configured to send a modification request to the second device based on the content to be modified of the second service, and the modification request includes the content to be modified of the first service.
  • the communication device further includes:
  • the fourth receiving unit 109 is configured to receive the modification result of the first service returned by the second device;
  • the fourth sending unit 111 is configured to send the modification result of the second service to the third device or the cloud platform based on the modification result of the first service.
  • the communication device further includes:
  • the fifth receiving unit 112 is configured to receive second operation information from the third device, where the second operation information is used to request the second service;
  • the fifth sending unit 113 is configured to send the second service to the third device based on the second operation information.
  • the communication device further includes: a synchronization unit 114, configured to synchronize the second service based on the change of the first service in the second device.
  • a synchronization unit 114 configured to synchronize the second service based on the change of the first service in the second device.
  • the synchronization unit 114 is specifically configured to: receive a notification message from a second device or a cloud platform, the notification message including the content of the first service that has changed in the second device; The content of the second service is updated based on the content of the changed first service.
  • the communication device further includes: a sixth sending unit 115, configured to send the notification message to a third device.
  • the communication device 10 of the embodiment of the present application can implement the corresponding function of the first device in the foregoing method embodiment.
  • the corresponding processes, functions, implementation modes, and beneficial effects of each module (sub-module, unit or component, etc.) in the communication device 10 please refer to the corresponding description in the foregoing method embodiment, which will not be repeated here.
  • each module (sub-module, unit or component, etc.) in the communication device 10 of the application embodiment can be implemented by different modules (sub-module, unit or component, etc.), or by the same module ( Sub-modules, units or components, etc.).
  • FIG. 9 is a schematic block diagram of a communication device 20 according to an embodiment of the present application.
  • the communication device 20 may include:
  • the first receiving unit 201 is configured to receive a subscription service request, where the subscription service request includes subscription information of a first service, and the first service is in a set of discoverable services;
  • the first sending unit 202 is configured to send a response message, and the response message includes the content of the first service.
  • the first service is in a discoverable service set of the communication device, and the discoverable service set of the communication device includes a set of services that the communication device can provide externally.
  • the first receiving unit 201 is specifically configured to receive a subscription service request from a first device or a cloud platform; the first sending unit 201 is specifically configured to send a request to the first device or the cloud platform The cloud platform sends a response message.
  • the communication device further includes:
  • the second receiving unit 203 is configured to receive a discovery service request
  • the second sending unit 204 is configured to send a discovery service response, where the discovery service response includes a collection of services that can be provided externally by the communication device or the cloud platform.
  • the second receiving unit 203 is specifically configured to receive a discovery service request from a first device or cloud platform; the second sending unit 204 is specifically configured to send a request to the first device or the cloud platform The platform sends a response to the discovery service.
  • the communication device further includes:
  • the third receiving unit 205 is configured to receive a modification request from the first device or cloud platform, where the modification request includes the content to be modified of the first service;
  • the modification unit 206 is configured to modify the first service based on the modification request
  • the third sending unit 207 is configured to send the modification result of the first service to the first device or the cloud platform.
  • the communication device further includes: a fourth sending unit 208, configured to send a notification message to the first device, the notification message including the content of the first service changed in the communication device .
  • the communication device includes a correspondence between the subscribed first service and the first device subscribed to the first service.
  • the communication device when multiple first devices subscribe to the first service, includes multiple instances of the first service, and each instance corresponds to a subscription to the first service.
  • the first device when multiple first devices subscribe to the first service, the communication device includes multiple instances of the first service, and each instance corresponds to a subscription to the first service. The first device.
  • the communication device 20 in the embodiment of the present application can implement the corresponding function of the second device in the foregoing method embodiment.
  • the corresponding processes, functions, implementation modes, and beneficial effects of each module (sub-module, unit or component, etc.) in the communication device 20 please refer to the corresponding description in the foregoing method embodiment, which will not be repeated here.
  • each module (sub-module, unit or component, etc.) in the communication device 20 of the application embodiment can be implemented by different modules (sub-module, unit or component, etc.), or by the same module ( Sub-modules, units or components, etc.).
  • FIG. 11 is a schematic block diagram of a cloud platform 30 according to an embodiment of the present application.
  • the cloud platform 30 may include:
  • the first receiving unit 301 is configured to receive a subscription service request from a first device, where the subscription service request includes subscription information of a first service, and the first service is in a set of discoverable services;
  • the first sending unit 302 is configured to send a response message to the first device, and the response message includes the content of the first service.
  • the first service is in the discoverable service set of the cloud platform, and the discoverable service set of the cloud platform includes the services that the second device publishes on the cloud platform and can be provided externally. Collection.
  • the cloud platform further includes:
  • the second receiving unit 303 is configured to receive a discovery service request from the first device
  • the second sending unit 304 is configured to send a discovery service response to the first device, and the discovery service response includes a set of services that the cloud platform can provide externally.
  • the cloud platform further includes:
  • the third receiving unit 305 is configured to receive a service release message from the second device, where the service release message includes a set of services that the second device can provide to the outside;
  • the publishing unit 306 is configured to publish the set of services that the second device can provide externally to the discoverable service set of the cloud platform.
  • the cloud platform further includes:
  • the fourth receiving unit 307 is configured to receive a modification request from the first device, where the modification request includes the content to be modified of the first service;
  • the third sending unit 308 is configured to forward the modification request to the second device
  • the fifth receiving unit 309 is configured to receive the modification result of the first service returned by the second device
  • the fourth sending unit 310 is configured to send the modification result of the first service to the first device.
  • the cloud platform further includes:
  • the sixth receiving unit 311 is configured to receive a notification message from the second device, where the notification message includes the content of the changed service in the second device;
  • the fifth sending unit 312 is configured to forward the notification message to the first device.
  • the cloud platform 30 of the embodiment of the present application can implement the corresponding functions of the cloud platform in the foregoing method embodiment.
  • the corresponding processes, functions, implementation manners, and beneficial effects of each module (sub-module, unit or component, etc.) in the cloud platform 30 please refer to the corresponding description in the foregoing method embodiment, which will not be repeated here.
  • each module (sub-module, unit or component, etc.) in the cloud platform 30 of the application embodiment can be implemented by different modules (sub-module, unit or component, etc.), or by the same module ( Sub-modules, units or components, etc.).
  • FIG. 13 is a schematic structural diagram of a communication device 600 according to an embodiment of the present application.
  • the communication device 600 includes a processor 610, and the processor 610 can call and run a computer program from the memory to implement the method in the embodiment of the present application.
  • the communication device 600 may further include a memory 620.
  • the processor 610 may call and run a computer program from the memory 620 to implement the method in the embodiment of the present application.
  • the memory 620 may be a separate device independent of the processor 610, or may be integrated in the processor 610.
  • the communication device 600 may further include a transceiver 630, and the processor 610 may control the transceiver 630 to communicate with other devices. Specifically, it may send information or data to other devices, or receive other devices. Information or data sent by the device.
  • the transceiver 630 may include a transmitter and a receiver.
  • the transceiver 630 may further include an antenna, and the number of antennas may be one or more.
  • the communication device 600 may be a network device of an embodiment of the present application, and the communication device 600 may implement the corresponding process implemented by the network device in each method of the embodiment of the present application.
  • the communication device 600 may implement the corresponding process implemented by the network device in each method of the embodiment of the present application.
  • details are not described herein again.
  • the communication device 600 may be a terminal device of an embodiment of the present application, and the communication device 600 may implement corresponding procedures implemented by the terminal device in each method of the embodiments of the present application. For brevity, details are not described herein again.
  • FIG. 14 is a schematic structural diagram of a chip 700 according to an embodiment of the present application.
  • the chip 700 includes a processor 710, and the processor 710 can call and run a computer program from the memory to implement the method in the embodiment of the present application.
  • the chip 700 may further include a memory 720.
  • the processor 710 may call and run a computer program from the memory 720 to implement the method in the embodiment of the present application.
  • the memory 720 may be a separate device independent of the processor 710, or may be integrated in the processor 710.
  • the chip 700 may further include an input interface 730.
  • the processor 710 can control the input interface 730 to communicate with other devices or chips, and specifically, can obtain information or data sent by other devices or chips.
  • the chip 700 may further include an output interface 740.
  • the processor 710 can control the output interface 740 to communicate with other devices or chips, and specifically, can output information or data to other devices or chips.
  • the chip can be applied to the network device in the embodiment of the present application, and the chip can implement the corresponding process implemented by the network device in each method of the embodiment of the present application.
  • the chip can implement the corresponding process implemented by the network device in each method of the embodiment of the present application.
  • the chip can be applied to the terminal device in the embodiment of the present application, and the chip can implement the corresponding process implemented by the terminal device in each method of the embodiment of the present application.
  • the chip can implement the corresponding process implemented by the terminal device in each method of the embodiment of the present application.
  • the chip mentioned in the embodiment of the present application may also be referred to as a system-level chip, a system-on-chip, a system-on-chip, or a system-on-chip, etc.
  • the aforementioned processors can be general-purpose processors, digital signal processors (digital signal processors, DSP), ready-made programmable gate arrays (field programmable gate arrays, FPGAs), application specific integrated circuits (ASICs), or Other programmable logic devices, transistor logic devices, discrete hardware components, etc.
  • DSP digital signal processors
  • FPGA field programmable gate arrays
  • ASIC application specific integrated circuits
  • the aforementioned general-purpose processor may be a microprocessor or any conventional processor.
  • the above-mentioned memory may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory.
  • the non-volatile memory can be read-only memory (ROM), programmable read-only memory (programmable ROM, PROM), erasable programmable read-only memory (erasable PROM, EPROM), and electrically available Erase programmable read-only memory (electrically EPROM, EEPROM) or flash memory.
  • the volatile memory may be random access memory (RAM).
  • the memory in the embodiment of the present application may also be static random access memory (static RAM, SRAM), dynamic random access memory (dynamic RAM, DRAM), Synchronous dynamic random access memory (synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (double data rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (enhanced SDRAM, ESDRAM), synchronous connection Dynamic random access memory (synch link DRAM, SLDRAM) and direct memory bus random access memory (Direct Rambus RAM, DR RAM) and so on. That is to say, the memory in the embodiments of the present application is intended to include, but is not limited to, these and any other suitable types of memory.
  • FIG. 15 is a schematic block diagram of a communication system 800 according to an embodiment of the present application.
  • the communication system 800 includes a first device 810 and a second device 820.
  • the first device 810 is configured to send a subscription service request, where the subscription service request includes subscription information of a first service, and the first service is in a set of discoverable services; and receives a response message, which includes the first service.
  • the second device 820 is used for receiving the subscription service request; sending the response message.
  • the first device 810 may be used to implement the corresponding function implemented by the first device in the foregoing method
  • the second device 820 may be used to implement the corresponding function implemented by the second device in the foregoing method.
  • I will not repeat them here.
  • the communication system 800 may further include: a cloud platform 830, configured to receive the subscription service request from the first device, where the subscription service request includes subscription information of the first service, and the first service is in a discoverable service In the set; sending a response message to the first device, the response message including the content of the first service.
  • the cloud platform 830 may be used to implement the corresponding functions implemented by the second device in the foregoing method. For the sake of brevity, I will not repeat them here.
  • the above embodiments it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof.
  • software it can be implemented in the form of a computer program product in whole or in part.
  • the computer program product includes one or more computer instructions.
  • the computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
  • the computer instruction may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium.
  • the computer instruction may be transmitted from a website, computer, server, or data center through a cable (Such as coaxial cable, optical fiber, Digital Subscriber Line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) to another website site, computer, server or data center.
  • the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or data center integrated with one or more available media.
  • the usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, and a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk (SSD)).
  • the size of the sequence number of the above-mentioned processes does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not correspond to the embodiments of the present application.
  • the implementation process constitutes any limitation.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Information Transfer Between Computers (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The present application relates to a service sharing method, a communication device, and a cloud platform. The service sharing method comprises: a first device sends a subscription service request, the subscription service request comprising subscription information of a first service, and the first service being in a set of discoverable services; and the first device receives a response message, the response message comprising content of the first service. According to embodiments of the present application, service sharing between devices is implemented by means of subscription, thereby improving the capability of a device to provide a service to an external device.

Description

服务分享方法、通信设备和云平台Service sharing method, communication equipment and cloud platform 技术领域Technical field
本申请涉及通信领域,并且更具体地,涉及一种服务分享方法、通信设备和云平台。This application relates to the field of communication, and more specifically, to a service sharing method, communication device, and cloud platform.
背景技术Background technique
随着物联网以及智能家居技术和产业的发展,智能化家用电器开始进入到普通居民的生活。智能化家用电器设备包括普通设备(Normal Device,ND)和资源受限设备(Resource Constrained Device,RCD)。普通设备可以包括在处理速度、持续工作、联网等方面的能力较强的设备。资源受限设备是相对普通设备而言的一种设备。资源受限设备由于硬件资源的相对匮乏,业务处理能力和续航能力可能较差,在网络中可能会周期性进入睡眠状态(节省电力)、或无法实时处理大批量的业务请求等。With the development of the Internet of Things and smart home technology and industry, smart home appliances have begun to enter the lives of ordinary residents. Intelligent household appliances include ordinary devices (Normal Device, ND) and resource-constrained devices (Resource Constrained Device, RCD). Ordinary equipment may include equipment with strong capabilities in terms of processing speed, continuous work, and networking. Resource-constrained equipment is a type of equipment relative to ordinary equipment. Due to the relative lack of hardware resources, resource-constrained devices may have poor service processing capabilities and endurance capabilities, and may periodically go to sleep in the network (save power), or cannot process large-scale business requests in real time.
由于部分物联网设备受限于自身的硬件资源,无法实现一些基本功能,例如定时功能、密码处理功能、摄像功能、多媒体资源存储功能等。这不仅影响用户的使用体验,也不能借助整个物联网系统的能力来提升设备的能力。Because some IoT devices are limited by their own hardware resources, they cannot implement some basic functions, such as timing functions, password processing functions, camera functions, and multimedia resource storage functions. This not only affects the user experience, but also cannot use the capabilities of the entire Internet of Things system to improve the capabilities of the device.
发明内容Summary of the invention
本申请实施例提供一种服务分享方法、通信设备和云平台,可以提升设备提供服务的能力。The embodiments of the present application provide a service sharing method, a communication device, and a cloud platform, which can improve the ability of the device to provide services.
本申请实施例提供一种服务分享方法,包括:The embodiment of the application provides a service sharing method, including:
第一设备发送订阅服务请求,该订阅服务请求包括第一服务的订阅信息,该第一服务在可发现服务集合中。The first device sends a subscription service request, where the subscription service request includes subscription information of the first service, and the first service is in the set of discoverable services.
该第一设备接收应答消息,该应答消息中包括该第一服务的内容。The first device receives a response message, and the response message includes the content of the first service.
本申请实施例提供一种服务分享方法,包括:The embodiment of the application provides a service sharing method, including:
第二设备接收订阅服务请求,该订阅服务请求包括第一服务的订阅信息,该第一服务在可发现服务集合中。The second device receives a subscription service request, where the subscription service request includes subscription information of the first service, and the first service is in the set of discoverable services.
该第二设备发送应答消息,该应答消息中包括该第一服务的内容。The second device sends a response message, and the response message includes the content of the first service.
本申请实施例提供一种服务分享方法,包括:The embodiment of the application provides a service sharing method, including:
云平台接收来自第一设备订阅服务请求,该订阅服务请求包括第一服务的订阅信息,该第一服务在可发现服务集合中;The cloud platform receives a subscription service request from the first device, the subscription service request includes subscription information of the first service, and the first service is in the set of discoverable services;
该云平台向该第一设备发送应答消息,该应答消息中包括该第一服务的内容。The cloud platform sends a response message to the first device, and the response message includes the content of the first service.
本申请实施例提供一种通信设备,包括:An embodiment of the present application provides a communication device, including:
第一发送单元,用于发送订阅服务请求,该订阅服务请求包括第一服务的订阅信息,该第一服务在可发现服务集合中;The first sending unit is configured to send a subscription service request, where the subscription service request includes subscription information of a first service, and the first service is in a set of discoverable services;
第一接收单元,用于接收应答消息,该应答消息中包括该第一服务的内容。The first receiving unit is configured to receive a response message, the response message including the content of the first service.
本申请实施例提供一种通信设备,包括:An embodiment of the present application provides a communication device, including:
第一接收单元,用于接收订阅服务请求,该订阅服务请求包括第一服务的订阅信息,该第一服务在可发现服务集合中;The first receiving unit is configured to receive a subscription service request, where the subscription service request includes subscription information of a first service, and the first service is in a set of discoverable services;
第一发送单元,用于发送应答消息,该应答消息中包括该第一服务的内容。The first sending unit is configured to send a response message, and the response message includes the content of the first service.
本申请实施例提供一种云平台,包括:The embodiment of the application provides a cloud platform, including:
第一接收单元,用于接收来自第一设备订阅服务请求,该订阅服务请求包括第一服务的订阅信息,该第一服务在可发现服务集合中;The first receiving unit is configured to receive a subscription service request from a first device, where the subscription service request includes subscription information of a first service, and the first service is in a set of discoverable services;
第一发送单元,用于向该第一设备发送应答消息,该应答消息中包括该第一服务的内容。The first sending unit is configured to send a response message to the first device, and the response message includes the content of the first service.
本申请实施例提供一种通信设备,包括处理器和存储器。该存储器用于存储计算机程序,该处理器用于调用并运行该存储器中存储的计算机程序,执行上述的服务分享方法。The embodiment of the present application provides a communication device including a processor and a memory. The memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory to execute the above-mentioned service sharing method.
本申请实施例提供一种云平台,包括处理器和存储器。该存储器用于存储计算机程序,该处理器用于调用并运行该存储器中存储的计算机程序,执行上述的服务分享方法。The embodiment of the present application provides a cloud platform including a processor and a memory. The memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory to execute the above-mentioned service sharing method.
本申请实施例提供一种芯片,用于实现上述的服务分享方法。The embodiment of the present application provides a chip for implementing the above-mentioned service sharing method.
具体地,该芯片包括:处理器,用于从存储器中调用并运行计算机程序,使得安装有该芯片的设备执行上述的服务分享方法。Specifically, the chip includes: a processor, configured to call and run a computer program from the memory, so that the device installed with the chip executes the above-mentioned service sharing method.
本申请实施例提供一种计算机可读存储介质,用于存储计算机程序,该计算机程序使得计算机执行上述的服务分享方法。The embodiment of the present application provides a computer-readable storage medium for storing a computer program, and the computer program enables a computer to execute the above-mentioned service sharing method.
本申请实施例提供一种计算机程序产品,包括计算机程序指令,该计算机程序指令使得计算机执行上述的服务分享方法。The embodiments of the present application provide a computer program product, including computer program instructions, and the computer program instructions cause a computer to execute the above-mentioned service sharing method.
本申请实施例提供一种计算机程序,当其在计算机上运行时,使得计算机执行上述的服务分享方法。The embodiment of the present application provides a computer program, which when running on a computer, causes the computer to execute the above-mentioned service sharing method.
本申请实施例,通过订阅实现设备间的服务分享,从而提升设备对外提供服务的能力。In the embodiment of the present application, service sharing between devices is realized through subscription, thereby improving the ability of the device to provide external services.
附图说明Description of the drawings
图1是根据本申请实施例的应用场景的示意图。Fig. 1 is a schematic diagram of an application scenario according to an embodiment of the present application.
图2是根据本申请一实施例的服务分享方法的示意性流程图。Fig. 2 is a schematic flowchart of a service sharing method according to an embodiment of the present application.
图3是根据本申请另一实施例的服务分享方法的示意性流程图。Fig. 3 is a schematic flowchart of a service sharing method according to another embodiment of the present application.
图4是根据本申请另一实施例的服务分享方法的示意性流程图。Fig. 4 is a schematic flowchart of a service sharing method according to another embodiment of the present application.
图5是根据本申请实施例的服务分享方法的一种应用示例的示意图。Fig. 5 is a schematic diagram of an application example of the service sharing method according to an embodiment of the present application.
图6是根据本申请实施例的服务分享方法的另一应用示例的示意图。Fig. 6 is a schematic diagram of another application example of the service sharing method according to an embodiment of the present application.
图7是根据本申请一实施例的通信设备的示意性框图。Fig. 7 is a schematic block diagram of a communication device according to an embodiment of the present application.
图8是根据本申请另一实施例的通信设备的示意性框图。Fig. 8 is a schematic block diagram of a communication device according to another embodiment of the present application.
图9是根据本申请另一实施例的通信设备的示意性框图。Fig. 9 is a schematic block diagram of a communication device according to another embodiment of the present application.
图10是根据本申请另一实施例的通信设备的示意性框图。Fig. 10 is a schematic block diagram of a communication device according to another embodiment of the present application.
图11是根据本申请另一实施例的通信设备的示意性框图。Fig. 11 is a schematic block diagram of a communication device according to another embodiment of the present application.
图12是根据本申请另一实施例的通信设备的示意性框图。Fig. 12 is a schematic block diagram of a communication device according to another embodiment of the present application.
图13是根据本申请实施例的通信设备示意性框图。Fig. 13 is a schematic block diagram of a communication device according to an embodiment of the present application.
图14是根据本申请实施例的芯片的示意性框图。Fig. 14 is a schematic block diagram of a chip according to an embodiment of the present application.
图15是根据本申请实施例的通信系统的示意性框图。Fig. 15 is a schematic block diagram of a communication system according to an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
本申请实施例的技术方案可以应用于各种通信系统,例如:全球移动通讯(Global System of Mobile communication,GSM)系统、码分多址(Code Division Multiple Access,CDMA)系统、宽带码分多址(Wideband Code Division Multiple Access,WCDMA)系统、通用分组无线业务(General Packet Radio Service,GPRS)、长期演进(Long Term Evolution,LTE)系统、先进的长期演进(Advanced long term evolution,LTE-A)系统、新无线(New Radio,NR)系统、NR系统的演进系统、免授权频谱上的LTE(LTE-based access to unlicensed spectrum,LTE-U)系统、免授权频谱上的NR(NR-based access to unlicensed spectrum,NR-U)系统、通用移动通信系统(Universal Mobile Telecommunication System,UMTS)、无线局域网(Wireless Local Area Networks,WLAN)、无线保真(Wireless Fidelity,WiFi)、下一代通信(5th-Generation,5G)系统或其他通信系统等。The technical solutions of the embodiments of this application can be applied to various communication systems, such as: Global System of Mobile Communication (GSM) system, Code Division Multiple Access (CDMA) system, and Wideband Code Division Multiple Access (Wideband Code Division Multiple Access, WCDMA) system, General Packet Radio Service (GPRS), Long Term Evolution (LTE) system, Advanced Long Term Evolution (LTE-A) system , New Radio (NR) system, NR system evolution system, LTE (LTE-based access to unlicensed spectrum, LTE-U) system on unlicensed spectrum, NR (NR-based access to unlicensed spectrum) unlicensed spectrum, NR-U) system, universal mobile telecommunication system (UMTS), wireless local area network (Wireless Local Area Networks, WLAN), wireless fidelity (Wireless Fidelity, WiFi), next-generation communications (5th-Generation) , 5G) system or other communication systems, etc.
通常来说,传统的通信系统支持的连接数有限,也易于实现,然而,随着通信技术的发展,移动通信系统将不仅支持传统的通信,还将支持例如,设备到设备(Device to Device,D2D)通信,机器到机器(Machine to Machine,M2M)通信,机器类型通信(Machine Type Communication,MTC),以及车辆间(Vehicle to Vehicle,V2V)通信等,本申请实施例也可以应用于这些通信系统。Generally speaking, traditional communication systems support a limited number of connections and are easy to implement. However, with the development of communication technology, mobile communication systems will not only support traditional communication, but also support, for example, Device to Device (Device to Device, D2D) communication, machine to machine (Machine to Machine, M2M) communication, machine type communication (MTC), and vehicle to vehicle (V2V) communication, etc. The embodiments of this application can also be applied to these communications system.
可选地,本申请实施例中的通信系统可以应用于载波聚合(Carrier Aggregation,CA)场景,也可以应用于双连接(Dual Connectivity,DC)场景,还可以应用于独立(Standalone,SA)布网场景。Optionally, the communication system in the embodiments of the present application can be applied to a carrier aggregation (Carrier Aggregation, CA) scenario, can also be applied to a dual connectivity (DC) scenario, and can also be applied to a standalone (SA) deployment. Network scene.
本申请实施例对应用的频谱并不限定。例如,本申请实施例可以应用于授权频谱,也可以应用于免授权频谱。The embodiment of the application does not limit the applied frequency spectrum. For example, the embodiments of this application can be applied to licensed spectrum or unlicensed spectrum.
本申请实施例结合网络设备和终端设备描述了各个实施例,其中:终端设备也可以称为用户设备(User Equipment,UE)、接入终端、用户单元、用户站、移动站、移动台、远方站、远程终端、移动设备、用户终端、终端、无线通信设备、用户代理或用户装置等。终端设备可以是WLAN中的站点(STAION,ST),可以是蜂窝电话、无绳电话、会话启动协议(Session Initiation Protocol,SIP)电话、无线本地环路(Wireless Local Loop,WLL)站、个人数字处理(Personal Digital Assistant,PDA)设备、具有无线通信功能的手持设备、计算设备或连接到无线调制解调器的其它处理设备、车载设备、可穿戴设备以及下一代通信系统,例如,NR网络中的终端设备或者未来演进的公共陆地移动网络(Public Land Mobile Network,PLMN)网络中的终端设备等。The embodiments of this application describe various embodiments in combination with network equipment and terminal equipment. The terminal equipment may also be referred to as User Equipment (UE), access terminal, subscriber unit, subscriber station, mobile station, mobile station, and remote. Station, remote terminal, mobile device, user terminal, terminal, wireless communication device, user agent or user device, etc. The terminal device can be a station (STAION, ST) in a WLAN, a cellular phone, a cordless phone, a Session Initiation Protocol (SIP) phone, a wireless local loop (Wireless Local Loop, WLL) station, and personal digital processing (Personal Digital Assistant, PDA) devices, handheld devices with wireless communication capabilities, computing devices or other processing devices connected to wireless modems, vehicle-mounted devices, wearable devices, and next-generation communication systems, such as terminal devices in the NR network or Terminal equipment in the public land mobile network (PLMN) network that will evolve in the future.
作为示例而非限定,在本申请实施例中,该终端设备还可以是可穿戴设备。可穿戴设备也可以称为穿戴式智能设备,是应用穿戴式技术对日常穿戴进行智能化设计、开发出可以穿戴的设备的总称,如眼镜、手套、手表、服饰及鞋等。可穿戴设备即直接穿在身上,或是整合到用户的衣服或配件的一种便携式设备。可穿戴设备不仅仅是一种硬件设备,更是通过软件支持以及数据交互、云端交互来实现强大的功能。广义穿戴式智能设备包括功能全、尺寸大、可不依赖智能手机实现完整或者部分的功能,例如:智能手表或智能眼镜等,以及只专注于某一类应用功能,需要和其它设备如智能手机配合使用,如各类进行体征监测的智能手环、智能首饰等。As an example and not a limitation, in the embodiment of the present application, the terminal device may also be a wearable device. Wearable devices can also be called wearable smart devices. It is a general term for using wearable technology to intelligently design everyday wear and develop wearable devices, such as glasses, gloves, watches, clothing and shoes. A wearable device is a portable device that is directly worn on the body or integrated into the user's clothes or accessories. Wearable devices are not only a kind of hardware device, but also realize powerful functions through software support, data interaction, and cloud interaction. In a broad sense, wearable smart devices include full-featured, large-sized, complete or partial functions that can be achieved without relying on smart phones, such as smart watches or smart glasses, and only focus on a certain type of application function, and need to cooperate with other devices such as smart phones. Use, such as all kinds of smart bracelets and smart jewelry for physical sign monitoring.
网络设备可以是用于与移动设备通信的设备,网络设备可以是WLAN中的接入点(Access Point,AP),GSM或CDMA中的基站(Base Transceiver Station,BTS),也可以是WCDMA中的基站(NodeB,NB),还可以是LTE中的演进型基站(Evolutional Node B,eNB或eNodeB),或者中继站或接入点,或者车载设备、可穿戴设备以及NR网络中的网络设备(gNB)或者未来演进的PLMN网络中的网络设备等。A network device can be a device used to communicate with mobile devices. The network device can be an access point (AP) in WLAN, a base station (BTS) in GSM or CDMA, or a device in WCDMA. A base station (NodeB, NB), can also be an Evolutional Node B (eNB or eNodeB) in LTE, or a relay station or access point, or a vehicle-mounted device, a wearable device, and a network device (gNB) in the NR network Or network equipment in the PLMN network that will evolve in the future.
在本申请实施例中,网络设备为小区提供服务,终端设备通过该小区使用的传输资源(例如,频域资源,或者说,频谱资源)与网络设备进行通信,该小区可以是网络设备(例如基站)对应的小区,小区可以属于宏基站,也可以属于小小区(Small cell)对应的基站,这里的小小区可以包括:城市小区(Metro cell)、微小区(Micro cell)、微微小区(Pico cell)、毫微微小区(Femto cell)等,这些小小区具有覆盖范围小、发射功率低的特点,适用于提供高速率的数据传输服务。In the embodiment of the present application, the network equipment provides services for the cell, and the terminal equipment communicates with the network equipment through the transmission resources (for example, frequency domain resources, or spectrum resources) used by the cell, and the cell may be a network equipment (for example, The cell corresponding to the base station. The cell can belong to a macro base station or a base station corresponding to a small cell. The small cell here can include: Metro cell, Micro cell, Pico Cells, Femto cells, etc. These small cells have the characteristics of small coverage and low transmit power, and are suitable for providing high-rate data transmission services.
图1示例性地示出了一种通信系统100。该通信系统包括一个网络设备110和两个终端设备120。可选地,该通信系统100可以包括多个网络设备110,并且每个网络设备110的覆盖范围内可以包括其它数量的终端设备120,本申请实施例对此不做限定。Fig. 1 exemplarily shows a communication system 100. The communication system includes a network device 110 and two terminal devices 120. Optionally, the communication system 100 may include multiple network devices 110, and the coverage of each network device 110 may include other numbers of terminal devices 120, which is not limited in the embodiment of the present application.
可选地,该通信系统100还可以包括移动性管理实体(Mobility Management Entity,MME)、接入与移动性管理功能(Access and Mobility Management Function,AMF)等其他网络实体,本申请实施例对此不作限定。Optionally, the communication system 100 may also include other network entities such as mobility management entities (Mobility Management Entity, MME), access and mobility management functions (Access and Mobility Management Function, AMF). Not limited.
应理解,本文中术语“系统”和“网络”在本文中常被可互换使用。本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。It should be understood that the terms "system" and "network" in this article are often used interchangeably in this article. The term "and/or" in this article is only an association relationship describing the associated objects, which means that there can be three relationships, for example, A and/or B, which can mean: A alone exists, A and B exist at the same time, exist alone B these three situations. In addition, the character "/" in this text generally indicates that the associated objects before and after are in an "or" relationship.
基于Restfull架构的物联网设备方法越来越流行,其中,Rest是Representational State Transfer(表现层状态转化)的缩写。在该架构下物理世界中的事物(设备)使用资源(resource)的方式来描述。并且使用CURDN(创建(Create),更新(Update),读取(Retrieve),删除(Delete),通知(Notification))的方式来操作资源。The Internet of Things device method based on the Restfull architecture is becoming more and more popular. Among them, Rest is the abbreviation of Representational State Transfer. Under this architecture, things (devices) in the physical world are described by means of resources. And use CURDN (Create, Update, Retrieve, Delete, Notification) to manipulate resources.
在开放互联基金会(Open Connectivity Foundation,OCF)体系中,资源(resource)可以表示每一个设备、设备的每一种功能服务和设备的状态等信息的逻辑功能实体,这些逻辑功能实体由服务端公开 给客户端进行访问和操作,客户端通过资源操作CRUDN和服务端进行交互。OCF资源的参数主要包括URI、资源属性、资源引用和接口。In the Open Connectivity Foundation (OCF) system, resources can represent logical functional entities of each device, each functional service of the device, and the status of the device. These logical functional entities are determined by the server Open to the client for access and operation, and the client interacts with the server through the resource operation CRUDN. The parameters of OCF resources mainly include URI, resource attributes, resource references and interfaces.
其中,资源的参数的介绍如下:Among them, the introduction of resource parameters is as follows:
URI:每个资源有自己的URI,部分资源有预定义的URI,通过访问对应的URI来获取这个资源;URI: Each resource has its own URI, and some resources have predefined URIs. This resource can be obtained by accessing the corresponding URI;
属性(property):每个资源包含属性,属性用于描述资源的相关信息;Property (property): Each resource contains properties, which are used to describe the relevant information of the resource;
资源引用(link):通过链接建立资源之间的引用关系;Resource reference (link): Establish a reference relationship between resources through links;
接口(interface):公开资源的表述以及对应的操作方法。Interface (interface): The expression of the open resource and the corresponding operation method.
上述的属性(property)可以包括公共属性(common property)。公共属性包括资源的基本属性。例如,OCF Core(核)中的公共属性包括:The above-mentioned properties may include common properties. Common attributes include the basic attributes of resources. For example, the common attributes in OCF Core include:
rt:资源类型;rt: resource type;
if:资源的接口,用于确定资源的操作方式;if: The interface of the resource, used to determine the operation mode of the resource;
n:资源的名称;n: the name of the resource;
id:资源标识。id: resource identifier.
设备中一种或者一种以上的资源组合在一起能够提供一个能力。例如,一个计时的资源(timer),当其被用来对外开放提供一种能力的时候,可以被认为是一个定时服务。本申请实施例可以借助一个设备来提升另一个设备的能力。例如,借助物联网系统中ND的能力来提升RCD的功能。A combination of one or more resources in a device can provide a capability. For example, a timer resource (timer), when it is used to provide a capability to the outside world, can be considered as a timing service. In the embodiments of the present application, one device can be used to improve the capability of another device. For example, use the capabilities of ND in the Internet of Things system to improve the function of RCD.
图2是根据本申请一实施例的服务分享方法200的示意性流程图。该方法可选地可以应用于图1所示的系统,还可以应用于物联网系统,但并不仅限于此。该方法包括以下内容的至少部分内容。FIG. 2 is a schematic flowchart of a service sharing method 200 according to an embodiment of the present application. This method can optionally be applied to the system shown in FIG. 1 and can also be applied to an Internet of Things system, but is not limited to this. The method includes at least part of the following content.
S210、第一设备发送订阅服务请求,该订阅服务请求包括第一服务的订阅信息,该第一服务在可发现服务集合中。S210. The first device sends a subscription service request, where the subscription service request includes subscription information of the first service, and the first service is in the set of discoverable services.
S220、该第一设备接收应答消息,该应答消息中包括该第一服务的内容。S220. The first device receives a response message, where the response message includes content of the first service.
可选地,第一服务的订阅信息可以包括订阅标识和订阅内容等。Optionally, the subscription information of the first service may include a subscription identifier, subscription content, and so on.
其中,订阅标识可以指示本地订阅服务的类型。例如,订阅标识为0,表示需要订阅第二设备中某个服务中的资源,如果第二设备中该服务的资源有变化,则通知第一设备。再如,订阅标识为1表示取消订阅资源,如果第二设备中该服务的资源有变化,不再通知第一设备。再如,订阅标识为2表示订阅服务的功能,在第一设备上生成与订阅的第一服务类似的第二服务,以使得其他设备能够利用第一设备上的第二服务实现对应的功能。Among them, the subscription identifier may indicate the type of local subscription service. For example, if the subscription identifier is 0, it means that a resource in a certain service in the second device needs to be subscribed. If the resource of the service in the second device changes, the first device is notified. For another example, the subscription identifier being 1 indicates that the resource is unsubscribed, and if the resource of the service in the second device changes, the first device will not be notified. For another example, the subscription identifier 2 indicates the function of the subscription service, and a second service similar to the subscribed first service is generated on the first device, so that other devices can use the second service on the first device to implement the corresponding function.
订阅内容可以包括所订阅的第一服务的一些基本信息,例如服务的标识、名称、地址等。The subscription content may include some basic information of the subscribed first service, such as the service identifier, name, address, and so on.
可选地,在本申请实施例中,该方法还包括:该第一设备发送发现服务请求;该第一设备接收发现服务应答,该发现服务应答中包括第二设备能够对外提供的服务的集合。Optionally, in this embodiment of the present application, the method further includes: the first device sends a discovery service request; the first device receives a discovery service response, and the discovery service response includes a set of services that the second device can provide externally .
一种方式中,第一设备可以向第二设备发送发现服务请求,并从收到的服务发现应答包括的第二设备的可发现服务集合中获取第二设备能够对外提供的服务的集合。In one manner, the first device may send a service discovery request to the second device, and obtain the set of services that the second device can provide externally from the set of discoverable services of the second device included in the received service discovery response.
另一种方式中,第一设备可以向云平台发送发现服务请求,并从收到的服务发现应答包括的云平台的可发现服务集合中,云平台的可发现服务集合中可能包括一个或多个第二设备能够对外提供的服务的集合。In another manner, the first device may send a discovery service request to the cloud platform, and from the set of discoverable services of the cloud platform included in the received service discovery response, the set of discoverable services of the cloud platform may include one or more A collection of services that the second device can provide externally.
可选地,在本申请实施例中,该第一服务在第二设备的可发现服务集合中,该第二设备的可发现服务集合包括该第二设备能够对外提供的服务的集合。在设备中可以包括可发现资源集合。可发现资源集合中可以包括可发现服务集合。一个资源发布在可发现资源集合可以使得其他设备可以发现这个资源,进而访问这个资源(例如通过访问该资源实现开关操作)。一个服务发布到可发现服务集合,可以使得其他设备可以发现这个服务,进而使用这个服务(例如,使用定时服务)。Optionally, in this embodiment of the present application, the first service is in the discoverable service set of the second device, and the discoverable service set of the second device includes a set of services that the second device can provide externally. A collection of discoverable resources can be included in the device. The set of discoverable resources may include a set of discoverable services. Publishing a resource in the discoverable resource collection allows other devices to discover the resource and then access the resource (for example, by accessing the resource to implement a switch operation). A service is published to a set of discoverable services, so that other devices can discover this service, and then use this service (for example, using a timing service).
例如,第一设备为RCD,第二设备为ND。ND可以将自己能够对外提供的服务链接放入可发现服务集合例如oic.r.service资源中,然后ND将oic.r.service资源发布到可发现资源集合例如/res资源中; /res资源是该ND能够对外提供的资源的集合。一个资源发布在/res资源可以使得其他设备可以发现这个资源,进而访问这个资源。ND将oic.r.service资源发布到/res资源中,的可以使得其他设备可以发现这个ND能够对外提供的服务。这样RCD就可以发现该ND能够对外提供的服务。例如,ND能够对外提供的服务包括定时、测温、摄像等。如果RCD想要获得测温服务,可以向ND发送用于订阅测温服务的订阅服务请求,该订阅服务请求中包括测温服务的订阅信息。ND收到订阅服务请求后,可以对该RCD进行鉴权,鉴权通过后,通过应答消息将该测温服务的内容(例如,当前的室温是30℃)发送给RCD。For example, the first device is RCD, and the second device is ND. ND can put the service link that it can provide externally into the discoverable service collection such as oic.r.service resource, and then ND publishes the oic.r.service resource to the discoverable resource collection such as /res resource; /res resource is The collection of resources that the ND can provide externally. A resource published in the /res resource can enable other devices to discover this resource and then access this resource. The ND publishes the oic.r.service resource to the /res resource, so that other devices can discover the services that this ND can provide to the outside world. In this way, the RCD can discover the services that the ND can provide to the outside world. For example, the services that ND can provide externally include timing, temperature measurement, and camera. If the RCD wants to obtain the temperature measurement service, it can send a subscription service request for subscribing to the temperature measurement service to the ND. The subscription service request includes the subscription information of the temperature measurement service. After receiving the subscription service request, the ND can authenticate the RCD. After the authentication is passed, the content of the temperature measurement service (for example, the current room temperature is 30°C) is sent to the RCD through a response message.
可选地,在本申请实施例中,该第一服务在云平台的可发现服务集合中,该云平台的可发现服务集合包括该第二设备在该云平台上发布的、能够对外提供的服务的集合。Optionally, in the embodiment of the present application, the first service is in a set of discoverable services of a cloud platform, and the set of discoverable services of the cloud platform includes the services that the second device publishes on the cloud platform and can provide externally. Collection of services.
例如,第一设备为RCD,第二设备为ND。ND可以将自己能够对外提供的服务链接放入自身的可发现服务集合oic.r.service资源中,然后ND将oic.r.service资源发布到/res资源中;/res资源是该ND能够对外提供的资源的集合。并且ND可以将oic.r.service资源发布到云平台的可发现资源集合/res资源中。云平台的/res资源中可以包括一个或多个ND能够对外提供的服务的集合。这样RCD就可以在云平台发现一个或多个ND能够对外提供的服务。例如,云平台的/res资源中包括某个ND能够对外提供的服务包括定时、测温、摄像等。如果RCD想要获得测温服务,可以向云平台发送用于订阅测温服务的订阅服务请求,该订阅服务请求中包括测温服务的订阅信息。云平台收到订阅服务请求后,可以对该RCD进行鉴权,鉴权通过后,通过应答消息将该测温服务的内容发送给RCD。For example, the first device is RCD, and the second device is ND. ND can put the service links that it can provide externally into its own discoverable service collection oic.r.service resource, and then ND publishes oic.r.service resource to /res resource; /res resource means that ND can externally The collection of resources provided. And ND can publish the oic.r.service resource to the discoverable resource collection/res resource of the cloud platform. The /res resource of the cloud platform may include one or more sets of services that the ND can provide externally. In this way, RCD can discover the services that one or more NDs can provide externally on the cloud platform. For example, the /res resource of the cloud platform includes services that a certain ND can provide externally, including timing, temperature measurement, and camera. If the RCD wants to obtain the temperature measurement service, it can send a subscription service request for subscribing to the temperature measurement service to the cloud platform, and the subscription service request includes the subscription information of the temperature measurement service. After the cloud platform receives the subscription service request, it can authenticate the RCD. After the authentication is passed, the content of the temperature measurement service is sent to the RCD through a response message.
可选地,在本申请实施例中,该方法还包括:该第一设备基于该应答消息在该第一设备上生成第二服务,该第二服务与该第一服务包括的资源相同。Optionally, in the embodiment of the present application, the method further includes: the first device generates a second service on the first device based on the response message, and the second service includes the same resources as the first service.
例如,RCD收到ND的应答消息后,可以在本地生成与第一服务包括的资源相同的第二服务。每个服务可以包括通用参数列表href、if、it等,还可以包括功能参数列表。应答消息中可以包括第一服务提供的功能参数列表例如:第一服务包括定时服务,其功能参数列表包括{starttime,stoptime,repeat}。RCD在本地生成的第二服务的功能参数列表也包括{starttime,stoptime,repeat}。For example, after receiving the response message from the ND, the RCD may locally generate a second service that is the same as the resources included in the first service. Each service can include a list of general parameters href, if, it, etc., as well as a list of function parameters. The response message may include a list of function parameters provided by the first service. For example, the first service includes a timing service, and the list of function parameters includes {starttime, stoptime, repeat}. The function parameter list of the second service generated locally by RCD also includes {starttime, stoptime, repeat}.
可选地,在本申请实施例中,该方法还包括:该第一设备将该第二服务发布到该第一设备的可发现资源集合中。Optionally, in the embodiment of the present application, the method further includes: the first device publishes the second service to the discoverable resource set of the first device.
例如,RCD在本地生成第二服务后,可以将该第二服务发布到自身的可发现资源集合例如/res资源中。这样,其他的设备也可以发现该RCD能够对外提供的资源的集合,该集合与RCD原本能够提供的资源相比,多了第二服务的资源,例如定时、测温等。For example, after the RCD generates the second service locally, it can publish the second service to its own discoverable resource collection, such as the /res resource. In this way, other devices can also discover the set of resources that the RCD can provide externally. Compared with the resources that the RCD can provide originally, the set has more resources for the second service, such as timing, temperature measurement, and so on.
可选地,在本申请实施例中,该第二服务包括订阅参数,该订阅参数用于标识该第二服务是订阅服务。在第一设备中,可以为从其他设备订阅的服务添加订阅参数,以标识这些服务是订阅的,从而和第一设备本身能够提供的服务有所区别。订阅参数可以是新增的参数,利用该新增的订阅参数可以指示该服务在ND上位置。Optionally, in this embodiment of the present application, the second service includes a subscription parameter, and the subscription parameter is used to identify that the second service is a subscription service. In the first device, subscription parameters can be added to services subscribed from other devices to identify that these services are subscribed, which is different from the services that the first device itself can provide. The subscription parameter may be a newly-added parameter, and the newly-added subscription parameter may be used to indicate the location of the service on the ND.
可选地,在本申请实施例中,该订阅参数为锚点(anchor)参数。Optionally, in this embodiment of the present application, the subscription parameter is an anchor parameter.
可选地,在本申请实施例中,该锚点参数还用于指示该第一服务在第二设备或云平台的位置。Optionally, in this embodiment of the present application, the anchor point parameter is also used to indicate the location of the first service on the second device or cloud platform.
可选地,在本申请实施例中,该方法还包括:该第一设备接收来自第三设备或云平台的第一操作信息,该第一操作信息包括该第二服务的待修改内容;该第一设备基于该第二服务的待修改内容向第二设备发送修改请求,该修改请求中包括该第一服务的待修改内容。Optionally, in this embodiment of the present application, the method further includes: the first device receives first operation information from a third device or a cloud platform, the first operation information includes the content to be modified of the second service; The first device sends a modification request to the second device based on the content to be modified of the second service, and the modification request includes the content to be modified of the first service.
具体地,第一设备的可发现资源集合例如/res资源中可以包括自身能够提供的服务的资源以及通过订阅后能够提供的服务的资源。如果第三设备发现第一设备的可发现资源集合中有自己所需的内容,可以向第一设备发送用于查询、修改等操作的访问请求。假设第三设备向第一设备发送的访问请求中包括的第一操作信息为“写”操作信息,用于对第二服务进行修改。第二服务是第一设备从第二设备订阅的服务。并且,该第二服务是根据第二设备的第一服务生成的。这种情况下,第一设备收到需要修改第二 服务的“写”操作后,向第二设备发送用于修改第一服务的修改请求。第二设备根据该修改请求,修改第一服务的内容。Specifically, the discoverable resource set of the first device, for example, the /res resource, may include resources of services that can be provided by itself and resources of services that can be provided through subscription. If the third device finds that the first device's discoverable resource set contains the content it needs, it can send an access request for query, modification, and other operations to the first device. It is assumed that the first operation information included in the access request sent by the third device to the first device is "write" operation information, which is used to modify the second service. The second service is a service subscribed by the first device from the second device. And, the second service is generated according to the first service of the second device. In this case, after receiving the "write" operation that needs to modify the second service, the first device sends a modification request for modifying the first service to the second device. The second device modifies the content of the first service according to the modification request.
例如,台灯1(第一设备)为RCD,电视(第二设备)为ND。台灯利用电视的定时服务A,在本地生成了定时服务B。台灯2(第三设备)想要使用台灯1的定时服务B,例如,想要定早上7点的闹钟。台灯2向台灯1发送的第一操作信息中包括将定时服务B的闹钟时间设置为7:00AM。台灯1向电视发送的修改请求中包括定时服务A的闹钟时间设置为7:00AM。等到早上7点时,电视中的定时服务A可以向台灯1发送已经到达定时时间的提示信息,台灯1则可以将该提示信息转发给台灯2。For example, desk lamp 1 (first device) is RCD, and TV (second device) is ND. The desk lamp uses the time service A of the TV to generate the time service B locally. Lamp 2 (the third device) wants to use the timer service B of Lamp 1, for example, wants to set an alarm clock at 7 o'clock in the morning. The first operation information sent by the table lamp 2 to the table lamp 1 includes setting the alarm time of the timer service B to 7:00 AM. The modification request sent by the desk lamp 1 to the TV includes the alarm time of the timer service A set to 7:00 AM. Waiting until 7 o'clock in the morning, the timer service A in the TV can send a reminder that the time has reached the lamp 1 and the lamp 1 can forward the reminder to the lamp 2.
可选地,在本申请实施例中,该方法还包括:该第一设备接收该第二设备返回的该第一服务的修改结果;该第一设备基于该第一服务的修改结果向该第三设备或该云平台发送该第二服务的修改结果。Optionally, in the embodiment of the present application, the method further includes: the first device receives the modification result of the first service returned by the second device; The third device or the cloud platform sends the modification result of the second service.
具体地,如果第二设备对第一服务修改成功例如写成功,向第一设备返回的修改结果可以携带成功标志,反之则可以携带失败标志或者不返回修改结果。第一设备收到第一服务的修改结果后,可以向发起第一操作信息的第三设备或云平台的返回第一服务对应的第二服务的修改结果。Specifically, if the second device successfully modifies the first service, for example, the write succeeds, the modification result returned to the first device may carry a success flag, otherwise, it may carry a failure flag or not return the modification result. After receiving the modification result of the first service, the first device may return the modification result of the second service corresponding to the first service to the third device or the cloud platform that initiated the first operation information.
可选地,在本申请实施例中,该方法还包括:该第一设备接收来自第三设备的第二操作信息,该第二操作信息用于请求获取第二服务;该第一设备基于该第二操作信息向该第三设备发送该第二服务。Optionally, in an embodiment of the present application, the method further includes: the first device receives second operation information from a third device, and the second operation information is used to request a second service; the first device is based on the The second operation information sends the second service to the third device.
具体地,假设第三设备向第一设备发送的访问请求中包括的第二操作信息为“读”操作信息。例如,第二服务为测温服务,第一设备接收来自第三设备的“读”操作信息后,第一设备可以从自身的测温服务中读取当前温度,然后,将读取的温度发送给第三设备。Specifically, it is assumed that the second operation information included in the access request sent by the third device to the first device is "read" operation information. For example, the second service is a temperature measurement service. After the first device receives the "read" operation information from the third device, the first device can read the current temperature from its own temperature measurement service, and then send the read temperature Give the third device.
可选地,在本申请实施例中,该方法还包括:该第一设备基于该第二设备中的第一服务的变化同步该第二服务。Optionally, in the embodiment of the present application, the method further includes: the first device synchronizing the second service based on the change of the first service in the second device.
可选地,在本申请实施例中,该同步的方式包括:该第一设备接收来自第二设备或云平台的通知消息,该通知消息中包括该第二设备中发生变化的第一服务的内容;该第一设备基于发生变化的第一服务的内容更新第二服务的内容。Optionally, in this embodiment of the present application, the synchronization method includes: the first device receives a notification message from the second device or the cloud platform, and the notification message includes the information of the first service that has changed in the second device. Content; the first device updates the content of the second service based on the content of the changed first service.
具体地,如果第二设备中某个被订阅的第一服务的内容发生了变化,可以将变化的内容通过通知消息告知第一设备,也可以先将通知消息发送至云平台,由云平台转发给第一设备。这样可以使得第一设备和第二设备的相同服务的内容同步。进一步地,可以使得第一设备、第二设备和云平台的相同服务的内容同步。Specifically, if the content of a subscribed first service in the second device changes, the changed content can be notified to the first device through a notification message, or the notification message can be sent to the cloud platform first, and the cloud platform forwards it Give the first device. In this way, the content of the same service of the first device and the second device can be synchronized. Further, the content of the same service of the first device, the second device, and the cloud platform can be synchronized.
例如,第二设备中的测温服务,上次测量的室温为31℃,本次测量的室温为30℃。第二设备可以向第一设备发送通知消息,告知第一设备测温服务的测量结果变成了30℃。第一设备可以将自己订阅的测温服务中室温31℃改为30℃。For example, for the temperature measurement service in the second device, the room temperature measured last time was 31°C, and the room temperature measured this time was 30°C. The second device may send a notification message to the first device to inform the first device that the measurement result of the temperature measurement service has become 30°C. The first device can change the room temperature from 31°C to 30°C in the temperature measurement service subscribed to.
例如,第二设备中的定时服务,定时开始时间为7:00AM,结束时间为7:10AM。在7:00AM时,第二设备可以向第一设备发送通知消息,告知第一设备定时服务的定时开始。第一设备可以将自己订阅的定时服务中状态修改为定时开始。在7:10AM时,第二设备可以向第一设备发送通知消息,告知第一设备定时服务的定时结束。第一设备可以将自己订阅的定时服务中状态修改为定时结束。For example, for the timing service in the second device, the timing start time is 7:00AM and the end time is 7:10AM. At 7:00 AM, the second device may send a notification message to the first device to inform the first device of the timing start of the timing service. The first device can modify the status in the timed service subscribed to by the first device to timed start. At 7:10 AM, the second device may send a notification message to the first device to inform the first device that the timing of the timing service is over. The first device can modify the status of the timed service subscribed to by the first device to timed end.
可选地,在本申请实施例中,该方法还包括:该第一设备向第三设备发送该通知消息。Optionally, in this embodiment of the present application, the method further includes: the first device sends the notification message to the third device.
具体地,如果第三设备请求使用第一设备的某个订阅服务。第一设备收到该订阅服务的内容变化的通知消息后,可以向第三设备发送该通知消息。例如,第一设备根据第二设备的通知,将自己订阅的测温服务中室温31℃改为30℃后,可以向第三设备转发通知消息,告知第一设备测温服务的测量结果变成了30℃。Specifically, if the third device requests to use a certain subscription service of the first device. After receiving the notification message of the content change of the subscription service, the first device may send the notification message to the third device. For example, according to the notification of the second device, the first device changes the room temperature of 31°C in the temperature measurement service subscribed to 30°C, and then forwards the notification message to the third device to inform the first device that the measurement result of the temperature measurement service becomes Up to 30°C.
图3是根据本申请一实施例的服务分享方法300的示意性流程图。该方法可选地可以应用于图1所示的系统,还可以应用于物联网系统,但并不仅限于此。该方法包括以下内容的至少部分内容。FIG. 3 is a schematic flowchart of a service sharing method 300 according to an embodiment of the present application. This method can optionally be applied to the system shown in FIG. 1 and can also be applied to an Internet of Things system, but is not limited to this. The method includes at least part of the following content.
S310、第二设备接收订阅服务请求,该订阅服务请求包括第一服务的订阅信息,该第一服务在可发现服务集合中。S310. The second device receives a subscription service request, where the subscription service request includes subscription information of a first service, and the first service is in a set of discoverable services.
S320、该第二设备发送应答消息,该应答消息中包括该第一服务的内容。S320. The second device sends a response message, where the response message includes the content of the first service.
可选地,在本申请实施例中,该第一服务在第二设备的可发现服务集合中,该第二设备的可发现服务集合包括该第二设备能够对外提供的服务的集合。Optionally, in this embodiment of the present application, the first service is in the discoverable service set of the second device, and the discoverable service set of the second device includes a set of services that the second device can provide externally.
可选地,在本申请实施例中,该第二设备接收订阅服务请求,包括:第二设备接收来自于第一设备或云平台的订阅服务请求;Optionally, in this embodiment of the present application, receiving the subscription service request by the second device includes: receiving the subscription service request from the first device or the cloud platform by the second device;
该第二设备发送应答消息,包括:该第二设备向该第一设备或该云平台发送应答消息。The sending of a response message by the second device includes: the second device sending a response message to the first device or the cloud platform.
可选地,在本申请实施例中,该方法还包括:该第二设备接收发现服务请求;该第二设备发送发现服务应答,该发现服务应答中包括第二设备或云平台能够对外提供的服务的集合。Optionally, in an embodiment of the present application, the method further includes: the second device receives a discovery service request; the second device sends a discovery service response, and the discovery service response includes information that the second device or cloud platform can provide externally Collection of services.
可选地,在本申请实施例中,该第二设备接收发现服务请求,包括:该第二设备接收来自第一设备或云平台的发现服务请求;Optionally, in this embodiment of the present application, receiving the discovery service request by the second device includes: receiving the discovery service request by the second device from the first device or the cloud platform;
该第二设备发送发现服务应答,包括:该第二设备向该第一设备或该云平台发送发现服务应答。The sending of the discovery service response by the second device includes: the second device sending the discovery service response to the first device or the cloud platform.
可选地,在本申请实施例中,该方法还包括:该第二设备接收来自第一设备或云平台的修改请求,该修改请求中包括该第一服务的待修改内容;该第二设备基于该修改请求对该第一服务进行修改;该第二设备向该第一设备或该云平台发送该第一服务的修改结果。Optionally, in the embodiment of the present application, the method further includes: the second device receives a modification request from the first device or the cloud platform, and the modification request includes the content to be modified of the first service; the second device The first service is modified based on the modification request; the second device sends the modification result of the first service to the first device or the cloud platform.
可选地,在本申请实施例中,该方法还包括:该第二设备向第一设备发送通知消息,该通知消息中包括该第二设备中发生变化的第一服务的内容。Optionally, in this embodiment of the present application, the method further includes: the second device sending a notification message to the first device, and the notification message includes the content of the first service that has changed in the second device.
可选地,在本申请实施例中,该第二设备中包括被订阅的第一服务与订阅该第一服务的第一设备之间的对应关系。Optionally, in this embodiment of the present application, the second device includes a correspondence between the subscribed first service and the first device subscribed to the first service.
可选地,在本申请实施例中,在多个第一设备订阅该第一服务的情况下,该第二设备中包括该第一服务的多个实例,每个实例对应一个订阅该第一服务的第一设备。Optionally, in this embodiment of the present application, when multiple first devices subscribe to the first service, the second device includes multiple instances of the first service, and each instance corresponds to a subscription to the first service. The first device to serve.
例如,如果有多个第一设备订阅了第二设备上的同一个第一服务,在第二设备上为每个第一设备生成一个第一服务实例,并建立每个实例对应的管理表。每个管理表中可以包括被订阅服务(第一服务实例)与订阅方(第一设备)的对应关系。For example, if there are multiple first devices subscribed to the same first service on the second device, a first service instance is generated for each first device on the second device, and a management table corresponding to each instance is established. Each management table may include the corresponding relationship between the subscribed service (first service instance) and the subscriber (first device).
本实施例的第二设备执行方法300的具体示例可以参见上述方法200的中关于第二设备的相关描述,为了简洁,在此不再赘述。For a specific example of the method 300 executed by the second device in this embodiment, reference may be made to the related description of the second device in the above method 200, and for the sake of brevity, details are not repeated here.
图4是根据本申请一实施例的服务分享方法400的示意性流程图。该方法可选地可以应用于图1所示的系统,还可以应用于物联网系统,但并不仅限于此。该方法包括以下内容的至少部分内容。FIG. 4 is a schematic flowchart of a service sharing method 400 according to an embodiment of the present application. This method can optionally be applied to the system shown in FIG. 1 and can also be applied to an Internet of Things system, but is not limited to this. The method includes at least part of the following content.
S410、云平台接收来自第一设备订阅服务请求,该订阅服务请求包括第一服务的订阅信息,该第一服务在可发现服务集合中;S410. The cloud platform receives a subscription service request from a first device, where the subscription service request includes subscription information of a first service, and the first service is in a set of discoverable services.
S420、该云平台向该第一设备发送应答消息,该应答消息中包括该第一服务的内容。S420. The cloud platform sends a response message to the first device, where the response message includes the content of the first service.
可选地,在本申请实施例中,该第一服务在云平台的可发现服务集合中,该云平台的可发现服务集合包括第二设备在该云平台上发布的、能够对外提供的服务的集合。Optionally, in the embodiment of the present application, the first service is in the discoverable service set of the cloud platform, and the discoverable service set of the cloud platform includes the services that the second device publishes on the cloud platform and can be provided externally. Collection.
可选地,在本申请实施例中,该方法还包括:该云平台接收来自第一设备的发现服务请求;该云平台向第一设备发送发现服务应答,该发现服务应答中包括该云平台能够对外提供的服务的集合。Optionally, in the embodiment of the present application, the method further includes: the cloud platform receives a discovery service request from the first device; the cloud platform sends a discovery service response to the first device, and the discovery service response includes the cloud platform A collection of services that can be provided externally.
可选地,在本申请实施例中,该方法还包括:该云平台接收来自第二设备的服务发布消息,该服务发布消息中包括该第二设备能够对外提供的服务的集合;该云平台将该第二设备能够对外提供的服务的集合发布到该云平台的可发现服务集合中。Optionally, in the embodiment of the present application, the method further includes: the cloud platform receives a service release message from the second device, the service release message includes a set of services that the second device can provide externally; the cloud platform Publish the set of services that the second device can provide externally to the set of discoverable services of the cloud platform.
可选地,在本申请实施例中,该方法还包括:该云平台接收来自第一设备的修改请求,该修改请求中包括该第一服务的待修改内容;该云平台向第二设备转发该修改请求;该云平台接收该第二设备返回的该第一服务的修改结果;该云平台向该第一设备发送该第一服务的修改结果。Optionally, in the embodiment of the present application, the method further includes: the cloud platform receives a modification request from the first device, and the modification request includes the content to be modified of the first service; and the cloud platform forwards to the second device The modification request; the cloud platform receives the modification result of the first service returned by the second device; the cloud platform sends the modification result of the first service to the first device.
可选地,在本申请实施例中,该方法还包括:该云平台接收第二设备的通知消息,该通知消息中包括该第二设备中发生变化的服务的内容;该云平台向第一设备转发该通知消息。Optionally, in the embodiment of the present application, the method further includes: the cloud platform receives a notification message from the second device, and the notification message includes the content of the service changed in the second device; and the cloud platform sends the notification message to the first device. The device forwards the notification message.
本实施例的云平台执行方法400的具体示例可以参见上述方法200的中关于云平台的相关描述,为了简洁,在此不再赘述。For a specific example of the cloud platform execution method 400 of this embodiment, reference may be made to the related description of the cloud platform in the above method 200. For brevity, details are not repeated here.
示例1:Example 1:
图5为本申请实施例的服务分享方法一种应用示例的示意图。该方法可以包括以下步骤:FIG. 5 is a schematic diagram of an application example of the service sharing method according to an embodiment of the application. The method can include the following steps:
S51.可以对外提供服务的设备(ND)发布其可以对外提供的服务(也可以认为是设备可以对外提供的能力)。ND能够对外提供服务可以包括一个个不同的资源。一个服务可以包括一个或多个资源。当ND需要对外开放其服务时,可以将其需要开放的服务链接放入可发现服务集合例如oic.r.service类型的资源(简称oic.r.service资源)里。每一设备可能存在一个oic.r.service资源,该资源可以表示本设备能够提供给外界的服务的集合。S51. The device (ND) that can provide services to the outside world publishes the services that it can provide to the outside world (it can also be considered as the ability of the device to provide to the outside world). ND can provide services externally can include different resources. A service can include one or more resources. When the ND needs to open its services to the outside world, it can put the service links that it needs to open into a set of discoverable services, such as oic.r.service type resources (abbreviated as oic.r.service resources). Each device may have an oic.r.service resource, which can represent a collection of services that the device can provide to the outside world.
一种oic.r.service资源的示例如下:An example of an oic.r.service resource is as follows:
Figure PCTCN2020088454-appb-000001
Figure PCTCN2020088454-appb-000001
另外,ND需要将oic.r.service类型的资源发布到可发现资源集合例如/res资源中。在ND上所有可被其他设备发现的资源,可以发布到/res资源里。其他设备通过查看该ND的/res资源,可以获取oic.r.service类型的资源,进而发现该资源中包含的该ND对外发布的服务。In addition, ND needs to publish resources of type oic.r.service to discoverable resource collections such as /res resources. All resources on the ND that can be discovered by other devices can be published to the /res resource. Other devices can obtain resources of the oic.r.service type by viewing the /res resource of the ND, and then discover the services published by the ND in the resource.
S52.RCD通过发现流程,可以在ND的/res资源下发现该ND可供其他设备发现的资源和服务,/res资源包含其发布的对外提供服务的资源/sevice。发现流程可以包括:RCD向ND发送服务发现请求,用以发现ND能够对外提供的服务集合。ND向RCD返回发现服务应答,RCD从该应答中获取ND能够对外提供的服务集合。S52. Through the discovery process, the RCD can discover the resources and services that the ND can discover by other devices under the /res resource of the ND, and the /res resource includes the resources/sevice that it publishes to provide external services. The discovery process may include: the RCD sends a service discovery request to the ND to discover the set of services that the ND can provide externally. The ND returns a discovery service response to the RCD, and the RCD obtains the set of services that the ND can provide externally from the response.
S53.RCD在S52步骤取得的服务集合中,选择一个或者几个服务(ND对外提供的服务),并完成对该所选服务的注册。注册流程可以包括:RCD向ND的对外提供服务的资源/oic/service发送一个订阅服务请求,示例如下:S53. The RCD selects one or several services (services provided externally by the ND) from the service set obtained in step S52, and completes the registration of the selected service. The registration process can include: RCD sends a subscription service request to ND's resource /oic/service, which provides external services. An example is as follows:
Figure PCTCN2020088454-appb-000002
Figure PCTCN2020088454-appb-000002
订阅标识为0,可以表示需要订阅ND中某个服务中的资源,如果ND中该服务的资源有变化,则通知RCD。再如,订阅标识为1表示取消订阅资源,如果ND中该服务的资源有变化,不再通知RCD。 再如,订阅标识为2表示订阅服务的功能,在RCD上生成与订阅的第一服务类似的第二服务,以使得其他设备能够利用RCD上的第二服务实现对应的功能。The subscription identifier is 0, which can indicate that the resource in a certain service in the ND needs to be subscribed. If the resource of the service in the ND changes, the RCD is notified. For another example, if the subscription identifier is 1, it means that the resource is unsubscribed. If there is a change in the resource of the service in the ND, the RCD will not be notified. For another example, the subscription identifier 2 indicates the function of the subscription service, and a second service similar to the subscribed first service is generated on the RCD, so that other devices can use the second service on the RCD to implement the corresponding function.
例如,在订阅服务请求中,包含订阅标识obs(值为2),以及订阅的内容(links参数包含的内容)。ND收到上述订阅服务请求之后,鉴权RCD是否有资格订阅上述服务。如果有,则在ND上进行服务注册,生成被订阅服务与订阅方的管理表,并进行注册服务完成应答,向RCD返回订阅应答消息。被订阅服务与订阅方的管理表可以包括多种形式,可以根据具体实现有所不同。该管理表可以用于完成被订阅服务和订阅方的管理和匹配。For example, in the subscription service request, the subscription identifier obs (value 2) and the content of the subscription (content included in the links parameter) are included. After receiving the above subscription service request, the ND authenticates whether the RCD is eligible to subscribe to the above service. If so, perform service registration on the ND, generate a management table of the subscribed service and the subscriber, perform the registration service completion response, and return a subscription response message to the RCD. The management table of the subscribed service and the subscriber can include multiple forms, which can be different according to specific implementations. The management table can be used to complete the management and matching of the subscribed service and the subscriber.
此外,订阅应答消息中可以包含被订阅服务的基本内容,被订阅的定时服务的示例如下:In addition, the subscription response message can contain the basic content of the subscribed service. Examples of the subscribed timed service are as follows:
Figure PCTCN2020088454-appb-000003
Figure PCTCN2020088454-appb-000003
在应答消息中可以携带被订阅服务提供的功能参数列表,例如上述{starttime,stoptime,repeat}。服务或者服务中的资源可以包含通用参数列表例如:{href,if,it}等,还可以包含功能参数列表。每个服务或者服务中的资源的功能参数列表可以是不同的,用于表示该服务或资源的能力。The response message can carry a list of function parameters provided by the subscribed service, such as the above {starttime, stoptime, repeat}. The service or the resources in the service can include a list of general parameters such as {href, if, it}, etc., and can also include a list of function parameters. The function parameter list of each service or resource in the service can be different, and is used to represent the capability of the service or resource.
S54.RCD收到应答消息之后,可以根据被订阅的第一服务在本地生成对应的第二服务。例如,第二服务可以是被订阅的第一服务的影像或建立一个被订阅服务的副本。并且,RCD可以将该第二服务作为一个可发现服务,发布到其/res资源。每个设备可以具有唯一的/res资源。在生成的第二服务中可以标识出其是一个订阅的服务。标识方法可以有多种,示例如下:S54. After receiving the response message, the RCD may locally generate a corresponding second service according to the subscribed first service. For example, the second service can be an image of the subscribed first service or create a copy of the subscribed service. In addition, the RCD can publish the second service as a discoverable service to its /res resource. Each device can have a unique /res resource. In the generated second service, it can be identified as a subscribed service. There can be multiple identification methods, examples are as follows:
(1)在生成第二服务中增加一个参数,来标识其是一个订阅服务,并在锚点(anchor)参数中标识第二服务在ND上的位置。anchor参数可以标识本资源的真实位置(例如在哪台设备上),因为一般href仅指向一个相对位置(例如在设备上的具体地址);这样,网络侧通过anchor+href可以准确地定位某个服务的某个资源的地址。(1) Add a parameter in generating the second service to identify that it is a subscription service, and identify the position of the second service on the ND in the anchor parameter. The anchor parameter can identify the real location of the resource (for example, on which device), because generally href only points to a relative position (for example, a specific address on the device); in this way, the network side can accurately locate a certain resource through anchor+href The address of a resource of the service.
(2)直接在anchor参数中标识第二服务在ND上的位置。(2) Directly identify the position of the second service on the ND in the anchor parameter.
S55.RCD可以向ND进行服务信息登记,在ND完成服务信息登记后,会向RCD返回服务信息登记应答,告知RCD是否登记成功。登记成功之后,RCD在自身的/res资源发布其订阅的服务,然后其他的设备有可能会发现RCD的该服务,并可以操作该服务。S55. The RCD can register the service information with the ND. After the ND completes the service information registration, it will return a service information registration response to the RCD to inform the RCD whether the registration is successful. After the registration is successful, RCD publishes its subscribed service in its own /res resource, and then other devices may discover the RCD service and can operate the service.
如果其他设备例如第三方发起对该服务的访问请求,在RCD接收上述访问请求之后,根据访问请求的类型不同,可能进行不同的处理,示例如下:If another device, such as a third party, initiates an access request to the service, after the RCD receives the above access request, it may perform different processing depending on the type of access request. Examples are as follows:
(1)如果是“读”操作,则RCD可以直接从本地订阅的服务中获取该服务的内容返回给第三方。(1) If it is a "read" operation, the RCD can directly obtain the content of the service from the locally subscribed service and return it to the third party.
(2)如果是“写”操作,则RCD在本地保存该服务的修改内容之后,需要将该修改内容发送给ND。ND保存上述修改内容到其对应的服务的资源中。这里需要说明的是,在ND上其发布的服务,可以为每个订阅服务方(RCD)维护一个对应的订阅服务的示例,并使用S53步骤生成的管理表来管理。(2) If it is a "write" operation, after the RCD saves the modified content of the service locally, it needs to send the modified content to the ND. The ND saves the above-mentioned modified content in the resource of its corresponding service. What needs to be explained here is that the service published on the ND can maintain a corresponding subscription service example for each subscription service party (RCD), and use the management table generated in step S53 to manage it.
S56.如果被订阅服务中的资源等发生了变化,ND可以向RCD返回服务激活应答,该服务激活应答可以为通知消息的形式。例如,当ND上其订阅的服务的资源发生变化后,会通过通知消息通知RCD,从而保证ND上被订阅服务和RCD上生成的服务的一致性。S56. If the resources in the subscribed service change, the ND may return a service activation response to the RCD, and the service activation response may be in the form of a notification message. For example, when the resource of the subscribed service on the ND changes, the RCD will be notified through a notification message, so as to ensure the consistency of the subscribed service on the ND and the service generated on the RCD.
RCD订阅服务后,可以向外提供额外的本身不具备的服务,因此,TCD借助ND可以提供更丰富 的服务。After the RCD subscribes to the service, it can provide additional services that it does not have. Therefore, TCD can provide richer services with the help of ND.
例如,台灯因为硬件条件限制,不具有定时的功能,也不能完成台灯的定时开关功能。但是在同一网络内存在一个能提供定时服务(timer)的电视设备。这样台灯可以订阅电视的定时服务资源,并在本地生成一个副本,该副本可以被第三方发现。这样台灯因为具有了定时服务,就可以向外提供定时开关的功能。当第三方设定定时时间时,虽然台灯上也存在了定时服务,但是其实是在电视上完成实际的“计时”任务。当电视上完成“计时”任务时,可以通过通知的方式同步RCD上的定时服务副本,RCD就可以完成对应的定时服务相关的各种服务。For example, the desk lamp does not have the function of timing due to the limitation of hardware conditions, nor can it complete the function of timing switch of the desk lamp. However, there is a television device that can provide a timer in the same network. In this way, the desk lamp can subscribe to the timing service resources of the TV and generate a copy locally, which can be discovered by a third party. In this way, because the desk lamp has a timed service, it can provide the function of a timed switch to the outside. When a third party sets a timing time, although there is also a timing service on the desk lamp, it actually completes the actual "timing" task on the TV. When the "timing" task is completed on the TV, the copy of the timing service on the RCD can be synchronized by notification, and the RCD can complete various services related to the corresponding timing service.
示例2Example 2
上述的示例1可以应用于本地分享服务,示例2可以应用于远程分享服务。The above example 1 can be applied to local sharing services, and example 2 can be applied to remote sharing services.
图6为本申请实施例的服务分享方法一种应用示例的示意图。在该示例中,增加了云平台。该方法可以包括以下步骤:FIG. 6 is a schematic diagram of an application example of the service sharing method according to an embodiment of the application. In this example, a cloud platform is added. The method can include the following steps:
S61.可以对外提供服务的设备(ND)发布其可以对外提供的服务(也可以认为是设备可以对外提供的能力)。ND能够对外提供服务可以包括一个个不同的资源;一个服务可以包括一个或多个资源。当ND需要对外开放其服务时,可以将其需要开放的服务链接放入oic.r.service类型的资源(简称oic.r.service资源)里。每一设备可能存在一个oic.r.service资源,该资源可以表示本设备能够提供给外界的服务的集合。一种oic.r.service资源的示例可以参见上述的示例1。S61. The device (ND) that can provide services to the outside world publishes the services that it can provide to the outside world (it can also be considered as the ability of the device to provide to the outside world). ND can provide services externally can include different resources; a service can include one or more resources. When ND needs to open its service to the outside world, it can put the service link that it needs to open into the resource of type oic.r.service (referred to as oic.r.service resource). Each device may have an oic.r.service resource, which can represent a collection of services that the device can provide to the outside world. For an example of oic.r.service resource, refer to Example 1 above.
另外,ND需要将自身的可发现服务集合例如oic.r.service类型的资源发布到云平台的可发现资源集合/res资源中。在ND上所有可被其他设备发现的资源和服务,可以发布到/res资源里。其他设备通过查看该ND的/res资源,可以获取oic.r.service类型的资源,进而发现该资源中包含的该ND对外发布的服务。In addition, the ND needs to publish its own discoverable service collection, such as oic.r.service type resources, to the discoverable resource collection/res resource of the cloud platform. All resources and services that can be discovered by other devices on the ND can be published in the /res resource. Other devices can obtain resources of the oic.r.service type by viewing the /res resource of the ND, and then discover the services published by the ND in the resource.
与示例1不同,RCD可能并不知道是哪个ND设备提供的服务,而是知道是云平台提供的服务。例如,RCD将云平台发布的可被其他设备发现的服务认为是云平台开放的服务,不必确定是那台设备的服务。Unlike Example 1, RCD may not know which ND device provides the service, but knows the service provided by the cloud platform. For example, RCD regards the services published by the cloud platform that can be discovered by other devices as the services opened by the cloud platform, and it is not necessary to determine the service of that device.
S62.RCD通过发现流程,可以在云平台的/res资源下发现该云平台可供其他设备发现的服务,包含其发布的对外提供服务的资源/sevice。这可能包括一个或多个ND能够对外提供的服务。发现流程可以包括:RCD向云平台发送服务发现请求,用以发现云平台中一个或多个ND能够对外提供的服务集合。云平台向RCD返回发现服务应答,RCD获取云平台能够对外提供的服务集合。S62. Through the discovery process, the RCD can discover the services that can be discovered by other devices on the cloud platform under the /res resource of the cloud platform, including the resources/sevices that it publishes to provide external services. This may include services that one or more NDs can provide externally. The discovery process may include: the RCD sends a service discovery request to the cloud platform to discover a set of services that can be provided externally by one or more NDs in the cloud platform. The cloud platform returns a discovery service response to the RCD, and the RCD obtains the set of services that the cloud platform can provide externally.
S63.RCD在S62步骤取得的服务集合中,选择一个或者几个服务(一个或多个ND对外提供的服务),并完成对该所选服务的注册。注册流程可以包括:RCD向云平台的/myservice发送一个订阅服务请求,示例如下:S63. The RCD selects one or several services (services provided by one or more NDs) from the service set obtained in step S62, and completes the registration of the selected service. The registration process can include: RCD sends a subscription service request to /myservice of the cloud platform, an example is as follows:
Figure PCTCN2020088454-appb-000004
Figure PCTCN2020088454-appb-000004
订阅标识为0,可以表示需要订阅ND中某个服务中的资源,如果ND中该服务的资源有变化,则通过云平台通知RCD。再如,订阅标识为1表示取消订阅资源,如果ND中该服务的资源有变化,不再通过云平台通知RCD。再如,订阅标识为2表示订阅服务的功能,在RCD上生成与订阅的第一服务类似的第二服务,以使得其他设备能够利用RCD上的第二服务实现对应的功能。The subscription identifier is 0, which can indicate that the resource in a certain service in the ND needs to be subscribed. If the resource of the service in the ND changes, the RCD is notified through the cloud platform. For another example, if the subscription identifier is 1, it means that the resource is unsubscribed. If there is a change in the resource of the service in the ND, the RCD will not be notified through the cloud platform. For another example, the subscription identifier 2 indicates the function of the subscription service, and a second service similar to the subscribed first service is generated on the RCD, so that other devices can use the second service on the RCD to implement the corresponding function.
例如,在订阅服务请求中将包含订阅标识obs(值为2),以及订阅的内容(links参数包含的内容)。云平台收到上述订阅服务请求之后,则向ND转发上述订阅服务请求。也可以在云平台鉴权后再转发或在ND中鉴权。ND生成被订阅服务与订阅方的管理表并向云平台设备返回订阅应答消息,云平台可以将订阅应答消息返回给RCD。被订阅服务与订阅方的管理表可以包括多种形式,可以根据具体实现有所不同。该管理表可以用于完成被订阅服务和订阅方的管理和匹配。For example, the subscription service request will include the subscription identifier obs (the value is 2), and the content of the subscription (the content contained in the links parameter). After the cloud platform receives the above subscription service request, it forwards the above subscription service request to the ND. It can also be forwarded after the cloud platform authentication or authenticated in the ND. The ND generates a management table of the subscribed service and the subscriber and returns a subscription response message to the cloud platform device, and the cloud platform may return the subscription response message to the RCD. The management table of the subscribed service and the subscriber can include multiple forms, which can be different according to specific implementations. The management table can be used to complete the management and matching of the subscribed service and the subscriber.
此外,订阅应答消息中可以包含订阅服务的基本内容,被订阅的定时服务的示例可参见上述示例1。In addition, the subscription response message may include the basic content of the subscription service. For an example of the subscribed timing service, please refer to the above example 1.
在应答消息中可以携带被订阅服务提供的功能参数列表,例如上述{starttime,stoptime,repeat}。服务或者服务中的资源可以包含通用参数列表例如:{href,if,it}等,还可以包含功能参数列表。每个服务或者服务中的资源的功能参数列表可以是不同的,用于表示该服务或资源的能力。The response message can carry a list of function parameters provided by the subscribed service, such as the above {starttime, stoptime, repeat}. The service or the resources in the service can include a list of general parameters such as {href, if, it}, etc., and can also include a list of function parameters. The function parameter list of each service or resource in the service can be different, and is used to represent the capability of the service or resource.
S64.RCD收到应答消息之后,可以根据被订阅的第一服务在本地生成对应的第二服务。例如,第二服务可以是被订阅的第一服务的影像或建立一个被订阅服务的副本。并且,RCD可以将该第二服务作为一个可发现服务,发布到其/res资源。在生成的第二服务中可以标识出其是一个订阅的服务。标识方法可以有多种,可以参见上述示例1的相关描述。S64. After receiving the response message, the RCD may locally generate a corresponding second service according to the subscribed first service. For example, the second service can be an image of the subscribed first service or create a copy of the subscribed service. In addition, the RCD can publish the second service as a discoverable service to its /res resource. In the generated second service, it can be identified as a subscribed service. There can be multiple identification methods, please refer to the related description of Example 1 above.
S65.RCD可以通过云平台向ND进行服务信息登记,在ND完成服务信息登记后,可以通过云平台向RCD返回服务信息登记应答,告知RCD是否登记成功。登记成功之后,RCD在自身的/res资源发布其订阅的服务,然后其他的设备有可能会发现RCD的该服务,并可以操作该服务。S65. The RCD can register service information with the ND through the cloud platform. After the ND completes the service information registration, it can return a service information registration response to the RCD through the cloud platform to inform the RCD whether the registration is successful. After the registration is successful, RCD publishes its subscribed service in its own /res resource, and then other devices may discover the RCD service and can operate the service.
如果其他设备例如第三方发起对该服务的访问请求,在RCD接收上述访问请求之后,根据访问请求的类型不同,可能进行不同的处理,示例如下:If another device, such as a third party, initiates an access request to the service, after the RCD receives the above access request, it may perform different processing depending on the type of access request. Examples are as follows:
(1)如果是“读”操作,则RCD可以直接从本地订阅的服务中获取该服务的内容返回给第三方。(1) If it is a "read" operation, the RCD can directly obtain the content of the service from the locally subscribed service and return it to the third party.
(2)如果是“写”操作,在RCD在本地保存该服务的修改内容之后,需要将该修改内容发送给云平台,再由云平台发送给ND。ND保存上述修改内容到其对应的服务的资源中。这里需要说明的是,在ND设备上其发布的服务,可以为每个订阅服务方(RCD)维护一个对应的订阅服务的示例,并使用S63步骤生成的管理表来管理。(2) If it is a "write" operation, after the RCD saves the modified content of the service locally, the modified content needs to be sent to the cloud platform, and then the cloud platform sends the modified content to the ND. The ND saves the above-mentioned modified content in the resource of its corresponding service. It should be noted here that the service published on the ND device can maintain a corresponding subscription service example for each subscription service party (RCD), and use the management table generated in step S63 to manage it.
S66.如果被订阅服务中的资源等发生了变化,ND可以通过云平台向RCD返回服务激活应答,该服务激活应答可以为通知消息的形式。例如,当ND上其订阅的服务的资源发生变化后,会通过通知消息通知RCD,从而保证ND上被订阅服务和RCD上生成的服务的一致性,以及保证ND在云平台上发布的服务与ND上的服务的一致性。S66. If the resources in the subscribed service change, the ND may return a service activation response to the RCD through the cloud platform, and the service activation response may be in the form of a notification message. For example, when the resources of the subscribed service on the ND change, the RCD will be notified through a notification message, so as to ensure the consistency of the subscribed service on the ND and the service generated on the RCD, and to ensure that the service published by the ND on the cloud platform is consistent with Consistency of services on ND.
通过本申请实施例,资源受限设备可以借助网络内的其他设备分享的服务,来解决自身因硬件资源受限而导致的功能缺失问题。通过服务分享还可以提升不同设备间服务的融合,从而能提供更丰富的场景实现能力。Through the embodiments of the present application, a resource-constrained device can use services shared by other devices in the network to solve the problem of its own lack of function caused by limited hardware resources. Service sharing can also improve the integration of services between different devices, which can provide richer scenario realization capabilities.
图7是根据本申请一实施例的通信设备10的示意性框图。该通信设备10可以包括:FIG. 7 is a schematic block diagram of a communication device 10 according to an embodiment of the present application. The communication device 10 may include:
第一发送单元101,用于发送订阅服务请求,该订阅服务请求包括第一服务的订阅信息,该第一服务在可发现服务集合中;The first sending unit 101 is configured to send a subscription service request, where the subscription service request includes subscription information of a first service, and the first service is in a set of discoverable services;
第一接收单元102,用于接收应答消息,该应答消息中包括该第一服务的内容。The first receiving unit 102 is configured to receive a response message, the response message including the content of the first service.
可选地,在本申请实施例中,该第一服务在第二设备的可发现服务集合中,该第二设备的可发现服务集合包括该第二设备能够对外提供的服务的集合。Optionally, in this embodiment of the present application, the first service is in the discoverable service set of the second device, and the discoverable service set of the second device includes a set of services that the second device can provide externally.
可选地,在本申请实施例中,该第一服务在云平台的可发现服务集合中,该云平台的可发现服务集合包括该第二设备在该云平台上发布的、能够对外提供的服务的集合。Optionally, in the embodiment of the present application, the first service is in a set of discoverable services of a cloud platform, and the set of discoverable services of the cloud platform includes the services that the second device publishes on the cloud platform and can provide externally. Collection of services.
可选地,在本申请实施例中,如图8所示,该通信设备还包括:生成单元103,用于基于该应答消息在该通信设备上生成第二服务,该第二服务与该第一服务包括的资源相同。Optionally, in the embodiment of the present application, as shown in FIG. 8, the communication device further includes: a generating unit 103, configured to generate a second service on the communication device based on the response message, and the second service is related to the second service. A service includes the same resources.
可选地,在本申请实施例中,该通信设备还包括:发布单元104,用于将该第二服务发布到该通信设备的可发现服务集合中。Optionally, in this embodiment of the present application, the communication device further includes: a publishing unit 104, configured to publish the second service to a discoverable service set of the communication device.
可选地,在本申请实施例中,该第二服务包括订阅参数,该订阅参数用于标识第二服务是订阅服务。Optionally, in this embodiment of the present application, the second service includes a subscription parameter, and the subscription parameter is used to identify that the second service is a subscription service.
可选地,在本申请实施例中,该订阅参数为锚点参数。Optionally, in this embodiment of the present application, the subscription parameter is an anchor point parameter.
可选地,在本申请实施例中,该锚点参数还用于指示该第一服务在第二设备或云平台的位置。Optionally, in this embodiment of the present application, the anchor point parameter is also used to indicate the location of the first service on the second device or cloud platform.
可选地,在本申请实施例中,该通信设备还包括:Optionally, in this embodiment of the present application, the communication device further includes:
第二发送单元105,用于发送发现服务请求;The second sending unit 105 is configured to send a discovery service request;
第二接收单元106,用于接收发现服务应答,该发现服务应答中包括第二设备能够对外提供的服务的集合。The second receiving unit 106 is configured to receive a discovery service response, where the discovery service response includes a set of services that the second device can provide externally.
可选地,在本申请实施例中,该通信设备还包括:Optionally, in this embodiment of the present application, the communication device further includes:
第三接收单元107,用于接收来自第三设备或云平台的第一操作信息,该第一操作信息包括该第二服务的待修改内容;The third receiving unit 107 is configured to receive first operation information from a third device or cloud platform, where the first operation information includes the content to be modified of the second service;
第三发送单元108,用于基于该第二服务的待修改内容向第二设备发送修改请求,该修改请求中包括该第一服务的待修改内容。The third sending unit 108 is configured to send a modification request to the second device based on the content to be modified of the second service, and the modification request includes the content to be modified of the first service.
可选地,在本申请实施例中,该通信设备还包括:Optionally, in this embodiment of the present application, the communication device further includes:
第四接收单元109,用于接收该第二设备返回的该第一服务的修改结果;The fourth receiving unit 109 is configured to receive the modification result of the first service returned by the second device;
第四发送单元111,用于基于该第一服务的修改结果向该第三设备或该云平台发送该第二服务的修改结果。The fourth sending unit 111 is configured to send the modification result of the second service to the third device or the cloud platform based on the modification result of the first service.
可选地,在本申请实施例中,该通信设备还包括:Optionally, in this embodiment of the present application, the communication device further includes:
第五接收单元112,用于接收来自第三设备的第二操作信息,该第二操作信息用于请求获取第二服务;The fifth receiving unit 112 is configured to receive second operation information from the third device, where the second operation information is used to request the second service;
第五发送单元113,用于基于该第二操作信息向该第三设备发送该第二服务。The fifth sending unit 113 is configured to send the second service to the third device based on the second operation information.
可选地,在本申请实施例中,该通信设备还包括:同步单元114,用于基于该第二设备中的第一服务的变化同步该第二服务。Optionally, in this embodiment of the present application, the communication device further includes: a synchronization unit 114, configured to synchronize the second service based on the change of the first service in the second device.
可选地,在本申请实施例中,该同步单元114具体用于:接收来自第二设备或云平台的通知消息,该通知消息中包括该第二设备中发生变化的第一服务的内容;基于发生变化的第一服务的内容更新第二服务的内容。Optionally, in this embodiment of the present application, the synchronization unit 114 is specifically configured to: receive a notification message from a second device or a cloud platform, the notification message including the content of the first service that has changed in the second device; The content of the second service is updated based on the content of the changed first service.
可选地,在本申请实施例中,该通信设备还包括:第六发送单元115,用于向第三设备发送该通知消息。Optionally, in this embodiment of the present application, the communication device further includes: a sixth sending unit 115, configured to send the notification message to a third device.
本申请实施例的通信设备10能够实现前述的方法实施例中的第一设备的对应功能。该通信设备10中的各个模块(子模块、单元或组件等)对应的流程、功能、实现方式以及有益效果,可参见上述方法实施例中的对应描述,在此不再赘述。The communication device 10 of the embodiment of the present application can implement the corresponding function of the first device in the foregoing method embodiment. For the corresponding processes, functions, implementation modes, and beneficial effects of each module (sub-module, unit or component, etc.) in the communication device 10, please refer to the corresponding description in the foregoing method embodiment, which will not be repeated here.
需要说明,关于申请实施例的通信设备10中的各个模块(子模块、单元或组件等)所描述的功能,可由不同的模块(子模块、单元或组件等)实现,也可由同一个模块(子模块、单元或组件等)实现。It should be noted that the functions described in each module (sub-module, unit or component, etc.) in the communication device 10 of the application embodiment can be implemented by different modules (sub-module, unit or component, etc.), or by the same module ( Sub-modules, units or components, etc.).
图9是根据本申请一实施例的通信设备20的示意性框图。该通信设备20可以包括:FIG. 9 is a schematic block diagram of a communication device 20 according to an embodiment of the present application. The communication device 20 may include:
第一接收单元201,用于接收订阅服务请求,该订阅服务请求包括第一服务的订阅信息,该第一服务在可发现服务集合中;The first receiving unit 201 is configured to receive a subscription service request, where the subscription service request includes subscription information of a first service, and the first service is in a set of discoverable services;
第一发送单元202,用于发送应答消息,该应答消息中包括该第一服务的内容。The first sending unit 202 is configured to send a response message, and the response message includes the content of the first service.
可选地,在本申请实施例中,该第一服务在通信设备的可发现服务集合中,该通信设备的可发现服务集合包括该通信设备能够对外提供的服务的集合。Optionally, in this embodiment of the present application, the first service is in a discoverable service set of the communication device, and the discoverable service set of the communication device includes a set of services that the communication device can provide externally.
可选地,在本申请实施例中,该第一接收单元201具体用于接收来自于第一设备或云平台的订阅服务请求;该第一发送单元201具体用于向该第一设备或该云平台发送应答消息。Optionally, in this embodiment of the present application, the first receiving unit 201 is specifically configured to receive a subscription service request from a first device or a cloud platform; the first sending unit 201 is specifically configured to send a request to the first device or the cloud platform The cloud platform sends a response message.
可选地,在本申请实施例中,该通信设备还包括:Optionally, in this embodiment of the present application, the communication device further includes:
第二接收单元203,用于接收发现服务请求;The second receiving unit 203 is configured to receive a discovery service request;
第二发送单元204,用于发送发现服务应答,该发现服务应答中包括通信设备或云平台能够对外提供的服务的集合。The second sending unit 204 is configured to send a discovery service response, where the discovery service response includes a collection of services that can be provided externally by the communication device or the cloud platform.
可选地,在本申请实施例中,该第二接收单元203具体用于接收来自第一设备或云平台的发现服务请求;该第二发送单元204具体用于向该第一设备或该云平台发送发现服务应答。Optionally, in this embodiment of the present application, the second receiving unit 203 is specifically configured to receive a discovery service request from a first device or cloud platform; the second sending unit 204 is specifically configured to send a request to the first device or the cloud platform The platform sends a response to the discovery service.
可选地,在本申请实施例中,该通信设备还包括:Optionally, in this embodiment of the present application, the communication device further includes:
第三接收单元205,用于接收来自第一设备或云平台的修改请求,该修改请求中包括该第一服务的待修改内容;The third receiving unit 205 is configured to receive a modification request from the first device or cloud platform, where the modification request includes the content to be modified of the first service;
修改单元206,用于基于该修改请求对该第一服务进行修改;The modification unit 206 is configured to modify the first service based on the modification request;
第三发送单元207,用于向该第一设备或该云平台发送该第一服务的修改结果。The third sending unit 207 is configured to send the modification result of the first service to the first device or the cloud platform.
可选地,在本申请实施例中,该通信设备还包括:第四发送单元208,用于向第一设备发送通知消息,该通知消息中包括该通信设备中发生变化的第一服务的内容。Optionally, in this embodiment of the present application, the communication device further includes: a fourth sending unit 208, configured to send a notification message to the first device, the notification message including the content of the first service changed in the communication device .
可选地,在本申请实施例中,该通信设备中包括被订阅的第一服务与订阅该第一服务的第一设备之间的对应关系。Optionally, in this embodiment of the present application, the communication device includes a correspondence between the subscribed first service and the first device subscribed to the first service.
可选地,在本申请实施例中,在多个第一设备订阅该第一服务的情况下,该通信设备中包括该第一服务的多个实例,每个实例对应一个订阅该第一服务的第一设备。Optionally, in the embodiment of the present application, when multiple first devices subscribe to the first service, the communication device includes multiple instances of the first service, and each instance corresponds to a subscription to the first service. The first device.
本申请实施例的通信设备20能够实现前述的方法实施例中的第二设备的对应功能。该通信设备20中的各个模块(子模块、单元或组件等)对应的流程、功能、实现方式以及有益效果,可参见上述方法实施例中的对应描述,在此不再赘述。The communication device 20 in the embodiment of the present application can implement the corresponding function of the second device in the foregoing method embodiment. For the corresponding processes, functions, implementation modes, and beneficial effects of each module (sub-module, unit or component, etc.) in the communication device 20, please refer to the corresponding description in the foregoing method embodiment, which will not be repeated here.
需要说明,关于申请实施例的通信设备20中的各个模块(子模块、单元或组件等)所描述的功能,可由不同的模块(子模块、单元或组件等)实现,也可由同一个模块(子模块、单元或组件等)实现。It should be noted that the functions described in each module (sub-module, unit or component, etc.) in the communication device 20 of the application embodiment can be implemented by different modules (sub-module, unit or component, etc.), or by the same module ( Sub-modules, units or components, etc.).
图11是根据本申请一实施例的云平台30的示意性框图。该云平台30可以包括:FIG. 11 is a schematic block diagram of a cloud platform 30 according to an embodiment of the present application. The cloud platform 30 may include:
第一接收单元301,用于接收来自第一设备订阅服务请求,该订阅服务请求包括第一服务的订阅信息,该第一服务在可发现服务集合中;The first receiving unit 301 is configured to receive a subscription service request from a first device, where the subscription service request includes subscription information of a first service, and the first service is in a set of discoverable services;
第一发送单元302,用于向该第一设备发送应答消息,该应答消息中包括该第一服务的内容。The first sending unit 302 is configured to send a response message to the first device, and the response message includes the content of the first service.
可选地,在本申请实施例中,该第一服务在云平台的可发现服务集合中,该云平台的可发现服务集合包括第二设备在该云平台上发布的、能够对外提供的服务的集合。Optionally, in the embodiment of the present application, the first service is in the discoverable service set of the cloud platform, and the discoverable service set of the cloud platform includes the services that the second device publishes on the cloud platform and can be provided externally. Collection.
可选地,在本申请实施例中,如图12所示,该云平台还包括:Optionally, in the embodiment of the present application, as shown in FIG. 12, the cloud platform further includes:
第二接收单元303,用于接收来自第一设备的发现服务请求;The second receiving unit 303 is configured to receive a discovery service request from the first device;
第二发送单元304,用于向第一设备发送发现服务应答,该发现服务应答中包括该云平台能够对外提供的服务的集合。The second sending unit 304 is configured to send a discovery service response to the first device, and the discovery service response includes a set of services that the cloud platform can provide externally.
可选地,在本申请实施例中,该云平台还包括:Optionally, in the embodiment of the present application, the cloud platform further includes:
第三接收单元305,用于接收来自第二设备的服务发布消息,该服务发布消息中包括该第二设备能够对外提供的服务的集合;The third receiving unit 305 is configured to receive a service release message from the second device, where the service release message includes a set of services that the second device can provide to the outside;
发布单元306,用于将该第二设备能够对外提供的服务的集合发布到云平台的可发现服务集合中。The publishing unit 306 is configured to publish the set of services that the second device can provide externally to the discoverable service set of the cloud platform.
可选地,在本申请实施例中,该云平台还包括:Optionally, in the embodiment of the present application, the cloud platform further includes:
第四接收单元307,用于接收来自第一设备的修改请求,该修改请求中包括该第一服务的待修改内容;The fourth receiving unit 307 is configured to receive a modification request from the first device, where the modification request includes the content to be modified of the first service;
第三发送单元308,用于向第二设备转发该修改请求;The third sending unit 308 is configured to forward the modification request to the second device;
第五接收单元309,用于接收该第二设备返回的该第一服务的修改结果;The fifth receiving unit 309 is configured to receive the modification result of the first service returned by the second device;
第四发送单元310,用于向该第一设备发送该第一服务的修改结果。The fourth sending unit 310 is configured to send the modification result of the first service to the first device.
可选地,在本申请实施例中,该云平台还包括:Optionally, in the embodiment of the present application, the cloud platform further includes:
第六接收单元311,用于接收第二设备的通知消息,该通知消息中包括该第二设备中发生变化的服 务的内容;The sixth receiving unit 311 is configured to receive a notification message from the second device, where the notification message includes the content of the changed service in the second device;
第五发送单元312,用于向第一设备转发该通知消息。The fifth sending unit 312 is configured to forward the notification message to the first device.
本申请实施例的云平台30能够实现前述的方法实施例中的云平台的对应功能。该云平台30中的各个模块(子模块、单元或组件等)对应的流程、功能、实现方式以及有益效果,可参见上述方法实施例中的对应描述,在此不再赘述。The cloud platform 30 of the embodiment of the present application can implement the corresponding functions of the cloud platform in the foregoing method embodiment. For the corresponding processes, functions, implementation manners, and beneficial effects of each module (sub-module, unit or component, etc.) in the cloud platform 30, please refer to the corresponding description in the foregoing method embodiment, which will not be repeated here.
需要说明,关于申请实施例的云平台30中的各个模块(子模块、单元或组件等)所描述的功能,可由不同的模块(子模块、单元或组件等)实现,也可由同一个模块(子模块、单元或组件等)实现。It should be noted that the functions described in each module (sub-module, unit or component, etc.) in the cloud platform 30 of the application embodiment can be implemented by different modules (sub-module, unit or component, etc.), or by the same module ( Sub-modules, units or components, etc.).
图13是根据本申请实施例的通信设备600示意性结构图。该通信设备600包括处理器610,处理器610可以从存储器中调用并运行计算机程序,以实现本申请实施例中的方法。FIG. 13 is a schematic structural diagram of a communication device 600 according to an embodiment of the present application. The communication device 600 includes a processor 610, and the processor 610 can call and run a computer program from the memory to implement the method in the embodiment of the present application.
可选地,如图13所示,通信设备600还可以包括存储器620。其中,处理器610可以从存储器620中调用并运行计算机程序,以实现本申请实施例中的方法。Optionally, as shown in FIG. 13, the communication device 600 may further include a memory 620. The processor 610 may call and run a computer program from the memory 620 to implement the method in the embodiment of the present application.
其中,存储器620可以是独立于处理器610的一个单独的器件,也可以集成在处理器610中。The memory 620 may be a separate device independent of the processor 610, or may be integrated in the processor 610.
可选地,如图13所示,通信设备600还可以包括收发器630,处理器610可以控制该收发器630与其他设备进行通信,具体地,可以向其他设备发送信息或数据,或接收其他设备发送的信息或数据。Optionally, as shown in FIG. 13, the communication device 600 may further include a transceiver 630, and the processor 610 may control the transceiver 630 to communicate with other devices. Specifically, it may send information or data to other devices, or receive other devices. Information or data sent by the device.
其中,收发器630可以包括发射机和接收机。收发器630还可以进一步包括天线,天线的数量可以为一个或多个。Wherein, the transceiver 630 may include a transmitter and a receiver. The transceiver 630 may further include an antenna, and the number of antennas may be one or more.
可选地,该通信设备600可为本申请实施例的网络设备,并且该通信设备600可以实现本申请实施例的各个方法中由网络设备实现的相应流程,为了简洁,在此不再赘述。Optionally, the communication device 600 may be a network device of an embodiment of the present application, and the communication device 600 may implement the corresponding process implemented by the network device in each method of the embodiment of the present application. For the sake of brevity, details are not described herein again.
可选地,该通信设备600可为本申请实施例的终端设备,并且该通信设备600可以实现本申请实施例的各个方法中由终端设备实现的相应流程,为了简洁,在此不再赘述。Optionally, the communication device 600 may be a terminal device of an embodiment of the present application, and the communication device 600 may implement corresponding procedures implemented by the terminal device in each method of the embodiments of the present application. For brevity, details are not described herein again.
图14是根据本申请实施例的芯片700的示意性结构图。该芯片700包括处理器710,处理器710可以从存储器中调用并运行计算机程序,以实现本申请实施例中的方法。FIG. 14 is a schematic structural diagram of a chip 700 according to an embodiment of the present application. The chip 700 includes a processor 710, and the processor 710 can call and run a computer program from the memory to implement the method in the embodiment of the present application.
可选地,如图14所示,芯片700还可以包括存储器720。其中,处理器710可以从存储器720中调用并运行计算机程序,以实现本申请实施例中的方法。Optionally, as shown in FIG. 14, the chip 700 may further include a memory 720. The processor 710 may call and run a computer program from the memory 720 to implement the method in the embodiment of the present application.
其中,存储器720可以是独立于处理器710的一个单独的器件,也可以集成在处理器710中。The memory 720 may be a separate device independent of the processor 710, or may be integrated in the processor 710.
可选地,该芯片700还可以包括输入接口730。其中,处理器710可以控制该输入接口730与其他设备或芯片进行通信,具体地,可以获取其他设备或芯片发送的信息或数据。Optionally, the chip 700 may further include an input interface 730. The processor 710 can control the input interface 730 to communicate with other devices or chips, and specifically, can obtain information or data sent by other devices or chips.
可选地,该芯片700还可以包括输出接口740。其中,处理器710可以控制该输出接口740与其他设备或芯片进行通信,具体地,可以向其他设备或芯片输出信息或数据。Optionally, the chip 700 may further include an output interface 740. The processor 710 can control the output interface 740 to communicate with other devices or chips, and specifically, can output information or data to other devices or chips.
可选地,该芯片可应用于本申请实施例中的网络设备,并且该芯片可以实现本申请实施例的各个方法中由网络设备实现的相应流程,为了简洁,在此不再赘述。Optionally, the chip can be applied to the network device in the embodiment of the present application, and the chip can implement the corresponding process implemented by the network device in each method of the embodiment of the present application. For the sake of brevity, details are not described herein again.
可选地,该芯片可应用于本申请实施例中的终端设备,并且该芯片可以实现本申请实施例的各个方法中由终端设备实现的相应流程,为了简洁,在此不再赘述。Optionally, the chip can be applied to the terminal device in the embodiment of the present application, and the chip can implement the corresponding process implemented by the terminal device in each method of the embodiment of the present application. For brevity, details are not described herein again.
应理解,本申请实施例提到的芯片还可以称为系统级芯片,系统芯片,芯片系统或片上系统芯片等。It should be understood that the chip mentioned in the embodiment of the present application may also be referred to as a system-level chip, a system-on-chip, a system-on-chip, or a system-on-chip, etc.
上述提及的处理器可以是通用处理器、数字信号处理器(digital signal processor,DSP)、现成可编程门阵列(field programmable gate array,FPGA)、专用集成电路(application specific integrated circuit,ASIC)或者其他可编程逻辑器件、晶体管逻辑器件、分立硬件组件等。其中,上述提到的通用处理器可以是微处理器或者也可以是任何常规的处理器等。The aforementioned processors can be general-purpose processors, digital signal processors (digital signal processors, DSP), ready-made programmable gate arrays (field programmable gate arrays, FPGAs), application specific integrated circuits (ASICs), or Other programmable logic devices, transistor logic devices, discrete hardware components, etc. Among them, the aforementioned general-purpose processor may be a microprocessor or any conventional processor.
上述提及的存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(read-only memory,ROM)、可编程只读存储器(programmable ROM,PROM)、可擦除可编程只读存储器(erasable PROM,EPROM)、电可擦除可编程只读存储器(electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(random  access memory,RAM)。The above-mentioned memory may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. Among them, the non-volatile memory can be read-only memory (ROM), programmable read-only memory (programmable ROM, PROM), erasable programmable read-only memory (erasable PROM, EPROM), and electrically available Erase programmable read-only memory (electrically EPROM, EEPROM) or flash memory. The volatile memory may be random access memory (RAM).
应理解,上述存储器为示例性但不是限制性说明,例如,本申请实施例中的存储器还可以是静态随机存取存储器(static RAM,SRAM)、动态随机存取存储器(dynamic RAM,DRAM)、同步动态随机存取存储器(synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(double data rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synch link DRAM,SLDRAM)以及直接内存总线随机存取存储器(Direct Rambus RAM,DR RAM)等等。也就是说,本申请实施例中的存储器旨在包括但不限于这些和任意其它适合类型的存储器。It should be understood that the foregoing memory is exemplary but not restrictive. For example, the memory in the embodiment of the present application may also be static random access memory (static RAM, SRAM), dynamic random access memory (dynamic RAM, DRAM), Synchronous dynamic random access memory (synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (double data rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (enhanced SDRAM, ESDRAM), synchronous connection Dynamic random access memory (synch link DRAM, SLDRAM) and direct memory bus random access memory (Direct Rambus RAM, DR RAM) and so on. That is to say, the memory in the embodiments of the present application is intended to include, but is not limited to, these and any other suitable types of memory.
图15是根据本申请实施例的通信系统800的示意性框图。该通信系统800包括第一设备810和第二设备820。第一设备810用于发送订阅服务请求,所述订阅服务请求包括第一服务的订阅信息,所述第一服务在可发现服务集合中;接收应答消息,所述应答消息中包括所述第一服务的内容。第二设备820用于接收该订阅服务请求;发送该应答消息。其中,该第一设备810可以用于实现上述方法中由第一设备实现的相应的功能,以及该第二设备820可以用于实现上述方法中由第二设备实现的相应的功能。为了简洁,在此不再赘述。FIG. 15 is a schematic block diagram of a communication system 800 according to an embodiment of the present application. The communication system 800 includes a first device 810 and a second device 820. The first device 810 is configured to send a subscription service request, where the subscription service request includes subscription information of a first service, and the first service is in a set of discoverable services; and receives a response message, which includes the first service. The content of the service. The second device 820 is used for receiving the subscription service request; sending the response message. Wherein, the first device 810 may be used to implement the corresponding function implemented by the first device in the foregoing method, and the second device 820 may be used to implement the corresponding function implemented by the second device in the foregoing method. For the sake of brevity, I will not repeat them here.
可选地,该通信系统800还可以包括:云平台830,用于接收来自第一设备该订阅服务请求,所述订阅服务请求包括第一服务的订阅信息,所述第一服务在可发现服务集合中;向所述第一设备发送应答消息,所述应答消息中包括所述第一服务的内容。该云平台830可以用于实现上述方法中由第二设备实现的相应的功能。为了简洁,在此不再赘述。Optionally, the communication system 800 may further include: a cloud platform 830, configured to receive the subscription service request from the first device, where the subscription service request includes subscription information of the first service, and the first service is in a discoverable service In the set; sending a response message to the first device, the response message including the content of the first service. The cloud platform 830 may be used to implement the corresponding functions implemented by the second device in the foregoing method. For the sake of brevity, I will not repeat them here.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。该计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行该计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。该计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。该计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,该计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(Digital Subscriber Line,DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。该计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。该可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘(Solid State Disk,SSD))等。In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented by software, it can be implemented in the form of a computer program product in whole or in part. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instruction may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instruction may be transmitted from a website, computer, server, or data center through a cable (Such as coaxial cable, optical fiber, Digital Subscriber Line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or data center integrated with one or more available media. The usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, and a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk (SSD)).
应理解,在本申请的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should be understood that in the various embodiments of the present application, the size of the sequence number of the above-mentioned processes does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not correspond to the embodiments of the present application. The implementation process constitutes any limitation.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and conciseness of description, the specific working process of the system, device and unit described above can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here.
以上所述仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以该权利要求的保护范围为准。The above are only specific implementations of this application, but the protection scope of this application is not limited to this. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in this application. Covered in the scope of protection of this application. Therefore, the protection scope of this application shall be subject to the protection scope of the claims.

Claims (75)

  1. 一种服务分享方法,包括:A method of service sharing, including:
    第一设备发送订阅服务请求,所述订阅服务请求包括第一服务的订阅信息,所述第一服务在可发现服务集合中;The first device sends a subscription service request, where the subscription service request includes subscription information of a first service, and the first service is in a set of discoverable services;
    所述第一设备接收应答消息,所述应答消息中包括所述第一服务的内容。The first device receives a response message, and the response message includes the content of the first service.
  2. 根据权利要求1所述的方法,其中,所述第一服务在第二设备的可发现服务集合中,所述第二设备的可发现服务集合包括所述第二设备能够对外提供的服务的集合。The method according to claim 1, wherein the first service is in a set of discoverable services of a second device, and the set of discoverable services of the second device includes a set of services that the second device can provide externally .
  3. 根据权利要求1所述的方法,其中,所述第一服务在云平台的可发现服务集合中,所述云平台的可发现服务集合包括第二设备在所述云平台上发布的、能够对外提供的服务的集合。The method according to claim 1, wherein the first service is in a set of discoverable services of a cloud platform, and the set of discoverable services of the cloud platform includes a set of discoverable services published by a second device on the cloud platform and capable of external The collection of services provided.
  4. 根据权利要求1至3中任一项所述的方法,其中,所述方法还包括:The method according to any one of claims 1 to 3, wherein the method further comprises:
    所述第一设备基于所述应答消息在所述第一设备上生成第二服务,所述第二服务与所述第一服务包括的资源相同。The first device generates a second service on the first device based on the response message, and the second service includes the same resources as the first service.
  5. 根据权利要求4所述的方法,其中,所述方法还包括:The method according to claim 4, wherein the method further comprises:
    所述第一设备将所述第二服务发布到所述第一设备的可发现资源集合中。The first device publishes the second service to the discoverable resource set of the first device.
  6. 根据权利要求4或5所述的方法,其中,所述第二服务包括订阅参数,所述订阅参数用于标识所述第二服务是订阅服务。The method according to claim 4 or 5, wherein the second service includes a subscription parameter, and the subscription parameter is used to identify that the second service is a subscription service.
  7. 根据权利要求6所述的方法,其中,所述订阅参数为锚点参数。The method according to claim 6, wherein the subscription parameter is an anchor parameter.
  8. 根据权利要求7所述的方法,其中,所述锚点参数还用于指示所述第一服务在第二设备或云平台的位置。The method according to claim 7, wherein the anchor point parameter is also used to indicate the location of the first service on the second device or cloud platform.
  9. 根据权利要求1至8中任一项所述的方法,其中,所述方法还包括:The method according to any one of claims 1 to 8, wherein the method further comprises:
    所述第一设备发送发现服务请求;Sending a discovery service request by the first device;
    所述第一设备接收发现服务应答,所述发现服务应答中包括第二设备能够对外提供的服务的集合。The first device receives a discovery service response, and the discovery service response includes a set of services that the second device can provide externally.
  10. 根据权利要求1至9中任一项所述的方法,其中,所述方法还包括:The method according to any one of claims 1 to 9, wherein the method further comprises:
    所述第一设备接收来自第三设备或云平台的第一操作信息,所述第一操作信息包括第二服务的待修改内容;The first device receives first operation information from a third device or a cloud platform, where the first operation information includes the content to be modified of the second service;
    所述第一设备基于所述第二服务的待修改内容向第二设备发送修改请求,所述修改请求中包括所述第一服务的待修改内容。The first device sends a modification request to the second device based on the content to be modified of the second service, and the modification request includes the content to be modified of the first service.
  11. 根据权利要求10所述的方法,其中,所述方法还包括:The method according to claim 10, wherein the method further comprises:
    所述第一设备接收所述第二设备返回的所述第一服务的修改结果;Receiving, by the first device, the modification result of the first service returned by the second device;
    所述第一设备基于所述第一服务的修改结果向所述第三设备或所述云平台发送所述第二服务的修改结果。The first device sends the modification result of the second service to the third device or the cloud platform based on the modification result of the first service.
  12. 根据权利要求1至9中任一项所述的方法,其中,所述方法还包括:The method according to any one of claims 1 to 9, wherein the method further comprises:
    所述第一设备接收来自第三设备的第二操作信息,所述第二操作信息用于请求获取第二服务;The first device receives second operation information from a third device, where the second operation information is used to request a second service;
    所述第一设备基于所述第二操作信息向所述第三设备发送所述第二服务。The first device sends the second service to the third device based on the second operation information.
  13. 根据权利要求1至9中任一项所述的方法,其中,所述方法还包括:The method according to any one of claims 1 to 9, wherein the method further comprises:
    所述第一设备基于第二设备中的第一服务的变化同步第二服务。The first device synchronizes the second service based on the change of the first service in the second device.
  14. 根据权利要求13所述的方法,其中,所述同步的方式包括:The method according to claim 13, wherein the way of synchronization comprises:
    所述第一设备接收来自第二设备或云平台的通知消息,所述通知消息中包括所述第二设备中发生变化的第一服务的内容;The first device receives a notification message from a second device or a cloud platform, where the notification message includes the content of the first service that has changed in the second device;
    所述第一设备基于发生变化的第一服务的内容更新第二服务的内容。The first device updates the content of the second service based on the content of the changed first service.
  15. 根据权利要求14所述的方法,其中,所述方法还包括:The method according to claim 14, wherein the method further comprises:
    所述第一设备向第三设备发送所述通知消息。The first device sends the notification message to a third device.
  16. 一种服务分享方法,包括:A method of service sharing, including:
    第二设备接收订阅服务请求,所述订阅服务请求包括第一服务的订阅信息,所述第一服务在可发现服务集合中;The second device receives a subscription service request, where the subscription service request includes subscription information of a first service, and the first service is in a set of discoverable services;
    所述第二设备发送应答消息,所述应答消息中包括所述第一服务的内容。The second device sends a response message, and the response message includes the content of the first service.
  17. 根据权利要求16所述的方法,其中,所述第一服务在第二设备的可发现服务集合中,所述第二设备的可发现服务集合包括所述第二设备能够对外提供的服务的集合。The method according to claim 16, wherein the first service is in a set of discoverable services of a second device, and the set of discoverable services of the second device includes a set of services that the second device can provide externally .
  18. 根据权利要求16或17所述的方法,其中,所述第二设备接收订阅服务请求,包括:第二设备接收来自于第一设备或云平台的订阅服务请求;The method according to claim 16 or 17, wherein the second device receiving the subscription service request comprises: the second device receiving the subscription service request from the first device or the cloud platform;
    所述第二设备发送应答消息,包括:所述第二设备向所述第一设备或所述云平台发送应答消息。The sending of the response message by the second device includes: the second device sending a response message to the first device or the cloud platform.
  19. 根据权利要求16至18中任一项所述的方法,其中,所述方法还包括:The method according to any one of claims 16 to 18, wherein the method further comprises:
    所述第二设备接收发现服务请求;The second device receives a discovery service request;
    所述第二设备发送发现服务应答,所述发现服务应答中包括第二设备或云平台能够对外提供的服务的集合。The second device sends a discovery service response, and the discovery service response includes a set of services that the second device or the cloud platform can provide externally.
  20. 根据权利要求19所述的方法,其中,所述第二设备接收发现服务请求,包括:所述第二设备接收来自第一设备或云平台的发现服务请求;The method according to claim 19, wherein the second device receiving a discovery service request comprises: the second device receiving a discovery service request from the first device or a cloud platform;
    所述第二设备发送发现服务应答,包括:所述第二设备向所述第一设备或所述云平台发送发现服务应答。The sending of the discovery service response by the second device includes: the second device sending the discovery service response to the first device or the cloud platform.
  21. 根据权利要求16至20中任一项所述的方法,其中,所述方法还包括:The method according to any one of claims 16 to 20, wherein the method further comprises:
    所述第二设备接收来自第一设备或云平台的修改请求,所述修改请求中包括所述第一服务的待修改内容;The second device receives a modification request from the first device or the cloud platform, where the modification request includes the content to be modified of the first service;
    所述第二设备基于所述修改请求对所述第一服务进行修改;The second device modifies the first service based on the modification request;
    所述第二设备向所述第一设备或所述云平台发送所述第一服务的修改结果。The second device sends the modification result of the first service to the first device or the cloud platform.
  22. 根据权利要求16至21中任一项所述的方法,其中,所述方法还包括:The method according to any one of claims 16 to 21, wherein the method further comprises:
    所述第二设备向第一设备发送通知消息,所述通知消息中包括所述第二设备中发生变化的第一服务的内容。The second device sends a notification message to the first device, where the notification message includes the content of the first service that has changed in the second device.
  23. 根据权利要求16至22中任一项所述的方法,其中,所述第二设备中包括被订阅的第一服务与订阅所述第一服务的第一设备之间的对应关系。The method according to any one of claims 16 to 22, wherein the second device includes a correspondence between the subscribed first service and the first device subscribed to the first service.
  24. 根据权利要求16至22中任一项所述的方法,其中,在多个第一设备订阅所述第一服务的情况下,所述第二设备中包括所述第一服务的多个实例,每个实例对应一个订阅所述第一服务的第一设备。The method according to any one of claims 16 to 22, wherein, in a case where multiple first devices subscribe to the first service, the second device includes multiple instances of the first service, Each instance corresponds to a first device that subscribes to the first service.
  25. 一种服务分享方法,包括:A method of service sharing, including:
    云平台接收来自第一设备订阅服务请求,所述订阅服务请求包括第一服务的订阅信息,所述第一服务在可发现服务集合中;The cloud platform receives a subscription service request from a first device, the subscription service request includes subscription information of a first service, and the first service is in a set of discoverable services;
    所述云平台向所述第一设备发送应答消息,所述应答消息中包括所述第一服务的内容。The cloud platform sends a response message to the first device, and the response message includes the content of the first service.
  26. 根据权利要求25所述的方法,其中,所述第一服务在云平台的可发现服务集合中,所述云平台的可发现服务集合包括第二设备在所述云平台上发布的、能够对外提供的服务的集合。The method according to claim 25, wherein the first service is in a set of discoverable services of a cloud platform, and the set of discoverable services of the cloud platform includes a set of discoverable services published by a second device on the cloud platform and capable of external The collection of services provided.
  27. 根据权利要求25或26所述的方法,其中,所述方法还包括:The method according to claim 25 or 26, wherein the method further comprises:
    所述云平台接收来自第一设备的发现服务请求;The cloud platform receives a discovery service request from the first device;
    所述云平台向第一设备发送发现服务应答,所述发现服务应答中包括所述云平台能够对外提供的服务的集合。The cloud platform sends a discovery service response to the first device, and the discovery service response includes a set of services that the cloud platform can provide externally.
  28. 根据权利要求25至27中任一项所述的方法,其中,所述方法还包括:The method according to any one of claims 25 to 27, wherein the method further comprises:
    所述云平台接收来自第二设备的服务发布消息,所述服务发布消息中包括所述第二设备能够对外提 供的服务的集合;The cloud platform receives a service release message from a second device, where the service release message includes a set of services that the second device can provide externally;
    所述云平台将所述第二设备能够对外提供的服务的集合发布到所述云平台的可发现服务集合中。The cloud platform publishes the set of services that the second device can provide externally to the discoverable service set of the cloud platform.
  29. 根据权利要求25至28中任一项所述的方法,其中,所述方法还包括:The method according to any one of claims 25 to 28, wherein the method further comprises:
    所述云平台接收来自第一设备的修改请求,所述修改请求中包括所述第一服务的待修改内容;Receiving, by the cloud platform, a modification request from a first device, where the modification request includes the content to be modified of the first service;
    所述云平台向第二设备转发所述修改请求;The cloud platform forwards the modification request to the second device;
    所述云平台接收所述第二设备返回的所述第一服务的修改结果;Receiving, by the cloud platform, the modification result of the first service returned by the second device;
    所述云平台向所述第一设备发送所述第一服务的修改结果。The cloud platform sends the modification result of the first service to the first device.
  30. 根据权利要求25至29中任一项所述的方法,其中,所述方法还包括:The method according to any one of claims 25 to 29, wherein the method further comprises:
    所述云平台接收第二设备的通知消息,所述通知消息中包括所述第二设备中发生变化的服务的内容;Receiving, by the cloud platform, a notification message from a second device, where the notification message includes the content of a service that has changed in the second device;
    所述云平台向第一设备转发所述通知消息。The cloud platform forwards the notification message to the first device.
  31. 一种通信设备,包括:A communication device including:
    第一发送单元,用于发送订阅服务请求,所述订阅服务请求包括第一服务的订阅信息,所述第一服务在可发现服务集合中;A first sending unit, configured to send a subscription service request, where the subscription service request includes subscription information of a first service, and the first service is in a set of discoverable services;
    第一接收单元,用于接收应答消息,所述应答消息中包括所述第一服务的内容。The first receiving unit is configured to receive a response message, where the response message includes the content of the first service.
  32. 根据权利要求31所述的通信设备,其中,所述第一服务在第二设备的可发现服务集合中,所述第二设备的可发现服务集合包括所述第二设备能够对外提供的服务的集合。The communication device according to claim 31, wherein the first service is in a discoverable service set of a second device, and the discoverable service set of the second device includes a list of services that the second device can provide externally. gather.
  33. 根据权利要求31所述的通信设备,其中,所述第一服务在云平台的可发现服务集合中,所述云平台的可发现服务集合包括第二设备在所述云平台上发布的、能够对外提供的服务的集合。The communication device according to claim 31, wherein the first service is in a set of discoverable services of a cloud platform, and the set of discoverable services of the cloud platform includes a set of discoverable services published by a second device on the cloud platform and capable of A collection of services provided externally.
  34. 根据权利要求31至33中任一项所述的通信设备,其中,所述通信设备还包括:The communication device according to any one of claims 31 to 33, wherein the communication device further comprises:
    生成单元,用于基于所述应答消息在所述通信设备上生成第二服务,所述第二服务与所述第一服务包括的资源相同。The generating unit is configured to generate a second service on the communication device based on the response message, where the second service includes the same resources as the first service.
  35. 根据权利要求34所述的通信设备,其中,所述通信设备还包括:The communication device according to claim 34, wherein the communication device further comprises:
    发布单元,用于将所述第二服务发布到所述通信设备的可发现服务集合中。The publishing unit is configured to publish the second service to the discoverable service set of the communication device.
  36. 根据权利要求34或35所述的通信设备,其中,所述第二服务包括订阅参数,所述订阅参数用于标识所述第二服务是订阅服务。The communication device according to claim 34 or 35, wherein the second service includes a subscription parameter, and the subscription parameter is used to identify that the second service is a subscription service.
  37. 根据权利要求36所述的通信设备,其中,所述订阅参数为锚点参数。The communication device according to claim 36, wherein the subscription parameter is an anchor parameter.
  38. 根据权利要求37所述的通信设备,其中,所述锚点参数还用于指示所述第一服务在第二设备或云平台的位置。The communication device according to claim 37, wherein the anchor point parameter is also used to indicate the location of the first service on the second device or the cloud platform.
  39. 根据权利要求31至38中任一项所述的通信设备,其中,所述通信设备还包括:The communication device according to any one of claims 31 to 38, wherein the communication device further comprises:
    第二发送单元,用于发送发现服务请求;The second sending unit is used to send a discovery service request;
    第二接收单元,用于接收发现服务应答,所述发现服务应答中包括第二设备能够对外提供的服务的集合。The second receiving unit is configured to receive a discovery service response, where the discovery service response includes a set of services that the second device can provide externally.
  40. 根据权利要求31至39中任一项所述的通信设备,其中,所述通信设备还包括:The communication device according to any one of claims 31 to 39, wherein the communication device further comprises:
    第三接收单元,用于接收来自第三设备或云平台的第一操作信息,所述第一操作信息包括第二服务的待修改内容;The third receiving unit is configured to receive first operation information from a third device or cloud platform, where the first operation information includes the content to be modified of the second service;
    第三发送单元,用于基于所述第二服务的待修改内容向第二设备发送修改请求,所述修改请求中包括所述第一服务的待修改内容。The third sending unit is configured to send a modification request to the second device based on the content to be modified of the second service, where the modification request includes the content to be modified of the first service.
  41. 根据权利要求40所述的通信设备,其中,所述通信设备还包括:The communication device according to claim 40, wherein the communication device further comprises:
    第四接收单元,用于接收所述第二设备返回的所述第一服务的修改结果;A fourth receiving unit, configured to receive the modification result of the first service returned by the second device;
    第四发送单元,用于基于所述第一服务的修改结果向所述第三设备或所述云平台发送所述第二服务的修改结果。The fourth sending unit is configured to send the modification result of the second service to the third device or the cloud platform based on the modification result of the first service.
  42. 根据权利要求31至39中任一项所述的通信设备,其中,所述通信设备还包括:The communication device according to any one of claims 31 to 39, wherein the communication device further comprises:
    第五接收单元,用于接收来自第三设备的第二操作信息,所述第二操作信息用于请求获取第二服务;A fifth receiving unit, configured to receive second operation information from a third device, where the second operation information is used to request to obtain a second service;
    第五发送单元,用于基于所述第二操作信息向所述第三设备发送所述第二服务。The fifth sending unit is configured to send the second service to the third device based on the second operation information.
  43. 根据权利要求31至39中任一项所述的通信设备,其中,所述通信设备还包括:The communication device according to any one of claims 31 to 39, wherein the communication device further comprises:
    同步单元,用于基于第二设备中的第一服务的变化同步第二服务。The synchronization unit is configured to synchronize the second service based on the change of the first service in the second device.
  44. 根据权利要求43所述的通信设备,其中,所述同步单元具体用于:The communication device according to claim 43, wherein the synchronization unit is specifically configured to:
    接收来自第二设备或云平台的通知消息,所述通知消息中包括所述第二设备中发生变化的第一服务的内容;Receiving a notification message from a second device or a cloud platform, where the notification message includes the content of the first service that has changed in the second device;
    基于发生变化的第一服务的内容更新第二服务的内容。The content of the second service is updated based on the content of the changed first service.
  45. 根据权利要求44所述的通信设备,其中,所述通信设备还包括:The communication device according to claim 44, wherein the communication device further comprises:
    第六发送单元,用于向第三设备发送所述通知消息。The sixth sending unit is configured to send the notification message to a third device.
  46. 一种通信设备,包括:A communication device including:
    第一接收单元,用于接收订阅服务请求,所述订阅服务请求包括第一服务的订阅信息,所述第一服务在可发现服务集合中;A first receiving unit, configured to receive a subscription service request, where the subscription service request includes subscription information of a first service, and the first service is in a set of discoverable services;
    第一发送单元,用于发送应答消息,所述应答消息中包括所述第一服务的内容。The first sending unit is configured to send a response message, where the response message includes the content of the first service.
  47. 根据权利要求46所述的通信设备,其中,所述第一服务在通信设备的可发现服务集合中,所述通信设备的可发现服务集合包括所述通信设备能够对外提供的服务的集合。The communication device according to claim 46, wherein the first service is in a discoverable service set of the communication device, and the discoverable service set of the communication device includes a set of services that the communication device can provide externally.
  48. 根据权利要求46或47所述的通信设备,其中,所述第一接收单元具体用于接收来自于第一设备或云平台的订阅服务请求;The communication device according to claim 46 or 47, wherein the first receiving unit is specifically configured to receive a subscription service request from the first device or the cloud platform;
    所述第一发送单元具体用于向所述第一设备或所述云平台发送应答消息。The first sending unit is specifically configured to send a response message to the first device or the cloud platform.
  49. 根据权利要求46至48中任一项所述的通信设备,其中,所述通信设备还包括:The communication device according to any one of claims 46 to 48, wherein the communication device further comprises:
    第二接收单元,用于接收发现服务请求;The second receiving unit is configured to receive a discovery service request;
    第二发送单元,用于发送发现服务应答,所述发现服务应答中包括通信设备或云平台能够对外提供的服务的集合。The second sending unit is configured to send a discovery service response, where the discovery service response includes a collection of services that can be provided externally by the communication device or the cloud platform.
  50. 根据权利要求49所述的通信设备,其中,所述第二接收单元具体用于接收来自第一设备或云平台的发现服务请求;The communication device according to claim 49, wherein the second receiving unit is specifically configured to receive a discovery service request from the first device or the cloud platform;
    所述第二发送单元具体用于向所述第一设备或所述云平台发送发现服务应答。The second sending unit is specifically configured to send a discovery service response to the first device or the cloud platform.
  51. 根据权利要求46至50中任一项所述的通信设备,其中,所述通信设备还包括:The communication device according to any one of claims 46 to 50, wherein the communication device further comprises:
    第三接收单元,用于接收来自第一设备或云平台的修改请求,所述修改请求中包括所述第一服务的待修改内容;The third receiving unit is configured to receive a modification request from the first device or the cloud platform, where the modification request includes the content to be modified of the first service;
    修改单元,用于基于所述修改请求对所述第一服务进行修改;A modification unit, configured to modify the first service based on the modification request;
    第三发送单元,用于向所述第一设备或所述云平台发送所述第一服务的修改结果。The third sending unit is configured to send the modification result of the first service to the first device or the cloud platform.
  52. 根据权利要求46至51中任一项所述的通信设备,其中,所述通信设备还包括:The communication device according to any one of claims 46 to 51, wherein the communication device further comprises:
    第四发送单元,用于向第一设备发送通知消息,所述通知消息中包括所述通信设备中发生变化的第一服务的内容。The fourth sending unit is configured to send a notification message to the first device, where the notification message includes the content of the first service that has changed in the communication device.
  53. 根据权利要求46至52中任一项所述的通信设备,其中,所述通信设备中包括被订阅的第一服务与订阅所述第一服务的第一设备之间的对应关系。The communication device according to any one of claims 46 to 52, wherein the communication device includes a correspondence between the subscribed first service and the first device subscribed to the first service.
  54. 根据权利要求46至52中任一项所述的通信设备,其中,在多个第一设备订阅所述第一服务的情况下,所述通信设备中包括所述第一服务的多个实例,每个实例对应一个订阅所述第一服务的第一设备。The communication device according to any one of claims 46 to 52, wherein, in a case where a plurality of first devices subscribe to the first service, the communication device includes a plurality of instances of the first service, Each instance corresponds to a first device that subscribes to the first service.
  55. 一种云平台,包括:A cloud platform including:
    第一接收单元,用于接收来自第一设备订阅服务请求,所述订阅服务请求包括第一服务的订阅信息, 所述第一服务在可发现服务集合中;A first receiving unit, configured to receive a subscription service request from a first device, where the subscription service request includes subscription information of a first service, and the first service is in a set of discoverable services;
    第一发送单元,用于向所述第一设备发送应答消息,所述应答消息中包括所述第一服务的内容。The first sending unit is configured to send a response message to the first device, where the response message includes the content of the first service.
  56. 根据权利要求55所述的云平台,其中,所述第一服务在云平台的可发现服务集合中,所述云平台的可发现服务集合包括第二设备在所述云平台上发布的、能够对外提供的服务的集合。The cloud platform according to claim 55, wherein the first service is in a set of discoverable services of the cloud platform, and the set of discoverable services of the cloud platform includes a set of discoverable services published by a second device on the cloud platform and capable of A collection of services provided externally.
  57. 根据权利要求55或56所述的云平台,其中,所述云平台还包括:The cloud platform according to claim 55 or 56, wherein the cloud platform further comprises:
    第二接收单元,用于接收来自第一设备的发现服务请求;The second receiving unit is configured to receive a discovery service request from the first device;
    第二发送单元,用于向第一设备发送发现服务应答,所述发现服务应答中包括所述云平台能够对外提供的服务的集合。The second sending unit is configured to send a discovery service response to the first device, where the discovery service response includes a set of services that the cloud platform can provide externally.
  58. 根据权利要求55至57中任一项所述的云平台,其中,所述云平台还包括:The cloud platform according to any one of claims 55 to 57, wherein the cloud platform further comprises:
    第三接收单元,用于接收来自第二设备的服务发布消息,所述服务发布消息中包括所述第二设备能够对外提供的服务的集合;A third receiving unit, configured to receive a service release message from a second device, where the service release message includes a set of services that the second device can provide to the outside;
    发布单元,用于将所述第二设备能够对外提供的服务的集合发布到所述云平台的可发现服务集合中。The publishing unit is configured to publish the set of services that the second device can provide externally to the set of discoverable services of the cloud platform.
  59. 根据权利要求55至58中任一项所述的云平台,其中,所述云平台还包括:The cloud platform according to any one of claims 55 to 58, wherein the cloud platform further comprises:
    第四接收单元,用于接收来自第一设备的修改请求,所述修改请求中包括所述第一服务的待修改内容;A fourth receiving unit, configured to receive a modification request from the first device, where the modification request includes the content to be modified of the first service;
    第三发送单元,用于向第二设备转发所述修改请求;The third sending unit is configured to forward the modification request to the second device;
    第五接收单元,用于接收所述第二设备返回的所述第一服务的修改结果;A fifth receiving unit, configured to receive the modification result of the first service returned by the second device;
    第四发送单元,用于向所述第一设备发送所述第一服务的修改结果。The fourth sending unit is configured to send the modification result of the first service to the first device.
  60. 根据权利要求55至59中任一项所述的云平台,其中,所述云平台还包括:The cloud platform according to any one of claims 55 to 59, wherein the cloud platform further comprises:
    第六接收单元,用于接收第二设备的通知消息,所述通知消息中包括所述第二设备中发生变化的服务的内容;The sixth receiving unit is configured to receive a notification message from the second device, where the notification message includes the content of the changed service in the second device;
    第五发送单元,用于向第一设备转发所述通知消息。The fifth sending unit is configured to forward the notification message to the first device.
  61. 一种通信设备,包括:处理器和存储器,该存储器用于存储计算机程序,所述处理器用于调用并运行所述存储器中存储的计算机程序,执行如权利要求1至15中任一项所述的方法。A communication device, comprising: a processor and a memory, the memory is used to store a computer program, the processor is used to call and run the computer program stored in the memory, and execute any one of claims 1 to 15 Methods.
  62. 一种通信设备,包括:处理器和存储器,该存储器用于存储计算机程序,所述处理器用于调用并运行所述存储器中存储的计算机程序,执行如权利要求16至24中任一项所述的方法。A communication device, comprising: a processor and a memory, the memory is used to store a computer program, the processor is used to call and run the computer program stored in the memory, and execute any one of claims 16 to 24 Methods.
  63. 一种云平台,包括:处理器和存储器,该存储器用于存储计算机程序,所述处理器用于调用并运行所述存储器中存储的计算机程序,执行如权利要求25至30中任一项所述的方法。A cloud platform, comprising: a processor and a memory, the memory is used to store a computer program, the processor is used to call and run the computer program stored in the memory, and execute any one of claims 25 to 30 Methods.
  64. 一种芯片,包括:处理器,用于从存储器中调用并运行计算机程序,使得安装有所述芯片的设备执行如权利要求1至15中任一项所述的方法。A chip comprising: a processor, configured to call and run a computer program from a memory, so that a device installed with the chip executes the method according to any one of claims 1 to 15.
  65. 一种芯片,包括:处理器,用于从存储器中调用并运行计算机程序,使得安装有所述芯片的设备执行如权利要求16至24中任一项所述的方法。A chip comprising: a processor, configured to call and run a computer program from a memory, so that a device installed with the chip executes the method according to any one of claims 16 to 24.
  66. 一种芯片,包括:处理器,用于从存储器中调用并运行计算机程序,使得安装有所述芯片的设备执行如权利要求25至30中任一项所述的方法。A chip comprising: a processor, configured to call and run a computer program from a memory, so that a device installed with the chip executes the method according to any one of claims 25 to 30.
  67. 一种计算机可读存储介质,用于存储计算机程序,所述计算机程序使得计算机执行如权利要求1至15中任一项所述的方法。A computer-readable storage medium for storing a computer program that enables a computer to execute the method according to any one of claims 1 to 15.
  68. 一种计算机可读存储介质,用于存储计算机程序,所述计算机程序使得计算机执行如权利要求16至24中任一项所述的方法。A computer-readable storage medium for storing a computer program that enables a computer to execute the method according to any one of claims 16 to 24.
  69. 一种计算机可读存储介质,用于存储计算机程序,所述计算机程序使得计算机执行如权利要求25至30中任一项所述的方法。A computer-readable storage medium for storing a computer program that enables a computer to execute the method according to any one of claims 25 to 30.
  70. 一种计算机程序产品,包括计算机程序指令,该计算机程序指令使得计算机执行如权利要求1 至15中任一项所述的方法。A computer program product comprising computer program instructions that cause a computer to execute the method according to any one of claims 1 to 15.
  71. 一种计算机程序产品,包括计算机程序指令,该计算机程序指令使得计算机执行如权利要求16至24中任一项所述的方法。A computer program product comprising computer program instructions that cause a computer to execute the method according to any one of claims 16 to 24.
  72. 一种计算机程序产品,包括计算机程序指令,该计算机程序指令使得计算机执行如权利要求25至30中任一项所述的方法。A computer program product comprising computer program instructions that cause a computer to execute the method according to any one of claims 25 to 30.
  73. 一种计算机程序,所述计算机程序使得计算机执行如权利要求1至15中任一项所述的方法。A computer program that causes a computer to execute the method according to any one of claims 1 to 15.
  74. 一种计算机程序,所述计算机程序使得计算机执行如权利要求16至24中任一项所述的方法。A computer program that causes a computer to execute the method according to any one of claims 16 to 24.
  75. 一种计算机程序,所述计算机程序使得计算机执行如权利要求25至30中任一项所述的方法。A computer program that causes a computer to execute the method according to any one of claims 25 to 30.
PCT/CN2020/088454 2020-04-30 2020-04-30 Service sharing method, communication device, and cloud platform WO2021217631A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2020/088454 WO2021217631A1 (en) 2020-04-30 2020-04-30 Service sharing method, communication device, and cloud platform
CN202080095852.7A CN115053505B (en) 2020-04-30 2020-04-30 Service sharing method, communication equipment and cloud platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/088454 WO2021217631A1 (en) 2020-04-30 2020-04-30 Service sharing method, communication device, and cloud platform

Publications (1)

Publication Number Publication Date
WO2021217631A1 true WO2021217631A1 (en) 2021-11-04

Family

ID=78331649

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/088454 WO2021217631A1 (en) 2020-04-30 2020-04-30 Service sharing method, communication device, and cloud platform

Country Status (2)

Country Link
CN (1) CN115053505B (en)
WO (1) WO2021217631A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114172957A (en) * 2021-12-02 2022-03-11 Oppo广东移动通信有限公司 Subscription system, subscription method, electronic device, server, storage medium, and product

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015042979A1 (en) * 2013-09-30 2015-04-02 华为技术有限公司 Message processing method, and related apparatus and system
CN105897691A (en) * 2016-03-24 2016-08-24 美的集团股份有限公司 Method, apparatus, and system for connection of IoT device to network
CN106169967A (en) * 2016-07-14 2016-11-30 美的集团股份有限公司 A kind of subscription client, household electrical appliance and control method thereof
CN109995788A (en) * 2019-04-10 2019-07-09 华夏天信(北京)智能低碳技术研究院有限公司 A kind of equipment publication based on RED-MOS industry Internet of Things operating system and subscription design method
US10448454B1 (en) * 2016-03-21 2019-10-15 EMC IP Holding Company LLC Self-organizing distributed task coordination for ad-hoc computing environment
CN110731074A (en) * 2018-12-13 2020-01-24 Oppo广东移动通信有限公司 Subscription message processing method and device, computer equipment and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109495524B (en) * 2017-09-11 2022-03-04 华为云计算技术有限公司 Method, equipment and system for subscribing resources of Internet of things
CN110366144A (en) * 2018-04-09 2019-10-22 华为技术有限公司 A kind of method and device of subscription service

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015042979A1 (en) * 2013-09-30 2015-04-02 华为技术有限公司 Message processing method, and related apparatus and system
US10448454B1 (en) * 2016-03-21 2019-10-15 EMC IP Holding Company LLC Self-organizing distributed task coordination for ad-hoc computing environment
CN105897691A (en) * 2016-03-24 2016-08-24 美的集团股份有限公司 Method, apparatus, and system for connection of IoT device to network
CN106169967A (en) * 2016-07-14 2016-11-30 美的集团股份有限公司 A kind of subscription client, household electrical appliance and control method thereof
CN110731074A (en) * 2018-12-13 2020-01-24 Oppo广东移动通信有限公司 Subscription message processing method and device, computer equipment and storage medium
CN109995788A (en) * 2019-04-10 2019-07-09 华夏天信(北京)智能低碳技术研究院有限公司 A kind of equipment publication based on RED-MOS industry Internet of Things operating system and subscription design method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114172957A (en) * 2021-12-02 2022-03-11 Oppo广东移动通信有限公司 Subscription system, subscription method, electronic device, server, storage medium, and product
CN114172957B (en) * 2021-12-02 2024-05-14 Oppo广东移动通信有限公司 Subscription system, method, electronic device, server, storage medium and product

Also Published As

Publication number Publication date
CN115053505B (en) 2023-10-27
CN115053505A (en) 2022-09-13

Similar Documents

Publication Publication Date Title
KR102284317B1 (en) Communication method, core network device and access network device
WO2023020249A1 (en) Method and apparatus for obtaining edge service
US20180026958A1 (en) Fast-accessing method and apparatus
WO2023011210A1 (en) Method and apparatus for acquiring edge service
JP7095942B2 (en) Communication methods, communication devices, and communication systems
WO2023280121A1 (en) Method and apparatus for obtaining edge service
CN106211029A (en) Bluetooth Low Energy triggers NAN for further finding and connecting
JP7399188B2 (en) Method and apparatus for service discovery
WO2021068830A1 (en) Multicast transport method and apparatus
TW201947975A (en) Method for determining information and terminal devices and network devices
WO2020151584A1 (en) Network configuration method and communication apparatus
WO2023124457A1 (en) Method and apparatus for selecting network
WO2019075691A1 (en) Method and apparatus for controlling restricted ue capability, and computer storage medium
WO2020024865A1 (en) Session correspondence management method and terminal device
WO2022022322A1 (en) Method and device for accessing local network
WO2021217631A1 (en) Service sharing method, communication device, and cloud platform
WO2021233340A1 (en) Network registration method and apparatus
US20130148557A1 (en) Method and apparatus for enhanced discovery in peer-to-peer networks by synchronized discovery wake up
WO2023040781A1 (en) Communication method and communication apparatus
WO2023024931A1 (en) Inter-device communication method and apparatus
TW202007199A (en) Core network selection method and apparatus, terminal device and network device
WO2019218126A1 (en) Method for controlling network congestion, terminal device, and network device
WO2022160205A1 (en) Data transmission method, terminal devices, and network device
WO2021184219A1 (en) Method for connecting to cloud end, and terminal device
WO2022027375A1 (en) Cell access selection method, terminal device, and network device

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

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

Country of ref document: EP

Kind code of ref document: A1