Movatterモバイル変換


[0]ホーム

URL:


CN105991423A - Gateway and method for calling device through gateway - Google Patents

Gateway and method for calling device through gateway
Download PDF

Info

Publication number
CN105991423A
CN105991423ACN201510089469.1ACN201510089469ACN105991423ACN 105991423 ACN105991423 ACN 105991423ACN 201510089469 ACN201510089469 ACN 201510089469ACN 105991423 ACN105991423 ACN 105991423A
Authority
CN
China
Prior art keywords
gateway
application instruction
target
physical
virtual
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN201510089469.1A
Other languages
Chinese (zh)
Inventor
王先庆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qingdao Haier Intelligent Home Appliance Technology Co Ltd
Haier Uplus Intelligent Technology Beijing Co Ltd
Original Assignee
Qingdao Haier Intelligent Home Appliance Technology Co Ltd
Beijing Haier Guangke Digital Technology Co Ltd
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 Qingdao Haier Intelligent Home Appliance Technology Co Ltd, Beijing Haier Guangke Digital Technology Co LtdfiledCriticalQingdao Haier Intelligent Home Appliance Technology Co Ltd
Priority to CN201510089469.1ApriorityCriticalpatent/CN105991423A/en
Publication of CN105991423ApublicationCriticalpatent/CN105991423A/en
Pendinglegal-statusCriticalCurrent

Links

Landscapes

Abstract

Translated fromChinese

本发明公开了一种网关及通过网关调用设备的方法,所述方法包括:网关接收应用指令,根据所述应用指令从所述网关已存储的设备中查找满足所述应用指令的目标设备;若查找到所述目标设备,所述网关生成满足所述应用指令的设备指令并发送至所述目标设备;所述网关已存储的设备是注册到所述网关的在线物理设备和/或注册到所述网关的在线物理设备形成的虚拟设备。应用本发明,可以解决现有智能家居控制技术存在的依赖于外部设备、在网关不能与外部设备建立连接时无法实现智能控制的技术问题。

The invention discloses a gateway and a method for invoking a device through the gateway. The method includes: the gateway receives an application instruction, and searches for a target device that satisfies the application instruction from devices stored in the gateway according to the application instruction; if When the target device is found, the gateway generates a device instruction that satisfies the application instruction and sends it to the target device; the device stored by the gateway is an online physical device registered to the gateway and/or registered to the The virtual device formed by the online physical device of the gateway. The application of the present invention can solve the technical problem that existing smart home control technology relies on external equipment and cannot realize intelligent control when the gateway cannot establish a connection with the external equipment.

Description

Translated fromChinese
网关及通过网关调用设备的方法 Gateway and the method for invoking devices through the gateway

技术领域technical field

本发明属于数字信息处理技术领域,具体地说,是涉及网关及通过网关调用设备的方法。The invention belongs to the technical field of digital information processing, and in particular relates to a gateway and a method for invoking equipment through the gateway.

背景技术Background technique

在智能家居场景下,用户可以通过智能终端和网关对智能家电设备进行控制。随着技术的不断发展,智能控制的设备并不仅局限于真实存在的物理设备,还可以包括有通过抽象设备创建的虚拟设备。其中,抽象设备是根据物理设备所能实现的功能将一个物理设备抽象成的基本功能单元,每个基本功能单元为一个抽象设备。抽象设备只具有一般属性,屏蔽了设备的底层网络技术和物理形态。而虚拟设备是从已有的设备(包括抽象设备和虚拟设备)中选择相关设备,通过组合形成的一种非真实存在的设备,以提供新的、综合性的服务。In the smart home scenario, users can control smart home appliances through smart terminals and gateways. With the continuous development of technology, intelligently controlled devices are not limited to real physical devices, but may also include virtual devices created through abstract devices. The abstract device is a basic functional unit abstracted from a physical device according to the functions that the physical device can realize, and each basic functional unit is an abstract device. The abstract device has only general attributes, shielding the underlying network technology and physical form of the device. The virtual device is a non-real device formed by selecting related devices from existing devices (including abstract devices and virtual devices) through combination to provide new and comprehensive services.

现有技术实现智能家居控制的过程为:用户通过预置在智能终端中的APP发出应用指令至网关,经网关转发至外部设备(如网络服务器);外部设备对应用指令进行分析,从已有的物理设备和虚拟设备中查找能够满足应用指令的目标设备;在查找到目标设备时,外部设备生成设备指令并发送至网关,再由网关转发至相应的物理设备,控制物理设备执行与应用指令对应的动作。如果未查找到目标设备,外部设备可以基于已有的物理设备及虚拟设备进行组合,生成新的虚拟设备。此后,网络服务器将生成对虚拟设备所包含的各成员物理设备的设备指令,再经网关转发设备指令至相应的物理设备。The process of realizing smart home control in the existing technology is as follows: the user sends an application command to the gateway through the APP preset in the smart terminal, and forwards it to an external device (such as a network server) through the gateway; the external device analyzes the application command, from the existing Find the target device that can satisfy the application command from the physical device and virtual device; when the target device is found, the external device generates the device command and sends it to the gateway, and then the gateway forwards it to the corresponding physical device to control the execution of the physical device and the application command corresponding action. If the target device is not found, the external device can be combined based on the existing physical device and virtual device to generate a new virtual device. Thereafter, the network server will generate device commands for each member physical device included in the virtual device, and then forward the device commands to corresponding physical devices through the gateway.

在上述实现智能家居控制的过程中,网关仅进行指令的转发,将用户的应用指令转发到外部设备,或者将外部设备生成的设备指令转发到物理设备,网关本身不存储设备信息,不能处理应用指令,也不能生成设备指令。因而,如果用户要调用注册到网关上的设备,必须由外部设备根据用户的应用指令生成设备指令。如果家庭网络与外部设备断开连接、网关无法与外部设备建立通信时,用户无法调用注册到网关的单个物理设备,也无法对外部设备生成的虚拟设备所包括的成员物理设备进行调用和控制,从而,限制了对智能家电设备的调用。In the above-mentioned process of realizing smart home control, the gateway only forwards instructions, forwards user application instructions to external devices, or forwards device instructions generated by external devices to physical devices. The gateway itself does not store device information and cannot process applications. commands, and cannot generate device commands. Therefore, if the user wants to call the device registered on the gateway, the device instruction must be generated by the external device according to the user's application instruction. If the home network is disconnected from the external device and the gateway cannot establish communication with the external device, the user cannot call a single physical device registered to the gateway, nor can it call and control the member physical devices included in the virtual device generated by the external device. Thus, calls to smart home appliances are limited.

发明内容Contents of the invention

本发明的目的是提供一种网关及通过网关调用设备的方法,实现在网关断开与外部设备连接时也能够通过网关调用注册到网关的设备。The purpose of the present invention is to provide a gateway and a method for invoking equipment through the gateway, so that the equipment registered to the gateway can also be invoked through the gateway when the gateway is disconnected from the external equipment.

为实现上述技术目的,本发明提供的网关采用下述技术方案来实现:In order to achieve the above-mentioned technical purpose, the gateway provided by the present invention adopts the following technical solutions to realize:

一种网关,包括:A gateway comprising:

设备存储单元,用于存储注册到所述网关的在线物理设备和/或注册到所述网关的在线物理设备形成的虚拟设备;a device storage unit, configured to store online physical devices registered to the gateway and/or virtual devices formed by online physical devices registered to the gateway;

应用指令接收单元,用于接收应用指令;an application instruction receiving unit, configured to receive an application instruction;

目标设备查找单元,用于根据所述应用指令接收单元接收的所述应用指令从所述设备存储单元中查找满足所述应用指令的目标设备;a target device searching unit, configured to search the device storage unit for a target device satisfying the application instruction according to the application instruction received by the application instruction receiving unit;

设备指令生成与发送单元,用于在所述目标设备查找单元查找到满足所述应用指令的目标设备时生成满足所述应用指令的设备指令并发送至所述目标设备。A device instruction generation and sending unit, configured to generate a device instruction that satisfies the application instruction and send it to the target device when the target device search unit finds a target device that satisfies the application instruction.

为实现上述发明目的,本发明提供的通过网关调用设备的方法采用下述技术方案予以实现:In order to achieve the purpose of the above invention, the method for invoking equipment through the gateway provided by the present invention is realized by the following technical solutions:

一种通过网关调用设备的方法,包括:A method of invoking a device through a gateway comprising:

网关接收应用指令,根据所述应用指令从所述网关已存储的设备中查找满足所述应用指令的目标设备;The gateway receives the application instruction, and according to the application instruction, searches for a target device that satisfies the application instruction from the devices stored by the gateway;

若查找到所述目标设备,所述网关生成满足所述应用指令的设备指令并发送至所述目标设备;If the target device is found, the gateway generates a device instruction that satisfies the application instruction and sends it to the target device;

所述网关已存储的设备是注册到所述网关的在线物理设备和/或注册到所述网关的在线物理设备形成的虚拟设备。与现有技术相比,本发明的优点和积极效果是:The devices stored by the gateway are online physical devices registered to the gateway and/or virtual devices formed by the online physical devices registered to the gateway. Compared with prior art, advantage and positive effect of the present invention are:

利用本发明提供的网关及网关调用设备的方法,可以根据网关存储的设备信息生成满足应用指令的设备指令,并控制注册到网关的在线设备执行设备指令,从而,即使网关断开与外部设备的连接,也能够通过网关调用在线设备,实现对设备的控制,从而有效解决了现有智能家居控制技术存在的依赖于外部、在网关不能与外部设备建立通信时无法实现智能控制的技术问题。Utilizing the gateway and the gateway calling device method provided by the present invention can generate device instructions satisfying application instructions according to the device information stored in the gateway, and control the online devices registered to the gateway to execute the device instructions, so that even if the gateway is disconnected from the external device The connection can also call online devices through the gateway to realize the control of the devices, thus effectively solving the technical problems of the existing smart home control technology that relies on the outside and cannot realize intelligent control when the gateway cannot establish communication with external devices.

结合附图阅读本发明的具体实施方式后,本发明的其他特点和优点将变得更加清楚。Other characteristics and advantages of the present invention will become clearer after reading the detailed description of the present invention in conjunction with the accompanying drawings.

附图说明Description of drawings

图1是本发明通过网关调用设备的方法一个实施例的流程图;Fig. 1 is a flowchart of an embodiment of the method for invoking a device through a gateway in the present invention;

图2是本发明通过网关调用设备的方法另一个实施例的流程图;Fig. 2 is a flow chart of another embodiment of the method for invoking a device through a gateway in the present invention;

图3是应用本发明的网关实现设备调用的一个系统架构图;Fig. 3 is a system architecture diagram of implementing device calling by applying the gateway of the present invention;

图4是图3中网关另一个实施例的结构框图。Fig. 4 is a structural block diagram of another embodiment of the gateway in Fig. 3 .

具体实施方式detailed description

为了使本发明的目的、技术方案及优点更加清楚明白,以下将结合附图和实施例,对本发明作进一步详细说明。In order to make the object, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments.

首先,对本发明的技术路线作如下简要阐述:At first, the technical route of the present invention is briefly described as follows:

为解决现有智能家居控制过程中必须依赖于外部设备、在网关不能与外部设备器建立通信时无法实现智能控制的技术问题,本发明提出了一种直接通过网关调用设备的方法,基本思想是首先利用外部设备将注册到网关的在线物理设备和/或注册到网关的在线物理设备形成的虚拟设备推送并存储到网关内;此后,将通过网关接收应用指令,根据应用指令从网关已存储的设备中查找满足应用指令的目标设备。如果查找到目标设备,网关生成设备指令并发送至与应用指令对应的目标设备,以控制目标设备执行设备指令。如果未查找到目标设备,网关可以反馈查找失败结果;或者,在网关连接有外部设备时,网关再向外部设备转发应用指令。在设备调用过程中,如果网关已存储设备中具有完成应用指令的设备,则设备的调用、指令生成及发送均能够不需要与外部设备交互,因而,即使网关与外部设备断开了连接,用户仍可以通过应用指令调用物理设备以及虚拟设备,既解决了不依赖于外部设备调用物理设备的问题,也解决了不依赖于外部设备无法生成虚拟设备并调用虚拟设备的成员物理设备的问题。更具体的调用过程详见下述各实施例的描述。In order to solve the technical problem that the existing smart home control process must rely on external equipment and cannot realize intelligent control when the gateway cannot establish communication with the external equipment, the present invention proposes a method for calling equipment directly through the gateway. The basic idea is First, the online physical device registered to the gateway and/or the virtual device formed by the online physical device registered to the gateway are pushed and stored in the gateway by using an external device; after that, the application instruction will be received through the gateway, and the stored data will be obtained from the gateway according to the application instruction Find the target device that meets the application instruction in the device. If the target device is found, the gateway generates a device command and sends it to the target device corresponding to the application command, so as to control the target device to execute the device command. If the target device is not found, the gateway can feed back the search failure result; or, when the gateway is connected to an external device, the gateway forwards the application instruction to the external device. In the process of device calling, if the gateway has stored devices that have completed the application instructions, the calling of the device, instruction generation and sending can not need to interact with external devices. Therefore, even if the gateway is disconnected from the external device, the user It is still possible to call physical devices and virtual devices through application instructions, which not only solves the problem of not relying on external devices to call physical devices, but also solves the problem of not being able to generate virtual devices and call member physical devices of virtual devices without relying on external devices. For a more specific calling process, refer to the descriptions of the following embodiments.

请参见图1,该图示出了本发明通过网关调用设备的方法一个实施例的流程图,具体来说,是涉及虚拟设备按需生成及调用的一个实施例的详细流程图。Please refer to FIG. 1 , which shows a flow chart of an embodiment of a method for invoking a device through a gateway in the present invention, specifically, a detailed flow chart of an embodiment involving generation and invocation of a virtual device on demand.

在该实施例中,实现通过网关调用设备的过程涉及到四部分结构,分别是作为应用指令发起方的APP、被调用的设备、网关及网络服务器。其中,作为应用指令发起方的APP可以安装在智能终端如智能手机中,用户操作智能终端中的APP,实现设备的调用、设备属性、设备运行参数及运行结果的查看等。而且,借助于APP,用户能够通过网关与网络服务器交互。而其中的设备是指位于网关内的物理设备,且是具有智能控制器、能够与网关通信的智能设备。网络服务器作为外部设备,能够与网关连接进行通信,完成向网关推送注册到网关的在线物理设备及在线物理设备形成的虚拟设备、解析应用指令、生成虚拟设备等工作。In this embodiment, the process of invoking the device through the gateway involves four parts, namely the APP as the initiator of the application instruction, the called device, the gateway and the network server. Among them, the APP as the initiator of the application command can be installed in a smart terminal such as a smart phone, and the user operates the APP in the smart terminal to realize device calling, device attributes, device operating parameters, and viewing of operating results. Moreover, with the help of the APP, the user can interact with the web server through the gateway. Wherein, the device refers to a physical device located in the gateway, and is an intelligent device having an intelligent controller and capable of communicating with the gateway. As an external device, the network server can connect with the gateway for communication, push the online physical devices registered to the gateway and the virtual devices formed by the online physical devices to the gateway, analyze application instructions, and generate virtual devices.

具体而言,如图1所示,该实施例通过网关调用设备的过程包括如下步骤:Specifically, as shown in Figure 1, the process of invoking the device through the gateway in this embodiment includes the following steps:

步骤1:物理设备上线,发送上线通告消息,并经网关将上线通告消息转发到网络服务器。Step 1: The physical device goes online, sends an online notification message, and forwards the online notification message to the network server through the gateway.

步骤2:网络服务器接收上线通告,根据上线通告中包含的设备类型信息,从预先存储的本体模型中获取到该设备对应的本体模型。然后,根据预置规则生成该设备对应的设备实例及对应的抽象设备。该过程的实现可以采用现有技术,在此不作具体阐述。同时,网络服务器将该设备所对应的本体模型发送到网关。Step 2: The network server receives the online notification, and obtains the ontology model corresponding to the device from the pre-stored ontology models according to the device type information included in the online notification. Then, a device instance corresponding to the device and a corresponding abstract device are generated according to preset rules. The implementation of this process can adopt the existing technology, which will not be described in detail here. At the same time, the network server sends the ontology model corresponding to the device to the gateway.

步骤3:网关存储接收自网络服务器的本体模型,基于该本体模型生成设备实例并存储。Step 3: The gateway stores the ontology model received from the network server, generates and stores a device instance based on the ontology model.

由此,在网关存储了注册到该网关的在线物理设备,具体来说,是存储了在线物理设备的设备实例。在存储了设备实例后,网关能够根据设备实例和应用指令生成对设备进行控制的设备指令。Thus, online physical devices registered to the gateway are stored in the gateway, specifically, device instances of online physical devices are stored. After storing the device instance, the gateway can generate a device instruction to control the device according to the device instance and the application instruction.

作为另一种实施方式,网络服务器将在线物理设备的设备实例直接发送到网关,网关直接存储即可,无需再自行生成。As another implementation manner, the network server directly sends the device instance of the online physical device to the gateway, and the gateway can directly store it without generating it by itself.

上述三个步骤是实现在线物理设备在网关存储的过程,该过程在网关与服务器建立连接后不断运行。也即,只要有设备上线,网络服务器与网关上就存储上线设备的设备实例。The above three steps are the process of realizing the storage of online physical devices in the gateway, which runs continuously after the gateway establishes a connection with the server. That is, as long as a device is online, the network server and the gateway store the device instance of the online device.

步骤4:用户通过APP发送应用指令,该应用指令到达网关。Step 4: The user sends an application instruction through the APP, and the application instruction reaches the gateway.

此时所说的应用指令,是用户发出的对某个设备进行某种控制的指令,或者是实现某种功能的指令。如果是对某个设备进行某种控制的命令,应用指令中会包含要调用的设备的设备标识及要实现的操作信息。The application instruction mentioned at this time is an instruction sent by a user to perform a certain control on a certain device, or an instruction to realize a certain function. If it is a command to perform some kind of control on a certain device, the application instruction will include the device identification of the device to be called and the operation information to be implemented.

步骤5:网关根据应用指令从自身已存储的设备中查找满足该应用指令的目标设备。Step 5: The gateway searches for a target device satisfying the application instruction from its stored devices according to the application instruction.

具体来说,网关解析应用指令,从中获取设备标识和操作信息。如果应用指令中的设备标识为物理设备标识,网关内存储的在线物理设备的设备实例中包括有设备标识,网关从其自身已存储的设备中查找到具有应用指令中的设备标识的在线物理设备作为目标物理设备。在查找到目标物理设备之后,将根据应用指令中的操作信息从目标物理设备的设备实例中查找对应的操作名称或代码。然后,基于目标物理设备的设备标识和查找到的对应的操作名称或代码,生成目标物理设备的设备指令,并将该设备指令发送至目标物理设备。此后,目标物理设备将响应设备指令,执行指定操作后,会向网关上报执行结果。网关根据上报的执行结果,生成用户操作结果的反馈,并将用户操作结果反馈到APP。Specifically, the gateway parses the application instructions to obtain device identification and operation information from them. If the device ID in the application instruction is a physical device ID, the device instance of the online physical device stored in the gateway includes the device ID, and the gateway finds the online physical device with the device ID in the application instruction from its own stored devices as the target physical device. After the target physical device is found, the corresponding operation name or code will be searched from the device instance of the target physical device according to the operation information in the application instruction. Then, based on the device identifier of the target physical device and the found corresponding operation name or code, a device instruction of the target physical device is generated, and the device instruction is sent to the target physical device. Afterwards, the target physical device will respond to the device instruction, and after performing the specified operation, it will report the execution result to the gateway. The gateway generates feedback on user operation results based on the reported execution results, and feeds back the user operation results to the APP.

如果网关还存储有虚拟设备(虚拟设备的获取及存储内容参见下面步骤所描述),则查找的目标设备也可能是目标虚拟设备。如果查找到满足应用指令的目标虚拟设备,网关将执行下述步骤17的处理。If the gateway also stores a virtual device (see the following steps for the acquisition and storage of the virtual device), the target device to be searched may also be the target virtual device. If the target virtual device meeting the application instruction is found, the gateway will perform the processing of step 17 below.

在若从网关已存储的物理设备和虚拟设备中均未查找到满足应用指令的目标设备,网关会向APP反馈查找失败结果;如果此时网关与网络服务器建立有连接,还会继续执行下述步骤6。If no target device that satisfies the application instruction is found from the physical devices and virtual devices stored by the gateway, the gateway will feed back the search failure result to the APP; if the gateway establishes a connection with the network server at this time, it will continue to execute the following step6.

步骤6:网关向网络服务器转发APP发出的应用指令。Step 6: The gateway forwards the application instruction issued by the APP to the network server.

步骤7:网络服务器对网关转发来的应用指令进行分析推理,在网络服务器的已有设备中查找满足应用指令的设备。Step 7: The network server analyzes and deduces the application instruction forwarded by the gateway, and searches for a device satisfying the application instruction among the existing devices of the network server.

网络服务器如果从已有的在线物理设备或虚拟设备中查找到满足应用指令的目标设备,生成对目标设备的设备指令,然后将目标设备及对应的设备指令一并推送到网关。此后,网关保存接收到的设备,并将设备指令转发至目标设备。如果从网络服务器上查找到满足应用指令的虚拟目标设备,则执行下述步骤12至步骤14的过程。If the network server finds the target device that meets the application instruction from the existing online physical devices or virtual devices, it generates a device instruction for the target device, and then pushes the target device and the corresponding device instruction to the gateway. Thereafter, the gateway saves the received device and forwards the device command to the target device. If the virtual target device satisfying the application instruction is found from the network server, the following steps 12 to 14 are performed.

步骤8:如果网络服务器从其已有设备中未查找到满足应用指令的设备,将基于网络服务器上已有的抽象设备和虚拟设备,重新混聚而生成新的虚拟设备,并将新生成的虚拟设备加入到虚拟设备列表。Step 8: If the network server does not find a device that meets the application instruction from its existing devices, it will re-aggregate based on the existing abstract devices and virtual devices on the network server to generate a new virtual device, and the newly generated The virtual device is added to the list of virtual devices.

步骤9:网络服务器生成设备指令,将虚拟设备及设备指令推送至网关。Step 9: The network server generates a device command, and pushes the virtual device and the device command to the gateway.

具体来说,网络服务器推送的虚拟设备包括但不限于虚拟设备信息(如虚拟设备标识、虚拟设备功能、虚拟设备属性等信息)、虚拟设备与成员物理设备的映射关系、成员物理设备的设备实例。而网络服务器根据应用指令生成对虚拟设备中各成员物理设备指令的方法可以采用现有技术,也可以参考后续网关生成设备指令的方法。Specifically, the virtual devices pushed by the network server include but are not limited to virtual device information (such as virtual device identifiers, virtual device functions, virtual device attributes, etc.), the mapping relationship between virtual devices and member physical devices, and the device instances of member physical devices. . The method for the network server to generate instructions for the physical devices of each member in the virtual device according to the application instructions can adopt the existing technology, or refer to the subsequent method for generating device instructions by the gateway.

步骤10:网关保存虚拟设备,将虚拟设备信息中的虚拟设备标识转发到APP。APP接收到新生成的虚拟设备的设备标识后存储起来,以方便APP直接调用这些新生成的虚拟设备。Step 10: The gateway saves the virtual device, and forwards the virtual device identifier in the virtual device information to the APP. After the APP receives the device identification of the newly generated virtual device, it stores it, so that the APP can directly call these newly generated virtual devices.

步骤11:网关将接收在网络服务器的设备指令发送到虚拟设备中的各成员物理设备,用于调用物理设备。此后,各成员物理设备将响应相应的设备指令,执行指定操作。Step 11: The gateway sends the device instruction received from the network server to each member physical device in the virtual device for invoking the physical device. Afterwards, each member physical device will respond to the corresponding device command and perform the specified operation.

步骤12:各物理设备执行设备指令对应的操作后,将调用结果反馈给网关。Step 12: After each physical device executes the operation corresponding to the device instruction, it feeds back the calling result to the gateway.

步骤13:网关对物理设备的上报结果进行汇总,生成用户操作结果的反馈。Step 13: The gateway summarizes the reported results of the physical devices, and generates feedback of user operation results.

步骤14:网关将用户操作结果反馈给APP。从而,用户能够通过APP获得发出应用指令后的结果。Step 14: The gateway feeds back the user operation result to the APP. Thus, the user can obtain the result after issuing the application instruction through the APP.

步骤15:如果注册到网关的物理设备因执行设备指令等原因导致其某些属性发生变化,设备将属性的变化通告给网关,网关获取到该变化后,将变化后的信息发送至网络服务器,网络服务器对物理设备属性进行更新,完成设备属性的同步。Step 15: If some attributes of the physical device registered to the gateway change due to the execution of device instructions, etc., the device will notify the gateway of the attribute change. After the gateway obtains the change, it will send the changed information to the network server. The network server updates the properties of the physical equipment to complete the synchronization of the equipment properties.

该步骤15可以发生在设备调用过程的任何时刻,而不局限于该实施例的位置。This step 15 can occur at any moment of the device calling process, and is not limited to the location of this embodiment.

通过上述过程的处理,APP已经存储有网关所存储的虚拟设备的设备标识。此后,如果用户要调用虚拟设备,可以执行步骤16和步骤17的处理。Through the above process, the APP has already stored the device identifier of the virtual device stored by the gateway. Thereafter, if the user wants to invoke the virtual device, the processing of step 16 and step 17 may be performed.

步骤16:如果APP已经存储有虚拟设备标识,用户可以发出应用指令直接调用相应的虚拟设备。此时,在应用指令中加入要调用的虚拟设备的设备标识及要实现的操作信息,然后将应用指令发送到网关。Step 16: If the APP has already stored the virtual device identifier, the user can issue an application command to directly call the corresponding virtual device. At this time, the device identifier of the virtual device to be invoked and the operation information to be realized are added to the application instruction, and then the application instruction is sent to the gateway.

步骤17:网关根据指令包含的虚拟设备标识查找到目标虚拟设备,生成对形成目标虚拟设备的各成员物理设备的设备指令,重复步骤11-14的操作。Step 17: The gateway finds the target virtual device according to the virtual device identifier included in the instruction, generates a device instruction for each member physical device forming the target virtual device, and repeats steps 11-14.

具体而言,网关解析应用指令,从中获取设备标识和操作信息。若应用指令中的设备标识为虚拟设备的设备标识,由于虚拟设备标识由网关转发至APP,此时,网关也将存储有具有该虚拟设备标识的虚拟设备,因而网关从其已存储的设备中查找到具有应用指令中的设备标识的虚拟设备作为目标虚拟设备。在查找到目标虚拟设备之后,网关将根据应用指令中的操作信息、目标虚拟设备中虚拟设备与成员物理设备的映射关系及成员物理设备的设备实例查找形成目标虚拟设备的各成员物理设备的设备标识及每个成员物理设备对应的操作名称或代码。然后,网关基于每个成员物理设备的设备标识及对应的操作名称或代码,生成成员物理设备的设备指令。然后,重复步骤11至步骤14的操作。Specifically, the gateway parses the application instructions to obtain device identification and operation information from them. If the device ID in the application instruction is the device ID of the virtual device, since the virtual device ID is forwarded by the gateway to the APP, the gateway will also store the virtual device with the The virtual device with the device identifier in the application instruction is found as the target virtual device. After finding the target virtual device, the gateway will search for the devices that form the member physical devices of the target virtual device according to the operation information in the application instruction, the mapping relationship between the virtual device and the member physical devices in the target virtual device, and the device instances of the member physical devices ID and operational name or code corresponding to each member physical device. Then, the gateway generates a device instruction of the member physical device based on the device identifier of each member physical device and the corresponding operation name or code. Then, repeat steps 11 to 14.

在该实施例中,如果网络服务器中不存在满足应用指令的物理设备,基于已有设备也无法生成满足应用指令的虚拟设备,网络服务器会向网关反馈查找失败消息,则网关也会向APP反馈查找失败的结果。In this embodiment, if there is no physical device that satisfies the application instruction in the network server, and the virtual device that meets the application instruction cannot be generated based on the existing equipment, the network server will feed back a search failure message to the gateway, and the gateway will also feed back to the APP Find failed results.

利用该实施例,应用指令发送至网关,网关可以从其已存储的、接收自网络服务器的设备中查找满足指令的设备,生成设备指令并发送至目标设备,该过程在网关与网络服务器不连接的状态下也能完成。因而,即使网关与网络服务器断开了连接,用户仍可以通过应用指令调用物理设备以及虚拟设备。而且,在网关与网络服务器连接的状态下,还可以根据应用指令按需、及时利用网络服务器向网关补入新的物理设备及虚拟设备,满足多种应用指令的需求。Using this embodiment, the application instruction is sent to the gateway, and the gateway can search for a device that meets the instruction from the devices it has stored and received from the network server, generate a device instruction and send it to the target device, and the process is not connected between the gateway and the network server status can be completed. Therefore, even if the gateway is disconnected from the network server, users can still invoke physical devices and virtual devices through application commands. Moreover, when the gateway is connected to the network server, the network server can also be used to add new physical devices and virtual devices to the gateway on demand and in a timely manner according to application instructions, so as to meet the needs of various application instructions.

请参见图2,该图示出了本发明通过网关调用设备的方法另一个实施例的流程图,具体来说,是涉及主动生成虚拟设备的一个实施例的详细流程图。Please refer to FIG. 2 , which shows a flow chart of another embodiment of the method for invoking a device through a gateway in the present invention, specifically, a detailed flow chart of an embodiment involving actively generating a virtual device.

如图1第一个实施例类似,在图2实施例中,实现通过网关调用设备的过程涉及到四部分结构,分别是作为应用指令发起方的APP、被调用的设备、网关及网络服务器。Similar to the first embodiment in FIG. 1 , in the embodiment in FIG. 2 , the process of invoking a device through the gateway involves four parts, namely the APP as the initiator of the application command, the called device, the gateway, and the network server.

如图2所示,该实施例主动生成虚拟设备并通过网关调用设备的过程包括如下步骤:As shown in Figure 2, the process of actively generating a virtual device and invoking the device through the gateway in this embodiment includes the following steps:

步骤1:在本体建模过程中,网络服务器不仅对设备的每项功能标识所属功能类型(如开关、空气质量监测、温度调节、空气净化等),还对每项功能标识是否支持自动组合,例如,在每项功能属性中增加一项是否支持自动组合的标识。Step 1: In the ontology modeling process, the network server not only identifies the function type of each function of the device (such as switch, air quality monitoring, temperature adjustment, air purification, etc.), but also identifies whether each function supports automatic combination, For example, add an identifier of whether automatic combination is supported in each functional attribute.

需要说明的是,该步骤是本体建模过程中就执行的一个步骤,在设备调用时不会执行,此时加入该步骤是为了完整描述该实施例的流程。It should be noted that this step is a step that is executed during the ontology modeling process and will not be executed when the device is invoked. This step is added at this time to fully describe the flow of this embodiment.

步骤2:物理设备上线,发送上线通告消息,并经网关将上线通告消息转发到网络服务器。Step 2: The physical device goes online, sends an online notification message, and forwards the online notification message to the network server through the gateway.

步骤3:网络服务器接收上线通告,根据上线通告中包含的设备类型信息,从预先存储的本体模型中获取到该设备对应的本体模型。然后,根据预置规则生成该设备对应的设备实例。同时,对具有自动组合标识的上线物理设备所对应的功能生成抽象设备。而且,对生成的每个抽象设备,分别生成若干虚拟设备。具体来说,是从网络服务器中已有的、支持自动组合的抽象设备及虚拟设备中查找到能够与当前生成的抽象设备按照规则进行组合的设备,然后自动进行组合,生成新的虚拟设备,并将新生成的虚拟设备加入到虚拟设备列表中。同时,网络服务器将上线设备对应的本体模型发送到网关。Step 3: The network server receives the online notification, and obtains the ontology model corresponding to the device from the pre-stored ontology models according to the device type information included in the online notification. Then, a device instance corresponding to the device is generated according to preset rules. At the same time, an abstract device is generated for the function corresponding to the online physical device with automatic combination identification. Moreover, for each generated abstract device, several virtual devices are generated respectively. Specifically, from the existing abstract devices and virtual devices that support automatic combination in the network server, find the device that can be combined with the currently generated abstract device according to the rules, and then automatically combine to generate a new virtual device. And add the newly generated virtual device to the virtual device list. At the same time, the network server sends the ontology model corresponding to the online device to the gateway.

通过主动生成虚拟设备的方法,网络服务器无需对所有的有效物理设备的每个功能均生成抽象设备,仅需对本体模型中具有自动组合标识的上线设备的某个/些功能生成抽象设备即可,简化了网络服务器对设备的处理。By actively generating virtual devices, the network server does not need to generate abstract devices for each function of all effective physical devices, but only needs to generate abstract devices for some/some functions of online devices with automatic combination identification in the ontology model. , which simplifies the handling of the device by the web server.

步骤4:网关存储接收自网络服务器的本体模型,基于该本体模型生成设备实例并存储。Step 4: The gateway stores the ontology model received from the network server, generates and stores a device instance based on the ontology model.

由此,在网关存储了注册到该网关的在线物理设备,具体来说,是存储了在线物理设备的设备实例。在存储了设备实例后,网关能够根据设备实例和应用指令生成对设备进行控制的设备指令。Thus, online physical devices registered to the gateway are stored in the gateway, specifically, device instances of online physical devices are stored. After storing the device instance, the gateway can generate a device instruction to control the device according to the device instance and the application instruction.

作为另一种实施方式,网络服务器将在线物理设备的设备实例直接发送到网关,网关直接存储即可,无需再自行生成。As another implementation manner, the network server directly sends the device instance of the online physical device to the gateway, and the gateway can directly store it without generating it by itself.

步骤5:网络服务器将生成的虚拟设备主动推送到网关。其中,网络服务器推送的虚拟设备包括但不限于虚拟设备信息(如虚拟设备标识、虚拟设备功能、虚拟设备属性等信息)、虚拟设备与成员物理设备的映射关系、成员物理设备的设备实例。Step 5: The network server actively pushes the generated virtual device to the gateway. Among them, the virtual devices pushed by the network server include but are not limited to virtual device information (such as virtual device identification, virtual device functions, virtual device attributes, etc.), the mapping relationship between virtual devices and member physical devices, and device instances of member physical devices.

步骤6:网关保存虚拟设备,并将虚拟设备信息中的虚拟设备标识转发到APP,以方便APP直接调用该虚拟设备。Step 6: The gateway saves the virtual device, and forwards the virtual device identifier in the virtual device information to the APP, so that the APP can directly call the virtual device.

步骤7:APP收到网关转发的虚拟设备标识,更新用户界面。Step 7: The APP receives the virtual device identifier forwarded by the gateway, and updates the user interface.

上述各步骤是实现在线物理设备及在线物理设备形成的虚拟设备在网关存储的过程,该过程在网关与服务器建立连接后不断运行。The above steps are the process of realizing the storage of the online physical device and the virtual device formed by the online physical device in the gateway, and this process runs continuously after the gateway establishes a connection with the server.

后续步骤是基于上述过程实现设备调用的过程:The next step is to realize the process of device invocation based on the above process:

步骤8:用户通过APP发送应用指令,且应用指令中包含有设备标识和操作信息,该应用指令发送到网关。Step 8: The user sends an application instruction through the APP, and the application instruction contains device identification and operation information, and the application instruction is sent to the gateway.

步骤9:网关将根据应用指令包含的设备标识,查找到目标设备。步骤10:在查找到目标设备时,网关将根据应用指令生成目标设备的设备指令,用于调用物理设备。此后,物理设备将响应相应的设备指令,执行指定操作。Step 9: The gateway will find the target device according to the device identification contained in the application instruction. Step 10: When the target device is found, the gateway will generate a device command of the target device according to the application command, which is used to call the physical device. Thereafter, the physical device will respond to the corresponding device command and perform the specified operation.

具体来说,网关存储的在线物理设备的设备实例中包括有设备标识,存储的虚拟设备信息中包括有虚拟设备标识,网关解析应用指令,获取到应用指令中的设备标识和操作信息,对应用指令中的设备标识进行判断。Specifically, the device instance of the online physical device stored by the gateway includes the device identifier, and the stored virtual device information includes the virtual device identifier. The gateway parses the application instruction, obtains the device identifier and operation information in the application instruction, and provides the application The device identification in the instruction is used for judgment.

如果应用指令中的设备标识为物理设备的设备标识,网关从其已存储的设备中查找到具有应用指令中的设备标识的在线物理设备作为目标物理设备,并根据应用指令中的操作信息从目标物理设备的设备实例中查找对应的操作名称或代码,基于目标物理设备的设备标识和对应的操作名称或代码,生成目标物理设备的设备指令,发送至目标物理设备。If the device ID in the application instruction is the device ID of the physical device, the gateway finds the online physical device with the device ID in the application instruction as the target physical device from its stored devices, and obtains the target physical device according to the operation information in the application instruction. Find the corresponding operation name or code in the device instance of the physical device, generate a device instruction for the target physical device based on the device identifier of the target physical device and the corresponding operation name or code, and send it to the target physical device.

而如果应用指令中的设备标识为虚拟设备的设备标识,网关从其已存储的设备中查找到具有应用指令中的设备标识的虚拟设备作为目标虚拟设备,并根据应用指令中的操作信息、网关存储的目标虚拟设备中虚拟设备与成员物理设备的映射关系及成员物理设备的设备实例查找形成目标虚拟设备的各成员物理设备的设备标识及对应的操作名称或代码,然后,基于成员物理设备的设备标识及对应的操作名称或代码,生成对每个成员物理设备的设备指令,发送至相应的成员物理设备。And if the device ID in the application instruction is the device ID of the virtual device, the gateway finds the virtual device with the device ID in the application instruction as the target virtual device from its stored devices, and according to the operation information in the application instruction, the gateway The stored mapping relationship between the virtual device and the member physical device in the target virtual device and the device instance of the member physical device are searched for the device identifier and the corresponding operation name or code of each member physical device forming the target virtual device, and then, based on the member physical device The device identifier and the corresponding operation name or code generate a device command for each member physical device and send it to the corresponding member physical device.

步骤11:各物理设备执行设备指令对应的操作后,将调用结果反馈给网关。Step 11: After each physical device executes the operation corresponding to the device instruction, it feeds back the calling result to the gateway.

步骤12:网关对物理设备的上报结果进行汇总,生成用户操作结果的反馈。Step 12: The gateway summarizes the reported results of the physical devices, and generates feedback of user operation results.

步骤13:网关将用户操作结果反馈给APP。从而,用户能够通过APP获得发出应用指令后的结果。Step 13: The gateway feeds back the user operation result to the APP. Thus, the user can obtain the result after issuing the application instruction through the APP.

步骤14:如果注册到网关的物理设备因执行设备指令等原因导致其某些属性发生变化,设备将属性的变化通告给网关,网关获取到该变化后,将变化后的信息发送至网络服务器,网络服务器对物理设备属性进行更新,完成设备属性的同步。Step 14: If some attributes of the physical device registered to the gateway change due to the execution of device instructions, etc., the device will notify the gateway of the attribute change. After the gateway obtains the change, it will send the changed information to the network server. The network server updates the properties of the physical equipment to complete the synchronization of the equipment properties.

同样的,该步骤14可以发生在设备调用过程的任何时刻,而不局限于该实施例的位置。Likewise, this step 14 can occur at any moment of the device calling process, and is not limited to the location of this embodiment.

利用该实施例,网络服务器对本体模型中具有自动组合标识的上线设备主动按照设定规则生成虚拟设备,并将虚拟设备信息主动推送到网关,并将网关反馈到APP,从而,用户能够直观、及时得到目前可用的虚拟设备,并发出对虚拟设备进行控制的应用指令。而且,应用指令发送至网关,网关可以从其已存储的、接收自网络服务器的设备中查找满足指令的设备,该过程在网关与网络服务器不连接的状态下也能完成。因而,即使网关与网络服务器断开了连接,用户仍可以通过应用指令调用物理设备以及虚拟设备。Using this embodiment, the network server actively generates virtual devices for the online devices with automatic combination identifiers in the ontology model according to the set rules, actively pushes the virtual device information to the gateway, and feeds the gateway back to the APP, so that the user can intuitively, Obtain the currently available virtual devices in time, and issue application instructions to control the virtual devices. Moreover, the application instruction is sent to the gateway, and the gateway can search for a device satisfying the instruction from the stored devices received from the network server. This process can also be completed when the gateway is not connected to the network server. Therefore, even if the gateway is disconnected from the network server, users can still invoke physical devices and virtual devices through application commands.

请参见图3,该图所示为应用本发明的网关实现设备调用的一个系统架构图。Please refer to FIG. 3 , which shows a system architecture diagram for implementing device calling by using the gateway of the present invention.

如图3所示,该实施例的系统包括有网络服务器31、网关32、应用指令发起方33及设备34。其中,应用指令发起方33可以是安装在智能终端如智能手机中的APP;应用指令发起方33可以通过网关32与网络服务器31进行网络通信。设备34是指位于网关32内的物理设备,且是具有智能控制器、能够与网关32通信的智能设备。而网络服务器31作为外部设备,能够与网关连接进行通信,完成向网关推送注册到网关的在线物理设备及在线物理设备形成的虚拟设备、解析应用指令、生成虚拟设备等工作。As shown in FIG. 3 , the system of this embodiment includes a network server 31 , a gateway 32 , an application instruction initiator 33 and a device 34 . Wherein, the application instruction initiator 33 may be an APP installed in a smart terminal such as a smart phone; the application instruction initiator 33 may perform network communication with the network server 31 through the gateway 32 . The device 34 refers to a physical device located in the gateway 32 , and is an intelligent device having an intelligent controller and capable of communicating with the gateway 32 . The network server 31, as an external device, can communicate with the gateway, push online physical devices registered to the gateway and virtual devices formed by online physical devices to the gateway, analyze application instructions, and generate virtual devices.

为实现在网关32与网络服务器31断开连接时仍能通过应用指令调用设备34,,网关32采用具有下述各单元的结构来实现。In order to realize that the device 34 can still be invoked through an application command when the gateway 32 is disconnected from the network server 31, the gateway 32 is realized by adopting a structure having the following units.

具体来说,网关32所包括的单元、每个单元的功能、各单元之间的连接关系如下:Specifically, the units included in the gateway 32, the functions of each unit, and the connections between the units are as follows:

设备存储单元321,用于存储由网络服务器31推送的、注册到网关的在线物理设备和/或注册到网关的在线物理设备形成的虚拟设备。The device storage unit 321 is configured to store online physical devices registered to the gateway and/or virtual devices formed by online physical devices registered to the gateway pushed by the network server 31 .

应用指令接收单元322,用于接收应用指令发起方33发送的应用指令。The application instruction receiving unit 322 is configured to receive the application instruction sent by the application instruction initiator 33 .

目标设备查找单元323,用于根据应用指令接收单元322接收的应用指令从设备存储单元321中查找满足应用指令的目标设备。The target device searching unit 323 is configured to search the device storage unit 321 for a target device satisfying the application instruction according to the application instruction received by the application instruction receiving unit 322 .

设备指令生成与发送单元324,用于在目标设备查找单元323查找到满足应用指令的目标设备时生成并发送设备指令至设备34中的目标设备,以控制目标设备执行设备指令。The device command generating and sending unit 324 is configured to generate and send a device command to the target device in the device 34 when the target device searching unit 323 finds a target device satisfying the application command, so as to control the target device to execute the device command.

该实施例中,网络服务器31将注册到网关的在线物理设备和/或注册到网关的在线物理设备形成的虚拟设备推送并存储到网关32内;此后,将通过网关32接收应用指令,根据应用指令从网关已存储的设备中查找满足应用指令的目标设备。如果查找到目标设备,网关生成设备指令并发送至与应用指令对应的目标设备,以控制目标设备执行设备指令。在设备调用过程中,如果网关32已存储设备中具有完成应用指令的设备,则设备的调用、指令生成及发送均能够不需要与网络服务器31交互,因而,即使网关32与网络服务器31断开了连接,用户仍可以通过应用指令调用物理设备以及虚拟设备。该实施例更具体的设备调用过程可以参考图1及图2方法流程的描述。In this embodiment, the network server 31 pushes and stores the online physical device registered to the gateway and/or the virtual device formed by the online physical device registered to the gateway into the gateway 32; thereafter, the gateway 32 will receive the application instruction, according to the application The instruction searches for a target device that satisfies the application instruction from the devices stored in the gateway. If the target device is found, the gateway generates a device command and sends it to the target device corresponding to the application command, so as to control the target device to execute the device command. In the process of calling the device, if the gateway 32 has stored the device that has completed the application instruction, then the call of the device, the generation and sending of the instruction can not need to interact with the network server 31, therefore, even if the gateway 32 is disconnected from the network server 31 After connecting, users can still invoke physical devices and virtual devices through application commands. For a more specific device calling process in this embodiment, reference may be made to the description of the method flow in FIG. 1 and FIG. 2 .

请参见图4,该图4示出了图3中网关另一个实施例的结构框图。Please refer to FIG. 4 , which shows a structural block diagram of another embodiment of the gateway in FIG. 3 .

如图4所示,网关所包括的单元、每个单元的功能、各单元之间的连接关系如下:As shown in Figure 4, the units included in the gateway, the functions of each unit, and the connection relationship between each unit are as follows:

设备存储单元421,用于存储由网络服务器等外部设备推送的、注册到网关的在线物理设备和/或注册到所述网关的在线物理设备形成的虚拟设备。具体来说,设备存储单元421存储有在线物理设备的设备实例和/或在线物理设备形成的虚拟设备的虚拟设备信息、虚拟设备与成员物理设备的映射关系及成员物理设备的设备实例。The device storage unit 421 is configured to store online physical devices registered to the gateway and/or virtual devices formed by online physical devices registered to the gateway pushed by external devices such as a network server. Specifically, the device storage unit 421 stores device instances of online physical devices and/or virtual device information of virtual devices formed by online physical devices, mapping relationships between virtual devices and member physical devices, and device instances of member physical devices.

应用指令接收单元422,用于接收应用指令发起方发送的应用指令。The application instruction receiving unit 422 is configured to receive the application instruction sent by the application instruction initiator.

应用指令解析单元423,用于解析应用指令接收单元422接收的应用指令,获取应用指令中的设备标识和操作信息。The application instruction parsing unit 423 is configured to analyze the application instruction received by the application instruction receiving unit 422, and obtain the device identification and operation information in the application instruction.

设备标识判定单元424,用于判定应用指令解析单元423获取的应用指令中的设备标识为物理设备的设备标识或虚拟设备的设备标识并输出。The device identification determination unit 424 is configured to determine and output the device identification in the application instruction acquired by the application instruction analysis unit 423 as a physical device identification or a virtual device identification.

目标设备查找单元425,用于查找满足应用指令的目标设备。A target device search unit 425, configured to search for a target device that meets the application instruction.

设备指令生成与发送单元426,用于在目标设备查找单元425查找到满足应用指令的目标设备时生成并发送设备指令至目标设备,以控制目标设备执行设备指令。The device command generating and sending unit 426 is configured to generate and send a device command to the target device when the target device searching unit 425 finds a target device satisfying the application command, so as to control the target device to execute the device command.

具体来说,在设备标识判定单元424判定应用指令中的设备标识为物理设备的设备标识时,目标设备查找单元425从设备存储单元421已存储的设备中查找到具有应用指令中的设备标识的在线物理设备作为目标物理设备;设备指令生成与发送单元426根据操作信息从目标物理设备的设备实例中查找对应的操作名称或代码,并基于目标物理设备的设备标识和对应的操作名称或代码,生成目标物理设备的设备指令,发送至目标物理设备。Specifically, when the device identifier determination unit 424 determines that the device identifier in the application instruction is the device identifier of a physical device, the target device search unit 425 searches for the device with the device identifier in the application instruction from the devices stored in the device storage unit 421. The online physical device is used as the target physical device; the device command generation and sending unit 426 searches the corresponding operation name or code from the device instance of the target physical device according to the operation information, and based on the device identification of the target physical device and the corresponding operation name or code, Generate a device command of the target physical device and send it to the target physical device.

而在设备标识判定单元424判定应用指令中的设备标识为虚拟设备的设备标识时,目标设备查找单元425从设备存储单元421已存储的设备中查找到具有应用指令中的设备标识的虚拟设备作为目标虚拟设备;设备指令生成与发送单元426根据操作信息、目标虚拟设备中虚拟设备与成员物理设备的映射关系及成员物理设备的设备实例查找形成目标虚拟设备的成员物理设备的设备标识及对应的操作名称或代码,并基于成员物理设备的设备标识及对应的操作名称或代码,生成成员物理设备的设备指令,发送至成员物理设备。And when the device identification determination unit 424 determines that the device identification in the application instruction is the device identification of a virtual device, the target device search unit 425 finds the virtual device with the device identification in the application instruction from the devices stored in the device storage unit 421 as The target virtual device; the device instruction generating and sending unit 426 searches for the device identifiers and corresponding The operation name or code, and based on the device identification of the member physical device and the corresponding operation name or code, generate the device instruction of the member physical device and send it to the member physical device.

反馈结果输出单元427,用于在目标设备查找单元425未查找到满足应用指令的目标设备时向应用指令的发起方反馈查找失败结果。The feedback result output unit 427 is configured to feed back a search failure result to the originator of the application instruction when the target device search unit 425 fails to find a target device satisfying the application instruction.

应用指令转发单元428,用于在目标设备查找单元425未查找到满足应用指令的目标设备、且网关连接有外部设备时向外部设备转发应用指令;An application instruction forwarding unit 428, configured to forward the application instruction to the external device when the target device search unit 425 does not find a target device satisfying the application instruction and the gateway is connected to an external device;

外部设备反馈接收处理单元429,用于接收外部设备的反馈并处理;在外部设备的反馈为满足应用指令的在线物理设备形成的虚拟设备及设备指令时,将外部设备反馈的虚拟设备存储在设备存储单元421,并将外部设备反馈的设备指令转发至对应的成员物理设备;在外部设备的反馈为查找失败消息时,控制反馈结果输出单元427向应用指令的发起方反馈查找失败结果。The external device feedback receiving processing unit 429 is used to receive and process the feedback from the external device; when the feedback from the external device is a virtual device and a device instruction formed by an online physical device that meets the application instruction, store the virtual device fed back by the external device in the device The storage unit 421 forwards the device instruction fed back by the external device to the corresponding member physical device; when the feedback from the external device is a search failure message, the control feedback result output unit 427 feeds back the search failure result to the initiator of the application instruction.

虚拟设备标识转发单元4210,用于将外部设备反馈的虚拟设备中的虚拟设备标识转发至应用指令的发起方。The virtual device identifier forwarding unit 4210 is configured to forward the virtual device identifier in the virtual device fed back by the external device to the originator of the application instruction.

设备存储单元421存储的在线物理设备的设备实例,可以是接收自外部设备,也可以是由网关接收外部设备发送的在线物理设备的本体模型而由网关根据本体模型生成的。此情况下,网关还包括设备实例生成单元4211,用于根据在线物理设备的本体模型生成对应的设备实例,并将设备实例存储在设备存储单元421中。The device instance of the online physical device stored in the device storage unit 421 may be received from an external device, or may be generated by the gateway according to the ontology model after receiving the ontology model of the online physical device sent by the external device. In this case, the gateway further includes a device instance generation unit 4211 , configured to generate a corresponding device instance according to the ontology model of the online physical device, and store the device instance in the device storage unit 421 .

采用图4结构的网关,如果网关已存储设备中具有完成应用指令的设备,则设备的调用、指令生成及发送均能够不需要与外部设备交互。如果网关从已存储的设备中未查找到满足应用指令的目标设备,网关还可以反馈查找失败结果;或者,在网关连接有外部设备时,网关再向外部设备转发应用指令,借助于外部设备实现通过应用指令对设备的调用。该实施例更具体的设备调用过程可以参考图1及图2方法流程的描述。Using the gateway with the structure shown in Figure 4, if there is a device that completes the application instruction in the gateway's stored devices, then the call of the device, the generation and transmission of the instruction can all need no interaction with external devices. If the gateway does not find a target device that satisfies the application instruction from the stored devices, the gateway can also feed back the result of the search failure; or, when the gateway is connected to an external device, the gateway forwards the application instruction to the external device, with the help of the external device. Calls to devices through application commands. For a more specific device calling process in this embodiment, reference may be made to the description of the method flow in FIG. 1 and FIG. 2 .

以上实施例仅用以说明本发明的技术方案,而非对其进行限制;尽管参照前述实施例对本发明进行了详细的说明,对于本领域的普通技术人员来说,依然可以对前述实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或替换,并不使相应技术方案的本质脱离本发明所要求保护的技术方案的精神和范围。The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art can still understand the foregoing embodiments. Modifications are made to the technical solutions described, or equivalent replacements are made to some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions claimed in the present invention.

Claims (12)

Translated fromChinese
1.一种网关,其特征在于,包括:1. A gateway, characterized in that, comprising:设备存储单元,用于存储注册到所述网关的在线物理设备和/或注册到所述网关的在线物理设备形成的虚拟设备;a device storage unit, configured to store online physical devices registered to the gateway and/or virtual devices formed by online physical devices registered to the gateway;应用指令接收单元,用于接收应用指令;an application instruction receiving unit, configured to receive an application instruction;目标设备查找单元,用于根据所述应用指令接收单元接收的所述应用指令从所述设备存储单元中查找满足所述应用指令的目标设备;a target device searching unit, configured to search the device storage unit for a target device satisfying the application instruction according to the application instruction received by the application instruction receiving unit;设备指令生成与发送单元,用于在所述目标设备查找单元查找到满足所述应用指令的目标设备时生成满足所述应用指令的设备指令并发送至所述目标设备。A device instruction generation and sending unit, configured to generate a device instruction that satisfies the application instruction and send it to the target device when the target device search unit finds a target device that satisfies the application instruction.2.根据权利要求1所述的网关,其特征在于,所述网关还包括:2. The gateway according to claim 1, wherein the gateway further comprises:应用指令解析单元,用于解析所述应用指令接收单元接收的应用指令,获取所述应用指令中的设备标识和操作信息;An application instruction parsing unit, configured to parse the application instruction received by the application instruction receiving unit, and obtain the device identification and operation information in the application instruction;设备标识判定单元,用于判定所述应用指令解析单元获取的所述应用指令中的设备标识为物理设备的设备标识或虚拟设备的设备标识并输出;a device identification determining unit, configured to determine and output the device identification in the application instruction acquired by the application instruction parsing unit as a device identification of a physical device or a device identification of a virtual device;所述设备存储单元存储有所述在线物理设备的设备实例和/或所述在线物理设备形成的虚拟设备的虚拟设备信息、虚拟设备与成员物理设备的映射关系及成员物理设备的设备实例;The device storage unit stores the device instance of the online physical device and/or the virtual device information of the virtual device formed by the online physical device, the mapping relationship between the virtual device and the member physical device, and the device instance of the member physical device;在所述设备标识判定单元判定所述应用指令中的设备标识为物理设备的设备标识时,所述目标设备查找单元从所述设备存储单元已存储的设备中查找到具有所述应用指令中的设备标识的在线物理设备作为目标物理设备;所述设备指令生成与发送单元根据所述操作信息从所述目标物理设备的设备实例中查找对应的操作名称或代码,基于所述目标物理设备的设备标识和所述对应的操作名称或代码,生成所述目标物理设备的设备指令,发送至所述目标物理设备;When the device identifier judging unit determines that the device identifier in the application instruction is a device identifier of a physical device, the target device search unit finds the The online physical device identified by the device is used as the target physical device; the device instruction generation and sending unit searches for the corresponding operation name or code from the device instance of the target physical device according to the operation information, based on the device instance of the target physical device Identify and the corresponding operation name or code, generate a device instruction for the target physical device, and send it to the target physical device;在所述设备标识判定单元判定所述应用指令中的设备标识为虚拟设备的设备标识时,所述目标设备查找单元从所述设备存储单元已存储的设备中查找到具有所述应用指令中的设备标识的虚拟设备作为目标虚拟设备;所述设备指令生成与发送单元根据所述操作信息、所述目标虚拟设备中虚拟设备与成员物理设备的映射关系及成员物理设备的设备实例查找形成所述目标虚拟设备的成员物理设备的设备标识及对应的操作名称或代码,基于所述成员物理设备的设备标识及对应的操作名称或代码,生成成员物理设备的设备指令,发送至成员物理设备。When the device identifier judging unit determines that the device identifier in the application instruction is a device identifier of a virtual device, the target device search unit finds the The virtual device identified by the device is used as the target virtual device; the device instruction generating and sending unit searches and forms the Based on the device ID and the corresponding operation name or code of the member physical device of the target virtual device, generate a device command of the member physical device based on the device ID and the corresponding operation name or code of the member physical device, and send it to the member physical device.3.根据权利要求2所述的网关,其特征在于,所述网关还包括:3. The gateway according to claim 2, wherein the gateway further comprises:设备实例生成单元,用于根据所述在线物理设备的本体模型生成对应的设备实例。A device instance generating unit, configured to generate a corresponding device instance according to the ontology model of the online physical device.4.根据权利要求1所述的网关,其特征在于,所述网关还包括:4. The gateway according to claim 1, wherein the gateway further comprises:反馈结果输出单元,用于在所述目标设备查找单元未查找到满足所述应用指令的目标设备时向所述应用指令的发起方反馈查找失败结果。A feedback result output unit, configured to feed back a finding failure result to the originator of the application instruction when the target device search unit fails to find a target device that satisfies the application instruction.5.根据权利要求4所述的网关,其特征在于,所述网关还包括:5. The gateway according to claim 4, wherein the gateway further comprises:应用指令转发单元,用于在所述目标设备查找单元未查找到满足所述应用指令的目标设备、且所述网关连接有外部设备时向所述外部设备转发所述应用指令;An application instruction forwarding unit, configured to forward the application instruction to the external device when the target device search unit does not find a target device that satisfies the application instruction and the gateway is connected to an external device;外部设备反馈接收处理单元,用于接收所述外部设备的反馈并处理;在所述外部设备的反馈为满足所述应用指令的在线物理设备形成的虚拟设备及设备指令时,将所述外部设备反馈的虚拟设备存储在所述设备存储单元,并将所述外部设备反馈的设备指令转发至对应的成员物理设备;所述外部设备的反馈为查找失败消息时,控制所述反馈结果输出单元向所述应用指令的发起方反馈查找失败结果。The external device feedback receiving processing unit is configured to receive and process the feedback of the external device; when the feedback of the external device is a virtual device and a device instruction formed by an online physical device that satisfies the application instruction, the external device The virtual device fed back is stored in the device storage unit, and the device instruction fed back by the external device is forwarded to the corresponding member physical device; when the feedback of the external device is a search failure message, the feedback result output unit is controlled to send The originator of the application instruction feeds back a search failure result.6.根据权利要求5所述的网关,其特征在于,所述网关还包括:6. The gateway according to claim 5, wherein the gateway further comprises:虚拟设备标识转发单元,用于将所述外部设备反馈的虚拟设备中的虚拟设备标识转发至所述应用指令的发起方。The virtual device identifier forwarding unit is configured to forward the virtual device identifier in the virtual device fed back by the external device to the originator of the application instruction.7.一种通过网关调用设备的方法,其特征在于,所述方法包括:7. A method for invoking a device through a gateway, characterized in that the method comprises:网关接收应用指令,根据所述应用指令从所述网关已存储的设备中查找满足所述应用指令的目标设备;The gateway receives the application instruction, and according to the application instruction, searches for a target device that satisfies the application instruction from the devices stored by the gateway;若查找到所述目标设备,所述网关生成满足所述应用指令的设备指令并发送至所述目标设备;If the target device is found, the gateway generates a device instruction that satisfies the application instruction and sends it to the target device;所述网关已存储的设备是注册到所述网关的在线物理设备和/或注册到所述网关的在线物理设备形成的虚拟设备。The devices stored by the gateway are online physical devices registered to the gateway and/or virtual devices formed by the online physical devices registered to the gateway.8.根据权利要求7所述的方法,其特征在于,所述网关存储有所述在线物理设备的设备实例和/或所述在线物理设备形成的虚拟设备的虚拟设备信息、虚拟设备与成员物理设备的映射关系及成员物理设备的设备实例;所述网关从已存储的设备中查找满足所述应用指令的目标设备,若查找到所述目标设备,所述网关生成满足所述应用指令的设备指令并发送至所述目标设备具体包括:8. The method according to claim 7, wherein the gateway stores the device instance of the online physical device and/or the virtual device information of the virtual device formed by the online physical device, the virtual device and member physical The mapping relationship of the device and the device instance of the member physical device; the gateway searches for the target device that meets the application instruction from the stored devices, and if the target device is found, the gateway generates a device that meets the application instruction The instructions and sent to the target device specifically include:所述网关获取所述应用指令中的设备标识和操作信息,对所述应用指令中的设备标识进行判断;The gateway obtains the device identifier and operation information in the application instruction, and judges the device identifier in the application instruction;若所述应用指令中的设备标识为物理设备的设备标识,从所述网关已存储的设备中查找到具有所述应用指令中的设备标识的在线物理设备作为目标物理设备,根据所述操作信息从所述目标物理设备的设备实例中查找对应的操作名称或代码,基于所述目标物理设备的设备标识和所述对应的操作名称或代码,生成所述目标物理设备的设备指令,发送至所述目标物理设备;If the device identifier in the application instruction is the device identifier of a physical device, find an online physical device with the device identifier in the application instruction as the target physical device from the devices stored by the gateway, and according to the operation information Find the corresponding operation name or code from the device instance of the target physical device, generate a device instruction for the target physical device based on the device identifier of the target physical device and the corresponding operation name or code, and send it to the Describe the target physical device;若所述应用指令中的设备标识为虚拟设备的设备标识,从所述网关已存储的设备中查找到具有所述应用指令中的设备标识的虚拟设备作为目标虚拟设备,根据所述操作信息、所述目标虚拟设备中虚拟设备与成员物理设备的映射关系及成员物理设备的设备实例查找形成所述目标虚拟设备的成员物理设备的设备标识及对应的操作名称或代码,基于所述成员物理设备的设备标识及对应的操作名称或代码,生成成员物理设备的设备指令,发送至成员物理设备。If the device identifier in the application instruction is the device identifier of a virtual device, find the virtual device with the device identifier in the application instruction as the target virtual device from the devices stored in the gateway, and according to the operation information, The mapping relationship between the virtual device and the member physical device in the target virtual device and the device instance of the member physical device are searched for the device identifier and the corresponding operation name or code of the member physical device forming the target virtual device, based on the member physical device The device identifier and the corresponding operation name or code generate the device command of the member physical device and send it to the member physical device.9.根据权利要求8所述的方法,其特征在于,所述网关存储的所述在线物理设备的设备实例接收自外部设备并保存,或者,所述网关存储的所述在线物理设备的设备实例由网关根据接收自外部设备的在线物理设备的本体模型生成并保存。9. The method according to claim 8, wherein the device instance of the online physical device stored by the gateway is received from an external device and saved, or the device instance of the online physical device stored by the gateway Generated and saved by the gateway according to the ontology model of the online physical device received from the external device.10.根据权利要求7所述的方法,其特征在于,所述方法还包括:10. The method according to claim 7, further comprising:若从所述网关已存储的设备中未查找到所述目标设备,所述网关向所述应用指令的发起方反馈查找失败结果。If the target device is not found from the devices stored by the gateway, the gateway feeds back a search failure result to the originator of the application instruction.11.根据权利要求7所述的方法,其特征在于,所述方法还包括:11. The method according to claim 7, further comprising:若从所述网关已存储的设备中未查找到所述目标设备,在所述网关连接外部设备时,所述网关向所述外部设备转发所述应用指令,接收所述外部设备的反馈,并根据所述反馈执行相应的处理;If the target device is not found from the devices stored by the gateway, when the gateway is connected to an external device, the gateway forwards the application instruction to the external device, receives feedback from the external device, and Execute corresponding processing according to the feedback;所述接收所述外部设备的反馈,并根据所述反馈执行相应的处理具体包括:The receiving the feedback from the external device and performing corresponding processing according to the feedback specifically includes:所述外部设备的反馈为满足所述应用指令的在线物理设备形成的虚拟设备及设备指令,所述网关保存所述外部设备反馈的虚拟设备,并将所述外部设备反馈的设备指令转发至对应的成员物理设备;The feedback from the external device is a virtual device and a device instruction formed by an online physical device that satisfies the application instruction, the gateway saves the virtual device fed back by the external device, and forwards the device instruction fed back by the external device to the corresponding member physical devices;所述外部设备的反馈为查找失败消息,所述网关向所述应用指令的发起方反馈查找失败结果。The feedback from the external device is a search failure message, and the gateway feeds back a search failure result to the initiator of the application instruction.12.根据权利要求11所述的方法,其特征在于,所述网关保存所述外部设备反馈的虚拟设备包括保存虚拟设备信息、虚拟设备与成员物理设备的映射关系及成员物理设备的设备实例,所述网关还将所述虚拟设备信息中的虚拟设备标识转发至所述应用指令的发起方。12. The method according to claim 11, wherein the gateway storing the virtual device fed back by the external device includes storing virtual device information, a mapping relationship between a virtual device and a member physical device, and a device instance of a member physical device, The gateway also forwards the virtual device identifier in the virtual device information to the originator of the application instruction.
CN201510089469.1A2015-02-272015-02-27Gateway and method for calling device through gatewayPendingCN105991423A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201510089469.1ACN105991423A (en)2015-02-272015-02-27Gateway and method for calling device through gateway

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201510089469.1ACN105991423A (en)2015-02-272015-02-27Gateway and method for calling device through gateway

Publications (1)

Publication NumberPublication Date
CN105991423Atrue CN105991423A (en)2016-10-05

Family

ID=57039171

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201510089469.1APendingCN105991423A (en)2015-02-272015-02-27Gateway and method for calling device through gateway

Country Status (1)

CountryLink
CN (1)CN105991423A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN106533882A (en)*2016-11-182017-03-22杭州迪普科技股份有限公司Message processing method and device
CN107171911A (en)*2017-06-292017-09-15青岛海信智慧家居系统股份有限公司The control method and device of intelligent home device
CN109104473A (en)*2018-07-272018-12-28深圳绿米联创科技有限公司A kind of control method, control device, control system and gateway
CN110601871A (en)*2019-07-312019-12-20华为技术有限公司Virtual equipment testing method and device
CN113348725A (en)*2019-05-162021-09-03深圳市欢太科技有限公司Device operation method, device, gateway, electronic device and computer readable medium
WO2023142060A1 (en)*2022-01-292023-08-03西门子股份公司Information processing method and apparatus, computing device and computer-readable medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
KR20050040311A (en)*2003-10-282005-05-03에스케이 텔레콤주식회사Method for building home network
CN1845505A (en)*2005-04-072006-10-11海尔集团公司 A control method and equipment management device for home network equipment
CN102377621A (en)*2010-08-162012-03-14Tcl集团股份有限公司Equipment interconnection system and method
CN103023681A (en)*2011-09-222013-04-03北京天成信宇科技有限责任公司Smart home control device and updating method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
KR20050040311A (en)*2003-10-282005-05-03에스케이 텔레콤주식회사Method for building home network
CN1845505A (en)*2005-04-072006-10-11海尔集团公司 A control method and equipment management device for home network equipment
CN102377621A (en)*2010-08-162012-03-14Tcl集团股份有限公司Equipment interconnection system and method
CN103023681A (en)*2011-09-222013-04-03北京天成信宇科技有限责任公司Smart home control device and updating method

Cited By (10)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN106533882A (en)*2016-11-182017-03-22杭州迪普科技股份有限公司Message processing method and device
CN106533882B (en)*2016-11-182019-12-06杭州迪普科技股份有限公司Message processing method and device
CN107171911A (en)*2017-06-292017-09-15青岛海信智慧家居系统股份有限公司The control method and device of intelligent home device
CN109104473A (en)*2018-07-272018-12-28深圳绿米联创科技有限公司A kind of control method, control device, control system and gateway
CN109104473B (en)*2018-07-272022-11-08深圳绿米联创科技有限公司Control method, control device, control system and gateway
CN113348725A (en)*2019-05-162021-09-03深圳市欢太科技有限公司Device operation method, device, gateway, electronic device and computer readable medium
CN110601871A (en)*2019-07-312019-12-20华为技术有限公司Virtual equipment testing method and device
CN110601871B (en)*2019-07-312022-04-05华为技术有限公司 Method and device for testing virtual equipment
WO2023142060A1 (en)*2022-01-292023-08-03西门子股份公司Information processing method and apparatus, computing device and computer-readable medium
CN118541952A (en)*2022-01-292024-08-23西门子股份公司Information processing method, apparatus, computing device, and computer readable medium

Similar Documents

PublicationPublication DateTitle
CN105471686B (en)Terminal control method, device and system
CN105991423A (en)Gateway and method for calling device through gateway
EP2854374B1 (en)Method and device for managing terminal in home network and home network
CN103441881B (en)unified device management method
CN112838940B (en)Network controller frame and data processing method
CN115004650B (en) Node configuration method, device, distributed system and computer-readable medium
CN105553959A (en)Remote control method and system capable of dynamically generating intelligent device operation interface
CN104967560A (en) Method and device for realizing linkage with devices managed by a gateway
CN110933170A (en)Multi-device linkage control method and device of ZigBee gateway and storage medium
CN112217845B (en)Data transmission method based on Netconf protocol and related equipment
CN105530268A (en) Heterogeneous protocol intercommunication method and controller
CN105827534A (en)Ad Hoc network method and device
CN111669333B (en) Data transmission method, device, computing device and storage medium
CN104935484A (en) A method and device for invoking home appliance services through a gateway
WO2015168981A1 (en)Attribute operating method and apparatus
CN113625586B (en)Method and system for controlling intelligent home based on gateway
CN114371944A (en)Distributed service remote calling method, system, device and storage medium
WO2019041944A1 (en)Method and apparatus for processing packets
KR20150088462A (en)Method for linking network device in cloud environment and apparatus therefor
CN114788393B (en)Inter-device communication method, device and storage medium
CN105306442A (en)Proxy server and command transmission methods
CN110138585A (en)A kind of industrial internet of things data forward process system based on SDN
CN113630298A (en)Intelligent control system, method and device
CN105389218A (en)Methods of server cabinet for processing basic input output system (BIOS) information, and nodes
CN108173910B (en)Method and system for managing application

Legal Events

DateCodeTitleDescription
C06Publication
PB01Publication
C10Entry into substantive examination
SE01Entry into force of request for substantive examination
C41Transfer of patent application or patent right or utility model
TA01Transfer of patent application right

Effective date of registration:20170106

Address after:100086 room 601-606, level, Pacific International Building, Zhichun Road, Beijing, 106, China

Applicant after:Haier smart technology (Beijing) Co., Ltd.

Applicant after:Qingdao Haier Intelligent Home Appliances Technology Co., Ltd.

Address before:100086 Beijing, Zhichun Road, Zhongguancun, No. 106 crown office building, layer, layer 15

Applicant before:Beijing Haier Guangke Digital Techn Co., Ltd.

Applicant before:Qingdao Haier Intelligent Home Appliances Technology Co., Ltd.

RJ01Rejection of invention patent application after publication
RJ01Rejection of invention patent application after publication

Application publication date:20161005


[8]ページ先頭

©2009-2025 Movatter.jp