WO2021134252A1 - Inter-device communication method and apparatus, and storage medium - Google Patents

Inter-device communication method and apparatus, and storage medium Download PDF

Info

Publication number
WO2021134252A1
WO2021134252A1 PCT/CN2019/130023 CN2019130023W WO2021134252A1 WO 2021134252 A1 WO2021134252 A1 WO 2021134252A1 CN 2019130023 W CN2019130023 W CN 2019130023W WO 2021134252 A1 WO2021134252 A1 WO 2021134252A1
Authority
WO
WIPO (PCT)
Prior art keywords
virtual
ocf
resource
ocf device
connection state
Prior art date
Application number
PCT/CN2019/130023
Other languages
French (fr)
Chinese (zh)
Inventor
张军
茹昭
吕小强
Original Assignee
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Priority to CN201980102832.5A priority Critical patent/CN114788393A/en
Priority to PCT/CN2019/130023 priority patent/WO2021134252A1/en
Publication of WO2021134252A1 publication Critical patent/WO2021134252A1/en

Links

Images

Classifications

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

Definitions

  • This application relates to the field of Internet of Things, and in particular to a communication method, device, computer device, and storage medium between devices.
  • the Internet of Things is an extended and expanded network based on the Internet, a huge network formed by combining various information sensing devices with the Internet.
  • OCF Open Connectivity Foundation
  • OCF Open Connectivity Foundation
  • heterogeneous devices refer to IoT devices that do not support non-standard protocols.
  • OCF OCF standard protocols
  • heterogeneous devices refer to IoT devices that do not support OCF standard protocols.
  • OCF devices such as zigbee devices, z-wave devices, Bluetooth devices, etc. Connecting these heterogeneous devices to the OCF system can realize the communication between non-OCF devices and OCF devices, and expand the scope of interconnection and intercommunication of IoT devices.
  • This application provides an inter-device communication method, device, computer device, and storage medium that improve the communication efficiency of the interconnection and intercommunication of IoT devices.
  • an embodiment of the present invention provides an inter-device communication method, the method including:
  • the resource notification message carries connection status information, and the connection status information is used to indicate the connection status of the non-OCF device, and the non-OCF device is mapped to the corresponding virtual OCF device through the bridge platform.
  • an embodiment of the present invention provides an inter-device communication method, the method including:
  • the resource notification message carries connection status information
  • the connection status information is used to indicate the connection status of the non-OCF device
  • the non-OCF device is mapped to the corresponding virtual OCF device through the bridge platform.
  • an embodiment of the present invention provides an inter-device communication method, the method including:
  • connection information is used to instruct the bridge platform to send a resource notification message to the client
  • the resource notification message carries connection status information
  • connection status information is used to indicate the status of the non-OCF device
  • the non-OCF device is mapped to a corresponding virtual OCF device through the bridge platform.
  • an embodiment of the present invention provides an inter-device communication device, including a receiving module;
  • the receiving module is used to obtain the resource notification message sent by the bridge platform, the resource notification message carries connection status information, and the connection status information is used to indicate the connection status of heterogeneous devices.
  • an embodiment of the present invention provides an inter-device communication device, including a sending module
  • the sending module is used to send a resource notification message to the client.
  • the resource notification message carries connection status information.
  • the connection status information is used to indicate the connection status of the non-OCF device, and the non-OCF device is mapped to the corresponding virtual OCF device through the bridge platform.
  • an embodiment of the present invention provides an inter-device communication device, including a response module
  • the response module is configured to respond to the bridge platform with connection information, the connection information is used to instruct the bridge platform to send a resource notification message to the client, the resource notification message carries connection status information, and the connection status information is used for Indicate the connection status of the non-OCF device, and the non-OCF device is mapped to a corresponding virtual OCF device through the bridge platform.
  • an embodiment of the present invention provides a computer device, including a memory and a processor, the memory stores a computer program, and the processor implements the steps of the method of the first aspect, the second aspect, or the third aspect when the processor executes the computer program.
  • an embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method of the first or second or third aspects are implemented.
  • the client can obtain the resource notification message sent by the bridge platform.
  • the resource notification message carries connection status information, and determines the connection status of the non-OCF device according to the connection status information. In this way, the connection status of non-OCF devices can be clarified.
  • only non-OCF devices in an online state can be selected to interact, so as to avoid interaction failure and improve the communication efficiency of interconnection and intercommunication of IoT devices.
  • FIG. 1 is a schematic diagram of an application scenario of an inter-device communication method provided by an embodiment of this application;
  • FIG. 2 is a flowchart of a communication method between devices according to an embodiment of the application
  • FIG. 3 is a flowchart of a communication method between devices according to an embodiment of the application.
  • FIG. 4 is a flowchart of a method for communication between devices according to still another embodiment of this application.
  • FIG. 5 is a flowchart of a communication method between devices according to another embodiment of this application.
  • FIG. 6 is a flowchart of a method for communication between devices according to still another embodiment of this application.
  • FIG. 7 is a flowchart of an inter-device communication method according to another embodiment of this application.
  • FIG. 8 is a flowchart of a communication method between devices according to another embodiment of this application.
  • FIG. 9 is a block diagram of an apparatus for communication between devices according to an embodiment of the application.
  • FIG. 10 is a block diagram of an apparatus for communication between devices according to another embodiment of this application.
  • FIG. 11 is a block diagram of an inter-device communication device according to another embodiment of this application.
  • FIG. 12 is a block diagram of a computer device provided by an embodiment of this application.
  • FIG. 13 is a block diagram of a network device provided by an embodiment of this application.
  • FIG. 14 is a block diagram of a terminal device provided by an embodiment of this application.
  • FIG. 1 is a schematic diagram of an application scenario of an inter-device communication method provided by an embodiment of the application, and the scenario may be applied to an Internet of Things system.
  • this scenario includes a client terminal 1, a bridge platform 2, a non-OCF device 3 connected to the bridge platform 2, and a non-OCF device 4 connected to the bridge platform 2, where the bridge platform 2 uses non-OCF protocols and non-OCF devices.
  • the OCF device 3 and the non-OCF device 4 are connected, and the non-OCF device 3 and the non-OCF device 4 are mapped through the bridging function to map the virtual OCF device 31 and the virtual OCF device 41 respectively.
  • the bridge platform 2 implements the following functions: bridge equipment, which represents standard OCF equipment that provides bridging functions; virtual OCF server, namely virtual OCF equipment, which represents non-OCF equipment mapped by the bridged equipment; bridge function, which provides OCF equipment resource models and non-OCF equipment The translation function of the protocol device model.
  • the OCF control instruction sent by the client to the virtual OCF device where the OCF control instruction conforms to the OCF protocol format, is used to instruct the target non-OCF device to perform the operation corresponding to the OCF control instruction content, and will be converted into the protocol instruction of the non-OCF device through the bridge function Sent to non-OCF devices, where the protocol commands of the non-OCF devices are in the non-OCF protocol format, and the target non-OCF devices can directly parse them, and then perform operations corresponding to the content of the protocol commands according to the analysis results.
  • the status information reported from the non-OCF devices is passed
  • the bridging function will be converted into OCF protocol data and sent to the virtual OCF device.
  • the number of clients and non-OCF devices is not limited.
  • the client can be understood as a terminal device or software installed on the terminal.
  • the terminal can be, but is not limited to, various personal computers, laptops, smart phones, tablets, and portable wearable devices.
  • the bridge platform can be IoT gateways, routers, etc.
  • Non-OCF devices can be zigbee devices, z-wave devices, Bluetooth devices, etc.
  • OCF defines a device bridging communication mechanism, and realizes bridging communication with non-OCF devices through OCF bridging devices.
  • OCF bridging devices map non-OCF devices to virtual OCF devices and perform OCF devices. The conversion between the resource model and the non-OCF protocol device model, so that the client can communicate with non-OCF devices.
  • the client cannot obtain the change in the connection status of the non-OCF device. For example, the non-OCF device is offline. At this time, the interaction attempt between the client and the non-OCF device will fail and cannot be determined. The reason for the failure of the interaction reduces the communication efficiency of the Internet of Things
  • Fig. 2 is a flowchart of a method for communication between devices according to an embodiment of the application.
  • the execution subject of the method is a first client, and the first client may be the client 1 in Fig. 1.
  • the method involves The process in which the client obtains the resource notification message sent by the bridging platform to determine the connection status of the non-OCF device according to the resource notification message. As shown in Figure 2, the method includes the following steps:
  • the resource notification message carries connection status information.
  • the connection status information is used to indicate the connection status of a non-OCF device, and the non-OCF device is mapped to a corresponding virtual OCF device through the bridge platform.
  • the resource notification message may be a message that the bridge platform actively sends to the client when the resource changes, or it may be a response message returned by the bridge platform when the client requests the bridge platform.
  • the subscription receiver of the bridge platform will actively send the resource notification message corresponding to the target resource to the client.
  • the target resource can be a specified resource or all resources of the bridge platform.
  • the subscription receiver can be a bridge device or a virtual OCF device.
  • Virtual OCF device is a device obtained by translation or mapping of non-OCF device, which is equivalent to the agent of non-OCF device in OCF network.
  • Client and virtual OCF device use OCF protocol to communicate, virtual OCF device and non-OCF device use non-OCF protocol to communicate .
  • connection status of the non-OCF device can be directly determined through the connection status information.
  • the connection status includes the online status and the offline status.
  • the online status means that the bridge platform and the non-OCF equipment are connected, and the offline status refers to the bridge platform and the non-OCF device.
  • the OCF device is in a disconnected state.
  • the connection status information can have different manifestations according to different information carried in the resource notification message.
  • connection status information may only include virtual OCF device information corresponding to online non-OCF devices, so that it can directly determine which non-OCF devices are online.
  • connection status information may also include virtual OCF device information and virtual OCF device connection status information corresponding to the non-OCF device, so that the connection status of the corresponding virtual OCF device is determined online or offline according to the virtual OCF device connection status information, thereby Determine the connection status of the non-OCF device corresponding to the virtual OCF device.
  • connection status information may also include the function resources of the virtual OCF device and the resource connection status identification information, so as to determine whether the function resource is online according to the resource connection status identification information corresponding to the function resource, and the function resource corresponding to the function resource is determined according to the online status of the function resource The online status of the non-OCF device.
  • connection status information may also only include the functional resources of the virtual OCF device corresponding to the online non-OCF device, so that the online non-OCF device can be directly determined.
  • Resource notification messages can carry different forms of connection status information, and different forms of connection status information can determine the connection status of non-OCF devices.
  • connection status information can be provided for the resources in the bridge device or the resources in the virtual OCF device, where the resources include the virtual OCF device connection status identification information, so that the virtual OCF device's connection status identification information can be determined according to the virtual OCF device connection status identification information.
  • the connection status so as to determine the connection status of the corresponding non-OCF device according to the connection status of the virtual OCF device.
  • the virtual OCF device connection state identification information is used to identify the connection state of the virtual OCF device, including online and offline states, which can be represented by 0 or 1.
  • the client can determine the connection status of the non-OCF device by obtaining the resource notification message sent by the bridging platform, so that the connection status of the non-OCF device can be clarified.
  • OCF devices you can only select non-OCF devices that are online to interact, avoid interaction failures, and improve the communication efficiency of interconnection and intercommunication of IoT devices.
  • the resource notification message is sent by the bridge device in the bridge platform, and the connection status information is determined by the bridge device according to the virtual device list resource, and the virtual device list resource includes the virtual OCF device connection status identification information.
  • the virtual device list resource is an OCF resource, used to represent the virtual OCF device information added to the OCF network, which is equivalent to having a list of virtual OCF devices.
  • the actual storage method of the list is not limited, and it can be in table form or text. Form and so on.
  • the virtual device list resource manages the connection status of the virtual OCF device.
  • the virtual device list resource of the bridge device includes the connection status identification information of the virtual OCF device, which is implemented based on the existing OCF resources without the need to create new OCF resources.
  • the virtual OCF device connection state identification information is added to the position corresponding to the matching virtual OCF device information in the virtual device list resource, so that the connection state of the corresponding virtual OCF device is represented by the virtual OCF device connection state identification information.
  • the connection status of the non-OCF device is recorded through the device connection status identification information in the virtual device list resource.
  • the corresponding virtual OCF device connection is added to the virtual device list resource.
  • Status identification information At this time, the virtual device list resource is updated.
  • the bridge platform detects a change in the connection status of the non-OCF device that has been connected to the bridge platform, the virtual device list resource will also update the corresponding virtual OCF device connection status identification information synchronously, and the virtual device list resource is also updated at this time. Therefore, the connection status information determined by the connection status identification information of the virtual OCF device can be carried in the resource notification message, and the client can determine the connection status of the non-OCF device according to the resource notification message.
  • the virtual OCF device connection status identification information corresponding to the first non-OCF device in the virtual device list resource of the bridge device in the bridge platform is updated, and the first non-OCF device The OCF device is at least one of the non-OCF devices.
  • the bridge platform has a non-OCF device connection status detection function. For example, the bridge platform detects whether the non-OCF device is online through the device heartbeat mechanism, thereby detecting that the connection status of the non-OCF device has changed.
  • the connection status of the first non-OCF device changes, for example, the first non-OCF device changes from online to a disconnected network connection to the bridge platform, or the first non-OCF device changes from offline to reconnect to the bridge platform, virtual device
  • the connection state identification information of the virtual OCF device corresponding to the first non-OCF device in the list resource is updated.
  • the method further includes: sending a subscription request to the bridge device, where the subscription request is used to indicate to subscribe to the virtual device list resource.
  • the bridge device can actively send a resource notification message to the client when the resource is updated.
  • the target virtual OCF device identification information may be carried in the subscription request, and the resource notification message will be received only when the connection state of the target virtual OCF device corresponding to the target virtual OCF device identification information changes. If the subscription request does not carry the virtual OCF device identifier, the connection status of all virtual OCF devices on the bridge platform will be subscribed.
  • the bridge device by subscribing to the virtual device list resource, when the resource is updated, the bridge device actively sends a resource notification message to the client, and the client can learn the online status of the non-OCF device in real time, which is convenient and efficient.
  • the resource notification message is a message sent by the bridge device when virtual OCF device information is added to the virtual device list resource of the bridge device in the bridge platform.
  • the virtual OCF device information includes virtual OCF device connection status identification information.
  • the bridge device maps the newly accessed non-OCF device as a virtual OCF device, and adds corresponding virtual OCF device information to the virtual device list resource.
  • the corresponding virtual OCF device information can be added to the virtual device list resource after the virtual OCF device is activated, or the corresponding virtual OCF device information can be added to the virtual device list resource when the virtual OCF device is not activated.
  • the virtual OCF device information includes virtual OCF device connection state identification information, which is used to describe the current connection state of the virtual OCF device.
  • the bridge device when new virtual OCF device information is added to the virtual device list resource, the bridge device will send a resource notification message to the client, so that the client can determine the connection status of the newly added non-OCF device in time.
  • the resource notification message is a message sent by the bridge device when the virtual OCF device connection status identification information in the virtual device list resource of the bridge device in the bridge platform is updated.
  • the bridge device updates the virtual device list resource, where the virtual OCF device connection status identification information, that is, the virtual OCF device The connection state attribute value changes, and when the virtual OCF device connection state identification information in the virtual device list resource is updated, the bridge device sends a resource notification message to the client.
  • the bridge device when there is currently a non-OCF device whose connection status changes, the bridge device actively sends a resource notification message to the client, so that the client can timely determine the non-OCF device whose connection status changes.
  • connection status of the virtual OCF device is managed through the existing vodlist resource, and the vodlist resource of the bridge device includes the connection status identification information of the virtual OCF device, that is, the connection status attribute of the virtual OCF device, as shown in FIG. 3 ,
  • the specific process is as follows:
  • Step 1 The client sends a subscription request to the bridge device to subscribe to the vodlist resource of the bridge device.
  • Step 2 The bridge device maps the newly accessed first non-OCF device as a virtual OCF device, and exposes the virtual OCF device to the outside.
  • Step 3 The client activates the virtual OCF device through the device activation process, and the virtual OCF device joins the OCF network.
  • Step 4 The bridge device adds the activated virtual OCF device information to the vodlist resource, where the virtual OCF device information includes the connection status attribute of the virtual OCF device, and the value of the attribute indicates the connection status of the virtual OCF device.
  • the attributes of the vodlist resource include:
  • rt indicates the type of vodlist resource, the value is oic.r.vodlist
  • vods indicates the virtual OCF device information, further including the following: n: the name of the virtual OCF device; di: the device identification of the virtual OCF device; econame: the communication protocol used by the non-OCF device, such as zigbee, z-wave, BLE, etc.; status: Virtual OCF device connection status identification information, indicating the connection status of the virtual OCF device, that is, the connection status of the non-OCF device.
  • online means that the non-OCF device is currently online
  • offline means that the non-OCF device is currently offline.
  • Step 5 Since the client has subscribed to the vodlist resource, the bridge device sends a vodlist resource update notification to the client, and the notification message indicates the connection status of the virtual OCF device. For example, the vodlist resource update notification indicates that the virtual OCF device is currently online.
  • Step 6 The connection status of the first non-OCF device changes. For example, the first non-OCF device has been disconnected from the network connection of the bridge platform.
  • the bridge platform has a non-OCF device connection status detection function and detects that the connection status of the non-OCF device has occurred. change.
  • Step 7 The bridge device updates the vodlist resource, and the connection state attribute value of the virtual OCF device changes.
  • the vodlist resource is updated as follows:
  • connection state attribute value of the vodlist resource changes to offline, indicating that the first non-OCF device is currently offline.
  • Step 8 The bridge device sends a vodlist resource update notification to the client, and the notification message indicates the connection status of the virtual OCF device.
  • the vodlist resource update notification indicates that the virtual OCF device is currently offline.
  • steps are not necessarily performed sequentially in the above-mentioned order. Unless specifically stated in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least some of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the order of execution of these sub-steps or stages is not necessarily It is performed sequentially, but may be performed alternately or alternately with at least a part of other steps or sub-steps or stages of other steps.
  • the resource notification message is sent by the bridge device in the bridge platform
  • the connection state information is the virtual OCF device connection state resource determination of the bridge device
  • the virtual OCF device connection state resource of the bridge device includes the virtual OCF device connection state identification information And virtual OCF device identification information.
  • the virtual OCF device connection state resource is specifically used to indicate the connection state of the virtual OCF device, including virtual OCF device connection state identification information and virtual OCF device identification information.
  • the value of the virtual OCF device connection status identification information indicates that the virtual OCF device is connected (online) or disconnected (offline). Since the virtual OCF device is a proxy for the non-OCF device, the virtual OCF device online or offline can represent that the non-OCF device is connected Or disconnect.
  • the virtual OCF device connection state resource is in the bridge device, so that the bridge device centrally manages the connection state information of the virtual OCF device, which facilitates unified management and improves management efficiency.
  • the connection status of the non-OCF device is recorded through the device connection status identification information in the virtual OCF device connection status resource of the bridge device.
  • the virtual OCF device in the bridge device is connected
  • the virtual OCF device information is added to the state resource, and the virtual OCF device information includes the virtual OCF device connection state identification information.
  • the virtual OCF device connection state resource is updated.
  • the bridge platform detects a change in the connection status of a non-OCF device that has been connected to the bridge platform
  • the virtual OCF device connection status resource will also update the corresponding virtual OCF device connection status identification information.
  • the virtual OCF device connection status resource is also updated. Update. Therefore, the connection status information determined by the connection status identification information of the virtual OCF device can be carried in the resource notification message, and the client can determine the connection status of the non-OCF device according to the resource notification message.
  • connection status identification information of the virtual OCF device corresponding to the first non-OCF device in the virtual OCF device connection status resource of the bridge device in the bridge platform is updated.
  • a non-OCF device is at least one of the non-OCF devices.
  • the bridge platform has a non-OCF device connection status detection function. For example, the bridge platform detects whether the non-OCF device is online through the device heartbeat mechanism, thereby detecting that the connection status of the non-OCF device has changed.
  • the connection status of the first non-OCF device changes, for example, the first non-OCF device changes from online to a disconnected network connection to the bridge platform, or the first non-OCF device changes from offline to reconnect to the bridge platform, and the bridge device
  • the connection state identification information of the virtual OCF device corresponding to the first non-OCF device in the virtual OCF device connection state resource is updated.
  • the virtual OCF device connection state resource is one of the resources of the bridge device, and the virtual OCF device connection state resource is updated by the bridge device.
  • the method further includes: sending a subscription request to the bridge device, where the subscription request is used to instruct the virtual OCF device connection state resource of the subscribed bridge device.
  • the bridge device can actively send a resource notification message to the client when the resource is updated.
  • the virtual OCF device connection state resource is one of the resources of the bridge device, and the virtual OCF device connection state resource of the bridge device provides connection state information of the virtual OCF device.
  • the target virtual OCF device identification information may be carried in the subscription request, and the resource notification message will be received only when the connection state of the target virtual OCF device corresponding to the target virtual OCF device identification information changes. If the subscription request does not carry the virtual OCF device identifier, it will subscribe to the connection status of all virtual OCF devices on the bridge platform. If the connection status of any virtual OCF device changes, the client will receive a resource notification message.
  • the bridge device by subscribing the virtual OCF device connection status resource to the bridge device, when the resource is updated, the bridge device actively sends a resource notification message to the client, and the client can learn the online status of the non-OCF device in real time, which is convenient and efficient.
  • the resource notification message is a message sent by the bridge device when virtual OCF device information is added to the virtual OCF device connection state resource of the bridge device in the bridge platform.
  • the virtual OCF device information includes virtual OCF device connection state identification information.
  • the bridge device maps the newly accessed non-OCF device as a virtual OCF device, and adds corresponding virtual OCF device information to the virtual OCF device connection state resource.
  • the corresponding virtual OCF device information can be added to the virtual OCF device connection state resource after the virtual OCF device is activated, or the corresponding virtual OCF device information can be added to the virtual OCF device connection state resource when the virtual OCF device is not activated.
  • the virtual OCF device information includes virtual OCF device connection state identification information, which is used to describe the current connection state of the virtual OCF device.
  • the bridge device when new virtual OCF device information is added to the virtual OCF device connection state resource of the bridge device, the bridge device will send a resource notification message to the client, so that the client can determine the status of the newly added non-OCF device in time. Connection Status.
  • the resource notification message is a message sent by the bridge device when the virtual OCF device connection state identification information in the virtual OCF device connection state resource of the bridge device in the bridge platform is updated.
  • the bridge device updates the virtual OCF device connection state resource, where the virtual OCF device connection state identification information, namely the virtual OCF The connection state attribute value of the device changes.
  • the bridge device sends a resource notification message to the client.
  • the bridge device when there is currently a non-OCF device whose connection status has changed, the bridge device actively sends a resource notification message to the client, so that the client can timely determine the non-OCF device whose connection status has changed.
  • the virtual OCF device connection state resource of the newly added bridge device is used to manage the connection state of the virtual OCF device.
  • the virtual OCF device connection state resource includes the connection state identification information of the virtual OCF device, that is, the connection state of the virtual OCF device. Properties, as shown in Figure 4, the specific process is as follows:
  • Step 1 The client sends a subscription request to the bridge device to subscribe to the virtual OCF device connection state resource of the bridge device.
  • Step 2 The bridge device maps the newly accessed first non-OCF device as a virtual OCF device, and exposes the virtual OCF device to the outside.
  • Step 3 The client activates the virtual OCF device through the device activation process, and the virtual OCF device joins the OCF network.
  • Step 4 The bridge device adds the activated virtual OCF device information to the vodlist resource.
  • Step 5 The bridge device adds the activated virtual OCF device information to the virtual OCF device connection state resource, where the virtual OCF device information includes the connection state attribute of the virtual OCF device, and the value of the attribute indicates the connection state of the virtual OCF device.
  • the activated virtual OCF device information is added to the virtual OCF device connection state resource, and the virtual OCF device connection state resource is as follows:
  • the attributes of the virtual OCF device connection state resource include:
  • ⁇ Rt The type of virtual OCF device connection status resource, the value is oic.r.vodConnectionStatus;
  • ⁇ Di the device identification of the virtual OCF device
  • ⁇ Status virtual OCF device connection status identification information, indicating the connection status of the virtual OCF device, that is, the connection status of the non-OCF device, for example, online indicates that the non-OCF device is currently online.
  • the di attribute is the device identification and status attribute of the virtual OCF device, that is, the virtual OCF device connection status identification information is a required attribute of the virtual OCF device connection status resource, and the others are optional attributes.
  • Step 6 Since the client has subscribed to the virtual OCF device connection status resource, the bridge device sends the virtual OCF device connection status resource update notification to the client, and the notification message indicates the connection status of the virtual OCF device.
  • the resource update notification indicates that the virtual OCF device is currently online.
  • Step 7 The connection status of the first non-OCF device changes. For example, the first non-OCF device has been disconnected from the network connection of the bridge platform.
  • the bridge platform has a non-OCF device connection status detection function and detects that the connection status of the non-OCF device has occurred. change.
  • Step 8 The bridge device updates the virtual OCF device connection state resource, where the connection state attribute value of the virtual OCF device changes.
  • the virtual OCF device connection state resource update is as follows:
  • connection state attribute value of the virtual OCF device connection state resource becomes offline, indicating that the first non-OCF device is currently offline.
  • Step 9 The bridge device sends the virtual OCF device connection status resource update notification to the client, and the notification message indicates the connection status of the virtual OCF device.
  • the virtual OCF device connection status resource update notification indicates that the virtual OCF device is currently offline.
  • the resource notification message is sent by the virtual OCF device in the bridge platform
  • the connection status information is the virtual OCF device connection status resource determination of the virtual OCF device
  • the virtual OCF device connection status resource of the virtual OCF device includes the virtual OCF device connection Status identification information and virtual OCF device identification information.
  • the virtual OCF device connection state resource is specifically used to indicate the connection state of the virtual OCF device, including virtual OCF device connection state identification information and virtual OCF device identification information.
  • the value of the virtual OCF device connection status identification information indicates that the virtual OCF device is connected (online) or disconnected (offline). Since the virtual OCF device is a proxy for the non-OCF device, the virtual OCF device online or offline can represent that the non-OCF device is connected Or disconnect.
  • Virtual OCF device connection state resource In the virtual OCF device, the virtual OCF device connection state resource is one of the resources of the virtual OCF device itself.
  • the virtual OCF device updates the virtual OCF device connection state resource, so that each virtual OCF device manages its own connection state Information makes the management time division clearer, simpler and more convenient. Even if a large number of non-OCF devices join the OCF network through bridges, they can be managed in an orderly manner.
  • the connection status of the non-OCF device is recorded through the device connection status identification information in the virtual OCF device connection status resource of the virtual OCF device.
  • the corresponding Virtual OCF device When a new non-OCF device is connected to the bridge platform, the corresponding Virtual OCF device, the added virtual OCF device includes the virtual OCF device connection state resource, the virtual OCF device connection state resource includes virtual OCF device information, and the virtual OCF device information includes virtual OCF device connection status identification information.
  • the virtual OCF device connection state Resource update When the bridge platform detects a change in the connection status of a non-OCF device that has been connected to the bridge platform, the virtual OCF device connection status resource will also update the corresponding virtual OCF device connection status identification information.
  • the virtual OCF device connection status resource is also updated. Update. Therefore, the connection status information determined by the connection status identification information of the virtual OCF device can be carried in the resource notification message, and the client can determine the connection status of the non-OCF device according to the resource notification message.
  • the virtual OCF device connection state identification information in the virtual OCF device connection state resource of the virtual OCF device corresponding to the first non-OCF device is updated, and the first non-OCF device The device is at least one of the non-OCF devices.
  • the bridge platform has a non-OCF device connection status detection function. For example, the bridge platform detects whether the non-OCF device is online through the device heartbeat mechanism, thereby detecting that the connection status of the non-OCF device has changed.
  • the connection status of the first non-OCF device changes, for example, the first non-OCF device changes from online to a disconnected network connection to the bridge platform, or the first non-OCF device changes from offline to reconnect to the bridge platform
  • the first The virtual OCF device connection state identification information in the virtual OCF device connection state resource of the virtual OCF device corresponding to the non-OCF device is updated.
  • the virtual OCF device connection state resource is one of the resources of the virtual OCF device, and the virtual OCF device connection state resource is updated by the virtual OCF device.
  • the method further includes: sending a subscription request to a virtual OCF device or a bridge device, where the subscription request is used to indicate to subscribe to the virtual OCF device connection state resource of the virtual OCF device.
  • the virtual OCF device can actively send a resource notification message to the client.
  • the virtual OCF device connection state resource is one of the resources of the virtual OCF device, and the virtual OCF device connection state resource of the virtual OCF device provides connection state information of the virtual OCF device.
  • a subscription request can be sent to one or more virtual OCF devices to subscribe to the virtual OCF device state resources of the virtual OCF device, and the subscription request can be sent only to the target virtual OCF device, and only the target virtual OCF device identification information corresponding to the target virtual
  • the resource notification message will be received only when the connection status of the OCF device changes. You can also send a subscription request to all virtual OCF devices on the bridge platform to subscribe to the connection status of all virtual OCF devices on the bridge platform. If the connection status of any virtual OCF device changes, the client will receive a resource notification message.
  • a subscription request can be sent to the bridge device.
  • the subscription request indicates to subscribe to the virtual OCF device connection status resource of the virtual OCF device.
  • the new virtual OCF device will notify the client of it For connection status information, the client will receive a resource notification message.
  • the virtual OCF device by subscribing to the virtual OCF device or bridge device for the virtual OCF device connection status resource, when the resource is updated, the virtual OCF device actively sends a resource notification message to the client, and the client can learn the online status of the non-OCF device in real time. Status, convenient and efficient.
  • the resource notification message is a message sent by the added virtual OCF device when a virtual OCF device is added to the bridge platform.
  • the added virtual OCF device includes a virtual OCF device connection state resource, and the virtual OCF device connection state resource includes a virtual OCF.
  • Device information, virtual OCF device information includes virtual OCF device connection status identification information.
  • the bridge device maps the newly accessed non-OCF device as a virtual OCF device, and adds the corresponding virtual OCF device connection state resource in the virtual OCF device.
  • OCF device information can be added to the virtual OCF device connection state resource after the virtual OCF device is activated, or the corresponding virtual OCF device information can be added to the virtual OCF device connection state resource when the virtual OCF device is not activated.
  • the virtual OCF device information includes virtual OCF device connection state identification information, which is used to describe the current connection state of the virtual OCF device.
  • the newly added virtual OCF device when a virtual OCF device is added to the bridge platform, the newly added virtual OCF device will send a resource notification message to the client, so that the client can determine the connection status of the newly added non-OCF device in time.
  • the resource notification message is a message sent by the virtual OCF device when the virtual OCF device connection state identification information of the virtual OCF device connection state resource in the virtual OCF device is updated.
  • the virtual OCF device updates the virtual OCF device connection state resource, where the virtual OCF device connection state identification information, that is, virtual The connection state attribute value of the OCF device changes, and when the virtual OCF device connection state identification information in the virtual OCF device connection state resource is updated, the virtual OCF device sends a resource notification message to the client.
  • the virtual OCF device connection state identification information that is, virtual The connection state attribute value of the OCF device changes
  • the virtual OCF device when there is currently a non-OCF device whose connection status has changed, the virtual OCF device actively sends a resource notification message to the client, so that the client can promptly determine the non-OCF device whose connection status has changed.
  • connection state of the virtual OCF device is managed by the virtual OCF device connection state resource of the newly added virtual OCF device.
  • the virtual OCF device connection state resource includes the virtual OCF device connection state identification information, that is, the connection of the virtual OCF device.
  • State attributes as shown in Figure 5, the specific process is as follows:
  • Step 1 The bridge device maps the newly connected first non-OCF device as a virtual OCF device, and exposes the virtual OCF device to the outside.
  • the virtual OCF device includes the virtual OCF device connection state resource, and the virtual OCF device connection state resource includes the virtual OCF device.
  • Information, the virtual OCF device information includes the connection state attribute of the virtual OCF device, and the value of the attribute indicates the connection state of the virtual OCF device.
  • the virtual OCF device connection state resource is as follows:
  • the attributes of the virtual OCF device connection state resource include:
  • ⁇ Rt The type of virtual OCF device connection status resource, the value is oic.r.vodConnectionStatus;
  • ⁇ Di the device identification of the virtual OCF device
  • ⁇ Status virtual OCF device connection status identification information, indicating the connection status of the virtual OCF device, that is, the connection status of the non-OCF device, for example, online indicates that the non-OCF device is currently online.
  • the di attribute is the device identification and status attribute of the virtual OCF device, that is, the virtual OCF device connection status identification information is a required attribute of the virtual OCF device connection status resource, and the others are optional attributes.
  • Step 2 The client activates the virtual OCF device through the device activation process, and the virtual OCF device joins the OCF network.
  • Step 3 The bridge device adds the activated virtual OCF device information to the vodlist resource.
  • Step 4 The client sends a subscription request to the virtual OCF device to subscribe to the virtual OCF device connection state resource of the virtual OCF device.
  • Step 5 Since the client has subscribed to the virtual OCF device connection state resource, the virtual OCF device sends a virtual OCF device connection state resource update notification to the client, and the notification message indicates the connection state of the virtual OCF device.
  • the resource update notification indicates that the virtual OCF device is currently online.
  • Step 6 The connection status of the first non-OCF device changes. For example, the first non-OCF device has been disconnected from the network connection of the bridge platform.
  • the bridge platform has a non-OCF device connection status detection function and detects that the connection status of the non-OCF device has occurred. change.
  • Step 7 The virtual OCF device updates the connection state resource of the virtual OCF device, where the connection state attribute value of the virtual OCF device changes.
  • the virtual OCF device connection state resource update is as follows:
  • connection state attribute value of the virtual OCF device connection state resource becomes offline, indicating that the first non-OCF device is currently offline.
  • Step 8 The virtual OCF device sends a virtual OCF device connection status resource update notification to the client, and the notification message indicates the connection status of the virtual OCF device.
  • the virtual OCF device connection status resource update notification indicates that the virtual OCF device is currently offline.
  • the virtual OCF device connection state resource in the virtual OCF device or the bridge device further includes at least one of the following information: type information of the virtual OCF device connection state resource; and interface information of the virtual OCF device connection state resource.
  • type information of the virtual OCF device connection status resource is generally a preset value, for example, the value is oic.r.vodConnectionStatus, which represents the resource type.
  • the interface of the virtual OCF device connection status resource is a parameter used when operating the resource. For example, if the client wants to read the virtual OCF device connection status resource, the read request will bring the rw interface or the baselien interface, and these two interfaces will get the return. The content is different.
  • the method further includes: sending a device discovery request, where the device discovery request is used to instruct to discover a virtual OCF device or to discover a virtual OCF device in an online connection state.
  • a restriction condition can be added to the device discovery request to discover only virtual OCF devices, because there may also be real OCF devices, such as bridge devices, in the network, and restriction conditions can be added to realize that only virtual OCF devices can be discovered.
  • the returned response message may carry information including the virtual OCF device corresponding to the non-OCF device and the connection status information of the virtual OCF device.
  • the response message returned by the control includes only the virtual OCF device information in the online state, for example, only the virtual OCF device information corresponding to the online non-OCF device is included.
  • the device discovery request is at least one of the following requests: a multicast device discovery request sent to the OCF network; a unicast device discovery request sent to a bridge device; a unicast device discovery request sent to a virtual OCF device.
  • the multicast device discovery request is that the client joins the multicast group. All devices in the multicast group will receive the multicast request, and the bridge device, virtual OCF device, and other OCF devices will all receive the device discovery request. Therefore, the device that receives the multicast device discovery request returns a corresponding response message according to the online status of the virtual OCF device.
  • the unicast device discovery request is a point-to-point communication.
  • the client sends a device discovery request to a certain target device. For example, it sends a device discovery request to a bridge device. Only the bridge device will receive it. Send a device discovery request to a virtual OCF device. Only virtual OCF. The device will receive it. Therefore, the device that receives the unicast device discovery request returns a corresponding response message according to the online status of the virtual OCF device.
  • the resource notification message is a response message generated according to a device discovery request.
  • the response message is used to indicate the virtual OCF device information corresponding to the online non-OCF device
  • the device discovery request is used to indicate the discovery of a virtual OCF device in an online connection state. OCF equipment.
  • the resource notification message is a response message generated according to a device discovery request, and the response message includes virtual OCF device information and virtual OCF device connection status information corresponding to a non-OCF device, and the device discovery request is used to indicate discovery Virtual OCF device.
  • the response message has two possibilities: 1. It includes the device identifier of the virtual OCF device and the connection status information of the corresponding virtual OCF device; 2. It includes the device identifier of the virtual OCF device, and only the device identifier of the online virtual OCF device.
  • the connection status of the virtual OCF device can be determined according to the connection status information of the virtual OCF device, thereby determining the connection status of the non-OCF device.
  • the response message generated by the device discovery request is sent to the client as a resource notification message, so that the client can determine the connection status of the non-OCF device.
  • the response message only includes the device identification of the online virtual OCF device, you can directly determine the online non-OCF device, and send the response message generated by the device discovery request as a resource notification message to the client, so that the client can determine the online non-OCF device .
  • the client sends a device discovery request, and the received response message includes only the virtual OCF device information corresponding to the online non-OCF device, or the response message includes the virtual OCF device information corresponding to the non-OCF device and the virtual OCF device connection Status information, as shown in Figure 6, the specific process is as follows:
  • Step 1 The bridge device maps the newly accessed first non-OCF device as a virtual OCF device, and exposes the virtual OCF device to the outside.
  • Step 2 The client activates the virtual OCF device through the device activation process, and the virtual OCF device joins the OCF network.
  • Step 3 The bridge device adds the activated virtual OCF device information to the vodlist resource.
  • Step 4 The client sends a device discovery request
  • Step 5 The response message received by the client only includes virtual OCF device information corresponding to the online non-OCF device, or the response message includes virtual OCF device information and virtual OCF device connection status information corresponding to the non-OCF device.
  • connection state information is determined by the functional resource of the virtual OCF device corresponding to the non-OCF device, and the functional resource includes resource connection state identification information.
  • the functional resources of the virtual OCF device correspond to the functional modules of the non-OCF device.
  • a non-OCF device TV includes switch, channel adjustment, and volume adjustment functions.
  • the TV is mapped to a virtual OCF device, and the virtual OCF device supports
  • the function resource of the TV should be the switch resource, the OCF resource type is oic.r.binarySwitch, channel adjustment resource, the OCF resource type is oic.r.channelChange, volume adjustment resource, and the OCF resource type is oic.r.audio.
  • Each functional resource has corresponding resource connection status identification information.
  • the resource connection status identification information is used to describe whether the current functional resource is online, and it can be online or offline.
  • the connection status information is determined according to the connection status of the functional resources of the virtual OCF device, and the connection status information is carried in the resource notification message and returned to the client.
  • the returned resource notification message may directly include each function resource and the corresponding resource connection status identification information, or it may only include the function resources corresponding to the online non-OCF device determined according to the resource connection status identification information.
  • the connection status information is determined by the functional resources of the virtual OCF device.
  • the non-OCF device and the virtual OCF device are in a many-to-one mapping relationship, that is, when multiple non-OCF devices are mapped to a virtual OCF device, if some non-OCF devices are The connection status of the OCF device changes. For example, some non-OCF devices are disconnected and the bridge platform is connected.
  • the virtual OCF device mapped by the bridge device may not expose the resources of the offline non-OCF device function, or provide the function resources of the corresponding non-OCF device Connection status information attributes. This method can also be used when a non-OCF device is mapped to a virtual OCF device.
  • the resource notification message filters offline functional resources based on the resource connection status identification information corresponding to each functional resource, including functional resource information corresponding to the online functional resources.
  • the offline functional resources are filtered, and only the functional resource information corresponding to the online functional resources is left as a resource notification message, so that only the online functional resources Exposed to the client, the offline function resources are automatically hidden.
  • connection status information is determined by the functional resources of the virtual OCF device corresponding to the online non-OCF device.
  • the online non-OCF device is determined first, and then the connection status information is determined through the functional resources of the virtual OCF device corresponding to the online non-OCF device, and only the functional resources corresponding to the online non-OCF device are exposed to the client, which is automatically hidden Functional resources in offline state.
  • Fig. 7 is a flowchart of a method for communication between devices provided by an embodiment of the application.
  • the execution subject of the method is a bridge platform.
  • the bridge platform may be the bridge platform 2 in Fig. 1.
  • the method involves the bridge platform to the client Terminal resource notification message, so that the client terminal determines the connection status of the non-OCF device according to the resource notification message.
  • the method includes the following steps:
  • the resource notification message carries connection status information.
  • the connection status information is used to indicate the connection status of a non-OCF device, and the non-OCF device is mapped to a corresponding virtual OCF device through the bridge platform.
  • the resource notification message is sent through the bridge device, the connection state information is determined by the bridge device according to the virtual device list resource, and the virtual device list resource includes the virtual OCF device connection state identification information.
  • the virtual OCF device connection status identification information corresponding to the first non-OCF device in the virtual device list resource of the bridge device in the bridge platform is updated, and the first The non-OCF device is at least one of the non-OCF devices.
  • the resource notification message is a message sent by the bridge device when virtual OCF device information is added to the virtual device list resource of the bridge device in the bridge platform.
  • the virtual OCF device information includes virtual OCF device connection status identification information.
  • the resource notification message is a message sent by the bridge device when the virtual OCF device connection state identification information in the virtual device list resource of the bridge device in the bridge platform is updated.
  • the method further includes: receiving a subscription request through the bridge device, where the subscription request is used to instruct to subscribe to the virtual device list resource.
  • the resource notification message is sent through the bridge device
  • the connection state information is the virtual OCF device connection state resource determination of the bridge device
  • the virtual OCF device connection state resource of the bridge device includes the virtual OCF device connection state identification information and the virtual OCF Device identification information.
  • the virtual OCF device connection state identification information corresponding to the first non-OCF device in the virtual OCF device connection state resource of the bridge device is updated, and the first non-OCF device The device is at least one of the non-OCF devices.
  • the resource notification message is a message sent by the bridge device when virtual OCF device information is added to the virtual OCF device connection state resource in the bridge device, and the virtual OCF device information includes virtual OCF device connection state identification information.
  • the resource notification message is a message sent by the bridge device when the connection state identification information of the virtual OCF device in the virtual OCF device connection state resource of the bridge device is updated.
  • the method further includes: receiving a subscription request through a bridge device, the subscription request being used to indicate a subscription to the virtual OCF device connection state resource of the bridge device.
  • the resource notification message is sent through a virtual OCF device
  • the connection state information is the determination of the virtual OCF device connection state resource of the virtual OCF device
  • the virtual OCF device connection state resource of the virtual OCF device includes a virtual OCF device.
  • OCF device connection status identification information and virtual OCF device identification information are examples of the virtual OCF device.
  • the virtual OCF device connection state resource further includes at least one of the following information: type information of the virtual OCF device connection state resource; and interface information of the virtual OCF device connection state resource.
  • the virtual OCF device connection state identification information in the virtual OCF device connection state resource of the virtual OCF device corresponding to the first non-OCF device is updated, and the first non-OCF device
  • the OCF device is at least one of the non-OCF devices.
  • the resource notification message is a message sent by the added virtual OCF device when a virtual OCF device is added, the added virtual OCF device includes virtual OCF device connection state resources, and the virtual OCF device connection state resource includes virtual OCF device information ,
  • the virtual OCF device information includes the connection state identification information of the virtual OCF device.
  • the resource notification message is a message sent by the virtual OCF device when the virtual OCF device connection state identification information of the virtual OCF device connection state resource in the virtual OCF device is updated.
  • the method further includes: receiving a subscription request through a virtual OCF device or a bridge device, and the subscription request is used to instruct the virtual OCF device connection state resource of the virtual OCF device to be subscribed.
  • the subscription request includes identification information of the target virtual OCF device.
  • the virtual OCF device information is information corresponding to the activated virtual OCF device.
  • the resource notification message is a response message generated according to the device discovery request
  • the response message is used to indicate the virtual OCF device information corresponding to the online non-OCF device
  • the device discovery request is used to indicate the discovery of the virtual OCF in the online connection state equipment.
  • the resource notification message is a response message generated according to the device discovery request.
  • the response message includes virtual OCF device information and virtual OCF device connection status information corresponding to the non-OCF device.
  • the device discovery request is used to indicate the discovery of the virtual OCF device. .
  • the method further includes: receiving a device discovery request, where the device discovery request is used to instruct to discover a virtual OCF device or to discover a virtual OCF device in an online connection state.
  • the device discovery request is at least one of the following requests: a multicast device discovery request received through an OCF network; a unicast device discovery request received through a bridge device; a unicast device received through a virtual OCF device Discovery request.
  • connection state information is determined by the functional resource of the virtual OCF device corresponding to the non-OCF device, and the functional resource includes resource connection state identification information.
  • the resource notification message filters offline functional resources based on the resource connection status identification information corresponding to each functional resource, including functional resource information corresponding to the online functional resources.
  • connection status information is determined by the functional resources of the virtual OCF device corresponding to the online non-OCF device.
  • FIG. 8 is a flowchart of a method for communication between devices provided by an embodiment of the application.
  • the method is executed by a non-OCF device, and the non-OCF device may be the non-OCF device 3 or 4 in FIG. 1, and the method involves It is a process in which the non-OCF device responds to the bridge platform with connection information, and the connection information is used to instruct the bridge platform to notify the client resource so that the client can determine the connection status of the non-OCF device according to the resource notification message.
  • the method includes the following steps:
  • connection information is used to instruct the bridge platform to send a resource notification message to the client.
  • the resource notification message carries connection status information.
  • the connection status information is used to indicate the connection status of the non-OCF device.
  • the OCF device is mapped to a corresponding virtual OCF device through the bridge platform.
  • connection information includes the connection information generated when a non-OCF device accesses the bridge platform for the first time, and also includes the connection status detection data received by the bridge platform after accessing the bridge platform, and the response information is returned to the bridge platform based on the connection status detection data.
  • the response is returned normally, if it is offline, the response cannot be made.
  • the bridge platform can detect the connection status of non-OCF devices.
  • the resource notification message is sent by the bridge device in the bridge platform, the connection status information is determined by the bridge device according to the virtual device list resource, and the virtual device list resource includes virtual OCF device connection status identification information.
  • the connection status with the bridge platform changes, the corresponding virtual OCF device connection status identification information in the virtual device list resource of the bridge device in the bridge platform is updated.
  • the resource notification message is a message sent by the bridge device when virtual OCF device information is added to the virtual device list resource of the bridge device in the bridge platform.
  • the virtual OCF device information includes virtual OCF device connection status identification information .
  • the resource notification message is a message sent by the bridge device when the virtual OCF device connection status identification information in the virtual device list resource of the bridge device in the bridge platform is updated.
  • the resource notification message is sent by the bridge device in the bridge platform
  • the connection state information is the virtual OCF device connection state resource determination of the bridge device
  • the virtual OCF device connection state resource of the bridge device includes the virtual OCF device connection state identifier Information and virtual OCF device identification information.
  • the connection status with the bridge platform changes, the corresponding virtual OCF device connection status identification information in the virtual OCF device connection status resource of the bridge device in the bridge platform is updated.
  • the resource notification message is a message sent by the bridge device when virtual OCF device information is added to the virtual OCF device connection state resource of the bridge device in the bridge platform.
  • the virtual OCF device information includes the virtual OCF device connection state identification information .
  • the resource notification message is a message sent by the bridge device when the virtual OCF device connection state identification information in the virtual OCF device connection state resource of the bridge device in the bridge platform is updated.
  • the resource notification message is sent by the virtual OCF device in the bridge platform
  • the connection state information is the virtual OCF device connection state resource determination of the virtual OCF device
  • the virtual OCF device connection state resource of the virtual OCF device includes virtual OCF device connection status identification information and virtual OCF device identification information.
  • the virtual OCF device connection state resource further includes at least one of the following information:
  • Type information of the virtual OCF device connection state resource
  • the virtual OCF device connection state identification information in the virtual OCF device connection state resource of the corresponding virtual OCF device is updated.
  • the resource notification message is a message sent by the added virtual OCF device when a virtual OCF device is added to the bridge platform.
  • the added virtual OCF device includes a virtual OCF device connection state resource, and the virtual OCF device connection state resource includes a virtual OCF device.
  • OCF device information, virtual OCF device information includes virtual OCF device connection status identification information.
  • the resource notification message is a message sent by the virtual OCF device when the virtual OCF device connection state identification information of the virtual OCF device connection state resource in the virtual OCF device is updated.
  • the virtual OCF device information is information corresponding to the activated virtual OCF device.
  • the resource notification message is a response message generated according to the device discovery request
  • the response message is used to indicate the virtual OCF device information corresponding to the online non-OCF device
  • the device discovery request is used to indicate the discovery of the virtual OCF in the online connection state equipment.
  • the resource notification message is a response message generated according to the device discovery request.
  • the response message includes virtual OCF device information and virtual OCF device connection status information corresponding to the non-OCF device.
  • the device discovery request is used to indicate the discovery of the virtual OCF device. .
  • connection state information is determined by the functional resource of the corresponding virtual OCF device, and the functional resource includes resource connection state identification information.
  • the resource notification message filters offline functional resources based on the resource connection status identification information corresponding to each functional resource, including functional resource information corresponding to the online functional resources.
  • connection status information is determined by the functional resources of the virtual OCF device corresponding to the online non-OCF device.
  • FIG. 9 is a block diagram of an apparatus for communication between devices according to an embodiment of the application. As shown in FIG. 8, the apparatus includes a receiving module 11.
  • the receiving module 11 is configured to obtain a resource notification message sent by the bridge platform, the resource notification message carries connection status information, and the connection status information is used to indicate the connection status of heterogeneous devices.
  • FIG. 10 is a block diagram of an inter-device communication device provided by an embodiment of the application. As shown in FIG. 9, the device includes a sending module 21.
  • the sending module 21 is configured to send a resource notification message to the client, the resource notification message carries connection status information, and the connection status information is used to indicate the connection status of a non-OCF device, which is mapped by the bridge platform It is the corresponding virtual OCF device.
  • FIG. 11 is a block diagram of an inter-device communication device provided by an embodiment of the application. As shown in FIG. 11, the device includes a response module 31.
  • the response module 31 is used to respond to the bridge platform with connection information.
  • the connection information is used to instruct the bridge platform to send a resource notification message to the client.
  • the resource notification message carries connection status information.
  • the connection status information is used to indicate the connection status of non-OCF devices.
  • the OCF device is mapped to the corresponding virtual OCF device through the bridge platform.
  • Each module in the above-mentioned inter-device communication device may be implemented in whole or in part by software, hardware, and a combination thereof.
  • the above-mentioned modules may be embedded in the form of hardware or independent of the processor in the computer equipment, or may be stored in the memory of the computer equipment in the form of software, so that the processor can call and execute the operations corresponding to the above-mentioned modules.
  • An embodiment of the present application further provides a computer device, including a memory and a processor, the memory stores a computer program, and the processor implements the steps of the method described in any of the foregoing embodiments when the computer program is executed by the processor.
  • the embodiments of the present application also provide a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method described in any of the foregoing embodiments are implemented.
  • Fig. 12 is a schematic diagram of the internal structure of a computer device in an embodiment.
  • the computer device can be a terminal device or a network device.
  • the computer device includes a processor, a memory, and a transceiver connected via a system bus.
  • the processor is used to provide computing and control capabilities to support the entire electronics. Operation of equipment.
  • the memory may include a non-volatile storage medium and internal memory.
  • the non-volatile storage medium stores an operating system and a computer program.
  • the computer program may be executed by the processor to cooperate with the transceiver to implement the methods provided by the above embodiments applicable to terminal devices or network devices.
  • the internal memory provides a cache operating environment for the operating system computer readable instructions in the non-volatile storage medium.
  • the computer equipment When the computer equipment is a terminal device, it can also include an input device and a display screen.
  • the display screen can be a liquid crystal display or an electronic ink display.
  • the input device can be a touch layer covered on the display screen, or it can be set on the computer equipment shell.
  • the buttons, trackballs or touchpads can also be external keyboards, touchpads or mice.
  • the computer equipment can be mobile phones, refrigerators, washing machines, TVs, tablets or personal digital assistants or wearable devices.
  • the computer device When the computer device is a network device, it may also include a database for storing data, which may be a server, a bridge device, etc.
  • FIG. 12 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied.
  • the specific computer device may Including more or fewer parts than shown in the figure, or combining some parts, or having a different arrangement of parts.
  • a network device including: a processor, a memory, and a transceiver.
  • the processor, the memory and the transceiver communicate with each other through an internal connection path; wherein the memory is used for storage Program code; the processor is used to call the program code stored in the memory to cooperate with the transceiver to implement the methods provided in the above embodiments that are applicable to network devices.
  • a terminal device including: a processor, a memory, and a transceiver, the processor, the memory and the transceiver communicate with each other through an internal connection path; wherein, the memory , Is used to store program code; the processor is used to call the program code stored in the memory to cooperate with the transceiver to implement the methods provided in the above embodiments applicable to the terminal device.
  • Non-volatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory may include random access memory (RAM) or external cache memory.
  • RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Channel (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

Abstract

The present application relates to an inter-device communication method and apparatus, a computer device, and a storage medium. A client obtains a resource notification message sent by a bridging platform, the resource notification message carrying connection state information, the connection state information being used for indicating a connection state of a non-OCF device, and the non-OCF device being mapped into a corresponding virtual OCF device by means of the bridging platform. The connection state of the non-OCF device is clarified, and the communication efficiency of interconnection of Internet of Things devices is improved.

Description

[根据细则91更正 31.12.2019] 设备间通信方法、装置、和存储介质[Corrected in accordance with Rule 91 31.12.2019]  Inter-device communication method, device, and storage medium 技术领域Technical field
本申请涉及物联网领域,特别是涉及一种设备间通信方法、装置、计算机设备和存储介质。This application relates to the field of Internet of Things, and in particular to a communication method, device, computer device, and storage medium between devices.
背景技术Background technique
物联网(IoT,Internet of Things)是互联网基础上的延伸和扩展的网络,将各种信息传感设备与互联网结合起来而形成的一个巨大网络。The Internet of Things (IoT) is an extended and expanded network based on the Internet, a huge network formed by combining various information sensing devices with the Internet.
OCF(Open Connectivity Foundation)是新兴的物联网应用层技术标准组织,OCF为物联网设备之间实现互联互通制定Restful服务框架,在OCF服务框架中,通过设备资源模型来描述物联网设备。OCF (Open Connectivity Foundation) is an emerging IoT application layer technology standard organization. OCF develops a Restful service framework for interconnection between IoT devices. In the OCF service framework, IoT devices are described through device resource models.
目前物联网应用中存在很多异构设备,异构设备是指不支持非标准协议的物联网设备,当OCF作为标准协议时,异构设备是指不支持OCF标准协议的物联网设备,即非OCF设备,例如zigbee设备、z-wave设备、蓝牙设备等。将这些异构设备接入到OCF系统中可以实现非OCF设备和OCF设备的通信,扩大物联网设备互联互通的范围。At present, there are many heterogeneous devices in IoT applications. Heterogeneous devices refer to IoT devices that do not support non-standard protocols. When OCF is used as a standard protocol, heterogeneous devices refer to IoT devices that do not support OCF standard protocols. OCF devices, such as zigbee devices, z-wave devices, Bluetooth devices, etc. Connecting these heterogeneous devices to the OCF system can realize the communication between non-OCF devices and OCF devices, and expand the scope of interconnection and intercommunication of IoT devices.
目前,非OCF设备通过设备桥接方式加入OCF网络后,如果非OCF设备处于离线状态,此时客户端和非OCF设备的交互尝试会失败,无法判定交互失败的原因,降低了物联网的通信效率。Currently, after a non-OCF device joins the OCF network through device bridging, if the non-OCF device is offline, the interaction attempt between the client and the non-OCF device will fail at this time, and the reason for the interaction failure cannot be determined, which reduces the communication efficiency of the Internet of Things .
发明内容Summary of the invention
本申请提供一种提高物联网设备互联互通的通信效率的设备间通信方法、装置、计算机设备和存储介质。This application provides an inter-device communication method, device, computer device, and storage medium that improve the communication efficiency of the interconnection and intercommunication of IoT devices.
第一方面,本发明的实施例提供一种设备间通信方法,该方法包括:In the first aspect, an embodiment of the present invention provides an inter-device communication method, the method including:
获取桥接平台发送的资源通知消息,资源通知消息携带连接状态信息,连接状态信息用于指示非OCF设备的连接状态,非OCF设备通过所述桥接平台映射为对应的虚拟OCF设备。Obtain the resource notification message sent by the bridge platform, the resource notification message carries connection status information, and the connection status information is used to indicate the connection status of the non-OCF device, and the non-OCF device is mapped to the corresponding virtual OCF device through the bridge platform.
第二方面,本发明的实施例提供一种设备间通信方法,该方法包括:In the second aspect, an embodiment of the present invention provides an inter-device communication method, the method including:
向客户端发送资源通知消息,资源通知消息携带连接状态信息,连接状态信息用于指示非OCF设备的连接状态,非OCF设备通过所述桥接平台映射为对应的虚拟OCF设备。Send a resource notification message to the client, the resource notification message carries connection status information, and the connection status information is used to indicate the connection status of the non-OCF device, and the non-OCF device is mapped to the corresponding virtual OCF device through the bridge platform.
第三方面,本发明的实施例提供一种设备间通信方法,该方法包括:In a third aspect, an embodiment of the present invention provides an inter-device communication method, the method including:
向桥接平台响应连接信息,所述连接信息用于指示所述桥接平台向客户端发送资源通知消息,所述资源通知消息携带连接状态信息,所述连接状态信息用于指示所述非OCF设备的连接状态,所述非OCF设备通过所述桥接平台映射为对应的虚拟OCF设备。Respond to the bridge platform with connection information, where the connection information is used to instruct the bridge platform to send a resource notification message to the client, the resource notification message carries connection status information, and the connection status information is used to indicate the status of the non-OCF device In the connection state, the non-OCF device is mapped to a corresponding virtual OCF device through the bridge platform.
第四方面,本发明的实施例提供一种设备间通信装置,包括接收模块;In a fourth aspect, an embodiment of the present invention provides an inter-device communication device, including a receiving module;
接收模块,用于获取桥接平台发送的资源通知消息,资源通知消息携带连接状态信息,连接状态信息用于指示异构设备的连接状态。The receiving module is used to obtain the resource notification message sent by the bridge platform, the resource notification message carries connection status information, and the connection status information is used to indicate the connection status of heterogeneous devices.
第五方面,本发明的实施例提供一种设备间通信装置,包括发送模块;In a fifth aspect, an embodiment of the present invention provides an inter-device communication device, including a sending module;
发送模块,用于向客户端发送资源通知消息,资源通知消息携带连接状态信息,连接状态信息用于指示非OCF设备的连接状态,非OCF设备通过所述桥接平台映射为对应的虚拟OCF设备。The sending module is used to send a resource notification message to the client. The resource notification message carries connection status information. The connection status information is used to indicate the connection status of the non-OCF device, and the non-OCF device is mapped to the corresponding virtual OCF device through the bridge platform.
第六方面,本发明的实施例提供一种设备间通信装置,包括响应模块;In a sixth aspect, an embodiment of the present invention provides an inter-device communication device, including a response module;
所述响应模块,用于向桥接平台响应连接信息,所述连接信息用于指示所述桥接平台向客户端发送资源通知消息,所述资源通知消息携带连接状态信息,所述连接状态信息用于指示所述非OCF设备的连接状态,所述非OCF设备通过所述桥接平台映射为对应的虚拟OCF设备。The response module is configured to respond to the bridge platform with connection information, the connection information is used to instruct the bridge platform to send a resource notification message to the client, the resource notification message carries connection status information, and the connection status information is used for Indicate the connection status of the non-OCF device, and the non-OCF device is mapped to a corresponding virtual OCF device through the bridge platform.
第七方面,本发明的实施例提供一种计算机设备,包括存储器和处理器,存储器存储有计算机程序,处理器执行计算机程序时实现第一方面或第二方面或第三方面方法的步骤。In a seventh aspect, an embodiment of the present invention provides a computer device, including a memory and a processor, the memory stores a computer program, and the processor implements the steps of the method of the first aspect, the second aspect, or the third aspect when the processor executes the computer program.
第八方面,本发明的实施例提供一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现第一方面或第二方面或第三方面方法的步骤。In an eighth aspect, an embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method of the first or second or third aspects are implemented.
本申请提供的设备间通信方法、装置、计算机设备和存储介质,客户端可通过获取桥接平台发送的资源通知消息,资源通知消息携带连接状态信息,根据连接状态信息确定非OCF设备的连接状态,从而可以明确非OCF设备的连接状态,在与非OCF设备交互时,可以只选择处于在线状态的非OCF设备交互,避免交互失败,提高了物联网设备互联互通的通信效率。With the inter-device communication method, device, computer device, and storage medium provided in this application, the client can obtain the resource notification message sent by the bridge platform. The resource notification message carries connection status information, and determines the connection status of the non-OCF device according to the connection status information. In this way, the connection status of non-OCF devices can be clarified. When interacting with non-OCF devices, only non-OCF devices in an online state can be selected to interact, so as to avoid interaction failure and improve the communication efficiency of interconnection and intercommunication of IoT devices.
附图说明Description of the drawings
图1为本申请实施例提供的一种设备间通信方法的应用场景示意图;FIG. 1 is a schematic diagram of an application scenario of an inter-device communication method provided by an embodiment of this application;
图2为本申请实施例提供的一种设备间通信方法的流程图;FIG. 2 is a flowchart of a communication method between devices according to an embodiment of the application;
图3为本申请一实施例提供的一种设备间通信方法的流程图;FIG. 3 is a flowchart of a communication method between devices according to an embodiment of the application;
图4为本申请再一实施例提供的一种设备间通信方法的流程图;FIG. 4 is a flowchart of a method for communication between devices according to still another embodiment of this application;
图5为本申请又一实施例提供的一种设备间通信方法的流程图;FIG. 5 is a flowchart of a communication method between devices according to another embodiment of this application;
图6为本申请再一实施例提供的一种设备间通信方法的流程图;FIG. 6 is a flowchart of a method for communication between devices according to still another embodiment of this application;
图7为本申请另一实施例提供的一种设备间通信方法的流程图;FIG. 7 is a flowchart of an inter-device communication method according to another embodiment of this application;
图8为本申请又一实施例提供的一种设备间通信方法的流程图;FIG. 8 is a flowchart of a communication method between devices according to another embodiment of this application;
图9为本申请实施例提供的一种设备间通信装置的框图;FIG. 9 is a block diagram of an apparatus for communication between devices according to an embodiment of the application;
图10为本申请另一实施例提供的一种设备间通信装置的框图;FIG. 10 is a block diagram of an apparatus for communication between devices according to another embodiment of this application;
图11为本申请又一实施例提供的一种设备间通信装置的框图;FIG. 11 is a block diagram of an inter-device communication device according to another embodiment of this application;
图12为本申请实施例提供的一种计算机设备的框图;FIG. 12 is a block diagram of a computer device provided by an embodiment of this application;
图13为本申请一实施例提供的一种网络设备的框图;FIG. 13 is a block diagram of a network device provided by an embodiment of this application;
图14为本申请一实施例提供的一种终端设备的框图。FIG. 14 is a block diagram of a terminal device provided by an embodiment of this application.
具体实施方式Detailed ways
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solutions, and advantages of this application clearer and clearer, the following further describes the application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.
物联网是通过射频识别、红外感应器、全球定位系统、激光扫描器等信息传感设备,按约定协议,把任何物品与互联网连接起来,进行信息交换和通讯,以实现智能化识别、定位、跟踪、监控和管理地一种网络。图1为本申请实施例提供的一种设备间通信方法的应用场景示意图,该场景可以应用于物联网系统中。如图1所示,该场景包括接客户端1、桥接平台2、与桥接平台2连接的非OCF设备3、与桥接平台2连接的非OCF设备4,其中桥接平台2通过非OCF协议和非OCF设备3、非OCF设备4连接,并通过桥接功能将非OCF设备3和非OCF设备4进行映射,分别映射为虚拟OCF设备31和虚拟OCF设备41。桥接平台2实现以下功能:桥接设备,代表提供桥接功能的标准OCF设备;虚拟OCF服务端,即虚拟OCF设备,代表被桥接设备映射的非OCF设备;桥接功能,提供OCF设备资源模型和非OCF协议设备模型的翻译功能。客户端发给虚拟OCF设备的OCF控制指令,其中OCF控制指令符合OCF协议格式,用于指示目标非OCF设备执行与OCF控制指令内容相应的操作,通过桥接功能会转换成非OCF设备的协议指令发给非OCF设备,其中非OCF设备的协议指令为非OCF协议格式,目标非OCF设备能直接解析,从而根据解析结果执行与协议指令内容相应的操作,从非OCF设备上报的状态信息,通过桥接功能会转换成OCF协议数据发给虚拟OCF设备。其中客户端、非OCF设备的数量不限。客户端可以理解为终端设备或终端上安装的软件,终端可以但不限于是各种个人计算机、笔记本电脑、智能手机、平板电脑和便携式可穿戴设备,桥接平台可以为物联网网关,路由器等,非OCF设备可以为zigbee设备、z-wave设备、蓝牙设备等。为了将异构设备接入到OCF系统中,OCF定义了设备桥接通信机制,通过OCF桥接设备实现和非OCF设备的桥接通信,OCF桥接设备将非OCF设备映射为虚拟OCF设备,并进行OCF设备资源模型和非OCF协议设备模型的转换,从而客户端可以和非OCF设备进行通信。The Internet of Things is the use of radio frequency identification, infrared sensors, global positioning systems, laser scanners and other information sensing equipment to connect any item to the Internet according to an agreed protocol for information exchange and communication to achieve intelligent identification, positioning, and A network for tracking, monitoring and management. FIG. 1 is a schematic diagram of an application scenario of an inter-device communication method provided by an embodiment of the application, and the scenario may be applied to an Internet of Things system. As shown in Figure 1, this scenario includes a client terminal 1, a bridge platform 2, a non-OCF device 3 connected to the bridge platform 2, and a non-OCF device 4 connected to the bridge platform 2, where the bridge platform 2 uses non-OCF protocols and non-OCF devices. The OCF device 3 and the non-OCF device 4 are connected, and the non-OCF device 3 and the non-OCF device 4 are mapped through the bridging function to map the virtual OCF device 31 and the virtual OCF device 41 respectively. The bridge platform 2 implements the following functions: bridge equipment, which represents standard OCF equipment that provides bridging functions; virtual OCF server, namely virtual OCF equipment, which represents non-OCF equipment mapped by the bridged equipment; bridge function, which provides OCF equipment resource models and non-OCF equipment The translation function of the protocol device model. The OCF control instruction sent by the client to the virtual OCF device, where the OCF control instruction conforms to the OCF protocol format, is used to instruct the target non-OCF device to perform the operation corresponding to the OCF control instruction content, and will be converted into the protocol instruction of the non-OCF device through the bridge function Sent to non-OCF devices, where the protocol commands of the non-OCF devices are in the non-OCF protocol format, and the target non-OCF devices can directly parse them, and then perform operations corresponding to the content of the protocol commands according to the analysis results. The status information reported from the non-OCF devices is passed The bridging function will be converted into OCF protocol data and sent to the virtual OCF device. The number of clients and non-OCF devices is not limited. The client can be understood as a terminal device or software installed on the terminal. The terminal can be, but is not limited to, various personal computers, laptops, smart phones, tablets, and portable wearable devices. The bridge platform can be IoT gateways, routers, etc. Non-OCF devices can be zigbee devices, z-wave devices, Bluetooth devices, etc. In order to connect heterogeneous devices to the OCF system, OCF defines a device bridging communication mechanism, and realizes bridging communication with non-OCF devices through OCF bridging devices. OCF bridging devices map non-OCF devices to virtual OCF devices and perform OCF devices. The conversion between the resource model and the non-OCF protocol device model, so that the client can communicate with non-OCF devices.
目前,非OCF设备通过设备桥接方式加入OCF网络后,客户端无法获得非OCF设备连接状态的变化,例如非OCF设备处于离线状态,此时客户端和非OCF设备的交互尝试会失败,无法判定交互失败的原因,降低了物联网的通信效率Currently, after a non-OCF device joins the OCF network through device bridging, the client cannot obtain the change in the connection status of the non-OCF device. For example, the non-OCF device is offline. At this time, the interaction attempt between the client and the non-OCF device will fail and cannot be determined. The reason for the failure of the interaction reduces the communication efficiency of the Internet of Things
下面将通过实施例并结合附图具体地对本申请的技术方案以及本申请的技术方案如何解决上述技术问题进行详细说明。下面这几个具体的实施例可以相互结合,对于相同或相似的概念或过程可能在某些实施例中不再赘述。需要说明的是,本申请实施例提供的一种设备间通信方法,以不同的执行主体对各实施例进行说明。Hereinafter, the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems will be described in detail through the embodiments and the accompanying drawings. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. It should be noted that, in an inter-device communication method provided in an embodiment of the present application, each embodiment is described with different execution subjects.
图2为本申请实施例提供的一种设备间通信方法的流程图,该方法的执行主体为第一客户端,该第一客户端可以为图1中的客户端1,该方法涉及的是客户端获取桥接平台发送的资源通知消息,以根据资源通知消息确定非OCF设备的连接状态的过程。如图2所示,该方法包括以下步骤:Fig. 2 is a flowchart of a method for communication between devices according to an embodiment of the application. The execution subject of the method is a first client, and the first client may be the client 1 in Fig. 1. The method involves The process in which the client obtains the resource notification message sent by the bridging platform to determine the connection status of the non-OCF device according to the resource notification message. As shown in Figure 2, the method includes the following steps:
S101、获取桥接平台发送的资源通知消息,资源通知消息携带连接状态信息,连接状态信息用于指示非OCF设备的连接状态,非OCF设备通过桥接平台映射为对应的虚拟OCF设备。S101. Obtain a resource notification message sent by the bridge platform. The resource notification message carries connection status information. The connection status information is used to indicate the connection status of a non-OCF device, and the non-OCF device is mapped to a corresponding virtual OCF device through the bridge platform.
其中,资源通知消息可以是桥接平台在资源发生变化时主动发送至客户端的消息,也可以是客户端请求桥接平台,由桥接平台返回的响应消息。当客户端订阅了桥接平台的目标资源时,当目标资源发生变化时,桥接平台的订阅接收方会主动向客户端发送目标资源对应的资源通知消息。目标资源可以为指定资源或桥接平台的所有资源。其中订阅接收方可以为桥接设备或虚拟OCF设备。虚拟OCF设备是对非OCF设备翻译或映射得到的设备,相当于非OCF设备在OCF网络中的代理,客户端和虚拟OCF设 备使用OCF协议通信,虚拟OCF设备和非OCF设备使用非OCF协议通信。Among them, the resource notification message may be a message that the bridge platform actively sends to the client when the resource changes, or it may be a response message returned by the bridge platform when the client requests the bridge platform. When the client subscribes to the target resource of the bridge platform, when the target resource changes, the subscription receiver of the bridge platform will actively send the resource notification message corresponding to the target resource to the client. The target resource can be a specified resource or all resources of the bridge platform. The subscription receiver can be a bridge device or a virtual OCF device. Virtual OCF device is a device obtained by translation or mapping of non-OCF device, which is equivalent to the agent of non-OCF device in OCF network. Client and virtual OCF device use OCF protocol to communicate, virtual OCF device and non-OCF device use non-OCF protocol to communicate .
具体地,通过连接状态信息可直接确定非OCF设备的连接状态,连接状态包括在线状态和离线状态,其中在线状态是指桥接平台和非OCF设备处于已连接状态,离线状态是指桥接平台和非OCF设备处于断开连接状态。通过连接状态信息可确定在线的非OCF设备。连接状态信息可根据资源通知消息携带的不同信息具有不同的表现形式。Specifically, the connection status of the non-OCF device can be directly determined through the connection status information. The connection status includes the online status and the offline status. The online status means that the bridge platform and the non-OCF equipment are connected, and the offline status refers to the bridge platform and the non-OCF device. The OCF device is in a disconnected state. Through the connection status information, online non-OCF devices can be determined. The connection status information can have different manifestations according to different information carried in the resource notification message.
可选的,连接状态信息可以只包括在线非OCF设备对应的虚拟OCF设备信息,从而可直接确定哪些非OCF设备在线。可选的,连接状态信息也可以包括非OCF设备对应的虚拟OCF设备信息和虚拟OCF设备连接状态信息,从而根据虚拟OCF设备连接状态信息为在线或离线确定对应的虚拟OCF设备的连接状态,从而确定与虚拟OCF设备对应的非OCF设备的连接状态。可选的,连接状态信息也可以包括虚拟OCF设备的功能资源和资源连接状态标识信息,从而根据功能资源对应的资源连接状态标识信息确定功能资源是否在线,根据功能资源的在线状态确定功能资源对应的非OCF设备的在线状态。可选的,连接状态信息也可以只包括在线非OCF设备对应的虚拟OCF设备的功能资源,从而可直接确定出在线的非OCF设备。资源通知消息可携带不同形式的连接状态信息,不同形式的连接状态信息都可确定非OCF设备的连接状态。Optionally, the connection status information may only include virtual OCF device information corresponding to online non-OCF devices, so that it can directly determine which non-OCF devices are online. Optionally, the connection status information may also include virtual OCF device information and virtual OCF device connection status information corresponding to the non-OCF device, so that the connection status of the corresponding virtual OCF device is determined online or offline according to the virtual OCF device connection status information, thereby Determine the connection status of the non-OCF device corresponding to the virtual OCF device. Optionally, the connection status information may also include the function resources of the virtual OCF device and the resource connection status identification information, so as to determine whether the function resource is online according to the resource connection status identification information corresponding to the function resource, and the function resource corresponding to the function resource is determined according to the online status of the function resource The online status of the non-OCF device. Optionally, the connection status information may also only include the functional resources of the virtual OCF device corresponding to the online non-OCF device, so that the online non-OCF device can be directly determined. Resource notification messages can carry different forms of connection status information, and different forms of connection status information can determine the connection status of non-OCF devices.
进一步的,连接状态信息可以为桥接设备中的资源或虚拟OCF设备中的资源提供,其中资源中包括了虚拟OCF设备连接状态标识信息,从而可根据虚拟OCF设备连接状态标识信息确定虚拟OCF设备的连接状态,从而根据虚拟OCF设备的连接状态确定对应的非OCF设备的连接状态。其中,虚拟OCF设备连接状态标识信息用于标识虚拟OCF设备的连接状态,包括在线和离线两种状态,可以用0或1表示。Further, the connection status information can be provided for the resources in the bridge device or the resources in the virtual OCF device, where the resources include the virtual OCF device connection status identification information, so that the virtual OCF device's connection status identification information can be determined according to the virtual OCF device connection status identification information. The connection status, so as to determine the connection status of the corresponding non-OCF device according to the connection status of the virtual OCF device. Among them, the virtual OCF device connection state identification information is used to identify the connection state of the virtual OCF device, including online and offline states, which can be represented by 0 or 1.
本实施例中,非OCF设备通过设备桥接方式加入OCF网络后,客户端可通过获取桥接平台发送的资源通知消息确定非OCF设备的连接状态,从而可以明确非OCF设备的连接状态,在与非OCF设备交互时,可以只选择处于在线状态的非OCF设备交互,避免交互失败,提高了物联网设备互联互通的通信效率。In this embodiment, after a non-OCF device joins the OCF network through device bridging, the client can determine the connection status of the non-OCF device by obtaining the resource notification message sent by the bridging platform, so that the connection status of the non-OCF device can be clarified. When interacting with OCF devices, you can only select non-OCF devices that are online to interact, avoid interaction failures, and improve the communication efficiency of interconnection and intercommunication of IoT devices.
在一些实施例中,资源通知消息为桥接平台中的桥接设备发送,连接状态信息为桥接设备根据虚拟设备列表资源确定,虚拟设备列表资源包括虚拟OCF设备连接状态标识信息。In some embodiments, the resource notification message is sent by the bridge device in the bridge platform, and the connection status information is determined by the bridge device according to the virtual device list resource, and the virtual device list resource includes the virtual OCF device connection status identification information.
其中,虚拟设备列表资源是一个OCF资源,用于表示加入OCF网络的虚拟OCF设备信息,相当于对虚拟OCF设备有一个清单,清单的实际存储方式不限定,可以是表格形式,也可以是文本形式等等。通过虚拟设备列表资源管理虚拟OCF设备的连接状态,桥接设备的虚拟设备列表资源包括虚拟OCF设备连接状态标识信息,基于已存在的OCF资源实现,不需要创建新的OCF资源。虚拟OCF设备连接状态标识信息添加在虚拟设备列表资源中与匹配的虚拟OCF设备信息对应的位置,从而通过虚拟OCF设备连接状态标识信息表征对应的虚拟OCF设备的连接状态。Among them, the virtual device list resource is an OCF resource, used to represent the virtual OCF device information added to the OCF network, which is equivalent to having a list of virtual OCF devices. The actual storage method of the list is not limited, and it can be in table form or text. Form and so on. The virtual device list resource manages the connection status of the virtual OCF device. The virtual device list resource of the bridge device includes the connection status identification information of the virtual OCF device, which is implemented based on the existing OCF resources without the need to create new OCF resources. The virtual OCF device connection state identification information is added to the position corresponding to the matching virtual OCF device information in the virtual device list resource, so that the connection state of the corresponding virtual OCF device is represented by the virtual OCF device connection state identification information.
本实施例中,通过虚拟设备列表资源中的设备连接状态标识信息记录非OCF设备的连接状态,当桥接平台有新的非OCF设备接入时,虚拟设备列表资源中增加对应的虚拟OCF设备连接状态标识信息,此时虚拟设备列表资源更新。当桥接平台检测到已接入桥接平台的非OCF设备的连接状态变化时,虚拟设备列表资源中也会同步更新对应的虚拟OCF设备连接状态标识信息,此时虚拟设备列表资源也更新。从而可在资源通知消息中携带由虚拟OCF设备连接状态标识信息确定的连接状态信息,客户端可根据资源通知消息确定非OCF设备的连接状态。In this embodiment, the connection status of the non-OCF device is recorded through the device connection status identification information in the virtual device list resource. When a new non-OCF device is connected to the bridge platform, the corresponding virtual OCF device connection is added to the virtual device list resource. Status identification information. At this time, the virtual device list resource is updated. When the bridge platform detects a change in the connection status of the non-OCF device that has been connected to the bridge platform, the virtual device list resource will also update the corresponding virtual OCF device connection status identification information synchronously, and the virtual device list resource is also updated at this time. Therefore, the connection status information determined by the connection status identification information of the virtual OCF device can be carried in the resource notification message, and the client can determine the connection status of the non-OCF device according to the resource notification message.
在一些实施例中,当第一非OCF设备的连接状态变化时,桥接平台中的桥接设备的虚拟设备列表资源中的第一非OCF设备对应的虚拟OCF设备连接状态标识信息更新,第一非OCF设备为非OCF设备中的至少一个设备。In some embodiments, when the connection status of the first non-OCF device changes, the virtual OCF device connection status identification information corresponding to the first non-OCF device in the virtual device list resource of the bridge device in the bridge platform is updated, and the first non-OCF device The OCF device is at least one of the non-OCF devices.
具体地,桥接平台具有非OCF设备连接状态检测功能,例如桥接平台通过设备心跳机制检测非OCF设备是否在线,从而探测到非OCF设备的连接状态发生改变。当第一非OCF设备的连接状态变化时,如第一非OCF设备由在线变为已断开和桥接平台的网络连接,或第一非OCF设备由离线变为重新接入桥接平台,虚拟设备列表资源中的第一非OCF设备对应的虚拟OCF设备连接状态标识信息更新。Specifically, the bridge platform has a non-OCF device connection status detection function. For example, the bridge platform detects whether the non-OCF device is online through the device heartbeat mechanism, thereby detecting that the connection status of the non-OCF device has changed. When the connection status of the first non-OCF device changes, for example, the first non-OCF device changes from online to a disconnected network connection to the bridge platform, or the first non-OCF device changes from offline to reconnect to the bridge platform, virtual device The connection state identification information of the virtual OCF device corresponding to the first non-OCF device in the list resource is updated.
在一些实施例中,方法还包括:向桥接设备发送订阅请求,订阅请求用于指示订阅所述虚拟设备列表资源。In some embodiments, the method further includes: sending a subscription request to the bridge device, where the subscription request is used to indicate to subscribe to the virtual device list resource.
其中,如果客户端向桥接设备订阅了虚拟设备列表资源,则在资源存在更新时,可由桥接设备主动向客户端发送资源通知消息。可选的,订阅请求中可携带目标虚拟OCF设备标识信息,只有当目标虚拟OCF设备标识信息对应的目标虚拟OCF设备的连接状态变化时,才会收到资源通知消息。如果订阅请求中不携带虚拟OCF设备标识,则会订阅桥接平台上所有虚拟OCF设备的连接状态。Among them, if the client has subscribed to the virtual device list resource of the bridge device, the bridge device can actively send a resource notification message to the client when the resource is updated. Optionally, the target virtual OCF device identification information may be carried in the subscription request, and the resource notification message will be received only when the connection state of the target virtual OCF device corresponding to the target virtual OCF device identification information changes. If the subscription request does not carry the virtual OCF device identifier, the connection status of all virtual OCF devices on the bridge platform will be subscribed.
本实施例中,通过订阅虚拟设备列表资源,在资源存在更新时,桥接设备主动向客户端发送资源通 知消息,则客户端可实时了解非OCF设备的在线状态,方便高效。In this embodiment, by subscribing to the virtual device list resource, when the resource is updated, the bridge device actively sends a resource notification message to the client, and the client can learn the online status of the non-OCF device in real time, which is convenient and efficient.
在一些实施例中,资源通知消息为桥接平台中的桥接设备的虚拟设备列表资源中增加虚拟OCF设备信息时,桥接设备发送的消息,虚拟OCF设备信息包括虚拟OCF设备连接状态标识信息。In some embodiments, the resource notification message is a message sent by the bridge device when virtual OCF device information is added to the virtual device list resource of the bridge device in the bridge platform. The virtual OCF device information includes virtual OCF device connection status identification information.
具体地,当有新的非OCF设备接入桥接平台时,桥接设备将新接入的非OCF设备映射为虚拟OCF设备,并在虚拟设备列表资源中增加对应的虚拟OCF设备信息。可以在激活虚拟OCF设备后再在虚拟设备列表资源中增加对应的虚拟OCF设备信息,或在未激活虚拟OCF设备时就在虚拟设备列表资源中增加对应的虚拟OCF设备信息。虚拟OCF设备信息包括虚拟OCF设备连接状态标识信息,用于描述当前虚拟OCF设备的连接状态。Specifically, when a new non-OCF device accesses the bridge platform, the bridge device maps the newly accessed non-OCF device as a virtual OCF device, and adds corresponding virtual OCF device information to the virtual device list resource. The corresponding virtual OCF device information can be added to the virtual device list resource after the virtual OCF device is activated, or the corresponding virtual OCF device information can be added to the virtual device list resource when the virtual OCF device is not activated. The virtual OCF device information includes virtual OCF device connection state identification information, which is used to describe the current connection state of the virtual OCF device.
本实施例中,当有新的虚拟OCF设备信息加入虚拟设备列表资源时,桥接设备会向客户端发送资源通知消息,以使得客户端及时确定新加入的非OCF设备的连接状态。In this embodiment, when new virtual OCF device information is added to the virtual device list resource, the bridge device will send a resource notification message to the client, so that the client can determine the connection status of the newly added non-OCF device in time.
在一些实施例中,资源通知消息为桥接平台中的桥接设备的虚拟设备列表资源中虚拟OCF设备连接状态标识信息更新时,桥接设备发送的消息。In some embodiments, the resource notification message is a message sent by the bridge device when the virtual OCF device connection status identification information in the virtual device list resource of the bridge device in the bridge platform is updated.
具体地,当非OCF设备的连接状态发生变化,例如非OCF设备已断开和桥接平台的网络连接,则桥接设备更新虚拟设备列表资源,其中虚拟OCF设备连接状态标识信息,即虚拟OCF设备的连接状态属性值发生变化,当虚拟设备列表资源中虚拟OCF设备连接状态标识信息更新时,则桥接设备向客户端发送资源通知消息。Specifically, when the connection status of the non-OCF device changes, for example, the non-OCF device has been disconnected from the network connection of the bridge platform, the bridge device updates the virtual device list resource, where the virtual OCF device connection status identification information, that is, the virtual OCF device The connection state attribute value changes, and when the virtual OCF device connection state identification information in the virtual device list resource is updated, the bridge device sends a resource notification message to the client.
本实施例中,当当前存在连接状态变化的非OCF设备时,桥接设备主动向客户端发送资源通知消息,以使得客户端及时确定连接状态发生变化的非OCF设备。In this embodiment, when there is currently a non-OCF device whose connection status changes, the bridge device actively sends a resource notification message to the client, so that the client can timely determine the non-OCF device whose connection status changes.
在一个具体的实施例中,通过现有的vodlist资源管理虚拟OCF设备的连接状态,桥接设备的vodlist资源包含虚拟OCF设备连接状态标识信息,即虚拟OCF设备的连接状态属性,如图3所示,具体流程如下:In a specific embodiment, the connection status of the virtual OCF device is managed through the existing vodlist resource, and the vodlist resource of the bridge device includes the connection status identification information of the virtual OCF device, that is, the connection status attribute of the virtual OCF device, as shown in FIG. 3 , The specific process is as follows:
步骤一、客户端向桥接设备发送订阅请求,订阅桥接设备的vodlist资源。Step 1: The client sends a subscription request to the bridge device to subscribe to the vodlist resource of the bridge device.
步骤二、桥接设备将新接入的第一非OCF设备映射为虚拟OCF设备,并对外公开该虚拟OCF设备。Step 2: The bridge device maps the newly accessed first non-OCF device as a virtual OCF device, and exposes the virtual OCF device to the outside.
步骤三、客户端通过设备激活流程激活虚拟OCF设备,虚拟OCF设备加入OCF网络。Step 3: The client activates the virtual OCF device through the device activation process, and the virtual OCF device joins the OCF network.
步骤四、桥接设备在vodlist资源中增加已激活的虚拟OCF设备信息,其中虚拟OCF设备信息包括虚拟OCF设备的连接状态属性,通过该属性的值表示虚拟OCF设备的连接状态。Step 4: The bridge device adds the activated virtual OCF device information to the vodlist resource, where the virtual OCF device information includes the connection status attribute of the virtual OCF device, and the value of the attribute indicates the connection status of the virtual OCF device.
在vodlist资源中增加已激活的虚拟OCF设备信息,其中vods表示增加的已激活的虚拟OCF设备信息,如下所示:Add the activated virtual OCF device information to the vodlist resource, where vods represents the added activated virtual OCF device information, as shown below:
Figure PCTCN2019130023-appb-000001
Figure PCTCN2019130023-appb-000001
vodlist资源的属性包括:The attributes of the vodlist resource include:
rt:表示vodlist资源的类型,值为oic.r.vodlist;rt: indicates the type of vodlist resource, the value is oic.r.vodlist;
vods:表示虚拟OCF设备信息,进一步包括以下内容:n:虚拟OCF设备的名称;di:虚拟OCF设备的设备标识;econame:非OCF设备使用的通信协议,例如zigbee、z-wave、BLE等;status:虚拟OCF设备连接状态标识信息,表示虚拟OCF设备的连接状态,也就是非OCF设备的连接状态,例如online表示非OCF设备目前在线,offline表示非OCF设备目前离线。vods: indicates the virtual OCF device information, further including the following: n: the name of the virtual OCF device; di: the device identification of the virtual OCF device; econame: the communication protocol used by the non-OCF device, such as zigbee, z-wave, BLE, etc.; status: Virtual OCF device connection status identification information, indicating the connection status of the virtual OCF device, that is, the connection status of the non-OCF device. For example, online means that the non-OCF device is currently online, and offline means that the non-OCF device is currently offline.
步骤五、由于客户端订阅了vodlist资源,桥接设备向客户端发送vodlist资源更新通知,通知消息中指示虚拟OCF设备的连接状态。例如,vodlist资源更新通知中指示虚拟OCF设备目前在线。Step 5. Since the client has subscribed to the vodlist resource, the bridge device sends a vodlist resource update notification to the client, and the notification message indicates the connection status of the virtual OCF device. For example, the vodlist resource update notification indicates that the virtual OCF device is currently online.
步骤六、第一非OCF设备的连接状态发生变化,例如第一非OCF设备已断开和桥接平台的网络连接,桥接平台具有非OCF设备连接状态检测功能,探测到非OCF设备的连接状态发生改变。Step 6. The connection status of the first non-OCF device changes. For example, the first non-OCF device has been disconnected from the network connection of the bridge platform. The bridge platform has a non-OCF device connection status detection function and detects that the connection status of the non-OCF device has occurred. change.
步骤七、桥接设备更新vodlist资源,其中虚拟OCF设备的连接状态属性值发生变化。Step 7. The bridge device updates the vodlist resource, and the connection state attribute value of the virtual OCF device changes.
当第一非OCF设备变为已断开和桥接平台的网络连接,则更新vodlist资源如下所示:When the first non-OCF device becomes disconnected from the network connection of the bridge platform, the vodlist resource is updated as follows:
Figure PCTCN2019130023-appb-000002
Figure PCTCN2019130023-appb-000002
其中,vodlist资源的连接状态属性值变为offline,表示第一非OCF设备目前不在线。Among them, the connection state attribute value of the vodlist resource changes to offline, indicating that the first non-OCF device is currently offline.
步骤八、桥接设备向客户端发送vodlist资源更新通知,通知消息中指示虚拟OCF设备的连接状态。例如,vodlist资源更新通知中指示虚拟OCF设备目前不在线。Step 8. The bridge device sends a vodlist resource update notification to the client, and the notification message indicates the connection status of the virtual OCF device. For example, the vodlist resource update notification indicates that the virtual OCF device is currently offline.
应该理解的是,上述这些步骤并不是必然按照上述顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that the above-mentioned steps are not necessarily performed sequentially in the above-mentioned order. Unless specifically stated in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least some of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the order of execution of these sub-steps or stages is not necessarily It is performed sequentially, but may be performed alternately or alternately with at least a part of other steps or sub-steps or stages of other steps.
在一些实施例中,资源通知消息为桥接平台中的桥接设备发送,连接状态信息为桥接设备的虚拟OCF设备连接状态资源确定,桥接设备的虚拟OCF设备连接状态资源包括虚拟OCF设备连接状态标识信息和虚拟OCF设备标识信息。In some embodiments, the resource notification message is sent by the bridge device in the bridge platform, the connection state information is the virtual OCF device connection state resource determination of the bridge device, and the virtual OCF device connection state resource of the bridge device includes the virtual OCF device connection state identification information And virtual OCF device identification information.
其中,虚拟OCF设备连接状态资源是专门用于表示虚拟OCF设备的连接状态的,包括虚拟OCF设备连接状态标识信息和虚拟OCF设备标识信息。通过虚拟OCF设备连接状态标识信息的值表示虚拟OCF设备已连接(在线)或断开连接(离线),由于虚拟OCF设备是非OCF设备的代理,虚拟OCF设备在线或离线可代表非OCF设备已连接或断开连接。虚拟OCF设备连接状态资源在桥接设备中,从而由桥接设备统一集中管理虚拟OCF设备的连接状态信息,便于实现统一管理,提高管理效率。Among them, the virtual OCF device connection state resource is specifically used to indicate the connection state of the virtual OCF device, including virtual OCF device connection state identification information and virtual OCF device identification information. The value of the virtual OCF device connection status identification information indicates that the virtual OCF device is connected (online) or disconnected (offline). Since the virtual OCF device is a proxy for the non-OCF device, the virtual OCF device online or offline can represent that the non-OCF device is connected Or disconnect. The virtual OCF device connection state resource is in the bridge device, so that the bridge device centrally manages the connection state information of the virtual OCF device, which facilitates unified management and improves management efficiency.
本实施例中,通过桥接设备的虚拟OCF设备连接状态资源中的设备连接状态标识信息记录非OCF设备的连接状态,当桥接平台有新的非OCF设备接入时,桥接设备中虚拟OCF设备连接状态资源中增加虚拟OCF设备信息,虚拟OCF设备信息包括虚拟OCF设备连接状态标识信息,此时虚拟OCF设备连接状态资源更新。当桥接平台检测到已接入桥接平台的非OCF设备的连接状态变化时,虚拟OCF设备连接状态资源中也会同步更新对应的虚拟OCF设备连接状态标识信息,此时虚拟OCF设备连接状态资源也更新。从而可在资源通知消息中携带由虚拟OCF设备连接状态标识信息确定的连接状态信息,客户端可根据资源通知消息确定非OCF设备的连接状态。In this embodiment, the connection status of the non-OCF device is recorded through the device connection status identification information in the virtual OCF device connection status resource of the bridge device. When a new non-OCF device is connected to the bridge platform, the virtual OCF device in the bridge device is connected The virtual OCF device information is added to the state resource, and the virtual OCF device information includes the virtual OCF device connection state identification information. At this time, the virtual OCF device connection state resource is updated. When the bridge platform detects a change in the connection status of a non-OCF device that has been connected to the bridge platform, the virtual OCF device connection status resource will also update the corresponding virtual OCF device connection status identification information. At this time, the virtual OCF device connection status resource is also updated. Update. Therefore, the connection status information determined by the connection status identification information of the virtual OCF device can be carried in the resource notification message, and the client can determine the connection status of the non-OCF device according to the resource notification message.
在一些实施例中,当第一非OCF设备的连接状态变化时,桥接平台中的桥接设备的虚拟OCF设备连接状态资源中的第一非OCF设备对应的虚拟OCF设备连接状态标识信息更新,第一非OCF设备为所述非OCF设备中的至少一个设备。In some embodiments, when the connection status of the first non-OCF device changes, the connection status identification information of the virtual OCF device corresponding to the first non-OCF device in the virtual OCF device connection status resource of the bridge device in the bridge platform is updated. A non-OCF device is at least one of the non-OCF devices.
具体地,桥接平台具有非OCF设备连接状态检测功能,例如桥接平台通过设备心跳机制检测非OCF设备是否在线,从而探测到非OCF设备的连接状态发生改变。当第一非OCF设备的连接状态变化时,如第一非OCF设备由在线变为已断开和桥接平台的网络连接,或第一非OCF设备由离线变为重新接入桥接平台,桥接设备的虚拟OCF设备连接状态资源中的第一非OCF设备对应的虚拟OCF设备连接状态标识信息更新。Specifically, the bridge platform has a non-OCF device connection status detection function. For example, the bridge platform detects whether the non-OCF device is online through the device heartbeat mechanism, thereby detecting that the connection status of the non-OCF device has changed. When the connection status of the first non-OCF device changes, for example, the first non-OCF device changes from online to a disconnected network connection to the bridge platform, or the first non-OCF device changes from offline to reconnect to the bridge platform, and the bridge device The connection state identification information of the virtual OCF device corresponding to the first non-OCF device in the virtual OCF device connection state resource is updated.
本实施例中,虚拟OCF设备连接状态资源是桥接设备的资源之一,由桥接设备更新虚拟OCF设备连接状态资源。In this embodiment, the virtual OCF device connection state resource is one of the resources of the bridge device, and the virtual OCF device connection state resource is updated by the bridge device.
在一些实施例中,方法还包括:向桥接设备发送订阅请求,订阅请求用于指示订阅桥接设备的虚拟OCF设备连接状态资源。In some embodiments, the method further includes: sending a subscription request to the bridge device, where the subscription request is used to instruct the virtual OCF device connection state resource of the subscribed bridge device.
其中,如果客户端向桥接设备订阅了虚拟OCF设备连接状态资源,则在资源存在更新时,可由桥接设备主动向客户端发送资源通知消息。虚拟OCF设备连接状态资源是桥接设备的资源之一,桥接设备的虚拟OCF设备连接状态资源提供虚拟OCF设备的连接状态信息。可选的,订阅请求中可携带目标虚拟OCF设备标识信息,只有当目标虚拟OCF设备标识信息对应的目标虚拟OCF设备的连接状态变化时,才会收到资源通知消息。如果订阅请求中不携带虚拟OCF设备标识,则会订阅桥接平台上所有虚拟OCF设备的连接状态,任何一个虚拟OCF设备的连接状态变化,客户端都会收到资源通知消息。Among them, if the client subscribes to the virtual OCF device connection state resource of the bridge device, the bridge device can actively send a resource notification message to the client when the resource is updated. The virtual OCF device connection state resource is one of the resources of the bridge device, and the virtual OCF device connection state resource of the bridge device provides connection state information of the virtual OCF device. Optionally, the target virtual OCF device identification information may be carried in the subscription request, and the resource notification message will be received only when the connection state of the target virtual OCF device corresponding to the target virtual OCF device identification information changes. If the subscription request does not carry the virtual OCF device identifier, it will subscribe to the connection status of all virtual OCF devices on the bridge platform. If the connection status of any virtual OCF device changes, the client will receive a resource notification message.
本实施例中,通过向桥接设备订阅虚拟OCF设备连接状态资源,在资源存在更新时,桥接设备主动向客户端发送资源通知消息,则客户端可实时了解非OCF设备的在线状态,方便高效。In this embodiment, by subscribing the virtual OCF device connection status resource to the bridge device, when the resource is updated, the bridge device actively sends a resource notification message to the client, and the client can learn the online status of the non-OCF device in real time, which is convenient and efficient.
在一些实施例中,资源通知消息为桥接平台中的桥接设备中虚拟OCF设备连接状态资源中增加虚拟OCF设备信息时,桥接设备发送的消息,虚拟OCF设备信息包括虚拟OCF设备连接状态标识信息。In some embodiments, the resource notification message is a message sent by the bridge device when virtual OCF device information is added to the virtual OCF device connection state resource of the bridge device in the bridge platform. The virtual OCF device information includes virtual OCF device connection state identification information.
具体地,当有新的非OCF设备接入桥接平台时,桥接设备将新接入的非OCF设备映射为虚拟OCF设备,并在虚拟OCF设备连接状态资源中增加对应的虚拟OCF设备信息。可以在激活虚拟OCF设备后再在虚拟OCF设备连接状态资源中增加对应的虚拟OCF设备信息,或在未激活虚拟OCF设备时就在虚拟OCF设备连接状态资源中增加对应的虚拟OCF设备信息。虚拟OCF设备信息包括虚拟OCF设备连接状态标识信息,用于描述当前虚拟OCF设备的连接状态。Specifically, when a new non-OCF device accesses the bridge platform, the bridge device maps the newly accessed non-OCF device as a virtual OCF device, and adds corresponding virtual OCF device information to the virtual OCF device connection state resource. The corresponding virtual OCF device information can be added to the virtual OCF device connection state resource after the virtual OCF device is activated, or the corresponding virtual OCF device information can be added to the virtual OCF device connection state resource when the virtual OCF device is not activated. The virtual OCF device information includes virtual OCF device connection state identification information, which is used to describe the current connection state of the virtual OCF device.
本实施例中,当有新的虚拟OCF设备信息加入桥接设备的虚拟OCF设备连接状态资源中时,桥接设备会向客户端发送资源通知消息,以使得客户端及时确定新加入的非OCF设备的连接状态。In this embodiment, when new virtual OCF device information is added to the virtual OCF device connection state resource of the bridge device, the bridge device will send a resource notification message to the client, so that the client can determine the status of the newly added non-OCF device in time. Connection Status.
在一些实施例中,资源通知消息为桥接平台中的桥接设备的虚拟OCF设备连接状态资源中虚拟OCF设备连接状态标识信息更新时,桥接设备发送的消息。In some embodiments, the resource notification message is a message sent by the bridge device when the virtual OCF device connection state identification information in the virtual OCF device connection state resource of the bridge device in the bridge platform is updated.
具体地,当非OCF设备的连接状态发生变化,例如非OCF设备已断开和桥接平台的网络连接,则桥接设备更新虚拟OCF设备连接状态资源,其中虚拟OCF设备连接状态标识信息,即虚拟OCF设备的连接状态属性值发生变化,当虚拟OCF设备连接状态资源中虚拟OCF设备连接状态标识信息更新时,则桥接设备向客户端发送资源通知消息。Specifically, when the connection status of the non-OCF device changes, for example, the non-OCF device has been disconnected from the network connection of the bridge platform, the bridge device updates the virtual OCF device connection state resource, where the virtual OCF device connection state identification information, namely the virtual OCF The connection state attribute value of the device changes. When the virtual OCF device connection state identification information in the virtual OCF device connection state resource is updated, the bridge device sends a resource notification message to the client.
本实施例中,当当前存在连接状态变化的非OCF设备时,桥接设备主动向客户端发送资源通知消息,以使得客户端及时确定连接状态发生变化的非OCF设备。In this embodiment, when there is currently a non-OCF device whose connection status has changed, the bridge device actively sends a resource notification message to the client, so that the client can timely determine the non-OCF device whose connection status has changed.
在一个具体的实施例中,通过新增桥接设备的虚拟OCF设备连接状态资源管理虚拟OCF设备的连接状态,虚拟OCF设备连接状态资源包含虚拟OCF设备连接状态标识信息,即虚拟OCF设备的连接状态属性,如图4所示,具体流程如下:In a specific embodiment, the virtual OCF device connection state resource of the newly added bridge device is used to manage the connection state of the virtual OCF device. The virtual OCF device connection state resource includes the connection state identification information of the virtual OCF device, that is, the connection state of the virtual OCF device. Properties, as shown in Figure 4, the specific process is as follows:
步骤一、客户端向桥接设备发送订阅请求,订阅桥接设备的虚拟OCF设备连接状态资源。Step 1: The client sends a subscription request to the bridge device to subscribe to the virtual OCF device connection state resource of the bridge device.
步骤二、桥接设备将新接入的第一非OCF设备映射为虚拟OCF设备,并对外公开该虚拟OCF设备。Step 2: The bridge device maps the newly accessed first non-OCF device as a virtual OCF device, and exposes the virtual OCF device to the outside.
步骤三、客户端通过设备激活流程激活虚拟OCF设备,虚拟OCF设备加入OCF网络。Step 3: The client activates the virtual OCF device through the device activation process, and the virtual OCF device joins the OCF network.
步骤四、桥接设备在vodlist资源中增加已激活的虚拟OCF设备信息。Step 4: The bridge device adds the activated virtual OCF device information to the vodlist resource.
步骤五、桥接设备在虚拟OCF设备连接状态资源中增加已激活的虚拟OCF设备信息,其中虚拟OCF设备信息包括虚拟OCF设备的连接状态属性,通过该属性的值表示虚拟OCF设备的连接状态。Step 5. The bridge device adds the activated virtual OCF device information to the virtual OCF device connection state resource, where the virtual OCF device information includes the connection state attribute of the virtual OCF device, and the value of the attribute indicates the connection state of the virtual OCF device.
在一个实施例中,在虚拟OCF设备连接状态资源中增加已激活的虚拟OCF设备信息,虚拟OCF设备连接状态资源如下所示:In one embodiment, the activated virtual OCF device information is added to the virtual OCF device connection state resource, and the virtual OCF device connection state resource is as follows:
Figure PCTCN2019130023-appb-000003
Figure PCTCN2019130023-appb-000003
虚拟OCF设备连接状态资源的属性包括:The attributes of the virtual OCF device connection state resource include:
·rt:虚拟OCF设备连接状态资源的类型,值为oic.r.vodConnectionStatus;·Rt: The type of virtual OCF device connection status resource, the value is oic.r.vodConnectionStatus;
·if:虚拟OCF设备连接状态资源的接口;·If: The interface of the virtual OCF device connection status resource;
·di:虚拟OCF设备的设备标识;·Di: the device identification of the virtual OCF device;
·status:虚拟OCF设备连接状态标识信息,表示虚拟OCF设备的连接状态,也就是非OCF设备的连接状态,例如online表示非OCF设备目前在线。· Status: virtual OCF device connection status identification information, indicating the connection status of the virtual OCF device, that is, the connection status of the non-OCF device, for example, online indicates that the non-OCF device is currently online.
其中di属性,即虚拟OCF设备的设备标识和status属性,即虚拟OCF设备连接状态标识信息是虚拟OCF设备连接状态资源的必选属性,其他是可选属性。The di attribute is the device identification and status attribute of the virtual OCF device, that is, the virtual OCF device connection status identification information is a required attribute of the virtual OCF device connection status resource, and the others are optional attributes.
步骤六、由于客户端订阅了虚拟OCF设备连接状态资源,桥接设备向客户端发送虚拟OCF设备连接状态资源更新通知,通知消息中指示虚拟OCF设备的连接状态。例如,资源更新通知中指示虚拟OCF设备目前在线。Step 6. Since the client has subscribed to the virtual OCF device connection status resource, the bridge device sends the virtual OCF device connection status resource update notification to the client, and the notification message indicates the connection status of the virtual OCF device. For example, the resource update notification indicates that the virtual OCF device is currently online.
步骤七、第一非OCF设备的连接状态发生变化,例如第一非OCF设备已断开和桥接平台的网络连接,桥接平台具有非OCF设备连接状态检测功能,探测到非OCF设备的连接状态发生改变。Step 7. The connection status of the first non-OCF device changes. For example, the first non-OCF device has been disconnected from the network connection of the bridge platform. The bridge platform has a non-OCF device connection status detection function and detects that the connection status of the non-OCF device has occurred. change.
步骤八、桥接设备更新虚拟OCF设备连接状态资源,其中虚拟OCF设备的连接状态属性值发生变化。Step 8. The bridge device updates the virtual OCF device connection state resource, where the connection state attribute value of the virtual OCF device changes.
在一个实施例中,虚拟OCF设备连接状态资源更新如下所示:In one embodiment, the virtual OCF device connection state resource update is as follows:
Figure PCTCN2019130023-appb-000004
Figure PCTCN2019130023-appb-000004
其中,虚拟OCF设备连接状态资源的连接状态属性值变为offline,表示第一非OCF设备目前不在线。Wherein, the connection state attribute value of the virtual OCF device connection state resource becomes offline, indicating that the first non-OCF device is currently offline.
步骤九、桥接设备向客户端发送虚拟OCF设备连接状态资源更新通知,通知消息中指示虚拟OCF设备的连接状态。例如,虚拟OCF设备连接状态资源更新通知中指示虚拟OCF设备目前不在线。Step 9: The bridge device sends the virtual OCF device connection status resource update notification to the client, and the notification message indicates the connection status of the virtual OCF device. For example, the virtual OCF device connection status resource update notification indicates that the virtual OCF device is currently offline.
在一些实施例中,资源通知消息为桥接平台中的虚拟OCF设备发送,连接状态信息为虚拟OCF设备的虚拟OCF设备连接状态资源确定,虚拟OCF设备的虚拟OCF设备连接状态资源包括虚拟OCF设备连接状态标识信息和虚拟OCF设备标识信息。In some embodiments, the resource notification message is sent by the virtual OCF device in the bridge platform, the connection status information is the virtual OCF device connection status resource determination of the virtual OCF device, and the virtual OCF device connection status resource of the virtual OCF device includes the virtual OCF device connection Status identification information and virtual OCF device identification information.
其中,虚拟OCF设备连接状态资源是专门用于表示虚拟OCF设备的连接状态的,包括虚拟OCF设备连接状态标识信息和虚拟OCF设备标识信息。通过虚拟OCF设备连接状态标识信息的值表示虚拟OCF设备已连接(在线)或断开连接(离线),由于虚拟OCF设备是非OCF设备的代理,虚拟OCF设备在线或离线可代表非OCF设备已连接或断开连接。虚拟OCF设备连接状态资源在虚拟OCF设备中,虚拟OCF设备连接状态资源是虚拟OCF设备自身的资源之一,由虚拟OCF设备更新虚拟OCF设备连接状态资源,从而各个虚拟OCF设备管理自身的连接状态信息,使得管理时分工更明确,简单方便,即使有大量的非OCF设备通过桥接方式加入OCF网络,也能有序的管理。Among them, the virtual OCF device connection state resource is specifically used to indicate the connection state of the virtual OCF device, including virtual OCF device connection state identification information and virtual OCF device identification information. The value of the virtual OCF device connection status identification information indicates that the virtual OCF device is connected (online) or disconnected (offline). Since the virtual OCF device is a proxy for the non-OCF device, the virtual OCF device online or offline can represent that the non-OCF device is connected Or disconnect. Virtual OCF device connection state resource In the virtual OCF device, the virtual OCF device connection state resource is one of the resources of the virtual OCF device itself. The virtual OCF device updates the virtual OCF device connection state resource, so that each virtual OCF device manages its own connection state Information makes the management time division clearer, simpler and more convenient. Even if a large number of non-OCF devices join the OCF network through bridges, they can be managed in an orderly manner.
本实施例中,通过虚拟OCF设备的虚拟OCF设备连接状态资源中的设备连接状态标识信息记录非OCF设备的连接状态,当桥接平台有新的非OCF设备接入时,桥接平台中增加对应的虚拟OCF设备,增加的虚拟OCF设备中包括虚拟OCF设备连接状态资源,虚拟OCF设备连接状态资源包括虚拟OCF设备信息,虚拟OCF设备信息包括虚拟OCF设备连接状态标识信息,此时虚拟OCF设备连接状态资源更新。当桥接平台检测到已接入桥接平台的非OCF设备的连接状态变化时,虚拟OCF设备连接状态资源中也会同步更新对应的虚拟OCF设备连接状态标识信息,此时虚拟OCF设备连接状态资源也更新。从而可在资源通知消息中携带由虚拟OCF设备连接状态标识信息确定的连接状态信息,客户端可根据资源通知消息确定非OCF设备的连接状态。In this embodiment, the connection status of the non-OCF device is recorded through the device connection status identification information in the virtual OCF device connection status resource of the virtual OCF device. When a new non-OCF device is connected to the bridge platform, the corresponding Virtual OCF device, the added virtual OCF device includes the virtual OCF device connection state resource, the virtual OCF device connection state resource includes virtual OCF device information, and the virtual OCF device information includes virtual OCF device connection status identification information. At this time, the virtual OCF device connection state Resource update. When the bridge platform detects a change in the connection status of a non-OCF device that has been connected to the bridge platform, the virtual OCF device connection status resource will also update the corresponding virtual OCF device connection status identification information. At this time, the virtual OCF device connection status resource is also updated. Update. Therefore, the connection status information determined by the connection status identification information of the virtual OCF device can be carried in the resource notification message, and the client can determine the connection status of the non-OCF device according to the resource notification message.
在一些实施例中,当第一非OCF设备的连接状态变化时,第一非OCF设备对应的虚拟OCF设备的虚拟OCF设备连接状态资源中的虚拟OCF设备连接状态标识信息更新,第一非OCF设备为所述非OCF设备中的至少一个设备。In some embodiments, when the connection state of the first non-OCF device changes, the virtual OCF device connection state identification information in the virtual OCF device connection state resource of the virtual OCF device corresponding to the first non-OCF device is updated, and the first non-OCF device The device is at least one of the non-OCF devices.
具体地,桥接平台具有非OCF设备连接状态检测功能,例如桥接平台通过设备心跳机制检测非OCF设备是否在线,从而探测到非OCF设备的连接状态发生改变。当第一非OCF设备的连接状态变化时,如第一非OCF设备由在线变为已断开和桥接平台的网络连接,或第一非OCF设备由离线变为重新接入桥接平台,第一非OCF设备对应的虚拟OCF设备的虚拟OCF设备连接状态资源中的虚拟OCF设备连 接状态标识信息更新。Specifically, the bridge platform has a non-OCF device connection status detection function. For example, the bridge platform detects whether the non-OCF device is online through the device heartbeat mechanism, thereby detecting that the connection status of the non-OCF device has changed. When the connection status of the first non-OCF device changes, for example, the first non-OCF device changes from online to a disconnected network connection to the bridge platform, or the first non-OCF device changes from offline to reconnect to the bridge platform, the first The virtual OCF device connection state identification information in the virtual OCF device connection state resource of the virtual OCF device corresponding to the non-OCF device is updated.
本实施例中,虚拟OCF设备连接状态资源是虚拟OCF设备的资源之一,由虚拟OCF设备更新虚拟OCF设备连接状态资源。In this embodiment, the virtual OCF device connection state resource is one of the resources of the virtual OCF device, and the virtual OCF device connection state resource is updated by the virtual OCF device.
在一些实施例中,方法还包括:向虚拟OCF设备或桥接设备发送订阅请求,订阅请求用于指示订阅所述虚拟OCF设备的虚拟OCF设备连接状态资源。In some embodiments, the method further includes: sending a subscription request to a virtual OCF device or a bridge device, where the subscription request is used to indicate to subscribe to the virtual OCF device connection state resource of the virtual OCF device.
其中,如果客户端向虚拟OCF设备订阅了虚拟OCF设备连接状态资源,则在资源存在更新时,可由虚拟OCF设备主动向客户端发送资源通知消息。虚拟OCF设备连接状态资源是虚拟OCF设备的资源之一,虚拟OCF设备的虚拟OCF设备连接状态资源提供虚拟OCF设备的连接状态信息。可选的,可以向一个或多个虚拟OCF设备发送订阅请求以订阅虚拟OCF设备的虚拟OCF设备状态资源,可以只向目标虚拟OCF设备发送订阅请求,只有目标虚拟OCF设备标识信息对应的目标虚拟OCF设备的连接状态变化时,才会收到资源通知消息。也可以向桥接平台上所有虚拟OCF设备发送订阅请求,订阅桥接平台上所有虚拟OCF设备的连接状态,任何一个虚拟OCF设备的连接状态变化,客户端都会收到资源通知消息。Wherein, if the client subscribes to the virtual OCF device connection state resource of the virtual OCF device, when the resource is updated, the virtual OCF device can actively send a resource notification message to the client. The virtual OCF device connection state resource is one of the resources of the virtual OCF device, and the virtual OCF device connection state resource of the virtual OCF device provides connection state information of the virtual OCF device. Optionally, a subscription request can be sent to one or more virtual OCF devices to subscribe to the virtual OCF device state resources of the virtual OCF device, and the subscription request can be sent only to the target virtual OCF device, and only the target virtual OCF device identification information corresponding to the target virtual The resource notification message will be received only when the connection status of the OCF device changes. You can also send a subscription request to all virtual OCF devices on the bridge platform to subscribe to the connection status of all virtual OCF devices on the bridge platform. If the connection status of any virtual OCF device changes, the client will receive a resource notification message.
可选的,可以向桥接设备发送订阅请求,订阅请求指示订阅虚拟OCF设备的虚拟OCF设备连接状态资源,则只要在桥接设备中产生新的虚拟OCF设备,新的虚拟OCF设备会通知客户端它的连接状态信息,客户端会收到资源通知消息。Optionally, a subscription request can be sent to the bridge device. The subscription request indicates to subscribe to the virtual OCF device connection status resource of the virtual OCF device. As long as a new virtual OCF device is generated in the bridge device, the new virtual OCF device will notify the client of it For connection status information, the client will receive a resource notification message.
本实施例中,通过向虚拟OCF设备或桥接设备订阅虚拟OCF设备连接状态资源,在资源存在更新时,虚拟OCF设备主动向客户端发送资源通知消息,则客户端可实时了解非OCF设备的在线状态,方便高效。In this embodiment, by subscribing to the virtual OCF device or bridge device for the virtual OCF device connection status resource, when the resource is updated, the virtual OCF device actively sends a resource notification message to the client, and the client can learn the online status of the non-OCF device in real time. Status, convenient and efficient.
在一些实施例中,资源通知消息为桥接平台中增加虚拟OCF设备时,增加的虚拟OCF设备发送的消息,增加的虚拟OCF设备包括虚拟OCF设备连接状态资源,虚拟OCF设备连接状态资源包括虚拟OCF设备信息,虚拟OCF设备信息包括虚拟OCF设备连接状态标识信息。In some embodiments, the resource notification message is a message sent by the added virtual OCF device when a virtual OCF device is added to the bridge platform. The added virtual OCF device includes a virtual OCF device connection state resource, and the virtual OCF device connection state resource includes a virtual OCF. Device information, virtual OCF device information includes virtual OCF device connection status identification information.
具体地,当有新的非OCF设备接入桥接平台时,桥接设备将新接入的非OCF设备映射为虚拟OCF设备,并在虚拟OCF设备中的虚拟OCF设备连接状态资源中增加对应的虚拟OCF设备信息。可以在激活虚拟OCF设备后再在虚拟OCF设备连接状态资源中增加对应的虚拟OCF设备信息,或在未激活虚拟OCF设备时就在虚拟OCF设备连接状态资源中增加对应的虚拟OCF设备信息。虚拟OCF设备信息包括虚拟OCF设备连接状态标识信息,用于描述当前虚拟OCF设备的连接状态。Specifically, when a new non-OCF device accesses the bridge platform, the bridge device maps the newly accessed non-OCF device as a virtual OCF device, and adds the corresponding virtual OCF device connection state resource in the virtual OCF device. OCF device information. The corresponding virtual OCF device information can be added to the virtual OCF device connection state resource after the virtual OCF device is activated, or the corresponding virtual OCF device information can be added to the virtual OCF device connection state resource when the virtual OCF device is not activated. The virtual OCF device information includes virtual OCF device connection state identification information, which is used to describe the current connection state of the virtual OCF device.
本实施例中,桥接平台中增加虚拟OCF设备时,新增加的虚拟OCF设备会向客户端发送资源通知消息,以使得客户端及时确定新加入的非OCF设备的连接状态。In this embodiment, when a virtual OCF device is added to the bridge platform, the newly added virtual OCF device will send a resource notification message to the client, so that the client can determine the connection status of the newly added non-OCF device in time.
在一些实施例中,资源通知消息为虚拟OCF设备中的虚拟OCF设备连接状态资源的虚拟OCF设备连接状态标识信息更新时,虚拟OCF设备发送的消息。In some embodiments, the resource notification message is a message sent by the virtual OCF device when the virtual OCF device connection state identification information of the virtual OCF device connection state resource in the virtual OCF device is updated.
具体地,当非OCF设备的连接状态发生变化,例如非OCF设备已断开和桥接平台的网络连接,则虚拟OCF设备更新虚拟OCF设备连接状态资源,其中虚拟OCF设备连接状态标识信息,即虚拟OCF设备的连接状态属性值发生变化,当虚拟OCF设备连接状态资源中虚拟OCF设备连接状态标识信息更新时,则虚拟OCF设备向客户端发送资源通知消息。Specifically, when the connection status of the non-OCF device changes, for example, the non-OCF device has been disconnected from the network connection of the bridge platform, the virtual OCF device updates the virtual OCF device connection state resource, where the virtual OCF device connection state identification information, that is, virtual The connection state attribute value of the OCF device changes, and when the virtual OCF device connection state identification information in the virtual OCF device connection state resource is updated, the virtual OCF device sends a resource notification message to the client.
本实施例中,当当前存在连接状态变化的非OCF设备时,虚拟OCF设备主动向客户端发送资源通知消息,以使得客户端及时确定连接状态发生变化的非OCF设备。In this embodiment, when there is currently a non-OCF device whose connection status has changed, the virtual OCF device actively sends a resource notification message to the client, so that the client can promptly determine the non-OCF device whose connection status has changed.
在一个具体的实施例中,通过新增虚拟OCF设备的虚拟OCF设备连接状态资源管理虚拟OCF设备的连接状态,虚拟OCF设备连接状态资源包含虚拟OCF设备连接状态标识信息,即虚拟OCF设备的连接状态属性,如图5所示,具体流程如下:In a specific embodiment, the connection state of the virtual OCF device is managed by the virtual OCF device connection state resource of the newly added virtual OCF device. The virtual OCF device connection state resource includes the virtual OCF device connection state identification information, that is, the connection of the virtual OCF device. State attributes, as shown in Figure 5, the specific process is as follows:
步骤一、桥接设备将新接入的第一非OCF设备映射为虚拟OCF设备,并对外公开该虚拟OCF设备,虚拟OCF设备包括虚拟OCF设备连接状态资源,虚拟OCF设备连接状态资源包括虚拟OCF设备信息,虚拟OCF设备信息包括虚拟OCF设备的连接状态属性,通过该属性的值表示虚拟OCF设备的连接状态。 Step 1. The bridge device maps the newly connected first non-OCF device as a virtual OCF device, and exposes the virtual OCF device to the outside. The virtual OCF device includes the virtual OCF device connection state resource, and the virtual OCF device connection state resource includes the virtual OCF device. Information, the virtual OCF device information includes the connection state attribute of the virtual OCF device, and the value of the attribute indicates the connection state of the virtual OCF device.
在一个实施例中,虚拟OCF设备连接状态资源如下所示:In one embodiment, the virtual OCF device connection state resource is as follows:
Figure PCTCN2019130023-appb-000005
Figure PCTCN2019130023-appb-000005
Figure PCTCN2019130023-appb-000006
Figure PCTCN2019130023-appb-000006
虚拟OCF设备连接状态资源的属性包括:The attributes of the virtual OCF device connection state resource include:
·rt:虚拟OCF设备连接状态资源的类型,值为oic.r.vodConnectionStatus;·Rt: The type of virtual OCF device connection status resource, the value is oic.r.vodConnectionStatus;
·if:虚拟OCF设备连接状态资源的接口;·If: The interface of the virtual OCF device connection status resource;
·di:虚拟OCF设备的设备标识;·Di: the device identification of the virtual OCF device;
·status:虚拟OCF设备连接状态标识信息,表示虚拟OCF设备的连接状态,也就是非OCF设备的连接状态,例如online表示非OCF设备目前在线。· Status: virtual OCF device connection status identification information, indicating the connection status of the virtual OCF device, that is, the connection status of the non-OCF device, for example, online indicates that the non-OCF device is currently online.
其中di属性,即虚拟OCF设备的设备标识和status属性,即虚拟OCF设备连接状态标识信息是虚拟OCF设备连接状态资源的必选属性,其他是可选属性。The di attribute is the device identification and status attribute of the virtual OCF device, that is, the virtual OCF device connection status identification information is a required attribute of the virtual OCF device connection status resource, and the others are optional attributes.
步骤二、客户端通过设备激活流程激活虚拟OCF设备,虚拟OCF设备加入OCF网络。Step 2: The client activates the virtual OCF device through the device activation process, and the virtual OCF device joins the OCF network.
步骤三、桥接设备在vodlist资源中增加已激活的虚拟OCF设备信息。Step 3: The bridge device adds the activated virtual OCF device information to the vodlist resource.
步骤四、客户端向虚拟OCF设备发送订阅请求,订阅虚拟OCF设备的虚拟OCF设备连接状态资源。Step 4: The client sends a subscription request to the virtual OCF device to subscribe to the virtual OCF device connection state resource of the virtual OCF device.
步骤五、由于客户端订阅了虚拟OCF设备连接状态资源,虚拟OCF设备向客户端发送虚拟OCF设备连接状态资源更新通知,通知消息中指示虚拟OCF设备的连接状态。例如,资源更新通知中指示虚拟OCF设备目前在线。Step 5. Since the client has subscribed to the virtual OCF device connection state resource, the virtual OCF device sends a virtual OCF device connection state resource update notification to the client, and the notification message indicates the connection state of the virtual OCF device. For example, the resource update notification indicates that the virtual OCF device is currently online.
步骤六、第一非OCF设备的连接状态发生变化,例如第一非OCF设备已断开和桥接平台的网络连接,桥接平台具有非OCF设备连接状态检测功能,探测到非OCF设备的连接状态发生改变。Step 6. The connection status of the first non-OCF device changes. For example, the first non-OCF device has been disconnected from the network connection of the bridge platform. The bridge platform has a non-OCF device connection status detection function and detects that the connection status of the non-OCF device has occurred. change.
步骤七、虚拟OCF设备更新虚拟OCF设备连接状态资源,其中虚拟OCF设备的连接状态属性值发生变化。Step 7. The virtual OCF device updates the connection state resource of the virtual OCF device, where the connection state attribute value of the virtual OCF device changes.
在一个实施例中,虚拟OCF设备连接状态资源更新如下所示:In one embodiment, the virtual OCF device connection state resource update is as follows:
Figure PCTCN2019130023-appb-000007
Figure PCTCN2019130023-appb-000007
其中,虚拟OCF设备连接状态资源的连接状态属性值变为offline,表示第一非OCF设备目前不在线。Wherein, the connection state attribute value of the virtual OCF device connection state resource becomes offline, indicating that the first non-OCF device is currently offline.
步骤八、虚拟OCF设备向客户端发送虚拟OCF设备连接状态资源更新通知,通知消息中指示虚拟OCF设备的连接状态。例如,虚拟OCF设备连接状态资源更新通知中指示虚拟OCF设备目前不在线。Step 8. The virtual OCF device sends a virtual OCF device connection status resource update notification to the client, and the notification message indicates the connection status of the virtual OCF device. For example, the virtual OCF device connection status resource update notification indicates that the virtual OCF device is currently offline.
可选的,虚拟OCF设备或桥接设备中的虚拟OCF设备连接状态资源还包括以下信息中的至少一种信息:虚拟OCF设备连接状态资源的类型信息;虚拟OCF设备连接状态资源的接口信息。其中,虚拟OCF设备连接状态资源的类型信息一般为预设的值,如值为oic.r.vodConnectionStatus,表征资源类型。其中虚拟OCF设备连接状态资源的接口是操作资源时用的一个参数,例如客户端想读取虚拟OCF设备连接状态资源,读取请求会带上rw接口或baselien接口,这两个接口得到的返回内容不一样。Optionally, the virtual OCF device connection state resource in the virtual OCF device or the bridge device further includes at least one of the following information: type information of the virtual OCF device connection state resource; and interface information of the virtual OCF device connection state resource. Among them, the type information of the virtual OCF device connection status resource is generally a preset value, for example, the value is oic.r.vodConnectionStatus, which represents the resource type. The interface of the virtual OCF device connection status resource is a parameter used when operating the resource. For example, if the client wants to read the virtual OCF device connection status resource, the read request will bring the rw interface or the baselien interface, and these two interfaces will get the return. The content is different.
在一些实施例中,方法还包括:发送设备发现请求,设备发现请求用于指示发现虚拟OCF设备或者发现处于在线连接状态的虚拟OCF设备。In some embodiments, the method further includes: sending a device discovery request, where the device discovery request is used to instruct to discover a virtual OCF device or to discover a virtual OCF device in an online connection state.
其中,可以在设备发现请求中添加限制条件以只发现虚拟OCF设备,因为网络中可能还存在真实的OCF设备,例如桥接设备,添加限制条件则可实现只发现虚拟OCF设备。当设备发现请求用于指示发现虚拟OCF设备时,返回的响应消息可以携带包括非OCF设备对应的虚拟OCF设备信息和虚拟OCF设备连接状态信息。Among them, a restriction condition can be added to the device discovery request to discover only virtual OCF devices, because there may also be real OCF devices, such as bridge devices, in the network, and restriction conditions can be added to realize that only virtual OCF devices can be discovered. When the device discovery request is used to indicate the discovery of a virtual OCF device, the returned response message may carry information including the virtual OCF device corresponding to the non-OCF device and the connection status information of the virtual OCF device.
当设备发现请求用于指示发现处于在线连接状态的虚拟OCF设备时,控制返回的响应消息中只有在线状态的虚拟OCF设备信息,如只包括在线非OCF设备对应的虚拟OCF设备信息。When the device discovery request is used to indicate the discovery of a virtual OCF device in an online connection state, the response message returned by the control includes only the virtual OCF device information in the online state, for example, only the virtual OCF device information corresponding to the online non-OCF device is included.
可选的,设备发现请求为以下请求中的至少一种:向OCF网络发送的多播设备发现请求;向桥接设备发送的单播设备发现请求;向虚拟OCF设备发送的单播设备发现请求。Optionally, the device discovery request is at least one of the following requests: a multicast device discovery request sent to the OCF network; a unicast device discovery request sent to a bridge device; a unicast device discovery request sent to a virtual OCF device.
其中,多播设备发现请求是客户端加入多播组,多播组中所有设备都会收到多播请求,桥接设备、虚拟OCF设备、其他OCF设备都会收到设备发现请求。从而收到多播设备发现请求的设备根据虚拟OCF设备的在线状态返回对应的响应消息。Among them, the multicast device discovery request is that the client joins the multicast group. All devices in the multicast group will receive the multicast request, and the bridge device, virtual OCF device, and other OCF devices will all receive the device discovery request. Therefore, the device that receives the multicast device discovery request returns a corresponding response message according to the online status of the virtual OCF device.
单播设备发现请求是点对点通信,客户端向一个确定的目标设备发送设备发现请求,例如向桥接设备发送设备发现请求,只有桥接设备会收到,向虚拟OCF设备发送设备发现请求,只有虚拟OCF设备会收到。从而收到单播设备发现请求的设备根据虚拟OCF设备的在线状态返回对应的响应消息。The unicast device discovery request is a point-to-point communication. The client sends a device discovery request to a certain target device. For example, it sends a device discovery request to a bridge device. Only the bridge device will receive it. Send a device discovery request to a virtual OCF device. Only virtual OCF. The device will receive it. Therefore, the device that receives the unicast device discovery request returns a corresponding response message according to the online status of the virtual OCF device.
在一些实施例中,资源通知消息是根据设备发现请求生成的响应消息,响应消息用于指示在线非OCF设备对应的虚拟OCF设备信息,所述设备发现请求用于指示发现处于在线连接状态的虚拟OCF设备。In some embodiments, the resource notification message is a response message generated according to a device discovery request. The response message is used to indicate the virtual OCF device information corresponding to the online non-OCF device, and the device discovery request is used to indicate the discovery of a virtual OCF device in an online connection state. OCF equipment.
在一些实施例中,资源通知消息是根据设备发现请求生成的响应消息,所述响应消息包括非OCF设备对应的虚拟OCF设备信息和虚拟OCF设备连接状态信息,所述设备发现请求用于指示发现虚拟OCF设备。In some embodiments, the resource notification message is a response message generated according to a device discovery request, and the response message includes virtual OCF device information and virtual OCF device connection status information corresponding to a non-OCF device, and the device discovery request is used to indicate discovery Virtual OCF device.
其中,响应消息有2种可能:1、包括在虚拟OCF设备的设备标识、对应的虚拟OCF设备的连接状态信息;2、包括虚拟OCF设备的设备标识,只有在线虚拟OCF设备的设备标识。Among them, the response message has two possibilities: 1. It includes the device identifier of the virtual OCF device and the connection status information of the corresponding virtual OCF device; 2. It includes the device identifier of the virtual OCF device, and only the device identifier of the online virtual OCF device.
如果响应消息包括在虚拟OCF设备的设备标识、对应的虚拟OCF设备的连接状态信息,则可根据虚拟OCF设备的连接状态信息确定虚拟OCF设备的连接状态,从而确定非OCF设备的连接状态,将设备发现请求生成的响应消息作为资源通知消息发送至客户端,以使客户端确定非OCF设备的连接状态。If the response message includes the device identification of the virtual OCF device and the connection status information of the corresponding virtual OCF device, the connection status of the virtual OCF device can be determined according to the connection status information of the virtual OCF device, thereby determining the connection status of the non-OCF device. The response message generated by the device discovery request is sent to the client as a resource notification message, so that the client can determine the connection status of the non-OCF device.
如果响应消息只包括在线虚拟OCF设备的设备标识,则可直接确定在线的非OCF设备,将设备发现请求生成的响应消息作为资源通知消息发送至客户端,以使客户端确定在线的非OCF设备。If the response message only includes the device identification of the online virtual OCF device, you can directly determine the online non-OCF device, and send the response message generated by the device discovery request as a resource notification message to the client, so that the client can determine the online non-OCF device .
在一个实施例中,客户端发送设备发现请求,收到的响应消息中只包括在线非OCF设备对应的虚拟OCF设备信息,或响应消息包括非OCF设备对应的虚拟OCF设备信息和虚拟OCF设备连接状态信息,如图6所示,具体流程如下:In one embodiment, the client sends a device discovery request, and the received response message includes only the virtual OCF device information corresponding to the online non-OCF device, or the response message includes the virtual OCF device information corresponding to the non-OCF device and the virtual OCF device connection Status information, as shown in Figure 6, the specific process is as follows:
步骤一、桥接设备将新接入的第一非OCF设备映射为虚拟OCF设备,并对外公开该虚拟OCF设备。Step 1: The bridge device maps the newly accessed first non-OCF device as a virtual OCF device, and exposes the virtual OCF device to the outside.
步骤二、客户端通过设备激活流程激活虚拟OCF设备,虚拟OCF设备加入OCF网络。Step 2: The client activates the virtual OCF device through the device activation process, and the virtual OCF device joins the OCF network.
步骤三、桥接设备在vodlist资源中增加已激活的虚拟OCF设备信息。Step 3: The bridge device adds the activated virtual OCF device information to the vodlist resource.
步骤四、客户端发送设备发现请求; Step 4. The client sends a device discovery request;
步骤五、客户端收到的响应消息中只包括在线非OCF设备对应的虚拟OCF设备信息,或响应消息包括非OCF设备对应的虚拟OCF设备信息和虚拟OCF设备连接状态信息。Step 5. The response message received by the client only includes virtual OCF device information corresponding to the online non-OCF device, or the response message includes virtual OCF device information and virtual OCF device connection status information corresponding to the non-OCF device.
在一些实施例中,连接状态信息通过非OCF设备对应的虚拟OCF设备的功能资源确定,功能资源包括资源连接状态标识信息。In some embodiments, the connection state information is determined by the functional resource of the virtual OCF device corresponding to the non-OCF device, and the functional resource includes resource connection state identification information.
具体地,虚拟OCF设备的功能资源与非OCF设备的功能模块对应,如1台非OCF设备的电视包含开关、频道调节和音量调节功能,该电视映射为虚拟OCF设备,该虚拟OCF设备支持对应该电视的功能资源为开关资源,OCF资源类型为oic.r.binarySwitch、频道调节资源,OCF资源类型为oic.r.channelChange、音量调节资源,OCF资源类型为oic.r.audio。每个功能资源都有对应的资源连接状态标识信息,资源连接状态标识信息用于描述当前功能资源是否在线,可以为在线状态或离线状态。如果一个非OCF设备对应的功能资源都为在线状态,则可判断此非OCF设备为在线状态,如果一个非OCF设备对应的功能资源都为离线状态,则可判断此非OCF设备为离线状态。从而根据虚拟OCF设备的功能资源的连接状态确定连接状态信息,将连接状态信息携带在资源通知消息中返回至客户端。返回的资源通知消息可以直接包括各个功能资源和对应的资源连接状态标识信息,也可以只包括根据资源连接状态标识信息确定的在线非OCF设备对应的功能资源。Specifically, the functional resources of the virtual OCF device correspond to the functional modules of the non-OCF device. For example, a non-OCF device TV includes switch, channel adjustment, and volume adjustment functions. The TV is mapped to a virtual OCF device, and the virtual OCF device supports The function resource of the TV should be the switch resource, the OCF resource type is oic.r.binarySwitch, channel adjustment resource, the OCF resource type is oic.r.channelChange, volume adjustment resource, and the OCF resource type is oic.r.audio. Each functional resource has corresponding resource connection status identification information. The resource connection status identification information is used to describe whether the current functional resource is online, and it can be online or offline. If the functional resources corresponding to a non-OCF device are all online, it can be judged that the non-OCF device is online, and if the functional resources corresponding to a non-OCF device are all offline, it can be judged that the non-OCF device is offline. Therefore, the connection status information is determined according to the connection status of the functional resources of the virtual OCF device, and the connection status information is carried in the resource notification message and returned to the client. The returned resource notification message may directly include each function resource and the corresponding resource connection status identification information, or it may only include the function resources corresponding to the online non-OCF device determined according to the resource connection status identification information.
本实施例中,通过虚拟OCF设备的功能资源确定连接状态信息,当非OCF设备和虚拟OCF设备为多对1的映射关系,即多个非OCF设备映射为一个虚拟OCF设备时,如果部分非OCF设备的连接状态发生变化,例如部分非OCF设备断开和桥接平台的连接,桥接设备映射的虚拟OCF设备中可以不暴露不在线非OCF设备功能的资源,或者对应非OCF设备的功能资源提供连接状态信息属性。这种方 式也可以用于一个非OCF设备映射为一个虚拟OCF设备的情况。In this embodiment, the connection status information is determined by the functional resources of the virtual OCF device. When the non-OCF device and the virtual OCF device are in a many-to-one mapping relationship, that is, when multiple non-OCF devices are mapped to a virtual OCF device, if some non-OCF devices are The connection status of the OCF device changes. For example, some non-OCF devices are disconnected and the bridge platform is connected. The virtual OCF device mapped by the bridge device may not expose the resources of the offline non-OCF device function, or provide the function resources of the corresponding non-OCF device Connection status information attributes. This method can also be used when a non-OCF device is mapped to a virtual OCF device.
在一些实施例中,资源通知消息根据各个功能资源对应的资源连接状态标识信息,对离线的功能资源进行了过滤,包括在线的功能资源对应的功能资源信息。In some embodiments, the resource notification message filters offline functional resources based on the resource connection status identification information corresponding to each functional resource, including functional resource information corresponding to the online functional resources.
具体地,根据各个功能资源对应的资源连接状态标识信息,将离线状态的功能资源进行过滤,只留下在线的功能资源对应的功能资源信息,作为资源通知消息,从而只将在线状态的功能资源暴露给客户端,自动隐藏了离线状态的功能资源。Specifically, according to the resource connection status identification information corresponding to each functional resource, the offline functional resources are filtered, and only the functional resource information corresponding to the online functional resources is left as a resource notification message, so that only the online functional resources Exposed to the client, the offline function resources are automatically hidden.
在一些实施例中,连接状态信息通过在线非OCF设备对应的虚拟OCF设备的功能资源确定。In some embodiments, the connection status information is determined by the functional resources of the virtual OCF device corresponding to the online non-OCF device.
具体地,先确定在线的非OCF设备,再通过在线非OCF设备对应的虚拟OCF设备的功能资源确定连接状态信息,只将在线状态的非OCF设备对应的功能资源暴露给客户端,自动隐藏了离线状态的功能资源。Specifically, the online non-OCF device is determined first, and then the connection status information is determined through the functional resources of the virtual OCF device corresponding to the online non-OCF device, and only the functional resources corresponding to the online non-OCF device are exposed to the client, which is automatically hidden Functional resources in offline state.
图7为本申请实施例提供的一种设备间通信方法的流程图,该方法的执行主体为桥接平台,该桥接平台可以为图1中的桥接平台2,该方法涉及的是桥接平台向客户端资源通知消息,以使客户端根据资源通知消息确定非OCF设备的连接状态的过程。如图7所示,该方法包括以下步骤:Fig. 7 is a flowchart of a method for communication between devices provided by an embodiment of the application. The execution subject of the method is a bridge platform. The bridge platform may be the bridge platform 2 in Fig. 1. The method involves the bridge platform to the client Terminal resource notification message, so that the client terminal determines the connection status of the non-OCF device according to the resource notification message. As shown in Figure 7, the method includes the following steps:
S201、向客户端发送资源通知消息,资源通知消息携带连接状态信息,连接状态信息用于指示非OCF设备的连接状态,非OCF设备通过桥接平台映射为对应的虚拟OCF设备。S201. Send a resource notification message to the client. The resource notification message carries connection status information. The connection status information is used to indicate the connection status of a non-OCF device, and the non-OCF device is mapped to a corresponding virtual OCF device through the bridge platform.
本申请实施例的实现原理和有益效果可参照图2所示实施例的实现原理和有益效果,此处不再赘述。For the implementation principles and beneficial effects of the embodiments of the present application, reference may be made to the implementation principles and beneficial effects of the embodiment shown in FIG. 2, which will not be repeated here.
在其中一个实施例中,资源通知消息通过桥接设备发送,连接状态信息为桥接设备根据虚拟设备列表资源确定,虚拟设备列表资源包括虚拟OCF设备连接状态标识信息。In one of the embodiments, the resource notification message is sent through the bridge device, the connection state information is determined by the bridge device according to the virtual device list resource, and the virtual device list resource includes the virtual OCF device connection state identification information.
在其中一个实施例中,当第一非OCF设备的连接状态变化时,桥接平台中的桥接设备的虚拟设备列表资源中的第一非OCF设备对应的虚拟OCF设备连接状态标识信息更新,第一非OCF设备为非OCF设备中的至少一个设备。In one of the embodiments, when the connection status of the first non-OCF device changes, the virtual OCF device connection status identification information corresponding to the first non-OCF device in the virtual device list resource of the bridge device in the bridge platform is updated, and the first The non-OCF device is at least one of the non-OCF devices.
在其中一个实施例中,资源通知消息为桥接平台中的桥接设备的虚拟设备列表资源中增加虚拟OCF设备信息时,桥接设备发送的消息,虚拟OCF设备信息包括虚拟OCF设备连接状态标识信息。In one of the embodiments, the resource notification message is a message sent by the bridge device when virtual OCF device information is added to the virtual device list resource of the bridge device in the bridge platform. The virtual OCF device information includes virtual OCF device connection status identification information.
在其中一个实施例中,资源通知消息为桥接平台中的桥接设备的虚拟设备列表资源中虚拟OCF设备连接状态标识信息更新时,桥接设备发送的消息。In one of the embodiments, the resource notification message is a message sent by the bridge device when the virtual OCF device connection state identification information in the virtual device list resource of the bridge device in the bridge platform is updated.
在其中一个实施例中,方法还包括:通过桥接设备接收订阅请求,所述订阅请求用于指示订阅虚拟设备列表资源。In one of the embodiments, the method further includes: receiving a subscription request through the bridge device, where the subscription request is used to instruct to subscribe to the virtual device list resource.
在其中一个实施例中,资源通知消息通过桥接设备发送,连接状态信息为桥接设备的虚拟OCF设备连接状态资源确定,桥接设备的虚拟OCF设备连接状态资源包括虚拟OCF设备连接状态标识信息和虚拟OCF设备标识信息。In one of the embodiments, the resource notification message is sent through the bridge device, the connection state information is the virtual OCF device connection state resource determination of the bridge device, and the virtual OCF device connection state resource of the bridge device includes the virtual OCF device connection state identification information and the virtual OCF Device identification information.
在其中一个实施例中,当第一非OCF设备的连接状态变化时,桥接设备的虚拟OCF设备连接状态资源中的第一非OCF设备对应的虚拟OCF设备连接状态标识信息更新,第一非OCF设备为非OCF设备中的至少一个设备。In one of the embodiments, when the connection state of the first non-OCF device changes, the virtual OCF device connection state identification information corresponding to the first non-OCF device in the virtual OCF device connection state resource of the bridge device is updated, and the first non-OCF device The device is at least one of the non-OCF devices.
在其中一个实施例中,资源通知消息为桥接设备中虚拟OCF设备连接状态资源中增加虚拟OCF设备信息时,桥接设备发送的消息,虚拟OCF设备信息包括虚拟OCF设备连接状态标识信息。In one of the embodiments, the resource notification message is a message sent by the bridge device when virtual OCF device information is added to the virtual OCF device connection state resource in the bridge device, and the virtual OCF device information includes virtual OCF device connection state identification information.
在其中一个实施例中,资源通知消息为桥接设备的虚拟OCF设备连接状态资源中虚拟OCF设备连接状态标识信息更新时,桥接设备发送的消息。In one of the embodiments, the resource notification message is a message sent by the bridge device when the connection state identification information of the virtual OCF device in the virtual OCF device connection state resource of the bridge device is updated.
在其中一个实施例中,方法还包括:通过桥接设备接收订阅请求,所述订阅请求用于指示订阅所述桥接设备的虚拟OCF设备连接状态资源。In one of the embodiments, the method further includes: receiving a subscription request through a bridge device, the subscription request being used to indicate a subscription to the virtual OCF device connection state resource of the bridge device.
在其中一个实施例中,资源通知消息通过虚拟OCF设备发送,所述连接状态信息为所述虚拟OCF设备的虚拟OCF设备连接状态资源确定,所述虚拟OCF设备的虚拟OCF设备连接状态资源包括虚拟OCF设备连接状态标识信息和虚拟OCF设备标识信息。In one of the embodiments, the resource notification message is sent through a virtual OCF device, the connection state information is the determination of the virtual OCF device connection state resource of the virtual OCF device, and the virtual OCF device connection state resource of the virtual OCF device includes a virtual OCF device. OCF device connection status identification information and virtual OCF device identification information.
在其中一个实施例中,虚拟OCF设备连接状态资源还包括以下信息中的至少一种信息:虚拟OCF设备连接状态资源的类型信息;虚拟OCF设备连接状态资源的接口信息。In one of the embodiments, the virtual OCF device connection state resource further includes at least one of the following information: type information of the virtual OCF device connection state resource; and interface information of the virtual OCF device connection state resource.
在其中一个实施例中,当第一非OCF设备的连接状态变化时,第一非OCF设备对应的虚拟OCF设备的虚拟OCF设备连接状态资源中的虚拟OCF设备连接状态标识信息更新,第一非OCF设备为所述非OCF设备中的至少一个设备。In one of the embodiments, when the connection state of the first non-OCF device changes, the virtual OCF device connection state identification information in the virtual OCF device connection state resource of the virtual OCF device corresponding to the first non-OCF device is updated, and the first non-OCF device The OCF device is at least one of the non-OCF devices.
在其中一个实施例中,资源通知消息为增加虚拟OCF设备时,增加的虚拟OCF设备发送的消息,增加的虚拟OCF设备包括虚拟OCF设备连接状态资源,虚拟OCF设备连接状态资源包括虚拟OCF设备信息,虚拟OCF设备信息包括虚拟OCF设备连接状态标识信息。In one of the embodiments, the resource notification message is a message sent by the added virtual OCF device when a virtual OCF device is added, the added virtual OCF device includes virtual OCF device connection state resources, and the virtual OCF device connection state resource includes virtual OCF device information , The virtual OCF device information includes the connection state identification information of the virtual OCF device.
在其中一个实施例中,资源通知消息为虚拟OCF设备中的虚拟OCF设备连接状态资源的虚拟OCF 设备连接状态标识信息更新时,虚拟OCF设备发送的消息。In one of the embodiments, the resource notification message is a message sent by the virtual OCF device when the virtual OCF device connection state identification information of the virtual OCF device connection state resource in the virtual OCF device is updated.
在其中一个实施例中,方法还包括:通过虚拟OCF设备或桥接设备接收订阅请求,订阅请求用于指示订阅虚拟OCF设备的虚拟OCF设备连接状态资源。In one of the embodiments, the method further includes: receiving a subscription request through a virtual OCF device or a bridge device, and the subscription request is used to instruct the virtual OCF device connection state resource of the virtual OCF device to be subscribed.
在其中一个实施例中,订阅请求包括目标虚拟OCF设备标识信息。In one of the embodiments, the subscription request includes identification information of the target virtual OCF device.
在其中一个实施例中,虚拟OCF设备信息为被激活的虚拟OCF设备对应的信息。In one of the embodiments, the virtual OCF device information is information corresponding to the activated virtual OCF device.
在其中一个实施例中,资源通知消息是根据设备发现请求生成的响应消息,响应消息用于指示在线非OCF设备对应的虚拟OCF设备信息,设备发现请求用于指示发现处于在线连接状态的虚拟OCF设备。In one of the embodiments, the resource notification message is a response message generated according to the device discovery request, the response message is used to indicate the virtual OCF device information corresponding to the online non-OCF device, and the device discovery request is used to indicate the discovery of the virtual OCF in the online connection state equipment.
在其中一个实施例中,资源通知消息是根据设备发现请求生成的响应消息,响应消息包括非OCF设备对应的虚拟OCF设备信息和虚拟OCF设备连接状态信息,设备发现请求用于指示发现虚拟OCF设备。In one of the embodiments, the resource notification message is a response message generated according to the device discovery request. The response message includes virtual OCF device information and virtual OCF device connection status information corresponding to the non-OCF device. The device discovery request is used to indicate the discovery of the virtual OCF device. .
在其中一个实施例中,方法还包括:接收设备发现请求,设备发现请求用于指示发现虚拟OCF设备或者发现处于在线连接状态的虚拟OCF设备。In one of the embodiments, the method further includes: receiving a device discovery request, where the device discovery request is used to instruct to discover a virtual OCF device or to discover a virtual OCF device in an online connection state.
在其中一个实施例中,设备发现请求为以下请求中的至少一种:通过OCF网络接收的多播设备发现请求;通过桥接设备接收的单播设备发现请求;通过虚拟OCF设备接收的单播设备发现请求。In one of the embodiments, the device discovery request is at least one of the following requests: a multicast device discovery request received through an OCF network; a unicast device discovery request received through a bridge device; a unicast device received through a virtual OCF device Discovery request.
在其中一个实施例中,连接状态信息通过非OCF设备对应的虚拟OCF设备的功能资源确定,功能资源包括资源连接状态标识信息。In one of the embodiments, the connection state information is determined by the functional resource of the virtual OCF device corresponding to the non-OCF device, and the functional resource includes resource connection state identification information.
在其中一个实施例中,资源通知消息根据各个功能资源对应的资源连接状态标识信息,对离线的功能资源进行了过滤,包括在线的功能资源对应的功能资源信息。In one of the embodiments, the resource notification message filters offline functional resources based on the resource connection status identification information corresponding to each functional resource, including functional resource information corresponding to the online functional resources.
在其中一个实施例中,连接状态信息通过在线非OCF设备对应的虚拟OCF设备的功能资源确定。In one of the embodiments, the connection status information is determined by the functional resources of the virtual OCF device corresponding to the online non-OCF device.
上述桥接平台的各实施例以及各种的可能实现方式,以桥接平台为执行主体,具体的方法以及与客户端、非OCF设备的交互过程,可以参照上述实施例的描述,此处不再赘述。The embodiments and various possible implementations of the above-mentioned bridge platform are executed with the bridge platform as the main body of execution. For specific methods and interaction processes with clients and non-OCF devices, please refer to the description of the above-mentioned embodiments, which will not be repeated here. .
图8为本申请实施例提供的一种设备间通信方法的流程图,该方法的执行主体为非OCF设备,该非OCF设备可以为图1中的非OCF设备3或4,该方法涉及的是非OCF设备向桥接平台响应连接信息,连接信息用于指示桥接平台向客户端资源通知消息,以使客户端根据资源通知消息确定非OCF设备的连接状态的过程。如图7所示,该方法包括以下步骤:FIG. 8 is a flowchart of a method for communication between devices provided by an embodiment of the application. The method is executed by a non-OCF device, and the non-OCF device may be the non-OCF device 3 or 4 in FIG. 1, and the method involves It is a process in which the non-OCF device responds to the bridge platform with connection information, and the connection information is used to instruct the bridge platform to notify the client resource so that the client can determine the connection status of the non-OCF device according to the resource notification message. As shown in Figure 7, the method includes the following steps:
S301、向桥接平台响应连接信息,连接信息用于指示所述桥接平台向客户端发送资源通知消息,所述资源通知消息携带连接状态信息,连接状态信息用于指示非OCF设备的连接状态,非OCF设备通过所述桥接平台映射为对应的虚拟OCF设备。S301. Respond to the bridge platform with connection information, where the connection information is used to instruct the bridge platform to send a resource notification message to the client. The resource notification message carries connection status information. The connection status information is used to indicate the connection status of the non-OCF device. The OCF device is mapped to a corresponding virtual OCF device through the bridge platform.
具体地,连接信息包括非OCF设备首次接入桥接平台生成的连接信息,也包括接入桥接平台后,接收桥接平台的连接状态检测数据,根据连接状态检测数据向桥接平台返回响应信息,如果在线,则正常返回响应,如果离线,则无法进行响应。从而桥接平台可检测到非OCF设备的连接状态。Specifically, the connection information includes the connection information generated when a non-OCF device accesses the bridge platform for the first time, and also includes the connection status detection data received by the bridge platform after accessing the bridge platform, and the response information is returned to the bridge platform based on the connection status detection data. , The response is returned normally, if it is offline, the response cannot be made. Thus, the bridge platform can detect the connection status of non-OCF devices.
本申请实施例的实现原理和有益效果可参照图2所示实施例的实现原理和有益效果,此处不再赘述。For the implementation principles and beneficial effects of the embodiments of the present application, reference may be made to the implementation principles and beneficial effects of the embodiment shown in FIG. 2, which will not be repeated here.
在其中一个实施例中,资源通知消息为所述桥接平台中的桥接设备发送,连接状态信息为所述桥接设备根据虚拟设备列表资源确定,虚拟设备列表资源包括虚拟OCF设备连接状态标识信息。In one of the embodiments, the resource notification message is sent by the bridge device in the bridge platform, the connection status information is determined by the bridge device according to the virtual device list resource, and the virtual device list resource includes virtual OCF device connection status identification information.
在其中一个实施例中,当与所述桥接平台的连接状态变化时,所述桥接平台中的桥接设备的虚拟设备列表资源中对应的虚拟OCF设备连接状态标识信息更新。In one of the embodiments, when the connection status with the bridge platform changes, the corresponding virtual OCF device connection status identification information in the virtual device list resource of the bridge device in the bridge platform is updated.
在其中一个实施例中,资源通知消息为所述桥接平台中的桥接设备的虚拟设备列表资源中增加虚拟OCF设备信息时,桥接设备发送的消息,虚拟OCF设备信息包括虚拟OCF设备连接状态标识信息。In one of the embodiments, the resource notification message is a message sent by the bridge device when virtual OCF device information is added to the virtual device list resource of the bridge device in the bridge platform. The virtual OCF device information includes virtual OCF device connection status identification information .
在其中一个实施例中,资源通知消息为所述桥接平台中的桥接设备的虚拟设备列表资源中虚拟OCF设备连接状态标识信息更新时,桥接设备发送的消息。In one of the embodiments, the resource notification message is a message sent by the bridge device when the virtual OCF device connection status identification information in the virtual device list resource of the bridge device in the bridge platform is updated.
在其中一个实施例中,资源通知消息为桥接平台中的桥接设备发送,连接状态信息为桥接设备的虚拟OCF设备连接状态资源确定,桥接设备的虚拟OCF设备连接状态资源包括虚拟OCF设备连接状态标识信息和虚拟OCF设备标识信息。In one of the embodiments, the resource notification message is sent by the bridge device in the bridge platform, the connection state information is the virtual OCF device connection state resource determination of the bridge device, and the virtual OCF device connection state resource of the bridge device includes the virtual OCF device connection state identifier Information and virtual OCF device identification information.
在其中一个实施例中,当与桥接平台的连接状态变化时,桥接平台中的桥接设备的虚拟OCF设备连接状态资源中对应的虚拟OCF设备连接状态标识信息更新。In one of the embodiments, when the connection status with the bridge platform changes, the corresponding virtual OCF device connection status identification information in the virtual OCF device connection status resource of the bridge device in the bridge platform is updated.
在其中一个实施例中,资源通知消息为桥接平台中的桥接设备中虚拟OCF设备连接状态资源中增加虚拟OCF设备信息时,桥接设备发送的消息,虚拟OCF设备信息包括虚拟OCF设备连接状态标识信息。In one of the embodiments, the resource notification message is a message sent by the bridge device when virtual OCF device information is added to the virtual OCF device connection state resource of the bridge device in the bridge platform. The virtual OCF device information includes the virtual OCF device connection state identification information .
在其中一个实施例中,资源通知消息为桥接平台中的桥接设备的虚拟OCF设备连接状态资源中虚拟OCF设备连接状态标识信息更新时,桥接设备发送的消息。In one of the embodiments, the resource notification message is a message sent by the bridge device when the virtual OCF device connection state identification information in the virtual OCF device connection state resource of the bridge device in the bridge platform is updated.
在其中一个实施例中,资源通知消息为所述桥接平台中的虚拟OCF设备发送,连接状态信息为虚拟OCF设备的虚拟OCF设备连接状态资源确定,虚拟OCF设备的虚拟OCF设备连接状态资源包括虚拟OCF设备连接状态标识信息和虚拟OCF设备标识信息。In one of the embodiments, the resource notification message is sent by the virtual OCF device in the bridge platform, the connection state information is the virtual OCF device connection state resource determination of the virtual OCF device, and the virtual OCF device connection state resource of the virtual OCF device includes virtual OCF device connection status identification information and virtual OCF device identification information.
在其中一个实施例中,虚拟OCF设备连接状态资源还包括以下信息中的至少一种信息:In one of the embodiments, the virtual OCF device connection state resource further includes at least one of the following information:
虚拟OCF设备连接状态资源的类型信息;Type information of the virtual OCF device connection state resource;
虚拟OCF设备连接状态资源的接口信息。Interface information of the virtual OCF device connection status resource.
在其中一个实施例中,当与桥接平台的连接状态变化时,对应的虚拟OCF设备的虚拟OCF设备连接状态资源中的虚拟OCF设备连接状态标识信息更新。In one of the embodiments, when the connection state with the bridge platform changes, the virtual OCF device connection state identification information in the virtual OCF device connection state resource of the corresponding virtual OCF device is updated.
在其中一个实施例中,资源通知消息为桥接平台中增加虚拟OCF设备时,增加的虚拟OCF设备发送的消息,增加的虚拟OCF设备包括虚拟OCF设备连接状态资源,虚拟OCF设备连接状态资源包括虚拟OCF设备信息,虚拟OCF设备信息包括虚拟OCF设备连接状态标识信息。In one of the embodiments, the resource notification message is a message sent by the added virtual OCF device when a virtual OCF device is added to the bridge platform. The added virtual OCF device includes a virtual OCF device connection state resource, and the virtual OCF device connection state resource includes a virtual OCF device. OCF device information, virtual OCF device information includes virtual OCF device connection status identification information.
在其中一个实施例中,资源通知消息为虚拟OCF设备中的虚拟OCF设备连接状态资源的虚拟OCF设备连接状态标识信息更新时,虚拟OCF设备发送的消息。In one of the embodiments, the resource notification message is a message sent by the virtual OCF device when the virtual OCF device connection state identification information of the virtual OCF device connection state resource in the virtual OCF device is updated.
在其中一个实施例中,虚拟OCF设备信息为被激活的虚拟OCF设备对应的信息。In one of the embodiments, the virtual OCF device information is information corresponding to the activated virtual OCF device.
在其中一个实施例中,资源通知消息是根据设备发现请求生成的响应消息,响应消息用于指示在线非OCF设备对应的虚拟OCF设备信息,设备发现请求用于指示发现处于在线连接状态的虚拟OCF设备。In one of the embodiments, the resource notification message is a response message generated according to the device discovery request, the response message is used to indicate the virtual OCF device information corresponding to the online non-OCF device, and the device discovery request is used to indicate the discovery of the virtual OCF in the online connection state equipment.
在其中一个实施例中,资源通知消息是根据设备发现请求生成的响应消息,响应消息包括非OCF设备对应的虚拟OCF设备信息和虚拟OCF设备连接状态信息,设备发现请求用于指示发现虚拟OCF设备。In one of the embodiments, the resource notification message is a response message generated according to the device discovery request. The response message includes virtual OCF device information and virtual OCF device connection status information corresponding to the non-OCF device. The device discovery request is used to indicate the discovery of the virtual OCF device. .
在其中一个实施例中,连接状态信息通过对应的虚拟OCF设备的功能资源确定,功能资源包括资源连接状态标识信息。In one of the embodiments, the connection state information is determined by the functional resource of the corresponding virtual OCF device, and the functional resource includes resource connection state identification information.
在其中一个实施例中,资源通知消息根据各个功能资源对应的资源连接状态标识信息,对离线的功能资源进行了过滤,包括在线的功能资源对应的功能资源信息。In one of the embodiments, the resource notification message filters offline functional resources based on the resource connection status identification information corresponding to each functional resource, including functional resource information corresponding to the online functional resources.
在其中一个实施例中,连接状态信息通过在线非OCF设备对应的虚拟OCF设备的功能资源确定。In one of the embodiments, the connection status information is determined by the functional resources of the virtual OCF device corresponding to the online non-OCF device.
上述非OCF设备的各实施例以及各种的可能实现方式,以非OCF设备为执行主体,具体的方法以及与桥接平台、客户端的交互过程,可以参照上述实施例的描述,此处不再赘述。The various embodiments of the above non-OCF device and various possible implementation methods, with the non-OCF device as the execution subject, the specific method and the interaction process with the bridge platform and the client can refer to the description of the above embodiment, which will not be repeated here. .
图9为本申请实施例提供的一种设备间通信装置的框图,如图8所示,该装置包括接收模块11。FIG. 9 is a block diagram of an apparatus for communication between devices according to an embodiment of the application. As shown in FIG. 8, the apparatus includes a receiving module 11.
接收模块11,用于获取桥接平台发送的资源通知消息,资源通知消息携带连接状态信息,连接状态信息用于指示异构设备的连接状态。The receiving module 11 is configured to obtain a resource notification message sent by the bridge platform, the resource notification message carries connection status information, and the connection status information is used to indicate the connection status of heterogeneous devices.
图10为本申请实施例提供的一种设备间通信装置的框图,如图9所示,该装置包括发送模块21。FIG. 10 is a block diagram of an inter-device communication device provided by an embodiment of the application. As shown in FIG. 9, the device includes a sending module 21.
发送模块21,用于向客户端发送资源通知消息,所述资源通知消息携带连接状态信息,所述连接状态信息用于指示非OCF设备的连接状态,所述非OCF设备通过所述桥接平台映射为对应的虚拟OCF设备。The sending module 21 is configured to send a resource notification message to the client, the resource notification message carries connection status information, and the connection status information is used to indicate the connection status of a non-OCF device, which is mapped by the bridge platform It is the corresponding virtual OCF device.
图11为本申请实施例提供的一种设备间通信装置的框图,如图11所示,该装置包括响应模块31。FIG. 11 is a block diagram of an inter-device communication device provided by an embodiment of the application. As shown in FIG. 11, the device includes a response module 31.
响应模块31,用于向桥接平台响应连接信息,连接信息用于指示桥接平台向客户端发送资源通知消息,资源通知消息携带连接状态信息,连接状态信息用于指示非OCF设备的连接状态,非OCF设备通过桥接平台映射为对应的虚拟OCF设备。The response module 31 is used to respond to the bridge platform with connection information. The connection information is used to instruct the bridge platform to send a resource notification message to the client. The resource notification message carries connection status information. The connection status information is used to indicate the connection status of non-OCF devices. The OCF device is mapped to the corresponding virtual OCF device through the bridge platform.
关于设备间通信装置的具体限定可以参见上文中对于设备间通信方法的限定,在此不再赘述。上述设备间通信装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。For the specific limitation on the communication device between devices, please refer to the above limitation on the communication method between devices, which will not be repeated here. Each module in the above-mentioned inter-device communication device may be implemented in whole or in part by software, hardware, and a combination thereof. The above-mentioned modules may be embedded in the form of hardware or independent of the processor in the computer equipment, or may be stored in the memory of the computer equipment in the form of software, so that the processor can call and execute the operations corresponding to the above-mentioned modules.
本申请实施例还提供一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现上述任一实施例所述方法的步骤。An embodiment of the present application further provides a computer device, including a memory and a processor, the memory stores a computer program, and the processor implements the steps of the method described in any of the foregoing embodiments when the computer program is executed by the processor.
本申请实施例还提供计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现上述任一实施例所述的方法的步骤。The embodiments of the present application also provide a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method described in any of the foregoing embodiments are implemented.
图12为一个实施例中计算机设备的内部结构示意图。该计算机设备可以是终端设备或网络设备,如图12所示,该计算机设备包括通过系统总线连接的处理器、存储器、和收发器,其中,该处理器用于提供计算和控制能力,支撑整个电子设备的运行。存储器可包括非易失性存储介质及内存储器。非易失性存储介质存储有操作系统和计算机程序。该计算机程序可被处理器所执行,以配合收发器用于实现以上各个实施例适用于终端设备或网络设备的所提供的方法。内存储器为非易失性存储介质中的操作系 统计算机可读指令提供高速缓存的运行环境。当计算机设备为终端设备时,还可以包括输入装置、显示屏,显示屏可以是液晶显示屏或者电子墨水显示屏,输入装置可以是显示屏上覆盖的触摸层,也可以是计算机设备外壳上设置的按键、轨迹球或触控板,还可以是外接的键盘、触控板或鼠标等,该计算机设备可以是手机、冰箱、洗衣机、电视、平板电脑或者个人数字助理或穿戴式设备等。当计算机设备为网络设备时,还可以包括数据库,用于存储数据,可以是服务器,桥接设备等。Fig. 12 is a schematic diagram of the internal structure of a computer device in an embodiment. The computer device can be a terminal device or a network device. As shown in Figure 12, the computer device includes a processor, a memory, and a transceiver connected via a system bus. The processor is used to provide computing and control capabilities to support the entire electronics. Operation of equipment. The memory may include a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and a computer program. The computer program may be executed by the processor to cooperate with the transceiver to implement the methods provided by the above embodiments applicable to terminal devices or network devices. The internal memory provides a cache operating environment for the operating system computer readable instructions in the non-volatile storage medium. When the computer equipment is a terminal device, it can also include an input device and a display screen. The display screen can be a liquid crystal display or an electronic ink display. The input device can be a touch layer covered on the display screen, or it can be set on the computer equipment shell. The buttons, trackballs or touchpads can also be external keyboards, touchpads or mice. The computer equipment can be mobile phones, refrigerators, washing machines, TVs, tablets or personal digital assistants or wearable devices. When the computer device is a network device, it may also include a database for storing data, which may be a server, a bridge device, etc.
本领域技术人员可以理解,图12中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Those skilled in the art can understand that the structure shown in FIG. 12 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may Including more or fewer parts than shown in the figure, or combining some parts, or having a different arrangement of parts.
在一个实施例中,如图13所示,提供了一种网络设备,包括:处理器、存储器和收发器,处理器,存储器和收发器通过内部连接通路相互通信;其中,存储器,用于存储程序代码;处理器,用于调用存储器中存储的程序代码,以配合收发器来实现以上各个实施例中适用于网络设备的所提供的方法。In one embodiment, as shown in FIG. 13, a network device is provided, including: a processor, a memory, and a transceiver. The processor, the memory and the transceiver communicate with each other through an internal connection path; wherein the memory is used for storage Program code; the processor is used to call the program code stored in the memory to cooperate with the transceiver to implement the methods provided in the above embodiments that are applicable to network devices.
在一个实施例中,如图14所示,提供了一种终端设备,包括:处理器、存储器和收发器,处理器,所述存储器和所述收发器通过内部连接通路相互通信;其中,存储器,用于存储程序代码;处理器,用于调用存储器中存储的程序代码,以配合收发器来实现以上各个实施例中适用于终端设备的所提供的方法。In one embodiment, as shown in FIG. 14, a terminal device is provided, including: a processor, a memory, and a transceiver, the processor, the memory and the transceiver communicate with each other through an internal connection path; wherein, the memory , Is used to store program code; the processor is used to call the program code stored in the memory to cooperate with the transceiver to implement the methods provided in the above embodiments applicable to the terminal device.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage. In the medium, when the computer program is executed, it may include the processes of the above-mentioned method embodiments. Wherein, any reference to memory, storage, database, or other media used in the embodiments provided in this application may include non-volatile and/or volatile memory. Non-volatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not a limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Channel (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be It is considered as the range described in this specification. The above-mentioned embodiments only express several implementation manners of the present application, and the description is relatively specific and detailed, but it should not be understood as a limitation on the scope of the invention patent. It should be pointed out that for those of ordinary skill in the art, without departing from the concept of this application, several modifications and improvements can be made, and these all fall within the protection scope of this application. Therefore, the scope of protection of the patent of this application shall be subject to the appended claims.

Claims (79)

  1. 一种设备间通信方法,应用于客户端,其特征在于,所述方法包括:An inter-device communication method, applied to a client terminal, characterized in that the method includes:
    获取桥接平台发送的资源通知消息,所述资源通知消息携带连接状态信息,所述连接状态信息用于指示非OCF设备的连接状态,所述非OCF设备通过所述桥接平台映射为对应的虚拟OCF设备。Acquire a resource notification message sent by the bridge platform, the resource notification message carries connection status information, the connection status information is used to indicate the connection status of a non-OCF device, and the non-OCF device is mapped to a corresponding virtual OCF through the bridge platform equipment.
  2. 根据权利要求1所述的方法,其特征在于,所述资源通知消息为所述桥接平台中的桥接设备发送,所述连接状态信息为所述桥接设备根据虚拟设备列表资源确定,所述虚拟设备列表资源包括虚拟OCF设备连接状态标识信息。The method according to claim 1, wherein the resource notification message is sent by a bridge device in the bridge platform, and the connection state information is determined by the bridge device according to a virtual device list resource, and the virtual device The list resource includes the connection status identification information of the virtual OCF device.
  3. 根据权利要求1或2所述的方法,其特征在于,当第一非OCF设备的连接状态变化时,所述桥接平台中的桥接设备的虚拟设备列表资源中的第一非OCF设备对应的虚拟OCF设备连接状态标识信息更新,所述第一非OCF设备为所述非OCF设备中的至少一个设备。The method according to claim 1 or 2, wherein when the connection state of the first non-OCF device changes, the virtual device corresponding to the first non-OCF device in the virtual device list resource of the bridge device in the bridge platform The OCF device connection status identification information is updated, and the first non-OCF device is at least one of the non-OCF devices.
  4. 根据权利要求1或2所述的方法,其特征在于,所述资源通知消息为所述桥接平台中的桥接设备的虚拟设备列表资源中增加虚拟OCF设备信息时,所述桥接设备发送的消息,所述虚拟OCF设备信息包括所述虚拟OCF设备连接状态标识信息。The method according to claim 1 or 2, wherein the resource notification message is a message sent by the bridge device when virtual OCF device information is added to the virtual device list resource of the bridge device in the bridge platform, The virtual OCF device information includes the connection state identification information of the virtual OCF device.
  5. 根据权利要求1或2所述的方法,其特征在于,所述资源通知消息为所述桥接平台中的桥接设备的虚拟设备列表资源中虚拟OCF设备连接状态标识信息更新时,所述桥接设备发送的消息。The method according to claim 1 or 2, wherein the resource notification message is sent by the bridge device when the virtual OCF device connection status identification information in the virtual device list resource of the bridge device in the bridge platform is updated News.
  6. 根据权利要求1或2所述的方法,其特征在于,所述方法还包括:The method according to claim 1 or 2, wherein the method further comprises:
    向所述桥接平台中的桥接设备发送订阅请求,所述订阅请求用于指示订阅虚拟设备列表资源。Send a subscription request to the bridge device in the bridge platform, where the subscription request is used to instruct to subscribe to the virtual device list resource.
  7. 根据权利要求1所述的方法,其特征在于,所述资源通知消息为所述桥接平台中的桥接设备发送,所述连接状态信息为所述桥接设备的虚拟OCF设备连接状态资源确定,所述桥接设备的虚拟OCF设备连接状态资源包括虚拟OCF设备连接状态标识信息和虚拟OCF设备标识信息。The method according to claim 1, wherein the resource notification message is sent by a bridge device in the bridge platform, the connection state information is a virtual OCF device connection state resource determination of the bridge device, and the The virtual OCF device connection state resource of the bridge device includes virtual OCF device connection state identification information and virtual OCF device identification information.
  8. 根据权利要求1或7所述的方法,其特征在于,当第一非OCF设备的连接状态变化时,所述桥接平台中的桥接设备的虚拟OCF设备连接状态资源中的第一非OCF设备对应的虚拟OCF设备连接状态标识信息更新,所述第一非OCF设备为所述非OCF设备中的至少一个设备。The method according to claim 1 or 7, wherein when the connection state of the first non-OCF device changes, the virtual OCF device connection state resource of the bridge device in the bridge platform corresponds to the first non-OCF device The connection state identification information of the virtual OCF device is updated, and the first non-OCF device is at least one of the non-OCF devices.
  9. 根据权利要求1或7所述的方法,其特征在于,所述资源通知消息为所述桥接平台中的桥接设备中虚拟OCF设备连接状态资源中增加虚拟OCF设备信息时,所述桥接设备发送的消息,所述虚拟OCF设备信息包括虚拟OCF设备连接状态标识信息。The method according to claim 1 or 7, wherein the resource notification message is sent by the bridge device when virtual OCF device information is added to the virtual OCF device connection state resource of the bridge device in the bridge platform Message, the virtual OCF device information includes virtual OCF device connection state identification information.
  10. 根据权利要求1或7所述的方法,其特征在于,所述资源通知消息为所述桥接平台中的桥接设备的虚拟OCF设备连接状态资源中虚拟OCF设备连接状态标识信息更新时,所述桥接设备发送的消息。The method according to claim 1 or 7, wherein the resource notification message is that when the virtual OCF device connection state identification information in the virtual OCF device connection state resource of the bridge device in the bridge platform is updated, the bridge The message sent by the device.
  11. 根据权利要求1或7所述的方法,其特征在于,所述方法还包括:The method according to claim 1 or 7, wherein the method further comprises:
    向所述桥接平台中的桥接设备发送订阅请求,所述订阅请求用于指示订阅所述桥接设备的虚拟OCF设备连接状态资源。Send a subscription request to the bridge device in the bridge platform, where the subscription request is used to instruct to subscribe to the virtual OCF device connection state resource of the bridge device.
  12. 根据权利要求1所述的方法,其特征在于,所述资源通知消息为所述桥接平台中的虚拟OCF设备发送,所述连接状态信息为所述虚拟OCF设备的虚拟OCF设备连接状态资源确定,所述虚拟OCF设备的虚拟OCF设备连接状态资源包括虚拟OCF设备连接状态标识信息和虚拟OCF设备标识信息。The method according to claim 1, wherein the resource notification message is sent by a virtual OCF device in the bridge platform, and the connection state information is a virtual OCF device connection state resource determination of the virtual OCF device, The virtual OCF device connection state resource of the virtual OCF device includes virtual OCF device connection state identification information and virtual OCF device identification information.
  13. 根据权利要求7和12中任一项所述的方法,其特征在于,所述虚拟OCF设备连接状态资源还包括以下信息中的至少一种信息:The method according to any one of claims 7 and 12, wherein the virtual OCF device connection state resource further includes at least one of the following information:
    虚拟OCF设备连接状态资源的类型信息;Type information of the virtual OCF device connection state resource;
    虚拟OCF设备连接状态资源的接口信息。Interface information of the virtual OCF device connection status resource.
  14. 根据权利要求1或12所述的方法,其特征在于,当第一非OCF设备的连接状态变化时,所述第一非OCF设备对应的虚拟OCF设备的虚拟OCF设备连接状态资源中的虚拟OCF设备连接状态标识信息更新,所述第一非OCF设备为所述非OCF设备中的至少一个设备。The method according to claim 1 or 12, wherein when the connection state of the first non-OCF device changes, the virtual OCF in the virtual OCF device connection state resource of the virtual OCF device corresponding to the first non-OCF device The device connection status identification information is updated, and the first non-OCF device is at least one of the non-OCF devices.
  15. 根据权利要求1或12所述的方法,其特征在于,所述资源通知消息为所述桥接平台中增加虚拟OCF设备时,所述增加的虚拟OCF设备发送的消息,所述增加的虚拟OCF设备包括虚拟OCF设备连接状态资源,所述虚拟OCF设备连接状态资源包括虚拟OCF设备信息,所述虚拟OCF设备信息包括虚拟OCF设备连接状态标识信息。The method according to claim 1 or 12, wherein the resource notification message is a message sent by the added virtual OCF device when a virtual OCF device is added to the bridge platform, and the added virtual OCF device It includes a virtual OCF device connection state resource, the virtual OCF device connection state resource includes virtual OCF device information, and the virtual OCF device information includes virtual OCF device connection state identification information.
  16. 根据权利要求1或12所述的方法,其特征在于,所述资源通知消息为所述虚拟OCF设备中的虚拟OCF设备连接状态资源的虚拟OCF设备连接状态标识信息更新时,所述虚拟OCF设备发送的消息。The method according to claim 1 or 12, wherein the resource notification message is that when the virtual OCF device connection state identification information of the virtual OCF device connection state resource in the virtual OCF device is updated, the virtual OCF device The message sent.
  17. 根据权利要求1或12所述的方法,其特征在于,所述方法还包括:The method according to claim 1 or 12, wherein the method further comprises:
    向所述虚拟OCF设备或桥接设备发送订阅请求,所述订阅请求用于指示订阅所述虚拟OCF设备的虚拟OCF设备连接状态资源。Send a subscription request to the virtual OCF device or the bridge device, where the subscription request is used to instruct to subscribe to the virtual OCF device connection state resource of the virtual OCF device.
  18. 根据权利要求6、11中任一项所述的方法,其特征在于,所述订阅请求包括目标虚拟OCF设备标识信息。The method according to any one of claims 6 and 11, wherein the subscription request includes target virtual OCF device identification information.
  19. 根据权利要求4、9、15中任一项所述的方法,其特征在于,所述虚拟OCF设备信息为被激活的虚拟OCF设备对应的信息。The method according to any one of claims 4, 9, 15, wherein the virtual OCF device information is information corresponding to an activated virtual OCF device.
  20. 根据权利要求1所述的方法,其特征在于,所述资源通知消息是根据设备发现请求生成的响应消息,所述响应消息用于指示在线非OCF设备对应的虚拟OCF设备信息,所述设备发现请求用于指示发现处于在线连接状态的虚拟OCF设备。The method according to claim 1, wherein the resource notification message is a response message generated according to a device discovery request, and the response message is used to indicate virtual OCF device information corresponding to an online non-OCF device, and the device discovery The request is used to indicate the discovery of a virtual OCF device in an online connection state.
  21. 根据权利要求1所述的方法,其特征在于,所述资源通知消息是根据设备发现请求生成的响应消息,所述响应消息包括非OCF设备对应的虚拟OCF设备信息和虚拟OCF设备连接状态信息,所述设备发现请求用于指示发现虚拟OCF设备。The method according to claim 1, wherein the resource notification message is a response message generated according to a device discovery request, and the response message includes virtual OCF device information and virtual OCF device connection status information corresponding to a non-OCF device, The device discovery request is used to instruct to discover a virtual OCF device.
  22. 根据权利要求20和21中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 20 and 21, wherein the method further comprises:
    发送所述设备发现请求,所述设备发现请求用于指示发现虚拟OCF设备或者发现处于在线连接状态的虚拟OCF设备。The device discovery request is sent, and the device discovery request is used to instruct to discover a virtual OCF device or to discover a virtual OCF device in an online connection state.
  23. 根据权利要求22所述的方法,其特征在于,所述设备发现请求为以下请求中的至少一种:The method according to claim 22, wherein the device discovery request is at least one of the following requests:
    向OCF网络发送的多播设备发现请求;Multicast device discovery request sent to the OCF network;
    向桥接设备发送的单播设备发现请求;Unicast device discovery request sent to the bridge device;
    向虚拟OCF设备发送的单播设备发现请求。Unicast device discovery request sent to the virtual OCF device.
  24. 根据权利要求1所述的方法,其特征在于,所述连接状态信息通过非OCF设备对应的虚拟OCF设备的功能资源确定,所述功能资源包括资源连接状态标识信息。The method according to claim 1, wherein the connection state information is determined by a functional resource of a virtual OCF device corresponding to a non-OCF device, and the functional resource includes resource connection state identification information.
  25. 根据权利要求24所述的方法,其特征在于,所述资源通知消息根据各个功能资源对应的资源连接状态标识信息,对离线的功能资源进行了过滤,包括在线的功能资源对应的功能资源信息。The method according to claim 24, wherein the resource notification message filters offline functional resources according to resource connection status identification information corresponding to each functional resource, including functional resource information corresponding to online functional resources.
  26. 根据权利要求1所述的方法,其特征在于,所述连接状态信息通过在线非OCF设备对应的虚拟OCF设备的功能资源确定。The method according to claim 1, wherein the connection state information is determined by the functional resources of the virtual OCF device corresponding to the online non-OCF device.
  27. 一种设备间通信方法,应用于桥接平台,其特征在于,所述方法包括:A communication method between devices, applied to a bridge platform, characterized in that the method includes:
    向客户端发送资源通知消息,所述资源通知消息携带连接状态信息,所述连接状态信息用于指示非OCF设备的连接状态,所述非OCF设备通过所述桥接平台映射为对应的虚拟OCF设备。Send a resource notification message to the client, the resource notification message carries connection status information, the connection status information is used to indicate the connection status of a non-OCF device, and the non-OCF device is mapped to a corresponding virtual OCF device through the bridge platform .
  28. [根据细则91更正 31.12.2019] 
    根据权利要求27所述的方法,其特征在于,所述资源通知消息通过桥接设备发送,所述连接状态信息为所述桥接设备根据虚拟设备列表资源确定,所述虚拟设备列表资源包括虚拟OCF设备连接状态标识信息。
    [Corrected according to Rule 91 31.12.2019]
    The method according to claim 27, wherein the resource notification message is sent through a bridge device, the connection status information is determined by the bridge device according to a virtual device list resource, and the virtual device list resource includes a virtual OCF device Connection status identification information.
  29. 根据权利要求27或28所述的方法,其特征在于,当第一非OCF设备的连接状态变化时,所述桥接平台中的桥接设备的虚拟设备列表资源中的第一非OCF设备对应的虚拟OCF设备连接状态标识信息更新,所述第一非OCF设备为所述非OCF设备中的至少一个设备。The method according to claim 27 or 28, wherein when the connection state of the first non-OCF device changes, the virtual device corresponding to the first non-OCF device in the virtual device list resource of the bridge device in the bridge platform The OCF device connection status identification information is updated, and the first non-OCF device is at least one of the non-OCF devices.
  30. 根据权利要求27或28所述的方法,其特征在于,所述资源通知消息为所述桥接平台中的桥接设备的虚拟设备列表资源中增加虚拟OCF设备信息时,所述桥接设备发送的消息,所述虚拟OCF设备信息包括所述虚拟OCF设备连接状态标识信息。The method according to claim 27 or 28, wherein the resource notification message is a message sent by the bridge device when virtual OCF device information is added to the virtual device list resource of the bridge device in the bridge platform, The virtual OCF device information includes the connection state identification information of the virtual OCF device.
  31. 根据权利要求27或28所述的方法,其特征在于,所述资源通知消息为所述桥接平台中的桥接设备的虚拟设备列表资源中虚拟OCF设备连接状态标识信息更新时,所述桥接设备发送的消息。The method according to claim 27 or 28, wherein the resource notification message is sent by the bridge device when the virtual OCF device connection status identification information in the virtual device list resource of the bridge device in the bridge platform is updated News.
  32. 根据权利要求27或28所述的方法,其特征在于,所述方法还包括:The method according to claim 27 or 28, wherein the method further comprises:
    通过桥接设备接收订阅请求,所述订阅请求用于指示订阅虚拟设备列表资源。A subscription request is received through the bridge device, where the subscription request is used to instruct to subscribe to the virtual device list resource.
  33. 根据权利要求27所述的方法,其特征在于,所述资源通知消息通过桥接设备发送,所述连接状态信息为所述桥接设备的虚拟OCF设备连接状态资源确定,所述桥接设备的虚拟OCF设备连接状态资源包括虚拟OCF设备连接状态标识信息和虚拟OCF设备标识信息。The method according to claim 27, wherein the resource notification message is sent through a bridge device, the connection state information is the virtual OCF device connection state resource determination of the bridge device, and the virtual OCF device of the bridge device The connection state resource includes virtual OCF device connection state identification information and virtual OCF device identification information.
  34. 根据权利要求27或33所述的方法,其特征在于,当第一非OCF设备的连接状态变化时,桥接设备的虚拟OCF设备连接状态资源中的第一非OCF设备对应的虚拟OCF设备连接状态标识信息更新,所述第一非OCF设备为所述非OCF设备中的至少一个设备。The method according to claim 27 or 33, wherein when the connection status of the first non-OCF device changes, the connection status of the virtual OCF device corresponding to the first non-OCF device in the virtual OCF device connection status resource of the bridge device The identification information is updated, and the first non-OCF device is at least one of the non-OCF devices.
  35. 根据权利要求27或33所述的方法,其特征在于,所述资源通知消息为桥接设备中虚拟OCF设备连接状态资源中增加虚拟OCF设备信息时,所述桥接设备发送的消息,所述虚拟OCF设备信息包括虚拟OCF设备连接状态标识信息。The method according to claim 27 or 33, wherein the resource notification message is a message sent by the bridge device when the virtual OCF device information is added to the virtual OCF device connection state resource in the bridge device, the virtual OCF device The device information includes the connection state identification information of the virtual OCF device.
  36. 根据权利要求27或33所述的方法,其特征在于,所述资源通知消息为桥接设备的虚拟OCF设备连接状态资源中虚拟OCF设备连接状态标识信息更新时,所述桥接设备发送的消息。The method according to claim 27 or 33, wherein the resource notification message is a message sent by the bridge device when the virtual OCF device connection state identification information in the virtual OCF device connection state resource of the bridge device is updated.
  37. 根据权利要求27或33所述的方法,其特征在于,所述方法还包括:The method according to claim 27 or 33, wherein the method further comprises:
    通过桥接设备接收订阅请求,所述订阅请求用于指示订阅所述桥接设备的虚拟OCF设备连接状态资源。A subscription request is received through the bridge device, where the subscription request is used to instruct to subscribe to the virtual OCF device connection state resource of the bridge device.
  38. 根据权利要求27所述的方法,其特征在于,所述资源通知消息通过虚拟OCF设备发送,所述连接状态信息为所述虚拟OCF设备的虚拟OCF设备连接状态资源确定,所述虚拟OCF设备的虚拟OCF设备连接状态资源包括虚拟OCF设备连接状态标识信息和虚拟OCF设备标识信息。The method according to claim 27, wherein the resource notification message is sent through a virtual OCF device, the connection state information is the virtual OCF device connection state resource determination of the virtual OCF device, and the virtual OCF device The virtual OCF device connection state resource includes virtual OCF device connection state identification information and virtual OCF device identification information.
  39. 根据权利要求33和38中任一项所述的方法,其特征在于,所述虚拟OCF设备连接状态资源还包括以下信息中的至少一种信息:The method according to any one of claims 33 and 38, wherein the virtual OCF device connection state resource further includes at least one of the following information:
    虚拟OCF设备连接状态资源的类型信息;Type information of the virtual OCF device connection state resource;
    虚拟OCF设备连接状态资源的接口信息。Interface information of the virtual OCF device connection status resource.
  40. 根据权利要求27或38所述的方法,其特征在于,当第一非OCF设备的连接状态变化时,所述第一非OCF设备对应的虚拟OCF设备的虚拟OCF设备连接状态资源中的虚拟OCF设备连接状态标识信息更新,所述第一非OCF设备为所述非OCF设备中的至少一个设备。The method according to claim 27 or 38, wherein when the connection state of the first non-OCF device changes, the virtual OCF in the virtual OCF device connection state resource of the virtual OCF device corresponding to the first non-OCF device The device connection status identification information is updated, and the first non-OCF device is at least one of the non-OCF devices.
  41. 根据权利要求27或38所述的方法,其特征在于,所述资源通知消息为增加虚拟OCF设备时,所述增加的虚拟OCF设备发送的消息,所述增加的虚拟OCF设备包括虚拟OCF设备连接状态资源,所述虚拟OCF设备连接状态资源包括虚拟OCF设备信息,所述虚拟OCF设备信息包括虚拟OCF设备连接状态标识信息。The method according to claim 27 or 38, wherein the resource notification message is a message sent by the added virtual OCF device when a virtual OCF device is added, and the added virtual OCF device includes a virtual OCF device connection State resource, the virtual OCF device connection state resource includes virtual OCF device information, and the virtual OCF device information includes virtual OCF device connection state identification information.
  42. 根据权利要求27或38所述的方法,其特征在于,所述资源通知消息为所述虚拟OCF设备中的虚拟OCF设备连接状态资源的虚拟OCF设备连接状态标识信息更新时,所述虚拟OCF设备发送的消息。The method according to claim 27 or 38, wherein the resource notification message is that when the virtual OCF device connection state identification information of the virtual OCF device connection state resource in the virtual OCF device is updated, the virtual OCF device The message sent.
  43. 根据权利要求27或38所述的方法,其特征在于,所述方法还包括:The method according to claim 27 or 38, wherein the method further comprises:
    通过所述虚拟OCF设备或桥接设备接收订阅请求,所述订阅请求用于指示订阅所述虚拟OCF设备的虚拟OCF设备连接状态资源。A subscription request is received through the virtual OCF device or the bridge device, where the subscription request is used to instruct the virtual OCF device connection state resource of the virtual OCF device to be subscribed.
  44. 根据权利要求32、37中任一项所述的方法,其特征在于,所述订阅请求包括目标虚拟OCF设备标识信息。The method according to any one of claims 32 and 37, wherein the subscription request includes target virtual OCF device identification information.
  45. 根据权利要求30、35、41中任一项所述的方法,其特征在于,所述虚拟OCF设备信息为被激活的虚拟OCF设备对应的信息。The method according to any one of claims 30, 35, 41, wherein the virtual OCF device information is information corresponding to an activated virtual OCF device.
  46. 根据权利要求27所述的方法,其特征在于,所述资源通知消息是根据设备发现请求生成的响应消息,所述响应消息用于指示在线非OCF设备对应的虚拟OCF设备信息,所述设备发现请求用于指示发现处于在线连接状态的虚拟OCF设备。The method according to claim 27, wherein the resource notification message is a response message generated according to a device discovery request, and the response message is used to indicate virtual OCF device information corresponding to an online non-OCF device, and the device discovery The request is used to indicate the discovery of a virtual OCF device in an online connection state.
  47. 根据权利要求27所述的方法,其特征在于,所述资源通知消息是根据设备发现请求生成的响应消息,所述响应消息包括非OCF设备对应的虚拟OCF设备信息和虚拟OCF设备连接状态信息,所述设备发现请求用于指示发现虚拟OCF设备。The method according to claim 27, wherein the resource notification message is a response message generated according to a device discovery request, and the response message includes virtual OCF device information and virtual OCF device connection status information corresponding to the non-OCF device, The device discovery request is used to instruct to discover a virtual OCF device.
  48. 根据权利要求46和47中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 46 and 47, wherein the method further comprises:
    接收所述设备发现请求,所述设备发现请求用于指示发现虚拟OCF设备或者发现处于在线连接状态的虚拟OCF设备。The device discovery request is received, and the device discovery request is used to instruct to discover a virtual OCF device or to discover a virtual OCF device in an online connection state.
  49. 根据权利要求48所述的方法,其特征在于,所述设备发现请求为以下请求中的至少一种:The method according to claim 48, wherein the device discovery request is at least one of the following requests:
    通过OCF网络接收的多播设备发现请求;Multicast device discovery requests received through the OCF network;
    通过桥接设备接收的单播设备发现请求;The unicast device discovery request received through the bridge device;
    通过虚拟OCF设备接收的单播设备发现请求。The unicast device discovery request received through the virtual OCF device.
  50. 根据权利要求27所述的方法,其特征在于,所述连接状态信息通过非OCF设备对应的虚拟OCF设备的功能资源确定,所述功能资源包括资源连接状态标识信息。The method according to claim 27, wherein the connection state information is determined by a functional resource of a virtual OCF device corresponding to a non-OCF device, and the functional resource includes resource connection state identification information.
  51. 根据权利要求50所述的方法,其特征在于,所述资源通知消息根据各个功能资源对应的资源连接状态标识信息,对离线的功能资源进行了过滤,包括在线的功能资源对应的功能资源信息。The method according to claim 50, wherein the resource notification message filters offline functional resources according to the resource connection status identification information corresponding to each functional resource, including functional resource information corresponding to the online functional resources.
  52. 根据权利要求27所述的方法,其特征在于,所述连接状态信息通过在线非OCF设备对应的虚拟OCF设备的功能资源确定。The method according to claim 27, wherein the connection state information is determined by the functional resources of the virtual OCF device corresponding to the online non-OCF device.
  53. 一种设备间通信方法,应用于非OCF设备,其特征在于,所述方法包括:An inter-device communication method applied to non-OCF devices, characterized in that the method includes:
    向桥接平台响应连接信息,所述连接信息用于指示所述桥接平台向客户端发送资源通知消息,所述资源通知消息携带连接状态信息,所述连接状态信息用于指示所述非OCF设备的连接状态,所述非OCF设备通过所述桥接平台映射为对应的虚拟OCF设备。Respond to the bridge platform with connection information, where the connection information is used to instruct the bridge platform to send a resource notification message to the client, the resource notification message carries connection status information, and the connection status information is used to indicate the status of the non-OCF device In the connection state, the non-OCF device is mapped to a corresponding virtual OCF device through the bridge platform.
  54. 根据权利要求53所述的方法,其特征在于,所述资源通知消息为所述桥接平台中的桥接设备发送,所述连接状态信息为所述桥接设备根据虚拟设备列表资源确定,所述虚拟设备列表资源包括虚拟OCF设备连接状态标识信息。The method according to claim 53, wherein the resource notification message is sent by a bridge device in the bridge platform, and the connection state information is determined by the bridge device according to a virtual device list resource, and the virtual device The list resource includes the connection status identification information of the virtual OCF device.
  55. 根据权利要求53或54所述的方法,其特征在于,当与所述桥接平台的连接状态变化时,所述桥接平台中的桥接设备的虚拟设备列表资源中对应的虚拟OCF设备连接状态标识信息更新。The method according to claim 53 or 54, wherein when the connection status with the bridge platform changes, the corresponding virtual OCF device connection status identification information in the virtual device list resource of the bridge device in the bridge platform Update.
  56. 根据权利要求53或54所述的方法,其特征在于,所述资源通知消息为所述桥接平台中的桥接设备的虚拟设备列表资源中增加虚拟OCF设备信息时,所述桥接设备发送的消息,所述虚拟OCF设备信息包括所述虚拟OCF设备连接状态标识信息。The method according to claim 53 or 54, wherein the resource notification message is a message sent by the bridge device when virtual OCF device information is added to the virtual device list resource of the bridge device in the bridge platform, The virtual OCF device information includes the connection state identification information of the virtual OCF device.
  57. 根据权利要求53或54所述的方法,其特征在于,所述资源通知消息为所述桥接平台中的桥接设备的虚拟设备列表资源中虚拟OCF设备连接状态标识信息更新时,所述桥接设备发送的消息。The method according to claim 53 or 54, wherein the resource notification message is sent by the bridge device when the virtual OCF device connection status identification information in the virtual device list resource of the bridge device in the bridge platform is updated News.
  58. 根据权利要求53所述的方法,其特征在于,所述资源通知消息为所述桥接平台中的桥接设备发送,所述连接状态信息为所述桥接设备的虚拟OCF设备连接状态资源确定,所述桥接设备的虚拟OCF设备连接状态资源包括虚拟OCF设备连接状态标识信息和虚拟OCF设备标识信息。The method according to claim 53, wherein the resource notification message is sent by a bridge device in the bridge platform, the connection state information is a virtual OCF device connection state resource determination of the bridge device, and the The virtual OCF device connection state resource of the bridge device includes virtual OCF device connection state identification information and virtual OCF device identification information.
  59. 根据权利要求53或58所述的方法,其特征在于,当与所述桥接平台的连接状态变化时,所述桥接平台中的桥接设备的虚拟OCF设备连接状态资源中对应的虚拟OCF设备连接状态标识信息更新。The method according to claim 53 or 58, wherein when the connection status with the bridge platform changes, the connection status of the virtual OCF device corresponding to the virtual OCF device connection status resource of the bridge device in the bridge platform The identification information is updated.
  60. 根据权利要求53或58所述的方法,其特征在于,所述资源通知消息为所述桥接平台中的桥接设备中虚拟OCF设备连接状态资源中增加虚拟OCF设备信息时,所述桥接设备发送的消息,所述虚拟OCF设备信息包括虚拟OCF设备连接状态标识信息。The method according to claim 53 or 58, wherein the resource notification message is sent by the bridge device when virtual OCF device information is added to the virtual OCF device connection state resource of the bridge device in the bridge platform Message, the virtual OCF device information includes virtual OCF device connection state identification information.
  61. 根据权利要求53或58所述的方法,其特征在于,所述资源通知消息为所述桥接平台中的桥接设备的虚拟OCF设备连接状态资源中虚拟OCF设备连接状态标识信息更新时,所述桥接设备发送的消息。The method according to claim 53 or 58, wherein the resource notification message is that when the virtual OCF device connection state identification information in the virtual OCF device connection state resource of the bridge device in the bridge platform is updated, the bridge The message sent by the device.
  62. 根据权利要求53所述的方法,其特征在于,所述资源通知消息为所述桥接平台中的虚拟OCF设备发送,所述连接状态信息为所述虚拟OCF设备的虚拟OCF设备连接状态资源确定,所述虚拟OCF设备的虚拟OCF设备连接状态资源包括虚拟OCF设备连接状态标识信息和虚拟OCF设备标识信息。The method according to claim 53, wherein the resource notification message is sent by a virtual OCF device in the bridge platform, and the connection state information is a virtual OCF device connection state resource determination of the virtual OCF device, The virtual OCF device connection state resource of the virtual OCF device includes virtual OCF device connection state identification information and virtual OCF device identification information.
  63. 根据权利要求58或62所述的方法,其特征在于,所述虚拟OCF设备连接状态资源还包括以下信息中的至少一种信息:The method according to claim 58 or 62, wherein the virtual OCF device connection state resource further includes at least one of the following information:
    虚拟OCF设备连接状态资源的类型信息;Type information of the virtual OCF device connection state resource;
    虚拟OCF设备连接状态资源的接口信息。Interface information of the virtual OCF device connection status resource.
  64. 根据权利要求53或62所述的方法,其特征在于,当与所述桥接平台的连接状态变化时,对应的虚拟OCF设备的虚拟OCF设备连接状态资源中的虚拟OCF设备连接状态标识信息更新。The method according to claim 53 or 62, wherein when the connection state with the bridge platform changes, the virtual OCF device connection state identification information in the virtual OCF device connection state resource of the corresponding virtual OCF device is updated.
  65. 根据权利要求53或62所述的方法,其特征在于,所述资源通知消息为所述桥接平台中增加虚拟OCF设备时,所述增加的虚拟OCF设备发送的消息,所述增加的虚拟OCF设备包括虚拟OCF设备连接状态资源,所述虚拟OCF设备连接状态资源包括虚拟OCF设备信息,所述虚拟OCF设备信息包括虚拟OCF设备连接状态标识信息。The method according to claim 53 or 62, wherein the resource notification message is a message sent by the added virtual OCF device when a virtual OCF device is added to the bridge platform, and the added virtual OCF device It includes a virtual OCF device connection state resource, the virtual OCF device connection state resource includes virtual OCF device information, and the virtual OCF device information includes virtual OCF device connection state identification information.
  66. 根据权利要求53或62所述的方法,其特征在于,所述资源通知消息为所述虚拟OCF设备中的虚拟OCF设备连接状态资源的虚拟OCF设备连接状态标识信息更新时,所述虚拟OCF设备发送的消息。The method according to claim 53 or 62, wherein the resource notification message is that when the virtual OCF device connection state identification information of the virtual OCF device connection state resource in the virtual OCF device is updated, the virtual OCF device The message sent.
  67. 根据权利要求56、60、65中任一项所述的方法,其特征在于,所述虚拟OCF设备信息为被激活的虚拟OCF设备对应的信息。The method according to any one of claims 56, 60, 65, wherein the virtual OCF device information is information corresponding to an activated virtual OCF device.
  68. 根据权利要求53所述的方法,其特征在于,所述资源通知消息是根据设备发现请求生成的响应消息,所述响应消息用于指示在线非OCF设备对应的虚拟OCF设备信息,所述设备发现请求用于指示发现处于在线连接状态的虚拟OCF设备。The method according to claim 53, wherein the resource notification message is a response message generated according to a device discovery request, and the response message is used to indicate virtual OCF device information corresponding to an online non-OCF device, and the device discovery The request is used to indicate the discovery of a virtual OCF device in an online connection state.
  69. 根据权利要求53所述的方法,其特征在于,所述资源通知消息是根据设备发现请求生成的响应消息,所述响应消息包括非OCF设备对应的虚拟OCF设备信息和虚拟OCF设备连接状态信息,所述设备发现请求用于指示发现虚拟OCF设备。The method according to claim 53, wherein the resource notification message is a response message generated according to a device discovery request, and the response message includes virtual OCF device information and virtual OCF device connection status information corresponding to the non-OCF device, The device discovery request is used to instruct to discover a virtual OCF device.
  70. 根据权利要求53所述的方法,其特征在于,所述连接状态信息通过对应的虚拟OCF设备的功能资源确定,所述功能资源包括资源连接状态标识信息。The method according to claim 53, wherein the connection state information is determined by a functional resource of a corresponding virtual OCF device, and the functional resource includes resource connection state identification information.
  71. 根据权利要求70所述的方法,其特征在于,所述资源通知消息根据各个功能资源对应的资源连接状态标识信息,对离线的功能资源进行了过滤,包括在线的功能资源对应的功能资源信息。The method according to claim 70, wherein the resource notification message filters offline functional resources according to resource connection status identification information corresponding to each functional resource, including functional resource information corresponding to online functional resources.
  72. 根据权利要求53所述的方法,其特征在于,所述连接状态信息通过在线非OCF设备对应的虚拟OCF设备的功能资源确定。The method according to claim 53, wherein the connection state information is determined by the functional resources of the virtual OCF device corresponding to the online non-OCF device.
  73. 一种设备间通信装置,其特征在于,包括接收模块:An inter-device communication device, characterized in that it includes a receiving module:
    所述接收模块,用于获取桥接平台发送的资源通知消息,所述资源通知消息携带连接状态信息, 所述连接状态信息用于指示异构设备的连接状态。The receiving module is configured to obtain a resource notification message sent by a bridge platform, the resource notification message carries connection status information, and the connection status information is used to indicate the connection status of heterogeneous devices.
  74. 一种设备间通信装置,其特征在于,包括发送模块:An inter-device communication device, characterized in that it includes a sending module:
    所述发送模块,用于向客户端发送资源通知消息,所述资源通知消息携带连接状态信息,所述连接状态信息用于指示非OCF设备的连接状态,所述非OCF设备通过所述桥接平台映射为对应的虚拟OCF设备。The sending module is configured to send a resource notification message to a client, the resource notification message carries connection status information, and the connection status information is used to indicate the connection status of a non-OCF device that passes through the bridge platform Map to the corresponding virtual OCF device.
  75. 一种设备间通信装置,其特征在于,包括响应模块:An inter-device communication device, characterized in that it comprises a response module:
    所述响应模块,用于向桥接平台响应连接信息,所述连接信息用于指示所述桥接平台向客户端发送资源通知消息,所述资源通知消息携带连接状态信息,所述连接状态信息用于指示所述非OCF设备的连接状态,所述非OCF设备通过所述桥接平台映射为对应的虚拟OCF设备。The response module is configured to respond to the bridge platform with connection information, the connection information is used to instruct the bridge platform to send a resource notification message to the client, the resource notification message carries connection status information, and the connection status information is used for Indicate the connection status of the non-OCF device, and the non-OCF device is mapped to a corresponding virtual OCF device through the bridge platform.
  76. 一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,其特征在于,所述处理器执行所述计算机程序时实现权利要求1至26或27至52或52至72中任一项所述方法的步骤。A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements any one of claims 1 to 26 or 27 to 52 or 52 to 72 when the computer program is executed The steps of the method described in item.
  77. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1至26或27至52或52至72中任一项所述的方法的步骤。A computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the method of any one of claims 1 to 26 or 27 to 52 or 52 to 72 when executed by a processor A step of.
  78. 一种网络设备,包括:处理器、存储器和收发器,所述处理器,所述存储器和所述收发器通过内部连接通路相互通信;其中,A network device includes: a processor, a memory, and a transceiver. The processor, the memory and the transceiver communicate with each other through an internal connection path; wherein,
    所述存储器,用于存储程序代码;The memory is used to store program code;
    所述处理器,用于调用所述存储器中存储的程序代码,以配合所述收发器来实现根据权利要求27至52中任一项所述的方法。The processor is configured to call the program code stored in the memory to cooperate with the transceiver to implement the method according to any one of claims 27 to 52.
  79. 一种终端设备,包括:处理器、存储器和收发器,所述处理器,所述存储器和所述收发器通过内部连接通路相互通信;其中,A terminal device includes: a processor, a memory, and a transceiver. The processor, the memory and the transceiver communicate with each other through an internal connection path; wherein,
    所述存储器,用于存储程序代码;The memory is used to store program code;
    所述处理器,用于调用所述存储器中存储的程序代码,以配合所述收发器来实现根据权利要求1至26或52至72中任一项所述的方法。The processor is configured to call the program code stored in the memory to cooperate with the transceiver to implement the method according to any one of claims 1 to 26 or 52 to 72.
PCT/CN2019/130023 2019-12-30 2019-12-30 Inter-device communication method and apparatus, and storage medium WO2021134252A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201980102832.5A CN114788393A (en) 2019-12-30 2019-12-30 Inter-device communication method, apparatus, and storage medium
PCT/CN2019/130023 WO2021134252A1 (en) 2019-12-30 2019-12-30 Inter-device communication method and apparatus, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/130023 WO2021134252A1 (en) 2019-12-30 2019-12-30 Inter-device communication method and apparatus, and storage medium

Publications (1)

Publication Number Publication Date
WO2021134252A1 true WO2021134252A1 (en) 2021-07-08

Family

ID=76686053

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/130023 WO2021134252A1 (en) 2019-12-30 2019-12-30 Inter-device communication method and apparatus, and storage medium

Country Status (2)

Country Link
CN (1) CN114788393A (en)
WO (1) WO2021134252A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11882190B2 (en) * 2020-01-10 2024-01-23 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Device linkage method, rule engine device, and client device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107205055A (en) * 2017-08-01 2017-09-26 海信集团有限公司 Terminal staging method and device
WO2019060758A1 (en) * 2017-09-22 2019-03-28 Intel Corporation Device management services based on restful messaging
CN109547524A (en) * 2018-09-30 2019-03-29 青岛海尔科技有限公司 User behavior storage method, device, equipment and storage medium based on Physical Network
CN110035058A (en) * 2019-02-28 2019-07-19 Oppo广东移动通信有限公司 Resource request method, equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107205055A (en) * 2017-08-01 2017-09-26 海信集团有限公司 Terminal staging method and device
WO2019060758A1 (en) * 2017-09-22 2019-03-28 Intel Corporation Device management services based on restful messaging
CN109547524A (en) * 2018-09-30 2019-03-29 青岛海尔科技有限公司 User behavior storage method, device, equipment and storage medium based on Physical Network
CN110035058A (en) * 2019-02-28 2019-07-19 Oppo广东移动通信有限公司 Resource request method, equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
ANONYMOUS: "OCF Bridging Specification version 1.3.0", 30 November 2017 (2017-11-30), pages 1 - 59, XP055826281, Retrieved from the Internet <URL:https://openconnectivity.org/specs/drafts/OCF_Bridging_Specification_IPR_Candidate_v1.3.0.pdf> *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11882190B2 (en) * 2020-01-10 2024-01-23 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Device linkage method, rule engine device, and client device

Also Published As

Publication number Publication date
CN114788393A (en) 2022-07-22

Similar Documents

Publication Publication Date Title
US20220201095A1 (en) Request processing in the service layer
CN108353094B (en) Cross-resource subscription for M2M service layer
EP3861706B1 (en) Framework for dynamic brokerage and management of topics and data at the service layer
JP6598848B2 (en) Presenting the computing environment on multiple devices
US20080183645A1 (en) Media continuity service between devices
US11249788B2 (en) Cloud management platform, and virtual machine management method and system
US11070433B2 (en) Network function NF management method and NF management device
WO2022171083A1 (en) Information processing method based on internet-of-things device, and related device and storage medium
CN112335204A (en) Local control and/or registration of smart devices by an assistant client device
US20160241635A1 (en) M2m data querying and invoking methods, querying and invoking devices, and system
EP3332513B1 (en) Service element host selection
CN111201804B (en) Method, apparatus and computer readable storage medium for enabling data continuity services
WO2021134252A1 (en) Inter-device communication method and apparatus, and storage medium
US20230045914A1 (en) Method and apparatus for controlling device in internet of things, and gateway device and storage medium
US20210176186A1 (en) Resource processing method and system, storage medium and electronic device
KR102046730B1 (en) Elements of service
US20170103009A1 (en) Monitoring a device status for an application
WO2021126400A1 (en) Preventing notification loss during temporary network disconnection
WO2024031682A1 (en) Device control method and apparatus, and device, storage medium and program product
CN110753921A (en) Query request processing method and device, computer equipment and storage medium
US20230327908A1 (en) Operation method, invoking service method, device, and medium
CN114461157B (en) IDV client multi-screen divide-and-conquer method and system
WO2016106598A1 (en) Method and apparatus for selecting access network
CN116320059A (en) Building protocol data processing method, device and system
WO2021134757A1 (en) Method and device for exchanging information with user

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

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

Country of ref document: EP

Kind code of ref document: A1