Method and device for generating and controlling sub-device description information of composite household appliance
Technical Field
The invention relates to the field of household appliances, in particular to a method and a device for generating and controlling sub-device description information of a composite household appliance.
Background
The household appliance can be controlled by the mobile device, so that the life of people can be greatly facilitated, but the control device needs to support the interface specifications of all household appliances, and the development difficulty is increased. Thus, the HAE (Home applications & enterprise) working group under the alljoyn standard is formulating a standardized interface for Home devices, and the Home devices supporting the interface can be accessed by the same control application. That is, an application program can control home devices of different brands and different models. The development time of the application program is saved, and convenience is brought to household appliance users.
However, the inventors have found that, in the case of a composite home appliance composed of a combination of a plurality of sub-devices, the conventional interface standard cannot semantically distinguish the sub-devices of the composite home appliance. Taking a refrigerator as an example: the interface standard is divided into a repeater, a freezer and an icemaker, and for composite equipment such as a refrigerator which can be separated and reassembled, when more than one equipment with the same semantic exists, the existing interface standard cannot semantically distinguish the equipment. The problem similar to the refrigerator can also occur in the central air conditioner, and how to semantically distinguish the submachine at different floors and different positions is a problem which is not solved by the HAE semantically.
Disclosure of Invention
The invention aims to provide a method and a device for generating and controlling the description information of the sub-equipment of a composite household appliance, which are used for solving the problem that the interface standard in the prior art cannot distinguish the sub-equipment of the composite household appliance semantically.
In order to solve the above technical problem, in one aspect, the present invention provides a method for generating description information of a composite home appliance, including:
distributing internal identifications for each sub-device of the composite household appliance to generate a sub-device list;
sending the sub-equipment list to control equipment, and receiving a display name of the sub-equipment fed back by the control equipment;
and setting the corresponding relation between the display name of the sub-equipment and the sub-equipment to generate the description information of the composite household electrical appliance sub-equipment.
Further, before receiving the display name of the sub-device fed back by the control device, the method further includes:
sending a request for setting the sub-equipment to the control equipment, wherein the request comprises the sub-equipment list;
receiving a test signal sent by the control device to the sub-devices in the sub-device list, and sending a response signal of the sub-devices to the control device, wherein the display name is set by the control device according to the response signal of the sub-devices;
and after receiving the display name of the sub-equipment sent by the control equipment, adding the display name in the description information of the sub-equipment.
Further, the correspondence between the display name of the child device and the child device includes:
the display name of the sub-device corresponds to the internal identifier of the sub-device, the display name of the sub-device corresponds to the interface identifier of the sub-device, or the display name of the sub-device corresponds to the device name of the sub-device.
On the other hand, the invention also provides a control method of the composite household appliance, which comprises the steps of
The control equipment reads the description information of the composite household electronic equipment;
the control equipment extracts the display name in the description information and loads the display name to an application interface of the control equipment;
and the control equipment sends a control command according to the display name to control the corresponding sub-equipment.
Further, before reading the description information of the composite electronic device, the control device further includes:
receiving a sub-device list sent by the composite household appliance, setting the display name of the sub-device, and sending the display name of the sub-device to the composite household appliance; the sub-device list is generated after the conforming household appliance distributes internal identification for each sub-device.
Further, the process of the control device setting the display name of the sub device according to the sub device list includes:
receiving a sub-device setting request sent by the composite household appliance to the control device, wherein the sub-device setting request comprises the sub-device list;
sending a test signal to the sub-equipment in the sub-equipment list, and receiving a response signal of the sub-equipment;
and setting the display name of the sub-equipment according to the response signal of the sub-equipment, and sending the display name to the composite household appliance.
Further, the control device accesses the composite household appliance, and reads the description information of the composite household appliance after receiving a composite household appliance access notification sent by the composite household appliance to the control device.
Further, the description information of the composite home appliance includes a correspondence between a display name of the composite home appliance and the sub-device, and the correspondence between the display name of the sub-device and the sub-device includes: the display name of the sub-device corresponds to the internal identifier of the sub-device, the display name of the sub-device corresponds to the interface identifier of the sub-device, or the display name of the sub-device corresponds to the device name of the sub-device.
In another aspect, the present invention further provides an apparatus for generating description information of a composite home electronic device, including:
the sub-device identification module is used for distributing internal identifications for each sub-device of the composite household appliance and generating a sub-device list;
the communication module is used for sending the sub-equipment list to the control equipment and receiving the display name of the sub-equipment fed back by the control equipment;
and the description module is used for setting the corresponding relation between the display name of the sub-equipment and generating the description information of the composite household electrical appliance sub-equipment.
Further, the communication module is further configured to:
before receiving a display name of the sub-device fed back by the control device, sending a request for setting the sub-device to the control device, wherein the request comprises the sub-device list;
receiving a test signal sent by the control device to the sub-devices in the sub-device list, and sending a response signal of the sub-devices to the control device, wherein the display name is set by the control device according to the response signal of the sub-devices;
and after receiving the display name of the sub-equipment sent by the control equipment, the description module adds the display name in the description information of the sub-equipment.
Further, the correspondence between the display name of the child device and the child device includes:
the display name of the sub-device corresponds to the internal identifier of the sub-device, the display name of the sub-device corresponds to the interface identifier of the sub-device, or the display name of the sub-device corresponds to the device name of the sub-device.
In another aspect, the present invention also provides a control device for a composite home appliance, comprising
The reading module is used for reading the description information of the composite household electronic equipment;
the loading module is used for extracting the display name in the description information and loading the display name to an application interface of the control equipment;
and the control module is used for sending a control command by the control equipment according to the display name and controlling the corresponding sub-equipment.
Further, the control device further includes:
the communication module is used for receiving a sub-device list sent by the composite household appliance, setting the display name of the sub-device and sending the display name of the sub-device to the composite household appliance before the reading module reads the description information of the sub-device of the composite household appliance; the sub-device list is generated after the conforming household appliance distributes internal identification for each sub-device.
Further, the communication module is further configured to:
receiving a sub-device setting request sent by the composite household appliance to the control device, wherein the sub-device setting request comprises the sub-device list;
sending a test signal to the sub-equipment in the sub-equipment list, and receiving a response signal of the sub-equipment;
and setting the display name of the sub-equipment according to the response signal of the sub-equipment, and sending the display name to the composite household appliance.
Further, the reading module reads the description information of the composite household electrical appliance sub-device after the communication module receives the composite household electrical appliance access notification sent by the composite household electrical appliance to the control device.
Further, the description information of the composite home appliance includes a correspondence between a display name of the composite home appliance and the sub-device, and the correspondence between the display name of the sub-device and the sub-device includes: the display name of the sub-device corresponds to the internal identifier of the sub-device, the display name of the sub-device corresponds to the interface identifier of the sub-device, or the display name of the sub-device corresponds to the device name of the sub-device.
The invention has the following beneficial effects:
the invention can facilitate the user to control the composite household appliance containing a plurality of sub-devices of the same type (with the same interface).
Drawings
Fig. 1 is a flowchart illustrating interaction between a composite appliance and a control device according to an embodiment of the present invention;
fig. 2 is a block diagram of an apparatus for generating description information of a composite electronic device according to an embodiment of the present invention;
fig. 3 is a structural diagram of a control device of a composite home appliance according to an embodiment of the present invention.
Detailed Description
In order to solve the problem that the interface standard in the prior art cannot semantically distinguish the sub-devices of the composite home appliance, the invention provides a control method and a control device of the composite home appliance, and the invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not limit the invention.
The control method of the composite household appliance in the embodiment of the invention is shown in fig. 1, and comprises the following steps:
step 1: and the composite household appliance distributes internal identifications for each sub-device to generate a sub-device list. In this embodiment, after the composite home appliance enters the configuration mode, configuration of data connection (wifi, etc.) is performed. And after the data connection configuration is completed, the composite household appliance distributes internal identification for each sub-device.
Step 2: the control device sets the display name of the sub-device according to the sub-device list. In this embodiment, the method specifically includes:
(1) and the composite household appliance sends a request for setting the sub-devices to the control device, wherein the request comprises a sub-device list. The composite home appliance of the present embodiment transmits a slave device 1 description request (settchldevice description) to the control device 1, and the control device 1 sets a display name (presented-name) of the slave device.
(2) And the control equipment sends a test signal to the sub-equipment in the sub-equipment list, and the sub-equipment responds. The present embodiment controls the device 1 to send a test signal to the sub device 1, and the sub device 1 responds.
(3) And the control equipment sets the display name of the sub-equipment according to the response signal of the sub-equipment and sends the display name to the composite household appliance. In this embodiment, the control device 1 writes the rendered-name of the sub-device 1 according to the response signal of the sub-device 1, and sends the rendered-name to the composite home appliance through the control device 1.
(4) And the composite household appliance adds a display name in the description information of the sub-equipment. In this embodiment, after receiving the message, the composite home appliance adds a rendered-name to a child device-top in the 1device interface of the child device, where a natural language may be used, so that a user can specify a device specified by the rendered-name.
And step 3: the composite household appliance sets the corresponding relation between the display name of the sub-equipment and the sub-equipment. In this embodiment, the correspondence between the display name of the sub device and the sub device includes a correspondence between the display name of the sub device and an internal identifier of the sub device, a correspondence between the display name of the sub device and an interface identifier of the sub device, or a correspondence between the display name of the sub device and a device name of the sub device. That is, the composite home appliance adds a presented-name and a binding relationship of an internal identifier of the device (an interface identifier and a device name may also be added) in the binding list.
And similarly, repeating the step 2 and the step 3 to complete the setting of other sub-devices and generate a complete binding list.
And 4, step 4: and the control equipment controls the sub-equipment according to the corresponding relation. In this embodiment, the method specifically includes:
(1) and after the control equipment is accessed to the composite household appliance, the composite household appliance sends a composite household appliance access notice to the control equipment. In this embodiment, after the control device 2 accesses the composite home appliance, the composite home appliance sends a composite device access notification to request the control device 2 to read the description information of the composite home electronic device.
(2) And the control equipment reads the description information of the sub-equipment of the composite household appliance. The control device 2 in this embodiment reads the description information of the child device by getchelddeviceresolution ().
(3) And the control equipment extracts the display name in the description information and loads the display name to an application interface of the control equipment. In this embodiment, the control device 2 extracts the rendered-name in the description information, and loads the rendered-name to an application interface (specifically, the label-name may be on the user interface) of the control device 2. The purpose of this is that the user can know exactly which child device is controlled from the rendered-name.
(4) And the control equipment sends a control command according to the display name to control the corresponding sub-equipment.
An apparatus for generating description information of a composite home electronic device in an embodiment of the present invention is shown in fig. 2, and includes:
a sub-device identification module 201, configured to allocate internal identifications to each sub-device of the composite home appliance, and generate a sub-device list;
the communication module 202 is configured to send the sub-device list to a control device, and receive a display name of the sub-device fed back by the control device;
the description module 203 is configured to set a corresponding relationship between the display name of the sub-device and the sub-device, and generate description information of the composite home appliance sub-device.
Wherein the communication module 202 is further configured to:
before receiving a display name of the sub-device fed back by the control device, sending a request for setting the sub-device to the control device, wherein the request comprises the sub-device list;
receiving a test signal sent by the control device to the sub-devices in the sub-device list, and sending a response signal of the sub-devices to the control device, wherein the display name is set by the control device according to the response signal of the sub-devices;
and after receiving the display name of the sub-equipment sent by the control equipment, the description module adds the display name in the description information of the sub-equipment.
The corresponding relation between the display name of the sub-device and the sub-device comprises:
the display name of the sub-device corresponds to the internal identifier of the sub-device, the display name of the sub-device corresponds to the interface identifier of the sub-device, or the display name of the sub-device corresponds to the device name of the sub-device.
As shown in fig. 3, the embodiment of the present invention further relates to a control device for a composite home appliance, which includes
A reading module 301, configured to read description information of the composite home electronic device;
a loading module 302, configured to extract a display name in the description information, and load the display name to an application interface of the control device;
and the control module 303 is configured to send a control command according to the display name by the control device, and control the corresponding sub-device.
In addition, the control device of the present embodiment further includes:
the communication module 304 is configured to receive a sub-device list sent by the composite home appliance, set a display name of the sub-device, and send the display name of the sub-device to the composite home appliance before the reading module 301 reads the description information of the sub-device of the composite home appliance; the sub-device list is generated after the conforming household appliance distributes internal identification for each sub-device.
Receiving a sub-device setting request sent by the composite household appliance to the control device, wherein the sub-device setting request comprises the sub-device list;
sending a test signal to the sub-equipment in the sub-equipment list, and receiving a response signal of the sub-equipment;
and setting the display name of the sub-equipment according to the response signal of the sub-equipment, and sending the display name to the composite household appliance.
After the communication module 304 receives a composite home appliance access notification sent by the composite home appliance to the control device, the reading module 301 reads the description information of the composite home appliance.
The description information of the composite household appliance sub-device comprises a corresponding relation between the display name of the sub-device of the composite household appliance and the sub-device, and the corresponding relation between the display name of the sub-device and the sub-device comprises: the display name of the sub-device corresponds to the internal identifier of the sub-device, the display name of the sub-device corresponds to the interface identifier of the sub-device, or the display name of the sub-device corresponds to the device name of the sub-device.
The invention can facilitate the user to control the composite household appliance containing a plurality of sub-devices of the same type (with the same interface).
Although the preferred embodiments of the present invention have been disclosed for illustrative purposes, those skilled in the art will appreciate that various modifications, additions and substitutions are possible, and the scope of the invention should not be limited to the embodiments described above.