WO2022104806A1 - Method and apparatus for controlling heterogeneous network devices, device, and storage medium - Google Patents

Method and apparatus for controlling heterogeneous network devices, device, and storage medium Download PDF

Info

Publication number
WO2022104806A1
WO2022104806A1 PCT/CN2020/130938 CN2020130938W WO2022104806A1 WO 2022104806 A1 WO2022104806 A1 WO 2022104806A1 CN 2020130938 W CN2020130938 W CN 2020130938W WO 2022104806 A1 WO2022104806 A1 WO 2022104806A1
Authority
WO
WIPO (PCT)
Prior art keywords
sub
network
gateway
capability set
request
Prior art date
Application number
PCT/CN2020/130938
Other languages
French (fr)
Chinese (zh)
Inventor
吕小强
张军
Original Assignee
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Priority to PCT/CN2020/130938 priority Critical patent/WO2022104806A1/en
Priority to CN202080106374.5A priority patent/CN116349269A/en
Publication of WO2022104806A1 publication Critical patent/WO2022104806A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/06Authentication

Definitions

  • the embodiments of the present application relate to the Internet of Things technology, and in particular, to a control method, apparatus, device, and storage medium for heterogeneous network devices.
  • the devices used by users and the devices that need to be managed may belong to different networks.
  • the existing technology only the devices connected by the same network technology under the same gateway can be controlled and managed.
  • a control scheme for heterogeneous network devices is a control scheme for heterogeneous network devices.
  • Embodiments of the present application provide a method, apparatus, device, and storage medium for controlling a heterogeneous network device, and provide a technical solution for controlling a device in a heterogeneous network.
  • the embodiments of the present application may provide a method for controlling heterogeneous network devices, which is applied to terminal devices, and the method includes:
  • sub-device control request includes an access identifier of the sub-device in the first network, a service identifier and an instance identifier;
  • the embodiments of the present application may provide a method for controlling heterogeneous network devices, which is applied to a gateway device, and the method includes:
  • sub-device control request sent by a terminal device, where the sub-device control request includes an access identifier of the sub-device in the first network, a service identifier, and an instance identifier;
  • the gateway device communicates with the terminal device through the first network, and the gateway device communicates with the sub-device through the second network .
  • the embodiments of the present application may provide a method for controlling a heterogeneous network device, which is applied to a cloud service device, and the method includes:
  • sub-device authentication request includes the identification and identity information of the sub-device
  • the embodiments of the present application may provide a control apparatus for heterogeneous network equipment, including: a processing module, a sending module, and a receiving module;
  • the processing module is configured to generate a sub-device control request, where the sub-device control request includes an access identifier of the sub-device in the first network, a service identifier and an instance identifier;
  • the sending module is configured to send the sub-device control request to the gateway device; wherein the gateway device communicates with the control apparatus of the heterogeneous network device through the first network, and the gateway device communicates with the sub-device communicate over the second network.
  • the embodiments of the present application may provide a control apparatus for heterogeneous network equipment, including: a processing module, a receiving module, and a sending module;
  • the receiving module is configured to receive a sub-device control request sent by the terminal device, where the sub-device control request includes an access identifier, a service identifier and an instance identifier of the sub-device in the first network;
  • the sending module is configured to send an operation request to the sub-device according to the sub-device control request; wherein, the control device of the heterogeneous network device communicates with the terminal device through the first network, and the heterogeneous network device communicates with the terminal device through the first network.
  • the control device of the network device communicates with the sub-device through the second network.
  • the embodiments of the present application may provide a control apparatus for heterogeneous network equipment, including:
  • a receiving module configured to receive a sub-device authentication request sent by the gateway device, where the sub-device authentication request includes the identification and identity information of the sub-device;
  • a processing module configured to authenticate the sub-device according to the sub-device authentication request, and generate an access identifier in the first network for the sub-device after the authentication is passed;
  • a sending module configured to send the access identifier of the sub-device in the first network to the gateway device.
  • an embodiment of the present application may provide a terminal device, including:
  • processors memories, receivers and transmitters
  • the memory stores computer-executable instructions
  • the processor executes the computer-executed instructions stored in the memory, so that the processor executes the method for controlling a heterogeneous network device provided by the first aspect.
  • an embodiment of the present application may provide a gateway device, including:
  • processors memories, receivers and transmitters
  • the memory stores computer-executable instructions
  • the processor executes the computer-executed instructions stored in the memory, so that the processor executes the method for controlling a heterogeneous network device provided by the second aspect.
  • an embodiment of the present application may provide a cloud service device, including:
  • processors memories, receivers and transmitters
  • the memory stores computer-executable instructions
  • the processor executes the computer-executed instructions stored in the memory, so that the processor executes the method for controlling a heterogeneous network device provided by the third aspect.
  • embodiments of the present application may provide a computer-readable storage medium, where computer-executable instructions are stored in the computer-readable storage medium, and when the computer-executable instructions are executed by a processor, are used to implement the foregoing first aspect Provided is a control method for heterogeneous network devices.
  • the embodiments of the present application may provide a computer-readable storage medium, where computer-executable instructions are stored in the computer-readable storage medium, and when the computer-executable instructions are executed by a processor, are used to implement the foregoing second A control method of a heterogeneous network device provided by the aspect.
  • embodiments of the present application may provide a computer-readable storage medium, where computer-executable instructions are stored in the computer-readable storage medium, and when the computer-executable instructions are executed by a processor, are used to implement the third A control method of a heterogeneous network device provided by the aspect.
  • an embodiment of the present application may provide a chip, including: a processing module and a communication interface, where the processing module is configured to execute the control method for a heterogeneous network device provided in any of the foregoing aspects.
  • embodiments of the present application may provide a computer program product, including a computer program, which, when executed by a processor, implements the control method for a heterogeneous network device provided in any of the foregoing aspects.
  • a gateway device with heterogeneous gateway capability is used to establish terminal devices and sub-devices that communicate in the first network and the second network respectively.
  • the terminal device needs to control the sub-device, it can control the sub-device by sending a sub-device control request to the gateway device, and the gateway device sends an operation request to the sub-device according to the sub-device control request. , realizes the control of equipment without network access, and provides a technical solution for the control of heterogeneous network equipment.
  • FIG. 1 is a schematic diagram of an application scenario of a method for controlling a heterogeneous network device provided by an embodiment of the present application
  • FIG. 2 is a schematic diagram of a network architecture of a method for controlling a heterogeneous network device provided by an embodiment of the present application
  • Embodiment 3 is a schematic flowchart of Embodiment 1 of a method for controlling a heterogeneous network device provided by an embodiment of the present application;
  • Embodiment 4 is a schematic flowchart of Embodiment 2 of a method for controlling a heterogeneous network device provided by an embodiment of the present application;
  • FIG. 5 is a schematic flowchart of Embodiment 3 of a method for controlling a heterogeneous network device provided by an embodiment of the present application;
  • FIG. 6 is a schematic flowchart of Embodiment 4 of a method for controlling a heterogeneous network device provided by an embodiment of the present application;
  • FIG. 7 is a schematic structural diagram of Embodiment 1 of a control apparatus for heterogeneous network equipment provided by an embodiment of the present application;
  • FIG. 8 is a schematic structural diagram of Embodiment 2 of a control apparatus for heterogeneous network equipment provided by an embodiment of the present application;
  • FIG. 9 is a schematic structural diagram of Embodiment 3 of a control apparatus for heterogeneous network equipment provided by an embodiment of the present application.
  • FIG. 10 is a schematic structural diagram of a terminal device provided in this embodiment.
  • FIG. 11 is a schematic structural diagram of a gateway device provided in this embodiment.
  • FIG. 12 is a schematic structural diagram of a cloud service device provided in this embodiment.
  • the prior art does not provide a control scheme for devices in a heterogeneous network. Based on this, the present application provides a control solution for heterogeneous network devices.
  • the overall idea of this scheme is based on the design of gateway equipment, which has a bridging function.
  • the gateway equipment can be used as the terminal equipment of the control end and the sub-equipment in the heterogeneous network that needs to be controlled.
  • the bridging device between the sub-devices is controlled by the gateway device.
  • FIG. 1 is a schematic diagram of an application scenario of a method for controlling a heterogeneous network device provided by an embodiment of the present application
  • FIG. 2 is a schematic diagram of a network architecture of the method for controlling a heterogeneous network device provided by an embodiment of the present application.
  • the scenario includes at least: a gateway device (also referred to as a gateway, gateway device) as a bridge device, a terminal device as a control end, and one or more sub-devices to be controlled.
  • the communication network between the terminal device and the gateway device is different from the communication network between the gateway device and the sub-devices.
  • Gateway devices support communication over networks of different protocols.
  • the terminal device may be a user's mobile phone, a tablet computer, or other smart devices capable of running applications.
  • Sub-devices can be any device in the IoT scenario, such as smart home appliances such as tablet computers, air conditioners, refrigerators, and speakers, and can also be smart home systems, vehicles, and other devices that can establish a communication connection with the gateway.
  • smart home appliances such as tablet computers, air conditioners, refrigerators, and speakers
  • smart home systems, vehicles, and other devices that can establish a communication connection with the gateway.
  • the scenario also includes a cloud service device, and the cloud service device may also be called a cloud or a cloud server.
  • gateway Service on the device model of the gateway (Gateway) device; that is to say, the device with the gateway Service has the ability to bridge other protocol devices to access the network.
  • the Service identifies that the device it carries has the Gateway capability, and its specific capabilities are as follows:
  • FIG. 3 is a schematic flowchart of Embodiment 1 of a method for controlling heterogeneous network devices provided by an embodiment of the present application.
  • the implementation of this solution involves three devices: a terminal device, a gateway device, and a sub-device, wherein, The terminal device and the gateway device communicate through a first network, and the gateway device and the sub-device communicate through a second network, and the first network and the second network are communication networks with different protocols respectively.
  • the control method of the heterogeneous network device specifically includes the following steps:
  • S101 Generate a sub-device control request, where the sub-device control request includes an access identifier, a service identifier, and an instance identifier of the sub-device in the first network.
  • the terminal device can obtain relevant information of the sub-device, and control the sub-device through the gateway device.
  • a sub-device control request can be generated according to the user's operation or a preset command.
  • the request needs to include at least the access identifier, service identifier and instance identifier of the sub-device in the first network.
  • a service refers to an independent functional group, which can be reused in different types of application terminals, and a service identifier is a unique identifier assigned to the service, which is used when controlling sub-devices .
  • the same device can have the same two services.
  • Instance identifiers are used to identify methods, properties or events within a service.
  • a property is the smallest unit that describes the state and function of a terminal device (or an application terminal), and an action is used to implement a specific function of a service, which cannot be accomplished by reading and writing a single property.
  • An event is a specific information attribute identifier that the terminal device actively reports to the hub.
  • the above operations, attributes and events actually refer to different capabilities, and an instance identifier (iid) can be set as a unique identifier for different specific instances. That is, the above instance identifier is the identifier of any operation that needs to be controlled, or any attribute, or any event.
  • the terminal device at least needs to obtain the device capability set of the sub-device in the first network, and then according to the device capability set of the sub-device in the first network The capability set is used to generate the sub-device control request.
  • the device capability set includes basic information and capability information of the sub-device, and the capability information includes attributes, methods and events.
  • the basic information of the sub-device includes the access identifier. It can also include basic product information such as the device type, manufacturer, and model of the sub-device.
  • S102 Send a sub-device control request to the gateway device.
  • the terminal device After the terminal device generates the sub-device control request, it sends the sub-device control request to the gateway device through the first network.
  • the gateway device receives the sub-device control request sent by the terminal device, and the sub-device control request includes the access ID, service ID and instance ID of the sub-device in the first network; the instance ID is any of the methods, attributes and events. An indicator of ability.
  • S103 Send an operation request to the sub-device according to the sub-device control request.
  • the gateway device may determine the product identification of the sub-device according to the access identification in the first network included therein. At the same time, the gateway device can determine the operation content that actually needs to control the execution of the sub-device according to the service identifier and the instance identifier, and further generate an operation request.
  • the gateway device After generating the operation request, the gateway device sends the operation request to the sub-device through the second network, so as to realize the control of the heterogeneous network device.
  • the sub-device executes the corresponding operation according to the operation request, and returns a response message to the gateway device through the second network after the execution is completed.
  • the gateway device can convert the response message into a response message in the first network, and return the response message to the terminal device through the first network.
  • a gateway device with heterogeneous gateway capability is used to establish a connection between a terminal device and sub-devices that communicate in the first network and the second network respectively.
  • the gateway device can send a sub-device control request to the gateway device, and the gateway device can send an operation request to the sub-device according to the sub-device control request to control the sub-device, so as to realize the control of the device without network access, and provide A technical solution for heterogeneous network device control.
  • FIG. 4 is a schematic flowchart of Embodiment 2 of a method for controlling a heterogeneous network device provided by an embodiment of the present application.
  • this solution includes a discovery gateway device and scanning sub-devices in the method for controlling a heterogeneous network device. , and three processes of configuring sub-devices, which can be executed continuously. It can also be executed separately under the trigger of certain conditions, which is not limited in this solution.
  • control method for a heterogeneous network device includes the following steps:
  • the terminal device determines the gateway device.
  • a suitable gateway device which can be implemented in at least the following ways:
  • a device with gateway capability is determined as the gateway device through a broadcast message, and the broadcast message is used to discover a device with gateway capability in the first network.
  • the terminal device sends a broadcast message, and then determines a device with gateway capability as the gateway device according to the received response message.
  • the terminal device can send a broadcast message locally through an installed application program (application, APP), where the broadcast message is used to discover a gateway-capable device existing in the local network, that is, a gateway device.
  • application application
  • any device in the network After any device in the network receives the broadcast message, it determines whether it has the gateway capability, and determines that the gateway device with the gateway capability returns a response to the terminal device.
  • the terminal device can determine the gateway device according to the received response. The number can be one or more.
  • the capability of the device registered in the cloud service device is obtained from the cloud service device; according to the capabilities of the multiple devices, a device with gateway capability is determined as the gateway device.
  • the terminal device can interact with the cloud, and each device is registered in the cloud after accessing the network, that is to say, the cloud includes the capability information of each gateway device, etc., and the terminal device can be obtained from the cloud service device. The ability to access different devices, thereby determining the gateway device.
  • the terminal device can obtain the above information from the cloud through the installed APP. After each new device is registered to the cloud platform, the APP device can obtain the capabilities of the device from the cloud.
  • the terminal device can obtain multiple devices in the current network by sending a broadcast message, and then directly establish a connection with each target device, obtain the capability information of the device through unicast, and then discover the gateway of the target device.
  • S202 Send a scan sub-device request to the gateway device.
  • the terminal device needs to discover the sub-devices through the gateway device, that is, scan the sub-devices.
  • the terminal device sends a scanning sub-device request for acquiring the product identifier of the sub-device to be connected to the network to the gateway through the first network.
  • the scanning sub-device request sent by the terminal device is received.
  • the terminal device can send a scan sub-device request to the gateway device. If there are multiple gateway devices in the network, the terminal device needs to call All gateway devices initiate a request to scan the heterogeneous network devices to be accessed.
  • S203 According to the request for scanning the sub-device, call the sub-device scanning function to scan the sub-device, and obtain the product identifier of the sub-device and the signal strength of the sub-device.
  • the gateway device invokes the device scanning function to scan, and can obtain product identifiers of sub-devices that have not yet been connected, and can detect the signal strength of each sub-device.
  • the terminal device sends a scan subdevice request to the gateway device through the installed APP; calls the scanSubdevices action of the gateway device.
  • the method is identified by its Service ID and iid (method identifier).
  • the gateway device will initiate a scanning process. During this process, you can find the product identifiers of the sub-devices that are not added to the heterogeneous network where the gateway is located, and the signal strength (Received Signal Strength Indication, rssi) obtained by the device to be connected to the heterogeneous network. .
  • the terminal device invokes the sub-device scanning function of multiple gateway devices, the product identifiers and corresponding rssi values of the sub-devices to be accessed and different gateway devices are acquired.
  • S204 Receive the product identifier of the sub-device and the signal strength of the sub-device returned by the gateway device.
  • all gateway devices return the scanned product identification and signal strength of the sub-devices to the terminal device to complete the scanning process of the sub-devices.
  • S205 Send a sub-device authentication request to the gateway device.
  • the terminal device After the terminal device obtains the product identifier and signal strength of the sub-device returned by the gateway device, based on the product identifier of the sub-device and the signal strength of the sub-device, the terminal device sends to the gateway device a message indicating that the gateway device is paired with The sub-device makes a request for authentication.
  • the terminal device calls multiple gateway devices to scan sub-devices, that is, the number of gateway devices is determined to be multiple, then according to the product identifiers of the sub-devices, it will be obtained from the multiple gateway devices.
  • the received gateway device with the highest signal strength sends the sub-device authentication request.
  • S206 Authenticate and access the sub-device according to the sub-device authentication request, and acquire the access identifier in the first network allocated by the cloud service device to the sub-device.
  • the gateway device After receiving the sub-device authentication request, the gateway device verifies the sub-device based on the product identification of the sub-device and other basic information to confirm the legitimacy of the sub-device, and the sub-device also authenticates the cloud. , to complete the verification process of both parties, and the sub-device accesses the gateway device through another protocol, that is, the second network.
  • the terminal device can select the gateway device with the highest rssi to execute the authentication sub-device setupSubdevice action (if there is only one gateway device, directly select the gateway device).
  • the Gateway device After receiving the above request, the Gateway device firstly connects the to-be-connected sub-device in the heterogeneous network to the heterogeneous network to which the Gateway belongs. Then, the authentication between the sub-device and the access network is initiated, including sub-device authentication and cloud authentication. In total, the authentication process is that the cloud confirms that the device is legal, and the device confirms that the cloud is legal. After the authentication is completed, the cloud accessing the network (that is, the first network) will assign an access identifier to the sub-device, and the access identifier is an identifier of the sub-device in the network to be accessed (the first network).
  • the cloud that is, the cloud service device
  • the gateway device interacts with the gateway device, and receives the sub-device authentication request sent by the gateway device.
  • the sub-device authentication request includes the identification and identity information of the sub-device; the sub-device is authenticated according to the sub-device authentication request.
  • S207 Send the access identifier of the sub-device in the first network to the terminal device.
  • This step is an optional step.
  • the gateway device may also send the obtained access identifier of the sub-device in the first network to the terminal device, and the terminal device receives the sent by the gateway device. the access identifier of the sub-device in the first network.
  • the gateway device will return the access identifier of the sub-device in the first network obtained from the cloud to the APP of the terminal device through the first network.
  • the APP can use the access identifier to confirm whether the sub-device is successfully connected.
  • the gateway device After completing the configuration and access process of the sub-device, the gateway device needs to generate a virtual device on the gateway device for the sub-device, and the terminal device can indirectly control the sub-device by operating the virtual device, that is, the virtual device can control the first network and the second network. Messages are converted between networks. Or the gateway device generates a device capability set (profile) that can be identified by the first network for the sub-device, that is, a capability description file, and the profile includes the basic information and capability information of the sub-device, specifically, the basic information of the sub-device.
  • the information includes an access identifier in the first network, at least one of information such as manufacturer, product category, and model, and the capability information includes attributes, methods, events, and the like. The process is described below through specific implementations.
  • FIG. 5 is a schematic flowchart of Embodiment 3 of a method for controlling a heterogeneous network device provided by an embodiment of the present application.
  • the subsequent terminal device controls the sub-device, it needs to obtain information about the location of the sub-device in the first network.
  • the capability set in the device capability set can be obtained by the terminal device from the gateway device or directly interacted with the cloud. Therefore, this embodiment briefly introduces the process after the sub-device is connected, including acquiring the capability set of the sub-device in the first network, and creating and updating the status of the shadow device.
  • control method of the heterogeneous network device further includes the following steps:
  • S301 Generate a device capability set of the sub-device in the first network according to the device type of the sub-device and the device capability set in the second network.
  • the gateway device has two ways to obtain the device capability set of the sub-device in the first network device.
  • the gateway device can obtain the device capability set of the sub-device according to the device type of the sub-device and the device capability of the sub-device in the second network. set and other information, and locally generate the device capability set in the first network.
  • the gateway device can complete the generation of the capability set of the sub-device in the current protocol, that is, the sub-device in the first network, according to the device type of the sub-device.
  • the current stage mainly involves ZigBee devices and Bluetooth (bluetooth, BT) devices, and the matching of ZigBee devices or BT devices with the device types in the first building is realized by generating the device capability set in the first network.
  • the service identifier belonging to the first network then determining the service identifier belonging to the first network, and correspondingly generating unique identifiers such as specific attributes, events and methods to obtain capability information.
  • the relevant content may be sent to the cloud, and the cloud will generate the device capability set, specifically as steps S302-S304.
  • S302 Send the device type of the sub-device and the device capability set of the sub-device in the second network to the cloud service device.
  • the gateway device sends a capability set generation request to the cloud service device, and the cloud service device receives the capability set generation request sent by the gateway device, where the capability set generation request includes the device type of the sub-device and the The device capability set of the sub-device in the second network.
  • S303 Generate a device capability set in the first network for the sub-device according to the capability set generation request.
  • the cloud device In this step, the cloud device generates a corresponding device capability set in the first network according to the received information and the access identifier of the sub-device in the first network and the capability information in the second network.
  • the device capability set of the device in the first network includes basic information and capability information of the sub-device, the capability information includes attributes, methods and events, and the basic information of the sub-device includes access in the first network logo.
  • S304 Send the device capability set of the sub-device in the first network to the gateway device.
  • the cloud server device returns the generated device capability set of the sub-device in the first network to the gateway device, and the gateway device receives the device capability of the sub-device in the first network returned by the cloud service device set.
  • the gateway device may also generate a virtual device locally according to the device capability set of the sub-device in the first network.
  • the Gateway device automatically generates a device capability set (profile) identifiable by the first network locally according to the device type of the sub-device; the newly generated profile should include the device type of the sub-device , contains the service identifier and the instance identifier in the service, and assigns a unique instance identifier to each attribute, method, and event.
  • profile device capability set
  • the Gateway device obtains from the cloud a device capability set recognizable by the sub-device on the first network and an access identifier of the sub-device.
  • the request needs to carry the device type of the sub-device and the device capability set (profile) identifiable by the sub-device on the second network; the cloud generates a corresponding profile identifiable by the first network according to the acquired profile identifiable by the second network and Send to gateway.
  • Gateway can generate a virtual device on it according to the received information. After the cloud platform generates a new profile, it can also generate a shadow device according to automatically generating a shadow device or waiting for a command from the Gateway, and the shadow device is used as the mapping of the child device in the first network.
  • Shadow device creation and status update process
  • S401 Generate a shadow device mapped by the sub-device in the first network according to the device capability set of the sub-device in the first network.
  • S403 Send the current state of the sub-device to the cloud service device.
  • the current state of the sub-device sent by the gateway device is received.
  • the cloud service device may locally generate a mapping of the sub-device in the first network, that is, the shadow device.
  • the gateway device By interacting with the sub-device through the second network, the current state of the sub-device can be acquired and sent to the cloud service device to update the state of the shadow device.
  • the gateway device For example, if the gateway device generates the device capability set of the sub-device in the first network locally, a request to create a shadow device is sent to the specific interface of the cloud; the request carries the generated device capability of the sub-device in the first network.
  • Set profile
  • the profile contains the basic information of the device and the capability information (methods, attributes, events) of the device).
  • the Gateway device obtains the current state of the child device and synchronizes the current state with the shadow device. When doing a full update, you need to set the full update flag to true; when the state changes later, you need to turn off the full update flag.
  • both the gateway device and the cloud service device have acquired the device capability set of the sub-device in the first network.
  • the terminal device controls the sub-device, it can obtain the sub-device from the gateway device or the cloud service device.
  • a set of device capabilities in the first network is
  • FIG. 6 is a schematic flowchart of Embodiment 4 of a method for controlling heterogeneous network devices provided by an embodiment of the present application.
  • the terminal device after completing the access of sub-devices, the terminal device also needs to After acquiring several other pieces of information, the gateway device can control the sub-devices.
  • the terminal device mainly includes several processes of acquiring the sub-device list, acquiring the device capability set, and sub-device control.
  • control method for a heterogeneous network device includes the following steps:
  • S501 Send a list acquisition request to the gateway device.
  • the list acquisition request sent by the terminal device to the gateway device is used to acquire the device list of the heterogeneous network bridged by the gateway device.
  • S502 Acquire a list of sub-devices according to the list acquisition request.
  • the gateway device After the gateway device receives the list acquisition request, it will have accessed the gateway device through a network different from the first network, and has registered in the cloud to obtain one or more sub-devices with access identifiers in the first network device Summarize to obtain a sub-device list, where the sub-device list includes at least one access identifier of a sub-device that belongs to a different network from the terminal device.
  • S503 Send the sub-device list to the terminal device.
  • the gateway device After the gateway device obtains the list of sub-devices, it sends it to the terminal device through a network.
  • the terminal device controls the sub-devices, it needs to interact with the gateway to obtain the sub-device list, so that the user can select the sub-device to be controlled when controlling or setting a control command.
  • an APP installed on a terminal device can obtain a list of heterogeneous network devices that it is responsible for bridging from the Gateway device, that is, a list of sub-devices.
  • Sub-devices are heterogeneous network devices that the Gateway device is responsible for bridging. Specifically, it can be implemented by calling the method of getSubDeviceList.
  • S504 Send a device capability set acquisition request to the gateway device.
  • the device capability set acquisition request is used to acquire the device capability set of the sub-device in the first network.
  • S505 Acquire the device capability set of the sub-device in the first network according to the device capability set acquisition request.
  • the gateway device receives the device capability set acquisition request, if the gateway device has obtained the device capability set of the sub-device in the first network device in advance, it can directly acquire the sub-device from the locally stored content A set of device capabilities in the first network.
  • the device capability set of the sub-device in the first network can also be acquired through the two methods provided in the embodiment shown in FIG. 5.
  • the two methods of acquiring the device capability set in FIG. The execution is performed before the acquisition of the device capability set, but in a specific implementation, it is not limited to be executed when the terminal device needs to acquire. There is no restriction on this program.
  • the device capability set of the sub-device in the first network includes basic information and capability information of the sub-device, and the capability information includes attributes, methods and events.
  • the information includes an access identifier in the first network.
  • S506 Send the device capability set of the sub-device in the first network to the terminal device.
  • the gateway device returns the acquired device capability set to the terminal device through the first network, and the terminal device receives the device capability set of the sub-device to be controlled in the first network.
  • the terminal device can interact with the gateway to obtain the device capability set of the sub-device in the first network, so that the user can select the sub-device to be controlled when controlling or setting a control command.
  • the APP on the terminal device can also send a request for acquiring the capability set of the heterogeneous network device to the Gateway device.
  • the Gateway device responds to the APP according to the device capability set (Profile) that can be identified by the first network obtained by the steps disclosed in the foregoing embodiments.
  • Profile includes: basic information of sub-devices (access ID, manufacturer, etc.) and capability information (attributes, methods, events).
  • S507 Send a sub-device control request to the gateway device.
  • S508 Send an operation request to the sub-device according to the sub-device control request
  • control process of the sub-device is similar to the specific implementation process in the embodiment shown in FIG. 3 , and details are not repeated here.
  • the virtual device in the gateway device can convert the received sub-device control request into an operation request for the sub-device, and send the operation request to the sub-device.
  • the sub-device executes the corresponding operation according to the operation request, and returns a response message to the gateway device after the execution is completed.
  • the virtual device in the gateway device can convert the response message into a response message in the first network, and return the response message to the terminal device through the first network.
  • control methods for heterogeneous network devices involve the terminal device discovering the gateway device, sub-device scanning, sub-device access authentication, the terminal device acquiring the sub-device list and the device capability set, and The process in which the terminal device controls the sub-devices in the heterogeneous network through the gateway device.
  • a connection between a terminal device and a sub-device communicating in the first network and the second network is established through a gateway device with heterogeneous gateway capabilities.
  • the terminal device needs to control the sub-device, it can pass the gateway device to the gateway device.
  • a sub-device control request is sent, and the gateway device sends an operation request to the sub-device according to the sub-device control request, so as to control the sub-device, realize the control of the device without network access, and provide a technical solution for heterogeneous network device control. Further, a solution for upgrading the device under the scenario of cross-platform access of the device is also provided.
  • FIG. 7 is a schematic structural diagram of Embodiment 1 of a control apparatus for heterogeneous network equipment provided by an embodiment of the present application.
  • the control apparatus 10 for heterogeneous network equipment includes: a processing module 11 , a sending module 12 and a receiving module 13;
  • the processing module 11 is configured to generate a sub-device control request, where the sub-device control request includes an access identifier, a service identifier and an instance identifier of the sub-device in the first network;
  • the sending module 12 is configured to send the sub-device control request to the gateway device; wherein, the gateway device communicates with the control device of the heterogeneous network device through the first network, and the gateway device communicates with the sub-device.
  • the devices communicate over the second network.
  • the instance identifier is used to identify methods, properties or events within a service.
  • processing module 11 is specifically configured to:
  • the device capability set includes basic information and capability information of the sub-device, the capability information includes attributes, methods and events, and the basic information of the sub-device includes the access identifier.
  • control apparatus 10 for heterogeneous network devices
  • the sending module 12 is further configured to send a list acquisition request to the gateway device; the list acquisition request is used to acquire the device list of the heterogeneous network bridged by the gateway device;
  • the receiving module 13 is further configured to receive the sub-device list sent by the gateway device, where the sub-device list includes at least one access identifier of a sub-device that belongs to a different network from the control apparatus of the heterogeneous network device. .
  • control apparatus 10 for heterogeneous network devices
  • the sending module 12 is further configured to send a device capability set acquisition request to the gateway device, where the device capability set acquisition request is used to acquire the device capability set of the sub-device in the first network;
  • the receiving module 13 is further configured to receive the device capability set of the sub-device in the first network sent by the gateway device.
  • control apparatus 10 for heterogeneous network devices
  • the sending module 12 is further configured to send a scanning sub-device request to the gateway device, where the scanning sub-device request is used to obtain the product identifier of the sub-device to be connected to the network;
  • the receiving module 13 is further configured to receive the product identification of the sub-device and the signal strength of the sub-device returned by the gateway device;
  • the sending module 12 is further configured to send a sub-device authentication request to the gateway device according to the identifier of the sub-device and the signal strength of the sub-device, where the sub-device authentication request is used to instruct the gateway device to The sub-device is authenticated.
  • the receiving module 13 is further configured to receive the access identifier of the sub-device in the first network sent by the gateway device.
  • control apparatus 10 for heterogeneous network devices
  • the processing module 11 is further configured to determine a device with gateway capability as the gateway device through a broadcast message, and the broadcast message is used to discover the device with gateway capability in the first network;
  • the processing module 11 is further configured to acquire the capability of the device registered in the cloud service device from the cloud service device;
  • the processing module 11 is further configured to determine a device with gateway capability as the gateway device according to the capabilities of the multiple devices.
  • the sending module 12 is specifically configured to:
  • the sub-device authentication request is sent to the gateway device with the highest signal strength obtained from the multiple gateway devices.
  • the apparatus for controlling heterogeneous network equipment provided in any of the foregoing embodiments is used to execute the technical solution on the terminal device (APP) side in any of the foregoing method embodiments, and its implementation principles and technical effects are similar, and will not be repeated here.
  • APP terminal device
  • FIG. 8 is a schematic structural diagram of Embodiment 2 of a control apparatus for heterogeneous network equipment provided by an embodiment of the present application.
  • the control apparatus 20 for heterogeneous network equipment includes: a processing module 21 , a receiving module 22 and a sending module twenty three;
  • the receiving module 22 is configured to receive a sub-device control request sent by the terminal device, where the sub-device control request includes an access identifier, a service identifier and an instance identifier of the sub-device in the first network;
  • the sending module 23 is configured to send an operation request to the sub-device according to the sub-device control request; wherein, the control apparatus of the heterogeneous network device communicates with the terminal device through the first network, and the The control apparatus of the heterogeneous network device communicates with the sub-device through the second network.
  • the instance identifier is used to identify methods, properties or events within a service.
  • the receiving module 22 is further configured to receive a list acquisition request sent by the terminal device, where the list acquisition request is used to acquire all The device list of the heterogeneous network bridged by the gateway device;
  • the processing module 21 is configured to obtain a list of sub-devices according to the list obtaining request, where the list of sub-devices includes at least one access of sub-devices that belong to a different network from the terminal device that is authenticated and accessed by the gateway device. identification;
  • the sending module 23 is further configured to send the sub-device list to the terminal device.
  • control apparatus 20 for heterogeneous network devices In another specific implementation manner of the control apparatus 20 for heterogeneous network devices,
  • the receiving module 22 is further configured to receive a device capability set acquisition request sent by the terminal device, where the device capability set acquisition request is used to acquire the device capability set of the sub-device in the first network;
  • the processing module 21 is further configured to acquire the device capability set of the sub-device in the first network according to the device capability set acquisition request, where the device capability set includes basic information and capability information of the sub-device, The capability information includes attributes, methods and events, and the basic information of the sub-device includes an access identifier in the first network;
  • the sending module 23 is further configured to send the device capability set of the sub-device in the first network to the terminal device.
  • control apparatus 20 for heterogeneous network devices In another specific implementation manner of the control apparatus 20 for heterogeneous network devices,
  • the receiving module 22 is further configured to receive a scan sub-device request sent by the terminal device;
  • the processing module 21 is further configured to call the sub-device scanning function to scan the sub-device according to the scanning sub-device request, and obtain the product identification of the sub-device and the signal strength of the sub-device;
  • the sending module 23 is further configured to send the product identification of the sub-device and the signal strength of the sub-device to the terminal device;
  • the receiving module 22 is further configured to receive a sub-device authentication request sent by the terminal device;
  • the processing module 21 is further configured to authenticate and access the sub-device according to the sub-device authentication request, and obtain the access identifier in the first network allocated by the cloud service device to the sub-device.
  • the sending module 23 is further configured to send the access identifier of the sub-device in the first network to the Terminal Equipment.
  • the processing module 21 is specifically configured to:
  • a device capability set of the sub-device in the first network is generated according to the device type of the sub-device and the device capability set in the second network.
  • the sending module 23 is further configured to send the device type of the sub-device and the location of the sub-device to the cloud service device. a device capability set in the second network;
  • the receiving module 22 is further configured to receive a device capability set of the sub-device in the first network returned by the cloud service device.
  • the processing module 21 is further configured to generate a virtual device according to a device capability set of the sub-device in the first network.
  • the receiving module 22 is further configured to acquire the current state of the sub-device
  • the sending module 23 is further configured to send the current state of the sub-device to the cloud service device.
  • control apparatus for a heterogeneous network device provided by any of the foregoing embodiments is used to execute the technical solution on the gateway device (gateway) side in any of the foregoing method embodiments, and its implementation principles and technical effects are similar, and will not be repeated here.
  • FIG. 9 is a schematic structural diagram of Embodiment 3 of a control apparatus for heterogeneous network equipment provided by an embodiment of the present application.
  • the control apparatus 30 for heterogeneous network equipment includes:
  • a receiving module 31 configured to receive a sub-device authentication request sent by the gateway device, where the sub-device authentication request includes the identification and identity information of the sub-device;
  • a processing module 32 configured to authenticate the sub-device according to the sub-device authentication request, and generate an access identifier in the first network for the sub-device after the authentication is passed;
  • the sending module 33 is configured to send the access identifier of the sub-device in the first network to the gateway device.
  • the receiving module 31 is further configured to receive a capability set generation request sent by the gateway device, where the capability set generation request includes the device type of the sub-device and the sub-device in the second network. device capability set;
  • the processing module 32 is further configured to generate a request according to the capability set, and generate a device capability set in the first network for the sub-device, where the device capability set includes basic information and capability information of the sub-device , the capability information includes attributes, methods and events, and the basic information of the sub-device includes an access identifier in the first network;
  • the sending module 33 is further configured to send the device capability set of the sub-device in the first network to the gateway device.
  • the processing module 32 is further configured to generate the said sub-device according to the device capability set of the sub-device in the first network.
  • the shadow device to which the child device is mapped in the first network is further configured to generate the said sub-device according to the device capability set of the sub-device in the first network.
  • the receiving module 31 is further configured to receive the current state of the sub-device sent by the gateway device;
  • the processing module 32 is further configured to update the state of the shadow device according to the current state of the sub-device.
  • control device for a heterogeneous network device provided by any of the foregoing embodiments is used to execute the technical solution on the cloud service device (cloud) side in any of the foregoing method embodiments, and its implementation principles and technical effects are similar, and details are not repeated here. .
  • FIG. 10 is a schematic structural diagram of a terminal device provided in this embodiment. As shown in FIG. 10 , the terminal device 100 includes:
  • processor 111 memory 112, receiver 113 and transmitter 114;
  • the memory 112 stores computer-executed instructions
  • the processor 111 executes the computer-executed instructions stored in the memory 112, so that the processor 111 executes the technical solutions on the terminal device side in any of the foregoing method embodiments.
  • FIG. 10 is a simple design of a terminal device.
  • the embodiments of the present application do not limit the number of processors and memories in the terminal device.
  • FIG. 10 only uses 1 as an example for description.
  • the memory, the processor, the receiver, and the transmitter may be connected through a bus, or may be connected in other ways.
  • the memory can be integrated inside the processor.
  • the terminal equipment provided in this application also includes other devices such as a communication interface, which is not limited in this solution.
  • FIG. 11 is a schematic structural diagram of a gateway device provided in this embodiment. As shown in FIG. 11 , the gateway device 200 includes:
  • processor 211 memory 212, receiver 213 and transmitter 214;
  • the memory 212 stores computer-executed instructions
  • the processor 211 executes the computer-executed instructions stored in the memory 212, so that the processor 211 executes the technical solution on the gateway device side in any of the foregoing method embodiments.
  • FIG. 11 is a simple design of a gateway device.
  • the embodiments of the present application do not limit the number of processors and memories in the gateway device.
  • FIG. 11 only uses 1 as an example for description.
  • the memory, the processor, the receiver, and the transmitter may be connected through a bus, or may be connected in other ways.
  • the memory can be integrated inside the processor.
  • the gateway device provided in this application also includes other devices such as a communication interface, which is not limited in this solution.
  • FIG. 12 is a schematic structural diagram of a cloud service device provided in this embodiment. As shown in FIG. 12 , the cloud service device 300 includes:
  • the memory 312 stores computer-executable instructions
  • the processor 311 executes the computer-executed instructions stored in the memory 312, so that the processor 311 executes the technical solution on the cloud service device side in any of the foregoing method embodiments.
  • FIG. 12 is a simple design of a gateway device. This embodiment of the present application does not limit the number of processors and memories in the cloud service device. FIG. 12 only uses 1 as an example for description.
  • the memory, the processor, the receiver, and the transmitter may be connected through a bus, or may be connected in other ways.
  • the memory can be integrated inside the processor.
  • the cloud service device provided by this application also includes other devices such as a communication interface, which is not limited in this solution.
  • the processor may be a chip.
  • Embodiments of the present application further provide a computer-readable storage medium, where computer-executable instructions are stored in the computer-readable storage medium, and when the computer-executable instructions are executed by a processor, are used to implement the terminal in any of the foregoing method embodiments The technical solution of the equipment.
  • Embodiments of the present application further provide a computer-readable storage medium, where computer-executable instructions are stored in the computer-readable storage medium, and when the computer-executable instructions are executed by a processor, are used to implement the gateway in any of the foregoing method embodiments The technical solution of the equipment.
  • Embodiments of the present application further provide a computer-readable storage medium, where computer-executable instructions are stored in the computer-readable storage medium, and when the computer-executable instructions are executed by a processor, are used to implement the cloud in any of the foregoing method embodiments.
  • An embodiment of the present application further provides a chip, including: a processing module and a communication interface, where the processing module is used to implement the solution of the terminal device in any of the foregoing method embodiments.
  • An embodiment of the present application further provides a chip, including: a processing module and a communication interface, where the processing module is used to implement the solution of the gateway device in any of the foregoing method embodiments.
  • An embodiment of the present application further provides a chip, including: a processing module and a communication interface, where the processing module is used to implement the solution of the cloud service device in any of the foregoing method embodiments.
  • the chip also includes a storage module (such as a memory), the storage module is used for storing instructions, the processing module is used for executing the instructions stored in the storage module, and the instructions stored in the storage module are stored.
  • the execution causes the processing module to execute the technical solutions of the aforementioned respective devices.
  • the embodiment of the present application further provides a program, which is used to implement the solution of the terminal device in any of the foregoing method embodiments when the program is executed by the processor.
  • the embodiments of the present application further provide a program, which is used to implement the solution of the gateway device in any of the foregoing method embodiments when the program is executed by the processor.
  • the embodiment of the present application further provides a program, which is used to implement the solution of the cloud service device in any of the foregoing method embodiments when the program is executed by the processor.
  • Embodiments of the present application further provide a computer program product, including a computer program, which implements the technical solutions of the terminal device in the foregoing method embodiments when the computer program is executed by a processor.
  • Embodiments of the present application further provide a computer program product, including a computer program, which implements the technical solutions of the gateway device in the foregoing method embodiments when the computer program is executed by a processor.
  • Embodiments of the present application further provide a computer program product, including a computer program, which implements the technical solutions of the cloud service device in the foregoing method embodiments when the computer program is executed by a processor.
  • the disclosed apparatus and method may be implemented in other manners.
  • the device embodiments described above are only illustrative.
  • the division of the modules is only a logical function division. In actual implementation, there may be other division methods.
  • multiple modules may be combined or integrated. to another system, or some features can be ignored, or not implemented.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of modules may be in electrical, mechanical or other forms.
  • the processor may be a central processing unit (English: Central Processing Unit, referred to as: CPU), or other general-purpose processors, digital signal processors (English: Digital Signal Processor). , referred to as: DSP), application specific integrated circuit (English: Application Specific Integrated Circuit, referred to as: ASIC) and so on.
  • a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
  • the aforementioned program can be stored in a readable memory.
  • the steps including the above method embodiments are executed; and the aforementioned memory (storage medium) includes: read-only memory (English: read-only memory, abbreviated as: ROM), RAM, flash memory, hard disk, Solid state drive, magnetic tape (English: magnetic tape), floppy disk (English: floppy disk), optical disc (English: optical disc) and any combination thereof.

Abstract

The present application provides a method and apparatus for controlling heterogeneous network devices, a device, and a storage medium. In the present solution, a gateway device having a heterogeneous gateway capability establishes a connection between a terminal device and a sub-device that perform communication in a first network and a second network, respectively; when needing to control the sub-device, the terminal device can send a sub-device control request to the gateway device, and the gateway device sends an operation request to the sub-device according to the sub-device control request to control the sub-device, such that control of devices connected to different networks can be achieved, and a technical solution of controlling the heterogeneous network devices is provided.

Description

异构网络设备的控制方法、装置、设备及存储介质Control method, device, device and storage medium for heterogeneous network equipment 技术领域technical field
本申请实施例涉及物联网技术,尤其涉及一种异构网络设备的控制方法、装置、设备及存储介质。The embodiments of the present application relate to the Internet of Things technology, and in particular, to a control method, apparatus, device, and storage medium for heterogeneous network devices.
背景技术Background technique
随着物联网技术的发展,其应用领域涉及到方方面面,在工业、农业、环境、交通、物流、安保等基础设施领域的应用,有效的推动了这些方面的智能化发展,使得有限的资源更加合理的使用分配,从而提高了行业效率、效益。在家居、医疗健康、教育、金融与服务业、旅游业等与生活息息相关的领域的应用,从服务范围、服务方式到服务的质量等方面都有了极大的改进,大大的提高了人们的生活质量在用户的日常生活中对物联网技术的应用也逐渐普及。举例来说,智慧家庭等物联网技术,通过一个物联网网关作为各种终端设备,传感设备的接入口和协议转换中心,管理不同的接入设备。With the development of Internet of Things technology, its application fields involve all aspects, and the application in infrastructure fields such as industry, agriculture, environment, transportation, logistics, security, etc. has effectively promoted the intelligent development of these aspects, making the limited resources more reasonable. use and distribution, thereby improving the efficiency and effectiveness of the industry. The application in household, medical and health, education, finance and service industry, tourism and other fields closely related to life has been greatly improved in terms of service scope, service method and service quality, which has greatly improved people's The application of Internet of Things technology in the daily life of users is also gradually popularized. For example, in IoT technologies such as smart home, an IoT gateway is used as a variety of terminal devices, an access port for sensing devices, and a protocol conversion center to manage different access devices.
然而,随着技术逐渐发展,用户使用的设备和需要进行管理的设备可能属于不同网络中,现有技术中只能实现对同一网关下的采用相同网络技术连接的设备进行控制管理,还没有针对异构网络设备的控制方案。However, with the gradual development of technology, the devices used by users and the devices that need to be managed may belong to different networks. In the existing technology, only the devices connected by the same network technology under the same gateway can be controlled and managed. A control scheme for heterogeneous network devices.
发明内容SUMMARY OF THE INVENTION
本申请实施例提供一种异构网络设备的控制方法、装置、设备及存储介质,提供一种针对异构网络中的设备进行控制的的技术方案。Embodiments of the present application provide a method, apparatus, device, and storage medium for controlling a heterogeneous network device, and provide a technical solution for controlling a device in a heterogeneous network.
第一方面,本申请实施例可提供一种异构网络设备的控制方法,应用于终端设备,所述方法包括:In a first aspect, the embodiments of the present application may provide a method for controlling heterogeneous network devices, which is applied to terminal devices, and the method includes:
生成子设备控制请求,所述子设备控制请求中包括子设备在第一网络中的接入标识,服务标识以及实例标识;generating a sub-device control request, where the sub-device control request includes an access identifier of the sub-device in the first network, a service identifier and an instance identifier;
向网关设备发送所述子设备控制请求;其中,所述网关设备与所述终端设备通过所述第一网络通信,所述网关设备与所述子设备通过第二网络通信。Sending the sub-device control request to a gateway device; wherein the gateway device communicates with the terminal device through the first network, and the gateway device communicates with the sub-device through a second network.
第二方面,本申请实施例可提供一种异构网络设备的控制方法,应用于网关设备,所述方法包括:In a second aspect, the embodiments of the present application may provide a method for controlling heterogeneous network devices, which is applied to a gateway device, and the method includes:
接收终端设备发送的子设备控制请求,所述子设备控制请求包括子设备在第一网络中的接入标识,服务标识以及实例标识;receiving a sub-device control request sent by a terminal device, where the sub-device control request includes an access identifier of the sub-device in the first network, a service identifier, and an instance identifier;
根据所述子设备控制请求,向所述子设备发送操作请求;其中,所述网关设备与所述终端设备通过所述第一网络通信,所述网关设备与所述子设备通过第二网络通信。Send an operation request to the sub-device according to the sub-device control request; wherein the gateway device communicates with the terminal device through the first network, and the gateway device communicates with the sub-device through the second network .
第三方面,本申请实施例可提供一种异构网络设备的控制方法,应用于云服务设备,所述方法包括:In a third aspect, the embodiments of the present application may provide a method for controlling a heterogeneous network device, which is applied to a cloud service device, and the method includes:
接收网关设备发送的子设备认证请求,所述子设备认证请求包括子设备的标识和身份信息;receiving a sub-device authentication request sent by the gateway device, where the sub-device authentication request includes the identification and identity information of the sub-device;
根据所述子设备认证请求对所述子设备进行认证,并在认证通过后为所述子设备生成在第一网络中的接入标识;Authenticate the sub-device according to the sub-device authentication request, and generate an access identifier in the first network for the sub-device after the authentication is passed;
将所述子设备在所述第一网络中的接入标识发送至所述网关设备。Sending the access identifier of the sub-device in the first network to the gateway device.
第四方面,本申请实施例可提供一种异构网络设备的控制装置,包括:处理模块,发送模块以及接收模块;In a fourth aspect, the embodiments of the present application may provide a control apparatus for heterogeneous network equipment, including: a processing module, a sending module, and a receiving module;
所述处理模块用于生成子设备控制请求,所述子设备控制请求中包括子设备在第一网络中的接入标识,服务标识以及实例标识;The processing module is configured to generate a sub-device control request, where the sub-device control request includes an access identifier of the sub-device in the first network, a service identifier and an instance identifier;
所述发送模块用于向网关设备发送所述子设备控制请求;其中,所述网关设备与所述异构网络设备的控制装置通过所述第一网络通信,所述网关设备与所述子设备通过第二网络通信。The sending module is configured to send the sub-device control request to the gateway device; wherein the gateway device communicates with the control apparatus of the heterogeneous network device through the first network, and the gateway device communicates with the sub-device communicate over the second network.
第五方面,本申请实施例可提供一种异构网络设备的控制装置,包括:处理模块,接收模块以及发送模块;In a fifth aspect, the embodiments of the present application may provide a control apparatus for heterogeneous network equipment, including: a processing module, a receiving module, and a sending module;
所述接收模块用于接收终端设备发送的子设备控制请求,所述子设备控制请求包括子设备在第一网络中的接入标识,服务标识以及实例标识;The receiving module is configured to receive a sub-device control request sent by the terminal device, where the sub-device control request includes an access identifier, a service identifier and an instance identifier of the sub-device in the first network;
所述发送模块用于根据所述子设备控制请求,向所述子设备发送操作请求;其中,所述异构网络设备的控制装置与所述终端设备通过所述第一网络通信,所述异构网络设备的控制装置与所述子设备通过第二网络通信。The sending module is configured to send an operation request to the sub-device according to the sub-device control request; wherein, the control device of the heterogeneous network device communicates with the terminal device through the first network, and the heterogeneous network device communicates with the terminal device through the first network. The control device of the network device communicates with the sub-device through the second network.
第六方面,本申请实施例可提供一种异构网络设备的控制装置,包括:In a sixth aspect, the embodiments of the present application may provide a control apparatus for heterogeneous network equipment, including:
接收模块,用于接收网关设备发送的子设备认证请求,所述子设备认证请求包括子设备的标识和身份信息;a receiving module, configured to receive a sub-device authentication request sent by the gateway device, where the sub-device authentication request includes the identification and identity information of the sub-device;
处理模块,用于根据所述子设备认证请求对所述子设备进行认证,并在认证通过后为所述子设备生成在第一网络中的接入标识;a processing module, configured to authenticate the sub-device according to the sub-device authentication request, and generate an access identifier in the first network for the sub-device after the authentication is passed;
发送模块,用于将所述子设备在所述第一网络中的接入标识发送至所述网关设备。A sending module, configured to send the access identifier of the sub-device in the first network to the gateway device.
第七方面,本申请实施例可提供一种终端设备,包括:In a seventh aspect, an embodiment of the present application may provide a terminal device, including:
处理器、存储器、接收器以及发送器;processors, memories, receivers and transmitters;
所述存储器存储计算机执行指令;the memory stores computer-executable instructions;
所述处理器执行所述存储器存储的计算机执行指令,使得所述处理器执行第一方面提供的异构网络设备的控制方法。The processor executes the computer-executed instructions stored in the memory, so that the processor executes the method for controlling a heterogeneous network device provided by the first aspect.
第八方面,本申请实施例可提供一种网关设备,包括:In an eighth aspect, an embodiment of the present application may provide a gateway device, including:
处理器、存储器、接收器以及发送器;processors, memories, receivers and transmitters;
所述存储器存储计算机执行指令;the memory stores computer-executable instructions;
所述处理器执行所述存储器存储的计算机执行指令,使得所述处理器执行第二方面提供的异构网络设备的控制方法。The processor executes the computer-executed instructions stored in the memory, so that the processor executes the method for controlling a heterogeneous network device provided by the second aspect.
第九方面,本申请实施例可提供一种云服务设备,包括:In a ninth aspect, an embodiment of the present application may provide a cloud service device, including:
处理器、存储器、接收器以及发送器;processors, memories, receivers and transmitters;
所述存储器存储计算机执行指令;the memory stores computer-executable instructions;
所述处理器执行所述存储器存储的计算机执行指令,使得所述处理器执行第三方面提供的异构网络设备的控制方法。The processor executes the computer-executed instructions stored in the memory, so that the processor executes the method for controlling a heterogeneous network device provided by the third aspect.
第十方面,本申请实施例可提供一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机执行指令,当所述计算机执行指令被处理器执行时用于实现前述第一方面提供的异构网络设备的控制方法。In a tenth aspect, embodiments of the present application may provide a computer-readable storage medium, where computer-executable instructions are stored in the computer-readable storage medium, and when the computer-executable instructions are executed by a processor, are used to implement the foregoing first aspect Provided is a control method for heterogeneous network devices.
第十一方面,本申请实施例可提供一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机执行指令,当所述计算机执行指令被处理器执行时用于实现前述第二方面提供的异构网络设备的控制方法。In an eleventh aspect, the embodiments of the present application may provide a computer-readable storage medium, where computer-executable instructions are stored in the computer-readable storage medium, and when the computer-executable instructions are executed by a processor, are used to implement the foregoing second A control method of a heterogeneous network device provided by the aspect.
第十二方面,本申请实施例可提供一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机执行指令,当所述计算机执行指令被处理器执行时用于实现前述第三方面提供的异构网络设备的控制方法。In a twelfth aspect, embodiments of the present application may provide a computer-readable storage medium, where computer-executable instructions are stored in the computer-readable storage medium, and when the computer-executable instructions are executed by a processor, are used to implement the third A control method of a heterogeneous network device provided by the aspect.
第十三方面,本申请实施例可提供一种芯片,包括:处理模块与通信接口,所述处理模块用于执行前述任一方面提供的异构网络设备的控制方法。In a thirteenth aspect, an embodiment of the present application may provide a chip, including: a processing module and a communication interface, where the processing module is configured to execute the control method for a heterogeneous network device provided in any of the foregoing aspects.
第十四方面,本申请实施例可提供一种计算机程序产品,包括计算机程序,所述计算机程序被处理器执行时实现前述任一方面提供的异构网络设备的控制方法。In a fourteenth aspect, embodiments of the present application may provide a computer program product, including a computer program, which, when executed by a processor, implements the control method for a heterogeneous network device provided in any of the foregoing aspects.
本申请实施例提供的异构网络设备的控制方法、装置、设备及存储介质,本方案中,通过具有异构网关能力的网关设备建立分别在第一网络和第二网络中通信的终端设备和子设备之间的连接,终端设备在需要对子设备进行控制时,可通过向所述该网关设备发送子设备控制请求,网关设备根据子设备控制请求向子设备发送操作请求,对子设备进行控制,实现对不用网络接入的设备的控制,提供一种异构网络设备控制的技术方案。In the control method, device, device, and storage medium for heterogeneous network devices provided by the embodiments of the present application, in this solution, a gateway device with heterogeneous gateway capability is used to establish terminal devices and sub-devices that communicate in the first network and the second network respectively. The connection between devices. When the terminal device needs to control the sub-device, it can control the sub-device by sending a sub-device control request to the gateway device, and the gateway device sends an operation request to the sub-device according to the sub-device control request. , realizes the control of equipment without network access, and provides a technical solution for the control of heterogeneous network equipment.
附图说明Description of drawings
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图做一简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following will briefly introduce the accompanying drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description These are some embodiments of the present application, and for those of ordinary skill in the art, other drawings can also be obtained from these drawings without any creative effort.
图1为本申请实施例提供的异构网络设备的控制方法的应用场景示意图;1 is a schematic diagram of an application scenario of a method for controlling a heterogeneous network device provided by an embodiment of the present application;
图2为本申请实施例提供的异构网络设备的控制方法的网络架构示意图;2 is a schematic diagram of a network architecture of a method for controlling a heterogeneous network device provided by an embodiment of the present application;
图3为本申请实施例提供的异构网络设备的控制方法实施例一的流程示意图;3 is a schematic flowchart of Embodiment 1 of a method for controlling a heterogeneous network device provided by an embodiment of the present application;
图4为本申请实施例提供的异构网络设备的控制方法实施例二的流程示意图;4 is a schematic flowchart of Embodiment 2 of a method for controlling a heterogeneous network device provided by an embodiment of the present application;
图5为本申请实施例提供的异构网络设备的控制方法实施例三的流程示意图;FIG. 5 is a schematic flowchart of Embodiment 3 of a method for controlling a heterogeneous network device provided by an embodiment of the present application;
图6为本申请实施例提供的异构网络设备的控制方法实施例四的流程示意图;FIG. 6 is a schematic flowchart of Embodiment 4 of a method for controlling a heterogeneous network device provided by an embodiment of the present application;
图7为本申请实施例提供的异构网络设备的控制装置实施例一的结构示意图;FIG. 7 is a schematic structural diagram of Embodiment 1 of a control apparatus for heterogeneous network equipment provided by an embodiment of the present application;
图8为本申请实施例提供的异构网络设备的控制装置实施例二的结构示意图;FIG. 8 is a schematic structural diagram of Embodiment 2 of a control apparatus for heterogeneous network equipment provided by an embodiment of the present application;
图9为本申请实施例提供的异构网络设备的控制装置实施例三的结构示意图;FIG. 9 is a schematic structural diagram of Embodiment 3 of a control apparatus for heterogeneous network equipment provided by an embodiment of the present application;
图10为本实施例提供的终端设备的结构示意图;FIG. 10 is a schematic structural diagram of a terminal device provided in this embodiment;
图11为本实施例提供的网关设备的结构示意图;FIG. 11 is a schematic structural diagram of a gateway device provided in this embodiment;
图12为本实施例提供的云服务设备的结构示意图。FIG. 12 is a schematic structural diagram of a cloud service device provided in this embodiment.
具体实施方式Detailed ways
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the purposes, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments It is a part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
本申请实施例的说明书、权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本申请的实施例例如能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。The terms "first", "second" and the like in the description, claims and the above-mentioned drawings of the embodiments of the present application are used to distinguish similar objects, and are not necessarily used to describe a specific sequence or sequence. It is to be understood that the data so used may be interchanged under appropriate circumstances such that the embodiments of the application described herein can, for example, be practiced in sequences other than those illustrated or described herein. Furthermore, the terms "comprising" and "having" and any variations thereof, are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those expressly listed Rather, those steps or units may include other steps or units not expressly listed or inherent to these processes, methods, products or devices.
在物联网的应用中,现有技术并未提供针对异构网络中的设备的控制方案。基于此,本申请提供一种异构网络设备的控制方案。In the application of the Internet of Things, the prior art does not provide a control scheme for devices in a heterogeneous network. Based on this, the present application provides a control solution for heterogeneous network devices.
该方案的整体思路基于网关设备的设计,网关设备具有桥接功能,发明人在实现该方案的过程中,考虑到可以将网关设备作为控制端的终端设备以及需要被控制的异构网络中的子设备之间的桥接设备,通过网关设备对子设备进行控制。The overall idea of this scheme is based on the design of gateway equipment, which has a bridging function. In the process of implementing this scheme, the inventor considers that the gateway equipment can be used as the terminal equipment of the control end and the sub-equipment in the heterogeneous network that needs to be controlled. The bridging device between the sub-devices is controlled by the gateway device.
图1为本申请实施例提供的异构网络设备的控制方法的应用场景示意图;图2为本申 请实施例提供的异构网络设备的控制方法的网络架构示意图。如图1和图2所示,该场景中至少包括:作为桥接设备的网关设备(也称为网关,gateway设备),作为控制端的终端设备,以及被控制的一个或者多个子设备。在该场景中,终端设备和网关设备之间的通信网络与网关设备与子设备之间的通信网络不同。FIG. 1 is a schematic diagram of an application scenario of a method for controlling a heterogeneous network device provided by an embodiment of the present application; FIG. 2 is a schematic diagram of a network architecture of the method for controlling a heterogeneous network device provided by an embodiment of the present application. As shown in FIG. 1 and FIG. 2 , the scenario includes at least: a gateway device (also referred to as a gateway, gateway device) as a bridge device, a terminal device as a control end, and one or more sub-devices to be controlled. In this scenario, the communication network between the terminal device and the gateway device is different from the communication network between the gateway device and the sub-devices.
网关设备支持在不同协议的网络进行通信。Gateway devices support communication over networks of different protocols.
终端设备可以是用户的手机,平板电脑等能够运行应用程序的智能设备。The terminal device may be a user's mobile phone, a tablet computer, or other smart devices capable of running applications.
子设备可以是物联网场景中的任意设备,例如:平板电脑,空调,冰箱,音箱等智能家电设备,还可以是智能家居系统,车辆等其他能够与网关之间建立通信连接的设备。Sub-devices can be any device in the IoT scenario, such as smart home appliances such as tablet computers, air conditioners, refrigerators, and speakers, and can also be smart home systems, vehicles, and other devices that can establish a communication connection with the gateway.
此外,该场景中还包括云服务设备,该云服务设备也可以称为云端或者云服务器等。In addition, the scenario also includes a cloud service device, and the cloud service device may also be called a cloud or a cloud server.
在本申请的方案的具体实现中,网关(Gateway)设备的设备模型上存在一个gateway Service;也就是说具有gatewayService的设备具有桥接其他协议设备入网的能力。该Service标识了其搭载的设备具有Gateway能力,其具体能力如下表:In the specific implementation of the solution of the present application, there is a gateway Service on the device model of the gateway (Gateway) device; that is to say, the device with the gateway Service has the ability to bridge other protocol devices to access the network. The Service identifies that the device it carries has the Gateway capability, and its specific capabilities are as follows:
Figure PCTCN2020130938-appb-000001
Figure PCTCN2020130938-appb-000001
基于上述场景,下面通过几个具体实例介绍本申请提供的异构网络设备控制方法的技术方案。Based on the above scenarios, the following describes the technical solutions of the heterogeneous network device control method provided by the present application through several specific examples.
图3为本申请实施例提供的异构网络设备的控制方法实施例一的流程示意图,如图3所示,该方案的实现中涉及到终端设备,网关设备以及子设备三个设备,其中,终端设备和网关设备之间通过第一网络通信,网关设备和子设备之间通过第二网络通信,第一网络和第二网络分别是不同协议的通信网络。该异构网络设备的控制方法具体包括以下步骤:FIG. 3 is a schematic flowchart of Embodiment 1 of a method for controlling heterogeneous network devices provided by an embodiment of the present application. As shown in FIG. 3 , the implementation of this solution involves three devices: a terminal device, a gateway device, and a sub-device, wherein, The terminal device and the gateway device communicate through a first network, and the gateway device and the sub-device communicate through a second network, and the first network and the second network are communication networks with different protocols respectively. The control method of the heterogeneous network device specifically includes the following steps:
S101:生成子设备控制请求,子设备控制请求中包括子设备在第一网络中的接入标识, 服务标识以及实例标识。S101: Generate a sub-device control request, where the sub-device control request includes an access identifier, a service identifier, and an instance identifier of the sub-device in the first network.
在本步骤中,在子设备通过第二网络接入网关设备,并在第一网络中进行配置之后,终端设备可以获取到子设备的相关信息,并通过网关设备对子设备进行控制。In this step, after the sub-device accesses the gateway device through the second network and is configured in the first network, the terminal device can obtain relevant information of the sub-device, and control the sub-device through the gateway device.
用户在需要通过终端设备对子设备进行控制时,或者终端设备需要根据预定的控制命令对子设备进行控制时,可根据用户的操作或者预设命令生成子设备控制请求。该请求中,至少需要包括该子设备在第一网络中的接入标识,服务标识以及实例标识。When the user needs to control the sub-device through the terminal device, or when the terminal device needs to control the sub-device according to a predetermined control command, a sub-device control request can be generated according to the user's operation or a preset command. The request needs to include at least the access identifier, service identifier and instance identifier of the sub-device in the first network.
该方案中,应理解,服务指的是一个独立的功能组,可以在不同类型的应用终端件复用,服务标识是为该服务分配的唯一的标识,用于在对子设备进行控制时使用。可选的,同一个设备可以有相同的两个服务。In this solution, it should be understood that a service refers to an independent functional group, which can be reused in different types of application terminals, and a service identifier is a unique identifier assigned to the service, which is used when controlling sub-devices . Optionally, the same device can have the same two services.
实例标识用于在一个服务内标识方法、属性或者事件。属性(property)为描述终端设备(或者应用终端)的状态和功能的最小单位,方法(action)是用以实现服务的特定功能,这类功能不能通过单个属性的读写来完成。事件(event)是终端设备主动上报中枢的特定信息属性标识。上述的操作,属性以及事件实际上指的是不同的能力,可以设置实例标识(iid)作为不同的具体实例的唯一的标识。即上述的实例标识是需要进行控制的任一操作,或者任一属性,或者任一事件的标识。Instance identifiers are used to identify methods, properties or events within a service. A property is the smallest unit that describes the state and function of a terminal device (or an application terminal), and an action is used to implement a specific function of a service, which cannot be accomplished by reading and writing a single property. An event is a specific information attribute identifier that the terminal device actively reports to the hub. The above operations, attributes and events actually refer to different capabilities, and an instance identifier (iid) can be set as a unique identifier for different specific instances. That is, the above instance identifier is the identifier of any operation that needs to be controlled, or any attribute, or any event.
在本步骤的一种具体实现中,终端设备要生成子设备控制请求,至少需要获取到子设备在第一网络中的设备能力集,然后根据所述子设备在所述第一网络中的设备能力集,生成所述子设备控制请求。In a specific implementation of this step, to generate a sub-device control request, the terminal device at least needs to obtain the device capability set of the sub-device in the first network, and then according to the device capability set of the sub-device in the first network The capability set is used to generate the sub-device control request.
设备能力集中包括所述子设备的基本信息以及能力信息,所述能力信息包括属性,方法和事件。具体的,所述子设备的基本信息包括所述接入标识。还可以包括子设备的设备类型,生产商,型号等基本的产品信息。The device capability set includes basic information and capability information of the sub-device, and the capability information includes attributes, methods and events. Specifically, the basic information of the sub-device includes the access identifier. It can also include basic product information such as the device type, manufacturer, and model of the sub-device.
S102:向网关设备发送子设备控制请求。S102: Send a sub-device control request to the gateway device.
在本步骤中,终端设备生成子设备控制请求之后,通过第一网络将该子设备控制请求发送给网关设备。网关设备接收终端设备发送的子设备控制请求,所述子设备控制请求包括子设备在第一网络中的接入标识,服务标识以及实例标识;所述实例标识为方法、属性以及事件中的任一能力的标识。In this step, after the terminal device generates the sub-device control request, it sends the sub-device control request to the gateway device through the first network. The gateway device receives the sub-device control request sent by the terminal device, and the sub-device control request includes the access ID, service ID and instance ID of the sub-device in the first network; the instance ID is any of the methods, attributes and events. An indicator of ability.
S103:根据子设备控制请求,向子设备发送操作请求。S103: Send an operation request to the sub-device according to the sub-device control request.
在本步骤中,网关设备在接收到的子设备控制请求之后,根据其中包括的在第一网络的接入标识,可以确定该子设备的产品标识。同时网关设备可以根据其中的服务标识和实例标识确定出实际需要控制子设备的执行的操作内容,并进一步生成操作请求。In this step, after receiving the sub-device control request, the gateway device may determine the product identification of the sub-device according to the access identification in the first network included therein. At the same time, the gateway device can determine the operation content that actually needs to control the execution of the sub-device according to the service identifier and the instance identifier, and further generate an operation request.
网关设备在生成操作请求之后,通过第二网络将该操作请求发送至子设备,从而实现对异构网络设备的控制。After generating the operation request, the gateway device sends the operation request to the sub-device through the second network, so as to realize the control of the heterogeneous network device.
可选的,在一种具体实施方式中,该子设备根据操作请求执行对应的操作,并在执行完之后通过第二网络向网关设备返回应答消息。网关设备可以将该应答消息转换为第一网络中的应答消息,并将该应答消息通过第一网络返回终端设备。Optionally, in a specific implementation manner, the sub-device executes the corresponding operation according to the operation request, and returns a response message to the gateway device through the second network after the execution is completed. The gateway device can convert the response message into a response message in the first network, and return the response message to the terminal device through the first network.
本实施例提供的异构网络设备控制方法,通过具有异构网关能力的网关设备建立分别在第一网络和第二网络中通信的终端设备和子设备之间的连接,终端设备在需要对子设备进行控制时,可通过向所述该网关设备发送子设备控制请求,网关设备根据子设备控制请求向子设备发送操作请求,对子设备进行控制,实现对不用网络接入的设备的控制,提供一种异构网络设备控制的技术方案。In the method for controlling heterogeneous network devices provided in this embodiment, a gateway device with heterogeneous gateway capability is used to establish a connection between a terminal device and sub-devices that communicate in the first network and the second network respectively. When controlling, the gateway device can send a sub-device control request to the gateway device, and the gateway device can send an operation request to the sub-device according to the sub-device control request to control the sub-device, so as to realize the control of the device without network access, and provide A technical solution for heterogeneous network device control.
图4为本申请实施例提供的异构网络设备的控制方法实施例二的流程示意图,如图4所示,本方案中包括该异构网络设备的控制方法中的发现网关设备,扫描子设备,以及配置子设备三个过程,这几个过程可以连续的执行。也可以在一定条件的触发下再分别执行,对此本方案不做限制。FIG. 4 is a schematic flowchart of Embodiment 2 of a method for controlling a heterogeneous network device provided by an embodiment of the present application. As shown in FIG. 4 , this solution includes a discovery gateway device and scanning sub-devices in the method for controlling a heterogeneous network device. , and three processes of configuring sub-devices, which can be executed continuously. It can also be executed separately under the trigger of certain conditions, which is not limited in this solution.
在上述实施例的基础上,本实施例提供的异构网络设备的控制方法包括以下步骤:On the basis of the foregoing embodiment, the control method for a heterogeneous network device provided by this embodiment includes the following steps:
一、发现网关设备的过程:1. The process of discovering the gateway device:
S201:终端设备确定网关设备。S201: The terminal device determines the gateway device.
在本步骤中,在终端设备准备通过网关设备对子设备进行控制的初始,首选需要发现合适的网关设备,至少可以通过以下几种方式进行实现:In this step, when the terminal device is ready to control the sub-device through the gateway device, it is first necessary to discover a suitable gateway device, which can be implemented in at least the following ways:
第一种方式,通过广播消息确定具有网关能力的设备作为所述网关设备,所述广播消息用于发现所述第一网络中具有网关能力的设备。In a first manner, a device with gateway capability is determined as the gateway device through a broadcast message, and the broadcast message is used to discover a device with gateway capability in the first network.
终端设备发送广播消息,然后根据接收到的响应消息确定具有网关能力的设备作为所述网关设备。The terminal device sends a broadcast message, and then determines a device with gateway capability as the gateway device according to the received response message.
在一种具体的实现中,终端设备可以通过安装的应用程序(application,APP)在本地发送广播消息,该广播消息用于发现本地网络中存在的具有gateway能力的设备,也就是网关设备。这里需要定义一个通用的coap接口:getGatewayDevice。In a specific implementation, the terminal device can send a broadcast message locally through an installed application program (application, APP), where the broadcast message is used to discover a gateway-capable device existing in the local network, that is, a gateway device. Here you need to define a general coap interface: getGatewayDevice.
网络中的任一设备接收到到该广播消息之后,确定自身是否具有网关能力,确定具备网关能力的网关设备向该终端设备返回响应,终端设备可以根据接收到的响应确定网关设备,该网关设备的数量可以是一个或者多个。After any device in the network receives the broadcast message, it determines whether it has the gateway capability, and determines that the gateway device with the gateway capability returns a response to the terminal device. The terminal device can determine the gateway device according to the received response. The number can be one or more.
举例来说,可以通过:Get coap://path/getGatewayDevice?gatewaytype=0,实现网关设备的发现。For example, via: Get coap://path/getGatewayDevice? gatewaytype=0, to realize the discovery of gateway devices.
第二种方式,从云服务设备获取在所述云服务设备注册的设备的能力;根据所述多个设备的能力,确定具有网关能力的设备作为所述网关设备。In the second manner, the capability of the device registered in the cloud service device is obtained from the cloud service device; according to the capabilities of the multiple devices, a device with gateway capability is determined as the gateway device.
在该方案中,终端设备可以通过与云端进行交互,每个设备接入网络之后均在云端进行了注册,也就是说云端包括各个网关设备的能力信息等,终端设备可以从云服务设备中获取到不同设备的能力,从而确定网关设备。In this solution, the terminal device can interact with the cloud, and each device is registered in the cloud after accessing the network, that is to say, the cloud includes the capability information of each gateway device, etc., and the terminal device can be obtained from the cloud service device. The ability to access different devices, thereby determining the gateway device.
在一种具体实现方式中,终端设备可以通过安装的APP从云端获取上述信息,当每个新设备注册到云平台后,APP设备都可以从云端获取到该设备的能力。In a specific implementation manner, the terminal device can obtain the above information from the cloud through the installed APP. After each new device is registered to the cloud platform, the APP device can obtain the capabilities of the device from the cloud.
第三种方式,终端设备可以通过发送广播消息,得到当前网络中的多个设备,然后直接与每个目标设备建立连接,通过单播的方式获取该设备的能力信息,进而发现目标设备的gateway能力,在通过gateway Type属性感知该目标设备的类型。通过该方法可以感知到APP可连接的那些设备支持gateway能力,从而确定网关设备。In the third method, the terminal device can obtain multiple devices in the current network by sending a broadcast message, and then directly establish a connection with each target device, obtain the capability information of the device through unicast, and then discover the gateway of the target device. Ability to perceive the type of the target device through the gateway Type attribute. Through this method, it can be perceived that those devices that the APP can connect to support the gateway capability, so as to determine the gateway device.
二、扫描子设备过程:Second, the process of scanning sub-devices:
S202:向网关设备发送扫描子设备请求。S202: Send a scan sub-device request to the gateway device.
在本步骤中,终端设备在确认了网关设备之后,需要通过网关设备对子设备进行发现,即扫描子设备。终端设备通过第一网络,向网关发送用于获取待入网子设备的产品标识的扫描子设备请求。In this step, after confirming the gateway device, the terminal device needs to discover the sub-devices through the gateway device, that is, scan the sub-devices. The terminal device sends a scanning sub-device request for acquiring the product identifier of the sub-device to be connected to the network to the gateway through the first network.
对于网关设备来说,则接收所述终端设备发送的扫描子设备请求。For the gateway device, the scanning sub-device request sent by the terminal device is received.
在该方案的具体实现中,应理解,若网络中只存在一个网关设备,那么则终端设备向该网关设备发送扫描子设备请求即可,若网络中存在多个网关设备,则终端设备需要调用所有的网关设备发起扫描待接入异构网络设备的请求。In the specific implementation of this solution, it should be understood that if there is only one gateway device in the network, then the terminal device can send a scan sub-device request to the gateway device. If there are multiple gateway devices in the network, the terminal device needs to call All gateway devices initiate a request to scan the heterogeneous network devices to be accessed.
S203:根据扫描子设备请求,调用子设备扫描功能进行子设备扫描,得到子设备的产品标识和子设备的信号强度。S203: According to the request for scanning the sub-device, call the sub-device scanning function to scan the sub-device, and obtain the product identifier of the sub-device and the signal strength of the sub-device.
在本步骤中,网关设备接收到扫描子设备请求之后,调用设备扫描功能进行扫描,可以得到还未接入的子设备的产品标识,同时可以检测到每个子设备的信号强度。In this step, after receiving the request to scan sub-devices, the gateway device invokes the device scanning function to scan, and can obtain product identifiers of sub-devices that have not yet been connected, and can detect the signal strength of each sub-device.
例如:终端设备通过安装的APP向gateway设备发送扫描子设备请求;调用网关设备的scanSubdevices action。通过Service ID和iid(方法标识)来标识该方法。Gateway设备会发起扫描流程,在此过程中,可以发现没有加入到gateway所在的异构网络的子设备的产品标识,以及待接入异构网络设备获取的信号强度(Received Signal Strength Indication,rssi)。For example, the terminal device sends a scan subdevice request to the gateway device through the installed APP; calls the scanSubdevices action of the gateway device. The method is identified by its Service ID and iid (method identifier). The gateway device will initiate a scanning process. During this process, you can find the product identifiers of the sub-devices that are not added to the heterogeneous network where the gateway is located, and the signal strength (Received Signal Strength Indication, rssi) obtained by the device to be connected to the heterogeneous network. .
若终端设备调用了多个网关设备的子设备扫描功能,则获取待接入的子设备与不同gateway设备的产品标识和对应的rssi值。If the terminal device invokes the sub-device scanning function of multiple gateway devices, the product identifiers and corresponding rssi values of the sub-devices to be accessed and different gateway devices are acquired.
S204:接收网关设备返回的子设备的产品标识和子设备的信号强度。S204: Receive the product identifier of the sub-device and the signal strength of the sub-device returned by the gateway device.
在本步骤中,所有的网关设备将扫描到的子设备的产品标识和信号强度返回给终端设备,完成子设备的扫描过程。In this step, all gateway devices return the scanned product identification and signal strength of the sub-devices to the terminal device to complete the scanning process of the sub-devices.
三、配置子设备过程:Three, configure the sub-device process:
S205:向网关设备发送子设备认证请求。S205: Send a sub-device authentication request to the gateway device.
在本步骤中,终端设备在得到网关设备返回的子设备的产品标识和信号强度之后,基于子设备的产品标识和所述子设备的信号强度,向网关设备发送用于指示所述网关设备对所述子设备进行认证的请求。In this step, after the terminal device obtains the product identifier and signal strength of the sub-device returned by the gateway device, based on the product identifier of the sub-device and the signal strength of the sub-device, the terminal device sends to the gateway device a message indicating that the gateway device is paired with The sub-device makes a request for authentication.
在该方案中,应该理解,若终端设备调用了多个网关设备进行子设备扫描,即确定的网关设备的数量为多个,则根据所述子设备的产品标识,向多个网关设备中获取到的信号强度最高的网关设备发送所述子设备认证请求。In this solution, it should be understood that if the terminal device calls multiple gateway devices to scan sub-devices, that is, the number of gateway devices is determined to be multiple, then according to the product identifiers of the sub-devices, it will be obtained from the multiple gateway devices. The received gateway device with the highest signal strength sends the sub-device authentication request.
S206:根据子设备认证请求对子设备进行认证和接入,并获取云服务设备为子设备分配的在第一网络中的接入标识。S206: Authenticate and access the sub-device according to the sub-device authentication request, and acquire the access identifier in the first network allocated by the cloud service device to the sub-device.
在本步骤中,网关设备在接收到子设备认证请求之后,基于该子设备的产品标识以及其他的基本信息,对该子设备进行验证,确认子设备的合法性,子设备也对云端进行认证,完成双方的验证过程,子设备通过另一种协议,也就是第二网络接入该网关设备。In this step, after receiving the sub-device authentication request, the gateway device verifies the sub-device based on the product identification of the sub-device and other basic information to confirm the legitimacy of the sub-device, and the sub-device also authenticates the cloud. , to complete the verification process of both parties, and the sub-device accesses the gateway device through another protocol, that is, the second network.
举例来说,终端设备可以选择获取的rssi最高的Gateway设备执行认证子设备setupSubdevice action(如果仅一台gateway设备,直接选定该gateway设备)。Gateway设备收到上述请求之后,首先将该待接入的在异构网络中的子设备,接入到Gateway所属的异构网络。然后发起该子设备与接入网络间的认证包括子设备的认证以及对云端的认证等;总值,认证流程就是云端确认设备是合法的,设备确认云端是合法的。在认证结束之后,接入网络(也就是第一网络)的云端会分配给该子设备一接入标识,该接入标识是该子设备在待接入网络(第一网络)的一个标识。For example, the terminal device can select the gateway device with the highest rssi to execute the authentication sub-device setupSubdevice action (if there is only one gateway device, directly select the gateway device). After receiving the above request, the Gateway device firstly connects the to-be-connected sub-device in the heterogeneous network to the heterogeneous network to which the Gateway belongs. Then, the authentication between the sub-device and the access network is initiated, including sub-device authentication and cloud authentication. In total, the authentication process is that the cloud confirms that the device is legal, and the device confirms that the cloud is legal. After the authentication is completed, the cloud accessing the network (that is, the first network) will assign an access identifier to the sub-device, and the access identifier is an identifier of the sub-device in the network to be accessed (the first network).
在该过程中,云端(也就是云服务设备)与网关设备进行交互,接收网关设备发送的子设备认证请求,子设备认证请求包括子设备的标识和身份信息;根据子设备认证请求对子设备进行认证,并在认证通过后为子设备生成在第一网络中的接入标识;将子设备的在第一网络的接入标识发送至网关设备。In this process, the cloud (that is, the cloud service device) interacts with the gateway device, and receives the sub-device authentication request sent by the gateway device. The sub-device authentication request includes the identification and identity information of the sub-device; the sub-device is authenticated according to the sub-device authentication request. Perform authentication, and generate an access identifier in the first network for the sub-device after the authentication is passed; send the access identifier of the sub-device in the first network to the gateway device.
S207:将子设备在第一网络中的接入标识发送至终端设备。S207: Send the access identifier of the sub-device in the first network to the terminal device.
本步骤为可选步骤,在完成子设备的认证和接入过程之后,网关设备还可以将得到的子设备在第一网络中的接入标识发送给终端设备,终端设备接收所述网关设备发送的所述子设备在所述第一网络中的接入标识。This step is an optional step. After completing the authentication and access process of the sub-device, the gateway device may also send the obtained access identifier of the sub-device in the first network to the terminal device, and the terminal device receives the sent by the gateway device. the access identifier of the sub-device in the first network.
举例来说,网关设备在执行完方法后会将从云端得到的子设备在第一网络中的接入标识通过第一网络返回给终端设备的APP。APP可以使用该接入标识去确认该子设备是否接入成功。For example, after executing the method, the gateway device will return the access identifier of the sub-device in the first network obtained from the cloud to the APP of the terminal device through the first network. The APP can use the access identifier to confirm whether the sub-device is successfully connected.
在完成子设备的配置接入过程之后,网关设备需要为子设备在网关设备上生成一个虚拟设备,终端设备可以通过操作虚拟设备间接控制子设备,即该虚拟设备可以对第一网络和第二网络之间的消息进行转换。或者网关设备为子设备生成一个第一网络能够识别的设备能力集(profile),即一个能力的描述文件,该profile中包含该子设备的基本信息以及能力信息,具体的,该子设备的基本信息包括在第一网络中的接入标识,生产商、产品类别、型号等信息中的至少之一,能力信息包括属性、方法、事件等。下面对该过程通过具体的实施方式进行介绍。After completing the configuration and access process of the sub-device, the gateway device needs to generate a virtual device on the gateway device for the sub-device, and the terminal device can indirectly control the sub-device by operating the virtual device, that is, the virtual device can control the first network and the second network. Messages are converted between networks. Or the gateway device generates a device capability set (profile) that can be identified by the first network for the sub-device, that is, a capability description file, and the profile includes the basic information and capability information of the sub-device, specifically, the basic information of the sub-device. The information includes an access identifier in the first network, at least one of information such as manufacturer, product category, and model, and the capability information includes attributes, methods, events, and the like. The process is described below through specific implementations.
图5为本申请实施例提供的异构网络设备的控制方法实施例三的流程示意图,如图5所示,由于在后续终端设备在对子设备进行控制时需要获取到子设备在第一网络中的能力 集,该设备能力集终端设备可以从网关设备处获取,也可以直接与云端交互获取。因此本实施例简单介绍在子设备接入之后的过程,包括获取子设备在第一网络的能力集以及影子设备的创建和状态更新。FIG. 5 is a schematic flowchart of Embodiment 3 of a method for controlling a heterogeneous network device provided by an embodiment of the present application. As shown in FIG. 5 , since the subsequent terminal device controls the sub-device, it needs to obtain information about the location of the sub-device in the first network. The capability set in the device capability set can be obtained by the terminal device from the gateway device or directly interacted with the cloud. Therefore, this embodiment briefly introduces the process after the sub-device is connected, including acquiring the capability set of the sub-device in the first network, and creating and updating the status of the shadow device.
在上述实施例的基础,在对子设备进行认证和接入后,该异构网络设备的控制方法还包括以下步骤:On the basis of the above embodiment, after the sub-device is authenticated and accessed, the control method of the heterogeneous network device further includes the following steps:
一、获取子设备在第一网络的能力集的过程:1. The process of obtaining the capability set of the sub-device in the first network:
S301:根据子设备的设备类型和在第二网络中的设备能力集,生成子设备在第一网络中的设备能力集。S301: Generate a device capability set of the sub-device in the first network according to the device type of the sub-device and the device capability set in the second network.
在该方案中,网关设备有两种的获取到子设备在第一网络设备中的设备能力集的方式,网关设备可以根据子设备的设备类型,以及该子设备在第二网络中的设备能力集等信息,在本地生成在第一网络中的设备能力集。In this solution, the gateway device has two ways to obtain the device capability set of the sub-device in the first network device. The gateway device can obtain the device capability set of the sub-device according to the device type of the sub-device and the device capability of the sub-device in the second network. set and other information, and locally generate the device capability set in the first network.
在该方案中,网关设备可以根据子设备的设备类型来完成在当前协议,也就是第一网络中的子设备的能力集的生成。具体的,现阶段主要涉及ZigBee设备和蓝牙(bluetooth,BT)设备,通过生成在第一网络中的设备能力集实现ZigBee设备或者BT设备与第一那个楼中的设备类型的匹配。将在第二网络中的property对应到第一网络中的service中的property,然后确定属于该第一网络的服务标识,对应生成具体的属性,事件以及方法等唯一的标识,得到能力信息。In this solution, the gateway device can complete the generation of the capability set of the sub-device in the current protocol, that is, the sub-device in the first network, according to the device type of the sub-device. Specifically, the current stage mainly involves ZigBee devices and Bluetooth (bluetooth, BT) devices, and the matching of ZigBee devices or BT devices with the device types in the first building is realized by generating the device capability set in the first network. Corresponding the property in the second network to the property in the service in the first network, then determining the service identifier belonging to the first network, and correspondingly generating unique identifiers such as specific attributes, events and methods to obtain capability information.
另一种方式可以将相关内容发送至云端,由云端进行设备能力集的生成,具体如步骤S302-S304。In another way, the relevant content may be sent to the cloud, and the cloud will generate the device capability set, specifically as steps S302-S304.
S302:向云服务设备发送子设备的设备类型和子设备在第二网络中的设备能力集。S302: Send the device type of the sub-device and the device capability set of the sub-device in the second network to the cloud service device.
在本步骤中,网关设备向云服务设备发送能力集生成请求,云服务设备接收所述网关设备发送的能力集生成请求,所述能力集生成请求中包括所述子设备的设备类型和所述子设备在第二网络中的设备能力集。In this step, the gateway device sends a capability set generation request to the cloud service device, and the cloud service device receives the capability set generation request sent by the gateway device, where the capability set generation request includes the device type of the sub-device and the The device capability set of the sub-device in the second network.
S303:根据能力集生成请求,为子设备生成在第一网络中的设备能力集。S303: Generate a device capability set in the first network for the sub-device according to the capability set generation request.
在本步骤中,云端设备根据接收到的信息以及该子设备在第一网络中的接入标识以及在第二网络中的能力信息,生成对应的在第一网络中的设备能力集,该子设备在第一网络中的设备能力集包括子设备的基本信息和能力信息,所述能力信息包括属性,方法和事件,所述子设备的基本信息中包括在所述第一网络中的接入标识。In this step, the cloud device generates a corresponding device capability set in the first network according to the received information and the access identifier of the sub-device in the first network and the capability information in the second network. The device capability set of the device in the first network includes basic information and capability information of the sub-device, the capability information includes attributes, methods and events, and the basic information of the sub-device includes access in the first network logo.
S304:将子设备在第一网络中的设备能力集发送至网关设备。S304: Send the device capability set of the sub-device in the first network to the gateway device.
在本步骤中,云服务器设备将生成的子设备在第一网络中的设备能力集返回网关设备,网关设备接收所述云服务设备返回的所述子设备在所述第一网络中的设备能力集。In this step, the cloud server device returns the generated device capability set of the sub-device in the first network to the gateway device, and the gateway device receives the device capability of the sub-device in the first network returned by the cloud service device set.
可选的,在本实施例中网关设备还可以根据子设备在所述第一网络中的设备能力集在本地生成虚拟设备。Optionally, in this embodiment, the gateway device may also generate a virtual device locally according to the device capability set of the sub-device in the first network.
基于上述方案,在一种具体实例中,Gateway设备根据子设备的设备类型,在本地自动生成第一网络可识别的设备能力集(profile);在新生成的profile中应包含子设备的设备类型、包含服务(service)标识和服务中的实例标识,并为每一属性、方法、事件分配唯一的实例标识。Based on the above solution, in a specific example, the Gateway device automatically generates a device capability set (profile) identifiable by the first network locally according to the device type of the sub-device; the newly generated profile should include the device type of the sub-device , contains the service identifier and the instance identifier in the service, and assigns a unique instance identifier to each attribute, method, and event.
或者,Gateway设备向云端获取子设备在第一网络可识别的设备能力集以及该子设备的接入标识。该请求中需要携带子设备的设备类型、以及子设备在第二网络可识别的设备能力集(profile);云端根据获取的第二网络可识别的profile生成对应的第一网络可识别的profile并发送给gateway。Gateway根据收到的信息可以在其上生成一个虚拟设备。云平台生成新的profile之后,也可以根据自动生成影子设备或者等待Gateway的命令生成影子设备,该影子设备作为子设备在第一网络中的映射。Or, the Gateway device obtains from the cloud a device capability set recognizable by the sub-device on the first network and an access identifier of the sub-device. The request needs to carry the device type of the sub-device and the device capability set (profile) identifiable by the sub-device on the second network; the cloud generates a corresponding profile identifiable by the first network according to the acquired profile identifiable by the second network and Send to gateway. Gateway can generate a virtual device on it according to the received information. After the cloud platform generates a new profile, it can also generate a shadow device according to automatically generating a shadow device or waiting for a command from the Gateway, and the shadow device is used as the mapping of the child device in the first network.
二、影子设备创建和状态更新过程:2. Shadow device creation and status update process:
S401:根据子设备在第一网络中的设备能力集,生成子设备在第一网络中映射的影子 设备。S401: Generate a shadow device mapped by the sub-device in the first network according to the device capability set of the sub-device in the first network.
S402:获取子设备的当前状态。S402: Obtain the current state of the sub-device.
S403:将子设备的当前状态发送至云服务设备。S403: Send the current state of the sub-device to the cloud service device.
对于云服务设备来说,则接收所述网关设备发送的所述子设备的当前状态。For the cloud service device, the current state of the sub-device sent by the gateway device is received.
S403:根据子设备的当前状态,对影子设备的状态进行更新。S403: Update the state of the shadow device according to the current state of the child device.
在上述步骤中,云服务设备可以在获取到子设备在第一网络中的设备能力集之后,在本地生成子设备在第一网络中映射,也就是该影子设备,在后续过程中,网关设备与子设备通过第二网络交互,可以获取到子设备的当前状态并发送给云服务设备对影子设备的状态进行更新。In the above steps, after acquiring the device capability set of the sub-device in the first network, the cloud service device may locally generate a mapping of the sub-device in the first network, that is, the shadow device. In the subsequent process, the gateway device By interacting with the sub-device through the second network, the current state of the sub-device can be acquired and sent to the cloud service device to update the state of the shadow device.
举例来说,若是Gateway设备在本地生成的子设备在第一网络中的设备能力集,则向云端特定接口发送创建影子设备请求;该请求中携带生成的子设备在第一网络中的设备能力集(profile),该profile中包含了设备的基本信息以及设备的能力信息(方法、属性、事件))。云端创建了影子设备之后,Gateway设备获取子设备的当前状态并向影子设备同步当前的状态。在做全量更新的时候需要设定全量更新标识为true;当后面状态发生变更的时候需要关闭全量更新标识。For example, if the gateway device generates the device capability set of the sub-device in the first network locally, a request to create a shadow device is sent to the specific interface of the cloud; the request carries the generated device capability of the sub-device in the first network. Set (profile), the profile contains the basic information of the device and the capability information (methods, attributes, events) of the device). After the cloud creates the shadow device, the Gateway device obtains the current state of the child device and synchronizes the current state with the shadow device. When doing a full update, you need to set the full update flag to true; when the state changes later, you need to turn off the full update flag.
综上所述,网关设备和云服务设备均获取了子设备在第一网络中的设备能力集,终端设备在对子设备进行控制时,可以从网关设备或者云服务设备中获取该子设备在第一网络中的设备能力集。To sum up, both the gateway device and the cloud service device have acquired the device capability set of the sub-device in the first network. When the terminal device controls the sub-device, it can obtain the sub-device from the gateway device or the cloud service device. A set of device capabilities in the first network.
图6为本申请实施例提供的异构网络设备的控制方法实施例四的流程示意图,如图6所示,在上述任一实施例的基础上,在完成子设备接入,终端设备还需要获取几个其他信息,则可以通过网关设备对子设备进行控制,具体的,本实施例中主要包括终端设备获取子设备列表,获取设备能力集以及子设备控制几个过程。FIG. 6 is a schematic flowchart of Embodiment 4 of a method for controlling heterogeneous network devices provided by an embodiment of the present application. As shown in FIG. 6 , on the basis of any of the above embodiments, after completing the access of sub-devices, the terminal device also needs to After acquiring several other pieces of information, the gateway device can control the sub-devices. Specifically, in this embodiment, the terminal device mainly includes several processes of acquiring the sub-device list, acquiring the device capability set, and sub-device control.
具体的,本实施例提供的异构网络设备的控制方法包括以下步骤:Specifically, the control method for a heterogeneous network device provided by this embodiment includes the following steps:
一、获取子设备列表过程:1. The process of obtaining the list of sub-devices:
S501:向网关设备发送列表获取请求。S501: Send a list acquisition request to the gateway device.
在本步骤中,终端设备向网关设备发送的所述列表获取请求用于获取所述网关设备桥接的异构网络的设备列表。In this step, the list acquisition request sent by the terminal device to the gateway device is used to acquire the device list of the heterogeneous network bridged by the gateway device.
S502:根据列表获取请求,获取子设备列表。S502: Acquire a list of sub-devices according to the list acquisition request.
网关设备在接收到列表获取请求之后,将已经通过与第一网络不同的网络接入网关设备,且在云端进行了注册,得到了在第一网络设备中的接入标识的一个或者多个子设备进行汇总,得到子设备列表,该子设备列表中包括至少一个与所述终端设备属于不同网络的子设备的接入标识。After the gateway device receives the list acquisition request, it will have accessed the gateway device through a network different from the first network, and has registered in the cloud to obtain one or more sub-devices with access identifiers in the first network device Summarize to obtain a sub-device list, where the sub-device list includes at least one access identifier of a sub-device that belongs to a different network from the terminal device.
S503:将子设备列表发送至终端设备。S503: Send the sub-device list to the terminal device.
网关设备获取到子设备列表之后,将其通过一网络发送至终端设备。After the gateway device obtains the list of sub-devices, it sends it to the terminal device through a network.
综上所述,终端设备在对子设备进行控制之前,需要与网关进行交互获取到子设备列表,以便用户在控制或者设置控制命令时选择要控制的子设备。To sum up, before the terminal device controls the sub-devices, it needs to interact with the gateway to obtain the sub-device list, so that the user can select the sub-device to be controlled when controlling or setting a control command.
举例来说,终端设备上安装的APP可以向Gateway设备获取其负责桥接的异构网络设备的列表,即子设备列表。子设备就是该Gateway设备负责桥接的异构网络设备。具体的,可以通过调用getSubDeviceList的方法实现。For example, an APP installed on a terminal device can obtain a list of heterogeneous network devices that it is responsible for bridging from the Gateway device, that is, a list of sub-devices. Sub-devices are heterogeneous network devices that the Gateway device is responsible for bridging. Specifically, it can be implemented by calling the method of getSubDeviceList.
二、获取设备能力集过程:2. The process of obtaining the device capability set:
S504:向网关设备发送设备能力集获取请求。S504: Send a device capability set acquisition request to the gateway device.
所述设备能力集获取请求用于获取所述子设备在所述第一网络中的设备能力集。The device capability set acquisition request is used to acquire the device capability set of the sub-device in the first network.
S505:根据设备能力集获取请求,获取子设备在第一网络中的设备能力集。S505: Acquire the device capability set of the sub-device in the first network according to the device capability set acquisition request.
在本步骤中,网关设备在接收到设备能力集获取请求之后,若网关设备已经预先得到的子设备在第一网络设备中的设备能力集,则可以直接从本地存储的内容中获取该子设备 在第一网络中的设备能力集。或者也可以通过前述图5所示的实施例中提供的两种方式获取该子设备在第一网络中的设备能力集,图5中两种获取设备能力集的方式一般来说会在终端设备获取设备能力集之前执行,但是在具体实现中,也不限于在终端设备需要获取的时候再执行。对此本方案不做限制。In this step, after the gateway device receives the device capability set acquisition request, if the gateway device has obtained the device capability set of the sub-device in the first network device in advance, it can directly acquire the sub-device from the locally stored content A set of device capabilities in the first network. Alternatively, the device capability set of the sub-device in the first network can also be acquired through the two methods provided in the embodiment shown in FIG. 5. Generally speaking, the two methods of acquiring the device capability set in FIG. The execution is performed before the acquisition of the device capability set, but in a specific implementation, it is not limited to be executed when the terminal device needs to acquire. There is no restriction on this program.
在本方案中,应理解,所述子设备在第一网络中的设备能力集包括所述子设备的基本信息和能力信息,所述能力信息包括属性,方法和事件,所述子设备的基本信息中包括在所述第一网络中的接入标识。In this solution, it should be understood that the device capability set of the sub-device in the first network includes basic information and capability information of the sub-device, and the capability information includes attributes, methods and events. The information includes an access identifier in the first network.
S506:将子设备在第一网络中的设备能力集发送至终端设备。S506: Send the device capability set of the sub-device in the first network to the terminal device.
网关设备将获取到的设备能力集通过第一网络返回终端设备,终端设备接收到要控制的子设备在第一网络中的设备能力集。The gateway device returns the acquired device capability set to the terminal device through the first network, and the terminal device receives the device capability set of the sub-device to be controlled in the first network.
综上所述,终端设备在对子设备进行控制之前,可以与网关进行交互获取到子设备在第一网络中的设备能力集,以便用户在控制或者设置控制命令时选择要控制的子设备。To sum up, before controlling the sub-device, the terminal device can interact with the gateway to obtain the device capability set of the sub-device in the first network, so that the user can select the sub-device to be controlled when controlling or setting a control command.
举例来说,终端设备上的APP也可以向Gateway设备发送获取异构网络设备能力集的请求。Gateway设备根据前述实施例中所公开的步骤获取到的可以被第一网络识别的设备能力集(Profile),来应答APP。Profile包含了:子设备的基本信息(接入标识、厂家等信息)以及能力信息(属性、方法、事件)。For example, the APP on the terminal device can also send a request for acquiring the capability set of the heterogeneous network device to the Gateway device. The Gateway device responds to the APP according to the device capability set (Profile) that can be identified by the first network obtained by the steps disclosed in the foregoing embodiments. Profile includes: basic information of sub-devices (access ID, manufacturer, etc.) and capability information (attributes, methods, events).
三、子设备控制过程:3. Sub-device control process:
S507:向网关设备发送子设备控制请求。S507: Send a sub-device control request to the gateway device.
S508:根据子设备控制请求,向子设备发送操作请求S508: Send an operation request to the sub-device according to the sub-device control request
该子设备控制过程与图3所示实施例中的具体实现过程类似,在此不再赘述。The control process of the sub-device is similar to the specific implementation process in the embodiment shown in FIG. 3 , and details are not repeated here.
在网关设备中的虚拟设备可以将接收到的子设备控制请求转换成对子设备的操作请求,并向子设备发送操作请求。子设备根据操作请求执行对应的操作,并在执行完之后向网关设备返回应答消息。网关设备中的虚拟设备可以将该应答消息转换为第一网络中的应答消息,并将该应答消息通过第一网络返回终端设备。The virtual device in the gateway device can convert the received sub-device control request into an operation request for the sub-device, and send the operation request to the sub-device. The sub-device executes the corresponding operation according to the operation request, and returns a response message to the gateway device after the execution is completed. The virtual device in the gateway device can convert the response message into a response message in the first network, and return the response message to the terminal device through the first network.
综上所述,本申请各个实施例提供的异构网络设备的控制方法,涉及了终端设备发现网关设备,子设备扫描,子设备接入认证,终端设备获取子设备列表以及设备能力集,以及终端设备通过网关设备对异构网络中的子设备进行控制的过程。通过具有异构网关能力的网关设备建立分别在第一网络和第二网络中通信的终端设备和子设备之间的连接,终端设备在需要对子设备进行控制时,可通过向所述该网关设备发送子设备控制请求,网关设备根据子设备控制请求向子设备发送操作请求,对子设备进行控制,实现对不用网络接入的设备的控制,提供一种异构网络设备控制的技术方案。进一步的,还提供了一种在设备跨平台接入的场景下,对设备进行升级的解决方案。To sum up, the control methods for heterogeneous network devices provided by various embodiments of the present application involve the terminal device discovering the gateway device, sub-device scanning, sub-device access authentication, the terminal device acquiring the sub-device list and the device capability set, and The process in which the terminal device controls the sub-devices in the heterogeneous network through the gateway device. A connection between a terminal device and a sub-device communicating in the first network and the second network is established through a gateway device with heterogeneous gateway capabilities. When the terminal device needs to control the sub-device, it can pass the gateway device to the gateway device. A sub-device control request is sent, and the gateway device sends an operation request to the sub-device according to the sub-device control request, so as to control the sub-device, realize the control of the device without network access, and provide a technical solution for heterogeneous network device control. Further, a solution for upgrading the device under the scenario of cross-platform access of the device is also provided.
图7为本申请实施例提供的异构网络设备的控制装置实施例一的结构示意图,如图7所示,该异构网络设备的控制装置10包括:处理模块11,发送模块12以及接收模块13;FIG. 7 is a schematic structural diagram of Embodiment 1 of a control apparatus for heterogeneous network equipment provided by an embodiment of the present application. As shown in FIG. 7 , the control apparatus 10 for heterogeneous network equipment includes: a processing module 11 , a sending module 12 and a receiving module 13;
所述处理模块11用于生成子设备控制请求,所述子设备控制请求中包括子设备在第一网络中的接入标识,服务标识以及实例标识;The processing module 11 is configured to generate a sub-device control request, where the sub-device control request includes an access identifier, a service identifier and an instance identifier of the sub-device in the first network;
所述发送模块12用于向网关设备发送所述子设备控制请求;其中,所述网关设备与所述异构网络设备的控制装置通过所述第一网络通信,所述网关设备与所述子设备通过第二网络通信。The sending module 12 is configured to send the sub-device control request to the gateway device; wherein, the gateway device communicates with the control device of the heterogeneous network device through the first network, and the gateway device communicates with the sub-device. The devices communicate over the second network.
可选的,所述实例标识用于在一个服务内标识方法、属性或者事件。Optionally, the instance identifier is used to identify methods, properties or events within a service.
在上述实施例的基础上,可选的,所述处理模块11具体用于:On the basis of the foregoing embodiment, optionally, the processing module 11 is specifically configured to:
根据用户的操作以及预先获取的所述子设备在所述第一网络中的设备能力集,生成所述子设备控制请求;generating the sub-device control request according to the user's operation and the pre-obtained device capability set of the sub-device in the first network;
其中,所述设备能力集中包括所述子设备的基本信息以及能力信息,所述能力信息包 括属性,方法和事件,所述子设备的基本信息包括所述接入标识。The device capability set includes basic information and capability information of the sub-device, the capability information includes attributes, methods and events, and the basic information of the sub-device includes the access identifier.
可选的,在异构网络设备的控制装置10的另一种具体实施方式中,Optionally, in another specific implementation manner of the control apparatus 10 for heterogeneous network devices,
所述发送模块12还用于向所述网关设备发送列表获取请求;所述列表获取请求用于获取所述网关设备桥接的异构网络的设备列表;The sending module 12 is further configured to send a list acquisition request to the gateway device; the list acquisition request is used to acquire the device list of the heterogeneous network bridged by the gateway device;
所述接收模块13还用于接收所述网关设备发送的所述子设备列表,所述子设备列表中包括至少一个与所述异构网络设备的控制装置属于不同网络的子设备的接入标识。The receiving module 13 is further configured to receive the sub-device list sent by the gateway device, where the sub-device list includes at least one access identifier of a sub-device that belongs to a different network from the control apparatus of the heterogeneous network device. .
可选的,在异构网络设备的控制装置10的另一种具体实施方式中,Optionally, in another specific implementation manner of the control apparatus 10 for heterogeneous network devices,
所述发送模块12还用于向所述网关设备发送设备能力集获取请求,所述设备能力集获取请求用于获取所述子设备在所述第一网络中的设备能力集;The sending module 12 is further configured to send a device capability set acquisition request to the gateway device, where the device capability set acquisition request is used to acquire the device capability set of the sub-device in the first network;
所述接收模块13还用于接收所述网关设备发送的所述子设备在所述第一网络中的设备能力集。The receiving module 13 is further configured to receive the device capability set of the sub-device in the first network sent by the gateway device.
可选的,在异构网络设备的控制装置10的另一种具体实施方式中,Optionally, in another specific implementation manner of the control apparatus 10 for heterogeneous network devices,
所述发送模块12还用于向所述网关设备发送扫描子设备请求,所述扫描子设备请求用于获取待入网子设备的产品标识;The sending module 12 is further configured to send a scanning sub-device request to the gateway device, where the scanning sub-device request is used to obtain the product identifier of the sub-device to be connected to the network;
所述接收模块13还用于接收所述网关设备返回的子设备的产品标识和子设备的信号强度;The receiving module 13 is further configured to receive the product identification of the sub-device and the signal strength of the sub-device returned by the gateway device;
所述发送模块12还用于根据所述子设备的标识和所述子设备的信号强度,向所述网关设备发送子设备认证请求,所述子设备认证请求用于指示所述网关设备对所述子设备进行认证。The sending module 12 is further configured to send a sub-device authentication request to the gateway device according to the identifier of the sub-device and the signal strength of the sub-device, where the sub-device authentication request is used to instruct the gateway device to The sub-device is authenticated.
可选的,所述接收模块13还用于接收所述网关设备发送的所述子设备在所述第一网络中的接入标识。Optionally, the receiving module 13 is further configured to receive the access identifier of the sub-device in the first network sent by the gateway device.
可选的,在异构网络设备的控制装置10的另一种具体实施方式中,Optionally, in another specific implementation manner of the control apparatus 10 for heterogeneous network devices,
所述处理模块11还用于通过广播消息确定具有网关能力的设备作为所述网关设备,所述广播消息用于发现所述第一网络中具有网关能力的设备;The processing module 11 is further configured to determine a device with gateway capability as the gateway device through a broadcast message, and the broadcast message is used to discover the device with gateway capability in the first network;
或者,or,
所述处理模块11还用于从云服务设备获取在所述云服务设备注册的设备的能力;The processing module 11 is further configured to acquire the capability of the device registered in the cloud service device from the cloud service device;
所述处理模块11还用于根据所述多个设备的能力,确定具有网关能力的设备作为所述网关设备。The processing module 11 is further configured to determine a device with gateway capability as the gateway device according to the capabilities of the multiple devices.
可选的,在异构网络设备的控制装置10的另一种具体实施方式中,若确定的网关设备的数量为多个,则所述发送模块12具体用于:Optionally, in another specific implementation manner of the control apparatus 10 for heterogeneous network devices, if the number of gateway devices determined is multiple, the sending module 12 is specifically configured to:
根据所述子设备的标识,向多个网关设备中获取到的信号强度最高的网关设备发送所述子设备认证请求。According to the identifier of the sub-device, the sub-device authentication request is sent to the gateway device with the highest signal strength obtained from the multiple gateway devices.
上述任一实施方式提供的异构网络设备的控制装置,用于执行前述任一方法实施例中的终端设备(APP)侧的技术方案,其实现原理和技术效果类似,在此不再赘述。The apparatus for controlling heterogeneous network equipment provided in any of the foregoing embodiments is used to execute the technical solution on the terminal device (APP) side in any of the foregoing method embodiments, and its implementation principles and technical effects are similar, and will not be repeated here.
图8为本申请实施例提供的异构网络设备的控制装置实施例二的结构示意图,如图8所示,该异构网络设备的控制装置20包括:处理模块21,接收模块22以及发送模块23;FIG. 8 is a schematic structural diagram of Embodiment 2 of a control apparatus for heterogeneous network equipment provided by an embodiment of the present application. As shown in FIG. 8 , the control apparatus 20 for heterogeneous network equipment includes: a processing module 21 , a receiving module 22 and a sending module twenty three;
所述接收模块22用于接收终端设备发送的子设备控制请求,所述子设备控制请求包括子设备在第一网络中的接入标识,服务标识以及实例标识;The receiving module 22 is configured to receive a sub-device control request sent by the terminal device, where the sub-device control request includes an access identifier, a service identifier and an instance identifier of the sub-device in the first network;
所述发送模块23用于根据所述子设备控制请求,向所述子设备发送操作请求;其中,所述异构网络设备的控制装置与所述终端设备通过所述第一网络通信,所述异构网络设备的控制装置与所述子设备通过第二网络通信。The sending module 23 is configured to send an operation request to the sub-device according to the sub-device control request; wherein, the control apparatus of the heterogeneous network device communicates with the terminal device through the first network, and the The control apparatus of the heterogeneous network device communicates with the sub-device through the second network.
可选的,所述实例标识用于在一个服务内标识方法、属性或者事件。Optionally, the instance identifier is used to identify methods, properties or events within a service.
可选的,在异构网络设备的控制装置20的另一种具体实施方式中,所述接收模块22还用于接收所述终端设备发送的列表获取请求,所述列表获取请求用于获取所述网关设备桥接的异构网络的设备列表;Optionally, in another specific implementation of the control apparatus 20 for heterogeneous network devices, the receiving module 22 is further configured to receive a list acquisition request sent by the terminal device, where the list acquisition request is used to acquire all The device list of the heterogeneous network bridged by the gateway device;
所述处理模块21用于根据所述列表获取请求,获取子设备列表,所述子设备列表中包括所述网关设备认证接入的至少一个与所述终端设备属于不同网络的子设备的接入标识;The processing module 21 is configured to obtain a list of sub-devices according to the list obtaining request, where the list of sub-devices includes at least one access of sub-devices that belong to a different network from the terminal device that is authenticated and accessed by the gateway device. identification;
所述发送模块23还用于将所述子设备列表发送至所述终端设备。The sending module 23 is further configured to send the sub-device list to the terminal device.
可选的,在异构网络设备的控制装置20的另一种具体实施方式中,Optionally, in another specific implementation manner of the control apparatus 20 for heterogeneous network devices,
所述接收模块22还用于接收所述终端设备发送的设备能力集获取请求,所述设备能力集获取请求用于获取所述子设备在所述第一网络中的设备能力集;The receiving module 22 is further configured to receive a device capability set acquisition request sent by the terminal device, where the device capability set acquisition request is used to acquire the device capability set of the sub-device in the first network;
所述处理模块21还用于根据所述设备能力集获取请求,获取所述子设备在所述第一网络中的设备能力集,所述设备能力集包括所述子设备基本信息和能力信息,所述能力信息包括属性,方法和事件,所述子设备的基本信息中包括在所述第一网络中的接入标识;The processing module 21 is further configured to acquire the device capability set of the sub-device in the first network according to the device capability set acquisition request, where the device capability set includes basic information and capability information of the sub-device, The capability information includes attributes, methods and events, and the basic information of the sub-device includes an access identifier in the first network;
所述发送模块23还用于将所述子设备在所述第一网络中的设备能力集发送至所述终端设备。The sending module 23 is further configured to send the device capability set of the sub-device in the first network to the terminal device.
可选的,在异构网络设备的控制装置20的另一种具体实施方式中,Optionally, in another specific implementation manner of the control apparatus 20 for heterogeneous network devices,
所述接收模块22还用于接收所述终端设备发送的扫描子设备请求;The receiving module 22 is further configured to receive a scan sub-device request sent by the terminal device;
所述处理模块21还用于根据所述扫描子设备请求,调用子设备扫描功能进行子设备扫描,得到所述子设备的产品标识和所述子设备的信号强度;The processing module 21 is further configured to call the sub-device scanning function to scan the sub-device according to the scanning sub-device request, and obtain the product identification of the sub-device and the signal strength of the sub-device;
所述发送模块23还用于将所述子设备的产品标识和所述子设备的信号强度发送至所述终端设备;The sending module 23 is further configured to send the product identification of the sub-device and the signal strength of the sub-device to the terminal device;
所述接收模块22还用于接收所述终端设备发送的子设备认证请求;The receiving module 22 is further configured to receive a sub-device authentication request sent by the terminal device;
所述处理模块21还用于根据所述子设备认证请求对所述子设备进行认证和接入,并获取云服务设备为所述子设备分配的在所述第一网络中的接入标识。The processing module 21 is further configured to authenticate and access the sub-device according to the sub-device authentication request, and obtain the access identifier in the first network allocated by the cloud service device to the sub-device.
可选的,在异构网络设备的控制装置20的另一种具体实施方式中,所述发送模块23还用于将所述子设备在所述第一网络中的接入标识发送至所述终端设备。Optionally, in another specific implementation manner of the control apparatus 20 of a heterogeneous network device, the sending module 23 is further configured to send the access identifier of the sub-device in the first network to the Terminal Equipment.
可选的,在异构网络设备的控制装置20的另一种具体实施方式中,所述处理模块21具体用于:Optionally, in another specific implementation manner of the control apparatus 20 for heterogeneous network devices, the processing module 21 is specifically configured to:
根据所述子设备的设备类型和在第二网络中的设备能力集,生成所述子设备在所述第一网络中的设备能力集。A device capability set of the sub-device in the first network is generated according to the device type of the sub-device and the device capability set in the second network.
可选的,在异构网络设备的控制装置20的另一种具体实施方式中,所述发送模块23还用于向所述云服务设备发送所述子设备的设备类型和所述子设备在所述第二网络中的设备能力集;Optionally, in another specific implementation manner of the control apparatus 20 of the heterogeneous network device, the sending module 23 is further configured to send the device type of the sub-device and the location of the sub-device to the cloud service device. a device capability set in the second network;
所述接收模块22还用于接收所述云服务设备返回的所述子设备在所述第一网络中的设备能力集。The receiving module 22 is further configured to receive a device capability set of the sub-device in the first network returned by the cloud service device.
可选的,在异构网络设备的控制装置20的另一种具体实施方式中,所述处理模块21还用于根据所述子设备在所述第一网络中的设备能力集生成虚拟设备。Optionally, in another specific implementation manner of the apparatus 20 for controlling a heterogeneous network device, the processing module 21 is further configured to generate a virtual device according to a device capability set of the sub-device in the first network.
可选的,在异构网络设备的控制装置20的另一种具体实施方式中,所述接收模块22还用于获取所述子设备的当前状态;Optionally, in another specific implementation manner of the control apparatus 20 of the heterogeneous network device, the receiving module 22 is further configured to acquire the current state of the sub-device;
所述发送模块23还用于将所述子设备的当前状态发送至所述云服务设备。The sending module 23 is further configured to send the current state of the sub-device to the cloud service device.
上述任一实施方式提供的异构网络设备的控制装置,用于执行前述任一方法实施例中的网关设备(网关)侧的技术方案,其实现原理和技术效果类似,在此不再赘述。The control apparatus for a heterogeneous network device provided by any of the foregoing embodiments is used to execute the technical solution on the gateway device (gateway) side in any of the foregoing method embodiments, and its implementation principles and technical effects are similar, and will not be repeated here.
图9为本申请实施例提供的异构网络设备的控制装置实施例三的结构示意图,如图9所示,该异构网络设备的控制装置30包括:FIG. 9 is a schematic structural diagram of Embodiment 3 of a control apparatus for heterogeneous network equipment provided by an embodiment of the present application. As shown in FIG. 9 , the control apparatus 30 for heterogeneous network equipment includes:
接收模块31,用于接收网关设备发送的子设备认证请求,所述子设备认证请求包括子设备的标识和身份信息;a receiving module 31, configured to receive a sub-device authentication request sent by the gateway device, where the sub-device authentication request includes the identification and identity information of the sub-device;
处理模块32,用于根据所述子设备认证请求对所述子设备进行认证,并在认证通过后为所述子设备生成在第一网络中的接入标识;a processing module 32, configured to authenticate the sub-device according to the sub-device authentication request, and generate an access identifier in the first network for the sub-device after the authentication is passed;
发送模块33,用于将所述子设备在所述第一网络中的接入标识发送至所述网关设备。The sending module 33 is configured to send the access identifier of the sub-device in the first network to the gateway device.
可选的,所述接收模块31还用于接收所述网关设备发送的能力集生成请求,所述能力集生成请求中包括所述子设备的设备类型和所述子设备在第二网络中的设备能力集;Optionally, the receiving module 31 is further configured to receive a capability set generation request sent by the gateway device, where the capability set generation request includes the device type of the sub-device and the sub-device in the second network. device capability set;
所述处理模块32还用于根据所述能力集生成请求,为所述子设备生成在所述第一网络中的设备能力集,所述设备能力集包括所述子设备的基本信息和能力信息,所述能力信息包括属性,方法和事件,所述子设备的基本信息中包括在所述第一网络中的接入标识;The processing module 32 is further configured to generate a request according to the capability set, and generate a device capability set in the first network for the sub-device, where the device capability set includes basic information and capability information of the sub-device , the capability information includes attributes, methods and events, and the basic information of the sub-device includes an access identifier in the first network;
所述发送模块33还用于将所述子设备在所述第一网络中的设备能力集发送至所述网关设备。The sending module 33 is further configured to send the device capability set of the sub-device in the first network to the gateway device.
可选的,在该异构网络设备的控制装置30的另一种具体实现中,所述处理模块32还用于根据所述子设备在所述第一网络中的设备能力集,生成所述子设备在第一网络中映射的影子设备。Optionally, in another specific implementation of the control device 30 of the heterogeneous network device, the processing module 32 is further configured to generate the said sub-device according to the device capability set of the sub-device in the first network. The shadow device to which the child device is mapped in the first network.
可选的,在该异构网络设备的控制装置30的另一种具体实现中,所述接收模块31还用于接收所述网关设备发送的所述子设备的当前状态;Optionally, in another specific implementation of the control device 30 of the heterogeneous network device, the receiving module 31 is further configured to receive the current state of the sub-device sent by the gateway device;
所述处理模块32还用于根据所述子设备的当前状态,对所述影子设备的状态进行更新。The processing module 32 is further configured to update the state of the shadow device according to the current state of the sub-device.
上述任一实施方式提供的异构网络设备的控制装置,用于执行前述任一方法实施例中的云服务设备(云端)侧的技术方案,其实现原理和技术效果类似,在此不再赘述。The control device for a heterogeneous network device provided by any of the foregoing embodiments is used to execute the technical solution on the cloud service device (cloud) side in any of the foregoing method embodiments, and its implementation principles and technical effects are similar, and details are not repeated here. .
图10为本实施例提供的终端设备的结构示意图,如图10所示,该终端设备100包括:FIG. 10 is a schematic structural diagram of a terminal device provided in this embodiment. As shown in FIG. 10 , the terminal device 100 includes:
处理器111、存储器112、接收器113以及发送器114;processor 111, memory 112, receiver 113 and transmitter 114;
所述存储器112存储计算机执行指令;The memory 112 stores computer-executed instructions;
所述处理器111执行所述存储器112存储的计算机执行指令,使得所述处理器111执行前述任一方法实施例中终端设备侧技术方案。The processor 111 executes the computer-executed instructions stored in the memory 112, so that the processor 111 executes the technical solutions on the terminal device side in any of the foregoing method embodiments.
图10为终端设备的一种简单设计,本申请实施例不限制终端设备中处理器和存储器的个数,图10仅以个数为1作为示例说明。FIG. 10 is a simple design of a terminal device. The embodiments of the present application do not limit the number of processors and memories in the terminal device. FIG. 10 only uses 1 as an example for description.
在上述图10所示的终端设备的一种具体实现中,存储器、处理器、接收器和发送器之间可以通过总线连接,也可以通过别的方式连接。可选的,存储器可以集成在处理器内部。另外,本申请提供的终端设备中还包括通信接口等其他器件,本方案对此不做限制。In a specific implementation of the terminal device shown in FIG. 10, the memory, the processor, the receiver, and the transmitter may be connected through a bus, or may be connected in other ways. Optionally, the memory can be integrated inside the processor. In addition, the terminal equipment provided in this application also includes other devices such as a communication interface, which is not limited in this solution.
图11为本实施例提供的网关设备的结构示意图,如图11所示,该网关设备200包括:FIG. 11 is a schematic structural diagram of a gateway device provided in this embodiment. As shown in FIG. 11 , the gateway device 200 includes:
处理器211、存储器212、接收器213以及发送器214;processor 211, memory 212, receiver 213 and transmitter 214;
所述存储器212存储计算机执行指令;The memory 212 stores computer-executed instructions;
所述处理器211执行所述存储器212存储的计算机执行指令,使得所述处理器211执行前述任一方法实施例中网关设备侧技术方案。The processor 211 executes the computer-executed instructions stored in the memory 212, so that the processor 211 executes the technical solution on the gateway device side in any of the foregoing method embodiments.
图11为网关设备的一种简单设计,本申请实施例不限制网关设备中处理器和存储器的个数,图11仅以个数为1作为示例说明。FIG. 11 is a simple design of a gateway device. The embodiments of the present application do not limit the number of processors and memories in the gateway device. FIG. 11 only uses 1 as an example for description.
在上述图11所示的网关设备的一种具体实现中,存储器、处理器、接收器和发送器之间可以通过总线连接,也可以通过别的方式连接。可选的,存储器可以集成在处理器内部。另外,本申请提供的网关设备中还包括通信接口等其他器件,本方案对此不做限制。In a specific implementation of the gateway device shown in FIG. 11, the memory, the processor, the receiver, and the transmitter may be connected through a bus, or may be connected in other ways. Optionally, the memory can be integrated inside the processor. In addition, the gateway device provided in this application also includes other devices such as a communication interface, which is not limited in this solution.
图12为本实施例提供的云服务设备的结构示意图,如图12所示,该云服务设备300包括:FIG. 12 is a schematic structural diagram of a cloud service device provided in this embodiment. As shown in FIG. 12 , the cloud service device 300 includes:
处理器311、存储器312、接收器313以及发送器314;processor 311, memory 312, receiver 313 and transmitter 314;
所述存储器312存储计算机执行指令;The memory 312 stores computer-executable instructions;
所述处理器311执行所述存储器312存储的计算机执行指令,使得所述处理器311执行前述任一方法实施例中云服务设备侧技术方案。The processor 311 executes the computer-executed instructions stored in the memory 312, so that the processor 311 executes the technical solution on the cloud service device side in any of the foregoing method embodiments.
图12为网关设备的一种简单设计,本申请实施例不限制云服务设备中处理器和存储器的个数,图12仅以个数为1作为示例说明。FIG. 12 is a simple design of a gateway device. This embodiment of the present application does not limit the number of processors and memories in the cloud service device. FIG. 12 only uses 1 as an example for description.
在上述图12所示的云服务设备的一种具体实现中,存储器、处理器、接收器和发送器之间可以通过总线连接,也可以通过别的方式连接。可选的,存储器可以集成在处理器内部。另外,本申请提供的云服务设备中还包括通信接口等其他器件,本方案对此不做限制。In a specific implementation of the cloud service device shown in FIG. 12 above, the memory, the processor, the receiver, and the transmitter may be connected through a bus, or may be connected in other ways. Optionally, the memory can be integrated inside the processor. In addition, the cloud service device provided by this application also includes other devices such as a communication interface, which is not limited in this solution.
可选地,上述任一设备的具体实现中,处理器可以为芯片。Optionally, in the specific implementation of any of the foregoing devices, the processor may be a chip.
本申请实施例还提供一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机执行指令,当所述计算机执行指令被处理器执行时用于实现前述任一方法实施例中终端设备的技术方案。Embodiments of the present application further provide a computer-readable storage medium, where computer-executable instructions are stored in the computer-readable storage medium, and when the computer-executable instructions are executed by a processor, are used to implement the terminal in any of the foregoing method embodiments The technical solution of the equipment.
本申请实施例还提供一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机执行指令,当所述计算机执行指令被处理器执行时用于实现前述任一方法实施例中网关设备的技术方案。Embodiments of the present application further provide a computer-readable storage medium, where computer-executable instructions are stored in the computer-readable storage medium, and when the computer-executable instructions are executed by a processor, are used to implement the gateway in any of the foregoing method embodiments The technical solution of the equipment.
本申请实施例还提供一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机执行指令,当所述计算机执行指令被处理器执行时用于实现前述任一方法实施例中云服务设备的技术方案。Embodiments of the present application further provide a computer-readable storage medium, where computer-executable instructions are stored in the computer-readable storage medium, and when the computer-executable instructions are executed by a processor, are used to implement the cloud in any of the foregoing method embodiments. Technical solutions for service equipment.
本申请实施例还提供一种芯片,包括:处理模块与通信接口,所述处理模块用于实现前述任一方法实施例中终端设备的方案。An embodiment of the present application further provides a chip, including: a processing module and a communication interface, where the processing module is used to implement the solution of the terminal device in any of the foregoing method embodiments.
本申请实施例还提供一种芯片,包括:处理模块与通信接口,所述处理模块用于实现前述任一方法实施例中网关设备的方案。An embodiment of the present application further provides a chip, including: a processing module and a communication interface, where the processing module is used to implement the solution of the gateway device in any of the foregoing method embodiments.
本申请实施例还提供一种芯片,包括:处理模块与通信接口,所述处理模块用于实现前述任一方法实施例中云服务设备的方案。An embodiment of the present application further provides a chip, including: a processing module and a communication interface, where the processing module is used to implement the solution of the cloud service device in any of the foregoing method embodiments.
进一步地,在上述任一芯片的实现中,芯片还包括存储模块(如,存储器),存储模块用于存储指令,处理模块用于执行存储模块存储的指令,并且对存储模块中存储的指令的执行使得处理模块执行前述各个设备的技术方案。Further, in the implementation of any of the above-mentioned chips, the chip also includes a storage module (such as a memory), the storage module is used for storing instructions, the processing module is used for executing the instructions stored in the storage module, and the instructions stored in the storage module are stored. The execution causes the processing module to execute the technical solutions of the aforementioned respective devices.
本申请实施例还提供一种程序,当该程序被处理器执行时,用于实现前述任一方法实施例中终端设备的方案。The embodiment of the present application further provides a program, which is used to implement the solution of the terminal device in any of the foregoing method embodiments when the program is executed by the processor.
本申请实施例还提供一种程序,当该程序被处理器执行时,用于实现前述任一方法实施例中网关设备的方案。The embodiments of the present application further provide a program, which is used to implement the solution of the gateway device in any of the foregoing method embodiments when the program is executed by the processor.
本申请实施例还提供一种程序,当该程序被处理器执行时,用于实现前述任一方法实施例中云服务设备的方案。The embodiment of the present application further provides a program, which is used to implement the solution of the cloud service device in any of the foregoing method embodiments when the program is executed by the processor.
本申请实施例还提供一种计算机程序产品,包括计算机程序,所述计算机程序被处理器执行时实现前述方法实施例中终端设备的技术方案。Embodiments of the present application further provide a computer program product, including a computer program, which implements the technical solutions of the terminal device in the foregoing method embodiments when the computer program is executed by a processor.
本申请实施例还提供一种计算机程序产品,包括计算机程序,所述计算机程序被处理器执行时实现前述方法实施例中网关设备的技术方案。Embodiments of the present application further provide a computer program product, including a computer program, which implements the technical solutions of the gateway device in the foregoing method embodiments when the computer program is executed by a processor.
本申请实施例还提供一种计算机程序产品,包括计算机程序,所述计算机程序被处理器执行时实现前述方法实施例中云服务设备的技术方案。Embodiments of the present application further provide a computer program product, including a computer program, which implements the technical solutions of the cloud service device in the foregoing method embodiments when the computer program is executed by a processor.
在本申请所提供的几个实施例中,应该理解到,所揭露的设备和方法,可以通过其它的方式实现。例如,以上所描述的设备实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个模块可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,模块的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the device embodiments described above are only illustrative. For example, the division of the modules is only a logical function division. In actual implementation, there may be other division methods. For example, multiple modules may be combined or integrated. to another system, or some features can be ignored, or not implemented. On the other hand, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of modules may be in electrical, mechanical or other forms.
在上述任一设备的具体实现中,应理解,处理器可以是中央处理单元(英文:Central Processing Unit,简称:CPU),还可以是其他通用处理器、数字信号处理器(英文:Digital Signal Processor,简称:DSP)、专用集成电路(英文:Application Specific Integrated Circuit,简称:ASIC)等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器 等。结合本申请所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。In the specific implementation of any of the above-mentioned devices, it should be understood that the processor may be a central processing unit (English: Central Processing Unit, referred to as: CPU), or other general-purpose processors, digital signal processors (English: Digital Signal Processor). , referred to as: DSP), application specific integrated circuit (English: Application Specific Integrated Circuit, referred to as: ASIC) and so on. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps in combination with the method disclosed in the present application can be directly embodied as executed by a hardware processor, or executed by a combination of hardware and software modules in the processor.
实现上述各方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成。前述的程序可以存储于一可读取存储器中。该程序在执行时,执行包括上述各方法实施例的步骤;而前述的存储器(存储介质)包括:只读存储器(英文:read-only memory,简称:ROM)、RAM、快闪存储器、硬盘、固态硬盘、磁带(英文:magnetic tape)、软盘(英文:floppy disk)、光盘(英文:optical disc)及其任意组合。All or part of the steps for implementing the above method embodiments may be completed by program instructions related to hardware. The aforementioned program can be stored in a readable memory. When the program is executed, the steps including the above method embodiments are executed; and the aforementioned memory (storage medium) includes: read-only memory (English: read-only memory, abbreviated as: ROM), RAM, flash memory, hard disk, Solid state drive, magnetic tape (English: magnetic tape), floppy disk (English: floppy disk), optical disc (English: optical disc) and any combination thereof.

Claims (54)

  1. 一种异构网络设备的控制方法,其特征在于,应用于终端设备,所述方法包括:A method for controlling heterogeneous network equipment, characterized in that it is applied to terminal equipment, and the method includes:
    生成子设备控制请求,所述子设备控制请求中包括子设备在第一网络中的接入标识,服务标识以及实例标识;generating a sub-device control request, where the sub-device control request includes an access identifier of the sub-device in the first network, a service identifier and an instance identifier;
    向网关设备发送所述子设备控制请求;其中,所述网关设备与所述终端设备通过所述第一网络通信,所述网关设备与所述子设备通过第二网络通信。Sending the sub-device control request to a gateway device; wherein the gateway device communicates with the terminal device through the first network, and the gateway device communicates with the sub-device through a second network.
  2. 根据权利要求1所述的方法,其特征在于,所述实例标识用于在一个服务内标识方法、属性或者事件。The method of claim 1, wherein the instance identifier is used to identify methods, properties or events within a service.
  3. 根据权利要求1或2所述的方法,其特征在于,所述生成子设备控制请求,包括:The method according to claim 1 or 2, wherein the generating a sub-device control request comprises:
    根据预先获取的所述子设备在所述第一网络中的设备能力集,生成所述子设备控制请求;generating the sub-device control request according to the pre-acquired device capability set of the sub-device in the first network;
    其中,所述设备能力集中包括所述子设备的基本信息以及能力信息,所述能力信息包括属性,方法和事件,所述子设备的基本信息包括所述接入标识。The device capability set includes basic information and capability information of the sub-device, the capability information includes attributes, methods and events, and the basic information of the sub-device includes the access identifier.
  4. 根据权利要求3所述的方法,其特征在于,所述方法还包括:The method according to claim 3, wherein the method further comprises:
    向所述网关设备发送列表获取请求,所述列表获取请求用于获取所述网关设备桥接的异构网络的设备列表;sending a list acquisition request to the gateway device, where the list acquisition request is used to acquire a device list of a heterogeneous network bridged by the gateway device;
    接收所述网关设备发送的所述子设备列表,所述子设备列表中包括至少一个与所述终端设备属于不同网络的子设备的接入标识。The sub-device list sent by the gateway device is received, where the sub-device list includes at least one access identifier of a sub-device that belongs to a different network from the terminal device.
  5. 根据权利要求3或4所述的方法,其特征在于,所述方法还包括:The method according to claim 3 or 4, wherein the method further comprises:
    向所述网关设备发送设备能力集获取请求,所述设备能力集获取请求用于获取所述子设备在所述第一网络中的设备能力集;sending a device capability set acquisition request to the gateway device, where the device capability set acquisition request is used to acquire the device capability set of the sub-device in the first network;
    接收所述网关设备发送的所述子设备在所述第一网络中的设备能力集。A device capability set of the sub-device in the first network sent by the gateway device is received.
  6. 根据权利要求1至5任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 5, wherein the method further comprises:
    向所述网关设备发送扫描子设备请求,所述扫描子设备请求用于获取待入网子设备的产品标识;sending a scanning sub-device request to the gateway device, where the scanning sub-device request is used to obtain the product identifier of the sub-device to be accessed;
    接收所述网关设备返回的子设备的产品标识和子设备的信号强度;Receive the product identifier of the sub-device and the signal strength of the sub-device returned by the gateway device;
    根据所述子设备的产品标识和所述子设备的信号强度,向网关设备发送子设备认证请求,所述子设备认证请求用于指示所述网关设备对所述子设备进行认证。According to the product identification of the sub-device and the signal strength of the sub-device, a sub-device authentication request is sent to the gateway device, where the sub-device authentication request is used to instruct the gateway device to authenticate the sub-device.
  7. 根据权利要求6所述的方法,其特征在于,所述方法还包括:The method according to claim 6, wherein the method further comprises:
    接收所述网关设备发送的所述子设备在所述第一网络中的接入标识。The access identifier of the sub-device in the first network sent by the gateway device is received.
  8. 根据权利要求6或7所述的方法,其特征在于,所述向所述网关设备发送扫描子设备请求之前,所述方法还包括:The method according to claim 6 or 7, wherein before the sending a request for scanning sub-devices to the gateway device, the method further comprises:
    通过广播消息确定具有网关能力的设备作为所述网关设备,所述广播消息用于发现所述第一网络中具有网关能力的设备;Determine a device with gateway capability as the gateway device through a broadcast message, where the broadcast message is used to discover the device with gateway capability in the first network;
    或者,or,
    从云服务设备获取在所述云服务设备注册的设备的能力;Obtain the capability of the device registered in the cloud service device from the cloud service device;
    根据所述多个设备的能力,确定具有网关能力的设备作为所述网关设备。According to the capabilities of the multiple devices, a device with gateway capability is determined as the gateway device.
  9. 根据权利要求6至8任一项所述的方法,其特征在于,若确定的网关设备的数量为多个,则所述根据所述子设备的标识和所述子设备的信号强度,向网关设备发送子设备认证请求,包括:The method according to any one of claims 6 to 8, characterized in that, if the number of gateway devices is determined to be more than one, sending the gateway device to the gateway according to the identifier of the sub-device and the signal strength of the sub-device. The device sends a sub-device authentication request, including:
    根据所述子设备的产品标识,向多个网关设备中获取到的信号强度最高的网关设备发送所述子设备认证请求。According to the product identification of the sub-device, the sub-device authentication request is sent to the gateway device with the highest signal strength obtained from the multiple gateway devices.
  10. 一种异构网络设备的控制方法,其特征在于,应用于网关设备,所述方法包括:A control method for heterogeneous network devices, characterized in that, applied to gateway devices, the method includes:
    接收终端设备发送的子设备控制请求,所述子设备控制请求包括子设备在第一网络中 的接入标识,服务标识以及实例标识;Receive the sub-equipment control request sent by the terminal device, and the sub-equipment control request includes the access identifier of the sub-equipment in the first network, the service identifier and the instance identifier;
    根据所述子设备控制请求,向所述子设备发送操作请求;其中,所述网关设备与所述终端设备通过所述第一网络通信,所述网关设备与所述子设备通过第二网络通信。Send an operation request to the sub-device according to the sub-device control request; wherein the gateway device communicates with the terminal device through the first network, and the gateway device communicates with the sub-device through the second network .
  11. 根据权利要求10所述的方法,其特征在于,所述实例标识用于在一个服务内标识方法、属性或者事件。The method of claim 10, wherein the instance identifier is used to identify methods, properties or events within a service.
  12. 根据权利要求10或11所述的方法,其特征在于,所述方法还包括:The method according to claim 10 or 11, wherein the method further comprises:
    接收所述终端设备发送的列表获取请求,所述列表获取请求用于获取所述网关设备桥接的异构网络的设备列表;receiving a list acquisition request sent by the terminal device, where the list acquisition request is used to acquire a device list of a heterogeneous network bridged by the gateway device;
    根据所述列表获取请求,获取子设备列表,所述子设备列表中包括所述网关设备认证接入的至少一个与所述终端设备属于不同网络的子设备的接入标识;Acquire a list of sub-devices according to the list acquisition request, where the sub-device list includes an access identifier of at least one sub-device that is authenticated and accessed by the gateway device and belongs to a different network from the terminal device;
    将所述子设备列表发送至所述终端设备。Send the sub-device list to the terminal device.
  13. 根据权利要求10至12任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 10 to 12, wherein the method further comprises:
    接收所述终端设备发送的设备能力集获取请求,所述设备能力集获取请求用于获取所述子设备在所述第一网络中的设备能力集;receiving a device capability set acquisition request sent by the terminal device, where the device capability set acquisition request is used to acquire the device capability set of the sub-device in the first network;
    根据所述设备能力集获取请求,获取所述子设备在所述第一网络中的设备能力集,所述设备能力集包括所述子设备的基本信息和能力信息,所述能力信息包括方法,操作和事件,所述子设备的基本信息中包括在所述第一网络中的接入标识;Acquire a device capability set of the sub-device in the first network according to the device capability set acquisition request, where the device capability set includes basic information and capability information of the sub-device, and the capability information includes a method, operations and events, the basic information of the sub-device includes the access identifier in the first network;
    将所述子设备在所述第一网络中的设备能力集发送至所述终端设备。Send the device capability set of the sub-device in the first network to the terminal device.
  14. 根据权利要求10至13任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 10 to 13, wherein the method further comprises:
    接收所述终端设备发送的扫描子设备请求;receiving a scan sub-device request sent by the terminal device;
    根据所述扫描子设备请求,调用子设备扫描功能进行子设备扫描,得到所述子设备的产品标识和所述子设备的信号强度;According to the scanning sub-device request, the sub-device scanning function is invoked to perform sub-device scanning, and the product identification of the sub-device and the signal strength of the sub-device are obtained;
    将所述子设备的产品标识和所述子设备的信号强度发送至所述终端设备;Send the product identification of the sub-device and the signal strength of the sub-device to the terminal device;
    接收所述终端设备发送的子设备认证请求;receiving a sub-device authentication request sent by the terminal device;
    根据所述子设备认证请求对所述子设备进行认证和接入,并获取云服务设备为所述子设备分配的在所述第一网络中的接入标识。The sub-device is authenticated and accessed according to the sub-device authentication request, and the access identifier in the first network allocated by the cloud service device to the sub-device is acquired.
  15. 根据权利要求14所述的方法,其特征在于,所述方法还包括:The method of claim 14, wherein the method further comprises:
    将所述子设备在所述第一网络中的接入标识发送至所述终端设备。Send the access identifier of the sub-device in the first network to the terminal device.
  16. 根据权利要求13所述的方法,其特征在于,所述获取所述子设备在所述第一网络中的设备能力集,包括:The method according to claim 13, wherein the acquiring the device capability set of the sub-device in the first network comprises:
    根据所述子设备的设备类型和在第二网络中的设备能力集,生成所述子设备在所述第一网络中的设备能力集。A device capability set of the sub-device in the first network is generated according to the device type of the sub-device and the device capability set in the second network.
  17. 根据权利要求13所述的方法,其特征在于,所述获取所述子设备在所述第一网络中的设备能力集,包括:The method according to claim 13, wherein the acquiring the device capability set of the sub-device in the first network comprises:
    向所述云服务设备发送能力集生成请求,所述能力集生成请求包括所述子设备的设备类型和所述子设备在所述第二网络中的设备能力集;sending a capability set generation request to the cloud service device, where the capability set generation request includes a device type of the sub-device and a device capability set of the sub-device in the second network;
    接收所述云服务设备返回的所述子设备在所述第一网络中的设备能力集。A device capability set of the sub-device in the first network returned by the cloud service device is received.
  18. 根据权利要求16或17所述的方法,其特征在于,所述方法还包括:The method according to claim 16 or 17, wherein the method further comprises:
    根据所述子设备在所述第一网络中的设备能力集生成虚拟设备。A virtual device is generated according to a device capability set of the sub-device in the first network.
  19. 根据权利要求16至18任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 16 to 18, wherein the method further comprises:
    获取所述子设备的当前状态;Obtain the current state of the sub-device;
    将所述子设备的当前状态发送至所述云服务设备。Send the current state of the sub-device to the cloud service device.
  20. 一种异构网络设备的控制方法,其特征在于,应用于云服务设备,所述方法包括:A control method for heterogeneous network devices, characterized in that, applied to cloud service devices, the method includes:
    接收网关设备发送的子设备认证请求,所述子设备认证请求包括子设备的标识和身份信息;receiving a sub-device authentication request sent by the gateway device, where the sub-device authentication request includes the identification and identity information of the sub-device;
    根据所述子设备认证请求对所述子设备进行认证,并在认证通过后为所述子设备生成在第一网络中的接入标识;Authenticate the sub-device according to the sub-device authentication request, and generate an access identifier in the first network for the sub-device after the authentication is passed;
    将所述子设备的在所述第一网络的接入标识发送至所述网关设备。Send the access identifier of the sub-device in the first network to the gateway device.
  21. 根据权利要求20所述的方法,其特征在于,所述方法还包括:The method of claim 20, wherein the method further comprises:
    接收所述网关设备发送的能力集生成请求,所述能力集生成请求中包括所述子设备的设备类型和所述子设备在第二网络中的设备能力集;receiving a capability set generation request sent by the gateway device, where the capability set generation request includes the device type of the sub-device and the device capability set of the sub-device in the second network;
    根据所述能力集生成请求,为所述子设备生成在所述第一网络中的设备能力集,所述设备能力集包括所述子设备的基本信息和能力信息,所述能力信息包括属性,方法和事件,所述子设备的基本信息中包括在所述第一网络中的接入标识;According to the capability set generation request, a device capability set in the first network is generated for the sub-device, where the device capability set includes basic information and capability information of the sub-device, and the capability information includes attributes, The method and event, the basic information of the sub-device includes an access identifier in the first network;
    将所述子设备在所述第一网络中的设备能力集发送至所述网关设备。Sending the device capability set of the sub-device in the first network to the gateway device.
  22. 根据权利要求21所述的方法,其特征在于,所述方法还包括:The method of claim 21, wherein the method further comprises:
    根据所述子设备在所述第一网络中的设备能力集,生成所述子设备在第一网络中映射的影子设备。A shadow device mapped by the sub-device in the first network is generated according to the device capability set of the sub-device in the first network.
  23. 根据权利要求21所述的方法,其特征在于,所述方法还包括:The method of claim 21, wherein the method further comprises:
    接收所述网关设备发送的所述子设备的当前状态;receiving the current state of the sub-device sent by the gateway device;
    根据所述子设备的当前状态,对所述影子设备的状态进行更新。The state of the shadow device is updated according to the current state of the child device.
  24. 一种异构网络设备的控制装置,其特征在于,包括:处理模块,发送模块以及接收模块;A control device for heterogeneous network equipment, comprising: a processing module, a sending module and a receiving module;
    所述处理模块用于生成子设备控制请求,所述子设备控制请求中包括子设备在第一网络中的接入标识,服务标识以及实例标识;The processing module is configured to generate a sub-device control request, where the sub-device control request includes an access identifier of the sub-device in the first network, a service identifier and an instance identifier;
    所述发送模块用于向网关设备发送所述子设备控制请求;其中,所述网关设备与所述异构网络设备的控制装置通过所述第一网络通信,所述网关设备与所述子设备通过第二网络通信。The sending module is configured to send the sub-device control request to the gateway device; wherein the gateway device communicates with the control apparatus of the heterogeneous network device through the first network, and the gateway device communicates with the sub-device communicate over the second network.
  25. 根据权利要求24所述的装置,其特征在于,所述实例标识用于在一个服务内标识方法、属性或者事件。25. The apparatus of claim 24, wherein the instance identifier is used to identify methods, properties or events within a service.
  26. 根据权利要求24或25所述的装置,其特征在于,所述处理模块具体用于:The device according to claim 24 or 25, wherein the processing module is specifically configured to:
    根据用户的操作以及预先获取的所述子设备在所述第一网络中的设备能力集,生成所述子设备控制请求;generating the sub-device control request according to the user's operation and the pre-acquired device capability set of the sub-device in the first network;
    其中,所述设备能力集中包括所述子设备的基本信息以及能力信息,所述能力信息包括属性,方法和事件,所述子设备的基本信息包括所述接入标识。The device capability set includes basic information and capability information of the sub-device, the capability information includes attributes, methods and events, and the basic information of the sub-device includes the access identifier.
  27. 根据权利要求26所述的装置,其特征在于,The apparatus of claim 26, wherein:
    所述发送模块还用于向所述网关设备发送列表获取请求,所述列表获取请求用于获取所述网关设备桥接的异构网络的设备列表;The sending module is further configured to send a list acquisition request to the gateway device, where the list acquisition request is used to acquire a device list of a heterogeneous network bridged by the gateway device;
    所述接收模块还用于接收所述网关设备发送的所述子设备列表,所述子设备列表中包括至少一个与所述异构网络设备的控制装置属于不同网络的子设备的接入标识。The receiving module is further configured to receive the sub-device list sent by the gateway device, where the sub-device list includes at least one access identifier of a sub-device that belongs to a different network from the control apparatus of the heterogeneous network device.
  28. 根据权利要求26或27所述的装置,其特征在于,The device according to claim 26 or 27, characterized in that,
    所述发送模块还用于向所述网关设备发送设备能力集获取请求,所述设备能力集获取请求用于获取所述子设备在所述第一网络中的设备能力集;The sending module is further configured to send a device capability set acquisition request to the gateway device, where the device capability set acquisition request is used to acquire the device capability set of the sub-device in the first network;
    所述接收模块还用于接收所述网关设备发送的所述子设备在所述第一网络中的设备能力集。The receiving module is further configured to receive a device capability set of the sub-device in the first network sent by the gateway device.
  29. 根据权利要求24至26任一项所述的装置,其特征在于,The device according to any one of claims 24 to 26, characterized in that,
    所述发送模块还用于向所述网关设备发送扫描子设备请求,所述扫描子设备请求用于获取待入网子设备的产品标识;The sending module is further configured to send a scanning sub-device request to the gateway device, where the scanning sub-device request is used to obtain the product identifier of the sub-device to be connected to the network;
    所述接收模块还用于接收所述网关设备返回的子设备的产品标识和子设备的信号强度;The receiving module is further configured to receive the product identification of the sub-device and the signal strength of the sub-device returned by the gateway device;
    所述发送模块还用于根据所述子设备的产品标识和所述子设备的信号强度,向所述网关设备发送子设备认证请求,所述子设备认证请求用于指示所述网关设备对所述子设备进行认证。The sending module is further configured to send a sub-device authentication request to the gateway device according to the product identification of the sub-device and the signal strength of the sub-device, where the sub-device authentication request is used to instruct the gateway device to The sub-device is authenticated.
  30. 根据权利要求29所述的装置,其特征在于,所述接收模块还用于接收所述网关设备发送的所述子设备在所述第一网络中的接入标识。The apparatus according to claim 29, wherein the receiving module is further configured to receive the access identifier of the sub-device in the first network sent by the gateway device.
  31. 根据权利要求29或30所述的装置,其特征在于,The device according to claim 29 or 30, characterized in that,
    所述处理模块还用于通过广播消息确定具有网关能力的设备作为所述网关设备,所述广播消息用于发现所述第一网络中具有网关能力的设备;The processing module is further configured to determine a device with gateway capability as the gateway device through a broadcast message, and the broadcast message is used to discover the device with gateway capability in the first network;
    或者,or,
    所述处理模块还用于从云服务设备获取在所述云服务设备注册的设备的能力;The processing module is further configured to acquire the capability of the device registered in the cloud service device from the cloud service device;
    所述处理模块还用于根据所述多个设备的能力,确定具有网关能力的设备作为所述网关设备。The processing module is further configured to determine a device with gateway capability as the gateway device according to the capabilities of the multiple devices.
  32. 根据权利要求29至31任一项所述的装置,其特征在于,若确定的网关设备的数量为多个,则所述发送模块具体用于:The apparatus according to any one of claims 29 to 31, wherein if the determined number of gateway devices is multiple, the sending module is specifically configured to:
    根据所述子设备的标识,向多个网关设备中获取到的信号强度最高的网关设备发送所述子设备认证请求。According to the identifier of the sub-device, the sub-device authentication request is sent to the gateway device with the highest signal strength obtained from the multiple gateway devices.
  33. 一种异构网络设备的控制装置,其特征在于,包括:处理模块,接收模块以及发送模块;A control device for heterogeneous network equipment, comprising: a processing module, a receiving module and a sending module;
    所述接收模块用于接收终端设备发送的子设备控制请求,所述子设备控制请求包括子设备在第一网络中的接入标识,服务标识以及实例标识;The receiving module is configured to receive a sub-device control request sent by the terminal device, where the sub-device control request includes an access identifier, a service identifier and an instance identifier of the sub-device in the first network;
    所述发送模块用于根据所述子设备控制请求,向所述子设备发送操作请求;其中,所述异构网络设备的控制装置与所述终端设备通过所述第一网络通信,所述异构网络设备的控制装置与所述子设备通过第二网络通信。The sending module is configured to send an operation request to the sub-device according to the sub-device control request; wherein, the control device of the heterogeneous network device communicates with the terminal device through the first network, and the heterogeneous network device communicates with the terminal device through the first network. The control device of the network device communicates with the sub-device through the second network.
  34. 根据权利要求33所述的装置,其特征在于,所述实例标识用于在一个服务内标识方法、属性或者事件。34. The apparatus of claim 33, wherein the instance identifier is used to identify methods, properties or events within a service.
  35. 根据权利要求33或34所述的装置,其特征在于,The device according to claim 33 or 34, characterized in that,
    所述接收模块还用于接收所述终端设备发送的列表获取请求,所述列表获取请求用于获取所述网关设备桥接的异构网络的设备列表;The receiving module is further configured to receive a list acquisition request sent by the terminal device, where the list acquisition request is used to acquire a device list of a heterogeneous network bridged by the gateway device;
    所述处理模块用于根据所述列表获取请求,获取子设备列表,所述子设备列表中包括所述网关设备认证接入的至少一个与所述终端设备属于不同网络的子设备的接入标识;The processing module is configured to acquire a list of sub-devices according to the list acquisition request, where the sub-device list includes an access identifier of at least one sub-device that is authenticated and accessed by the gateway device and belongs to a different network from the terminal device ;
    所述发送模块还用于将所述子设备列表发送至所述终端设备。The sending module is further configured to send the sub-device list to the terminal device.
  36. 根据权利要求35所述的装置,其特征在于,The apparatus of claim 35, wherein:
    所述接收模块还用于接收所述终端设备发送的设备能力集获取请求,所述设备能力集获取请求用于获取所述子设备在所述第一网络中的设备能力集;The receiving module is further configured to receive a device capability set acquisition request sent by the terminal device, where the device capability set acquisition request is used to acquire the device capability set of the sub-device in the first network;
    所述处理模块还用于根据所述设备能力集获取请求,获取所述子设备在所述第一网络中的设备能力集,所述设备能力集包括所述子设备基本信息和能力信息,所述能力信息包括属性,方法和事件,所述子设备的基本信息中包括在所述第一网络中的接入标识;The processing module is further configured to acquire the device capability set of the sub-device in the first network according to the device capability set acquisition request, where the device capability set includes basic information and capability information of the sub-device, and The capability information includes attributes, methods and events, and the basic information of the sub-device includes an access identifier in the first network;
    所述发送模块还用于将所述子设备在所述第一网络中的设备能力集发送至所述终端设备。The sending module is further configured to send the device capability set of the sub-device in the first network to the terminal device.
  37. 根据权利要求33至36任一项所述的装置,其特征在于,The device according to any one of claims 33 to 36, characterized in that:
    所述接收模块还用于接收所述终端设备发送的扫描子设备请求;The receiving module is further configured to receive a scan sub-device request sent by the terminal device;
    所述处理模块还用于根据所述扫描子设备请求,调用子设备扫描功能进行子设备扫描,得到所述子设备的产品标识和所述子设备的信号强度;The processing module is further configured to call the sub-device scanning function to scan the sub-device according to the scanning sub-device request, and obtain the product identification of the sub-device and the signal strength of the sub-device;
    所述发送模块还用于将所述子设备的产品标识和所述子设备的信号强度发送至所述终端设备;The sending module is further configured to send the product identification of the sub-device and the signal strength of the sub-device to the terminal device;
    所述接收模块还用于接收所述终端设备发送的子设备认证请求;The receiving module is further configured to receive a sub-device authentication request sent by the terminal device;
    所述处理模块还用于根据所述子设备认证请求对所述子设备进行认证和接入,并获取云服务设备为所述子设备分配的在所述第一网络中的接入标识。The processing module is further configured to authenticate and access the sub-device according to the sub-device authentication request, and obtain an access identifier in the first network allocated by the cloud service device to the sub-device.
  38. 根据权利要求37所述的装置,其特征在于,所述发送模块还用于将所述子设备在所述第一网络中的接入标识发送至所述终端设备。The apparatus according to claim 37, wherein the sending module is further configured to send the access identifier of the sub-device in the first network to the terminal device.
  39. 根据权利要求36所述的装置,其特征在于,所述处理模块具体用于:The apparatus according to claim 36, wherein the processing module is specifically configured to:
    根据所述子设备的设备类型和在第二网络中的设备能力集,生成所述子设备在所述第一网络中的设备能力集。A device capability set of the sub-device in the first network is generated according to the device type of the sub-device and the device capability set in the second network.
  40. 根据权利要求36所述的装置,其特征在于,所述发送模块还用于向所述云服务设备发送能力集生成请求,所述能力集生成请求包括所述子设备的设备类型和所述子设备在所述第二网络中的设备能力集;The apparatus according to claim 36, wherein the sending module is further configured to send a capability set generation request to the cloud service device, wherein the capability set generation request includes a device type of the sub-device and the sub-device a device capability set of the device in the second network;
    所述接收模块还用于接收所述云服务设备返回的所述子设备在所述第一网络中的设备能力集。The receiving module is further configured to receive a device capability set of the sub-device in the first network returned by the cloud service device.
  41. 根据权利要求39或40所述的装置,其特征在于,所述处理模块还用于根据所述子设备在所述第一网络中的设备能力集生成虚拟设备。The apparatus according to claim 39 or 40, wherein the processing module is further configured to generate a virtual device according to a device capability set of the sub-device in the first network.
  42. 根据权利要求39至41任一项所述的装置,其特征在于,所述接收模块还用于获取所述子设备的当前状态;The apparatus according to any one of claims 39 to 41, wherein the receiving module is further configured to acquire the current state of the sub-device;
    所述发送模块还用于将所述子设备的当前状态发送至所述云服务设备。The sending module is further configured to send the current state of the sub-device to the cloud service device.
  43. 一种异构网络设备的控制装置,其特征在于,包括:A control device for heterogeneous network equipment, comprising:
    接收模块,用于接收网关设备发送的子设备认证请求,所述子设备认证请求包括子设备的标识和身份信息;a receiving module, configured to receive a sub-device authentication request sent by the gateway device, where the sub-device authentication request includes the identification and identity information of the sub-device;
    处理模块,用于根据所述子设备认证请求对所述子设备进行认证,并在认证通过后为所述子设备生成在第一网络中的接入标识;a processing module, configured to authenticate the sub-device according to the sub-device authentication request, and generate an access identifier in the first network for the sub-device after the authentication is passed;
    发送模块,用于将所述子设备在所述第一网络中的接入标识发送至所述网关设备。A sending module, configured to send the access identifier of the sub-device in the first network to the gateway device.
  44. 根据权利要求43所述的装置,其特征在于,所述接收模块还用于接收所述网关设备发送的能力集生成请求,所述能力集生成请求中包括所述子设备的设备类型和所述子设备在第二网络中的设备能力集;The apparatus according to claim 43, wherein the receiving module is further configured to receive a capability set generation request sent by the gateway device, wherein the capability set generation request includes the device type of the sub-device and the a device capability set of the sub-device in the second network;
    所述处理模块还用于根据所述能力集生成请求,为所述子设备生成在所述第一网络中的设备能力集,所述设备能力集包括所述子设备的基本信息和能力信息,所述能力信息包括属性,方法和事件,所述子设备的基本信息中包括在所述第一网络中的接入标识;The processing module is further configured to generate a request according to the capability set, and generate a device capability set in the first network for the sub-device, where the device capability set includes basic information and capability information of the sub-device, The capability information includes attributes, methods and events, and the basic information of the sub-device includes an access identifier in the first network;
    所述发送模块还用于将所述子设备在所述第一网络中的设备能力集发送至所述网关设备。The sending module is further configured to send the device capability set of the sub-device in the first network to the gateway device.
  45. 根据权利要求44所述的装置,其特征在于,所述处理模块还用于根据所述子设备在所述第一网络中的设备能力集,生成所述子设备在第一网络中映射的影子设备。The apparatus according to claim 44, wherein the processing module is further configured to generate a shadow mapped by the sub-device in the first network according to the device capability set of the sub-device in the first network equipment.
  46. 根据权利要求44所述的装置,其特征在于,所述接收模块还用于接收所述网关设备发送的所述子设备的当前状态;The apparatus according to claim 44, wherein the receiving module is further configured to receive the current state of the sub-device sent by the gateway device;
    所述处理模块还用于根据所述子设备的当前状态,对所述影子设备的状态进行更新。The processing module is further configured to update the state of the shadow device according to the current state of the sub-device.
  47. 一种终端设备,其特征在于,包括:A terminal device, characterized in that it includes:
    处理器、存储器、接收器以及发送器;processors, memories, receivers and transmitters;
    所述存储器存储计算机执行指令;the memory stores computer-executable instructions;
    所述处理器执行所述存储器存储的计算机执行指令,使得所述处理器执行如权利要求1至9任一项所述的异构网络设备的控制方法。The processor executes the computer-executable instructions stored in the memory, so that the processor executes the method for controlling a heterogeneous network device according to any one of claims 1 to 9.
  48. 一种网关设备,其特征在于,包括:A gateway device, characterized in that it includes:
    处理器、存储器、接收器以及发送器;processors, memories, receivers and transmitters;
    所述存储器存储计算机执行指令;the memory stores computer-executable instructions;
    所述处理器执行所述存储器存储的计算机执行指令,使得所述处理器执行如权利要求10至19任一项所述的异构网络设备的控制方法。The processor executes the computer-executable instructions stored in the memory, so that the processor executes the control method for a heterogeneous network device according to any one of claims 10 to 19.
  49. 一种云服务设备,其特征在于,包括:A cloud service device, comprising:
    处理器、存储器、接收器以及发送器;processors, memories, receivers and transmitters;
    所述存储器存储计算机执行指令;the memory stores computer-executable instructions;
    所述处理器执行所述存储器存储的计算机执行指令,使得所述处理器执行如权利要求20至23任一项所述的异构网络设备的控制方法。The processor executes the computer-executable instructions stored in the memory, so that the processor executes the control method for a heterogeneous network device according to any one of claims 20 to 23.
  50. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有计算机执行指令,当所述计算机执行指令被处理器执行时用于实现如权利要求1至9任一项所述的异构网络设备的控制方法。A computer-readable storage medium, characterized in that, computer-executable instructions are stored in the computer-readable storage medium, and when the computer-executable instructions are executed by a processor, they are used to implement the invention as claimed in any one of claims 1 to 9. The described control method of heterogeneous network equipment.
  51. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有计算机执行指令,当所述计算机执行指令被处理器执行时用于实现如权利要求10至19任一项所述的异构网络设备的控制方法。A computer-readable storage medium, characterized in that the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, is used to implement the invention as claimed in any one of claims 10 to 19. The described control method of heterogeneous network equipment.
  52. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有计算机执行指令,当所述计算机执行指令被处理器执行时用于实现如权利要求20至23任一项所述的异构网络设备的控制方法。A computer-readable storage medium, characterized in that the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, is used to implement the invention as claimed in any one of claims 20 to 23. The described control method of heterogeneous network equipment.
  53. 一种芯片,其特征在于,包括:处理模块与通信接口,所述处理模块用于执行权利要求1至23任一项所述的异构网络设备的控制方法。A chip, characterized in that it comprises: a processing module and a communication interface, wherein the processing module is configured to execute the control method of a heterogeneous network device according to any one of claims 1 to 23.
  54. 一种计算机程序产品,包括计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1至23任一项所述的异构网络设备的控制方法。A computer program product, comprising a computer program, characterized in that, when the computer program is executed by a processor, the control method for a heterogeneous network device according to any one of claims 1 to 23 is implemented.
PCT/CN2020/130938 2020-11-23 2020-11-23 Method and apparatus for controlling heterogeneous network devices, device, and storage medium WO2022104806A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2020/130938 WO2022104806A1 (en) 2020-11-23 2020-11-23 Method and apparatus for controlling heterogeneous network devices, device, and storage medium
CN202080106374.5A CN116349269A (en) 2020-11-23 2020-11-23 Control method, device, equipment and storage medium of heterogeneous network equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/130938 WO2022104806A1 (en) 2020-11-23 2020-11-23 Method and apparatus for controlling heterogeneous network devices, device, and storage medium

Publications (1)

Publication Number Publication Date
WO2022104806A1 true WO2022104806A1 (en) 2022-05-27

Family

ID=81708249

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/130938 WO2022104806A1 (en) 2020-11-23 2020-11-23 Method and apparatus for controlling heterogeneous network devices, device, and storage medium

Country Status (2)

Country Link
CN (1) CN116349269A (en)
WO (1) WO2022104806A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130212574A1 (en) * 2012-02-14 2013-08-15 Microsoft Corporation Sub-Device Discovery and Management
CN108337677A (en) * 2017-01-19 2018-07-27 阿里巴巴集团控股有限公司 Network authentication method and device
CN108769009A (en) * 2018-05-28 2018-11-06 深圳和而泰数据资源与云技术有限公司 Data communications method, smart machine and intelligent gateway

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130212574A1 (en) * 2012-02-14 2013-08-15 Microsoft Corporation Sub-Device Discovery and Management
CN108337677A (en) * 2017-01-19 2018-07-27 阿里巴巴集团控股有限公司 Network authentication method and device
CN108769009A (en) * 2018-05-28 2018-11-06 深圳和而泰数据资源与云技术有限公司 Data communications method, smart machine and intelligent gateway

Also Published As

Publication number Publication date
CN116349269A (en) 2023-06-27

Similar Documents

Publication Publication Date Title
US11979274B2 (en) Network management method and apparatus
KR102116401B1 (en) Cross resource subscription to M2M service layer
CN107592367B (en) Resource sharing method and device for household appliances and computer readable storage medium
US20230040580A1 (en) Binding method and system for device network configuration, and mobile terminal and storage medium
TWI712295B (en) Method, device and system for binding user terminal and equipment
CN110049012B (en) Operation method of routing equipment, routing equipment and terminal equipment
CN105684520B (en) Method for establishing wireless local area network communication connection and electronic equipment thereof
CN110740460A (en) device network access method, device, network device and storage medium
WO2018196468A1 (en) Method, device and terminal for realizing data service
KR20090084670A (en) Method and system for two-phase mechanism for discovering web services based management service
WO2016086544A1 (en) Network interface configuration method and apparatus for network device and storage medium
CN114513379A (en) Binding method and terminal for intelligent household equipment
CN113196721B (en) Method and device for discovering Internet of things equipment and terminal equipment
CN105050028B (en) Method and device for controlling household electrical appliance
WO2022104806A1 (en) Method and apparatus for controlling heterogeneous network devices, device, and storage medium
CN112333062A (en) Control method and control device for household equipment and computer readable storage medium
US20070220129A1 (en) Method of granting control of device and device using the method
CN108712513A (en) network address setting method, device, terminal device and storage medium
CN108989443B (en) Method and system for pushing message to mobile terminal by push server
CN113630298A (en) Intelligent control system, method and device
WO2022116191A1 (en) Connection establishment method and apparatus, and device and storage medium
WO2022087796A1 (en) Zigbee device attribute subscription method and apparatus, and device
US10404652B2 (en) Communication device, communication method, and program
WO2022062857A1 (en) Resource request method, resource configuration method, and related product
CN117201577B (en) Communication method and system of cross-platform API and SPI based on PISA

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20962097

Country of ref document: EP

Kind code of ref document: A1