Nothing Special   »   [go: up one dir, main page]

WO2020038443A1 - Bridging communication method and device - Google Patents

Bridging communication method and device Download PDF

Info

Publication number
WO2020038443A1
WO2020038443A1 PCT/CN2019/102039 CN2019102039W WO2020038443A1 WO 2020038443 A1 WO2020038443 A1 WO 2020038443A1 CN 2019102039 W CN2019102039 W CN 2019102039W WO 2020038443 A1 WO2020038443 A1 WO 2020038443A1
Authority
WO
WIPO (PCT)
Prior art keywords
resource
communication protocol
identifier
virtual server
bridge
Prior art date
Application number
PCT/CN2019/102039
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广东移动通信有限公司
Publication of WO2020038443A1 publication Critical patent/WO2020038443A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/26Special purpose or proprietary protocols or architectures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45504Abstract machines for programme code execution, e.g. Java virtual machine [JVM], interpreters, emulators
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4604LAN interconnection over a backbone network, e.g. Internet, Frame Relay
    • H04L12/462LAN interconnection over a bridge based backbone
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/08Protocols for interworking; Protocol conversion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/18Multiprotocol handlers, e.g. single devices capable of handling multiple protocols

Definitions

  • Embodiments of the present application relate to the field, and more particularly, to a method and device for bridge communication.
  • the bridge device can realize the conversion between different protocols, so that the communication between the devices using different protocols can be realized.
  • the bridge device can create a virtual OCF server for the OCF device, so that the OCF client can communicate with the virtual OCF server through the OCF protocol, and the virtual OCF server can communicate with the OCF server.
  • Non-OCF devices communicate with non-OCF protocols, so that communication between OCF devices and non-OCF devices can be achieved.
  • the embodiments of the present application provide a method and device for bridge communication, which can reduce the number of endpoints in the bridge device and reduce the complexity of the device bridge communication.
  • a bridge communication method including: a bridge device receiving a resource discovery request message sent by a first communication protocol client; the bridge device sending a resource discovery response message to the first communication protocol client,
  • the resource discovery response message includes information of a first communication protocol virtual server, and the information of the first communication protocol virtual server includes a uniform resource identifier of a platform resource, a uniform resource identifier of an equipment resource, and an endpoint, wherein the first The endpoint of the communication protocol virtual server is the same as the endpoint of the bridging device.
  • the uniform resource identifier of the platform resource of the first communication protocol virtual server is different from the uniform resource identifier of the platform resource of the bridging device.
  • the uniform resource identifier of the device resource of the communication protocol virtual server is different from the uniform resource identifier of the device resource of the bridge device.
  • a bridge communication method including: a first communication protocol client sends a resource discovery request message to a bridge device; the first communication protocol client receives a resource discovery response message sent by the bridge device,
  • the resource discovery response message includes information of a first communication protocol virtual server, and the information of the first communication protocol virtual server includes a uniform resource identifier of a platform resource, a uniform resource identifier of an equipment resource, and an endpoint, wherein the first The endpoint of the communication protocol virtual server is the same as the endpoint of the bridging device.
  • the uniform resource identifier of the platform resource of the first communication protocol virtual server is different from the uniform resource identifier of the platform resource of the bridging device.
  • the uniform resource identifier of the device resource of the communication protocol virtual server is different from the uniform resource identifier of the device resource of the bridge device.
  • a bridge communication method including: the bridge device receives a device registration request message sent by a second communication protocol device; and the bridge device creates a first communication protocol virtual server for the second communication protocol device Wherein the endpoint of the first communication protocol virtual server is the same as the endpoint of the bridging device, the uniform resource identifier of the platform resource of the first communication protocol virtual server and the uniform resource identifier of the platform resource of the bridging device Different identifiers, the uniform resource identifier of the device resource of the first communication protocol virtual server is different from the uniform resource identifier of the device resource of the bridge device.
  • a bridge communication method including: a bridge device receiving a resource discovery request message sent by a first communication protocol client; the bridge device sending a resource discovery response message to the first communication protocol client,
  • the resource discovery response message includes information of a pre-created proxy service resource and a first communication protocol virtual server, and the information of the pre-created proxy service resource and the first communication protocol virtual server includes a uniform resource identifier of a platform resource, a device A uniform resource identifier and endpoint of the resource, wherein the endpoint of the first communication protocol virtual server is the same as the endpoint of the bridge device, and the uniform resource identifier of the proxy service resource is the same as the platform resource of the bridge device
  • the resource identifier and the uniform resource identifier of the device resource are different;
  • the bridge device receives a resource operation request message sent by the first communication protocol client, and the resource operation request message includes a platform resource of the proxy service resource Uniform resource identifier and device resource A source identifier, and the resource operation request message further includes a
  • a bridge communication method including: a first communication protocol client sends a resource discovery request message to a bridge device; the first communication protocol client receives a resource discovery response message sent by the bridge device,
  • the resource discovery response message includes information of a pre-created proxy service resource and a first communication protocol virtual server, and the information of the pre-created proxy service resource and the first communication protocol virtual server includes a uniform resource identifier of a platform resource, a device The uniform resource identifier and endpoint of the resource, where the endpoint of the first communication protocol virtual server is the same as the endpoint of the bridge device, and the uniform resource identifier of the proxy service resource is the same as the platform resource of the bridge device
  • the resource identifier and the uniform resource identifier of the device resource are different;
  • the first communication protocol client sends a resource operation request message to the bridge device, and the resource operation request message includes the platform resource of the proxy service resource Uniform Resource Identifier and Uniform Resource for Device Resources Identifier, the resource operation request message further includes target identification
  • a bridge communication method including: the bridge device receives a device registration request message sent by a second communication protocol device; the bridge device creates a first communication protocol virtual server for the second communication protocol device And a proxy service resource, wherein the endpoint of the first communication protocol virtual server is the same as the endpoint of the bridge device, the uniform resource identifier of the proxy service resource and the uniform resource identifier of the platform resource of the bridge device, The uniform resource identifiers of the device resources are all different, and the proxy service resource is used to proxy a request of the first communication protocol client to the first communication protocol virtual server.
  • a bridging device for performing the method described in any of the optional implementation manners in the first aspect or the third aspect.
  • the bridging device includes a functional module for performing the method described in any one of the optional implementation manners of the first aspect, the third aspect, the fourth aspect, or the sixth aspect.
  • a first communication protocol device is provided, which is configured to perform the method described in the foregoing second aspect or any optional implementation manner in the fourth aspect.
  • the bridging device includes a functional module for performing the method described in the second aspect or any optional implementation manner of the fifth aspect.
  • a bridge 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 methods in the implementation manners of the first aspect, the third aspect, the fourth aspect, or the sixth aspect.
  • a first communication protocol 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 method in the foregoing second aspect or the implementation manners in the fifth aspect.
  • a chip for implementing the method in any possible implementation manner in the first aspect or the third aspect.
  • the chip includes a processor for invoking and running a computer program from the memory, so that the device installed with the chip executes any possible one of the first aspect, the third aspect, the fourth aspect, or the sixth aspect described above. Method in implementation.
  • a chip for implementing the method in any of the possible implementation manners in the second aspect or the fourth aspect.
  • the chip includes a processor for invoking and running a computer program from the memory, so that the device installed with the chip executes the method in any possible implementation manner in the second aspect or the fifth aspect described above.
  • a computer-readable storage medium for storing a computer program that causes a computer to execute any possible implementation manner of the first aspect, the third aspect, the fourth aspect, or the sixth aspect described above. Method.
  • a computer-readable storage medium for storing a computer program that causes a computer to execute the method in any of the possible implementation manners of the second aspect or the fifth aspect described above.
  • a computer program product including computer program instructions that cause a computer to execute any of the possible implementation manners in the first aspect, the third aspect, the fourth aspect, or the sixth aspect described above. method.
  • a computer program product including computer program instructions that cause a computer to execute the method in any of the possible implementation manners of the second aspect or the fifth aspect described above.
  • a seventeenth aspect provides a computer program that, when run on a computer, causes the computer to execute the method in any of the possible implementation manners of the first aspect, the third aspect, the fourth aspect, or the sixth aspect described above.
  • a computer program is provided that, when run on a computer, causes the computer to perform the method in any of the possible implementations of the second or fifth aspect described above.
  • the endpoints of all the virtual server end on the bridge device are the same as the endpoints of the bridge device.
  • the number of endpoints on the bridge device will be reduced, which can reduce the maintenance cost of the endpoint by the bridge device.
  • the platform resources and device resources of the virtual server no longer use fixed uniform resource identifiers.
  • the unified resource identifiers of the platform resources of the virtual server and the unified resources of the platform resources of the bridge device are used.
  • the identifiers are set differently, and the uniform resource identifier of the device resource of the virtual server and the uniform resource identifier of the device resource of the bridge device are set differently.
  • the endpoint is related to the communication channel. After the endpoint is reduced, the communication channel between the client established by the bridge device and the bridge device will be reduced. The reduction of the communication channel can reduce the resource overhead, and the bridge device only needs to maintain one communication channel. Reduce the communication complexity of bridge devices.
  • FIG. 1 is a schematic diagram of communication between a bridge device and an OCF device according to an embodiment of the present application.
  • FIG. 2 is a schematic flowchart of a bridge communication method according to an embodiment of the present application.
  • FIG. 3 is a schematic flowchart of another bridge communication method according to an embodiment of the present application.
  • FIG. 4 is a schematic flowchart of another bridge communication method according to an embodiment of the present application.
  • FIG. 5 is a schematic flowchart of another bridge communication method according to an embodiment of the present application.
  • FIG. 6 is a schematic flowchart of another bridge communication method according to an embodiment of the present application.
  • FIG. 7 is a schematic flowchart of another bridge communication method according to an embodiment of the present application.
  • FIG. 8 is a schematic block diagram of a bridge device according to an embodiment of the present application.
  • FIG. 9 is a schematic block diagram of a first communication protocol device according to an embodiment of the present application.
  • FIG. 10 is a schematic block diagram of another bridge device according to an embodiment of the present application.
  • FIG. 11 is a schematic block diagram of another bridge device according to an embodiment of the present application.
  • FIG. 12 is a schematic block diagram of another first communication protocol device according to an embodiment of the present application.
  • FIG. 13 is a schematic block diagram of another bridge device according to an embodiment of the present application.
  • FIG. 14 is a schematic structural diagram of a communication device according to an embodiment of the present application.
  • FIG. 15 is a schematic structural diagram of a chip according to an embodiment of the present application.
  • FIG. 16 is a schematic block diagram of a communication system according to an embodiment of the present application.
  • the bridge device can realize the conversion between different protocols, so that the communication between the devices using different protocols can be realized.
  • the bridge device can create a virtual OCF server for the OCF device, so that the OCF client can communicate with the virtual OCF server through the OCF protocol, and the virtual OCF server can communicate with the non-OCF device through the non-OCF protocol. This allows communication between OCF devices and non-OCF devices.
  • the bridge device can also implement conversion between any multiple communication protocol devices.
  • the bridge device can implement communication between a restricted application protocol (CoAP) device and a Bluetooth device, and can also implement communication between a wifi device and a zigbee device.
  • CoAP restricted application protocol
  • the communication protocols in the embodiments of the present application may also be other protocols generated for unifying the Internet of Things.
  • the bridge device may only support communication between two different communication protocol devices, and may also support communication between multiple different communication protocol devices at the same time.
  • OCF is an emerging technology standard organization for the Internet of Things application layer. In order to achieve true interconnection of all things, OCF hopes to formulate a unified Internet of Things standard, to achieve safe and reliable device discovery and connection mechanisms across different operating systems and platforms.
  • OCF provides a universal representational state transfer (Restful) architecture for IoT applications, devices, and platforms.
  • OCF's Restful architecture characterizes IoT entities and their service capabilities as OCF resources.
  • all physical entities can be described as resources and exposed to the outside world in the form of resources.
  • the state of the entity is described by resource representation.
  • Each resource has its own uniform resource identifier (URI ) And the types of interfaces that can be supported.
  • the entity that provides the resource is the OCF server, and the entity that accesses the resource is the OCF client.
  • the mobile application of the smartphone that obtains the indoor environment status data is an OCF client
  • the sensor that monitors the indoor environment status data is an OCF server.
  • the business interaction between the OCF client and the OCF server is achieved through the operation methods of creating, reading, updating, deleting, or notifying these OCF resources.
  • OCF resources include: resource URI, resource type, interface, etc.
  • resource URI resource URI
  • resource type resource type
  • interface etc.
  • specific definitions are as follows.
  • Resource URI It is identified by "href” in the OCF resource characterization and provides the address of the OCF server resource. The value of "href” is a specific resource URI. The OCF client accesses the resources of the OCF server through the resource URI.
  • Resource type It is represented by "rt" in OCF resource characterization, which indicates the type of resource.
  • OCF To facilitate the discovery of OCF equipment and resources, OCF also defines core resources that are supported by OCF equipment.
  • OCF core resources include platform resources and device resources.
  • a platform resource can include one or more OCF device instances.
  • Platform resources are host resources for device instance resources.
  • Device resources are used to describe the common information of all OCF device instance resources on a platform resource.
  • Platform resource Provides information about the platform to which the OCF device belongs.
  • the URI of the platform resource is fixed to "/ oic / p", and the resource type of the platform resource is "oic.wk.p”.
  • Device resource Provides information about specific OCF devices.
  • the URI of the device resource is fixed at "/ oic / d”
  • the resource type of the device resource is "oic.wk.d”.
  • the resource type of the device resource may also include one or more resource types related to device characteristics.
  • the resource type of the bridge device includes “oic.wk.d” and “oic.d.bridge”, which means that this device supports the bridge resource type.
  • the resource type of the lamp includes “oic.wk.d” and “oic.d.light”, which indicates that the device supports the resource type of the lamp.
  • each OCF server needs to have an endpoint.
  • Each OCF device must be associated with at least one endpoint for sending and receiving messages.
  • the endpoint can be understood as the communication address of the communication protocol, which is used by the OCF device to exchange messages.
  • the endpoint can be an IP address and a UDP port number.
  • the OCF client may send a resource operation request message to the OCF server.
  • the resource operation request message may carry a resource operation method.
  • the resource operation method may be, for example, operations such as creating a resource, reading a resource, updating a resource, or deleting a resource.
  • the OCF server may return a resource operation response message to the OCF client, and the resource operation response message carries a representation of the requested resource.
  • Non-OCF devices refer to IoT devices that do not support the OCF standard protocol. For example, zigbee devices, z-wave devices, Bluetooth devices, etc., connecting non-OCF devices to the OCF system can realize communication between non-OCF devices and OCF devices, and expand the scope of interconnection and interoperability of IoT devices.
  • OCF defines a device bridging communication mechanism.
  • OCF bridging devices communication between OCF devices and non-OCF devices can be realized.
  • the OCF bridge device can map a non-OCF device to a virtual OCF server and perform conversion between the OCF protocol and the non-OCF protocol, so that the OCF client can communicate with the non-OCF device, thereby realizing communication between the OCF device and the non-OCF device.
  • the OCF bridge device can map a non-OCF device to a virtual OCF server 1 and a non-OCF device to a virtual OCF server 2.
  • the client can communicate with the virtual OCF server 1 and the virtual OCF server 2 through the OCF protocol, and the bridge device can convert the request from the OCF client to a non-OCF protocol instruction and send it to the non-OCF device 1 and the non-OCF device 2.
  • the URIs of the platform resources and device resources of the virtual OCF server 1, virtual OCF server 2, and the bridge device are the same.
  • the URIs of the platform resources of the virtual OCF server 1 and the virtual OCF server 2 are "/ oic / p"
  • the URIs of the device resources are "/ oic / d”.
  • virtual OCF server 1 and virtual OCF server 2 must have their own endpoints.
  • OCF bridge devices, virtual OCF server 1, and virtual OCF server 2 have different endpoints. As shown in FIG. 1, the endpoint of the OCF bridge device is endpoint 1, the endpoint of virtual OCF server 1 is endpoint 2, and the endpoint of virtual OCF server 2 is endpoint 3.
  • the endpoint of the bridge device can be "coap: // [fe80 :: b1d6]: 44444"
  • the endpoint of the virtual OCF server 1 can be "coap: // [2001: db8: b :: c2e5]: 11111"
  • the endpoint of the virtual OCF server 2 can be "coap: // [2001: db8: b :: c2e5]: 22222".
  • the following uses the non-OCF device 1 as a light and the non-OCF device 2 as an oven as an example to describe the resource characterization of the bridge device, the virtual OCF server 1 and the virtual OCF server 2.
  • the following resource characterization is only an example, and does not limit the embodiments of the present application.
  • the URI of the platform resource of the bridge device is "/ oic / p"
  • the resource type of the platform resource is "oic.wk.p”
  • the interface of the platform resource is "oic.if.r” and “oic.if.baseline”
  • the endpoint of the platform resource is "coap: // [fe80 :: b1d6]: 44444".
  • the URI of the device resource of the bridge device is "/ oic / d"
  • the resource type of the device resource is "oic.wk.d” and “oic.d.bridge”
  • the interface of the device resource is "oic.if.r” and “Oic.if.baseline”
  • the endpoint of the device resource is "coap: // [fe80 :: b1d6]: 44444".
  • the resource representation of the virtual OCF server 1 is as follows:
  • the platform resource URI of the virtual OCF server 1 is "/ oic / p", the resource type of the platform resource is “oic.wk.p”, and the interface of the platform resource is "oic.if.r” and “oic.if.” baseline ", the endpoint of the platform resource is” coap: // [2001: db8: b :: c2e5]: 11111 ".
  • the device resource URI of the virtual OCF server 1 is "/ oic / d"
  • the resource type of the device resource is "oic.wk.d” and “oic.d.light”
  • the interface of the device resource is "oic.if.” r “and” oic.if.baseline ", the endpoint of the device resource is” coap: // [2001: db8: b :: c2e5]: 11111 ".
  • the device instance resource URI of virtual OCF server 1 is "/ myLightSwitch", the resource type of the device instance resource is “oic.r.switch.binary”, and the interface of the device instance resource is "oic.if.a” and “oic .if.baseline ", the endpoint of the device instance resource is” coap: // [2001: db8: b :: c2e5]: 11111 ".
  • the resource representation of the virtual OCF server 2 is as follows:
  • the platform resource URI of the virtual OCF server 2 is "/ oic / p", the resource type of the platform resource is “oic.wk.p”, and the interface of the platform resource is "oic.if.r” and “oic.if.” baseline ", the endpoint of the platform resource is” coap: // [2001: db8: b :: c2e5]: 22222 ".
  • the URI of the device resource of the virtual OCF service 2 is "/ oic / d"
  • the resource type of the device resource is "oic.wk.d” and “oic.d.oven”
  • the interface of the device resource is "oic.if.r” "And” oic.if.baseline ", the endpoint of the device resource is” coap: // [2001: db8: b :: c2e5]: 22222 ".
  • the device instance resource URI of the virtual OCF server 2 is "/ myOven"
  • the resource type of the device instance resource is "oic.r.switch.binary” and “oic.r.temperature”
  • the interface of the device instance resource is "oic” .if.a “and” oic.if.baseline "
  • the endpoint of the device instance resource is" coap: // [2001: db8: b :: c2e5]: 22222 ".
  • each virtual OCF server mapped on the bridge device has its own endpoint, and the endpoint of the virtual OCF server is different from the endpoint of the bridge device.
  • the OCF bridge device needs to maintain a large number of endpoints, which results in a higher cost of endpoint maintenance.
  • the endpoints are related to the transmission protocol. The more endpoints, the higher the communication complexity of the device.
  • IP Internet protocol
  • UDP user datagram protocol
  • the embodiments of the present application provide a method for bridging communication, which can reduce the maintenance cost of endpoints and reduce the complexity of device communication.
  • the method for bridging communication in the embodiment of the present application is described in detail below with reference to FIG. 2. As shown in FIG. 2, the method includes steps S210-S220.
  • the bridge device receives a resource discovery request message sent by the first communication protocol client.
  • the first communication protocol client may mean that the client can communicate with the bridge device through the first communication protocol.
  • the first communication protocol client may be a client in the Internet of Things.
  • the resource discovery request message can be used to discover all resources on the bridge device.
  • the resource discovery request message may be used to discover resource information of all virtual servers on the bridge device.
  • the bridge device when the bridge device receives the resource discovery request message sent by the first communication protocol client, it may send related information of all the first communication protocol virtual servers on the bridge device to the first communication protocol client.
  • the embodiment of the present application does not specifically limit the first communication protocol and the second communication protocol, as long as the first communication protocol and the second communication protocol are two different protocols.
  • the first communication protocol may be a communication protocol in the Internet of Things
  • the second communication protocol is a communication protocol in a non-Internet of Things.
  • the first communication protocol may be a zigbee protocol
  • the second communication protocol may be a Bluetooth protocol.
  • the first communication protocol may be an OCF protocol
  • the second communication protocol may be a non-OCF protocol. That is, the first communication protocol client may be an OCF client, the second communication protocol device may be a non-OCF device, and the first communication protocol virtual server may be a virtual OCF server.
  • the non-OCF protocol may be zigbee, z-wave, or Bluetooth.
  • the bridge device When the bridge device creates the first communication protocol virtual server for the second communication protocol device, it can create platform resources, device resources, and endpoints for the second communication protocol device. In order to reduce the communication complexity, the bridging device may set the same endpoint for the created virtual server, and distinguish the different second communication protocol devices through different URIs of platform resources and device resources.
  • the following uses the first communication protocol as the OCF protocol as an example to describe the resource information and endpoint information of the bridge device and the virtual OCF server.
  • the platform resource URI of the virtual OCF server no longer uses the fixed "/ oic / p", and the device resource of the virtual OCF server no longer uses the fixed "/ oic / d".
  • the virtual OCF server can use platform resource and device resource URIs different from the bridge device.
  • the embodiments of the present application may not specifically limit them.
  • the bridge device may number the created virtual OCF server, and add the number sequence to the URI of the platform and device resources of the virtual OCF server, so that different platform resources and device resources can be distinguished by the URI.
  • the bridge resource can add the device identifier of the non-OCF device to the mapped resource of the platform resource and device resource of the virtual OCF server.
  • Device identification so that different platform resources and device resources can be distinguished by the device identification of non-OCF devices.
  • the device identifier of the non-OCF device 1 is "light_device_id", and the server mapped by the non-OCF device 1 on the bridge device is the virtual OCF server 1, and the URI of the platform resource of the virtual OCF server 1 can be "/ di / light_device_id / oic / p ", the URI of the device resource of the virtual OCF server 1 may be” / di / light_device_id / oic / d ".
  • the device identifier of the non-OCF device 2 is "/ di / oven_device_id", and the server mapped by the non-OCF device 2 on the bridge device is the virtual OCF server 2.
  • the URI of the platform resource of the virtual OCF server 2 can be "/ di / oven_device_id / oic / d ", the URI of the device resource of the virtual OCF server 2 may be” / di / oven_device_id / oic / d ".
  • the bridge device may send relevant information of all virtual servers on the bridge device to the first communication protocol client.
  • the bridge device sends a resource discovery response message to the first communication protocol client, and the resource discovery response message includes information of the first communication protocol virtual server.
  • the information of the first communication protocol virtual server includes a URI of an endpoint platform resource and / or a device resource URI of the first communication protocol virtual server.
  • the information of the first communication protocol virtual server may further include an interface and a resource type of the first communication protocol virtual server.
  • the information of the virtual OCF server includes the endpoint of the virtual OCF server, the URI of the platform resource, and / or the URI of the device resource.
  • the URI of the platform resource and / or the URI of the device resource please refer to the description above. To avoid repetition, details are not described here.
  • the information of the virtual OCF server further includes at least one of the following information: the interface and resource type of the virtual OCF server.
  • the interface of the virtual OCF server may be, for example, "oic.if.baseline”.
  • the resource type of the platform resource of the virtual OCF server may be, for example, "oic.wk.p".
  • the resource types of the device resources may be, for example, “oic.wk.d” and “oic.d.light”.
  • the resource types of the device resources may be, for example, "oic.wk.d” and "oic.d.oven".
  • the endpoints of all virtual server ends on the bridge device are the same as the endpoints of the bridge device.
  • the number of endpoints on the bridge device will be reduced, which can reduce the maintenance cost of the bridge device to the endpoint.
  • the platform resources and device resources of the virtual server no longer use fixed URIs. Instead, the URIs of the platform resources of the virtual server and the URIs of the platform resources of the bridge device are set to be different. The URI of the device resource at the end and the URI of the device resource of the bridge device are set differently.
  • the number of endpoints in the bridge device can be reduced, and thus the communication complexity of the bridge device can be reduced.
  • the endpoint is used for transmission at the network layer.
  • the endpoint is related to the communication channel. After the endpoint on the bridge device is reduced, the communication channel between the client and the bridge device established by the bridge device will be reduced.
  • the reduction of the communication channel can reduce resources Overhead, reducing the complexity of the network layer. And the bridge device only needs to maintain one communication channel, so that the communication complexity of the bridge device can be reduced.
  • a bridge device when it establishes a communication channel, it can establish a transmission channel according to a transmission protocol. For example, for a client using the COAP protocol, the communication channel between the client established by the bridge device and the bridge device is established based on the COAP protocol.
  • the resources of the first communication protocol virtual server further include a device instance resource
  • the resource response message may include a URI of the device instance resource
  • the bridge device may receive a resource operation request message sent by the first communication protocol client, and the resource operation request message includes the URI of the device instance resource of the first communication protocol virtual server.
  • the URI of the device instance resource is used to identify the device requested by the first communication protocol client.
  • the bridge device may receive a resource operation request message sent by the OCF client.
  • the resource operation request message may include a URI of a device instance resource of the virtual OCF server, and the URI of the instance resource is used to identify the device requested by the OCF client.
  • the resource operation request message may further include at least one of the following information: an interface of the device instance resource, a resource type of the device instance resource, a resource operation method, and an attribute value of the device instance resource.
  • the interface of the device instance resource can be “oic.if.a” and “oic.if.baseline”
  • the resource type of the device instance resource can be “oic.r.switch.binary” ".
  • the interface of the device instance resource can be "oic.if.a” and “oic.if.baseline”
  • the resource type of the device instance resource can be "oic.r.switch.binary” and "Oic.r.temperature”.
  • the resource operation method includes at least one of the following methods: creating a resource, reading a resource, updating a resource, and deleting a resource.
  • the attribute value of the device instance resource refers to the operation data of the resource.
  • the property value "value" of the device instance resource can be "true” or "false”.
  • the property value is "true” it means that the light is turned on. Turn off the lights.
  • the bridge device may determine the second communication protocol device requested by the first communication protocol client according to the URI of the device instance resource. Then, the operation request message may be converted into a protocol message of the first communication protocol device, and the converted protocol message is sent to the first communication protocol device.
  • the protocol message may also be a device instruction of the second communication protocol device.
  • the bridge device can convert the resource operation request message into a device instruction of the non-OCF device 1, and send the converted device instruction to Non-OCF equipment 1.
  • the bridge device can convert the resource operation request message into a device instruction of the non-OCF device 2, and send the converted device instruction to the non-OCF Device 2.
  • the device identifier may be added to the URI of the instance resource of the first communication protocol virtual server.
  • the information of the first communication protocol virtual server may be created by the bridge device, or may be obtained by the bridge device from other devices.
  • the method in FIG. 2 may further include: the bridge device receives the connection establishment request message sent by the second communication protocol device, and the bridge device creates a first communication protocol virtual server for the second communication protocol device.
  • the bridging device can create a first communication protocol virtual server for the second communication protocol device, realize the conversion between the first communication protocol and the second communication protocol, and establish the first communication protocol device. And a second communication protocol device.
  • the device identifier can uniquely identify a non-OCF device, and the device identifier can identify a non-OCF device.
  • connection establishment request message may be a device registration request message, or may be another message for establishing a connection with the bridge device.
  • FIG. 3 is a schematic flowchart of another bridge communication method according to an embodiment of the present application.
  • the method in FIG. 3 includes steps S310-S320.
  • the first communication protocol client sends a resource discovery request message to the bridge device.
  • the resource discovery request message can be used to discover resources on the bridge device.
  • the resource discovery request message may be used to discover resource information of all virtual servers on the bridge device.
  • the first communication protocol client may mean that the client can communicate with the bridge device through the first communication protocol.
  • the first communication protocol may be a communication protocol in the Internet of Things.
  • the first communication protocol may be an OCF protocol.
  • the first communication protocol client receives a resource discovery response message sent by the bridge device, and the resource discovery response message includes information of the first communication protocol virtual server created by the bridge device.
  • the information of the first communication protocol virtual server includes an endpoint of the first communication protocol virtual server, a URI of a platform resource, a URI of a device resource, and the like.
  • the endpoint of the first communication protocol virtual server is the same as the endpoint of the bridging device, the uniform resource identifier of the platform resource of the first communication protocol virtual server and the uniform resource identifier of the platform resource of the bridging device
  • the uniform resource identifier of the device resource of the first communication protocol virtual server is different from the uniform resource identifier of the device resource of the bridging device
  • the first communication protocol is different from the second communication protocol.
  • the information of the first communication protocol virtual server may further include an interface and a resource type of the first communication protocol virtual server.
  • the embodiment of the present application does not specifically limit the first communication protocol and the second communication protocol, as long as the first communication protocol and the second copper communication protocol are two different protocols.
  • the first communication protocol may be a communication protocol in the Internet of Things
  • the second communication protocol is a communication protocol in a non-Internet of Things.
  • the first communication protocol is the zigbee protocol
  • the second communication protocol is the Bluetooth protocol.
  • the first communication protocol may be an OCF protocol
  • the second communication protocol may be a non-OCF protocol. That is, the first communication protocol client may be an OCF client, the second communication protocol device may be a non-OCF device, and the first communication protocol virtual server may be a virtual OCF server.
  • the non-OCF protocol may be zigbee, z-wave, or Bluetooth.
  • the bridge device When the bridge device creates the first communication protocol virtual server for the second communication protocol device, it can create platform resources, device resources, and endpoints for the second communication protocol device. In order to reduce the communication complexity, the bridging device may set the same endpoint for the created virtual server, and distinguish the different second communication protocol devices through different URIs of platform resources and device resources.
  • the following uses the first communication protocol as the OCF protocol as an example to describe the resource information and endpoint information of the bridge device and the virtual OCF server.
  • the platform resource URI of the virtual OCF server no longer uses the fixed "/ oic / p", and the device resource of the virtual OCF server no longer uses the fixed "/ oic / d".
  • the virtual OCF server can use platform resource and device resource URIs different from the bridge device.
  • the embodiments of the present application may not specifically limit them.
  • the URIs of the platform resources and device resources of the virtual OCF server can be numbered in sequence, that is, the URIs of the platform resources and device resources of the virtual OCF server include the numbering sequence, so that different platform resources and devices can be distinguished by the URI. Resources.
  • the URIs of the platform resources and device resources of the virtual OCF server include device identifiers of non-OCF devices. Since different non-OCF devices have different device identifiers, different platforms can be distinguished by device identifiers of non-OCF devices Resources and equipment resources.
  • the device identifier of the non-OCF device 1 is "light_device_id", and the server mapped by the non-OCF device 1 on the bridge device is the virtual OCF server 1, and the URI of the platform resource of the virtual OCF server 1 can be "/ di / light_device_id / oic / p ", the URI of the device resource of the virtual OCF server 1 may be” / di / light_device_id / oic / d ".
  • the device identifier of the non-OCF device 2 is "/ di / oven_device_id", and the server mapped by the non-OCF device 2 on the bridge device is the virtual OCF server 2.
  • the URI of the platform resource of the virtual OCF server 2 can be "/ di / oven_device_id / oic / d ", the URI of the device resource of the virtual OCF server 2 may be” / di / oven_device_id / oic / d ".
  • the resource response message may include information about resources of all virtual OCF server ends on the bridge device.
  • the OCF client After receiving the resource response message, the OCF client can select the resources of the virtual OCF server that you want to operate.
  • the endpoints of all virtual server ends on the bridge device are the same as the endpoints of the bridge device.
  • the number of endpoints on the bridge device will be reduced, which can reduce the maintenance cost of the bridge device to the endpoint.
  • the platform resources and device resources of the virtual server no longer use fixed URIs. Instead, the URIs of the platform resources of the virtual server and the URIs of the platform resources of the bridge device are set to be different. The URI of the device resource at the end and the URI of the device resource of the bridge device are set differently.
  • the number of endpoints in the bridge device can be reduced, and thus the communication complexity of the bridge device can be reduced.
  • the endpoint is used for transmission at the network layer.
  • the endpoint is related to the communication channel. After the endpoint on the bridge device is reduced, the communication channel between the client and the bridge device established by the bridge device will be reduced.
  • the reduction of the communication channel can reduce resources Overhead, reducing the complexity of the network layer. And the bridge device only needs to maintain one communication channel, so that the communication complexity of the bridge device can be reduced.
  • the URI of the platform resource and the device resource of the first communication protocol virtual server includes the device identification of the second communication protocol device.
  • the device identifiers of the second communication protocol devices can distinguish different platform resources and device resources.
  • the resources of the first communication protocol virtual server also include device instance resources
  • the resource response message may also include the URI of the device instance resource.
  • the first communication protocol client may select the platform resource and device resource to be accessed according to the platform resource and device resource information carried in the response message, and may For device instance resource information, select the device instance resource that you want to operate.
  • the first communication protocol client may select the second communication that it wants to operate according to the information carried in the resource response message. Protocol device, and then the first communication protocol client may send a resource operation request message to the first communication protocol virtual server corresponding to the selected second communication protocol device.
  • the resource operator request message includes the URI of the device instance resource.
  • the resource operation request message may further include at least one of the following information: an interface of the device instance resource, a resource type of the device instance resource, a resource operation method, and an attribute value of the device instance resource.
  • the interface of the device instance resource can be “oic.if.a” and “oic.if.baseline”
  • the resource type of the device instance resource can be “oic.r.switch.binary” ".
  • the interface of the device instance resource can be "oic.if.a” and “oic.if.baseline”
  • the resource type of the device instance resource can be "oic.r.switch.binary” and "Oic.r.temperature”.
  • the resource operation method includes at least one of the following methods: creating a resource, reading a resource, updating a resource, and deleting a resource.
  • the attribute value of the device instance resource refers to the operation data of the resource.
  • the property value "value" of the device instance resource can be "true” or "false”.
  • the property value is "true” it means that the light is turned on. Turn off the lights.
  • FIG. 4 is a schematic flowchart of another bridge device communication method according to an embodiment of the present application.
  • the method of FIG. 4 includes steps S410-S420.
  • the method in FIG. 4 can be used in combination with the methods in FIGS. 2 and 3.
  • the method in FIG. 4 can be used in combination with the methods in FIGS. 2 and 3.
  • FIG. 4 For a detailed description of the method in FIG. 4, reference may be made to the description in the methods in FIG. 2 and FIG. 3 above. To avoid repetition, details are not described herein.
  • the bridge device receives a device registration request message sent by the second communication protocol device.
  • the device registration request message may also be a connection establishment request message.
  • connection establishment request message may include a device identifier of the second communication protocol device.
  • the bridge device creates a first communication protocol virtual server for the second communication protocol device, wherein the endpoint of the first communication protocol virtual server is the same as the endpoint of the bridge device, and the first communication protocol
  • the uniform resource identifier of the platform resource of the virtual server is different from the uniform resource identifier of the platform resource of the bridge device.
  • the uniform resource identifier of the device resource of the first communication protocol virtual server and the device resource of the bridge device are different. Uniform resource identifiers are different.
  • the bridge device creates information of the first communication protocol virtual server.
  • the information of the first communication protocol virtual server includes a uniform resource identifier of the platform resource and a uniform resource identifier of the device resource. Breaks and endpoints.
  • FIG. 5 is a schematic flowchart of another bridge device communication method according to an embodiment of the present application.
  • the method in FIG. 5 includes steps S510-S550.
  • the bridge device receives a resource discovery request message sent by the first communication protocol client.
  • the resource discovery request message is mainly used to discover resources on the bridge device.
  • the resource discovery request message may be used to discover resource information of all virtual servers on the bridge device.
  • the first communication protocol client may mean that the client can communicate with the bridge device through the first communication protocol.
  • the first communication protocol may be a protocol in the Internet of Things.
  • the first communication protocol may be an OCF protocol.
  • the bridging device sends a resource discovery response message to the first communication protocol client, and the resource discovery response message includes information of a pre-created proxy service resource and information of the first communication protocol virtual server.
  • the endpoint of the first communication protocol virtual server is the same as the endpoint of the bridge device, the uniform resource identifier of the proxy service resource, the uniform resource identifier of the platform resource of the bridge device, and the uniform resource of the device resource
  • the identifiers are all different.
  • the first communication protocol virtual server may be a server mapped by the second communication protocol device on the bridge device, and the first communication protocol is different from the second communication protocol.
  • the embodiment of the present application does not specifically limit the first communication protocol and the second communication protocol, as long as the first communication protocol and the second communication protocol are two different protocols.
  • the first communication protocol may be a communication protocol in the Internet of Things
  • the second communication protocol is a communication protocol in a non-Internet of Things.
  • the first communication protocol is the zigbee protocol
  • the second communication protocol is the Bluetooth protocol.
  • the first communication protocol may be an OCF protocol
  • the second communication protocol may be a non-OCF protocol. That is, the first communication protocol client may be an OCF client, the second communication protocol device may be a non-OCF device, and the first communication protocol virtual server may be a virtual OCF server.
  • the non-OCF protocol may be zigbee, z-wave, or Bluetooth.
  • the resource discovery response message may include information about all the proxy service resources on the bridge device and information about the resources of the first communication protocol virtual server.
  • a bridge device can include one proxy service resource, or it can include multiple proxy service resources.
  • the proxy service resource is used to proxy a request for a resource on the first communication protocol virtual server.
  • the proxy service resource can proxy requests for all resources of the first communication protocol virtual server on the bridge device.
  • one of the proxy service resources may proxy a request for a part of the first communication protocol virtual server resource on the bridge device.
  • the proxy service resource may be created by the bridge device before leaving the factory, or it may be created by the bridge device after receiving the connection establishment request message sent by the second communication protocol device.
  • connection establishment request message may be a device registration request message.
  • the information of the proxy service resource may include URI information of the proxy service resource, and the URI of the proxy service resource is different from the device resource and the platform resource of the bridge device.
  • the URI of the proxy service resource is "/ proxyservice".
  • the URI of the proxy service resource is different from the URI of the bridge device's platform resource "/ oic / p" and also the URI of the bridge device's device resource "/ oic / d". different.
  • the information of the first communication protocol virtual server includes endpoint information, and the endpoint is the same as the endpoint of the bridge device.
  • the endpoint of the bridge device is "coap: // [fe80 :: b1d6]: 44444"
  • the endpoint of the first communication protocol virtual server is also "coap: // [fe80 :: b1d6]: 44444".
  • the information of the proxy service resource may further include at least one of the following information: the resource type and interface of the proxy service resource.
  • the resource type of the proxy service resource can be "oic.r.proxyservice”.
  • the interface of the proxy service resource can be "oic.if.a”.
  • the information of the first communication protocol virtual server may further include at least one of the following information: the URI of the platform resource of the first communication protocol virtual server, the URI of the device resource, the resource type, the interface, and the target identifier.
  • the device resource of the first communication protocol virtual server may use the same URI as the device resource of the bridge device, or may use a URI different from the URI of the device resource of the bridge device.
  • the URI of the platform resource of the first communication protocol virtual server may be the same URI as the platform resource of the bridge device, or may be a URI different from the URI of the device resource of the bridge device.
  • the first communication protocol may be an OCF protocol.
  • the first communication protocol virtual server may be an OCF virtual server, and the first communication protocol client may be an OCF client.
  • the URI of the platform resource and the device resource of the virtual OCF server can be fixed URIs.
  • the URI of the platform resource of the virtual OCF server is "/ oic / p”
  • the URI of the device resource is "/ oic / d”.
  • the URI of the platform resource and the URI of the device resource of the virtual OCF server may include device identifiers of non-OCF devices.
  • the URI of the platform resource of virtual OCF server 1 can be "/ di / light_device_id / oic / p ”
  • the URI of the device resource of the virtual OCF server 1 may be“ / di / light_device_id / oic / d ”.
  • the device identifier of the non-OCF device 2 is "/ di / oven_device_id", and the server mapped by the non-OCF device 2 on the bridge device is the virtual OCF server 2.
  • the URI of the platform resource of the virtual OCF server 2 can be "/ di / oven_device_id / oic / d ", the URI of the device resource of the virtual OCF server 2 may be” / di / oven_device_id / oic / d ".
  • the target identifier may be a device identifier of the second communication protocol device.
  • the first communication protocol client may select a second communication protocol device that it wants to operate according to the target identifier.
  • the bridge device receives a resource operation request message sent by the first communication protocol client, and the resource operation request message includes a uniform resource identifier of the platform resource of the proxy service resource and a uniform resource identifier of the device resource, and the resource operation
  • the request message also includes a target identifier, which is used to identify the second communication protocol device that the proxy service resource operates on.
  • the proxy service resource on the bridge device After the proxy service resource on the bridge device receives the resource operation request sent by the first communication protocol client, it can determine the second communication protocol that the first communication protocol client wants to operate according to the target identifier carried in the resource operation request message. device.
  • the resource operation request message further includes at least one of the following information: the URI of the device instance resource of the first communication protocol virtual server, the resource operation method, and the payload.
  • the URI of the device instance resource of the virtual OCF server can be, for example, "/ myLightSwitch” or "/ myOven".
  • the URI of the device instance resource of the virtual OCF server may further include the device identifier of the non-OCF device, and the device identifier of the non-OCF device 1 is "light_device_id", then the URI of the device instance resource of the virtual OCF server 1 is "/ di / light_device_id / myLightSwitch ".
  • the device identifier of the non-OCF device 2 is "oven_device_id"
  • the URI of the device instance resource of the virtual OCF server 2 is "/ di / oven_device_id / myOven”.
  • the resource operation method may include at least one of the following methods: creating a resource, reading a resource, updating a resource, and deleting a resource.
  • Payload refers to the operational data on the resource.
  • the payload “payload” can be ⁇ "value”: true ⁇ , or the payload can be ⁇ value “: false ⁇ .
  • the operation indicated by the payload is" true “, it means that the light is turned on.
  • the operation indicated by the load is "false”, the light is turned off.
  • the load “payload” may be ⁇ "setvalue”: 25 ⁇ , and the operation indicated by the load may indicate that the temperature is adjusted to 25 ° C.
  • the bridge device converts the resource operation request message into a protocol message of the second communication protocol device.
  • the bridge device sends the converted protocol message to the second communication protocol device.
  • the bridge device may convert the resource operation request message into a protocol message of the second communication protocol device, and send the converted protocol message to the second communication protocol device.
  • the protocol message may also be a device instruction of the second communication protocol device.
  • the target identifier may be a device identifier of the second communication protocol device.
  • the device identifier of the non-OCF device 1 is "light_device_id”
  • the device identifier of the non-OCF device 2 is "oven_device_id”.
  • the server mapped from the non-OCF device 1 on the bridge device is the virtual OCF server 1
  • the server mapped from the non-OCF device 2 on the bridge device is the virtual OCF server 2.
  • the proxy service resource can proxy requests for resources on the virtual OCF server 1 and the virtual OCF server 2.
  • the target identifier included in the resource operation request message is "light_device_id"
  • the target identifier included in the resource operation request message is "light_device_id”
  • the bridge device may convert the operation request message into a device instruction of the non-OCF device 1 and send it to the non-OCF device 1.
  • the target identifier included in the resource operation request message is "oven_device_id"
  • the bridge device may convert the operation request message into a device instruction of the non-OCF device 2 and send it to the non-OCF device 2.
  • the target identifier can also be the URI of the device instance resource.
  • the endpoints of all virtual server ends on the bridge device are the same as the endpoints of the bridge device, and the number of endpoints on the bridge device will be reduced, which can reduce the maintenance cost of the bridge device to the endpoint.
  • the URI of the proxy service resource is different from the URI of the platform resource of the bridging device and the URI of the device resource.
  • the client can send a request message to the proxy service resource and carry the target identifier in the request message to identify the device requesting the proxy operation. In this way, the client can operate the resources on the virtual server through proxy service resources.
  • the number of endpoints in the bridge device can be reduced, and thus the communication complexity of the bridge device can be reduced.
  • the endpoint is used for transmission at the network layer.
  • the endpoint is related to the communication channel. After the endpoint on the bridge device is reduced, the communication channel between the client and the bridge device established by the bridge device will be reduced.
  • the reduction of the communication channel can reduce resources Overhead, reducing the complexity of the network layer. And the bridge device only needs to maintain one communication channel, so that the communication complexity of the bridge device can be reduced.
  • the information of the first communication protocol virtual server may be created by the bridge device, or may be obtained by the bridge device from other devices.
  • the information of the proxy service resource may be created by the bridge device, or may be obtained by the bridge device from other devices.
  • the method further includes: the bridge device receives a device registration request message sent by the second communication protocol device, and the bridge device creates a first communication protocol virtual server for the second communication protocol device.
  • the device registration request message may include a device identifier of the second communication protocol device.
  • the bridge device may create a first communication protocol virtual server for the second communication protocol device, and the endpoint of the first communication protocol virtual server is the same as the endpoint of the bridge device.
  • the bridge device may create a proxy service resource for the second communication protocol device after receiving the registration request message sent by the device of the second communication protocol device, and the proxy service resource can proxy the second communication protocol device. Operation request.
  • FIG. 6 is a schematic flowchart of another bridge communication method according to an embodiment of the present application.
  • the method of FIG. 6 includes steps S610-S630.
  • the first communication protocol client sends a resource discovery request message to the bridge device.
  • the resource discovery request message is mainly used to discover resources on the bridge device.
  • the first communication protocol client may mean that the client can communicate with the bridge device through the first communication protocol.
  • the client can be a client in the Internet of Things.
  • the first communication protocol may be a communication protocol in the Internet of Things.
  • the first communication protocol may be an OCF protocol.
  • the first communication protocol client receives a resource discovery response message sent by the bridge device.
  • the resource discovery response message includes information of the proxy service resource and information of the first communication protocol virtual server.
  • the endpoint of the first communication protocol virtual server is the same as the endpoint of the bridge device, the uniform resource identifier of the proxy service resource, the uniform resource identifier of the platform resource of the bridge device, and the uniform resource of the device resource
  • the identifiers are all different.
  • the first communication protocol virtual server may be a server mapped by the second communication protocol device on the bridge device, and the first communication protocol is different from the second communication protocol.
  • the embodiment of the present application does not specifically limit the first communication protocol and the second communication protocol, as long as the first communication protocol and the second communication protocol are two different protocols.
  • the first communication protocol is the zigbee protocol
  • the second communication protocol is the Bluetooth protocol.
  • the first communication protocol may be an OCF protocol
  • the second communication protocol may be a non-OCF protocol. That is, the first communication protocol client may be an OCF client, the second communication protocol device may be a non-OCF device, and the first communication protocol virtual server may be a virtual OCF server.
  • the non-OCF protocol may be zigbee, z-wave, or Bluetooth.
  • the resource discovery response message may include information about all the proxy service resources on the bridge device and information about the resources of the first communication protocol virtual server.
  • a bridge device can include one proxy service resource, or it can include multiple proxy service resources.
  • the proxy service resource is used to proxy a request for a resource on the first communication protocol virtual server.
  • the proxy service resource can proxy requests for all resources of the first communication protocol virtual server on the bridge device.
  • one of the proxy service resources may proxy a request for a part of the first communication protocol virtual server resource on the bridge device.
  • the proxy service resource may be created by the bridge device before leaving the factory, or it may be created by the bridge device after receiving the connection establishment request message sent by the second communication protocol device.
  • connection establishment request message may be a device registration request message.
  • the information of the proxy service resource includes the URI information of the proxy service resource.
  • the URI of the proxy service resource is different from the device resource and the platform resource of the bridge device.
  • the URI of the proxy service resource is "/ proxyservice".
  • the URI of the proxy service resource is different from the URI of the bridge device's platform resource "/ oic / p" and also the URI of the bridge device's device resource "/ oic / d". different.
  • the information of the first communication protocol virtual server includes endpoint information, and the endpoint is the same as the endpoint of the bridge device.
  • the information of the first communication protocol virtual server includes the endpoint information of the first communication protocol virtual server. For example, when the endpoint of the bridge device is "coap: // [fe80 :: b1d6]: 44444", the information of the first communication protocol virtual server is The endpoint is also "coap: // [fe80 :: b1d6]: 44444".
  • the information of the proxy service resource may further include at least one of the following information: the resource type and interface of the proxy service resource.
  • the resource type of the proxy service resource can be "oic.r.proxyservice”.
  • the interface of the proxy service resource can be "oic.if.a”.
  • the information of the first communication protocol virtual server may further include at least one of the following information: the URI of the platform resource of the first communication protocol virtual server, the URI of the device resource, the resource type, the interface, and the target identifier.
  • the device resource of the first communication protocol virtual server may use the same URI as the device resource of the bridge device, or may use a URI different from the URI of the device resource of the bridge device.
  • the URI of the platform resource of the first communication protocol virtual server may be the same URI as the platform resource of the bridge device, or may be a URI different from the URI of the device resource of the bridge device.
  • the first communication protocol may be an OCF protocol.
  • the first communication protocol virtual server may be an OCF virtual server, and the first communication protocol client may be an OCF client.
  • the URI of the platform resource and the device resource of the virtual OCF server can be fixed URIs.
  • the URI of the platform resource of the virtual OCF server is "/ oic / p”
  • the URI of the device resource is "/ oic / d”.
  • the URI of the platform resource and the URI of the device resource of the virtual OCF server may include device identifiers of non-OCF devices.
  • the URI of the platform resource of virtual OCF server 1 can be "/ di / light_device_id / oic / p ”
  • the URI of the device resource of the virtual OCF server 1 may be“ / di / light_device_id / oic / d ”.
  • the device identifier of the non-OCF device 2 is "/ di / oven_device_id", and the server mapped by the non-OCF device 2 on the bridge device is the virtual OCF server 2.
  • the URI of the platform resource of the virtual OCF server 2 can be "/ di / oven_device_id / oic / d ", the URI of the device resource of the virtual OCF server 2 may be” / di / oven_device_id / oic / d ".
  • the target identifier may be a device identifier of the second communication protocol device.
  • the first communication protocol client may select a second communication protocol device that it wants to operate according to the target identifier.
  • the first communication protocol client sends a resource operation request message to the bridge device.
  • the resource operation request message includes the URI of the platform resource of the proxy service resource and the URI of the device resource.
  • the resource operation request message further includes the target identifier. The target identifier is used to identify a second communication protocol device that the proxy service resource operates on.
  • the first communication protocol client After the first communication protocol client receives the resource response message, it may select the second communication protocol device that it wants to operate, add the target identifier of the second communication protocol device to the resource operation request message, and provide the The proxy service resource sends the resource operation request message.
  • the device identifier of non-OCF device 1 is "light_device_id”
  • the device identifier of non-OCF device 2 is "oven_device_id”.
  • the server mapped from the non-OCF device 1 on the bridge device is the virtual OCF server 1
  • the server mapped from the non-OCF device 2 on the bridge device is the virtual OCF server 2.
  • the proxy service resource can proxy requests for resources on the virtual OCF server 1 and the virtual OCF server 2.
  • the OCF client When the OCF client wants to perform a resource operation on the non-OCF device 1, it may send a resource operation request message to the proxy service resource.
  • the target identifier included in the resource operation request message may be "light_device_id".
  • the OCF client When the OCF client wants to perform resource operations on the non-OCF device 2, it may send a resource operation request message to the proxy service resource.
  • the target identifier included in the resource operation request message may be "light_device_id".
  • the target identifier can also be the URI of the device instance resource.
  • the endpoints of all the first communication protocol virtual server ends on the bridge device are the same as the endpoints of the bridge device, and the number of endpoints on the bridge device will be reduced, which can reduce the maintenance cost of the bridge device to the endpoint.
  • the URI of the proxy service resource is different from the URI of the platform resource of the bridge device and the URI of the device resource.
  • the first communication protocol client can send a request message to the proxy service resource, and the target message is carried in the request message to identify the requesting proxy. Operating second communication protocol device. In this way, the first communication protocol client can operate the resources on the first communication protocol virtual server through proxy service resources.
  • the number of endpoints in the bridge device can be reduced, and thus the communication complexity of the bridge device can be reduced.
  • the endpoint is used for transmission at the network layer.
  • the endpoint is related to the communication channel. After the endpoint on the bridge device is reduced, the communication channel between the client and the bridge device established by the bridge device will be reduced.
  • the reduction of the communication channel can reduce resources Overhead, reducing the complexity of the network layer. And the bridge device only needs to maintain one communication channel, so that the communication complexity of the bridge device can be reduced.
  • FIG. 7 is a schematic flowchart of another bridge device communication method according to an embodiment of the present application.
  • the method of FIG. 7 includes steps S710-S720.
  • the method in FIG. 7 can be used in combination with the methods in FIGS. 5 and 6.
  • the method in FIG. 7 refer to the descriptions in the methods in FIG. 5 and FIG. 6 above.
  • the bridge device receives a device registration request message sent by the second communication protocol device.
  • the device registration request message may also be a connection establishment request message.
  • connection establishment request message may include a device identifier of the second communication protocol device.
  • the bridge device creates a first communication protocol virtual server and a proxy service resource for the second communication protocol device, wherein the endpoint of the first communication protocol virtual server is the same as the endpoint of the bridge device, and
  • the uniform resource identifier of the proxy service resource is different from the uniform resource identifier of the platform resource of the bridge device and the uniform resource identifier of the device resource, and the proxy service resource is used to proxy the first communication protocol client to the first communication protocol client.
  • a communication protocol request from the virtual server is used to proxy the first communication protocol client to the first communication protocol client.
  • the bridge device creates information of the first communication protocol virtual server.
  • the information of the first communication protocol virtual server includes a uniform resource identifier of the platform resource and a uniform resource identifier of the device resource. Breaks and endpoints.
  • the bridging device creates information for creating the proxy service resource.
  • the information for creating the proxy service resource includes the uniform resource identifier of the platform resource, the uniform resource identifier of the device resource, and the endpoint.
  • FIG. 8 is a schematic block diagram of a bridge device according to an embodiment of the present application.
  • the bridge device 800 of FIG. 8 includes a communication unit 810.
  • the communication unit 810 is configured to receive a resource discovery request message sent by a first communication protocol client.
  • the communication unit 810 is further configured to send a resource discovery response message to the first communication protocol client, where the resource discovery response message includes a unified resource of a platform resource of the first communication protocol virtual server created by the bridging device.
  • the resource discovery response message includes a unified resource of a platform resource of the first communication protocol virtual server created by the bridging device.
  • Identifier, uniform resource identifier and endpoint of the device resource wherein the endpoint of the first communication protocol virtual server is the same as the endpoint of the bridge device, and the uniform resource identifier of the platform resource of the first communication protocol virtual server Different from the uniform resource identifier of the platform resource of the bridge device, the uniform resource identifier of the device resource of the first communication protocol virtual server is different from the uniform resource identifier of the device resource of the bridge device.
  • the communication unit 810 is further configured to receive a device registration request message sent by the second communication protocol device.
  • the bridge device 800 further includes a processing unit, configured to create the first communication protocol virtual server for the second communication protocol device.
  • the unified resource identifier of the platform resource and the device resource of the first communication protocol virtual server includes the device identification of the second communication protocol device.
  • the uniform resource identifier of the device instance resource of the first communication protocol virtual server includes the device identification of the second communication protocol device
  • the communication unit 810 is further configured to receive a resource sent by the first communication protocol client.
  • An operation request message where the resource operation request message includes a uniform resource identifier of a device instance resource of the first communication protocol virtual server; the processing unit is further configured to convert the resource operation request message into the second communication A protocol message of the protocol device; the communication unit 810 is further configured to send the protocol message to the second communication protocol device.
  • the first communication protocol is an OCF protocol.
  • FIG. 9 is a schematic block diagram of a first communication protocol device according to an embodiment of the present application.
  • the first communication protocol device may be, for example, an OCF device.
  • the first communication protocol device 900 of FIG. 9 includes a communication unit 910.
  • the communication unit 910 is configured to send a resource discovery request message to the bridge device.
  • the communication unit 910 is further configured to receive a resource discovery response message sent by the bridge device, where the resource discovery response message includes a platform resource of the first communication protocol virtual server created by the bridge device of the first communication protocol virtual server.
  • Uniform resource identifier, uniform resource identifier and endpoint of device resource wherein the endpoint of the first communication protocol virtual server is the same as the endpoint of the bridge device, and the unified resource of platform resources of the first communication protocol virtual server
  • the identifier is different from the uniform resource identifier of the platform resource of the bridge device, and the uniform resource identifier of the device resource of the first communication protocol virtual server is different from the uniform resource identifier of the device resource of the bridge device.
  • the unified resource identifier of the platform resource and the device resource of the first communication protocol virtual server includes the device identification of the second communication protocol device.
  • the uniform resource identifier of the device instance resource of the first communication protocol virtual server includes the device identifier of the second communication protocol device
  • the communication unit 910 is further configured to send a resource operation request message to the bridge device
  • the resource operation request message includes a uniform resource identifier of a device instance resource of the first communication protocol virtual server, and the uniform resource identifier of the device instance resource is used to identify the first communication protocol virtual server to perform The second communication protocol device in operation.
  • the first communication protocol is an OCF protocol.
  • FIG. 10 is a schematic block diagram of another bridge device according to an embodiment of the present application.
  • the bridge device 1000 of FIG. 10 includes a communication unit 1010 and a processing unit 1020.
  • the communication unit 1010 is configured to receive a device registration request message sent by a second communication protocol device.
  • a processing unit 1020 is configured to create a first communication protocol virtual server for the second communication protocol device, wherein an endpoint of the first communication protocol virtual server is the same as an endpoint of the bridge device, and the first communication protocol
  • the uniform resource identifier of the platform resource of the virtual server is different from the uniform resource identifier of the platform resource of the bridge device.
  • the uniform resource identifier of the device resource of the first communication protocol virtual server and the device resource of the bridge device are different. Uniform resource identifiers are different.
  • FIG. 11 is a schematic block diagram of another bridge device according to an embodiment of the present application.
  • the bridge device 1100 in FIG. 11 includes a communication unit 1110 and a processing unit 1120.
  • the communication unit 1110 is configured to receive a resource discovery request message sent by a first communication protocol client.
  • the communication unit 1110 is further configured to send a resource discovery response message to the first communication protocol client, where the resource discovery response message includes information of a pre-created proxy service resource and a unified platform resource of the first communication protocol virtual server.
  • the resource discovery response message includes information of a pre-created proxy service resource and a unified platform resource of the first communication protocol virtual server.
  • a resource identifier, a uniform resource identifier and an endpoint of a device resource wherein the endpoint of the first communication protocol virtual server is the same as the endpoint of the bridge device, and the uniform resource identifier of the proxy service resource is the same as the bridge device
  • the unified resource identifier of the platform resource and the unified resource identifier of the device resource are different.
  • the communication unit 1110 is further configured to receive a resource operation request message sent by the first communication protocol client to the bridge device, where the resource operation request message includes a uniform resource identifier and a platform resource of the proxy service resource and A uniform resource identifier of a device resource, and the resource operation request message further includes a target identifier, where the target identifier is used to identify a second communication protocol device on which the proxy service resource operates, the first communication protocol and the The second communication protocol is different.
  • the processing unit 1120 is configured to convert the resource operation request message into a protocol message of the second communication protocol device.
  • the communication unit 1110 is further configured to send the protocol message to the second communication protocol device.
  • the resource discovery response message further includes at least one of the following information: a resource type and an interface of the proxy service resource.
  • the resource operation request message includes at least one of the following information: a URI of a device instance resource of the first communication protocol virtual server, a resource operation method, and a payload.
  • the first communication protocol is an OCF protocol.
  • FIG. 12 is a schematic block diagram of another first communication protocol device according to an embodiment of the present application.
  • the first communication protocol device may be, for example, an OCF device.
  • the first communication protocol device 1200 of FIG. 12 includes a communication unit 1210.
  • the communication unit 1210 is configured to send a resource discovery request message to the bridge device.
  • the communication unit 1210 is further configured to receive a resource discovery response message sent by the bridge device, where the resource discovery response message includes a pre-created proxy service resource and a uniform resource identifier of the platform resource of the first communication protocol virtual server and a device.
  • the resource discovery response message includes a pre-created proxy service resource and a uniform resource identifier of the platform resource of the first communication protocol virtual server and a device.
  • a uniform resource identifier and endpoint of the resource wherein the endpoint of the first communication protocol virtual server is the same as the endpoint of the bridge device, and the uniform resource identifier of the proxy service resource is the same as the platform resource of the bridge device
  • the resource identifier and the uniform resource identifier of the device resource are different.
  • the communication unit 1210 is further configured to send a resource operation request message to the proxy service resource, where the resource operation request message includes a target identifier, and the resource operation request message includes a uniform resource identifier of a platform resource of the proxy service resource Identifier and a uniform resource identifier of a device resource, the target identifier is used to identify a second communication protocol device on which the proxy service resource operates, and the first communication protocol is different from the second communication protocol.
  • the resource discovery response message further includes at least one of the following information: a resource type and an interface of the proxy service resource.
  • the resource operation request message includes at least one of the following information: a URI of a device instance resource of the first communication protocol virtual server, a resource operation method, and a payload.
  • the first communication protocol may be an OCF protocol.
  • FIG. 13 is a schematic block diagram of another bridge device according to an embodiment of the present application.
  • the bridge device 1300 of FIG. 13 includes a communication unit 1310 and a processing unit 1320.
  • the communication unit 1310 is configured to receive a device registration request message sent by a second communication protocol device.
  • a processing unit 1320 configured to create a first communication protocol virtual server and a proxy service resource for the second communication protocol device, wherein an endpoint of the first communication protocol virtual server is the same as an endpoint of the bridge device, and The uniform resource identifier of the proxy service resource is different from the uniform resource identifier of the platform resource of the bridge device and the uniform resource identifier of the device resource, and the proxy service resource is used to proxy the first communication protocol client to the first communication protocol client.
  • FIG. 14 is a schematic structural diagram of a communication device 1400 according to an embodiment of the present application.
  • the communication device 1400 shown in FIG. 14 includes a processor 1410, and the processor 1410 can call and run a computer program from a memory to implement the method in the embodiment of the present application.
  • the communication device 1400 may further include a memory 1420.
  • the processor 1410 may call and run a computer program from the memory 1420 to implement the method in the embodiment of the present application.
  • the memory 1420 may be a separate device independent of the processor 1410, or may be integrated in the processor 1410.
  • the communication device 1400 may further include a transceiver 1430, and the processor 1410 may control the transceiver 1430 to communicate with other devices, and specifically, may send information or data to other devices, or receive other Information or data sent by the device.
  • the processor 1410 may control the transceiver 1430 to communicate with other devices, and specifically, may send information or data to other devices, or receive other Information or data sent by the device.
  • the transceiver 1430 may include a transmitter and a receiver.
  • the transceiver 1430 may further include an antenna, and the number of antennas may be one or more.
  • the communication device 1400 may specifically be a network device according to an embodiment of the present application, and the communication device 1400 may implement a corresponding process implemented by a network device in each method of the embodiments of the present application. .
  • the communication device 1400 may specifically be a mobile terminal / terminal device in the embodiment of the present application, and the communication device 1400 may implement a corresponding process implemented by the mobile terminal / terminal device in each method in the embodiments of the present application, for the sake of simplicity , Will not repeat them here.
  • FIG. 15 is a schematic structural diagram of a chip according to an embodiment of the present application.
  • the chip 1500 shown in FIG. 15 includes a processor 1510, and the processor 1510 can call and run a computer program from a memory to implement the method in the embodiment of the present application.
  • the chip 1500 may further include a memory 1520.
  • the processor 1510 may call and run a computer program from the memory 1520 to implement the method in the embodiment of the present application.
  • the memory 1520 may be a separate device independent of the processor 1510, or may be integrated in the processor 1510.
  • the chip 1500 may further include an input interface 1530.
  • the processor 1510 may control the input interface 1530 to communicate with other devices or chips. Specifically, the processor 1510 may obtain information or data sent by other devices or chips.
  • the chip 1500 may further include an output interface 1540.
  • the processor 1510 may control the output interface 1540 to communicate with other devices or chips. Specifically, the processor 1510 may output information or data to the other devices or chips.
  • the chip may be applied to the network device in the embodiment of the present application, and the chip may implement the corresponding process implemented by the network device in each method of the embodiment of the present application.
  • the chip may be applied to the network device in the embodiment of the present application, and the chip may 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 mobile terminal / terminal device in the embodiments of the present application, and the chip can implement the corresponding process implemented by the mobile terminal / terminal device in each method of the embodiments of the present application. For simplicity, here No longer.
  • the chip mentioned in the embodiments of the present application may also be referred to as a system-level chip, a system chip, a chip system or a system-on-chip.
  • FIG. 16 is a schematic block diagram of a communication system 1600 according to an embodiment of the present application. As shown in FIG. 16, the communication system 1600 includes a bridge device 1610 and a first communication protocol device 1620.
  • the bridging device 1610 may be used to implement the corresponding functions implemented by the bridging device in the above method, and the first communication protocol device 1620 may be used to implement the corresponding functions implemented by the device in the above method. More details.
  • the processor in the embodiment of the present application may be an integrated circuit chip and has a signal processing capability.
  • each step of the foregoing method embodiment may be completed by using an integrated logic circuit of hardware in a processor or an instruction in a form of software.
  • the above processor may be a general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), an off-the-shelf programmable gate array (Field, Programmable Gate Array, FPGA), or other Programming logic devices, discrete gate or transistor logic devices, discrete hardware components.
  • DSP digital signal processor
  • ASIC application specific integrated circuit
  • FPGA off-the-shelf programmable gate array
  • Various methods, steps, and logical block diagrams disclosed in the embodiments of the present application can be implemented or executed.
  • a general-purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
  • the steps of the method disclosed in combination with the embodiments of the present application may be directly implemented by a hardware decoding processor, or may be performed by using a combination of hardware and software modules in the decoding processor.
  • the software module may be located in a mature storage medium such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, and the like.
  • the storage medium is located in a memory, and the processor reads the information in the memory and completes the steps of the foregoing method in combination with its hardware.
  • the memory in the embodiment of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory.
  • the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), and an electronic memory. Erase programmable read-only memory (EPROM, EEPROM) or flash memory.
  • the volatile memory may be Random Access Memory (RAM), which is used as an external cache.
  • RAM Static Random Access Memory
  • DRAM Dynamic Random Access Memory
  • Synchronous Dynamic Random Access Memory Synchronous Dynamic Random Access Memory
  • SDRAM double data rate synchronous dynamic random access memory
  • Double SDRAM, DDR SDRAM enhanced synchronous dynamic random access memory
  • Enhanced SDRAM, ESDRAM synchronous connection dynamic random access memory
  • Synchronous DRAM Synchronous Dynamic Random Access Memory
  • Enhanced SDRAM Enhanced SDRAM, ESDRAM
  • synchronous connection dynamic random access memory Synchrobus RAM, SLDRAM
  • Direct Rambus RAM Direct Rambus RAM
  • the memory in the embodiment of the present application may also be a static random access memory (static RAM, SRAM), a dynamic random access memory (dynamic RAM, DRAM), Synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (Double 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, the memories in the embodiments of the present application are intended to include, but not limited to, these and any other suitable types of memories.
  • An embodiment of the present application further provides a computer-readable storage medium for storing a computer program.
  • the computer-readable storage medium may be applied to the network device in the embodiment of the present application, and the computer program causes the computer to execute the corresponding process implemented by the network device in each method in the embodiment of the present application. For simplicity, here No longer.
  • the computer-readable storage medium may be applied to the mobile terminal / terminal device in the embodiment of the present application, and the computer program causes the computer to execute a corresponding process implemented by the mobile terminal / terminal device in each method in the embodiment of the present application.
  • the computer program causes the computer to execute a corresponding process implemented by the mobile terminal / terminal device in each method in the embodiment of the present application.
  • An embodiment of the present application further provides a computer program product, including computer program instructions.
  • the computer program product can be applied to the network device in the embodiment of the present application, and the computer program instruction causes the computer to execute a corresponding process implemented by the network device in each method in the embodiment of the present application. More details.
  • the computer program product can be applied to a mobile terminal / terminal device in the embodiments of the present application, and the computer program instructions cause the computer to execute a corresponding process implemented by the mobile terminal / terminal device in each method in the embodiments of the present application
  • the computer program instructions cause the computer to execute a corresponding process implemented by the mobile terminal / terminal device in each method in the embodiments of the present application
  • I will not repeat them here.
  • the embodiment of the present application also provides a computer program.
  • the computer program may be applied to a network device in the embodiment of the present application.
  • the computer program When the computer program is run on a computer, the computer is caused to execute a corresponding process implemented by the network device in each method in the embodiment of the present application. , Will not repeat them here.
  • the computer program may be applied to a mobile terminal / terminal device in the embodiment of the present application.
  • the computer program When the computer program is run on a computer, the computer executes each method in the embodiment of the application by the mobile terminal / terminal device. The corresponding processes are not repeated here for brevity.
  • the disclosed systems, devices, and methods may be implemented in other ways.
  • the device embodiments described above are only schematic.
  • the division of the unit is only a logical function division.
  • multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, which may be electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, may be located in one place, or may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objective of the solution of this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each of the units may exist separately physically, or two or more units may be integrated into one unit.
  • the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium.
  • the technical solution of this application is essentially a part that contributes to the existing technology or a part of the technical solution can be embodied in the form of a software product.
  • the computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in the embodiments of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory) ROM, random access memory (Random Access Memory, RAM), magnetic disks or optical disks and other media that can store program codes .

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Computer And Data Communications (AREA)

Abstract

The embodiments of the present application provide a bridging communication method and device, which can decrease the number of endpoints in a bridging device and reduce the complexity of device bridging communication. Said method comprises: the bridging device receiving a resource discovery request message sent by a first communication protocol client; the bridging device sending a resource discovery response message to the first communication protocol client, the resource discovery response message comprising information about a first communication protocol virtual server, the endpoint of the first communication protocol virtual server being the same as the endpoint of the bridging device, the uniform resource identifier of a platform resource of the first communication protocol virtual server being different from the uniform resource identifier of a platform resource of the bridging device, and the uniform resource identifier of a device resource of the first communication protocol virtual server being different from the uniform resource identifier of a device resource of the bridging device.

Description

桥接通信的方法和设备Method and device for bridge communication
本申请要求于2018年08月24日提交中国专利局、申请号为201810974172.7、发明名称为“桥接通信的方法和设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority from a Chinese patent application filed with the Chinese Patent Office on August 24, 2018, with application number 201810974172.7, and the invention name is "Methods and Equipment for Bridged Communication", the entire contents of which are incorporated herein by reference.
技术领域Technical field
本申请实施例涉及领域,并且更具体地,涉及一种桥接通信的方法和设备。Embodiments of the present application relate to the field, and more particularly, to a method and device for bridge communication.
背景技术Background technique
随着技术的发展,物联网作为未来信息网络领域发展的重要方向之一,在世界范围内受到了广泛的关注。但是,目前不同的厂家使用不同的生态链协议,导致不同厂家生产的产品之间不能通信,不能达到真正的万物互联。With the development of technology, the Internet of Things, as one of the important directions for the development of the information network field in the future, has received widespread attention worldwide. However, at present, different manufacturers use different ecological chain protocols, which leads to the inability of communication between products produced by different manufacturers and the real interconnection of all things.
桥接设备可以实现不同协议之间的转换,从而可以实现采用不同协议的设备之间的通信。以开放连接基金会(open connectivity foundation,OCF)设备为例,桥接设备可以为OCF设备创建虚拟OCF服务端,这样OCF客户端可以和虚拟OCF服务端通过OCF协议进行通信,虚拟OCF服务端可以和非OCF设备以非OCF协议进行通信,这样就可以实现OCF设备和非OCF设备之间的通信。The bridge device can realize the conversion between different protocols, so that the communication between the devices using different protocols can be realized. Taking the Open Connectivity Foundation (OCF) device as an example, the bridge device can create a virtual OCF server for the OCF device, so that the OCF client can communicate with the virtual OCF server through the OCF protocol, and the virtual OCF server can communicate with the OCF server. Non-OCF devices communicate with non-OCF protocols, so that communication between OCF devices and non-OCF devices can be achieved.
目前,通信系统对通信要求越来越高,桥接设备在实现两种不同协议的设备之间的通信的过程中,如何能够降低通信复杂度成为亟需解决的问题。At present, communication systems have higher and higher communication requirements. In the process of implementing communication between devices with two different protocols, how to reduce the complexity of communication has become an urgent problem.
发明内容Summary of the Invention
本申请实施例提供一种桥接通信的方法和设备,能够减少桥接设备中的端点数量,并降低设备桥接通信的复杂度。The embodiments of the present application provide a method and device for bridge communication, which can reduce the number of endpoints in the bridge device and reduce the complexity of the device bridge communication.
第一方面,提供了一种桥接通信的方法,包括:桥接设备接收第一通信协议客户端发送的资源发现请求消息;所述桥接设备向所述第一通信协议客户端发送资源发现响应消息,所述资源发现响应消息中包括第一通信协议虚拟服务端的信息,第一通信协议虚拟服务端的信息包括平台资源的统一资源标识符、设备资源的统一资源标识符和端点,其中,所述第一通信协议虚拟服务端的端点与所述桥接设备的端点相同,所述第一通信协议虚拟服务端的平台资源的统一资源标识符与所述桥接设备的平台资源的统一资源标识符不同,所述第一通信协议虚拟服务端的设备资源的统一资源标识符与所述桥接设备的设备资源的统一资源标识符不同。According to a first aspect, a bridge communication method is provided, including: a bridge device receiving a resource discovery request message sent by a first communication protocol client; the bridge device sending a resource discovery response message to the first communication protocol client, The resource discovery response message includes information of a first communication protocol virtual server, and the information of the first communication protocol virtual server includes a uniform resource identifier of a platform resource, a uniform resource identifier of an equipment resource, and an endpoint, wherein the first The endpoint of the communication protocol virtual server is the same as the endpoint of the bridging device. The uniform resource identifier of the platform resource of the first communication protocol virtual server is different from the uniform resource identifier of the platform resource of the bridging device. The uniform resource identifier of the device resource of the communication protocol virtual server is different from the uniform resource identifier of the device resource of the bridge device.
第二方面,提供了一种桥接通信的方法,包括:第一通信协议客户端向桥接设备发送资源发现请求消息;所述第一通信协议客户端接收所述桥接设备发送的资源发现响应消息,所述资源发现响应消息中包括第一通信协议虚拟服务端的信息,第一通信协议虚拟服务端的信息包括平台资源的统一资源标识符、设备资源的统一资源标识符和端点,其中,所述第一通信协议虚拟服务端的端点与所述桥接设备的端点相同,所述第一通信协议虚拟服务端的平台资源的统一资源标识符与所述桥接设备的平台资源的统一资源标识符不同,所述第一通信协议虚拟服务端的设备资源的统一资源标识符与所述桥接设备的设备资源的统一资源标识符不同。In a second aspect, a bridge communication method is provided, including: a first communication protocol client sends a resource discovery request message to a bridge device; the first communication protocol client receives a resource discovery response message sent by the bridge device, The resource discovery response message includes information of a first communication protocol virtual server, and the information of the first communication protocol virtual server includes a uniform resource identifier of a platform resource, a uniform resource identifier of an equipment resource, and an endpoint, wherein the first The endpoint of the communication protocol virtual server is the same as the endpoint of the bridging device. The uniform resource identifier of the platform resource of the first communication protocol virtual server is different from the uniform resource identifier of the platform resource of the bridging device. The uniform resource identifier of the device resource of the communication protocol virtual server is different from the uniform resource identifier of the device resource of the bridge device.
第三方面,提供了一种桥接通信的方法,包括:桥接设备接收第二通信协议设备发送的设备注册请求消息;所述桥接设备为所述第二通信协议设备创建第一通信协议虚拟服务端,其中,所述第一通信协议虚拟服务端的端点与所述桥接设备的端点相同,所述第一通信协议虚拟服务端的平台资源的统一资源标识符与所述桥接设备的平台资源的统一资源标识符不同,所述第一通信协议虚拟服务端的设备资源的统一资源标识符与所述桥接设备的设备资源的统一资源标识符不同。According to a third aspect, a bridge communication method is provided, including: the bridge device receives a device registration request message sent by a second communication protocol device; and the bridge device creates a first communication protocol virtual server for the second communication protocol device Wherein the endpoint of the first communication protocol virtual server is the same as the endpoint of the bridging device, the uniform resource identifier of the platform resource of the first communication protocol virtual server and the uniform resource identifier of the platform resource of the bridging device Different identifiers, the uniform resource identifier of the device resource of the first communication protocol virtual server is different from the uniform resource identifier of the device resource of the bridge device.
第四方面,提供了一种桥接通信的方法,包括:桥接设备接收第一通信协议客户端发送的资源发现请求消息;所述桥接设备向所述第一通信协议客户端发送资源发现响应消息,所述资源发现响应消息中包括预先创建的代理服务资源和第一通信协议虚拟服务端的信息,该预先创建的代理服务资源和第一通信协议虚拟服务端的信息包括平台资源的统一资源标识符、设备资源的统一资源标识符及端点,其中,所述第一通信协议虚拟服务端的端点与所述桥接设备的端点相同,所述代理服务资源的统一资源标识符与所述桥接设备的平台资源的统一资源标识符、设备资源的统一资源标识符均不同;所述桥接设备接收所述第一通信协议客户端发送的资源操作请求消息,所述资源操作请求消息中包括所述代理服务资源的平台资源的统一资源标识符和设备资源的统一资源标识符,所述资源操作请求消息中还包括目标标识,所述目标标识用于标识所述代理服务资源进行操作的第二通信协议设备;所述桥接设备将所述资源操作请求消息转换为所述第二通信协议设备的协议消息;所述桥接设备向所述第二通信协议设备发送所述协议消息。According to a fourth aspect, a bridge communication method is provided, including: a bridge device receiving a resource discovery request message sent by a first communication protocol client; the bridge device sending a resource discovery response message to the first communication protocol client, The resource discovery response message includes information of a pre-created proxy service resource and a first communication protocol virtual server, and the information of the pre-created proxy service resource and the first communication protocol virtual server includes a uniform resource identifier of a platform resource, a device A uniform resource identifier and endpoint of the resource, wherein the endpoint of the first communication protocol virtual server is the same as the endpoint of the bridge device, and the uniform resource identifier of the proxy service resource is the same as the platform resource of the bridge device The resource identifier and the uniform resource identifier of the device resource are different; the bridge device receives a resource operation request message sent by the first communication protocol client, and the resource operation request message includes a platform resource of the proxy service resource Uniform resource identifier and device resource A source identifier, and the resource operation request message further includes a target identifier, where the target identifier is used to identify a second communication protocol device operating by the proxy service resource; the bridge device converts the resource operation request message into A protocol message of the second communication protocol device; the bridge device sends the protocol message to the second communication protocol device.
第五方面,提供了一种桥接通信的方法,包括:第一通信协议客户端向桥接设备发送资源发现请求消息;所述第一通信协议客户端接收所述桥接设备发送的资源发现响应消息,所述资源发现响应消息中包括预先创建的代理服务资源和第一通信协议虚拟服务端的信息,该预先创建的代理服务资源和第一通信协议虚拟服务端的信息包括平台资源的统一资源标识符、设备资源的统一资源标识符和端点,其中,所述第一通信协议虚拟服务端的端点与所述桥接设备的端点相同,所述代理服务资源的统一资源标识符与所述桥接设备的平台资源的统一资源标识符、设备资源的统一资源标识符均不同;所述第一通信协议客户端向所述桥接设备发送资源操作请求消息,所述资源操作请求消息中包括所述代理服务资源的平台资源的统一资源标识符和设备资源的统一资源标识符,所述资源操作请求消息中还包括目标标识,所述目标标识用于标识所述代理服务资源进行操作的第二通信协议设备。According to a fifth aspect, a bridge communication method is provided, including: a first communication protocol client sends a resource discovery request message to a bridge device; the first communication protocol client receives a resource discovery response message sent by the bridge device, The resource discovery response message includes information of a pre-created proxy service resource and a first communication protocol virtual server, and the information of the pre-created proxy service resource and the first communication protocol virtual server includes a uniform resource identifier of a platform resource, a device The uniform resource identifier and endpoint of the resource, where the endpoint of the first communication protocol virtual server is the same as the endpoint of the bridge device, and the uniform resource identifier of the proxy service resource is the same as the platform resource of the bridge device The resource identifier and the uniform resource identifier of the device resource are different; the first communication protocol client sends a resource operation request message to the bridge device, and the resource operation request message includes the platform resource of the proxy service resource Uniform Resource Identifier and Uniform Resource for Device Resources Identifier, the resource operation request message further includes target identification, the target identifier for identifying the second communication resource proxy service protocol device operation.
第六方面,提供了一种桥接通信的方法,包括:桥接设备接收第二通信协议设备发送的设备注册请求消息;所述桥接设备为所述第二通信协议设备创建第一通信协议虚拟服务端和代理服务资源,其中,所述第一通信协议虚拟服务端的端点与所述桥接设备的端点相同,所述代理服务资源的统一资源标识符与所述桥接设备的平台资源的统一资源标识符、设备资源的统一资源标识符均不同,所述代理服务资源用于代理第一通信协议客户端对所述第一通信协议虚拟服务端的请求。According to a sixth aspect, a bridge communication method is provided, including: the bridge device receives a device registration request message sent by a second communication protocol device; the bridge device creates a first communication protocol virtual server for the second communication protocol device And a proxy service resource, wherein the endpoint of the first communication protocol virtual server is the same as the endpoint of the bridge device, the uniform resource identifier of the proxy service resource and the uniform resource identifier of the platform resource of the bridge device, The uniform resource identifiers of the device resources are all different, and the proxy service resource is used to proxy a request of the first communication protocol client to the first communication protocol virtual server.
第七方面,提供了一种桥接设备,用于执行上述第一方面或第三方面中任意可选的实现方式中所述的方法。具体地,该桥接设备括用于执行上述第一方面、第三方面、第四方面或第六方面中任意可选的实现方式中所述的方法的功能模块。In a seventh aspect, a bridging device is provided for performing the method described in any of the optional implementation manners in the first aspect or the third aspect. Specifically, the bridging device includes a functional module for performing the method described in any one of the optional implementation manners of the first aspect, the third aspect, the fourth aspect, or the sixth aspect.
第八方面,提供了一种第一通信协议设备,用于执行上述第二方面或第四方面中任意可选的实现方式中所述的方法。具体地,该桥接设备括用于执行上述第二方面或第五方面中任意可选的实现方式中所述的方法的功能模块。According to an eighth aspect, a first communication protocol device is provided, which is configured to perform the method described in the foregoing second aspect or any optional implementation manner in the fourth aspect. Specifically, the bridging device includes a functional module for performing the method described in the second aspect or any optional implementation manner of the fifth aspect.
第九方面,提供了一种桥接设备,包括处理器和存储器。该存储器用于存储计算机程序,该处理器用于调用并运行该存储器中存储的计算机程序,执行上述第一方面、第三方面、第四方面或第六方面中各实现方式中的方法。In a ninth aspect, a bridge device is provided, 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 methods in the implementation manners of the first aspect, the third aspect, the fourth aspect, or the sixth aspect.
第十方面,提供了一种第一通信协议设备,包括处理器和存储器。该存储器用于存储计算机程序,该处理器用于调用并运行该存储器中存储的计算机程序,执行上述第二方面或或第五方面中各实现方式中的方法。According to a tenth aspect, a first communication protocol device is provided, 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 method in the foregoing second aspect or the implementation manners in the fifth aspect.
第十一方面,提供了一种芯片,用于实现上述第一方面或第三方面中的任意可能的实现方式中的方法。具体地,该芯片包括处理器,用于从存储器中调用并运行计算机程序,使得安装有该芯片的设备执行如上述第一方面、第三方面、第四方面或第六方面中的任意可能的实现方式中的方法。According to an eleventh aspect, a chip is provided for implementing the method in any possible implementation manner in the first aspect or the third aspect. Specifically, the chip includes a processor for invoking and running a computer program from the memory, so that the device installed with the chip executes any possible one of the first aspect, the third aspect, the fourth aspect, or the sixth aspect described above. Method in implementation.
第十二方面,提供了一种芯片,用于实现上述第二方面或第四方面中的任意可能的实现方式中的方法。具体地,该芯片包括处理器,用于从存储器中调用并运行计算机程序,使得安装有该芯片的设备执行如上述第二方面或第五方面中的任意可能的实现方式中的方法。In a twelfth aspect, a chip is provided for implementing the method in any of the possible implementation manners in the second aspect or the fourth aspect. Specifically, the chip includes a processor for invoking and running a computer program from the memory, so that the device installed with the chip executes the method in any possible implementation manner in the second aspect or the fifth aspect described above.
第十三方面,提供了一种计算机可读存储介质,用于存储计算机程序,该计算机程序使得计算机执行上述第一方面、第三方面、第四方面或第六方面中的任意可能的实现方式中的方法。According to a thirteenth aspect, a computer-readable storage medium is provided for storing a computer program that causes a computer to execute any possible implementation manner of the first aspect, the third aspect, the fourth aspect, or the sixth aspect described above. Method.
第十四方面,提供了一种计算机可读存储介质,用于存储计算机程序,该计算机程序使得计算机执行上述第二方面或第五方面中的任意可能的实现方式中的方法。In a fourteenth aspect, a computer-readable storage medium is provided for storing a computer program that causes a computer to execute the method in any of the possible implementation manners of the second aspect or the fifth aspect described above.
第十五方面,提供了一种计算机程序产品,包括计算机程序指令,该计算机程序指令使得计算机执行上述第一方面、第三方面、第四方面或第六方面中的任意可能的实现方式中的方法。According to a fifteenth aspect, a computer program product is provided, including computer program instructions that cause a computer to execute any of the possible implementation manners in the first aspect, the third aspect, the fourth aspect, or the sixth aspect described above. method.
第十六方面,提供了一种计算机程序产品,包括计算机程序指令,该计算机程序指令使得计算机执行上述第二方面或第五方面中的任意可能的实现方式中的方法。In a sixteenth aspect, a computer program product is provided, including computer program instructions that cause a computer to execute the method in any of the possible implementation manners of the second aspect or the fifth aspect described above.
第十七方面,提供了一种计算机程序,当其在计算机上运行时,使得计算机执行上述第一方面、第三方面、第四方面或第六方面中的任意可能的实现方式中的方法。A seventeenth aspect provides a computer program that, when run on a computer, causes the computer to execute the method in any of the possible implementation manners of the first aspect, the third aspect, the fourth aspect, or the sixth aspect described above.
第十八方面,提供了一种计算机程序,当其在计算机上运行时,使得计算机执行上述第二方面或第五方面中的任意可能的实现方式中的方法。In an eighteenth aspect, a computer program is provided that, when run on a computer, causes the computer to perform the method in any of the possible implementations of the second or fifth aspect described above.
本申请提供的技术方案,桥接设备上所有虚拟服务端的端点与桥接设备的端点都相同,相比于传统方案,桥接设备上的端点数量会减少,这样可以降低桥接设备对端点的维护成本。为了区分不同的平台资源和设备资源,虚拟服务端的平台资源、设备资源不再使用固定的统一资源标识符,而是将虚拟服务端的平台资源的统一资源标识符和桥接设备的平台资源的统一资源标识符设置为不同,将虚拟服务端的设备资源的统一资源标识符和桥接设备的设备资源的统一资源标识符设置为不同。In the technical solution provided in this application, the endpoints of all the virtual server end on the bridge device are the same as the endpoints of the bridge device. Compared with the traditional solution, the number of endpoints on the bridge device will be reduced, which can reduce the maintenance cost of the endpoint by the bridge device. In order to distinguish between different platform resources and device resources, the platform resources and device resources of the virtual server no longer use fixed uniform resource identifiers. Instead, the unified resource identifiers of the platform resources of the virtual server and the unified resources of the platform resources of the bridge device are used. The identifiers are set differently, and the uniform resource identifier of the device resource of the virtual server and the uniform resource identifier of the device resource of the bridge device are set differently.
端点和通信通道相关,端点减少后,桥接设备建立的客户端与桥接设备之间的通信通道就会减少,通信通道的减少能够减少资源的开销,且桥接设备只需要维护一个通信通道,从而能够降低桥接设备的通信复杂度。The endpoint is related to the communication channel. After the endpoint is reduced, the communication channel between the client established by the bridge device and the bridge device will be reduced. The reduction of the communication channel can reduce the resource overhead, and the bridge device only needs to maintain one communication channel. Reduce the communication complexity of bridge devices.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1是本申请实施例提供的一种桥接设备与OCF设备进行通信的示意图。FIG. 1 is a schematic diagram of communication between a bridge device and an OCF device according to an embodiment of the present application.
图2是本申请实施例提供的一种桥接通信的方法的示意性流程图。FIG. 2 is a schematic flowchart of a bridge communication method according to an embodiment of the present application.
图3是本申请实施例提供的另一种桥接通信的方法的示意性流程图。FIG. 3 is a schematic flowchart of another bridge communication method according to an embodiment of the present application.
图4是本申请实施例提供的另一种桥接通信的方法的示意性流程图。FIG. 4 is a schematic flowchart of another bridge communication method according to an embodiment of the present application.
图5是本申请实施例提供的另一种桥接通信的方法的示意性流程图。FIG. 5 is a schematic flowchart of another bridge communication method according to an embodiment of the present application.
图6是本申请实施例提供的另一种桥接通信的方法的示意性流程图。FIG. 6 is a schematic flowchart of another bridge communication method according to an embodiment of the present application.
图7是本申请实施例提供的另一种桥接通信的方法的示意性流程图。FIG. 7 is a schematic flowchart of another bridge communication method according to an embodiment of the present application.
图8是本申请实施例提供的一种桥接设备的示意性框图。FIG. 8 is a schematic block diagram of a bridge device according to an embodiment of the present application.
图9是本申请实施例提供的一种第一通信协议设备的示意性框图。FIG. 9 is a schematic block diagram of a first communication protocol device according to an embodiment of the present application.
图10是本申请实施例提供的另一种桥接设备的示意性框图。FIG. 10 is a schematic block diagram of another bridge device according to an embodiment of the present application.
图11是本申请实施例提供的另一种桥接设备的示意性框图。FIG. 11 is a schematic block diagram of another bridge device according to an embodiment of the present application.
图12是本申请实施例提供的另一种第一通信协议设备的示意性框图。FIG. 12 is a schematic block diagram of another first communication protocol device according to an embodiment of the present application.
图13是本申请实施例提供的另一种桥接设备的示意性框图。FIG. 13 is a schematic block diagram of another bridge device according to an embodiment of the present application.
图14是本申请实施例提供的一种通信设备的示意性结构图。FIG. 14 is a schematic structural diagram of a communication device according to an embodiment of the present application.
图15是本申请实施例提供的一种芯片的示意性结构图。FIG. 15 is a schematic structural diagram of a chip according to an embodiment of the present application.
图16是本申请实施例提供的一种通信系统的示意性框图。FIG. 16 is a schematic block diagram of a communication system according to an embodiment of the present application.
具体实施方式detailed description
下面将结合附图,对本申请实施例中的技术方案进行描述。The technical solutions in the embodiments of the present application will be described below with reference to the drawings.
随着技术的发展,物联网作为未来信息网络领域发展的重要方向之一,在世界范围内受到了广泛的关注。但是,目前不同的厂家使用不同的生态链协议(也可以称为通信协议),导致不同厂家生产的产品之间不能通信,不能达到真正的万物互联。With the development of technology, the Internet of Things, as one of the important directions for the development of the information network field in the future, has received widespread attention worldwide. However, at present, different manufacturers use different ecological chain protocols (also called communication protocols), resulting in products that cannot be communicated between different manufacturers and cannot achieve true interconnection of all things.
桥接设备可以实现不同协议之间的转换,从而可以实现采用不同协议的设备之间的通信。以OCF设备为例,桥接设备可以为OCF设备创建虚拟OCF服务端,这样OCF客户端可以和虚拟OCF服务端通过OCF协议进行通信,虚拟OCF服务端可以和非OCF设备以非OCF协议进行通信,这样就可以实现OCF设备和非OCF设备之间的通信。The bridge device can realize the conversion between different protocols, so that the communication between the devices using different protocols can be realized. Taking the OCF device as an example, the bridge device can create a virtual OCF server for the OCF device, so that the OCF client can communicate with the virtual OCF server through the OCF protocol, and the virtual OCF server can communicate with the non-OCF device through the non-OCF protocol. This allows communication between OCF devices and non-OCF devices.
本申请实施例仅是以OCF协议为例,桥接设备也可以实现任意多种通信协议设备之间的转换。例如,桥接设备可以实现受限制的应用协议(constrained application protocol,CoAP)设备和蓝牙设备之间的通信,也可以实现wifi设备与紫蜂(zigbee)设备之间的通信。The embodiment of the present application only uses the OCF protocol as an example, and the bridge device can also implement conversion between any multiple communication protocol devices. For example, the bridge device can implement communication between a restricted application protocol (CoAP) device and a Bluetooth device, and can also implement communication between a wifi device and a zigbee device.
可选地,本申请实施例中的通信协议也可以是为了统一物联网而产生的其他协议。Optionally, the communication protocols in the embodiments of the present application may also be other protocols generated for unifying the Internet of Things.
可选地,桥接设备可以仅支持两种不同通信协议设备之间的通信,也可以同时支持多种不同通信协议设备之间的通信。Optionally, the bridge device may only support communication between two different communication protocol devices, and may also support communication between multiple different communication protocol devices at the same time.
为方便描述,下面以OCF为例进行描述。For ease of description, the following uses OCF as an example.
OCF是新兴的物联网应用层技术标准组织,为了实现真正的万物互联,OCF希望制定统一的物联网标准,实现跨越不同的操作系统和平台,实现安全、可靠的设备发现和连接机制。OCF is an emerging technology standard organization for the Internet of Things application layer. In order to achieve true interconnection of all things, OCF hopes to formulate a unified Internet of Things standard, to achieve safe and reliable device discovery and connection mechanisms across different operating systems and platforms.
OCF为物联网应用程序、设备和平台提供通用表征性状态转移(representational state transfer,Restful)架构,OCF的Restful架构将物联网实体及其服务能力表征为OCF资源。在restful架构下,所有的物理实体可以被描述为资源,通过资源的形式暴露给外部世界,实体的状态通过资源表征来描述,每个资源都具有自己的统一资源标识符(uniform resource identifier,URI)和可以支持的接口类型。提供资源的实体是OCF服务端,访问资源的实体是OCF客户端。例如,获取室内环境状态数据的智能手机的移动应用程序是OCF客户端,监测室内环境状态数据的传感器是OCF服务端。OCF客户端和OCF服务端的业务交互是通过对OCF资源的创建、读取、更新、删除或者通知这些资源操作方法而实现。OCF provides a universal representational state transfer (Restful) architecture for IoT applications, devices, and platforms. OCF's Restful architecture characterizes IoT entities and their service capabilities as OCF resources. In a restful architecture, all physical entities can be described as resources and exposed to the outside world in the form of resources. The state of the entity is described by resource representation. Each resource has its own uniform resource identifier (URI ) And the types of interfaces that can be supported. The entity that provides the resource is the OCF server, and the entity that accesses the resource is the OCF client. For example, the mobile application of the smartphone that obtains the indoor environment status data is an OCF client, and the sensor that monitors the indoor environment status data is an OCF server. The business interaction between the OCF client and the OCF server is achieved through the operation methods of creating, reading, updating, deleting, or notifying these OCF resources.
OCF资源的表征包括:资源URI、资源类型、接口等,具体的定义如下。The characteristics of OCF resources include: resource URI, resource type, interface, etc. The specific definitions are as follows.
资源URI:在OCF资源表征中用“href”标识,提供OCF服务端资源的地址。“href”的值是具体的资源URI,OCF客户端通过资源URI来访问OCF服务端的资源。Resource URI: It is identified by "href" in the OCF resource characterization and provides the address of the OCF server resource. The value of "href" is a specific resource URI. The OCF client accesses the resources of the OCF server through the resource URI.
资源类型:在OCF资源表征中用“rt”表示,表示资源的类型。Resource type: It is represented by "rt" in OCF resource characterization, which indicates the type of resource.
接口:在OCF资源保证中用“if”表示,提供对资源的查看以及资源支持的响应。Interface: It is indicated by "if" in OCF resource guarantee, and provides a response to resource viewing and resource support.
为了便于OCF设备及资源的发现,OCF还定义了OCF设备都支持的核心资源。OCF核心资源包括平台资源和设备资源,一个平台资源可以包括一个或多个OCF设备实例。平台资源为设备实例资源的宿主资源,设备资源用于描述一个平台资源上所有的OCF设备实例资源的公共信息。To facilitate the discovery of OCF equipment and resources, OCF also defines core resources that are supported by OCF equipment. OCF core resources include platform resources and device resources. A platform resource can include one or more OCF device instances. Platform resources are host resources for device instance resources. Device resources are used to describe the common information of all OCF device instance resources on a platform resource.
下面对平台资源和设备资源的资源表征进行描述:The following describes the resource representation of platform resources and device resources:
平台资源:提供OCF设备所属平台的相关信息,平台资源的URI固定为“/oic/p”,平台资源的资源类型为“oic.wk.p”。Platform resource: Provides information about the platform to which the OCF device belongs. The URI of the platform resource is fixed to "/ oic / p", and the resource type of the platform resource is "oic.wk.p".
设备资源:提供具体的OCF设备的相关的信息,设备资源的URI固定为“/oic/d”,设备资源的资源类型为“oic.wk.d”。此外,设备资源的资源类型还可以包括一个或多个与设备特性相关的资源类型。例如,桥接设备的资源类型包括“oic.wk.d”和“oic.d.bridge”,表示这个设备支持桥接资源类型。又例如灯的资源类型包括“oic.wk.d”和“oic.d.light”,表示这个设备支持灯的资源类型。Device resource: Provides information about specific OCF devices. The URI of the device resource is fixed at "/ oic / d", and the resource type of the device resource is "oic.wk.d". In addition, the resource type of the device resource may also include one or more resource types related to device characteristics. For example, the resource type of the bridge device includes "oic.wk.d" and "oic.d.bridge", which means that this device supports the bridge resource type. For another example, the resource type of the lamp includes "oic.wk.d" and "oic.d.light", which indicates that the device supports the resource type of the lamp.
另外,由于OCF标准协议在传输层采用CoAP承载OCF消息,因此,为了实现OCF客户端与OCF服务端之间的通信,每个OCF服务端需要具有端点。每一个OCF设备必须关联至少一个端点用于发送和接收消息。其中,端点可以理解为通信协议的通信地址,用于OCF设备交换消息。例如,对于CoAP协议来说,端点可以为IP地址和UDP端口号。In addition, since the OCF standard protocol uses CoAP to carry OCF messages at the transport layer, in order to achieve communication between the OCF client and the OCF server, each OCF server needs to have an endpoint. Each OCF device must be associated with at least one endpoint for sending and receiving messages. The endpoint can be understood as the communication address of the communication protocol, which is used by the OCF device to exchange messages. For example, for the CoAP protocol, the endpoint can be an IP address and a UDP port number.
OCF客户端可以向OCF服务端发送资源操作请求消息,该资源操作请求消息中可以携带资源操作方法,该资源操作方法例如可以是创建资源、读取资源、更新资源、删除资源等操作。OCF服务端可以向OCF客户端返回资源操作响应消息,资源操作响应消息中携带所请求的资源的表征。The OCF client may send a resource operation request message to the OCF server. The resource operation request message may carry a resource operation method. The resource operation method may be, for example, operations such as creating a resource, reading a resource, updating a resource, or deleting a resource. The OCF server may return a resource operation response message to the OCF client, and the resource operation response message carries a representation of the requested resource.
目前,物联网应用中还存在很多非OCF设备,非OCF设备是指不支持OCF标准协议的物联网设备。例如,zigbee设备,z-wave设备,蓝牙设备等,将非OCF设备接入到OCF系统中可以实现非OCF设备和OCF设备的通信,扩大物联网设备互联互通的范围。At present, there are many non-OCF devices in IoT applications. Non-OCF devices refer to IoT devices that do not support the OCF standard protocol. For example, zigbee devices, z-wave devices, Bluetooth devices, etc., connecting non-OCF devices to the OCF system can realize communication between non-OCF devices and OCF devices, and expand the scope of interconnection and interoperability of IoT devices.
为了将OCF设备接入到OCF系统中,OCF定义了设备桥接通信机制,通过OCF桥接设备可以实现OCF设备与非OCF设备之间的通信。OCF桥接设备可以将非OCF设备映射为虚拟OCF服务端,并进行OCF协议和非OCF协议的转换,从而OCF客户端可以和非OCF设备进行通信,进而实现OCF设备与非OCF设备的通信。In order to connect OCF devices to the OCF system, OCF defines a device bridging communication mechanism. Through OCF bridging devices, communication between OCF devices and non-OCF devices can be realized. The OCF bridge device can map a non-OCF device to a virtual OCF server and perform conversion between the OCF protocol and the non-OCF protocol, so that the OCF client can communicate with the non-OCF device, thereby realizing communication between the OCF device and the non-OCF device.
下面结合图1,对OCF设备和非OCF设备之间的通信方式进行描述。The following describes the communication mode between the OCF device and the non-OCF device with reference to FIG. 1.
OCF桥接设备可以将非OCF设备映射为虚拟OCF服务端1,将非OCF设备映射为虚拟OCF服务端2。客户端可以通过OCF协议和虚拟OCF服务端1、虚拟OCF服务端2进行通信,桥接设备可以将OCF客户端的请求转换为非OCF协议的指令发送给非OCF设备1和非OCF设备2。The OCF bridge device can map a non-OCF device to a virtual OCF server 1 and a non-OCF device to a virtual OCF server 2. The client can communicate with the virtual OCF server 1 and the virtual OCF server 2 through the OCF protocol, and the bridge device can convert the request from the OCF client to a non-OCF protocol instruction and send it to the non-OCF device 1 and the non-OCF device 2.
由于OCF设备的平台资源和设备资源都采用的是固定的URI,因此虚拟OCF服务端1、虚拟OCF服务端2和桥接设备的平台资源、设备资源的URI都是相同的。也就是说,虚拟OCF服务端1和虚拟OCF服务端2的平台资源的URI都是“/oic/p”,设备资源的URI都是“/oic/d”。为了区分不同的平台资源和设备资源,虚拟OCF服务端1和虚拟OCF服务端2必须拥有自己的端点,OCF桥接设备、虚拟OCF服务端1、虚拟OCF服务端2的端点不同。如图1所示,OCF桥接设备的端点为端点1,虚拟OCF服务端1的端点为端点2,虚拟OCF服务端2的端点为端点3。Because the platform resources and device resources of the OCF device both use fixed URIs, the URIs of the platform resources and device resources of the virtual OCF server 1, virtual OCF server 2, and the bridge device are the same. In other words, the URIs of the platform resources of the virtual OCF server 1 and the virtual OCF server 2 are "/ oic / p", and the URIs of the device resources are "/ oic / d". In order to distinguish between different platform resources and device resources, virtual OCF server 1 and virtual OCF server 2 must have their own endpoints. OCF bridge devices, virtual OCF server 1, and virtual OCF server 2 have different endpoints. As shown in FIG. 1, the endpoint of the OCF bridge device is endpoint 1, the endpoint of virtual OCF server 1 is endpoint 2, and the endpoint of virtual OCF server 2 is endpoint 3.
例如,桥接设备的端点可以为“coap://[fe80::b1d6]:44444”,虚拟OCF服务端1的端点可以为“coap://[2001:db8:b::c2e5]:11111”,虚拟OCF服务端2的端点可以为“coap://[2001:db8:b::c2e5]:22222”。For example, the endpoint of the bridge device can be "coap: // [fe80 :: b1d6]: 44444", and the endpoint of the virtual OCF server 1 can be "coap: // [2001: db8: b :: c2e5]: 11111" The endpoint of the virtual OCF server 2 can be "coap: // [2001: db8: b :: c2e5]: 22222".
下面以非OCF设备1为灯(light),非OCF设备2为烤箱(oven)为例,对桥接设备、虚拟OCF服务端1和虚拟OCF服务端2的资源表征进行描述。以下资源表征仅是举例说明,并不会对本申请实施例造成限定。The following uses the non-OCF device 1 as a light and the non-OCF device 2 as an oven as an example to describe the resource characterization of the bridge device, the virtual OCF server 1 and the virtual OCF server 2. The following resource characterization is only an example, and does not limit the embodiments of the present application.
桥接设备的资源表征如下:The resources of the bridge device are characterized as follows:
桥接设备的平台资源的URI为“/oic/p”,平台资源的资源类型为“oic.wk.p”,平台资源的接口为“oic.if.r”和“oic.if.baseline”,平台资源的端点为“coap://[fe80::b1d6]:44444”。The URI of the platform resource of the bridge device is "/ oic / p", the resource type of the platform resource is "oic.wk.p", and the interface of the platform resource is "oic.if.r" and "oic.if.baseline", The endpoint of the platform resource is "coap: // [fe80 :: b1d6]: 44444".
桥接设备的设备资源的URI为“/oic/d”,设备资源的资源类型为“oic.wk.d”和“oic.d.bridge”,设备资源的接口为“oic.if.r”和“oic.if.baseline”,设备资源的端点为“coap://[fe80::b1d6]:44444”。The URI of the device resource of the bridge device is "/ oic / d", the resource type of the device resource is "oic.wk.d" and "oic.d.bridge", and the interface of the device resource is "oic.if.r" and "Oic.if.baseline", the endpoint of the device resource is "coap: // [fe80 :: b1d6]: 44444".
虚拟OCF服务端1的资源表征如下:The resource representation of the virtual OCF server 1 is as follows:
虚拟OCF服务端1的平台资源的URI为“/oic/p”,平台资源的资源类型为“oic.wk.p”,平台资源的接口为“oic.if.r”和“oic.if.baseline”,平台资源的端点为“coap://[2001:db8:b::c2e5]:11111”。The platform resource URI of the virtual OCF server 1 is "/ oic / p", the resource type of the platform resource is "oic.wk.p", and the interface of the platform resource is "oic.if.r" and "oic.if." baseline ", the endpoint of the platform resource is" coap: // [2001: db8: b :: c2e5]: 11111 ".
虚拟OCF服务端1的设备资源的URI为“/oic/d”,设备资源的资源类型为“oic.wk.d”和“oic.d.light”,设备资源的接口为“oic.if.r”和“oic.if.baseline”,设备资源的端点为“coap://[2001:db8:b::c2e5]:11111”。The device resource URI of the virtual OCF server 1 is "/ oic / d", the resource type of the device resource is "oic.wk.d" and "oic.d.light", and the interface of the device resource is "oic.if." r "and" oic.if.baseline ", the endpoint of the device resource is" coap: // [2001: db8: b :: c2e5]: 11111 ".
虚拟OCF服务端1的设备实例资源的URI为“/myLightSwitch”,设备实例资源的资源类型为“oic.r.switch.binary”,设备实例资源的接口为“oic.if.a”和“oic.if.baseline”,设备实例资源的端点为“coap://[2001:db8:b::c2e5]:11111”。The device instance resource URI of virtual OCF server 1 is "/ myLightSwitch", the resource type of the device instance resource is "oic.r.switch.binary", and the interface of the device instance resource is "oic.if.a" and "oic .if.baseline ", the endpoint of the device instance resource is" coap: // [2001: db8: b :: c2e5]: 11111 ".
虚拟OCF服务端2的资源表征如下:The resource representation of the virtual OCF server 2 is as follows:
虚拟OCF服务端2的平台资源的URI为“/oic/p”,平台资源的资源类型为“oic.wk.p”,平台资源的接口为“oic.if.r”和“oic.if.baseline”,平台资源的端点为“coap://[2001:db8:b::c2e5]:22222”。The platform resource URI of the virtual OCF server 2 is "/ oic / p", the resource type of the platform resource is "oic.wk.p", and the interface of the platform resource is "oic.if.r" and "oic.if." baseline ", the endpoint of the platform resource is" coap: // [2001: db8: b :: c2e5]: 22222 ".
虚拟OCF服务2的设备资源的URI为“/oic/d”,设备资源的资源类型为“oic.wk.d”和“oic.d.oven”,设备资源的接口为“oic.if.r”和“oic.if.baseline”,设备资源的端点为“coap://[2001:db8:b::c2e5]:22222”。The URI of the device resource of the virtual OCF service 2 is "/ oic / d", the resource type of the device resource is "oic.wk.d" and "oic.d.oven", and the interface of the device resource is "oic.if.r" "And" oic.if.baseline ", the endpoint of the device resource is" coap: // [2001: db8: b :: c2e5]: 22222 ".
虚拟OCF服务端2的设备实例资源的URI为“/myOven”,设备实例资源的资源类型为“oic.r.switch.binary”和“oic.r.temperature”,设备实例资源的接口为“oic.if.a”和“oic.if.baseline”,设备实例资源的端点为“coap://[2001:db8:b::c2e5]:22222”。The device instance resource URI of the virtual OCF server 2 is "/ myOven", the resource type of the device instance resource is "oic.r.switch.binary" and "oic.r.temperature", and the interface of the device instance resource is "oic" .if.a "and" oic.if.baseline ", the endpoint of the device instance resource is" coap: // [2001: db8: b :: c2e5]: 22222 ".
从图1可以看出,传统方案中,为了区分不同的平台资源和设备资源,桥接设备上映射的每一个虚拟OCF服务端都有自己的端点,虚拟OCF服务端的端点与桥接设备的端点不同。当桥接设备连接大量非OCF设备时,OCF桥接设备需要维护大量端点,造成端点维护的成本较大。其次,端点与传输协议相关,端点越多,设备的通信复杂度越高。例如,对于CoAP协议来说,端点越多,分配的互联网协议(internet protocol,IP)地址和用户数据报协议(user datagram protocol,UDP)端口号就越多,OCF客户端发送请求消息关联到正确的端点的难度就会增加,从而增加通信的复杂度。It can be seen from FIG. 1 that in the traditional solution, in order to distinguish different platform resources and device resources, each virtual OCF server mapped on the bridge device has its own endpoint, and the endpoint of the virtual OCF server is different from the endpoint of the bridge device. When a bridge device is connected to a large number of non-OCF devices, the OCF bridge device needs to maintain a large number of endpoints, which results in a higher cost of endpoint maintenance. Secondly, the endpoints are related to the transmission protocol. The more endpoints, the higher the communication complexity of the device. For example, for the CoAP protocol, the more endpoints there are, the more Internet protocol (IP) addresses and user datagram protocol (UDP) port numbers are assigned, and the OCF client sends a request message to the correct association. The difficulty of the endpoints increases, which increases the complexity of the communication.
本申请实施例提供了一种桥接通信的方法,能够降低端点的维护成本,及降低设备通信的复杂度。The embodiments of the present application provide a method for bridging communication, which can reduce the maintenance cost of endpoints and reduce the complexity of device communication.
下面结合图2,对本申请实施例的桥接通信的方法进行详细描述。如图2所示,该方法包括步骤S210-S220。The method for bridging communication in the embodiment of the present application is described in detail below with reference to FIG. 2. As shown in FIG. 2, the method includes steps S210-S220.
在S210中,桥接设备接收第一通信协议客户端发送的资源发现请求消息。In S210, the bridge device receives a resource discovery request message sent by the first communication protocol client.
第一通信协议客户端可以指该客户端可以通过第一通信协议与桥接设备进行通信。该第一通信协议客户端可以为物联网中的客户端。The first communication protocol client may mean that the client can communicate with the bridge device through the first communication protocol. The first communication protocol client may be a client in the Internet of Things.
资源发现请求消息可以用于发现桥接设备上的所有资源。例如,该资源发现请求消息可以用于发现桥接设备上所有虚拟服务端的资源信息。The resource discovery request message can be used to discover all resources on the bridge device. For example, the resource discovery request message may be used to discover resource information of all virtual servers on the bridge device.
可选地,桥接设备接收到第一通信协议客户端发送的资源发现请求消息时,可以将桥接设备上所有第一通信协议虚拟服务端的相关信息发送给该第一通信协议客户端。Optionally, when the bridge device receives the resource discovery request message sent by the first communication protocol client, it may send related information of all the first communication protocol virtual servers on the bridge device to the first communication protocol client.
本申请实施例对第一通信协议和第二通信协议不作具体限定,只要第一通信协议和第二通信协议为两种不同的协议即可。例如,第一通信协议可以为物联网中的通信协议,第二通信协议为非物联网中的通信协议。又例如,第一通信协议可以为zigbee协议,第二通信协议可以为蓝牙协议。或者,第一通信协议可以为OCF协议,第二通信协议可以为非OCF协议。也就是说,第一通信协议客户端可以为OCF客户端,第二通信协议设备可以为非OCF设备,第一通信协议虚拟服务端可以为虚拟OCF服务端。The embodiment of the present application does not specifically limit the first communication protocol and the second communication protocol, as long as the first communication protocol and the second communication protocol are two different protocols. For example, the first communication protocol may be a communication protocol in the Internet of Things, and the second communication protocol is a communication protocol in a non-Internet of Things. As another example, the first communication protocol may be a zigbee protocol, and the second communication protocol may be a Bluetooth protocol. Alternatively, the first communication protocol may be an OCF protocol, and the second communication protocol may be a non-OCF protocol. That is, the first communication protocol client may be an OCF client, the second communication protocol device may be a non-OCF device, and the first communication protocol virtual server may be a virtual OCF server.
可选地,非OCF协议可以为zigbee、z-wave或者蓝牙等。Optionally, the non-OCF protocol may be zigbee, z-wave, or Bluetooth.
桥接设备在为第二通信协议设备创建第一通信协议虚拟服务端时,可以为第二通信协议设备创建平台资源、设备资源以及端点。为了降低通信复杂度,桥接设备可以为创建的虚拟服务端设置相同的端点,通过平台资源和设备资源的URI不同来区分不同的第二通信协议设备。When the bridge device creates the first communication protocol virtual server for the second communication protocol device, it can create platform resources, device resources, and endpoints for the second communication protocol device. In order to reduce the communication complexity, the bridging device may set the same endpoint for the created virtual server, and distinguish the different second communication protocol devices through different URIs of platform resources and device resources.
下面以第一通信协议为OCF协议为例,对桥接设备和虚拟OCF服务端的资源信息、端点信息进行描述。The following uses the first communication protocol as the OCF protocol as an example to describe the resource information and endpoint information of the bridge device and the virtual OCF server.
当桥接设备的端点为“coap://[fe80::b1d6]:44444”时,桥接设备为所有非OCF设备创建的虚拟OCF服务端的端点都为“coap://[fe80::b1d6]:44444”。When the endpoint of the bridge device is "coap: // [fe80 :: b1d6]: 44444", the endpoint of the virtual OCF server created by the bridge device for all non-OCF devices is "coap: // [fe80 :: b1d6]: 44444 ".
虚拟OCF服务端的平台资源的URI不再使用固定的“/oic/p”,虚拟OCF服务端的设备资源也不再使用固定的“/oic/d”。虚拟OCF服务端可以使用不同于桥接设备的平台资源和设备资源的URI。The platform resource URI of the virtual OCF server no longer uses the fixed "/ oic / p", and the device resource of the virtual OCF server no longer uses the fixed "/ oic / d". The virtual OCF server can use platform resource and device resource URIs different from the bridge device.
对于虚拟OCF服务端使用的平台资源和设备资源的URI的情况,本申请实施例可以不做具体限定。For the URIs of the platform resources and device resources used by the virtual OCF server, the embodiments of the present application may not specifically limit them.
例如,桥接设备可以对创建的虚拟OCF服务端进行编号,将编号顺序添加在虚拟OCF服务端的平台资源和设备资源的URI中,这样可以通过URI来区分不同的平台资源和设备资源。For example, the bridge device may number the created virtual OCF server, and add the number sequence to the URI of the platform and device resources of the virtual OCF server, so that different platform resources and device resources can be distinguished by the URI.
又例如,桥接设备在为非OCF设备创建虚拟OCF服务端时,可以将映射的虚拟OCF服务端的平台资源和设备资源的URI中添加非OCF设备的设备标识,由于不同的非OCF设备具有不同的设备标识,这样就可以通过非OCF设备的设备标识来区分不同的平台资源和设备资源。As another example, when a bridge device creates a virtual OCF server for a non-OCF device, the bridge resource can add the device identifier of the non-OCF device to the mapped resource of the platform resource and device resource of the virtual OCF server. Device identification, so that different platform resources and device resources can be distinguished by the device identification of non-OCF devices.
具体地,非OCF设备1的设备标识为“light_device_id”,非OCF设备1在桥接设备上映射的服务端为虚拟OCF服务端1,则虚拟OCF服务端1的平台资源的URI可以为“/di/light_device_id/oic/p”,虚拟OCF服务端1的设备资源的URI可以为“/di/light_device_id/oic/d”。非OCF设备2的设备标识为“/di/oven_device_id”,非OCF设备2在桥接设备上映射的服务端为虚拟OCF服务端2,则虚拟OCF服务端2的平台资源的URI可以为“/di/oven_device_id/oic/d”,虚拟OCF服务端2的设备资源的URI可以为“/di/oven_device_id/oic/d”。Specifically, the device identifier of the non-OCF device 1 is "light_device_id", and the server mapped by the non-OCF device 1 on the bridge device is the virtual OCF server 1, and the URI of the platform resource of the virtual OCF server 1 can be "/ di / light_device_id / oic / p ", the URI of the device resource of the virtual OCF server 1 may be" / di / light_device_id / oic / d ". The device identifier of the non-OCF device 2 is "/ di / oven_device_id", and the server mapped by the non-OCF device 2 on the bridge device is the virtual OCF server 2. The URI of the platform resource of the virtual OCF server 2 can be "/ di / oven_device_id / oic / d ", the URI of the device resource of the virtual OCF server 2 may be" / di / oven_device_id / oic / d ".
桥接设备在在接收到第一通信协议客户端发送的资源发现请求消息后,可以将桥接设备上所有的虚拟服务端的相关信息发送给该第一通信协议客户端。After receiving the resource discovery request message sent by the first communication protocol client, the bridge device may send relevant information of all virtual servers on the bridge device to the first communication protocol client.
在S220中,桥接设备向第一通信协议客户端发送资源发现响应消息,该资源发现响应消息中包括 第一通信协议虚拟服务端的信息。In S220, the bridge device sends a resource discovery response message to the first communication protocol client, and the resource discovery response message includes information of the first communication protocol virtual server.
第一通信协议虚拟服务端的信息包括第一通信协议虚拟服务端的端点平台资源的URI和/或设备资源的URI等。The information of the first communication protocol virtual server includes a URI of an endpoint platform resource and / or a device resource URI of the first communication protocol virtual server.
可选地,第一通信协议虚拟服务端的信息还可以包括第一通信协议虚拟服务端的接口和资源类型等。Optionally, the information of the first communication protocol virtual server may further include an interface and a resource type of the first communication protocol virtual server.
以OCF为例,该虚拟OCF服务端的信息包括虚拟OCF服务端的端点,平台资源的URI和/或设备资源的URI等。Taking OCF as an example, the information of the virtual OCF server includes the endpoint of the virtual OCF server, the URI of the platform resource, and / or the URI of the device resource.
虚拟OCF服务端的端点,平台资源的URI和/或设备资源的URI的具体情况看可以参照上文描述,为避免重复,此处不再赘述。For details of the endpoint of the virtual OCF server, the URI of the platform resource and / or the URI of the device resource, please refer to the description above. To avoid repetition, details are not described here.
此外,该虚拟OCF服务端的信息还包括以下信息中的至少一种:虚拟OCF服务端的接口和资源类型。In addition, the information of the virtual OCF server further includes at least one of the following information: the interface and resource type of the virtual OCF server.
虚拟OCF服务端的接口例如可以为“oic.if.baseline”。虚拟OCF服务端的平台资源的资源类型例如可以为“oic.wk.p”。对于虚拟OCF服务端1来说,设备资源的资源类型例如可以为“oic.wk.d”和“oic.d.light”。对于虚拟OCF服务端2来说,设备资源的资源类型例如可以为“oic.wk.d”和“oic.d.oven”。The interface of the virtual OCF server may be, for example, "oic.if.baseline". The resource type of the platform resource of the virtual OCF server may be, for example, "oic.wk.p". For the virtual OCF server 1, the resource types of the device resources may be, for example, "oic.wk.d" and "oic.d.light". For the virtual OCF server 2, the resource types of the device resources may be, for example, "oic.wk.d" and "oic.d.oven".
本申请提供的技术方案,桥接设备上所有虚拟服务端的端点与桥接设备的端点都相同,相比于传统方案,桥接设备上的端点数量会减少,这样可以降低桥接设备对端点的维护成本。为了区分不同的平台资源和设备资源,虚拟服务端的平台资源、设备资源不再使用固定的URI,而是将虚拟服务端的平台资源的URI和桥接设备的平台资源的URI设置为不同,将虚拟服务端的设备资源的URI和桥接设备的设备资源的URI设置为不同。In the technical solution provided in this application, the endpoints of all virtual server ends on the bridge device are the same as the endpoints of the bridge device. Compared with the traditional solution, the number of endpoints on the bridge device will be reduced, which can reduce the maintenance cost of the bridge device to the endpoint. In order to distinguish between different platform resources and device resources, the platform resources and device resources of the virtual server no longer use fixed URIs. Instead, the URIs of the platform resources of the virtual server and the URIs of the platform resources of the bridge device are set to be different. The URI of the device resource at the end and the URI of the device resource of the bridge device are set differently.
采用本申请实施例的通信方法,能够减少桥接设备中的端点数量,从而能够降低桥接设备的通信复杂度。By adopting the communication method in the embodiment of the present application, the number of endpoints in the bridge device can be reduced, and thus the communication complexity of the bridge device can be reduced.
具体地,端点用于网络层的传输,端点和通信通道相关,桥接设备上的端点减少后,桥接设备建立的客户端与桥接设备之间的通信通道就会减少,通信通道的减少能够减少资源的开销,降低网络层的复杂度。且桥接设备只需要维护一个通信通道,从而能够降低桥接设备的通信复杂度。Specifically, the endpoint is used for transmission at the network layer. The endpoint is related to the communication channel. After the endpoint on the bridge device is reduced, the communication channel between the client and the bridge device established by the bridge device will be reduced. The reduction of the communication channel can reduce resources Overhead, reducing the complexity of the network layer. And the bridge device only needs to maintain one communication channel, so that the communication complexity of the bridge device can be reduced.
应理解,桥接设备在建立通信通道时,可以根据传输协议来建立传输通道。例如,对于使用coap协议的客户端,桥接设备建立的客户端与桥接设备之间的通信通道是基于coap协议建立的。It should be understood that when a bridge device establishes a communication channel, it can establish a transmission channel according to a transmission protocol. For example, for a client using the COAP protocol, the communication channel between the client established by the bridge device and the bridge device is established based on the COAP protocol.
可选地,第一通信协议虚拟服务端的资源还包括设备实例资源,资源响应消息中可以包括设备实例资源的URI。Optionally, the resources of the first communication protocol virtual server further include a device instance resource, and the resource response message may include a URI of the device instance resource.
桥接设备可以接收第一通信协议客户端发送的资源操作请求消息,该资源操作请求消息中包括第一通信协议虚拟服务端的设备实例资源的URI。设备实例资源的URI用于标识第一通信协议客户端所请求的设备。The bridge device may receive a resource operation request message sent by the first communication protocol client, and the resource operation request message includes the URI of the device instance resource of the first communication protocol virtual server. The URI of the device instance resource is used to identify the device requested by the first communication protocol client.
例如,桥接设备可以接收OCF客户端发送的资源操作请求消息,该资源操作请求消息中可以包括虚拟OCF服务端的设备实例资源的URI,该实例资源的URI用于标识OCF客户端所请求的设备。For example, the bridge device may receive a resource operation request message sent by the OCF client. The resource operation request message may include a URI of a device instance resource of the virtual OCF server, and the URI of the instance resource is used to identify the device requested by the OCF client.
该资源操作请求消息中还可以包括以下信息中的至少一种:设备实例资源的接口、设备实例资源的资源类型、资源操作方法和设备实例资源的属性值。The resource operation request message may further include at least one of the following information: an interface of the device instance resource, a resource type of the device instance resource, a resource operation method, and an attribute value of the device instance resource.
例如,对于虚拟OCF服务端1来说,设备实例资源的接口可以为“oic.if.a”和“oic.if.baseline”,设备实例资源的资源类型可以为“oic.r.switch.binary”。For example, for virtual OCF server 1, the interface of the device instance resource can be "oic.if.a" and "oic.if.baseline", and the resource type of the device instance resource can be "oic.r.switch.binary" ".
对于虚拟OCF服务端2来说,设备实例资源的接口可以为“oic.if.a”和“oic.if.baseline”,设备实例资源的资源类型可以为“oic.r.switch.binary”和“oic.r.temperature”。For virtual OCF server 2, the interface of the device instance resource can be "oic.if.a" and "oic.if.baseline", and the resource type of the device instance resource can be "oic.r.switch.binary" and "Oic.r.temperature".
资源操作方法包括以下方法中的至少一种:创建资源、读取资源、更新资源和删除资源。The resource operation method includes at least one of the following methods: creating a resource, reading a resource, updating a resource, and deleting a resource.
设备实例资源的属性值是指对资源的操作数据。The attribute value of the device instance resource refers to the operation data of the resource.
以“light”为例,设备实例资源的属性值“value”可以为“true”或“false”,当属性值为“true”时,表示打开灯,当属性值为“false”时,表示关灯。Take "light" as an example, the property value "value" of the device instance resource can be "true" or "false". When the property value is "true", it means that the light is turned on. Turn off the lights.
以为“oven”为例,属性值“setvalue”为25时,可以表示温度调节到25℃。Taking "oven" as an example, when the attribute value "setvalue" is 25, it can indicate that the temperature is adjusted to 25 ° C.
桥接设备收到该资源操作请求消息后,可以根据设备实例资源的URI,确定第一通信协议客户端所请求的第二通信协议设备。然后可以将该操作请求消息转换成该第一通信协议设备的协议消息,并将转换后的协议消息发送给该第一通信协议设备。After receiving the resource operation request message, the bridge device may determine the second communication protocol device requested by the first communication protocol client according to the URI of the device instance resource. Then, the operation request message may be converted into a protocol message of the first communication protocol device, and the converted protocol message is sent to the first communication protocol device.
可选地,该协议消息也可以是第二通信协议设备的设备指令。Optionally, the protocol message may also be a device instruction of the second communication protocol device.
例如,当资源操作请求消息的URI为虚拟OCF服务端1的设备实例资源的URI时,桥接设备可以将资源操作请求消息转换成非OCF设备1的设备指令,并将转换后的设备指令发送给非OCF设备1。当资源操作请求消息的URI为虚拟OCF服务端2的设备实例资源的URI时,桥接设备可以将资源操作请求消息转换成非OCF设备2的设备指令,并将转换后的设备指令发送给非OCF设备2。For example, when the URI of the resource operation request message is the URI of the device instance resource of the virtual OCF server 1, the bridge device can convert the resource operation request message into a device instruction of the non-OCF device 1, and send the converted device instruction to Non-OCF equipment 1. When the URI of the resource operation request message is the URI of the device instance resource of the virtual OCF server 2, the bridge device can convert the resource operation request message into a device instruction of the non-OCF device 2, and send the converted device instruction to the non-OCF Device 2.
可选地,桥接设备在创建第一通信协议虚拟服务端时,也可以在第一通信协议虚拟服务端的实例资源的URI中添加设备标识。Optionally, when the bridge device creates the first communication protocol virtual server, the device identifier may be added to the URI of the instance resource of the first communication protocol virtual server.
可选地,第一通信协议虚拟服务端的信息可以是桥接设备创建的,也可以是桥接设备从其他设备获得的。Optionally, the information of the first communication protocol virtual server may be created by the bridge device, or may be obtained by the bridge device from other devices.
可选地,在步骤210之前,图2的方法还可以包括:桥接设备接收第二通信协议设备发送的连接建立请求消息,桥接设备为第二通信协议设备创建第一通信协议虚拟服务端。桥接设备在收到该连接建立请求消息后,可以为该第二通信协议设备创建第一通信协议虚拟服务端,实现第一通信协议与第二通信协议之间的转换,建立第一通信协议设备和第二通信协议设备之间的连接。Optionally, before step 210, the method in FIG. 2 may further include: the bridge device receives the connection establishment request message sent by the second communication protocol device, and the bridge device creates a first communication protocol virtual server for the second communication protocol device. After receiving the connection establishment request message, the bridging device can create a first communication protocol virtual server for the second communication protocol device, realize the conversion between the first communication protocol and the second communication protocol, and establish the first communication protocol device. And a second communication protocol device.
该设备标识可以唯一地标识非OCF设备,通过该设备标识可以识别出非OCF设备。The device identifier can uniquely identify a non-OCF device, and the device identifier can identify a non-OCF device.
可选地,该连接建立请求消息可以为设备注册请求消息,也可以为其他的用于建立与桥接设备之间的连接的消息。Optionally, the connection establishment request message may be a device registration request message, or may be another message for establishing a connection with the bridge device.
图3是本申请实施例提供的另一种桥接通信的方法的示意性流程图。图3的方法包括步骤S310-S320。FIG. 3 is a schematic flowchart of another bridge communication method according to an embodiment of the present application. The method in FIG. 3 includes steps S310-S320.
在S310中,第一通信协议客户端向桥接设备发送资源发现请求消息。In S310, the first communication protocol client sends a resource discovery request message to the bridge device.
资源发现请求消息可以用于发现桥接设备上的资源。例如,资源发现请求消息可以用于发现桥接设备上的所有虚拟服务端的资源信息。The resource discovery request message can be used to discover resources on the bridge device. For example, the resource discovery request message may be used to discover resource information of all virtual servers on the bridge device.
第一通信协议客户端可以指该客户端可以通过第一通信协议与桥接设备进行通信。The first communication protocol client may mean that the client can communicate with the bridge device through the first communication protocol.
可选地,第一通信协议可以为物联网中的通信协议。例如,第一通信协议可以为OCF协议。Optionally, the first communication protocol may be a communication protocol in the Internet of Things. For example, the first communication protocol may be an OCF protocol.
在S320中,第一通信协议客户端接收所述桥接设备发送的资源发现响应消息,所述资源发现响应消息中包括桥接设备创建的第一通信协议虚拟服务端的信息。In S320, the first communication protocol client receives a resource discovery response message sent by the bridge device, and the resource discovery response message includes information of the first communication protocol virtual server created by the bridge device.
第一通信协议虚拟服务端的信息包括第一通信协议虚拟服务端的端点、平台资源的URI和设备资源的URI等。其中,所述第一通信协议虚拟服务端的端点与所述桥接设备的端点相同,所述第一通信协议虚拟服务端的平台资源的统一资源标识符与所述桥接设备的平台资源的统一资源标识符不同,所述第一通信协议虚拟服务端的设备资源的统一资源标识符与所述桥接设备的设备资源的统一资源标识符不同,所述第一通信协议与所述第二通信协议不同。The information of the first communication protocol virtual server includes an endpoint of the first communication protocol virtual server, a URI of a platform resource, a URI of a device resource, and the like. Wherein, the endpoint of the first communication protocol virtual server is the same as the endpoint of the bridging device, the uniform resource identifier of the platform resource of the first communication protocol virtual server and the uniform resource identifier of the platform resource of the bridging device Differently, the uniform resource identifier of the device resource of the first communication protocol virtual server is different from the uniform resource identifier of the device resource of the bridging device, and the first communication protocol is different from the second communication protocol.
可选地,第一通信协议虚拟服务端的信息还可以包括第一通信协议虚拟服务端的接口和资源类型等。Optionally, the information of the first communication protocol virtual server may further include an interface and a resource type of the first communication protocol virtual server.
本申请实施例对第一通信协议和第二通信协议不作具体限定,只要第一通信协议和第二铜通信协议为两种不同的协议即可。例如,第一通信协议可以为物联网中的通信协议,第二通信协议为非物联网中的通信协议。又例如,第一通信协议为zigbee协议,第二通信协议为蓝牙协议。或者,第一通信协议可以为OCF协议,第二通信协议可以为非OCF协议。也就是说,第一通信协议客户端可以为OCF客户端,第二通信协议设备可以为非OCF设备,第一通信协议虚拟服务端可以为虚拟OCF服务端。The embodiment of the present application does not specifically limit the first communication protocol and the second communication protocol, as long as the first communication protocol and the second copper communication protocol are two different protocols. For example, the first communication protocol may be a communication protocol in the Internet of Things, and the second communication protocol is a communication protocol in a non-Internet of Things. As another example, the first communication protocol is the zigbee protocol, and the second communication protocol is the Bluetooth protocol. Alternatively, the first communication protocol may be an OCF protocol, and the second communication protocol may be a non-OCF protocol. That is, the first communication protocol client may be an OCF client, the second communication protocol device may be a non-OCF device, and the first communication protocol virtual server may be a virtual OCF server.
可选地,非OCF协议可以为zigbee、z-wave或者蓝牙等。Optionally, the non-OCF protocol may be zigbee, z-wave, or Bluetooth.
桥接设备在为第二通信协议设备创建第一通信协议虚拟服务端时,可以为第二通信协议设备创建平台资源、设备资源以及端点。为了降低通信复杂度,桥接设备可以为创建的虚拟服务端设置相同的端点,通过平台资源和设备资源的URI不同来区分不同的第二通信协议设备。When the bridge device creates the first communication protocol virtual server for the second communication protocol device, it can create platform resources, device resources, and endpoints for the second communication protocol device. In order to reduce the communication complexity, the bridging device may set the same endpoint for the created virtual server, and distinguish the different second communication protocol devices through different URIs of platform resources and device resources.
下面以第一通信协议为OCF协议为例,对桥接设备和虚拟OCF服务端的资源信息、端点信息进行描述。The following uses the first communication protocol as the OCF protocol as an example to describe the resource information and endpoint information of the bridge device and the virtual OCF server.
当桥接设备的端点为“coap://[fe80::b1d6]:44444”时,虚拟OCF服务端的端点都为“coap://[fe80::b1d6]:44444”。When the endpoint of the bridge device is "coap: // [fe80 :: b1d6]: 44444", the endpoints of the virtual OCF server are "coap: // [fe80 :: b1d6]: 44444".
虚拟OCF服务端的平台资源的URI不再使用固定的“/oic/p”,虚拟OCF服务端的设备资源也不再使用固定的“/oic/d”。虚拟OCF服务端可以使用不同于桥接设备的平台资源和设备资源的URI。The platform resource URI of the virtual OCF server no longer uses the fixed "/ oic / p", and the device resource of the virtual OCF server no longer uses the fixed "/ oic / d". The virtual OCF server can use platform resource and device resource URIs different from the bridge device.
对于虚拟OCF服务端使用的平台资源和设备资源的URI的情况,本申请实施例可以不做具体限定。For the URIs of the platform resources and device resources used by the virtual OCF server, the embodiments of the present application may not specifically limit them.
例如,虚拟OCF服务端的平台资源和设备资源的URI可以是按顺序进行编号的,即虚拟OCF服务端的平台资源和设备资源的URI中包括编号顺序,这样可以通过URI来区分不同的平台资源和设备资源。For example, the URIs of the platform resources and device resources of the virtual OCF server can be numbered in sequence, that is, the URIs of the platform resources and device resources of the virtual OCF server include the numbering sequence, so that different platform resources and devices can be distinguished by the URI. Resources.
又例如,虚拟OCF服务端的平台资源和设备资源的URI中包括非OCF设备的设备标识,由于不同的非OCF设备具有不同的设备标识,这样就可以通过非OCF设备的设备标识来区分不同的平台资源和设备资源。As another example, the URIs of the platform resources and device resources of the virtual OCF server include device identifiers of non-OCF devices. Since different non-OCF devices have different device identifiers, different platforms can be distinguished by device identifiers of non-OCF devices Resources and equipment resources.
具体地,非OCF设备1的设备标识为“light_device_id”,非OCF设备1在桥接设备上映射的服务端为虚拟OCF服务端1,则虚拟OCF服务端1的平台资源的URI可以为“/di/light_device_id/oic/p”,虚拟OCF服务端1的设备资源的URI可以为“/di/light_device_id/oic/d”。非OCF设备2的设备标识为 “/di/oven_device_id”,非OCF设备2在桥接设备上映射的服务端为虚拟OCF服务端2,则虚拟OCF服务端2的平台资源的URI可以为“/di/oven_device_id/oic/d”,虚拟OCF服务端2的设备资源的URI可以为“/di/oven_device_id/oic/d”。Specifically, the device identifier of the non-OCF device 1 is "light_device_id", and the server mapped by the non-OCF device 1 on the bridge device is the virtual OCF server 1, and the URI of the platform resource of the virtual OCF server 1 can be "/ di / light_device_id / oic / p ", the URI of the device resource of the virtual OCF server 1 may be" / di / light_device_id / oic / d ". The device identifier of the non-OCF device 2 is "/ di / oven_device_id", and the server mapped by the non-OCF device 2 on the bridge device is the virtual OCF server 2. The URI of the platform resource of the virtual OCF server 2 can be "/ di / oven_device_id / oic / d ", the URI of the device resource of the virtual OCF server 2 may be" / di / oven_device_id / oic / d ".
可选地,该资源响应消息中可以包括桥接设备上所有虚拟OCF服务端的资源的信息。Optionally, the resource response message may include information about resources of all virtual OCF server ends on the bridge device.
OCF客户端收到该资源响应消息后,可以选择想要进行操作的虚拟OCF服务端的资源。After receiving the resource response message, the OCF client can select the resources of the virtual OCF server that you want to operate.
本申请提供的技术方案,桥接设备上所有虚拟服务端的端点与桥接设备的端点都相同,相比于传统方案,桥接设备上的端点数量会减少,这样可以降低桥接设备对端点的维护成本。为了区分不同的平台资源和设备资源,虚拟服务端的平台资源、设备资源不再使用固定的URI,而是将虚拟服务端的平台资源的URI和桥接设备的平台资源的URI设置为不同,将虚拟服务端的设备资源的URI和桥接设备的设备资源的URI设置为不同。In the technical solution provided in this application, the endpoints of all virtual server ends on the bridge device are the same as the endpoints of the bridge device. Compared with the traditional solution, the number of endpoints on the bridge device will be reduced, which can reduce the maintenance cost of the bridge device to the endpoint. In order to distinguish between different platform resources and device resources, the platform resources and device resources of the virtual server no longer use fixed URIs. Instead, the URIs of the platform resources of the virtual server and the URIs of the platform resources of the bridge device are set to be different. The URI of the device resource at the end and the URI of the device resource of the bridge device are set differently.
采用本申请实施例的通信方法,能够减少桥接设备中的端点数量,从而能够降低桥接设备的通信复杂度。By adopting the communication method in the embodiment of the present application, the number of endpoints in the bridge device can be reduced, and thus the communication complexity of the bridge device can be reduced.
具体地,端点用于网络层的传输,端点和通信通道相关,桥接设备上的端点减少后,桥接设备建立的客户端与桥接设备之间的通信通道就会减少,通信通道的减少能够减少资源的开销,降低网络层的复杂度。且桥接设备只需要维护一个通信通道,从而能够降低桥接设备的通信复杂度。Specifically, the endpoint is used for transmission at the network layer. The endpoint is related to the communication channel. After the endpoint on the bridge device is reduced, the communication channel between the client and the bridge device established by the bridge device will be reduced. The reduction of the communication channel can reduce resources Overhead, reducing the complexity of the network layer. And the bridge device only needs to maintain one communication channel, so that the communication complexity of the bridge device can be reduced.
可选地,第一通信协议虚拟服务端的平台资源和设备资源的URI中均包第二通信协议设备的设备标识。Optionally, the URI of the platform resource and the device resource of the first communication protocol virtual server includes the device identification of the second communication protocol device.
不同的第二通信协议设备具有不同的设备标识,因此,通过第二通信协议设备的设备标识可以区分不同的平台资源和设备资源。Different second communication protocol devices have different device identifiers. Therefore, the device identifiers of the second communication protocol devices can distinguish different platform resources and device resources.
此外,第一通信协议虚拟服务端的资源还包括设备实例资源,资源响应消息中还可以包括设备实例资源的URI。第一通信协议客户端收到桥接设备发送的资源响应消息后,可以根据响应消息中携带的平台资源和设备资源的信息,选择想要接入的平台资源和设备资源,并可以根据平台资源上的设备实例资源的信息,选择想要操作的设备实例资源。In addition, the resources of the first communication protocol virtual server also include device instance resources, and the resource response message may also include the URI of the device instance resource. After receiving the resource response message sent by the bridge device, the first communication protocol client may select the platform resource and device resource to be accessed according to the platform resource and device resource information carried in the response message, and may For device instance resource information, select the device instance resource that you want to operate.
可选地,在第一通信协议客户端向第一通信协议虚拟服务端发送资源操作请求消息之前,第一通信协议客户端可以根据资源响应消息中携带的信息选择想要进行操作的第二通信协议设备,然后第一通信协议客户端可以向选择的第二通信协议设备对应的第一通信协议虚拟服务端发送资源操作请求消息。其中,该资源操作者请求消息中包括设备实例资源的URI。Optionally, before the first communication protocol client sends a resource operation request message to the first communication protocol virtual server, the first communication protocol client may select the second communication that it wants to operate according to the information carried in the resource response message. Protocol device, and then the first communication protocol client may send a resource operation request message to the first communication protocol virtual server corresponding to the selected second communication protocol device. The resource operator request message includes the URI of the device instance resource.
可选地,该资源操作请求消息中还可以包括以下信息中的至少一种:设备实例资源的接口、设备实例资源的资源类型、资源操作方法和设备实例资源的属性值。Optionally, the resource operation request message may further include at least one of the following information: an interface of the device instance resource, a resource type of the device instance resource, a resource operation method, and an attribute value of the device instance resource.
例如,对于虚拟OCF服务端1来说,设备实例资源的接口可以为“oic.if.a”和“oic.if.baseline”,设备实例资源的资源类型可以为“oic.r.switch.binary”。For example, for virtual OCF server 1, the interface of the device instance resource can be "oic.if.a" and "oic.if.baseline", and the resource type of the device instance resource can be "oic.r.switch.binary" ".
对于虚拟OCF服务端2来说,设备实例资源的接口可以为“oic.if.a”和“oic.if.baseline”,设备实例资源的资源类型可以为“oic.r.switch.binary”和“oic.r.temperature”。For virtual OCF server 2, the interface of the device instance resource can be "oic.if.a" and "oic.if.baseline", and the resource type of the device instance resource can be "oic.r.switch.binary" and "Oic.r.temperature".
资源操作方法包括以下方法中的至少一种:创建资源、读取资源、更新资源和删除资源。The resource operation method includes at least one of the following methods: creating a resource, reading a resource, updating a resource, and deleting a resource.
设备实例资源的属性值是指对资源的操作数据。The attribute value of the device instance resource refers to the operation data of the resource.
以“light”为例,设备实例资源的属性值“value”可以为“true”或“false”,当属性值为“true”时,表示打开灯,当属性值为“false”时,表示关灯。Take "light" as an example, the property value "value" of the device instance resource can be "true" or "false". When the property value is "true", it means that the light is turned on. Turn off the lights.
以为“oven”为例,属性值“setvalue”为25时,可以表示温度调节到25℃。Taking "oven" as an example, when the attribute value "setvalue" is 25, it can indicate that the temperature is adjusted to 25 ° C.
图4是本申请实施例提供的另一种桥接设备通信的方法的示意性流程图。图4的方法包括步骤S410-S420。FIG. 4 is a schematic flowchart of another bridge device communication method according to an embodiment of the present application. The method of FIG. 4 includes steps S410-S420.
图4的方法可以与图2、图3的方法结合使用,图4的方法中具体的描述可以参见上文图2和图3方法中的描述,为避免重复,此处不再赘述。The method in FIG. 4 can be used in combination with the methods in FIGS. 2 and 3. For a detailed description of the method in FIG. 4, reference may be made to the description in the methods in FIG. 2 and FIG. 3 above. To avoid repetition, details are not described herein.
在S410中,桥接设备接收第二通信协议设备发送的设备注册请求消息。In S410, the bridge device receives a device registration request message sent by the second communication protocol device.
该设备注册请求消息也可以连接建立请求消息。The device registration request message may also be a connection establishment request message.
可选地,该连接建立请求消息中可以包括第二通信协议设备的设备标识。Optionally, the connection establishment request message may include a device identifier of the second communication protocol device.
在S420中,桥接设备为所述第二通信协议设备创建第一通信协议虚拟服务端,其中,所述第一通信协议虚拟服务端的端点与所述桥接设备的端点相同,所述第一通信协议虚拟服务端的平台资源的统一资源标识符与所述桥接设备的平台资源的统一资源标识符不同,所述第一通信协议虚拟服务端的设备资源的统一资源标识符与所述桥接设备的设备资源的统一资源标识符不同。In S420, the bridge device creates a first communication protocol virtual server for the second communication protocol device, wherein the endpoint of the first communication protocol virtual server is the same as the endpoint of the bridge device, and the first communication protocol The uniform resource identifier of the platform resource of the virtual server is different from the uniform resource identifier of the platform resource of the bridge device. The uniform resource identifier of the device resource of the first communication protocol virtual server and the device resource of the bridge device are different. Uniform resource identifiers are different.
桥接设备在创建第一通信协议虚拟服务端的过程中,会创建第一通信协议虚拟服务端的信息,所述第一通信协议虚拟服务端的信息包括平台资源的统一资源标识符、设备资源的统一资源标识符和端点。In the process of creating the first communication protocol virtual server, the bridge device creates information of the first communication protocol virtual server. The information of the first communication protocol virtual server includes a uniform resource identifier of the platform resource and a uniform resource identifier of the device resource. Breaks and endpoints.
图5是本申请实施例提供的另一种桥接设备通信的方法的示意性流程图。图5的方法包括步骤S510- S550。FIG. 5 is a schematic flowchart of another bridge device communication method according to an embodiment of the present application. The method in FIG. 5 includes steps S510-S550.
在S510中,桥接设备接收第一通信协议客户端发送的资源发现请求消息。In S510, the bridge device receives a resource discovery request message sent by the first communication protocol client.
资源发现请求消息主要用于发现桥接设备上的资源。例如,资源发现请求消息可以用于发现桥接设备上的所有虚拟服务端的资源信息。The resource discovery request message is mainly used to discover resources on the bridge device. For example, the resource discovery request message may be used to discover resource information of all virtual servers on the bridge device.
第一通信协议客户端可以指该客户端可以通过第一通信协议与桥接设备进行通信的。The first communication protocol client may mean that the client can communicate with the bridge device through the first communication protocol.
可选地,第一通信协议可以为物联网中的协议。例如,第一通信协议可以为OCF协议。Optionally, the first communication protocol may be a protocol in the Internet of Things. For example, the first communication protocol may be an OCF protocol.
在S520中,桥接设备向所述第一通信协议客户端发送资源发现响应消息,所述资源发现响应消息中包括预先创建的代理服务资源的信息和第一通信协议虚拟服务端的信息。In S520, the bridging device sends a resource discovery response message to the first communication protocol client, and the resource discovery response message includes information of a pre-created proxy service resource and information of the first communication protocol virtual server.
其中,所述第一通信协议虚拟服务端的端点与所述桥接设备的端点相同,所述代理服务资源的统一资源标识符与所述桥接设备的平台资源的统一资源标识符、设备资源的统一资源标识符均不同。Wherein, the endpoint of the first communication protocol virtual server is the same as the endpoint of the bridge device, the uniform resource identifier of the proxy service resource, the uniform resource identifier of the platform resource of the bridge device, and the uniform resource of the device resource The identifiers are all different.
可选地,第一通信协议虚拟服务端可以为第二通信协议设备映射在桥接设备上的服务端,且第一通信协议与第二通信协议不同。Optionally, the first communication protocol virtual server may be a server mapped by the second communication protocol device on the bridge device, and the first communication protocol is different from the second communication protocol.
本申请实施例对第一通信协议和第二通信协议不作具体限定,只要第一通信协议和第二通信协议为两种不同的协议即可。例如,第一通信协议可以为物联网中的通信协议,第二通信协议为非物联网中的通信协议。又例如,第一通信协议为zigbee协议,第二通信协议为蓝牙协议。或者,第一通信协议可以为OCF协议,第二通信协议可以为非OCF协议。也就是说,第一通信协议客户端可以为OCF客户端,第二通信协议设备可以为非OCF设备,第一通信协议虚拟服务端可以为虚拟OCF服务端。The embodiment of the present application does not specifically limit the first communication protocol and the second communication protocol, as long as the first communication protocol and the second communication protocol are two different protocols. For example, the first communication protocol may be a communication protocol in the Internet of Things, and the second communication protocol is a communication protocol in a non-Internet of Things. As another example, the first communication protocol is the zigbee protocol, and the second communication protocol is the Bluetooth protocol. Alternatively, the first communication protocol may be an OCF protocol, and the second communication protocol may be a non-OCF protocol. That is, the first communication protocol client may be an OCF client, the second communication protocol device may be a non-OCF device, and the first communication protocol virtual server may be a virtual OCF server.
可选地,非OCF协议可以为zigbee、z-wave或者蓝牙等。Optionally, the non-OCF protocol may be zigbee, z-wave, or Bluetooth.
可选地,资源发现响应消息中可以包括桥接设备上所有的代理服务资源的信息和第一通信协议虚拟服务端的资源的信息。Optionally, the resource discovery response message may include information about all the proxy service resources on the bridge device and information about the resources of the first communication protocol virtual server.
一个桥接设备上可以包括一个代理服务资源,也可以包括多个代理服务资源。代理服务资源用于代理对第一通信协议虚拟服务端上资源的请求。对于桥接设备包括一个代理服务资源的情况,该代理服务资源可以代理对桥接设备上所有的第一通信协议虚拟服务端的资源的请求。对于桥接设备包括多个代理服务资源的情况,该代理服务资源中的一个代理服务资源可以代理对桥接设备上的部分第一通信协议虚拟服务端的资源的请求。A bridge device can include one proxy service resource, or it can include multiple proxy service resources. The proxy service resource is used to proxy a request for a resource on the first communication protocol virtual server. For the case where the bridge device includes a proxy service resource, the proxy service resource can proxy requests for all resources of the first communication protocol virtual server on the bridge device. For a case where the bridge device includes multiple proxy service resources, one of the proxy service resources may proxy a request for a part of the first communication protocol virtual server resource on the bridge device.
代理服务资源可以是桥接设备在出厂之前就创建好的,也可以是桥接设备在收到第二通信协议设备发送的连接建立请求消息后创建的。The proxy service resource may be created by the bridge device before leaving the factory, or it may be created by the bridge device after receiving the connection establishment request message sent by the second communication protocol device.
可选地,该连接建立请求消息可以为设备注册请求消息。Optionally, the connection establishment request message may be a device registration request message.
代理服务资源的信息可以包括代理服务资源的URI信息,该代理服务资源的URI与桥接设备的设备资源、平台资源的URI均不同。The information of the proxy service resource may include URI information of the proxy service resource, and the URI of the proxy service resource is different from the device resource and the platform resource of the bridge device.
例如,代理服务资源的URI为“/proxyservice”,该代理服务资源的URI与桥接设备的平台资源的URI“/oic/p”不同,也与桥接设备的设备资源的URI“/oic/d”不同。For example, the URI of the proxy service resource is "/ proxyservice". The URI of the proxy service resource is different from the URI of the bridge device's platform resource "/ oic / p" and also the URI of the bridge device's device resource "/ oic / d". different.
第一通信协议虚拟服务端的信息包括端点信息,该端点与桥接设备的端点相同。The information of the first communication protocol virtual server includes endpoint information, and the endpoint is the same as the endpoint of the bridge device.
例如,当桥接设备的端点为“coap://[fe80::b1d6]:44444”时,第一通信协议虚拟服务端的端点也为“coap://[fe80::b1d6]:44444”。For example, when the endpoint of the bridge device is "coap: // [fe80 :: b1d6]: 44444", the endpoint of the first communication protocol virtual server is also "coap: // [fe80 :: b1d6]: 44444".
可选地,代理服务资源的信息还可以包括以下信息中的至少一种:代理服务资源的资源类型和接口。例如,代理服务资源的资源类型可以为“oic.r.proxyservice”。代理服务资源的接口可以为“oic.if.a”。Optionally, the information of the proxy service resource may further include at least one of the following information: the resource type and interface of the proxy service resource. For example, the resource type of the proxy service resource can be "oic.r.proxyservice". The interface of the proxy service resource can be "oic.if.a".
可选地,第一通信协议虚拟服务端的信息还可以包括以下信息中的至少一种:第一通信协议虚拟服务端的平台资源的URI、设备资源的URI、资源类型、接口和目标标识。Optionally, the information of the first communication protocol virtual server may further include at least one of the following information: the URI of the platform resource of the first communication protocol virtual server, the URI of the device resource, the resource type, the interface, and the target identifier.
可选地,第一通信协议虚拟服务端的设备资源可以采用与桥接设备的设备资源的URI相同的URI,也可以采用与桥接设备的设备资源的URI不同的URI。第一通信协议虚拟服务端的平台资源的URI可以采用和桥接设备的平台资源的URI相同的URI,也可以采用与桥接设备的设备资源的URI不同的URI。Optionally, the device resource of the first communication protocol virtual server may use the same URI as the device resource of the bridge device, or may use a URI different from the URI of the device resource of the bridge device. The URI of the platform resource of the first communication protocol virtual server may be the same URI as the platform resource of the bridge device, or may be a URI different from the URI of the device resource of the bridge device.
可选地,第一通信协议可以为OCF协议。第一通信协议虚拟服务端可以为OCF虚拟服务端,第一通信协议客户端可以为OCF客户端。Optionally, the first communication protocol may be an OCF protocol. The first communication protocol virtual server may be an OCF virtual server, and the first communication protocol client may be an OCF client.
以OCF为例,虚拟OCF服务端的平台资源的URI、设备资源的URI可以采用固定的URI。例如,虚拟OCF服务端的平台资源的URI为“/oic/p”,设备资源的URI为“/oic/d”。Taking OCF as an example, the URI of the platform resource and the device resource of the virtual OCF server can be fixed URIs. For example, the URI of the platform resource of the virtual OCF server is "/ oic / p", and the URI of the device resource is "/ oic / d".
或者,虚拟OCF服务端的平台资源的URI、设备资源的URI中可以包括非OCF设备的设备标识。例如,非OCF设备1的设备标识为“light_device_id”,非OCF设备1在桥接设备上映射的服务端为虚拟OCF服务端1,则虚拟OCF服务端1的平台资源的URI可以为“/di/light_device_id/oic/p”,虚拟OCF服务端1的设备资源的URI可以为“/di/light_device_id/oic/d”。非OCF设备2的设备标识为“/di/oven_device_id”,非OCF设备2在桥接设备上映射的服务端为虚拟OCF服务端2,则虚拟OCF 服务端2的平台资源的URI可以为“/di/oven_device_id/oic/d”,虚拟OCF服务端2的设备资源的URI可以为“/di/oven_device_id/oic/d”。Alternatively, the URI of the platform resource and the URI of the device resource of the virtual OCF server may include device identifiers of non-OCF devices. For example, if the device identifier of non-OCF device 1 is "light_device_id", and the server mapped by non-OCF device 1 on the bridge device is virtual OCF server 1, the URI of the platform resource of virtual OCF server 1 can be "/ di / light_device_id / oic / p ”, the URI of the device resource of the virtual OCF server 1 may be“ / di / light_device_id / oic / d ”. The device identifier of the non-OCF device 2 is "/ di / oven_device_id", and the server mapped by the non-OCF device 2 on the bridge device is the virtual OCF server 2. The URI of the platform resource of the virtual OCF server 2 can be "/ di / oven_device_id / oic / d ", the URI of the device resource of the virtual OCF server 2 may be" / di / oven_device_id / oic / d ".
目标标识可以为第二通信协议设备的设备标识。第一通信协议客户端收到资源响应消息后,可以根据该目标标识选择想要进行操作的第二通信协议设备。The target identifier may be a device identifier of the second communication protocol device. After receiving the resource response message, the first communication protocol client may select a second communication protocol device that it wants to operate according to the target identifier.
在S530中,桥接设备接收第一通信协议客户端发送的资源操作请求消息,该资源操作请求消息中包括代理服务资源的平台资源的统一资源标识符和设备资源的统一资源标识符,该资源操作请求消息中还包括目标标识,该目标标识用于标识代理服务资源进行操作的第二通信协议设备。In S530, the bridge device receives a resource operation request message sent by the first communication protocol client, and the resource operation request message includes a uniform resource identifier of the platform resource of the proxy service resource and a uniform resource identifier of the device resource, and the resource operation The request message also includes a target identifier, which is used to identify the second communication protocol device that the proxy service resource operates on.
桥接设备上的代理服务资源收到第一通信协议客户端发送的资源操作请求后,可以根据资源操作请求消息中携带的目标标识,确定第一通信协议客户端想要进行操作的第二通信协议设备。After the proxy service resource on the bridge device receives the resource operation request sent by the first communication protocol client, it can determine the second communication protocol that the first communication protocol client wants to operate according to the target identifier carried in the resource operation request message. device.
资源操作请求消息中还包括以下信息中的至少一种:第一通信协议虚拟服务端的设备实例资源的URI、资源操作方法和载荷。The resource operation request message further includes at least one of the following information: the URI of the device instance resource of the first communication protocol virtual server, the resource operation method, and the payload.
以OCF为例,虚拟OCF服务端的设备实例资源的URI例如,可以为“/myLightSwitch”,或者也可以为“/myOven”。又例如,虚拟OCF服务端的设备实例资源的URI中还可以包括非OCF设备的设备标识,非OCF设备1的设备标识为“light_device_id”,则虚拟OCF服务端1的设备实例资源的URI为“/di/light_device_id/myLightSwitch”。非OCF设备2的设备标识为“oven_device_id”,则虚拟OCF服务端2的设备实例资源的URI为“/di/oven_device_id/myOven”。Taking OCF as an example, the URI of the device instance resource of the virtual OCF server can be, for example, "/ myLightSwitch" or "/ myOven". For another example, the URI of the device instance resource of the virtual OCF server may further include the device identifier of the non-OCF device, and the device identifier of the non-OCF device 1 is "light_device_id", then the URI of the device instance resource of the virtual OCF server 1 is "/ di / light_device_id / myLightSwitch ". The device identifier of the non-OCF device 2 is "oven_device_id", and the URI of the device instance resource of the virtual OCF server 2 is "/ di / oven_device_id / myOven".
资源操作方法可以包括以下方法中的至少一种:创建资源、读取资源、更新资源和删除资源。The resource operation method may include at least one of the following methods: creating a resource, reading a resource, updating a resource, and deleting a resource.
载荷是指对资源的操作数据。Payload refers to the operational data on the resource.
以“light”为例,载荷“payload”可以为{“value”:true},或者载荷可以为{value”:false}。当载荷所指示的操作为“true”时,表示打开灯,当载荷所指示的操作为“false”时,表示关灯。Take "light" as an example, the payload "payload" can be {"value": true}, or the payload can be {value ": false}. When the operation indicated by the payload is" true ", it means that the light is turned on. When the operation indicated by the load is "false", the light is turned off.
以为“oven”为例,载荷“payload”可以为{“setvalue”:25},该载荷所指示的操作可以表示将温度调节到25℃。Taking "oven" as an example, the load "payload" may be {"setvalue": 25}, and the operation indicated by the load may indicate that the temperature is adjusted to 25 ° C.
在S540中,桥接设备将资源操作请求消息转换为第二通信协议设备的协议消息。In S540, the bridge device converts the resource operation request message into a protocol message of the second communication protocol device.
在S550中,桥接设备向第二通信协议设备发送转换后的协议消息。In S550, the bridge device sends the converted protocol message to the second communication protocol device.
在确定目标标识对应的第二通信协议设备后,桥接设备可以将资源操作请求消息转换为该第二通信协议设备的协议消息,并将转换后的协议消息发送给该第二通信协议设备。After determining the second communication protocol device corresponding to the target identifier, the bridge device may convert the resource operation request message into a protocol message of the second communication protocol device, and send the converted protocol message to the second communication protocol device.
可选地,该协议消息也可以是第二通信协议设备的设备指令。Optionally, the protocol message may also be a device instruction of the second communication protocol device.
该目标标识可以是第二通信协议设备的设备标识。The target identifier may be a device identifier of the second communication protocol device.
例如,非OCF设备1的设备标识为“light_device_id”,非OCF设备2的设备标识为“oven_device_id”。非OCF设备1映射在桥接设备上的服务端为虚拟OCF服务端1,非OCF设2映射在桥接设备上的服务端为虚拟OCF服务端2。代理服务资源可以代理对虚拟OCF服务端1和虚拟OCF服务端2上资源的请求。For example, the device identifier of the non-OCF device 1 is "light_device_id", and the device identifier of the non-OCF device 2 is "oven_device_id". The server mapped from the non-OCF device 1 on the bridge device is the virtual OCF server 1, and the server mapped from the non-OCF device 2 on the bridge device is the virtual OCF server 2. The proxy service resource can proxy requests for resources on the virtual OCF server 1 and the virtual OCF server 2.
当资源操作请求消息包括的目标标识为“light_device_id”时,表示OCF客户端请求操作虚拟OCF服务端1上的资源。桥接设备可以将该操作请求消息转换成非OCF设备1的设备指令,并发送给非OCF设备1。When the target identifier included in the resource operation request message is "light_device_id", it indicates that the OCF client requests to operate the resource on the virtual OCF server 1. The bridge device may convert the operation request message into a device instruction of the non-OCF device 1 and send it to the non-OCF device 1.
当资源操作请求消息包括的目标标识为“oven_device_id”时,表示OCF客户端请求操作虚拟OCF服务端2上的资源。桥接设备可以将该操作请求消息转换成非OCF设备2的设备指令,并发送给非OCF设备2。When the target identifier included in the resource operation request message is "oven_device_id", it indicates that the OCF client requests to operate the resource on the virtual OCF server 2. The bridge device may convert the operation request message into a device instruction of the non-OCF device 2 and send it to the non-OCF device 2.
由于设备实例资源的URI能够唯一地标识一个第二通信协议设备,因此,目标标识也可以为设备实例资源的URI。Because the URI of the device instance resource can uniquely identify a second communication protocol device, the target identifier can also be the URI of the device instance resource.
本申请实施例提供的技术方案中,桥接设备上所有虚拟服务端的端点与桥接设备的端点都相同,桥接设备上的端点数量会减少,这样可以降低桥接设备对端点的维护成本。代理服务资源的URI与桥接设备的平台资源的URI、设备资源的URI均不同,客户端可以向代理服务资源发送请求消息,并在请求消息中携带目标标识,用于标识请求代理操作的设备。这样客户端就可以通过代理服务资源来对虚拟服务端上的资源进行操作。In the technical solution provided by the embodiment of the present application, the endpoints of all virtual server ends on the bridge device are the same as the endpoints of the bridge device, and the number of endpoints on the bridge device will be reduced, which can reduce the maintenance cost of the bridge device to the endpoint. The URI of the proxy service resource is different from the URI of the platform resource of the bridging device and the URI of the device resource. The client can send a request message to the proxy service resource and carry the target identifier in the request message to identify the device requesting the proxy operation. In this way, the client can operate the resources on the virtual server through proxy service resources.
采用本申请实施例的通信方法,能够减少桥接设备中的端点数量,从而能够降低桥接设备的通信复杂度。By adopting the communication method in the embodiment of the present application, the number of endpoints in the bridge device can be reduced, and thus the communication complexity of the bridge device can be reduced.
具体地,端点用于网络层的传输,端点和通信通道相关,桥接设备上的端点减少后,桥接设备建立的客户端与桥接设备之间的通信通道就会减少,通信通道的减少能够减少资源的开销,降低网络层的复杂度。且桥接设备只需要维护一个通信通道,从而能够降低桥接设备的通信复杂度。Specifically, the endpoint is used for transmission at the network layer. The endpoint is related to the communication channel. After the endpoint on the bridge device is reduced, the communication channel between the client and the bridge device established by the bridge device will be reduced. The reduction of the communication channel can reduce resources Overhead, reducing the complexity of the network layer. And the bridge device only needs to maintain one communication channel, so that the communication complexity of the bridge device can be reduced.
可选地,第一通信协议虚拟服务端的信息可以是桥接设备创建的,也可以是桥接设备从其他设备获得的。同样地,代理服务资源的信息可以是桥接设备创建的,也可以是桥接设备从其他设备获得的。Optionally, the information of the first communication protocol virtual server may be created by the bridge device, or may be obtained by the bridge device from other devices. Similarly, the information of the proxy service resource may be created by the bridge device, or may be obtained by the bridge device from other devices.
在S510之前,所述方法还包括:桥接设备接收第二通信协议设备发送的设备注册请求消息,所述桥接设备为第二通信协议设备创建第一通信协议虚拟服务端。Before S510, the method further includes: the bridge device receives a device registration request message sent by the second communication protocol device, and the bridge device creates a first communication protocol virtual server for the second communication protocol device.
可选地,该设备注册请求消息中可以包括该第二通信协议设备的设备标识。Optionally, the device registration request message may include a device identifier of the second communication protocol device.
桥接设备可以为第二通信协议设备创建第一通信协议虚拟服务端,该第一通信协议虚拟服务端的端点与桥接设备的端点相同。The bridge device may create a first communication protocol virtual server for the second communication protocol device, and the endpoint of the first communication protocol virtual server is the same as the endpoint of the bridge device.
可选地,桥接设备可以在收到第二通信协议设备的设备发送的注册请求消息后,再为该第二通信协议设备创建代理服务资源,该代理服务资源能够代理对该第二通信协议设备的操作请求。Optionally, the bridge device may create a proxy service resource for the second communication protocol device after receiving the registration request message sent by the device of the second communication protocol device, and the proxy service resource can proxy the second communication protocol device. Operation request.
图6是本申请实施例提供的另一种桥接通信的方法的示意性流程图。图6的方法包括步骤S610-S630。FIG. 6 is a schematic flowchart of another bridge communication method according to an embodiment of the present application. The method of FIG. 6 includes steps S610-S630.
在S610中,第一通信协议客户端向桥接设备发送资源发现请求消息。In S610, the first communication protocol client sends a resource discovery request message to the bridge device.
资源发现请求消息主要用于发现桥接设备上的资源。The resource discovery request message is mainly used to discover resources on the bridge device.
第一通信协议客户端可以指该客户端可以通过第一通信协议与桥接设备进行通信的。该客户端可以为物联网中的客户端。The first communication protocol client may mean that the client can communicate with the bridge device through the first communication protocol. The client can be a client in the Internet of Things.
可选地,第一通信协议可以为物联网中的通信协议,例如,第一通信协议可以为OCF协议。Optionally, the first communication protocol may be a communication protocol in the Internet of Things. For example, the first communication protocol may be an OCF protocol.
在S620中,第一通信协议客户端接收桥接设备发送的资源发现响应消息。其中,该资源发现响应消息中包括代理服务资源的信息和第一通信协议虚拟服务端的信息。In S620, the first communication protocol client receives a resource discovery response message sent by the bridge device. The resource discovery response message includes information of the proxy service resource and information of the first communication protocol virtual server.
其中,所述第一通信协议虚拟服务端的端点与所述桥接设备的端点相同,所述代理服务资源的统一资源标识符与所述桥接设备的平台资源的统一资源标识符、设备资源的统一资源标识符均不同。Wherein, the endpoint of the first communication protocol virtual server is the same as the endpoint of the bridge device, the uniform resource identifier of the proxy service resource, the uniform resource identifier of the platform resource of the bridge device, and the uniform resource of the device resource The identifiers are all different.
可选地,第一通信协议虚拟服务端可以为第二通信协议设备映射在桥接设备上的服务端,且第一通信协议与第二通信协议不同。Optionally, the first communication protocol virtual server may be a server mapped by the second communication protocol device on the bridge device, and the first communication protocol is different from the second communication protocol.
本申请实施例对第一通信协议和第二通信协议不作具体限定,只要第一通信协议和第二通信协议为两种不同的协议即可。例如,第一通信协议为zigbee协议,第二通信协议为蓝牙协议。或者,第一通信协议可以为OCF协议,第二通信协议可以为非OCF协议。也就是说,第一通信协议客户端可以为OCF客户端,第二通信协议设备可以为非OCF设备,第一通信协议虚拟服务端可以为虚拟OCF服务端。The embodiment of the present application does not specifically limit the first communication protocol and the second communication protocol, as long as the first communication protocol and the second communication protocol are two different protocols. For example, the first communication protocol is the zigbee protocol, and the second communication protocol is the Bluetooth protocol. Alternatively, the first communication protocol may be an OCF protocol, and the second communication protocol may be a non-OCF protocol. That is, the first communication protocol client may be an OCF client, the second communication protocol device may be a non-OCF device, and the first communication protocol virtual server may be a virtual OCF server.
可选地,非OCF协议可以为zigbee、z-wave或者蓝牙等。Optionally, the non-OCF protocol may be zigbee, z-wave, or Bluetooth.
可选地,资源发现响应消息中可以包括桥接设备上所有的代理服务资源的信息和第一通信协议虚拟服务端的资源的信息。Optionally, the resource discovery response message may include information about all the proxy service resources on the bridge device and information about the resources of the first communication protocol virtual server.
一个桥接设备上可以包括一个代理服务资源,也可以包括多个代理服务资源。代理服务资源用于代理对第一通信协议虚拟服务端上资源的请求。对于桥接设备包括一个代理服务资源的情况,该代理服务资源可以代理对桥接设备上所有的第一通信协议虚拟服务端的资源的请求。对于桥接设备包括多个代理服务资源的情况,该代理服务资源中的一个代理服务资源可以代理对桥接设备上的部分第一通信协议虚拟服务端的资源的请求。A bridge device can include one proxy service resource, or it can include multiple proxy service resources. The proxy service resource is used to proxy a request for a resource on the first communication protocol virtual server. For the case where the bridge device includes a proxy service resource, the proxy service resource can proxy requests for all resources of the first communication protocol virtual server on the bridge device. For a case where the bridge device includes multiple proxy service resources, one of the proxy service resources may proxy a request for a part of the first communication protocol virtual server resource on the bridge device.
代理服务资源可以是桥接设备在出厂之前就创建好的,也可以是桥接设备在收到第二通信协议设备发送的连接建立请求消息后创建的。The proxy service resource may be created by the bridge device before leaving the factory, or it may be created by the bridge device after receiving the connection establishment request message sent by the second communication protocol device.
可选地,该连接建立请求消息可以为设备注册请求消息。Optionally, the connection establishment request message may be a device registration request message.
代理服务资源的信息包括代理服务资源的URI信息,该代理服务资源的URI与桥接设备的设备资源、平台资源的URI均不同。The information of the proxy service resource includes the URI information of the proxy service resource. The URI of the proxy service resource is different from the device resource and the platform resource of the bridge device.
例如,代理服务资源的URI为“/proxyservice”,该代理服务资源的URI与桥接设备的平台资源的URI“/oic/p”不同,也与桥接设备的设备资源的URI“/oic/d”不同。For example, the URI of the proxy service resource is "/ proxyservice". The URI of the proxy service resource is different from the URI of the bridge device's platform resource "/ oic / p" and also the URI of the bridge device's device resource "/ oic / d". different.
第一通信协议虚拟服务端的信息包括端点信息,该端点与桥接设备的端点相同。The information of the first communication protocol virtual server includes endpoint information, and the endpoint is the same as the endpoint of the bridge device.
第一通信协议虚拟服务端的信息包括第一通信协议虚拟服务端的端点信息,例如,当桥接设备的端点为“coap://[fe80::b1d6]:44444”时,第一通信协议虚拟服务端的端点也为“coap://[fe80::b1d6]:44444”。The information of the first communication protocol virtual server includes the endpoint information of the first communication protocol virtual server. For example, when the endpoint of the bridge device is "coap: // [fe80 :: b1d6]: 44444", the information of the first communication protocol virtual server is The endpoint is also "coap: // [fe80 :: b1d6]: 44444".
可选地,代理服务资源的信息还可以包括以下信息中的至少一种:代理服务资源的资源类型和接口。例如,代理服务资源的资源类型可以为“oic.r.proxyservice”。代理服务资源的接口可以为“oic.if.a”。Optionally, the information of the proxy service resource may further include at least one of the following information: the resource type and interface of the proxy service resource. For example, the resource type of the proxy service resource can be "oic.r.proxyservice". The interface of the proxy service resource can be "oic.if.a".
可选地,第一通信协议虚拟服务端的信息还可以包括以下信息中的至少一种:第一通信协议虚拟服务端的平台资源的URI、设备资源的URI、资源类型、接口和目标标识。Optionally, the information of the first communication protocol virtual server may further include at least one of the following information: the URI of the platform resource of the first communication protocol virtual server, the URI of the device resource, the resource type, the interface, and the target identifier.
可选地,第一通信协议虚拟服务端的设备资源可以采用与桥接设备的设备资源的URI相同的URI,也可以采用与桥接设备的设备资源的URI不同的URI。第一通信协议虚拟服务端的平台资源的URI可以采用和桥接设备的平台资源的URI相同的URI,也可以采用与桥接设备的设备资源的URI不同的URI。Optionally, the device resource of the first communication protocol virtual server may use the same URI as the device resource of the bridge device, or may use a URI different from the URI of the device resource of the bridge device. The URI of the platform resource of the first communication protocol virtual server may be the same URI as the platform resource of the bridge device, or may be a URI different from the URI of the device resource of the bridge device.
可选地,第一通信协议可以为OCF协议。第一通信协议虚拟服务端可以为OCF虚拟服务端,第一 通信协议客户端可以为OCF客户端。Optionally, the first communication protocol may be an OCF protocol. The first communication protocol virtual server may be an OCF virtual server, and the first communication protocol client may be an OCF client.
以OCF为例,虚拟OCF服务端的平台资源的URI、设备资源的URI可以采用固定的URI。例如,虚拟OCF服务端的平台资源的URI为“/oic/p”,设备资源的URI为“/oic/d”。Taking OCF as an example, the URI of the platform resource and the device resource of the virtual OCF server can be fixed URIs. For example, the URI of the platform resource of the virtual OCF server is "/ oic / p", and the URI of the device resource is "/ oic / d".
或者,虚拟OCF服务端的平台资源的URI、设备资源的URI中可以包括非OCF设备的设备标识。例如,非OCF设备1的设备标识为“light_device_id”,非OCF设备1在桥接设备上映射的服务端为虚拟OCF服务端1,则虚拟OCF服务端1的平台资源的URI可以为“/di/light_device_id/oic/p”,虚拟OCF服务端1的设备资源的URI可以为“/di/light_device_id/oic/d”。非OCF设备2的设备标识为“/di/oven_device_id”,非OCF设备2在桥接设备上映射的服务端为虚拟OCF服务端2,则虚拟OCF服务端2的平台资源的URI可以为“/di/oven_device_id/oic/d”,虚拟OCF服务端2的设备资源的URI可以为“/di/oven_device_id/oic/d”。Alternatively, the URI of the platform resource and the URI of the device resource of the virtual OCF server may include device identifiers of non-OCF devices. For example, if the device identifier of non-OCF device 1 is "light_device_id", and the server mapped by non-OCF device 1 on the bridge device is virtual OCF server 1, the URI of the platform resource of virtual OCF server 1 can be "/ di / light_device_id / oic / p ”, the URI of the device resource of the virtual OCF server 1 may be“ / di / light_device_id / oic / d ”. The device identifier of the non-OCF device 2 is "/ di / oven_device_id", and the server mapped by the non-OCF device 2 on the bridge device is the virtual OCF server 2. The URI of the platform resource of the virtual OCF server 2 can be "/ di / oven_device_id / oic / d ", the URI of the device resource of the virtual OCF server 2 may be" / di / oven_device_id / oic / d ".
目标标识可以为第二通信协议设备的设备标识。第一通信协议客户端收到资源响应消息后,可以根据该目标标识选择想要进行操作的第二通信协议设备。The target identifier may be a device identifier of the second communication protocol device. After receiving the resource response message, the first communication protocol client may select a second communication protocol device that it wants to operate according to the target identifier.
在S630中,第一通信协议客户端向桥接设备发送资源操作请求消息,该资源操作请求消息中包括代理服务资源的平台资源的URI和设备资源的URI,该资源操作请求消息中还包括目标标识,该目标标识用于标识代理服务资源进行操作的第二通信协议设备。In S630, the first communication protocol client sends a resource operation request message to the bridge device. The resource operation request message includes the URI of the platform resource of the proxy service resource and the URI of the device resource. The resource operation request message further includes the target identifier. The target identifier is used to identify a second communication protocol device that the proxy service resource operates on.
第一通信协议客户端收到资源响应消息后,可以选择想要进行操作的第二通信协议设备,在资源操作请求消息中添加该第二通信协议设备的目标标识,并向能够代理该操作的代理服务资源发送该资源操作请求消息。After the first communication protocol client receives the resource response message, it may select the second communication protocol device that it wants to operate, add the target identifier of the second communication protocol device to the resource operation request message, and provide the The proxy service resource sends the resource operation request message.
以OCF为例,非OCF设备1的设备标识为“light_device_id”,非OCF设备2的设备标识为“oven_device_id”。非OCF设备1映射在桥接设备上的服务端为虚拟OCF服务端1,非OCF设2映射在桥接设备上的服务端为虚拟OCF服务端2。代理服务资源可以代理对虚拟OCF服务端1和虚拟OCF服务端2上资源的请求。Taking OCF as an example, the device identifier of non-OCF device 1 is "light_device_id", and the device identifier of non-OCF device 2 is "oven_device_id". The server mapped from the non-OCF device 1 on the bridge device is the virtual OCF server 1, and the server mapped from the non-OCF device 2 on the bridge device is the virtual OCF server 2. The proxy service resource can proxy requests for resources on the virtual OCF server 1 and the virtual OCF server 2.
当OCF客户端想要对非OCF设备1进行资源操作时,可以向代理服务资源发送资源操作请求消息。该资源操作请求消息中包括的目标标识可以为“light_device_id”。When the OCF client wants to perform a resource operation on the non-OCF device 1, it may send a resource operation request message to the proxy service resource. The target identifier included in the resource operation request message may be "light_device_id".
当OCF客户端想要对非OCF设备2进行资源操作时,可以向代理服务资源发送资源操作请求消息。该资源操作请求消息中包括的目标标识可以为“light_device_id”。When the OCF client wants to perform resource operations on the non-OCF device 2, it may send a resource operation request message to the proxy service resource. The target identifier included in the resource operation request message may be "light_device_id".
由于设备实例资源的URI能够唯一地标识一个第二通信协议设备,因此,目标标识也可以为设备实例资源的URI。Because the URI of the device instance resource can uniquely identify a second communication protocol device, the target identifier can also be the URI of the device instance resource.
本申请实施例提供的技术方案中,桥接设备上所有第一通信协议虚拟服务端的端点与桥接设备的端点都相同,桥接设备上的端点数量会减少,这样可以降低桥接设备对端点的维护成本。代理服务资源的URI与桥接设备的平台资源的URI、设备资源的URI均不同,第一通信协议客户端可以向代理服务资源发送请求消息,并在请求消息中携带目标标识,用于标识请求代理操作的第二通信协议设备。这样第一通信协议客户端就可以通过代理服务资源来对第一通信协议虚拟服务端上的资源进行操作。In the technical solution provided in the embodiment of the present application, the endpoints of all the first communication protocol virtual server ends on the bridge device are the same as the endpoints of the bridge device, and the number of endpoints on the bridge device will be reduced, which can reduce the maintenance cost of the bridge device to the endpoint. The URI of the proxy service resource is different from the URI of the platform resource of the bridge device and the URI of the device resource. The first communication protocol client can send a request message to the proxy service resource, and the target message is carried in the request message to identify the requesting proxy. Operating second communication protocol device. In this way, the first communication protocol client can operate the resources on the first communication protocol virtual server through proxy service resources.
采用本申请实施例的通信方法,能够减少桥接设备中的端点数量,从而能够降低桥接设备的通信复杂度。By adopting the communication method in the embodiment of the present application, the number of endpoints in the bridge device can be reduced, and thus the communication complexity of the bridge device can be reduced.
具体地,端点用于网络层的传输,端点和通信通道相关,桥接设备上的端点减少后,桥接设备建立的客户端与桥接设备之间的通信通道就会减少,通信通道的减少能够减少资源的开销,降低网络层的复杂度。且桥接设备只需要维护一个通信通道,从而能够降低桥接设备的通信复杂度。Specifically, the endpoint is used for transmission at the network layer. The endpoint is related to the communication channel. After the endpoint on the bridge device is reduced, the communication channel between the client and the bridge device established by the bridge device will be reduced. The reduction of the communication channel can reduce resources Overhead, reducing the complexity of the network layer. And the bridge device only needs to maintain one communication channel, so that the communication complexity of the bridge device can be reduced.
图7是本申请实施例提供的另一种桥接设备通信的方法的示意性流程图。图7的方法包括步骤S710-S720。FIG. 7 is a schematic flowchart of another bridge device communication method according to an embodiment of the present application. The method of FIG. 7 includes steps S710-S720.
图7的方法可以与图5、图6的方法结合使用,图7的方法中具体的描述可以参见上文图5和图6方法中的描述,为避免重复,此处不再赘述。The method in FIG. 7 can be used in combination with the methods in FIGS. 5 and 6. For a detailed description of the method in FIG. 7, refer to the descriptions in the methods in FIG. 5 and FIG. 6 above.
在S710中,桥接设备接收第二通信协议设备发送的设备注册请求消息。In S710, the bridge device receives a device registration request message sent by the second communication protocol device.
该设备注册请求消息也可以连接建立请求消息。The device registration request message may also be a connection establishment request message.
可选地,该连接建立请求消息中可以包括第二通信协议设备的设备标识。Optionally, the connection establishment request message may include a device identifier of the second communication protocol device.
在S720中,桥接设备为所述第二通信协议设备创建第一通信协议虚拟服务端和代理服务资源,其中,所述第一通信协议虚拟服务端的端点与所述桥接设备的端点相同,所述代理服务资源的统一资源标识符与所述桥接设备的平台资源的统一资源标识符、设备资源的统一资源标识符均不同,所述代理服务资源用于代理第一通信协议客户端对所述第一通信协议虚拟服务端的请求。In S720, the bridge device creates a first communication protocol virtual server and a proxy service resource for the second communication protocol device, wherein the endpoint of the first communication protocol virtual server is the same as the endpoint of the bridge device, and The uniform resource identifier of the proxy service resource is different from the uniform resource identifier of the platform resource of the bridge device and the uniform resource identifier of the device resource, and the proxy service resource is used to proxy the first communication protocol client to the first communication protocol client. A communication protocol request from the virtual server.
桥接设备在创建第一通信协议虚拟服务端的过程中,会创建第一通信协议虚拟服务端的信息,所述第一通信协议虚拟服务端的信息包括平台资源的统一资源标识符、设备资源的统一资源标识符和端点。In the process of creating the first communication protocol virtual server, the bridge device creates information of the first communication protocol virtual server. The information of the first communication protocol virtual server includes a uniform resource identifier of the platform resource and a uniform resource identifier of the device resource. Breaks and endpoints.
此外,桥接设备在创建代理服务资源的过程中,会创建创建代理服务资源的信息,所述创建代理服 务资源的信息包括平台资源的统一资源标识符、设备资源的统一资源标识符和端点。In addition, in the process of creating the proxy service resource, the bridging device creates information for creating the proxy service resource. The information for creating the proxy service resource includes the uniform resource identifier of the platform resource, the uniform resource identifier of the device resource, and the endpoint.
图8是本申请实施例提供的一种桥接设备的示意性框图。图8的桥接设备800包括通信单元810。FIG. 8 is a schematic block diagram of a bridge device according to an embodiment of the present application. The bridge device 800 of FIG. 8 includes a communication unit 810.
通信单元810,用于接收第一通信协议客户端发送的资源发现请求消息。The communication unit 810 is configured to receive a resource discovery request message sent by a first communication protocol client.
所述通信单元810,还用于向所述第一通信协议客户端发送资源发现响应消息,所述资源发现响应消息中包括所述桥接设备创建的第一通信协议虚拟服务端的平台资源的统一资源标识符、设备资源的统一资源标识符和端点,其中,所述第一通信协议虚拟服务端的端点与所述桥接设备的端点相同,所述第一通信协议虚拟服务端的平台资源的统一资源标识符与所述桥接设备的平台资源的统一资源标识符不同,所述第一通信协议虚拟服务端的设备资源的统一资源标识符与所述桥接设备的设备资源的统一资源标识符不同。The communication unit 810 is further configured to send a resource discovery response message to the first communication protocol client, where the resource discovery response message includes a unified resource of a platform resource of the first communication protocol virtual server created by the bridging device. Identifier, uniform resource identifier and endpoint of the device resource, wherein the endpoint of the first communication protocol virtual server is the same as the endpoint of the bridge device, and the uniform resource identifier of the platform resource of the first communication protocol virtual server Different from the uniform resource identifier of the platform resource of the bridge device, the uniform resource identifier of the device resource of the first communication protocol virtual server is different from the uniform resource identifier of the device resource of the bridge device.
可选地,通信单元810,还用于接收第二通信协议设备发送的设备注册请求消息。桥接设备800还包括处理单元,用于为所述第二通信协议设备创建所述第一通信协议虚拟服务端。Optionally, the communication unit 810 is further configured to receive a device registration request message sent by the second communication protocol device. The bridge device 800 further includes a processing unit, configured to create the first communication protocol virtual server for the second communication protocol device.
可选地,所述第一通信协议虚拟服务端的平台资源和设备资源的统一资源标识符中均包括第二通信协议设备的设备标识。Optionally, the unified resource identifier of the platform resource and the device resource of the first communication protocol virtual server includes the device identification of the second communication protocol device.
可选地,所述第一通信协议虚拟服务端的设备实例资源的统一资源标识符包括第二通信协议设备的设备标识,所述通信单元810,还用于接收第一通信协议客户端发送的资源操作请求消息,所述资源操作请求消息中包括所述第一通信协议虚拟服务端的设备实例资源的统一资源标识符;处理单元,还用于将所述资源操作请求消息转换为所述第二通信协议设备的协议消息;通信单元810,还用于向所述第二通信协议设备发送所述协议消息。Optionally, the uniform resource identifier of the device instance resource of the first communication protocol virtual server includes the device identification of the second communication protocol device, and the communication unit 810 is further configured to receive a resource sent by the first communication protocol client. An operation request message, where the resource operation request message includes a uniform resource identifier of a device instance resource of the first communication protocol virtual server; the processing unit is further configured to convert the resource operation request message into the second communication A protocol message of the protocol device; the communication unit 810 is further configured to send the protocol message to the second communication protocol device.
可选地,所述第一通信协议为OCF协议。Optionally, the first communication protocol is an OCF protocol.
图9是本申请实施例提供的一种第一通信协议设备的结构示意性框图,该第一通信协议设备例如可以为OCF设备。图9的第一通信协议设备900包括通信单元910。FIG. 9 is a schematic block diagram of a first communication protocol device according to an embodiment of the present application. The first communication protocol device may be, for example, an OCF device. The first communication protocol device 900 of FIG. 9 includes a communication unit 910.
通信单元910,用于向桥接设备发送资源发现请求消息。The communication unit 910 is configured to send a resource discovery request message to the bridge device.
通信单元910,还用于接收所述桥接设备发送的资源发现响应消息,所述资源发现响应消息中包括第一通信协议虚拟服务端的所述桥接设备创建的第一通信协议虚拟服务端的平台资源的统一资源标识符、设备资源的统一资源标识符和端点,其中,所述第一通信协议虚拟服务端的端点与所述桥接设备的端点相同,所述第一通信协议虚拟服务端的平台资源的统一资源标识符与所述桥接设备的平台资源的统一资源标识符不同,所述第一通信协议虚拟服务端的设备资源的统一资源标识符与所述桥接设备的设备资源的统一资源标识符不同。The communication unit 910 is further configured to receive a resource discovery response message sent by the bridge device, where the resource discovery response message includes a platform resource of the first communication protocol virtual server created by the bridge device of the first communication protocol virtual server. Uniform resource identifier, uniform resource identifier and endpoint of device resource, wherein the endpoint of the first communication protocol virtual server is the same as the endpoint of the bridge device, and the unified resource of platform resources of the first communication protocol virtual server The identifier is different from the uniform resource identifier of the platform resource of the bridge device, and the uniform resource identifier of the device resource of the first communication protocol virtual server is different from the uniform resource identifier of the device resource of the bridge device.
可选地,所述第一通信协议虚拟服务端的平台资源和设备资源的统一资源标识符中均包括第二通信协议设备的设备标识。Optionally, the unified resource identifier of the platform resource and the device resource of the first communication protocol virtual server includes the device identification of the second communication protocol device.
可选地,所述第一通信协议虚拟服务端的设备实例资源的统一资源标识符包括第二通信协议设备的设备标识,所述通信单元910,还用于向所述桥接设备发送资源操作请求消息,所述资源操作请求消息中包括所述第一通信协议虚拟服务端的设备实例资源的统一资源标识符,所述设备实例资源的统一资源标识符用于标识所述第一通信协议虚拟服务端进行操作的所述第二通信协议设备。Optionally, the uniform resource identifier of the device instance resource of the first communication protocol virtual server includes the device identifier of the second communication protocol device, and the communication unit 910 is further configured to send a resource operation request message to the bridge device The resource operation request message includes a uniform resource identifier of a device instance resource of the first communication protocol virtual server, and the uniform resource identifier of the device instance resource is used to identify the first communication protocol virtual server to perform The second communication protocol device in operation.
可选地,所述第一通信协议为OCF协议。Optionally, the first communication protocol is an OCF protocol.
图10是本申请实施例提供的另一种桥接设备的示意性框图。图10的桥接设备1000包括通信单元1010和处理单元1020。FIG. 10 is a schematic block diagram of another bridge device according to an embodiment of the present application. The bridge device 1000 of FIG. 10 includes a communication unit 1010 and a processing unit 1020.
通信单元1010,用于接收第二通信协议设备发送的设备注册请求消息。The communication unit 1010 is configured to receive a device registration request message sent by a second communication protocol device.
处理单元1020,用于为所述第二通信协议设备创建第一通信协议虚拟服务端,其中,所述第一通信协议虚拟服务端的端点与所述桥接设备的端点相同,所述第一通信协议虚拟服务端的平台资源的统一资源标识符与所述桥接设备的平台资源的统一资源标识符不同,所述第一通信协议虚拟服务端的设备资源的统一资源标识符与所述桥接设备的设备资源的统一资源标识符不同。A processing unit 1020 is configured to create a first communication protocol virtual server for the second communication protocol device, wherein an endpoint of the first communication protocol virtual server is the same as an endpoint of the bridge device, and the first communication protocol The uniform resource identifier of the platform resource of the virtual server is different from the uniform resource identifier of the platform resource of the bridge device. The uniform resource identifier of the device resource of the first communication protocol virtual server and the device resource of the bridge device are different. Uniform resource identifiers are different.
图11是本申请实施例提供的另一种桥接设备的示意性框图。图11的桥接设备1100包括通信单元1110和处理单元1120。FIG. 11 is a schematic block diagram of another bridge device according to an embodiment of the present application. The bridge device 1100 in FIG. 11 includes a communication unit 1110 and a processing unit 1120.
通信单元1110,用于接收第一通信协议客户端发送的资源发现请求消息。The communication unit 1110 is configured to receive a resource discovery request message sent by a first communication protocol client.
通信单元1110,还用于向所述第一通信协议客户端发送资源发现响应消息,所述资源发现响应消息中包括预先创建的代理服务资源的信息和第一通信协议虚拟服务端的平台资源的统一资源标识符、设备资源的统一资源标识符及端点,其中,所述第一通信协议虚拟服务端的端点与所述桥接设备的端点相同,所述代理服务资源的统一资源标识符与所述桥接设备的平台资源的统一资源标识符、设备资源的统一资源标识符均不同。The communication unit 1110 is further configured to send a resource discovery response message to the first communication protocol client, where the resource discovery response message includes information of a pre-created proxy service resource and a unified platform resource of the first communication protocol virtual server. A resource identifier, a uniform resource identifier and an endpoint of a device resource, wherein the endpoint of the first communication protocol virtual server is the same as the endpoint of the bridge device, and the uniform resource identifier of the proxy service resource is the same as the bridge device The unified resource identifier of the platform resource and the unified resource identifier of the device resource are different.
通信单元1110,还用于接收所述第一通信协议客户端向所述桥接设备发送的资源操作请求消息,所述资源操作请求消息中包括所述代理服务资源的平台资源的统一资源标识符和设备资源的统一资源 标识符,所述资源操作请求消息中还包括目标标识,所述目标标识用于标识所述代理服务资源进行操作的第二通信协议设备,所述第一通信协议与所述第二通信协议不同。The communication unit 1110 is further configured to receive a resource operation request message sent by the first communication protocol client to the bridge device, where the resource operation request message includes a uniform resource identifier and a platform resource of the proxy service resource and A uniform resource identifier of a device resource, and the resource operation request message further includes a target identifier, where the target identifier is used to identify a second communication protocol device on which the proxy service resource operates, the first communication protocol and the The second communication protocol is different.
处理单元1120,用于将所述资源操作请求消息转换为所述第二通信协议设备的协议消息。The processing unit 1120 is configured to convert the resource operation request message into a protocol message of the second communication protocol device.
通信单元1110,还用于向所述第二通信协议设备发送所述协议消息。The communication unit 1110 is further configured to send the protocol message to the second communication protocol device.
可选地,所述资源发现响应消息中还包括以下信息中的至少一种:所述代理服务资源的资源类型、和接口。Optionally, the resource discovery response message further includes at least one of the following information: a resource type and an interface of the proxy service resource.
可选地,所述资源操作请求消息中包括以下信息中的至少一种:所述第一通信协议虚拟服务端的设备实例资源的URI、资源操作方法和载荷。Optionally, the resource operation request message includes at least one of the following information: a URI of a device instance resource of the first communication protocol virtual server, a resource operation method, and a payload.
可选地,所述第一通信协议为OCF协议。Optionally, the first communication protocol is an OCF protocol.
图12是本申请实施例提供的另一种第一通信协议设备的示意性框图,该第一通信协议设备例如可以为OCF设备。图12的第一通信协议设备1200包括通信单元1210。FIG. 12 is a schematic block diagram of another first communication protocol device according to an embodiment of the present application. The first communication protocol device may be, for example, an OCF device. The first communication protocol device 1200 of FIG. 12 includes a communication unit 1210.
通信单元1210,用于向桥接设备发送资源发现请求消息。The communication unit 1210 is configured to send a resource discovery request message to the bridge device.
通信单元1210,还用于接收所述桥接设备发送的资源发现响应消息,所述资源发现响应消息中包括预先创建的代理服务资源和第一通信协议虚拟服务端的平台资源的统一资源标识符、设备资源的统一资源标识符及端点,其中,所述第一通信协议虚拟服务端的端点与所述桥接设备的端点相同,所述代理服务资源的统一资源标识符与所述桥接设备的平台资源的统一资源标识符、设备资源的统一资源标识符均不同。The communication unit 1210 is further configured to receive a resource discovery response message sent by the bridge device, where the resource discovery response message includes a pre-created proxy service resource and a uniform resource identifier of the platform resource of the first communication protocol virtual server and a device. A uniform resource identifier and endpoint of the resource, wherein the endpoint of the first communication protocol virtual server is the same as the endpoint of the bridge device, and the uniform resource identifier of the proxy service resource is the same as the platform resource of the bridge device The resource identifier and the uniform resource identifier of the device resource are different.
通信单元1210,还用于向所述代理服务资源发送资源操作请求消息,所述资源操作请求消息中包括目标标识,所述资源操作请求消息中包括所述代理服务资源的平台资源的统一资源标识符和设备资源的统一资源标识符,所述目标标识用于标识所述代理服务资源进行操作的第二通信协议设备,所述第一通信协议与所述第二通信协议不同。The communication unit 1210 is further configured to send a resource operation request message to the proxy service resource, where the resource operation request message includes a target identifier, and the resource operation request message includes a uniform resource identifier of a platform resource of the proxy service resource Identifier and a uniform resource identifier of a device resource, the target identifier is used to identify a second communication protocol device on which the proxy service resource operates, and the first communication protocol is different from the second communication protocol.
可选地,所述资源发现响应消息中还包括以下信息中的至少一种:所述代理服务资源的资源类型和接口。Optionally, the resource discovery response message further includes at least one of the following information: a resource type and an interface of the proxy service resource.
可选地,所述资源操作请求消息中包括以下信息中的至少一种:所述第一通信协议虚拟服务端的设备实例资源的URI、资源操作方法和载荷。Optionally, the resource operation request message includes at least one of the following information: a URI of a device instance resource of the first communication protocol virtual server, a resource operation method, and a payload.
可选地,所述第一通信协议可以为OCF协议。Optionally, the first communication protocol may be an OCF protocol.
图13是本申请实施例提供的另一种桥接设备的示意性框图。图13的桥接设备1300包括通信单元1310和处理单元1320。FIG. 13 is a schematic block diagram of another bridge device according to an embodiment of the present application. The bridge device 1300 of FIG. 13 includes a communication unit 1310 and a processing unit 1320.
通信单元1310,用于接收第二通信协议设备发送的设备注册请求消息。The communication unit 1310 is configured to receive a device registration request message sent by a second communication protocol device.
处理单元1320,用于为所述第二通信协议设备创建第一通信协议虚拟服务端和代理服务资源,其中,所述第一通信协议虚拟服务端的端点与所述桥接设备的端点相同,所述代理服务资源的统一资源标识符与所述桥接设备的平台资源的统一资源标识符、设备资源的统一资源标识符均不同,所述代理服务资源用于代理第一通信协议客户端对所述第一通信协议虚拟服务端的请求。A processing unit 1320, configured to create a first communication protocol virtual server and a proxy service resource for the second communication protocol device, wherein an endpoint of the first communication protocol virtual server is the same as an endpoint of the bridge device, and The uniform resource identifier of the proxy service resource is different from the uniform resource identifier of the platform resource of the bridge device and the uniform resource identifier of the device resource, and the proxy service resource is used to proxy the first communication protocol client to the first communication protocol client. A communication protocol request from the virtual server.
图14是本申请实施例提供的一种通信设备1400示意性结构图。图14所示的通信设备1400包括处理器1410,处理器1410可以从存储器中调用并运行计算机程序,以实现本申请实施例中的方法。FIG. 14 is a schematic structural diagram of a communication device 1400 according to an embodiment of the present application. The communication device 1400 shown in FIG. 14 includes a processor 1410, and the processor 1410 can call and run a computer program from a memory to implement the method in the embodiment of the present application.
可选地,如图14所示,通信设备1400还可以包括存储器1420。其中,处理器1410可以从存储器1420中调用并运行计算机程序,以实现本申请实施例中的方法。Optionally, as shown in FIG. 14, the communication device 1400 may further include a memory 1420. The processor 1410 may call and run a computer program from the memory 1420 to implement the method in the embodiment of the present application.
其中,存储器1420可以是独立于处理器1410的一个单独的器件,也可以集成在处理器1410中。The memory 1420 may be a separate device independent of the processor 1410, or may be integrated in the processor 1410.
可选地,如图14所示,通信设备1400还可以包括收发器1430,处理器1410可以控制该收发器1430与其他设备进行通信,具体地,可以向其他设备发送信息或数据,或接收其他设备发送的信息或数据。Optionally, as shown in FIG. 14, the communication device 1400 may further include a transceiver 1430, and the processor 1410 may control the transceiver 1430 to communicate with other devices, and specifically, may send information or data to other devices, or receive other Information or data sent by the device.
其中,收发器1430可以包括发射机和接收机。收发器1430还可以进一步包括天线,天线的数量可以为一个或多个。The transceiver 1430 may include a transmitter and a receiver. The transceiver 1430 may further include an antenna, and the number of antennas may be one or more.
可选地,该通信设备1400具体可为本申请实施例的网络设备,并且该通信设备1400可以实现本申请实施例的各个方法中由网络设备实现的相应流程,为了简洁,在此不再赘述。Optionally, the communication device 1400 may specifically be a network device according to an embodiment of the present application, and the communication device 1400 may implement a corresponding process implemented by a network device in each method of the embodiments of the present application. .
可选地,该通信设备1400具体可为本申请实施例的移动终端/终端设备,并且该通信设备1400可以实现本申请实施例的各个方法中由移动终端/终端设备实现的相应流程,为了简洁,在此不再赘述。Optionally, the communication device 1400 may specifically be a mobile terminal / terminal device in the embodiment of the present application, and the communication device 1400 may implement a corresponding process implemented by the mobile terminal / terminal device in each method in the embodiments of the present application, for the sake of simplicity , Will not repeat them here.
图15是本申请实施例的芯片的示意性结构图。图15所示的芯片1500包括处理器1510,处理器1510可以从存储器中调用并运行计算机程序,以实现本申请实施例中的方法。FIG. 15 is a schematic structural diagram of a chip according to an embodiment of the present application. The chip 1500 shown in FIG. 15 includes a processor 1510, and the processor 1510 can call and run a computer program from a memory to implement the method in the embodiment of the present application.
可选地,如图15所示,芯片1500还可以包括存储器1520。其中,处理器1510可以从存储器1520中调用并运行计算机程序,以实现本申请实施例中的方法。Optionally, as shown in FIG. 15, the chip 1500 may further include a memory 1520. The processor 1510 may call and run a computer program from the memory 1520 to implement the method in the embodiment of the present application.
其中,存储器1520可以是独立于处理器1510的一个单独的器件,也可以集成在处理器1510中。The memory 1520 may be a separate device independent of the processor 1510, or may be integrated in the processor 1510.
可选地,该芯片1500还可以包括输入接口1530。其中,处理器1510可以控制该输入接口1530与其他设备或芯片进行通信,具体地,可以获取其他设备或芯片发送的信息或数据。Optionally, the chip 1500 may further include an input interface 1530. The processor 1510 may control the input interface 1530 to communicate with other devices or chips. Specifically, the processor 1510 may obtain information or data sent by other devices or chips.
可选地,该芯片1500还可以包括输出接口1540。其中,处理器1510可以控制该输出接口1540与其他设备或芯片进行通信,具体地,可以向其他设备或芯片输出信息或数据。Optionally, the chip 1500 may further include an output interface 1540. The processor 1510 may control the output interface 1540 to communicate with other devices or chips. Specifically, the processor 1510 may output information or data to the other devices or chips.
可选地,该芯片可应用于本申请实施例中的网络设备,并且该芯片可以实现本申请实施例的各个方法中由网络设备实现的相应流程,为了简洁,在此不再赘述。Optionally, the chip may be applied to the network device in the embodiment of the present application, and the chip may implement the corresponding process implemented by the network device in each method of the embodiment of the present application. For brevity, details are not described herein again.
可选地,该芯片可应用于本申请实施例中的移动终端/终端设备,并且该芯片可以实现本申请实施例的各个方法中由移动终端/终端设备实现的相应流程,为了简洁,在此不再赘述。Optionally, the chip can be applied to the mobile terminal / terminal device in the embodiments of the present application, and the chip can implement the corresponding process implemented by the mobile terminal / terminal device in each method of the embodiments of the present application. For simplicity, here No longer.
应理解,本申请实施例提到的芯片还可以称为系统级芯片,系统芯片,芯片系统或片上系统芯片等。It should be understood that the chip mentioned in the embodiments of the present application may also be referred to as a system-level chip, a system chip, a chip system or a system-on-chip.
图16是本申请实施例提供的一种通信系统1600的示意性框图。如图16所示,该通信系统1600包括桥接设备1610和第一通信协议设备1620。FIG. 16 is a schematic block diagram of a communication system 1600 according to an embodiment of the present application. As shown in FIG. 16, the communication system 1600 includes a bridge device 1610 and a first communication protocol device 1620.
其中,该桥接设备1610可以用于实现上述方法中由桥接设备实现的相应的功能,以及该第一通信协议设备1620可以用于实现上述方法中由设备实现的相应的功能为了简洁,在此不再赘述。The bridging device 1610 may be used to implement the corresponding functions implemented by the bridging device in the above method, and the first communication protocol device 1620 may be used to implement the corresponding functions implemented by the device in the above method. More details.
应理解,本申请实施例的处理器可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法实施例的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器可以是通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法的步骤。It should be understood that the processor in the embodiment of the present application may be an integrated circuit chip and has a signal processing capability. In the implementation process, each step of the foregoing method embodiment may be completed by using an integrated logic circuit of hardware in a processor or an instruction in a form of software. The above processor may be a general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), an off-the-shelf programmable gate array (Field, Programmable Gate Array, FPGA), or other Programming logic devices, discrete gate or transistor logic devices, discrete hardware components. Various methods, steps, and logical block diagrams disclosed in the embodiments of the present application can be implemented or executed. A general-purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in combination with the embodiments of the present application may be directly implemented by a hardware decoding processor, or may be performed by using a combination of hardware and software modules in the decoding processor. The software module may be located in a mature storage medium such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, and the like. The storage medium is located in a memory, and the processor reads the information in the memory and completes the steps of the foregoing method in combination with its hardware.
可以理解,本申请实施例中的存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DR RAM)。应注意,本文描述的系统和方法的存储器旨在包括但不限于这些和任意其它适合类型的存储器。It can be understood that the memory in the embodiment of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), and an electronic memory. Erase programmable read-only memory (EPROM, EEPROM) or flash memory. The volatile memory may be Random Access Memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (Synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (Double SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (Enhanced SDRAM, ESDRAM), synchronous connection dynamic random access memory (Synchlink DRAM, SLDRAM ) And direct memory bus random access memory (Direct Rambus RAM, DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
应理解,上述存储器为示例性但不是限制性说明,例如,本申请实施例中的存储器还可以是静态随机存取存储器(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 a static random access memory (static RAM, SRAM), a dynamic random access memory (dynamic RAM, DRAM), Synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (Double 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, the memories in the embodiments of the present application are intended to include, but not limited to, these and any other suitable types of memories.
本申请实施例还提供了一种计算机可读存储介质,用于存储计算机程序。An embodiment of the present application further provides a computer-readable storage medium for storing a computer program.
可选的,该计算机可读存储介质可应用于本申请实施例中的网络设备,并且该计算机程序使得计算机执行本申请实施例的各个方法中由网络设备实现的相应流程,为了简洁,在此不再赘述。Optionally, the computer-readable storage medium may be applied to the network device in the embodiment of the present application, and the computer program causes the computer to execute the corresponding process implemented by the network device in each method in the embodiment of the present application. For simplicity, here No longer.
可选地,该计算机可读存储介质可应用于本申请实施例中的移动终端/终端设备,并且该计算机程序使得计算机执行本申请实施例的各个方法中由移动终端/终端设备实现的相应流程,为了简洁,在此不再赘述。Optionally, the computer-readable storage medium may be applied to the mobile terminal / terminal device in the embodiment of the present application, and the computer program causes the computer to execute a corresponding process implemented by the mobile terminal / terminal device in each method in the embodiment of the present application. For the sake of brevity, I won't repeat them here.
本申请实施例还提供了一种计算机程序产品,包括计算机程序指令。An embodiment of the present application further provides a computer program product, including computer program instructions.
可选的,该计算机程序产品可应用于本申请实施例中的网络设备,并且该计算机程序指令使得计算机执行本申请实施例的各个方法中由网络设备实现的相应流程,为了简洁,在此不再赘述。Optionally, the computer program product can be applied to the network device in the embodiment of the present application, and the computer program instruction causes the computer to execute a corresponding process implemented by the network device in each method in the embodiment of the present application. More details.
可选地,该计算机程序产品可应用于本申请实施例中的移动终端/终端设备,并且该计算机程序指令使得计算机执行本申请实施例的各个方法中由移动终端/终端设备实现的相应流程,为了简洁,在此 不再赘述。Optionally, the computer program product can be applied to a mobile terminal / terminal device in the embodiments of the present application, and the computer program instructions cause the computer to execute a corresponding process implemented by the mobile terminal / terminal device in each method in the embodiments of the present application For brevity, I will not repeat them here.
本申请实施例还提供了一种计算机程序。The embodiment of the present application also provides a computer program.
可选的,该计算机程序可应用于本申请实施例中的网络设备,当该计算机程序在计算机上运行时,使得计算机执行本申请实施例的各个方法中由网络设备实现的相应流程,为了简洁,在此不再赘述。Optionally, the computer program may be applied to a network device in the embodiment of the present application. When the computer program is run on a computer, the computer is caused to execute a corresponding process implemented by the network device in each method in the embodiment of the present application. , Will not repeat them here.
可选地,该计算机程序可应用于本申请实施例中的移动终端/终端设备,当该计算机程序在计算机上运行时,使得计算机执行本申请实施例的各个方法中由移动终端/终端设备实现的相应流程,为了简洁,在此不再赘述。Optionally, the computer program may be applied to a mobile terminal / terminal device in the embodiment of the present application. When the computer program is run on a computer, the computer executes each method in the embodiment of the application by the mobile terminal / terminal device. The corresponding processes are not repeated here for brevity.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art may realize that the units and algorithm steps of each example described in connection with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments, and are not repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods may be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the unit is only a logical function division. In actual implementation, there may be another division manner. For example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not implemented. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, which may be electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, may be located in one place, or may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objective of the solution of this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each of the units may exist separately physically, or two or more units may be integrated into one unit.
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,)ROM、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application is essentially a part that contributes to the existing technology or a part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in the embodiments of the present application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory) ROM, random access memory (Random Access Memory, RAM), magnetic disks or optical disks and other media that can store program codes .
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应所述以权利要求的保护范围为准。The above is only a specific implementation of this application, but the scope of protection of this application is not limited to this. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in this application. It should be covered by the protection scope of this application. Therefore, the protection scope of this application shall be subject to the protection scope of the claims.

Claims (68)

  1. 一种桥接通信的方法,其特征在于,包括:A method for bridging communication includes:
    桥接设备接收第一通信协议客户端发送的资源发现请求消息;The bridge device receives a resource discovery request message sent by the first communication protocol client;
    所述桥接设备向所述第一通信协议客户端发送资源发现响应消息,所述资源发现响应消息中包括第一通信协议虚拟服务端的信息,所述第一通信协议虚拟服务端的信息包括平台资源的统一资源标识符、设备资源的统一资源标识符和端点,其中,所述第一通信协议虚拟服务端的端点与所述桥接设备的端点相同,所述第一通信协议虚拟服务端的平台资源的统一资源标识符与所述桥接设备的平台资源的统一资源标识符不同,所述第一通信协议虚拟服务端的设备资源的统一资源标识符与所述桥接设备的设备资源的统一资源标识符不同。The bridging device sends a resource discovery response message to the first communication protocol client, where the resource discovery response message includes information of the first communication protocol virtual server, and the information of the first communication protocol virtual server includes information about the platform resource. Uniform resource identifier, uniform resource identifier and endpoint of device resource, wherein the endpoint of the first communication protocol virtual server is the same as the endpoint of the bridge device, and the unified resource of platform resources of the first communication protocol virtual server The identifier is different from the uniform resource identifier of the platform resource of the bridge device, and the uniform resource identifier of the device resource of the first communication protocol virtual server is different from the uniform resource identifier of the device resource of the bridge device.
  2. 根据权利要求1所述的方法,其特征在于,所述第一通信协议虚拟服务端的平台资源的统一资源标识符和设备资源的统一资源标识符中均包括第二通信协议设备的设备标识。The method according to claim 1, wherein the uniform resource identifier of the platform resource and the uniform resource identifier of the device resource of the first communication protocol virtual server both include the device identification of the second communication protocol device.
  3. 根据权利要求1或2所述的方法,其特征在于,所述第一通信协议虚拟服务端的设备实例资源的统一资源标识符包括第二通信协议设备的设备标识,所述方法还包括:The method according to claim 1 or 2, wherein the uniform resource identifier of the device instance resource of the first communication protocol virtual server includes a device identifier of the second communication protocol device, and the method further comprises:
    所述桥接设备接收所述第一通信协议客户端发送的资源操作请求消息,所述资源操作请求消息中包括所述第一通信协议虚拟服务端的设备实例资源的统一资源标识符;Receiving, by the bridge device, a resource operation request message sent by the first communication protocol client, where the resource operation request message includes a uniform resource identifier of a device instance resource of the first communication protocol virtual server;
    所述桥接设备将所述资源操作请求消息转换为所述第二通信协议设备的协议消息;The bridge device converts the resource operation request message into a protocol message of the second communication protocol device;
    所述桥接设备向所述第二通信协议设备发送所述协议消息。The bridge device sends the protocol message to the second communication protocol device.
  4. 根据权利要求1-3中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1-3, wherein the method further comprises:
    所述桥接设备接收第二通信协议设备发送的设备注册请求消息;Receiving, by the bridge device, a device registration request message sent by a second communication protocol device;
    所述桥接设备为所述第二通信协议设备创建所述第一通信协议虚拟服务端。The bridge device creates the first communication protocol virtual server for the second communication protocol device.
  5. 根据权利要求1-4中任一项所述的方法,其特征在于,所述第一通信协议为开放连接基金会OCF协议。The method according to any one of claims 1-4, wherein the first communication protocol is an Open Connection Foundation OCF protocol.
  6. 一种桥接通信的方法,其特征在于,包括:A method for bridging communication includes:
    第一通信协议客户端向桥接设备发送资源发现请求消息;The first communication protocol client sends a resource discovery request message to the bridge device;
    所述第一通信协议客户端接收所述桥接设备发送的资源发现响应消息,所述资源发现响应消息中包括第一通信协议虚拟服务端的信息,所述第一通信协议虚拟服务端的信息包括平台资源的统一资源标识符、设备资源的统一资源标识符和端点,其中,所述第一通信协议虚拟服务端的端点与所述桥接设备的端点相同,所述第一通信协议虚拟服务端的平台资源的统一资源标识符与所述桥接设备的平台资源的统一资源标识符不同,所述第一通信协议虚拟服务端的设备资源的统一资源标识符与所述桥接设备的设备资源的统一资源标识符不同。Receiving, by the first communication protocol client, a resource discovery response message sent by the bridge device, the resource discovery response message including information of a first communication protocol virtual server, and the information of the first communication protocol virtual server including platform resources The endpoint of the first communication protocol virtual server is the same as the endpoint of the bridging device, and the unified resource identifier and endpoint of the device resource are the same The resource identifier is different from the uniform resource identifier of the platform resource of the bridge device, and the uniform resource identifier of the device resource of the first communication protocol virtual server is different from the uniform resource identifier of the device resource of the bridge device.
  7. 根据权利要求6所述的方法,其特征在于,所述第一通信协议虚拟服务端的平台资源的统一资源标识符和设备资源的统一资源标识符中均包括第二通信协议设备的设备标识。The method according to claim 6, wherein the uniform resource identifier of the platform resource and the uniform resource identifier of the device resource of the first communication protocol virtual server both include the device identification of the second communication protocol device.
  8. 根据权利要求6或7所述的方法,其特征在于,所述第一通信协议虚拟服务端的设备实例资源的统一资源标识符包括第二通信协议设备的设备标识,所述方法还包括:The method according to claim 6 or 7, wherein the uniform resource identifier of the device instance resource of the first communication protocol virtual server includes a device identifier of the second communication protocol device, and the method further comprises:
    所述第一通信协议客户端向所述桥接设备发送资源操作请求消息,所述资源操作请求消息中包括所述第一通信协议虚拟服务端的设备实例资源的统一资源标识符,所述设备实例资源的统一资源标识符用于标识所述第一通信协议虚拟服务端进行操作的所述第二通信协议设备。The first communication protocol client sends a resource operation request message to the bridge device, and the resource operation request message includes a uniform resource identifier of a device instance resource of the first communication protocol virtual server, and the device instance resource The uniform resource identifier is used to identify the second communication protocol device that is operated by the first communication protocol virtual server.
  9. 根据权利要求6-8中任一项所述的方法,其特征在于,所述第一通信协议为开放连接基金会OCF协议。The method according to any one of claims 6 to 8, wherein the first communication protocol is an Open Connection Foundation OCF protocol.
  10. 一种桥接通信的方法,其特征在于,包括:A method for bridging communication includes:
    桥接设备接收第二通信协议设备发送的设备注册请求消息;The bridge device receives a device registration request message sent by the second communication protocol device;
    所述桥接设备为所述第二通信协议设备创建第一通信协议虚拟服务端,其中,所述第一通信协议虚拟服务端的端点与所述桥接设备的端点相同,所述第一通信协议虚拟服务端的平台资源的统一资源标识符与所述桥接设备的平台资源的统一资源标识符不同,所述第一通信协议虚拟服务端的设备资源的统一资源标识符与所述桥接设备的设备资源的统一资源标识符不同。The bridge device creates a first communication protocol virtual server for the second communication protocol device, wherein the endpoint of the first communication protocol virtual server is the same as the endpoint of the bridge device, and the first communication protocol virtual service The unified resource identifier of the platform resource of the remote device is different from the unified resource identifier of the platform resource of the bridge device, and the unified resource identifier of the device resource of the first communication protocol virtual server and the unified resource of the device resource of the bridge device Identifiers are different.
  11. 一种桥接通信的方法,其特征在于,包括:A method for bridging communication includes:
    桥接设备接收第一通信协议客户端发送的资源发现请求消息;The bridge device receives a resource discovery request message sent by the first communication protocol client;
    所述桥接设备向所述第一通信协议客户端发送资源发现响应消息,所述资源发现响应消息中包括预先创建的代理服务资源和第一通信协议虚拟服务端的信息,所述预先创建的代理服务资源和第一通信协议虚拟服务端的信息包括平台资源的统一资源标识符、设备资源的统一资源标识符及端点,其中,所述第一通信协议虚拟服务端的端点与所述桥接设备的端点相同,所述代理服务资源的统一资源标识符与所述桥接设备的平台资源的统一资源标识符、设备资源的统一资源标识符均不同;Sending, by the bridging device, a resource discovery response message to the first communication protocol client, the resource discovery response message including information of a pre-created proxy service resource and a first communication protocol virtual server, the pre-created proxy service The information of the resource and the first communication protocol virtual server includes the uniform resource identifier of the platform resource, the uniform resource identifier of the device resource, and the endpoint, wherein the endpoint of the first communication protocol virtual server is the same as the endpoint of the bridge device, The uniform resource identifier of the proxy service resource is different from the uniform resource identifier of the platform resource of the bridge device, and the uniform resource identifier of the device resource;
    所述桥接设备接收所述第一通信协议客户端发送的资源操作请求消息,所述资源操作请求消息中包括所述代理服务资源的平台资源的统一资源标识符和设备资源的统一资源标识符,所述资源操作请求消息中还包括目标标识,所述目标标识用于标识所述代理服务资源进行操作的第二通信协议设备;Receiving, by the bridge device, a resource operation request message sent by the first communication protocol client, where the resource operation request message includes a uniform resource identifier of a platform resource of the proxy service resource and a uniform resource identifier of a device resource, The resource operation request message further includes a target identifier, where the target identifier is used to identify a second communication protocol device that the proxy service resource operates on;
    所述桥接设备将所述资源操作请求消息转换为所述第二通信协议设备的协议消息;The bridge device converts the resource operation request message into a protocol message of the second communication protocol device;
    所述桥接设备向所述第二通信协议设备发送所述协议消息。The bridge device sends the protocol message to the second communication protocol device.
  12. 根据权利要求11所述的方法,其特征在于,所述资源发现响应消息中还包括以下信息中的至少一种:所述代理服务资源的资源类型和接口。The method according to claim 11, wherein the resource discovery response message further comprises at least one of the following information: a resource type and an interface of the proxy service resource.
  13. 根据权利要求11或12所述的方法,其特征在于,所述资源操作请求消息中包括以下信息中的至少一种:所述第一通信协议虚拟服务端的设备实例资源的统一资源标识符、资源操作方法和载荷。The method according to claim 11 or 12, wherein the resource operation request message includes at least one of the following information: a uniform resource identifier and a resource of a device instance resource of the first communication protocol virtual server. Method of operation and load.
  14. 根据权利要求11-13中任一项所述的方法,其特征在于,所述第一通信协议为开放连接基金会OCF协议。The method according to any one of claims 11-13, wherein the first communication protocol is an Open Connection Foundation OCF protocol.
  15. 一种桥接通信的方法,其特征在于,包括:A method for bridging communication includes:
    第一通信协议客户端向桥接设备发送资源发现请求消息;The first communication protocol client sends a resource discovery request message to the bridge device;
    所述第一通信协议客户端接收所述桥接设备发送的资源发现响应消息,所述资源发现响应消息中包括预先创建的代理服务资源和第一通信协议虚拟服务端的信息,所述代理服务资源和第一通信协议虚拟服务端的信息包括平台资源的统一资源标识符、设备资源的统一资源标识符及端点,其中,所述第一通信协议虚拟服务端的端点与所述桥接设备的端点相同,所述代理服务资源的统一资源标识符与所述桥接设备的平台资源的统一资源标识符、设备资源的统一资源标识符均不同;Receiving, by the first communication protocol client, a resource discovery response message sent by the bridge device, where the resource discovery response message includes information of a pre-created proxy service resource and a first communication protocol virtual server, the proxy service resource and The information of the first communication protocol virtual server includes a uniform resource identifier of a platform resource, a uniform resource identifier of an equipment resource, and an endpoint. The endpoint of the first communication protocol virtual server is the same as the endpoint of the bridge device. The uniform resource identifier of the proxy service resource is different from the uniform resource identifier of the platform resource of the bridge device, and the uniform resource identifier of the device resource;
    所述第一通信协议客户端向所述桥接设备发送资源操作请求消息,所述资源操作请求消息中包括所述代理服务资源的平台资源的统一资源标识符和设备资源的统一资源标识符,所述资源操作请求消息中还包括目标标识,所述目标标识用于标识所述代理服务资源进行操作的第二通信协议设备。The first communication protocol client sends a resource operation request message to the bridge device, and the resource operation request message includes a uniform resource identifier of a platform resource of the proxy service resource and a uniform resource identifier of a device resource, and The resource operation request message further includes a target identifier, and the target identifier is used to identify a second communication protocol device that the proxy service resource operates.
  16. 根据权利要求15所述的方法,其特征在于,所述资源发现响应消息中还包括以下信息中的至少一种:所述代理服务资源的资源类型和接口。The method according to claim 15, wherein the resource discovery response message further comprises at least one of the following information: a resource type and an interface of the proxy service resource.
  17. 根据权利要求15或16所述的方法,其特征在于,所述资源操作请求消息中包括以下信息中的至少一种:所述第一通信协议虚拟服务端的设备实例资源的统一资源标识符、资源操作方法和载荷。The method according to claim 15 or 16, wherein the resource operation request message includes at least one of the following information: a uniform resource identifier and a resource of a device instance resource of the first communication protocol virtual server. Method of operation and load.
  18. 根据权利要求15-17中任一项所述的方法,其特征在于,所述第一通信协议为开放连接基金会OCF协议。The method according to any one of claims 15-17, wherein the first communication protocol is an Open Connection Foundation OCF protocol.
  19. 一种桥接通信的方法,其特征在于,包括:A method for bridging communication includes:
    桥接设备接收第二通信协议设备发送的设备注册请求消息;The bridge device receives a device registration request message sent by the second communication protocol device;
    所述桥接设备为所述第二通信协议设备创建第一通信协议虚拟服务端和代理服务资源,其中,所述第一通信协议虚拟服务端的端点与所述桥接设备的端点相同,所述代理服务资源的统一资源标识符与所述桥接设备的平台资源的统一资源标识符、设备资源的统一资源标识符均不同,所述代理服务资源用于代理第一通信协议客户端对所述第一通信协议虚拟服务端的请求。The bridge device creates a first communication protocol virtual server and a proxy service resource for the second communication protocol device, wherein the endpoint of the first communication protocol virtual server is the same as the endpoint of the bridge device, and the proxy service The uniform resource identifier of the resource is different from the uniform resource identifier of the platform resource of the bridge device and the uniform resource identifier of the device resource, and the proxy service resource is used to proxy a first communication protocol client to the first communication. Protocol virtual server request.
  20. 一种桥接设备,其特征在于,包括:A bridging device, comprising:
    通信单元,用于接收第一通信协议客户端发送的资源发现请求消息;A communication unit, configured to receive a resource discovery request message sent by a first communication protocol client;
    所述通信单元,还用于向所述第一通信协议客户端发送资源发现响应消息,所述资源发现响应消息中包括所述桥接设备创建的第一通信协议虚拟服务端的平台资源的统一资源标识符、设备资源的统一资源标识符和端点,其中,所述第一通信协议虚拟服务端的端点与所述桥接设备的端点相同,所述第一通信协议虚拟服务端的平台资源的统一资源标识符与所述桥接设备的平台资源的统一资源标识符不同,所述第一通信协议虚拟服务端的设备资源的统一资源标识符与所述桥接设备的设备资源的统一资源标识符不同。The communication unit is further configured to send a resource discovery response message to the first communication protocol client, where the resource discovery response message includes a uniform resource identifier of a platform resource of the first communication protocol virtual server created by the bridging device. Identifier, device resource uniform resource identifier and endpoint, wherein the endpoint of the first communication protocol virtual server is the same as the endpoint of the bridge device, and the uniform resource identifier of the platform resource of the first communication protocol virtual server is The unified resource identifier of the platform resource of the bridge device is different, and the unified resource identifier of the device resource of the first communication protocol virtual server is different from the unified resource identifier of the device resource of the bridge device.
  21. 根据权利要求20所述的桥接设备,其特征在于,所述第一通信协议虚拟服务端的平台资源的统一资源标识符和设备资源的统一资源标识符中均包括第二通信协议设备的设备标识。The bridging device according to claim 20, wherein the uniform resource identifier of the platform resource of the first communication protocol virtual server and the uniform resource identifier of the device resource both include the device identification of the second communication protocol device.
  22. 根据权利要求20或21所述的桥接设备,其特征在于,所述第一通信协议虚拟服务端的设备实例资源的统一资源标识符包括第二通信协议设备的设备标识,The bridging device according to claim 20 or 21, wherein the uniform resource identifier of the device instance resource of the first communication protocol virtual server includes a device identifier of the second communication protocol device,
    所述通信单元:还用于接收第一通信协议客户端发送的资源操作请求消息,所述资源操作请求消息中包括所述第一通信协议虚拟服务端的设备实例资源的统一资源标识符;The communication unit is further configured to receive a resource operation request message sent by a first communication protocol client, where the resource operation request message includes a uniform resource identifier of a device instance resource of the first communication protocol virtual server;
    所述桥接设备还包括处理单元,用于将所述资源操作请求消息转换为所述第二通信协议设备的协议消息;The bridge device further includes a processing unit for converting the resource operation request message into a protocol message of the second communication protocol device;
    所述通信单元:还用于向所述第二通信协议设备发送所述协议消息。The communication unit is further configured to send the protocol message to the second communication protocol device.
  23. 根据权利要求20-22中任一项所述的桥接设备,其特征在于,所述通信单元还用于:The bridging device according to any one of claims 20 to 22, wherein the communication unit is further configured to:
    接收第二通信协议设备发送的设备注册请求消息;Receiving a device registration request message sent by a second communication protocol device;
    所述桥接设备还包括处理单元,用于为所述第二通信协议设备创建所述第一通信协议虚拟服务端。The bridge device further includes a processing unit configured to create the first communication protocol virtual server for the second communication protocol device.
  24. 根据权利要求20-23中任一项所述的桥接设备,其特征在于,所述第一通信协议为开放连接基金会OCF协议。The bridge device according to any one of claims 20 to 23, wherein the first communication protocol is an Open Connection Foundation OCF protocol.
  25. 一种第一通信协议设备,其特征在于,包括:A first communication protocol device, comprising:
    通信单元,用于向桥接设备发送资源发现请求消息;A communication unit, configured to send a resource discovery request message to the bridge device;
    所述通信单元,还用于接收所述桥接设备发送的资源发现响应消息,所述资源发现响应消息中包括所述桥接设备创建的第一通信协议虚拟服务端的平台资源的统一资源标识符、设备资源的统一资源标识符和端点,其中,所述第一通信协议虚拟服务端的端点与所述桥接设备的端点相同,所述第一通信协议虚拟服务端的平台资源的统一资源标识符与所述桥接设备的平台资源的统一资源标识符不同,所述第一通信协议虚拟服务端的设备资源的统一资源标识符与所述桥接设备的设备资源的统一资源标识符不同。The communication unit is further configured to receive a resource discovery response message sent by the bridge device, where the resource discovery response message includes a uniform resource identifier and device of a platform resource of the first communication protocol virtual server created by the bridge device A uniform resource identifier and endpoint of the resource, wherein the endpoint of the first communication protocol virtual server is the same as the endpoint of the bridging device, and the uniform resource identifier of the platform resource of the first communication protocol virtual server and the bridge The uniform resource identifier of the platform resource of the device is different, and the uniform resource identifier of the device resource of the first communication protocol virtual server is different from the uniform resource identifier of the device resource of the bridge device.
  26. 根据权利要求25所述的设备,其特征在于,所述第一通信协议虚拟服务端的平台资源的统一资源标识符和设备资源的统一资源标识符中均包括第二通信协议设备的设备标识。The device according to claim 25, wherein the uniform resource identifier of the platform resource and the uniform resource identifier of the device resource of the first communication protocol virtual server both include the device identification of the second communication protocol device.
  27. 根据权利要求25或26所述的设备,其特征在于,所述第一通信协议虚拟服务端的设备实例资源的统一资源标识符包括第二通信协议设备的设备标识,The device according to claim 25 or 26, wherein a uniform resource identifier of a device instance resource of the first communication protocol virtual server includes a device identifier of a second communication protocol device,
    所述通信单元:还用于向所述桥接设备发送资源操作请求消息,所述资源操作请求消息中包括所述第一通信协议虚拟服务端的设备实例资源的统一资源标识符,所述设备实例资源的统一资源标识符用于标识所述第一通信协议虚拟服务端进行操作的所述第二通信协议设备。The communication unit is further configured to send a resource operation request message to the bridge device, where the resource operation request message includes a uniform resource identifier of a device instance resource of the first communication protocol virtual server, and the device instance resource The uniform resource identifier is used to identify the second communication protocol device that is operated by the first communication protocol virtual server.
  28. 根据权利要求25-27中任一项所述的设备,其特征在于,所述第一通信协议为开放连接基金会OCF协议。The device according to any one of claims 25-27, wherein the first communication protocol is an Open Connection Foundation OCF protocol.
  29. 一种桥接设备,其特征在于,包括:A bridging device, comprising:
    通信单元,用于接收第二通信协议设备发送的设备注册请求消息;A communication unit, configured to receive a device registration request message sent by a second communication protocol device;
    处理单元,用于为所述第二通信协议设备创建第一通信协议虚拟服务端,其中,所述第一通信协议虚拟服务端的端点与所述桥接设备的端点相同,所述第一通信协议虚拟服务端的平台资源的统一资源标识符与所述桥接设备的平台资源的统一资源标识符不同,所述第一通信协议虚拟服务端的设备资源的统一资源标识符与所述桥接设备的设备资源的统一资源标识符不同。A processing unit, configured to create a first communication protocol virtual server for the second communication protocol device, wherein the endpoint of the first communication protocol virtual server is the same as the endpoint of the bridge device, and the first communication protocol virtual The uniform resource identifier of the platform resource of the server is different from the uniform resource identifier of the platform resource of the bridge device, and the uniform resource identifier of the device resource of the first communication protocol virtual server is the same as the device resource of the bridge device The resource identifier is different.
  30. 一种桥接设备,其特征在于,包括:A bridging device, comprising:
    通信单元,用于接收第一通信协议客户端发送的资源发现请求消息;A communication unit, configured to receive a resource discovery request message sent by a first communication protocol client;
    所述通信单元,还用于向所述第一通信协议客户端发送资源发现响应消息,所述资源发现响应消息中包括预先创建的代理服务资源的信息和第一通信协议虚拟服务端的平台资源的统一资源标识符、设备资源的统一资源标识符及端点,其中,所述第一通信协议虚拟服务端的端点与所述桥接设备的端点相同,所述代理服务资源的统一资源标识符与所述桥接设备的平台资源的统一资源标识符、设备资源的统一资源标识符均不同;The communication unit is further configured to send a resource discovery response message to the first communication protocol client, where the resource discovery response message includes information of a pre-created proxy service resource and a platform resource of the first communication protocol virtual server. A uniform resource identifier, a uniform resource identifier and an endpoint of a device resource, wherein the endpoint of the first communication protocol virtual server is the same as the endpoint of the bridge device, and the uniform resource identifier of the proxy service resource and the bridge The uniform resource identifier of the platform resource of the device and the uniform resource identifier of the device resource are different;
    所述通信单元,还用于接收所述第一通信协议客户端发送的资源操作请求消息,所述资源操作请求消息中包括所述代理服务资源的平台资源的统一资源标识符和设备资源的统一资源标识符,所述资源操作请求消息中还包括目标标识,所述目标标识用于标识所述代理服务资源进行操作的第二通信协议设备;The communication unit is further configured to receive a resource operation request message sent by the first communication protocol client, where the resource operation request message includes a unified resource identifier of a platform resource of the proxy service resource and a unified resource of a device resource. A resource identifier, and the resource operation request message further includes a target identifier, where the target identifier is used to identify a second communication protocol device on which the proxy service resource operates;
    处理单元,用于将所述资源操作请求消息转换为所述第二通信协议设备的协议消息;A processing unit, configured to convert the resource operation request message into a protocol message of the second communication protocol device;
    所述通信单元:还用于向所述第二通信协议设备发送所述协议消息。The communication unit is further configured to send the protocol message to the second communication protocol device.
  31. 根据权利要求30所述的桥接设备,其特征在于,所述资源发现响应消息中还包括以下信息中的至少一种:所述代理服务资源的资源类型和接口。The bridging device according to claim 30, wherein the resource discovery response message further comprises at least one of the following information: a resource type and an interface of the proxy service resource.
  32. 根据权利要求30或31所述的桥接设备,其特征在于,所述资源操作请求消息中包括以下信息中的至少一种:所述第一通信协议虚拟服务端的设备实例资源的统一资源标识符、资源操作方法和载荷。The bridging device according to claim 30 or 31, wherein the resource operation request message includes at least one of the following information: a uniform resource identifier of a device instance resource of the first communication protocol virtual server, Resource manipulation methods and loads.
  33. 根据权利要求30-32中任一项所述的桥接设备,其特征在于,所述第一通信协议为开放连接基金会OCF协议。The bridge device according to any one of claims 30 to 32, wherein the first communication protocol is an Open Connection Foundation OCF protocol.
  34. 一种第一通信协议设备,其特征在于,包括:A first communication protocol device, comprising:
    通信单元,用于向桥接设备发送资源发现请求消息;A communication unit, configured to send a resource discovery request message to the bridge device;
    所述通信单元,还用于接收所述桥接设备发送的资源发现响应消息,所述资源发现响应消息中包括预先创建的代理服务资源的信息和第一通信协议虚拟服务端的平台资源的统一资源标识符、设备资源的统一资源标识符及端点,其中,所述第一通信协议虚拟服务端的端点与所述桥接设备的端点相同,所述代理服务资源的统一资源标识符与所述桥接设备的平台资源的统一资源标识符、设备资源的统一资源标识符均不同;The communication unit is further configured to receive a resource discovery response message sent by the bridge device, where the resource discovery response message includes information of a pre-created proxy service resource and a uniform resource identifier of a platform resource of the first communication protocol virtual server. Identifiers and endpoints of device resources, where the endpoint of the first communication protocol virtual server is the same as the endpoint of the bridge device, the uniform resource identifier of the proxy service resource and the platform of the bridge device The uniform resource identifier of the resource and the uniform resource identifier of the device resource are different;
    所述通信单元,还用于向所述桥接设备发送资源操作请求消息,所述资源操作请求消息中包括所述代理服务资源的平台资源的统一资源标识符和设备资源的统一资源标识符,所述资源操作请求消息中还包括目标标识,所述目标标识用于标识所述代理服务资源进行操作的第二通信协议设备。The communication unit is further configured to send a resource operation request message to the bridge device, where the resource operation request message includes a uniform resource identifier of a platform resource of the proxy service resource and a uniform resource identifier of a device resource. The resource operation request message further includes a target identifier, and the target identifier is used to identify a second communication protocol device that the proxy service resource operates.
  35. 根据权利要求34所述的设备,其特征在于,所述资源发现响应消息中还包括以下信息中的至少一种:所述代理服务资源的资源类型和接口。The device according to claim 34, wherein the resource discovery response message further comprises at least one of the following information: a resource type and an interface of the proxy service resource.
  36. 根据权利要求34或35所述的设备,其特征在于,所述资源操作请求消息中包括以下信息中的至少一种:所述第一通信协议虚拟服务端的设备实例资源的统一资源标识符、资源操作方法和载荷。The device according to claim 34 or 35, wherein the resource operation request message includes at least one of the following information: a uniform resource identifier and a resource of a device instance resource of the first communication protocol virtual server Method of operation and load.
  37. 根据权利要求34-36中任一项所述的设备,其特征在于,所述第一通信协议为开放连接基金会OCF协议。The device according to any one of claims 34 to 36, wherein the first communication protocol is an Open Connection Foundation OCF protocol.
  38. 一种桥接设备,其特征在于,包括:A bridging device, comprising:
    通信单元,用于接收第二通信协议设备发送的设备注册请求消息;A communication unit, configured to receive a device registration request message sent by a second communication protocol device;
    处理单元,用于为所述第二通信协议设备创建第一通信协议虚拟服务端和代理服务资源,其中,所述第一通信协议虚拟服务端的端点与所述桥接设备的端点相同,所述代理服务资源的统一资源标识符与所述桥接设备的平台资源的统一资源标识符、设备资源的统一资源标识符均不同,所述代理服务资源用于代理第一通信协议客户端对所述第一通信协议虚拟服务端的请求。A processing unit, configured to create a first communication protocol virtual server and a proxy service resource for the second communication protocol device, wherein the endpoint of the first communication protocol virtual server is the same as the endpoint of the bridge device, and the proxy The uniform resource identifier of the service resource is different from the uniform resource identifier of the platform resource of the bridge device and the uniform resource identifier of the device resource, and the proxy service resource is used to proxy a first communication protocol client to the first Communication protocol virtual server request.
  39. 一种桥接设备,其特征在于,包括:处理器和存储器,该存储器用于存储计算机程序,所述处理器用于调用并运行所述存储器中存储的计算机程序,执行如权利要求1至5中任一项所述的方法。A bridge device, comprising: a processor and a memory, where 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, and execute any one of claims 1 to 5. The method of one item.
  40. 一种第一通信协议设备,其特征在于,包括:处理器和存储器,该存储器用于存储计算机程序,所述处理器用于调用并运行所述存储器中存储的计算机程序,执行如权利要求6至9中任一项所述的方法。A first communication protocol device, comprising: a processor and a memory, where the memory is configured to store a computer program, and the processor is configured to call and run the computer program stored in the memory, and execute claims 6 to The method of any one of 9.
  41. 一种桥接设备,其特征在于,包括:处理器和存储器,该存储器用于存储计算机程序,所述处理器用于调用并运行所述存储器中存储的计算机程序,执行如权利要求10所述的方法。A bridge device, comprising: a processor and a memory, where the memory is used to store a computer program, the processor is used to call and run the computer program stored in the memory, and execute the method according to claim 10 .
  42. 一种桥接设备,其特征在于,包括:处理器和存储器,该存储器用于存储计算机程序,所述处理器用于调用并运行所述存储器中存储的计算机程序,执行如权利要求11至14中任一项所述的方法。A bridge device, comprising: a processor and a memory, where 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 11 to 14. The method of one item.
  43. 一种第一通信协议设备,其特征在于,包括:处理器和存储器,该存储器用于存储计算机程序,所述处理器用于调用并运行所述存储器中存储的计算机程序,执行如权利要求15至18中任一项所述的方法。A first communication protocol device, comprising: a processor and a memory, where 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, and execute the method according to claims 15 to The method of any of 18.
  44. 一种桥接设备,其特征在于,包括:处理器和存储器,该存储器用于存储计算机程序,所述处理器用于调用并运行所述存储器中存储的计算机程序,执行如权利要求19所述的方法。A bridge device, comprising: a processor and a memory, where the memory is used to store a computer program, the processor is used to call and run the computer program stored in the memory, and execute the method according to claim 19 .
  45. 一种芯片,其特征在于,包括:处理器,用于从存储器中调用并运行计算机程序,使得安装有所述芯片的终端设备执行如权利要求1至5中任一项所述的方法。A chip, comprising: a processor, configured to call and run a computer program from a memory, so that a terminal device installed with the chip executes the method according to any one of claims 1 to 5.
  46. 一种芯片,其特征在于,包括:处理器,用于从存储器中调用并运行计算机程序,使得安装有所述芯片的终端设备执行如权利要求6至9中任一项所述的方法。A chip, comprising: a processor, configured to call and run a computer program from a memory, so that a terminal device installed with the chip executes the method according to any one of claims 6 to 9.
  47. 一种芯片,其特征在于,包括:处理器,用于从存储器中调用并运行计算机程序,使得安装有所述芯片的终端设备执行如权利要求10所述的方法。A chip, comprising: a processor, configured to call and run a computer program from a memory, so that a terminal device installed with the chip executes the method according to claim 10.
  48. 一种芯片,其特征在于,包括:处理器,用于从存储器中调用并运行计算机程序,使得安装有所述芯片的终端设备执行如权利要求11至14中任一项所述的方法。A chip is characterized in that it includes a processor for calling and running a computer program from a memory, so that a terminal device installed with the chip executes the method according to any one of claims 11 to 14.
  49. 一种芯片,其特征在于,包括:处理器,用于从存储器中调用并运行计算机程序,使得安装有所述芯片的终端设备执行如权利要求15至18中任一项所述的方法。A chip is characterized in that it includes a processor for calling and running a computer program from a memory, so that a terminal device on which the chip is installed executes the method according to any one of claims 15 to 18.
  50. 一种芯片,其特征在于,包括:处理器,用于从存储器中调用并运行计算机程序,使得安装有所述芯片的终端设备执行如权利要求19所述的方法。A chip, comprising: a processor, configured to call and run a computer program from a memory, so that a terminal device having the chip installed executes the method according to claim 19.
  51. 一种计算机可读存储介质,其特征在于,用于存储计算机程序,所述计算机程序使得计算机执行如权利要求1至5中任一项所述的方法。A computer-readable storage medium, which is used to store a computer program that causes a computer to perform the method according to any one of claims 1 to 5.
  52. 一种计算机可读存储介质,其特征在于,用于存储计算机程序,所述计算机程序使得计算机执行如权利要求6至9中任一项所述的方法。A computer-readable storage medium, which is used for storing a computer program that causes a computer to execute the method according to any one of claims 6 to 9.
  53. 一种计算机可读存储介质,其特征在于,用于存储计算机程序,所述计算机程序使得计算机执行如权利要求10所述的方法。A computer-readable storage medium, configured to store a computer program, which causes a computer to execute the method according to claim 10.
  54. 一种计算机可读存储介质,其特征在于,用于存储计算机程序,所述计算机程序使得计算机执行如权利要求11至14中任一项所述的方法。A computer-readable storage medium, configured to store a computer program, which causes a computer to execute the method according to any one of claims 11 to 14.
  55. 一种计算机可读存储介质,其特征在于,用于存储计算机程序,所述计算机程序使得计算机执行如权利要求15至18中任一项所述的方法。A computer-readable storage medium, characterized in that it is used to store a computer program that causes a computer to execute the method according to any one of claims 15 to 18.
  56. 一种计算机可读存储介质,其特征在于,用于存储计算机程序,所述计算机程序使得计算机执 行如权利要求19所述的方法。A computer-readable storage medium, for storing a computer program, which causes a computer to perform the method according to claim 19.
  57. 一种计算机程序产品,其特征在于,包括计算机程序指令,该计算机程序指令使得计算机执行如权利要求1至5中任一项所述的方法。A computer program product, comprising computer program instructions that cause a computer to perform the method according to any one of claims 1 to 5.
  58. 一种计算机程序产品,其特征在于,包括计算机程序指令,该计算机程序指令使得计算机执行如权利要求6至9中任一项所述的方法。A computer program product, comprising computer program instructions that cause a computer to execute the method according to any one of claims 6 to 9.
  59. 一种计算机程序产品,其特征在于,包括计算机程序指令,该计算机程序指令使得计算机执行如权利要求10所述的方法。A computer program product, comprising computer program instructions that cause a computer to execute the method according to claim 10.
  60. 一种计算机程序产品,其特征在于,包括计算机程序指令,该计算机程序指令使得计算机执行如权利要求11至14中任一项所述的方法。A computer program product, comprising computer program instructions that cause a computer to execute the method according to any one of claims 11 to 14.
  61. 一种计算机程序产品,其特征在于,包括计算机程序指令,该计算机程序指令使得计算机执行如权利要求15至18中任一项所述的方法。A computer program product, comprising computer program instructions that cause a computer to execute the method according to any one of claims 15 to 18.
  62. 一种计算机程序产品,其特征在于,包括计算机程序指令,该计算机程序指令使得计算机执行如权利要求19所述的方法。A computer program product, comprising computer program instructions that cause a computer to execute the method according to claim 19.
  63. 一种计算机程序,其特征在于,所述计算机程序使得计算机执行如权利要求1至5中任一项所述的方法。A computer program, wherein the computer program causes a computer to execute the method according to any one of claims 1 to 5.
  64. 一种计算机程序,其特征在于,所述计算机程序使得计算机执行如权利要求6至9中任一项所述的方法。A computer program, wherein the computer program causes a computer to execute the method according to any one of claims 6 to 9.
  65. 一种计算机程序,其特征在于,所述计算机程序使得计算机执行如权利要求10所述的方法。A computer program, wherein the computer program causes a computer to execute the method according to claim 10.
  66. 一种计算机程序,其特征在于,所述计算机程序使得计算机执行如权利要求10至13中任一项所述的方法。A computer program, wherein the computer program causes a computer to execute the method according to any one of claims 10 to 13.
  67. 一种计算机程序,其特征在于,所述计算机程序使得计算机执行如权利要求15至18中任一项所述的方法。A computer program, wherein the computer program causes a computer to execute the method according to any one of claims 15 to 18.
  68. 一种计算机程序,其特征在于,所述计算机程序使得计算机执行如权利要求19所述的方法。A computer program, wherein the computer program causes a computer to execute the method according to claim 19.
PCT/CN2019/102039 2018-08-24 2019-08-22 Bridging communication method and device WO2020038443A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810974172.7 2018-08-24
CN201810974172.7A CN110858838B (en) 2018-08-24 2018-08-24 Method and apparatus for bridging communications

Publications (1)

Publication Number Publication Date
WO2020038443A1 true WO2020038443A1 (en) 2020-02-27

Family

ID=69592820

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/102039 WO2020038443A1 (en) 2018-08-24 2019-08-22 Bridging communication method and device

Country Status (2)

Country Link
CN (1) CN110858838B (en)
WO (1) WO2020038443A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022247525A1 (en) * 2021-05-28 2022-12-01 杭州萤石软件有限公司 Method for handling internet of things device, and method for setting device resource in internet of things device
CN115428417A (en) * 2020-06-16 2022-12-02 Oppo广东移动通信有限公司 Information processing method and device, equipment and computer storage medium
CN115968543A (en) * 2020-10-26 2023-04-14 Oppo广东移动通信有限公司 Resource mapping method, device, equipment and storage medium

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111885103B (en) * 2020-06-12 2024-05-14 视联动力信息技术股份有限公司 Resource processing method, server, electronic device and storage medium
CN115486038B (en) * 2020-07-14 2024-05-03 Oppo广东移动通信有限公司 Internet of things configuration method, internet of things configuration device, computer equipment and storage medium
KR102628107B1 (en) * 2020-12-29 2024-01-23 에이치디씨랩스 주식회사 Wall Pad and Method of Work on Wall Pad that Using OCF-based Protocol and Legacy Protocol Together

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102186164A (en) * 2011-02-18 2011-09-14 华为技术有限公司 Method and management device for operating device resource
CN107046537A (en) * 2017-04-01 2017-08-15 上海润欣科技股份有限公司 A kind of discovery method that OCF clients based on DNS SD are serviced AllJoyn
US20180063879A1 (en) * 2016-08-29 2018-03-01 Electronics And Telecommunications Research Institute Apparatus and method for interoperation between internet-of-things devices

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014106945A1 (en) * 2013-01-04 2014-07-10 日本電気株式会社 Control device, communication system, tunnel endpoint control method and program
NO341411B1 (en) * 2013-03-04 2017-10-30 Cisco Tech Inc Virtual endpoints in video conferencing
US10623240B2 (en) * 2016-08-25 2020-04-14 Intel Corporation IoT solution sizing
WO2018045281A1 (en) * 2016-09-02 2018-03-08 Intel Corporation Virtual private network

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102186164A (en) * 2011-02-18 2011-09-14 华为技术有限公司 Method and management device for operating device resource
US20180063879A1 (en) * 2016-08-29 2018-03-01 Electronics And Telecommunications Research Institute Apparatus and method for interoperation between internet-of-things devices
CN107046537A (en) * 2017-04-01 2017-08-15 上海润欣科技股份有限公司 A kind of discovery method that OCF clients based on DNS SD are serviced AllJoyn

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
OCF BRIDGING SPECIFICATION, 31 December 2016 (2016-12-31) *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115428417A (en) * 2020-06-16 2022-12-02 Oppo广东移动通信有限公司 Information processing method and device, equipment and computer storage medium
CN115968543A (en) * 2020-10-26 2023-04-14 Oppo广东移动通信有限公司 Resource mapping method, device, equipment and storage medium
WO2022247525A1 (en) * 2021-05-28 2022-12-01 杭州萤石软件有限公司 Method for handling internet of things device, and method for setting device resource in internet of things device

Also Published As

Publication number Publication date
CN110858838A (en) 2020-03-03
CN110858838B (en) 2021-03-09

Similar Documents

Publication Publication Date Title
WO2020038443A1 (en) Bridging communication method and device
US8767737B2 (en) Data center network system and packet forwarding method thereof
CN112398817B (en) Data sending method and device
US11146666B2 (en) IPv4/IPv6 bridge
US7836164B2 (en) Extensible network discovery subsystem
WO2017148308A1 (en) Method, apparatus and system for accessing network by internet-of-things device
US20130346591A1 (en) Clientless Cloud Computing
US9548923B2 (en) System and method for utilizing a unique identifier while registering a device in a network
KR20140012673A (en) Method and system of providing internet protocol(ip) data communication in a nfc peer to peer communication environment
US8472420B2 (en) Gateway device
US11799827B2 (en) Intelligently routing a response packet along a same connection as a request packet
US10499311B2 (en) Method and apparatus for implementing network sharing
WO2016086659A1 (en) Service message transmission method, device and system
US11750716B2 (en) Methods for publishing resource, and gateway
JP2017208797A (en) Unified data networking across heterogeneous networks
JP2017201776A (en) Content delivery through uneven network
JP2011229093A (en) Network apparatus
CN111107119A (en) Data access method, device and system based on cloud storage system and storage medium
WO2024183449A1 (en) Building protocol data processing method, apparatus, and system
CN110430478B (en) Networking communication method, device, terminal equipment and storage medium
JP2015170041A (en) Communication device, communication system, communication method and program
WO2017054733A1 (en) Processing method and device for storage hosting and switching
US10091637B2 (en) Providing information to a service in a communication network
WO2024001549A1 (en) Address configuration method and electronic device
JP6539497B2 (en) Communication relay system, device accommodation terminal, server side computer, program, and communication relay method

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19851770

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

Country of ref document: EP

Kind code of ref document: A1