Detailed Description
Reference will now be made in detail to embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are exemplary and intended to be used for explaining the present application and should not be construed as limiting the present application.
The application mainly aims at the technical problem that in the prior art, when the data transmission protocols supported by two household appliances are different, the two household appliances cannot communicate with each other, and therefore mutual control cannot be achieved, and the equipment control method is provided. According to the device control method, the first control instruction is obtained through the first device, wherein the first control instruction is used for controlling the second device, the first device carries out data transmission through the first data transmission protocol, the second device carries out data transmission through the second data transmission protocol, and then the first control instruction is sent to the third device through the first data transmission protocol, so that the third device sends the first control instruction to the second device through the second data transmission protocol. Therefore, when the data transmission protocols supported by the first device and the second device are different, the third device forwards the control instruction generated by the first device to the second device, and the first device controls the second device which cannot communicate.
In order to better understand the above technical solutions, exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
In order to better understand the technical solution, the technical solution will be described in detail with reference to the drawings and the specific embodiments.
Example one
Fig. 1 is a flowchart illustrating an apparatus control method according to an embodiment of the present application.
As shown in fig. 1, the device control method may include the steps of:
step 101, obtaining a first control instruction, where the first control instruction is used to control a second device, the first device performs data transmission through a first data transmission protocol, and the second device performs data transmission through a second data transmission protocol.
The execution main body of the embodiment of the application is the first device, and the first device can be any intelligent device in an intelligent home system, for example, an intelligent household appliance such as an air conditioner, a television and a refrigerator.
In this embodiment of the application, the second device is a target device that the user actually wants to control, for example, the second device may be an intelligent device such as an intelligent household appliance and a mobile terminal to be controlled.
In the embodiment of the present application, when a user wants to control the second device, the second device and the corresponding control parameters may be determined by operating a control panel (or screen) of the first device or operating a remote controller of the first device. For example, the user may trigger the control panel of the first device to determine the second device and the corresponding control parameter, or may also trigger a virtual key and/or an entity key on the remote controller of the first device to determine the second device and the corresponding control parameter, or may also input the second device and the corresponding control parameter by voice, which is not limited in this application.
In this application, data transmission protocols supported by the first device are marked as a first data transmission protocol, that is, the first device performs data transmission through the first data transmission protocol, and a data transmission protocol supported by the second device is marked as a second data transmission protocol, that is, the second device performs data transmission through the second data transmission protocol, so that the first data transmission protocol is different from the second data transmission protocol. For example, when the first data transmission protocol is a bluetooth protocol, the second data transmission protocol may be a Wireless Fidelity (WiFi) protocol, a ZigBee protocol, or the like, when the first data transmission protocol is a WiFi protocol, the second data transmission protocol may be a bluetooth protocol, a ZigBee protocol, or the like, when the first data transmission protocol is a ZigBee protocol, the second data transmission protocol may be a WiFi protocol, a bluetooth protocol, or the like, which is not limited in this application.
The BlueTooth protocol may be a relevant protocol of various BlueTooth network topologies, where the BlueTooth network topology includes BlueTooth Mesh (BlueTooth Mesh), point-to-point, star, broadcast, and the like.
For example, a first device as an execution subject is device 1, and a second device that a user wants to control is device 2. Assuming that a user controls the device 2 through the device 1, the user may operate the control panel of the device 1 to select the device 2 and set the corresponding control parameters of the device 2 on the control panel. For example, if the device 2 is an air conditioner and the temperature can be set to be raised by 2 degrees, the control parameters may be: the temperature is increased by 2 ℃. Alternatively, the device 2 is a smart lamp, and the brightness level and the color temperature of the smart lamp can be set, for example, the control parameters can be: the maximum brightness is set.
In the embodiment of the application, after a user operates a control panel (or screen) of the first device or operates a remote controller of the first device to determine the second device and the corresponding control parameter, the first device may determine the second device to be controlled and the control parameter in response to the user operation, and generate the first control instruction matching the first data transmission protocol according to the identifier and the control parameter of the second device. The identifier of the second device is used to uniquely identify the second device, and the identifier of the second device may be a name of the second device, a Serial Number (SN code for short), a hardware address (MAC address for short), or the like.
In this embodiment of the application, the first control instruction conforms to the first data transmission protocol, for example, when the first data transmission protocol is a WiFi protocol, the first control instruction is generated based on the WiFi protocol, or when the first data transmission protocol is a bluetooth protocol, the first control instruction is generated based on the bluetooth protocol.
And 102, sending the first control instruction to the third equipment through the first data transmission protocol, so that the third equipment sends the first control instruction to the second equipment through the second data transmission protocol.
In this embodiment, the second data transmission protocol is a data transmission protocol supported by the second device.
In this embodiment, the third device is a home appliance device that establishes communication with the first device, and the first device and the third device perform communication or data transmission based on a first data transmission protocol. For example, when the first data transmission protocol supported by the first device is a WiFi protocol, the first device and the third device communicate with each other through the WiFi protocol, or when the first data transmission protocol supported by the first device is a bluetooth protocol, the first device and the third device communicate or transmit data with each other through the bluetooth protocol.
In the embodiment of the present application, after the first device generates the first control command matching the first data transmission protocol, the first control instruction may be sent to a third device that establishes a communication connection, and accordingly, after the third device receives the first control instruction, the first control instruction can be analyzed to obtain the identifier and the control parameter of the second device, determining a second device to be controlled according to the identifier of the second device, and the third device further needs to convert the format of the first control instruction, to match the second data transmission protocol supported by the second device, after which the third device may send the format-converted first control instruction, and, correspondingly, when the second device receives the first control instruction after the format conversion, the second device may control the operation of the device according to the control parameter carried in the first control instruction. And the third equipment and the second equipment are communicated or data are transmitted based on a second data transmission protocol.
That is to say, in the present application, the third device may simultaneously support the first data transmission protocol and the second data transmission protocol, and when the data transmission protocols supported by the first device and the second device are different, the third device may forward the first control instruction generated by the first device to the second device, so as to implement that the second device that cannot communicate is controlled by the first device, that is, communication between the cross-protocol devices may be implemented.
As an application scenario, a first data transmission protocol supported by a first device is a WiFi protocol, a second data transmission protocol supported by a second device is a bluetooth protocol, the first device integrates a WiFi communication module, the second device integrates a bluetooth communication module, and the third device integrates a WiFi communication module and a bluetooth communication module. The first device and the third device communicate based on a local area network, and the third device and the second device communicate through a Bluetooth Mesh network.
It should be noted that, after the third device and the second device form a Mesh network, the third device is called a Mesh Node (Node), and the Node may include a plurality of elements, each Element corresponds to address information of one device, each Element includes a plurality of models, and each Model corresponds to each controllable parameter of the corresponding device. For example, if the smart home system has three smart devices, the Node may include 2 elements, Element1 may be an address of the first device, Element2 may be an address of the second device, Element1 includes a plurality of models, each Model corresponds to each controllable parameter of the first device, and Element2 includes a plurality of models, each Model corresponds to each controllable parameter of the second device.
When the user controls the second device through the first device, the first device may set a sending address of the wireless local area network message as Element2, perform local area network data packet according to the control parameter input by the user, generate a wireless local area network message, that is, a first control instruction, and then may send the wireless local area network message to the third device. Correspondingly, after receiving the wireless local area network message, the third device may parse the wireless local area network message, determine the identifier of the second device, determine that the target address of the second device is Element2 according to the identifier of the second device, and then the third device may perform Mesh message packing according to Element2 and the control parameter carried by the wireless local area network message, and send the Mesh message, that is, the first control instruction after format conversion, to the second device. Correspondingly, after the second device receives the Mesh message, the second device can be controlled to operate according to the control parameters carried by the Mesh message. For example, when the control parameters are: when the temperature is increased by 2 degrees, assuming that the current temperature of the device 2 is 26 degrees, the device 2 may adjust the temperature to 28 degrees to meet the user's use requirement and improve the comfort of the indoor environment.
The technical scheme in the embodiment of the application at least has the following technical effects or advantages:
as the first control instruction is obtained by the first equipment, wherein the first control instruction is used for controlling the second equipment, the first equipment carries out data transmission through the first data transmission protocol, the second equipment carries out data transmission through the second data transmission protocol, and then the first control instruction is sent to the third equipment through the first data transmission protocol, so that the third device sends the first control instruction to the second device via the second data transmission protocol, can effectively solve the technical problems that in the prior art, when the data transmission protocols supported by two household appliances are different, the two household appliances can not communicate with each other, thereby mutual control can not be realized, and the third device forwards the control instruction generated by the first device to the second device when the data transmission protocols supported by the first device and the second device are different, so that the first device controls the second device which cannot communicate.
As a possible implementation manner, after receiving a first control instruction after format conversion sent by a third device, the second device may respond to the first control instruction and send changed state information to the third device, and correspondingly, after receiving the state information sent by the second device, the third device may broadcast the state information of the second device to the first device, so that the first device updates the device state of the second device. The above process is described in detail with reference to example two.
Example two
Fig. 2 is a flowchart illustrating an apparatus control method according to a second embodiment of the present application.
As shown in fig. 2, on the basis of the embodiment shown in fig. 1, the device control method may further include the steps of:
step 201, receiving state information broadcast by a third device; the state information is generated according to the device state when the third device receives the device state sent by the second device in response to the first control instruction.
In this embodiment of the application, after the second device receives the first control instruction, the second device may respond to the control parameter carried by the first control instruction, for example, when the control parameter is: when the temperature is adjusted to be 2 degrees, the second device may adjust the temperature to be 28 degrees, assuming that the current temperature of the second device 2 is 26 degrees. After the second device responds to the first control instruction, the device state of the second device changes, and at this time, the second device may send its own device state to the third device.
As a possible implementation manner, the second device may broadcast the device status of itself in a broadcast manner, and correspondingly, the third device may obtain the device status broadcast by the second device by listening to the broadcast.
In this embodiment of the application, after the third device receives the device state of the second device, the state information of the second device may be updated according to the device state. Still taking the example in step 103 as an example, the target address of the second device is Element2, and the third device may update the Model status on Element2 after receiving the broadcast sent by the second device. Meanwhile, the third device may also broadcast the status information of the second device, and correspondingly, the first device may obtain the status information broadcast by the third device by listening to the broadcast.
Step 202, determining the device status of the second device according to the status information.
In this embodiment of the application, after the first device receives the state information broadcast by the third device, the device state of the second device may be determined according to the state information.
Further, after the third device determines the device state of the second device, the third device may also display the device state, so that the user can timely obtain the current state information of the second device.
Step 203, displaying the device state of the second device.
In the embodiment of the application, the first device displays the device state of the second device, so that a user can timely know the current state of the second device.
Compared with the previous embodiment, the technical solution in the embodiment of the present application at least has the following further technical effects or advantages:
the first equipment is adopted to receive the state information broadcasted by the third equipment; the state information is generated by the third device according to the device state after receiving the device state sent by the second device in response to the first control instruction, and the device state of the second device is determined according to the state information. Thus, updating of the device status of the second device can be achieved. The device state of the second device is displayed through the first device, and therefore a user can know the current state of the second device in time conveniently.
It should be noted that, after responding to the user operation, if it is determined that the device to be controlled is the third device having a communication connection with itself, at this time, it indicates that the user wants to directly use the first device to control the third device, and therefore, after receiving the control instruction sent by the first device, the third device may directly respond to the control instruction, and control the device to operate according to the control parameter carried by the control instruction. The above process is described in detail with reference to example three.
EXAMPLE III
Fig. 3 is a flowchart illustrating an apparatus control method according to a third embodiment of the present application.
As shown in fig. 3, on the basis of the above embodiment, the device control method may include the steps of:
step 301, obtaining a second control instruction; the second control instruction is used for controlling the third equipment.
In the embodiment of the application, when a user wants to control the third device, the third device to be controlled and the corresponding control parameter may also be determined by operating the control panel of the first device or operating the remote controller of the first device. Correspondingly, the first device may determine, in response to a user operation, a third device to be controlled and a corresponding control parameter, and generate a second control instruction matching the first data transmission protocol according to the identifier of the third device and the control parameter. The first device and the third device communicate or transmit data based on a first data transmission protocol.
The identifier of the third device is used to uniquely identify the third device, and the identifier of the third device may be a destination address, a name, an SN code, an MAC address, and the like of the third device.
Step 302, sending the second control instruction to the third device through the first data transmission protocol, so that the third device executes the second control instruction.
In this embodiment of the present application, after the first device generates the second control instruction matching the first data transmission protocol, the second control instruction may be sent to the third device establishing the communication connection, and accordingly, after the third device receives the second control instruction, the second control instruction may be analyzed to obtain the identifier and the control parameter of the third device, so that the third device may directly control the device to operate according to the control parameter.
Compared with the previous embodiment, the technical solution in the embodiment of the present application at least has the following further technical effects or advantages:
the first equipment is adopted to obtain a second control instruction; the second control instruction is used for controlling the third device and sending the second control instruction to the third device through the first data transmission protocol so that the third device can execute the second control instruction. Therefore, the household appliance equipment which the user wants to control can be accurately identified, when the equipment to be controlled is identified to be the third equipment, the control instruction does not need to be forwarded to the second equipment through the third equipment, and the third equipment can directly control the equipment to operate according to the control instruction so as to meet the actual control requirement of the user.
In order to implement the foregoing embodiment, an embodiment of the present application further provides an apparatus control method, which is shown in the fourth embodiment.
Example four
Fig. 4 is a flowchart illustrating an apparatus control method according to a fourth embodiment of the present application.
As shown in fig. 4, the device control method may include the steps of:
step 401, receiving a first control instruction sent by a first device through a first data transmission protocol; the first control instruction is used for controlling the second equipment, the first equipment carries out data transmission through a first data transmission protocol, and the second equipment carries out data transmission through a second data transmission protocol.
The execution main body of the embodiment of the application can be a third device which is communicated with the first device, and the third device can be an intelligent household appliance such as a household air conditioner and a television.
In this embodiment of the application, the first control instruction is generated based on a first data transmission protocol, where the first data transmission protocol is a data transmission protocol supported by the first device, and for example, the first data transmission protocol may be a data transmission protocol such as a bluetooth protocol, a WiFi protocol, a ZigBee protocol, and the like.
In the embodiment of the application, when a user wants to control the second device, the second device and the corresponding control parameters can be determined by operating the control panel of the first device or operating the remote controller of the first device. For example, the user may trigger the control panel of the first device to determine the second device and the corresponding control parameter, or may also trigger a virtual key and/or an entity key on the remote controller of the first device to determine the second device and the corresponding control parameter, or may also input the second device and the corresponding control parameter by voice, which is not limited in this application.
After the first device determines the second device to be controlled and the corresponding control parameter in response to the user operation, a first control instruction matching the first data transmission protocol may be generated according to the identifier and the control parameter of the second device. The first control instruction conforms to the first data transmission protocol, for example, when the first data transmission protocol is a WiFi protocol, the first control information is generated based on the WiFi protocol, or when the first data transmission protocol is a bluetooth protocol, the first control instruction is generated based on the bluetooth protocol. After that, the first device may send the first control instruction to the third device, and accordingly, the third device may receive the first control instruction.
Step 402, sending the first control instruction to the second device through the second data transmission protocol, so that the second device executes the first control instruction.
In this embodiment of the application, the second data transmission protocol is a data transmission protocol supported by the second device, and the second data transmission protocol is different from the first data transmission protocol. For example, when the first data transmission protocol is a bluetooth protocol, the second data transmission protocol may be a WiFi protocol, a ZigBee protocol, or the like, or when the first data transmission protocol is a WiFi protocol, the second data transmission protocol may be a bluetooth protocol, a ZigBee protocol, or the like, or when the first data transmission protocol is a ZigBee protocol, the second data transmission protocol may be a WiFi protocol, a bluetooth protocol, or the like, which is not limited in this application.
In this embodiment of the application, after receiving a first control instruction matching a first data transmission protocol, a third device may parse the first control instruction to obtain an identifier and a control parameter of a second device, determine, according to the identifier of the second device, a second device to be controlled, and perform format conversion on the first control instruction by the third device to match a second data transmission protocol supported by the second device, and then, the third device may send, to the second device, the first control instruction after format conversion, and correspondingly, when receiving, by the second device, the first control instruction after format conversion, may control the device to operate according to the control parameter carried in the first control instruction. And the third equipment and the second equipment are communicated or data are transmitted based on a second data transmission protocol.
That is to say, in the present application, the third device may simultaneously support the first data transmission protocol and the second data transmission protocol, and when the data transmission protocols supported by the first device and the second device are different, the third device may forward the control instruction generated by the first device to the second device, so as to implement that the second device that cannot communicate is controlled by the first device, that is, communication between the cross-protocol devices may be implemented.
The technical scheme in the embodiment of the application at least has the following technical effects or advantages:
the method comprises the steps of receiving a first control instruction sent by first equipment through a first data transmission protocol; the first control instruction is used for controlling the second equipment, the first equipment carries out data transmission through a first data transmission protocol, and the second equipment carries out data transmission through a second data transmission protocol; the first control instruction is sent to the second equipment through the second data transmission protocol, so that the second equipment executes the first control instruction, the technical problems that in the prior art, when the data transmission protocols supported by the two household appliances are different, the two household appliances cannot communicate with each other, and mutual control cannot be realized are solved, and further, when the data transmission protocols supported by the first equipment and the second equipment are different, the control instruction generated by the first equipment is forwarded to the second equipment by other equipment, so that the second equipment which cannot communicate is controlled by the first equipment is realized.
As a possible implementation manner, in fig. 4, when receiving the first control instruction, the third device parses the first control instruction matching the first data transmission protocol to obtain an identifier and a control parameter of the second device, queries a target address of the second device in a network based on the second data transmission protocol according to the identifier of the second device, and generates the first control instruction matching the second data transmission protocol according to the target address and the control parameter. The above process is described in detail with reference to example five.
EXAMPLE five
Fig. 5 is a flowchart illustrating an apparatus control method according to a fifth embodiment of the present application.
As shown in fig. 5, based on the embodiment shown in fig. 4, the converting, by the third device, the first control instruction to match the second data transmission protocol may specifically include the following sub-steps:
step 501, a first control instruction matching with a first data transmission protocol is analyzed to obtain an identifier and a control parameter of a second device.
Step 502, according to the identifier of the second device, querying a destination address of the second device in the second data transmission protocol-based network.
In this embodiment of the application, after the third device receives the first control instruction matching the first data transmission protocol through analysis, the third device may analyze the first control instruction matching the first data transmission protocol to obtain the identifier and the control parameter of the second device. The third device may then query the second device for a destination address in the second data transfer protocol based network based on the identification of the second device.
As a possible implementation manner, the third device may store a correspondence between the identifier and the address of each device, and after the third device determines the identifier of the second device, the third device may obtain the target address of the second device in the network based on the second data transmission protocol by querying the correspondence. For example, when the second data transmission protocol is a bluetooth protocol, the corresponding target address of the second device may be Element 2.
Step 503, generating a first control instruction matching the second data transmission protocol according to the target address and the control parameter.
In this embodiment of the application, after the third device determines the target address corresponding to the second device, the first control instruction matching the second data transmission protocol may be generated according to the target address and the control parameter. Wherein the first control instruction is generated based on a second data transmission protocol supported by the second device. Accordingly, the third device may send the first control instruction matching the second data transmission protocol to the second device, and accordingly, after receiving the first control instruction matching the second data transmission protocol, the second device may execute the control parameter carried in the first control instruction.
The technical scheme in the embodiment of the application at least has the following technical effects or advantages:
the first control instruction matched with the first data transmission protocol is analyzed to obtain the identifier and the control parameter of the second device, then the target address of the second device in the network based on the second data transmission protocol is inquired according to the identifier of the second device, and the first control instruction matched with the second data transmission protocol is generated according to the target address and the control parameter. Therefore, when the data transmission protocols supported by the first device and the second device are different, the other device forwards the control instruction generated by the first device to the second device, and the first device controls the second device which cannot communicate.
As a possible implementation manner, after receiving a first control instruction sent by a third device, the second device may send a changed device state to the third device in response to the first control instruction, and correspondingly, after receiving the device state sent by the second device, the third device may broadcast the state information of the second device to the first device, so that the first device updates the device state of the second device. The above process is described in detail with reference to example six.
EXAMPLE six
Fig. 6 is a schematic flowchart of an apparatus control method according to a sixth embodiment of the present application.
As shown in fig. 6, on the basis of the embodiment shown in fig. 4, the device control method may further include the steps of:
step 601, receiving the device state sent by the second device in response to the first control instruction.
In this embodiment of the application, after the second device receives the first control instruction matching the second data transmission protocol, the second device may respond to the control parameter carried in the first control instruction, for example, when the control parameter is: when the temperature is adjusted to be 2 degrees, the second device may adjust the temperature to be 28 degrees, assuming that the current temperature of the second device 2 is 26 degrees. After the second device responds to the first control instruction, the device state of the second device changes, and at this time, the second device may send its own device state to the third device.
As a possible implementation manner, the second device may broadcast the device status of itself in a broadcast manner, and correspondingly, the third device may obtain the device status broadcast by the second device by listening to the broadcast.
Step 602, broadcasting status information to the first device according to the device status of the second device.
In this embodiment of the application, after the third device receives the device state of the second device, the third device may broadcast the state information of the second device, and correspondingly, the first device may obtain the state information broadcast by the third device by listening to the broadcast.
Further, after the third device receives the device state of the second device, the state information associated with the target address corresponding to the second device may be updated according to the device state. Still taking the example in step 103 as an example, the target address of the second device is Element2, and the third device may update the Model status on Element2 after receiving the broadcast sent by the second device.
Compared with the previous embodiment, the technical solution in the embodiment of the present application at least has the following further technical effects or advantages:
due to the adoption of the method, the state information associated with the target address corresponding to the second equipment is updated according to the equipment state of the second equipment. Therefore, dynamic maintenance of the device state of the second device can be achieved.
It should be noted that, after receiving the control instruction sent by the first device, the third device first needs to analyze the control instruction, and determines whether the identifier carried in the control instruction is the identifier of the third device, and if so, it indicates that the user wants to directly control the third device by using the first device. The above process is described in detail with reference to the seventh embodiment.
EXAMPLE seven
Fig. 7 is a flowchart illustrating an apparatus control method according to a seventh embodiment of the present application.
As shown in fig. 7, on the basis of the embodiments shown in fig. 4 to 6, the device control method may further include the steps of:
step 701, receiving a second control instruction sent by the first device through the first data transmission protocol.
In the embodiment of the application, when a user wants to control the third device through the first device, the third device to be controlled and the corresponding control parameter can be determined by operating the control panel of the first device or operating the remote controller of the first device. Correspondingly, the first device may determine, in response to a user operation, a third device to be controlled and a corresponding control parameter, and generate a second control instruction matching the first data transmission protocol according to the identifier of the third device and the control parameter. The first device and the third device communicate or transmit data based on a first data transmission protocol.
The identifier of the third device is used to uniquely identify the third device, and the identifier of the third device may be a destination address, a name, an SN code, an MAC address, and the like of the third device.
In this embodiment of the present application, after the first device generates the second control instruction matching the first data transmission protocol, the second control instruction may be sent to a third device establishing a communication connection, and correspondingly, the third device may receive the second control instruction matching the first data transmission protocol.
And step 702, determining the device to be controlled according to the identifier carried in the second control instruction.
In the embodiment of the application, after the third device receives the second control instruction, the second control instruction may be analyzed to determine the identifier carried in the second control instruction, and determine whether the identifier is an identifier of the third device, if so, it indicates that the user wants to directly utilize the first device to control the third device, and at this time, the third device may determine that the third device is a device to be controlled.
And 703, controlling the equipment to operate according to the control parameters carried in the second control instruction to obtain the equipment state.
In the embodiment of the application, after the third device determines that the third device is the device to be controlled, the third device does not need to forward the second control instruction to the second device, and at this time, the third device may directly control the device to operate according to the control parameter carried in the second control instruction to obtain the device state.
Step 704, broadcasting the status information to the first device according to the device status of the first device.
In the embodiment of the application, after the third device operates to obtain the device state of the third device, the device state of the third device may be broadcast outwards in a broadcast manner, and correspondingly, the first device may obtain the state information of the third device by listening to the broadcast.
Compared with the previous embodiment, the technical solution in the embodiment of the present application at least has the following further technical effects or advantages:
the method comprises the steps that a second control instruction sent by first equipment through a first data transmission protocol is received, and the equipment to be controlled is determined according to an identifier carried in the second control instruction; and controlling the equipment to operate according to the control parameters carried in the second control instruction to obtain the equipment state. Therefore, the household appliance equipment which the user wants to control can be accurately identified, when the equipment to be controlled is identified to be the third equipment, the control instruction does not need to be forwarded to the second equipment through the third equipment, and the third equipment can directly control the equipment to operate according to the control instruction so as to meet the actual control requirement of the user.
In order to implement the above embodiments, the present application also provides an apparatus control method.
Fig. 8 is a flowchart illustrating an apparatus control method according to an eighth embodiment of the present application.
As shown in fig. 8, the device control method may include the steps of:
step 801, receiving a first control instruction sent by a third device through a second data transmission protocol; the first control instruction is sent to the third equipment by the first equipment through a first data transmission protocol, the first equipment carries out data transmission through the first data transmission protocol, and the second equipment carries out data transmission through a second data transmission protocol.
The execution subject of the embodiment of the application may be a second device that communicates with a third device, and the second device may be a target device that a user actually wants to control, for example, the second device may be an intelligent device such as an intelligent home appliance and a mobile terminal to be controlled.
In the embodiment of the present application, when a user wants to control the second device, the second device and the corresponding control parameters may be determined by operating a control panel (or screen) of the first device or operating a remote controller of the first device. For example, the user may trigger the control panel of the first device to determine the second device and the corresponding control parameter, or may also trigger a virtual key and/or an entity key on the remote controller of the first device to determine the second device and the corresponding control parameter, or may also input the second device and the corresponding control parameter by voice, which is not limited in this application.
In this application, data transmission protocols supported by the first device are marked as a first data transmission protocol, that is, the first device performs data transmission through the first data transmission protocol, and a data transmission protocol supported by the second device is marked as a second data transmission protocol, that is, the second device performs data transmission through the second data transmission protocol, so that the first data transmission protocol is different from the second data transmission protocol. For example, when the first data transmission protocol is a bluetooth protocol, the second data transmission protocol may be a WiFi protocol, a ZigBee protocol, or the like, or when the first data transmission protocol is a WiFi protocol, the second data transmission protocol may be a bluetooth protocol, a ZigBee protocol, or the like, or when the first data transmission protocol is a ZigBee protocol, the second data transmission protocol may be a WiFi protocol, a bluetooth protocol, or the like, which is not limited in this application.
In the embodiment of the application, after a user operates a control panel (or screen) of the first device or operates a remote controller of the first device to determine the second device and the corresponding control parameter, the first device may determine the second device to be controlled and the control parameter in response to the user operation, and generate the first control instruction matching the first data transmission protocol according to the identifier and the control parameter of the second device. After the first device generates a first control instruction matching a first data transmission protocol, the first control instruction may be sent to a third device establishing a communication connection, and correspondingly, after the third device receives the first control instruction, the first control instruction may be analyzed to obtain an identifier and a control parameter of the second device, the second device to be controlled is determined according to the identifier of the second device, and the third device further needs to perform format conversion on the first control instruction to match a second data transmission protocol supported by the second device, and then the third device may send the first control instruction after format conversion to the second device, and correspondingly, the second device may receive the first control instruction after format conversion.
Step 802, a first control instruction is executed.
In the embodiment of the application, after the second device receives the first control instruction, the second device may be controlled to operate according to the control parameter carried in the first control instruction.
The technical scheme in the embodiment of the application at least has the following technical effects or advantages:
the method comprises the steps of receiving a first control instruction sent by third equipment through a second data transmission protocol; the first control instruction is sent to the third equipment by the first equipment through a first data transmission protocol, the first equipment carries out data transmission through the first data transmission protocol, and the second equipment carries out data transmission through a second data transmission protocol; the first control instruction is executed, the technical problem that in the prior art, when the data transmission protocols supported by two household appliances are different, the household appliances cannot communicate with each other, and mutual control cannot be achieved is solved, and therefore the third device forwards the control instruction generated by the first device to the second device when the data transmission protocols supported by the first device and the second device are different, and the second device which cannot communicate is controlled by the first device is achieved.
As a possible implementation manner, after the second device executes the first control instruction, the device state of the second device changes, and the second device may send the device state to the third device, and correspondingly, after the third device receives the device state sent by the second device, the third device may generate state information according to the device state, and broadcast the state information of the second device to the first device, so that the first device updates the device state of the second device.
As an application scenario, three smart devices are provided in a smart home system, which are respectively a first device, a second device, and a third device. The data transmission protocol supported by the first device is a WiFi protocol, and the data transmission protocol supported by the second device is a bluetooth protocol, that is, the first device integrates a WiFi communication module, the second device integrates a bluetooth communication module, and the third device integrates a WiFi communication module and a bluetooth communication module.
Referring to fig. 9, the device control method may include the steps of:
step 901, when the user operates the screen of the first device, the first device may determine whether the device to be controlled is the first device according to the user operation, if so, executestep 902, and if not, executestep 903.
The first device responds to the control parameter in the user operation,step 902.
Step 903, determining whether the device to be controlled is the third device, if yes, executingstep 904, and if not, executingstep 907.
Atstep 904, the first device broadcasts control parameters to the third device.
And step 905, the third device receives the control parameter broadcasted by the first device, and controls the device to operate according to the control parameter to obtain the device state.
For example, when the control parameter is on, the device state is on.
Instep 906, the third device broadcasts the status information according to its own device status, and then performsstep 914.
Step 907, determining whether the device to be controlled is the second device, if yes, executingstep 908, and if not, performing other operations (for example, turning off the screen).
Instep 908, the first device broadcasts the identification of the second device and the control parameters to the third device.
Instep 909, the third device generates a bluetooth Mesh message according to the identifier and the control parameter of the second device.
Step 910, the third device sends the bluetooth Mesh message to the second device.
And step 911, the second device controls the device to operate according to the control parameters carried in the bluetooth Mesh message to obtain the device state.
Step 912, the second device sends a Mesh message to notify the third device of the self status update.
Atstep 913, the third device broadcasts the status information of the second device.
Instep 914, the first device receives the broadcast and displays the updated status information of the second device or the third device.
It should be noted that, in the above example, only one first device controls one second device, and in actual application, because the bluetooth Mesh network has a topology structure characteristic of a multipoint-to-multipoint network, the bluetooth Mesh network can be applied to a scenario in which one first device controls a plurality of second devices.
Based on the same inventive concept, the embodiment of the present application further provides apparatuses corresponding to the methods in the first to third embodiments, which are shown in the ninth embodiment.
Example nine
Fig. 10 is a schematic structural diagram of an apparatus control device according to a ninth embodiment of the present application.
As shown in fig. 10, the device control apparatus is provided to a first device, and includes: an obtaining module 110 and a sending module 120.
The obtaining module 110 is configured to obtain a first control instruction, where the first control instruction is used to control a second device, the first device performs data transmission through a first data transmission protocol, and the second device performs data transmission through a second data transmission protocol.
The sending module 120 is configured to send the first control instruction to the third device through the first data transmission protocol, so that the third device sends the first control instruction to the second device through the second data transmission protocol.
As a possible implementation, the first control instruction sent to the second device is converted by the third device before sending to match the second data transmission protocol.
Further, in a possible implementation manner of the embodiment of the present application, referring to fig. 11, on the basis of the embodiment shown in fig. 10, the device control apparatus may further include:
a receiving module 130, configured to receive status information broadcast by a third device; the state information is generated according to the device state when the third device receives the device state sent by the second device in response to the first control instruction; and determining the equipment state of the second equipment according to the state information.
And a display module 140 for displaying the device status of the second device.
As a possible implementation manner, the obtaining module 110 is further configured to obtain a second control instruction; the second control instruction is used for controlling the third equipment.
The sending module 120 is further configured to send the second control instruction to the third device through the first data transmission protocol, so that the third device executes the second control instruction.
As a possible implementation manner, the first data transmission protocol is a WiFi protocol; the second data transmission protocol is a Bluetooth protocol.
It should be noted that the explanations of the first to third embodiments of the device control method are also applicable to the device control apparatus of this embodiment, and are not repeated herein.
The technical scheme in the embodiment of the application at least has the following technical effects or advantages:
on one hand, since the first device is adopted to obtain the first control instruction, wherein the first control instruction is used for controlling the second device, the first device carries out data transmission through the first data transmission protocol, the second device carries out data transmission through the second data transmission protocol, and then the first control instruction is sent to the third device through the first data transmission protocol, so that the third device sends the first control instruction to the second device via the second data transmission protocol, can effectively solve the technical problems that in the prior art, when the data transmission protocols supported by two household appliances are different, the two household appliances can not communicate with each other, thereby mutual control can not be realized, and the third device forwards the control instruction generated by the first device to the second device when the data transmission protocols supported by the first device and the second device are different, so that the first device controls the second device which cannot communicate.
On the other hand, the device state of the second device is displayed through the first device, so that a user can conveniently know the current state of the second device in time.
In another aspect, the first device is used to obtain the second control instruction; the second control instruction is used for controlling the third equipment; and sending the second control instruction to the third equipment through the first data transmission protocol so as to enable the third equipment to execute the second control instruction. Therefore, the household appliance equipment which the user wants to control can be accurately identified, when the equipment to be controlled is identified to be the third equipment, the control instruction does not need to be forwarded to the second equipment through the third equipment, and the third equipment can directly control the equipment to operate according to the control instruction so as to meet the actual control requirement of the user.
Since the device control apparatuses described in the ninth and tenth embodiments of the present application are apparatuses used for implementing the methods in the first to third embodiments of the present application, those skilled in the art can understand specific structures and variations of the apparatuses based on the methods described in the first to third embodiments of the present application, and thus details thereof are not described herein. All the devices adopted in the methods of the first to third embodiments of the present application belong to the scope of the present application.
Based on the same inventive concept, the embodiment of the present application further provides apparatuses corresponding to the methods in the fourth to seventh embodiments, which is shown in the eleventh embodiment.
EXAMPLE eleven
Fig. 12 is a schematic structural diagram of an apparatus control device according to an eleventh embodiment of the present application.
As shown in fig. 12, the device control apparatus includes: a receiving module 210 and a transmitting module 220.
The receiving module 210 is configured to receive a first control instruction sent by a first device through a first data transmission protocol; the first control instruction is used for controlling the second equipment, the first equipment carries out data transmission through a first data transmission protocol, and the second equipment carries out data transmission through a second data transmission protocol.
The sending module 220 is configured to send the first control instruction to the second device through the second data transmission protocol, so that the second device executes the first control instruction.
Further, in a possible implementation manner of the embodiment of the present application, referring to fig. 13, on the basis of the embodiment shown in fig. 12, the device control apparatus may further include:
the converting module 230 is configured to convert the first control instruction to match the second data transmission protocol.
As a possible implementation manner, the conversion module 230 is specifically configured to: analyzing a first control instruction matched with the first data transmission protocol to obtain an identifier and a control parameter of the second equipment; inquiring a target address of the second device in the network based on the second data transmission protocol according to the identification of the second device; and generating a first control instruction matched with the second data transmission protocol according to the target address and the control parameter.
The receiving module 210 is further configured to: and receiving the device state sent by the second device in response to the first control instruction.
A broadcasting module 240, configured to broadcast the status information to the first device according to the device status of the second device.
An updating module 250, configured to update, according to the device status of the second device, status information associated with a target address corresponding to the second device.
The receiving module 210 is further configured to receive a second control instruction sent by the first device through the first data transmission protocol; determining the device to be controlled according to the identifier carried in the second control instruction; controlling the equipment to operate according to the control parameters carried in the second control instruction to obtain the equipment state; and broadcasting the state information to the first equipment according to the equipment state of the first equipment.
As a possible implementation manner, the first data transmission protocol is a WiFi protocol; the second data transmission protocol is a Bluetooth protocol.
It should be noted that the explanation of the device control method in the fourth to seventh embodiments is also applicable to the device control apparatus in this embodiment, and details are not repeated here.
The technical scheme in the embodiment of the application at least has the following technical effects or advantages:
on one hand, the method adopts the steps of receiving a first control instruction sent by first equipment through a first data transmission protocol; the first control instruction is used for controlling the second equipment, the first equipment carries out data transmission through a first data transmission protocol, and the second equipment carries out data transmission through a second data transmission protocol; the first control instruction is sent to the second equipment through the second data transmission protocol, so that the second equipment executes the first control instruction, the technical problems that in the prior art, when the data transmission protocols supported by the two household appliances are different, the two household appliances cannot communicate with each other, and mutual control cannot be realized are solved, and further, when the data transmission protocols supported by the first equipment and the second equipment are different, the control instruction generated by the first equipment is forwarded to the second equipment by other equipment, so that the second equipment which cannot communicate is controlled by the first equipment is realized.
On the other hand, the method adopts the steps of receiving a second control instruction sent by the first equipment through the first data transmission protocol, and determining the equipment to be controlled according to the identifier carried in the second control instruction; and controlling the equipment to operate according to the control parameters carried in the second control instruction to obtain the equipment state. Therefore, the household appliance equipment which the user wants to control can be accurately identified, when the equipment to be controlled is identified to be the third equipment, the control instruction does not need to be forwarded to the second equipment through the third equipment, and the third equipment can directly control the equipment to operate according to the control instruction so as to meet the actual control requirement of the user.
Since the device control apparatuses described in the eleventh and twelfth embodiments of the present application are apparatuses used for implementing the methods in the fourth to seventh embodiments of the present application, those skilled in the art can understand specific structures and variations of the apparatuses based on the methods described in the fourth to seventh embodiments of the present application, and thus details thereof are not described herein. All the devices adopted by the methods of the fourth to seventh embodiments of the present application belong to the protection scope of the present application.
Based on the same inventive concept, the embodiment of the present application further provides a device corresponding to the method in the eighth embodiment, which is shown in the thirteenth embodiment.
EXAMPLE thirteen
Fig. 14 is a schematic structural diagram of an apparatus control device according to a thirteenth embodiment of the present application.
As shown in fig. 14, the device control apparatus includes: a receiving module 310 and an executing module 320.
A receiving module 310, configured to receive a first control instruction sent by a third device through a second data transmission protocol; the first control instruction is sent to the third equipment by the first equipment through a first data transmission protocol, the first equipment carries out data transmission through the first data transmission protocol, and the second equipment carries out data transmission through a second data transmission protocol.
The execution module 320 is configured to execute the first control instruction.
Further, in a possible implementation manner of the embodiment of the present application, referring to fig. 15, on the basis of the embodiment shown in fig. 14, the device control apparatus may further include:
a sending module 330, configured to send the device status to the third device.
As a possible implementation manner, the first data transmission protocol is a WiFi protocol; the second data transmission protocol is a Bluetooth protocol.
It should be noted that the explanation of the eighth embodiment to the embodiment of the device control method is also applicable to the device control apparatus of this embodiment, and details are not described here again.
The technical scheme in the embodiment of the application at least has the following technical effects or advantages:
the method comprises the steps of receiving a first control instruction sent by third equipment through a second data transmission protocol; the first control instruction is sent to the third equipment by the first equipment through a first data transmission protocol, the first equipment carries out data transmission through the first data transmission protocol, and the second equipment carries out data transmission through a second data transmission protocol; the first control instruction is executed, the technical problem that in the prior art, when the data transmission protocols supported by two household appliances are different, the household appliances cannot communicate with each other, and mutual control cannot be achieved is solved, and therefore the third device forwards the control instruction generated by the first device to the second device when the data transmission protocols supported by the first device and the second device are different, and the second device which cannot communicate is controlled by the first device is achieved.
Since the device control apparatus described in the thirteenth embodiment and the fourteenth embodiment is an apparatus used for implementing the method in the fourth to seventh embodiments of the present application, based on the method described in the fourth to seventh embodiments of the present application, a person skilled in the art can understand the specific structure and modification of the apparatus, and thus details are not described herein. All the devices adopted by the methods of the fourth to seventh embodiments of the present application belong to the protection scope of the present application.
Based on the same inventive concept, the embodiment of the present application further provides a home appliance corresponding to the method of the first to eighth embodiments, see fifteenth embodiment.
Example fifteen
The household electrical appliances of this application embodiment includes: the device control method includes implementing the device control method as proposed in the first to third embodiments of the present application, or implementing the device control method as proposed in the fourth to seventh embodiments of the present application, or implementing the device control method as proposed in the eighth embodiment of the present application.
Since the home appliance described in the fifteenth embodiment of the present application is a home appliance used to implement the method in the first to eighth embodiments of the present application, based on the method described in the first to eighth embodiments of the present application, a person skilled in the art can understand the specific structure and deformation of the home appliance, and thus details are not described herein. All the home appliances adopted in the methods of the first to eighth embodiments of the present application belong to the scope of protection of the present application.
Based on the same inventive concept, the embodiment of the present application further provides a computer-readable storage medium corresponding to the method in the first to eighth embodiments, see sixteenth embodiment.
Example sixteen
The computer-readable storage medium of the embodiment of the present application, on which a computer program is stored, is characterized in that the program, when executed by a processor, implements the device control method as set forth in the first to third embodiments of the foregoing embodiment of the present application, or implements the device control method as set forth in the fourth to seventh embodiments of the foregoing embodiment of the present application, or implements the device control method as set forth in the eighth embodiment of the foregoing embodiment of the present application.
Since the computer-readable storage medium described in the sixteenth embodiment of the present application is a computer-readable storage medium used for implementing the method described in the first to eighth embodiments of the present application, based on the method described in the first to eighth embodiments of the present application, a person skilled in the art can understand a specific structure and a modification of the computer-readable storage medium, and thus details are not described here. Any computer readable storage medium used in the methods of embodiments one through eight of this application is intended to be within the scope of the present application.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, apparatus, device, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It should be noted that in the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The application can be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
While the preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.