Device control method

Through Bluetooth broadcast packet interaction without networking or pairing, the intelligent device is directly controlled by the application layer device address, solving the cumbersome operation problems in the prior art, and simplified device control and log data storage are realized.

CN115643122BActive Publication Date: 2025-01-07HONGYANG HOME APPLIANCES
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202211102491.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-09
Publication Date
2025-01-07
Estimated Expiration
2042-09-09

AI Technical Summary

Technical Problem

The existing smart home appliance control method requires the user terminal to be connected to the device or paired, which makes the operation cumbersome and difficult.

Method used

By obtaining the external device identification of the smart device, using Bluetooth broadcast packets or Zifeng broadcast packets for interaction, the device control without networking or pairing is realized, and the interaction is directly through the application layer device address, canceling the binding process.

Benefits of technology

It reduces the difficulty of user terminals in operating smart devices, simplifies the control process, supports multiple user terminals to control a smart device at the same time, and facilitates remote storage and abnormal analysis of log data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115643122B_ABST
    Figure CN115643122B_ABST
Patent Text Reader

Abstract

The present application provides a device control method, the method comprising: obtaining an external device identifier of a target device, and broadcasting a query instruction for the external device identifier; receiving at least one feedback information corresponding to the query instruction; wherein the feedback information includes a device address; determining whether the device address is consistent with the target address information; wherein the target address information is the address information of the target device; if consistent, broadcasting a control instruction, wherein the control instruction includes the target address information; wherein the query instruction, the feedback information, and the control instruction are Bluetooth broadcast packets or ZigBee broadcast packets. In the present application scheme, there is no need for pairing between the user terminal and the smart device. With the help of the device address of the application layer, interaction can be achieved through Bluetooth broadcast packets or ZigBee broadcast packets, thereby eliminating the binding process before the user terminal controls the smart device and reducing the difficulty of operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of intelligent control technology, and in particular to a device control method. Background Art

[0002] With the development of Internet of Things technology, smart home appliances are gradually entering thousands of households. Users can control smart home appliances and monitor the operating status of smart home appliances through user terminals. Before controlling smart home appliances through user terminals, the user terminal needs to be connected to the smart home appliances to be controlled. Generally, smart home appliances can be used as wireless access points (Access Point, AP). AP network configuration requires the user terminal to first connect to the AP of the smart home appliance, and then send the router's username and password to the smart home appliance. After the smart home appliance connects to the network according to the username and password, the binding of the user terminal and the smart home appliance is realized. This process makes the process of controlling smart home appliances through user terminals too cumbersome and difficult to operate. Summary of the invention

[0003] The purpose of the embodiments of the present application is to provide a device control method for realizing control of smart home appliances by a user terminal without networking or pairing.

[0004] On the one hand, the present application provides a device control method, applied to a user terminal, comprising:

[0005] Obtaining an external device identifier of a target device, and broadcasting a query instruction for the external device identifier;

[0006] receiving at least one feedback information corresponding to the query instruction; wherein the feedback information includes a device address;

[0007] Determine whether the device address is consistent with the target address information; wherein the target address information is the address information of the target device;

[0008] If they are consistent, a control instruction is broadcast, and the control instruction includes the target address information; wherein the query instruction, the feedback information and the control instruction are Bluetooth broadcast packets or ZigBee broadcast packets.

[0009] In one embodiment, the method further comprises:

[0010] If they are inconsistent, check whether the device address is the default factory address;

[0011] If it is not the default factory address, ignore the feedback information.

[0012] In one embodiment, the method further comprises:

[0013] If it is the default factory address, broadcast an address writing instruction; wherein the address writing instruction includes the target address information;

[0014] When the write success information corresponding to the address write instruction is received, it is determined that the target address information is written to the target device; wherein the write success information includes the target address information, and the address write instruction and the write success information are Bluetooth broadcast packets or ZigBee broadcast packets.

[0015] In one embodiment, the method further comprises:

[0016] If it is the default factory address, broadcast an address writing instruction; wherein the address writing instruction includes the target address information;

[0017] receiving at least one write inquiry information corresponding to the address write instruction; wherein the write inquiry information includes the target address information and an internal device identifier;

[0018] Broadcasting a write confirmation instruction, and upon receiving a write success message, determining that the target address information is written to the target device; wherein the write confirmation instruction is used to indicate writing the target address information, and the write confirmation instruction includes the internal device identifier in the first received write inquiry message, and the target address information; the write success message includes the target address information;

[0019] For each write inquiry information after the first write inquiry information, broadcast an address invalidation instruction; wherein the address invalidation instruction is used to indicate that the target address information is occupied, and the address invalidation instruction includes the internal device identifier in the write inquiry information and the target address information;

[0020] The address write instruction, the write inquiry information, the write confirmation instruction, the write success information and the address invalidation instruction are Bluetooth broadcast packets or ZigBee broadcast packets.

[0021] In one embodiment, before broadcasting the control instruction, the method further includes:

[0022] Jump to the control page of the target device according to the target address information;

[0023] The control instruction is generated in response to an operation instruction for the control page.

[0024] In one embodiment, the method further comprises:

[0025] Receiving a log synchronization instruction sent by the target device; wherein the log synchronization instruction includes log data and the target address information, and the log synchronization instruction is a Bluetooth broadcast packet or a ZigBee broadcast packet;

[0026] The log data is stored in association with the target address information.

[0027] On the other hand, the present application provides a device control method, applied to a smart device, comprising:

[0028] Receive a query instruction, and broadcast feedback information for the search instruction; wherein the feedback information includes its own device address;

[0029] If a control instruction is received, determining whether the target address information in the control instruction is consistent with the device address of the device itself;

[0030] If they are consistent, executing the control instruction;

[0031] The query instruction, the feedback information and the control instruction are Bluetooth broadcast packets or ZigBee broadcast packets.

[0032] In one embodiment, the method further comprises:

[0033] If an address write instruction is received, determine whether the device address is the default factory address;

[0034] If yes, update its own device address to the target address information in the address write instruction, and broadcast write success information; wherein, the write success information includes the target address information, and the address write instruction and the write success information are Bluetooth broadcast packets or ZigBee broadcast packets.

[0035] In one embodiment, the method further comprises:

[0036] If an address write instruction is received, determine whether the device address is the default factory address;

[0037] If yes, broadcast write inquiry information; wherein the write inquiry information includes the target address information in the address write instruction and its own internal device identification;

[0038] If a write confirmation instruction is received, compare the internal device identification in the write confirmation instruction with its own internal device identification to see if they are consistent, and if they are consistent, update its own device address to the target address information in the address write instruction, and broadcast write success information; wherein the write success information includes the target address information;

[0039] If an address invalidation instruction is received, the device will give up updating its own device address;

[0040] The address write instruction, the write inquiry information, the write confirmation instruction, the write success information and the address invalidation instruction are Bluetooth broadcast packets or ZigBee broadcast packets.

[0041] In one embodiment, the method further comprises:

[0042] After receiving the control instruction, determining whether the model information in the control instruction is consistent with the device model of the device itself;

[0043] If the model information is consistent with the own device model, continue to perform the step of determining whether the target address information in the control instruction is consistent with the own device address;

[0044] If the model information is inconsistent with the own device model, the control instruction is ignored.

[0045] In the present application scheme, there is no need for network configuration to connect the user terminal and the smart device, and no pairing is required. With the help of the device address of the application layer, interaction can be achieved through Bluetooth broadcast packets or ZigBee broadcast packets, thereby eliminating the binding process before the user terminal controls the smart device and reducing the difficulty of operation.

[0046] In addition, the user terminal can obtain the device address of the smart device through the external device identifier of the smart device. When the smart device is used for the first time, especially when it is first used in the user's home, the user terminal can broadcast the obtained device address to enable the smart device to write its own address information, thereby facilitating the use of the address information as an interaction confirmation identifier when the user terminal subsequently interacts with the smart device. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the technical solution of the embodiments of the present application, the drawings required for use in the embodiments of the present application are briefly introduced below.

[0048] Figure 1 A schematic diagram of an application scenario of a device control method provided in an embodiment of the present application;

[0049] Figure 2 A schematic diagram of the structure of an electronic device provided in one embodiment of the present application;

[0050] Figure 3 A schematic diagram of a flow chart of a device control method provided in an embodiment of the present application;

[0051] Figure 4 A schematic diagram of a process for writing target address information provided by an embodiment of the present application;

[0052] Figure 5A schematic diagram of a flow chart of a method for writing target address information provided by another embodiment of the present application;

[0053] Figure 6 A flowchart of a method for processing control instructions provided in one embodiment of the present application. DETAILED DESCRIPTION

[0054] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.

[0055] Similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0056] Figure 1 Schematic diagram of application scenarios of the device control method provided in the embodiment of the present application. Figure 1 As shown, the application scenario includes the user terminal (mobile phone) interacting with the smart device through the Bluetooth broadcast packet, thereby realizing the user terminal's control over the smart device. The user terminal can obtain the operation data of the smart device and upload it to the manufacturer's cloud server of the smart device.

[0057] like Figure 2 As shown, this embodiment provides an electronic device 1, including: at least one processor 11 and a memory 12, Figure 2 A processor 11 is taken as an example. The processor 11 and the memory 12 are connected via a bus 10. The memory 12 stores instructions that can be executed by the processor 11. The instructions are executed by the processor 11 so that the electronic device 1 can execute all or part of the process of the method in the following embodiment. In one embodiment, the electronic device 1 can be the above-mentioned user terminal or the above-mentioned smart device, which is used to execute the device control method.

[0058] The memory 12 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable red-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, disk or optical disk.

[0059] The present application also provides a computer-readable storage medium, which stores a computer program. The computer program can be executed by the processor 11 to complete the device control method provided by the present application.

[0060] See also Figure 3 , is a flow chart of a device control method provided in an embodiment of the present application, such as Figure 3 As shown, the method may include the following steps 310 - 370 .

[0061] Step 310: The user terminal obtains the external device identification of the target device and broadcasts a query instruction for the external device identification.

[0062] The user terminal may be a mobile phone, tablet computer or other electronic device used by the user. The target device is a smart device as a control target, which may be a robot vacuum cleaner, microwave oven, air fryer, washing machine, refrigerator, TV or other electronic device.

[0063] The external device identifier is the device identifier of the smart device, which is easily obtained by the user terminal. For a smart device, the smart device may not store its own external device identifier in its memory, which has no effect on the present application scheme. Exemplarily, the external device identifier can be a QR code on the housing of the smart device, or the external device identifier can be an NFC identifier in an NFC (Near Field Communication) tag equipped with the smart device.

[0064] The user terminal can obtain the external device identification of the target device by scanning the QR code of the target device, or by reading the NFC tag of the target device. Before obtaining the external device identification, the user terminal can determine that it is necessary to initiate control of the target device indicated by the external device identification, and can broadcast a query instruction for the external device identification. Here, the query instruction is used to query the device address of the target device, and the device address can be an application-level address. The query instruction can be a Bluetooth broadcast packet or a ZigBee broadcast packet. Exemplarily, the user terminal is a mobile phone that only supports the Bluetooth protocol, and the query instruction is a Bluetooth broadcast packet. Alternatively, the user terminal supports both the Bluetooth protocol and the ZigBee protocol, then the query instruction can be a Bluetooth broadcast packet, or the query instruction can be a ZigBee broadcast packet.

[0065] Step 320: The smart device receives the query instruction and broadcasts feedback information for the search instruction; wherein the feedback information includes its own device address.

[0066] After the user terminal broadcasts the query instruction, all smart devices can receive the query instruction within the range allowed by the communication protocol. After any smart device receives the query instruction, it can be determined that a user terminal has queried its own device address. At this time, the smart device can construct feedback information based on its own device address and broadcast the feedback information. Here, the feedback information can be a Bluetooth broadcast packet or a ZigBee broadcast packet. In order to avoid the feedback information broadcast by the smart device not being received by the user terminal, the smart device can choose the same protocol as the query instruction to broadcast the feedback information. For example: if the query instruction is a Bluetooth broadcast packet, the feedback information is also a Bluetooth broadcast packet; if the query instruction is a ZigBee broadcast packet, the feedback information is also a ZigBee broadcast packet.

[0067] Step 330: The user terminal receives at least one feedback information corresponding to the query instruction; wherein the feedback information includes a device address.

[0068] Step 340: The user terminal determines whether the device address is consistent with the target address information; wherein the target address information is the address information of the target device.

[0069] The user terminal can receive feedback information broadcast by at least one smart device. For any feedback information, the user terminal can parse the device address from it. The user terminal can search for the corresponding address information in the local memory or the manufacturer's cloud server according to the external device identifier, and the address information is the target address information of the target device. In the local memory or the manufacturer's cloud server, the address information of each smart device can be stored in association with its corresponding external device identifier. The user terminal can compare the device address parsed from the feedback information with the target address information to determine whether the two are consistent.

[0070] On the one hand, if they are inconsistent, it means that the feedback information may not come from the target device, or the target device has not been written with the target address information, and further judgment is required. See the relevant description below for details. On the other hand, if they are consistent, it can be determined that the target device has been written with the target address information, and based on the target address information, the user terminal can complete the interaction with the target device. At this time, the user terminal can continue to execute step 350.

[0071] Step 350: If they are consistent, the user terminal broadcasts a control instruction, which includes target address information.

[0072] When the device address in any feedback information is consistent with the target address information, the user terminal can construct a control instruction based on the target address information and broadcast the control instruction. The control instruction is used to control the operation of the target device. For example, the control instruction can control the start, scheduled start, shutdown, scheduled shutdown, upload operation data, etc. of the target device. The control instruction can be a Bluetooth broadcast packet or a ZigBee broadcast packet. The control instruction can select the same communication protocol as the query instruction. For example, if the query instruction is a Bluetooth broadcast packet, the control instruction is also a Bluetooth broadcast packet.

[0073] Step 360: If a control instruction is received, the smart device determines whether the target address information in the control instruction is consistent with its own device address.

[0074] Step 370: If they are consistent, the smart device executes the control instruction.

[0075] After the user terminal broadcasts the control command, all smart devices within the range allowed by the communication protocol can receive the control command. After any smart device receives the control command, it can parse the target address information from it and compare the target address information with its own device address to determine whether the two are consistent.

[0076] On the one hand, if the two are different, it means that the control instruction is sent to other smart devices, and the smart device can ignore the control instruction. On the other hand, if the two are the same, it means that the control instruction sent to itself is received, and the smart device as the target device can execute the control instruction to achieve the function indicated by the control instruction.

[0077] Through the above measures, the user terminal and the smart device do not need to be connected through network configuration, but can interact with each other through Bluetooth broadcast packets or ZigBee broadcast packets with the help of the device address of the application layer, thereby eliminating the binding process before the user terminal controls the smart device and reducing the difficulty of operation.

[0078] In one embodiment, if the device address in the feedback information is inconsistent with the target address information, the user terminal can check whether the device address in the feedback information is the default factory address. In the production process of smart devices, it is difficult to power on only one smart device on the production line at the same time, and it is difficult to write different device addresses for smart devices on the production line. At this time, each smart device can be written with a default factory address, which cannot distinguish different smart devices.

[0079] In one case, if the device address in the feedback information is not the default factory address, it can be determined that the feedback information is not from the target device. In this case, the user terminal can ignore the feedback information.

[0080] In another case, if the device address in the feedback information is the default factory address and the user terminal has not received other feedback information containing the target address information, it can be determined that the target device has not been written with the target address information. In this case, the user terminal can write the target address information to the target device.

[0081] In one embodiment, see Figure 4 , is a flow chart of a method for writing target address information provided by an embodiment of the present application, such as Figure 4 As shown, the method may include the following steps 410 to 440.

[0082] Step 410: If it is the default factory address, the user terminal broadcasts an address write instruction; wherein the address write instruction includes target address information.

[0083] When the user terminal writes the target address information to the target device, it can construct an address write instruction based on the target address information and broadcast the address write instruction. The address write instruction is used to instruct the target device to save the target address information and use it as its own device address. Here, the target address information can be obtained by querying the manufacturer's cloud server based on the external device identifier. The address write instruction can be a Bluetooth broadcast packet or a ZigBee broadcast packet; the address write instruction can be broadcast using the same protocol as the query instruction.

[0084] Step 420: If the address write instruction is received, the smart device determines whether its own device address is the default factory address.

[0085] Step 430: If yes, the smart device updates its own device address to the target address information in the address write instruction, and broadcasts write success information.

[0086] After the user terminal broadcasts the address write instruction, all smart devices can receive the address write instruction within the range allowed by the communication protocol. After any smart device receives the address write instruction, it can determine whether its own device address is the default factory address.

[0087] In one case, the device address itself is not the default factory address, which means that the address write instruction is sent to other smart devices and the address write instruction can be ignored.

[0088] In another case, the device address of the smart device is the default factory address, and the smart device can be determined to be the target device. In this case, the smart device can update its device address to the target address information of the address write instruction. After writing the target address information, the smart device can broadcast a write success message. The write success message may include the target address information, which is used to indicate that the target address information has been written to the target device. Here, the write success message may be a Bluetooth broadcast packet or a ZigBee broadcast packet, and the write success message may use the same communication protocol as the address write instruction.

[0089] Step 440: When receiving the write success information corresponding to the address write instruction, the user terminal determines that the target address information is written to the target device.

[0090] After sending the address write instruction, the user terminal can monitor the write success information. If the write success information is not received within the preset time (for example: 30 seconds), it can be determined that the target address information has failed to be written, and the address write instruction can be rebroadcast. If the write success information is received, and the write success information contains the target address information in the address write instruction, it can be determined that the target address information has been successfully written to the target device, and at this time, the target address information writing process can be ended.

[0091] Through the above measures, the user terminal can write the target address information to the target device, so as to interact with it later with the help of the target address information.

[0092] In actual application scenarios, there may be multiple smart devices that do not have written address information. When the target address information is written to the target device through the user terminal, the target address information will be written to other smart devices. To avoid this problem, the manual of the smart device can require that when the smart device is used for the first time, only one smart device is powered on at the same time to ensure that only one smart device is written to the default factory address at the same time. Alternatively, after writing the target address information to the target device, the user is prompted on the user terminal to operate other smart devices so that other smart devices are restored to factory settings, thereby removing the target address information.

[0093] In one embodiment, an internal device identifier can be set on the smart device. The internal device identifier is a device identifier that the smart device itself can obtain. With the internal device identifier, it is possible to avoid writing the target address information to other smart devices when the user terminal writes the target address information to the target device. Each smart device has its own MCU (Microcontroller Unit) chip. Each MCU chip has a unique chip identifier, and the chip identifier can be used as the internal device identifier. See Figure 5 , is a flow chart of a method for writing target address information provided by another embodiment of the present application, such as Figure 5 As shown, the method may include the following steps 510 to 580.

[0094] Step 510: If it is the default factory address, the user terminal broadcasts an address write instruction; wherein the address write instruction includes target address information.

[0095] When the user terminal writes the target address information to the target device, it can construct an address write instruction based on the target address information and broadcast the address write instruction. The address write instruction is used to instruct the target device to save the target address information and use it as its own device address. Here, the target address information can be obtained by querying the manufacturer's cloud server based on the external device identifier. The address write instruction can be a Bluetooth broadcast packet or a ZigBee broadcast packet; the address write instruction can be broadcast using the same protocol as the query instruction.

[0096] Step 520: If the address write instruction is received, the smart device determines whether its own device address is the default factory address.

[0097] Step 530: If yes, the smart device broadcasts a write inquiry message; wherein the write inquiry message includes the target address information in the address write instruction and its own internal device identification.

[0098] After the user terminal broadcasts the address write instruction, all smart devices can receive the address write instruction within the range allowed by the communication protocol. After any smart device receives the address write instruction, it can determine whether its own device address is the default factory address.

[0099] In one case, the device address itself is not the default factory address, which means that the address write instruction is sent to other smart devices and the address write instruction can be ignored.

[0100] In another case, the device address is the default factory address, and it can be determined that the target address information can be written. In this case, the smart device can construct a write inquiry message based on the target address information in the address write instruction and its internal device identification, and the write inquiry message is used to inquire the user terminal whether the target address information can be written. The smart device can broadcast the write inquiry message. Here, the write inquiry message can be a Bluetooth broadcast packet or a ZigBee broadcast packet, and the write inquiry message can use the same communication protocol as the address write instruction.

[0101] Step 540: The user terminal receives at least one write inquiry message corresponding to the address write instruction.

[0102] The user terminal may receive at least one write inquiry message, and parse the write inquiry message to obtain the target address information and the internal device identifier of the smart device that sends the write inquiry message.

[0103] In the present application solution, it can be considered that the user terminal is closest to the target device, so the first write inquiry information received by the user terminal comes from the target device.

[0104] Step 550: The user terminal broadcasts a write confirmation instruction, and upon receiving write success information, determines that the target address information has been written to the target device; wherein the write confirmation instruction is used to indicate writing of the target address information, and the write confirmation instruction includes the internal device identifier in the first received write inquiry information, and the target address information.

[0105] Step 560: If a write confirmation instruction is received, the smart device compares the internal device identifier in the write confirmation instruction with its own internal device identifier to see if they are consistent. If they are consistent, it updates its own device address to the target address information in the address write instruction and broadcasts a write success message; wherein the write success message includes the target address information.

[0106] After receiving the first write inquiry information, the user terminal can construct a write confirmation instruction based on the internal device identifier in the write inquiry information and the target address information, and the write confirmation instruction is used to instruct the smart device corresponding to the internal device identifier to write the target address information. Here, the write confirmation instruction can be a Bluetooth broadcast packet or a ZigBee broadcast packet, and the write confirmation instruction can use the same communication protocol as the address write instruction.

[0107] After the user terminal broadcasts the write confirmation instruction, all smart devices can receive the write confirmation instruction within the scope allowed by the communication protocol. After receiving the write confirmation instruction, any smart device can determine whether its internal device identification is consistent with the internal device identification in the write confirmation instruction.

[0108] In one case, the two are different, and the smart device can ignore the write confirmation instruction. In another case, the two are the same, and the smart device can update its own device address to the target address information in the address write instruction. At this time, the smart device as the target device successfully writes the target address information. The smart device can broadcast a write success message, which includes the target address information, to notify the user terminal that the target address information has been written. Here, the write success message can be a Bluetooth broadcast packet or a ZigBee broadcast packet, and the write success message can use the same communication protocol as the address write instruction.

[0109] Step 570: For each write inquiry message after the first write inquiry message, the user terminal broadcasts an address invalidation instruction; wherein the address invalidation instruction is used to indicate that the target address information is occupied, and the address invalidation instruction includes the internal device identifier in the write inquiry message and the target address information.

[0110] Step 580: If an address invalidation instruction is received, the smart device abandons updating its own device address.

[0111] For each write inquiry message after the first write inquiry message, the user terminal can determine that these write inquiry messages come from other smart devices. In this case, the user terminal can construct an address invalidation instruction based on the internal device identification and target address information in the write inquiry message, and broadcast the address invalidation instruction. Here, the address invalidation instruction can be a Bluetooth broadcast packet or a ZigBee broadcast packet, and the address invalidation instruction can use the same communication protocol as the write inquiry message.

[0112] After the user terminal broadcasts the address invalidation instruction, all smart devices can receive the address invalidation instruction within the range allowed by the communication protocol. After receiving the address invalidation instruction, any smart device can determine whether its internal device identification is consistent with the internal device identification in the address invalidation instruction.

[0113] In one case, the two are different, and the smart device can ignore the address invalidation instruction. In another case, the two are the same, and the smart device can confirm that the target address information has been occupied, and thus give up updating its own device address.

[0114] Through the above measures, with the help of the internal device identification, when writing the target address information to the target device, it is possible to avoid other intelligent devices except the target device from storing the target address information.

[0115] In one embodiment, before broadcasting the control instruction to the target device, the user terminal can jump to the control page of the target device according to the target address information. The control page can be pulled from the manufacturer's cloud server, including several function options and operation buttons. The user terminal can generate a control instruction in response to the operation instruction for the control page. Here, the operation instruction can be generated by the user operating the control page.

[0116] If the user terminal supports docking with multiple models of smart devices, the user terminal can jump to the control page according to the target address information and model information of the target device, and the control page corresponds to the model information. Exemplarily, the user terminal can control an air fryer and a refrigerator through this solution. When the target device is an air fryer, the user terminal can jump to the control page corresponding to the air fryer according to the target address information and model information of the air fryer.

[0117] Through the above measures, the user terminal can jump to the control page after obtaining the external device identification of the target device and confirming that the target device has written the target address information, thereby sending a control instruction to the target device in response to the user operation.

[0118] In one embodiment, during the operation of the target device, the smart device as the target device can broadcast a log synchronization instruction. The log synchronization instruction is used to synchronize log data during the operation, and the log synchronization instruction may include log data and target address information of the target device. The log data may be data such as the number of times a function is enabled, the number and type of alarms during the operation of the smart device, etc. The log synchronization instruction may be a Bluetooth broadcast packet or a ZigBee broadcast packet, and the log synchronization instruction may use the same communication protocol as the control instruction.

[0119] After receiving the log synchronization instruction, the user terminal parses the log data and the target address information, and can store the log data and the target address information in association. The user terminal can store the log data and the target address information in association in the manufacturer's cloud server.

[0120] Through the above measures, log data can be remotely stored with the help of user terminals during the operation of the target device.

[0121] In one embodiment, when the user terminal supports multiple models of smart devices, the query instructions, control instructions, address write instructions, write confirmation instructions, address invalidation instructions and other instructions broadcast by the user terminal can all contain the model information of the target device. In this case, after any smart device in the application scenario receives the instructions broadcast by the user terminal, it can parse the model information and compare it with its own model. On the one hand, if the two are different, the instruction can be directly ignored. On the other hand, if the two are the same, the subsequent steps such as comparing the address information can be continued.

[0122] Through the above measures, when there are multiple models of smart devices in the application scenario, the target device can be controlled more accurately with the help of model information.

[0123] See also Figure 6 , is a flow chart of a method for processing a control instruction provided in an embodiment of the present application, such as Figure 6 As shown, after receiving the control instruction, the smart device can process the control instruction through the following steps 610 to 630.

[0124] Step 610: After receiving the control instruction, determine whether the model information in the control instruction is consistent with the own device model.

[0125] After receiving the control command, any smart device can parse the target address information and model information from it, and compare the model information with its own device model to determine whether the two are consistent.

[0126] Step 620: If the model information is consistent with the own device model, continue to execute the step of determining whether the target address information in the control instruction is consistent with the own device address.

[0127] Step 630: If the model information is inconsistent with the own device model, the control instruction is ignored.

[0128] In one case, the two are consistent, and the control instruction may be an instruction to control its own operation, and the smart device can continue to perform the step of determining whether the target address information in the control instruction is consistent with its own device address. In other words, the smart device can continue to perform step 360. In another case, the two are inconsistent, and it can be determined that the control instruction is an instruction to control the operation of other models of smart devices, and the control instruction is directly ignored.

[0129] In summary, in the present application scheme, there is no need for pairing between the user terminal and the smart device. With the help of the address information of the application layer, the control process of the user terminal on the smart device and the interaction between the user terminal and the smart device can be realized by broadcasting, which reduces the difficulty of operation. When controlling the smart device for the first time, if it is determined that the smart device has not written the target address information, the target address information can be written for it, thereby binding the smart device to its corresponding external device identifier, so that the subsequent user terminal can control the smart device after obtaining the external device identifier of the smart device. Since in this solution, the smart device and the user terminal do not need to be bound, multiple user terminals can control one smart device at the same time. In addition, with the help of the user terminal, the log data of the smart device can be stored in the manufacturer's cloud server, which is convenient for subsequent abnormal analysis and device status monitoring.

Claims

1. A device control method, applied to a user terminal, characterized in that: include: Obtaining an external device identifier of a target device, and broadcasting a query instruction for the external device identifier; receiving at least one feedback information corresponding to the query instruction; wherein the feedback information includes a device address; Determine whether the device address is consistent with the target address information; wherein the target address information is the address information of the target device; If they are consistent, a control instruction is broadcast, and the control instruction includes the target address information; wherein the query instruction, the feedback information and the control instruction are Bluetooth broadcast packets or ZigBee broadcast packets.

2. The method according to claim 1, characterized in that The method further comprises: If they are inconsistent, check whether the device address is the default factory address; If it is not the default factory address, ignore the feedback information.

3. The method according to claim 2, characterized in that The method further comprises: If it is the default factory address, broadcast an address writing instruction; wherein the address writing instruction includes the target address information; When the write success information corresponding to the address write instruction is received, it is determined that the target address information is written to the target device; wherein the write success information includes the target address information, and the address write instruction and the write success information are Bluetooth broadcast packets or ZigBee broadcast packets.

4. The method according to claim 2, characterized in that The method further comprises: If it is the default factory address, broadcast an address writing instruction; wherein the address writing instruction includes the target address information; receiving at least one write inquiry information corresponding to the address write instruction; wherein the write inquiry information includes the target address information and an internal device identifier; Broadcasting a write confirmation instruction, and upon receiving a write success message, determining that the target address information is written to the target device; wherein the write confirmation instruction is used to indicate writing the target address information, and the write confirmation instruction includes the internal device identifier in the first received write inquiry message, and the target address information; the write success message includes the target address information; For each write inquiry information after the first write inquiry information, broadcast an address invalidation instruction; wherein the address invalidation instruction is used to indicate that the target address information is occupied, and the address invalidation instruction includes the internal device identifier in the write inquiry information and the target address information; The address write instruction, the write inquiry information, the write confirmation instruction, the write success information and the address invalidation instruction are Bluetooth broadcast packets or ZigBee broadcast packets.

5. The method according to claim 1, characterized in that Before the broadcast control instruction, the method further includes: Jump to the control page of the target device according to the target address information; The control instruction is generated in response to an operation instruction for the control page.

6. The method according to claim 1, characterized in that The method further comprises: Receiving a log synchronization instruction sent by the target device; wherein the log synchronization instruction includes log data and the target address information, and the log synchronization instruction is a Bluetooth broadcast packet or a ZigBee broadcast packet; The log data is stored in association with the target address information.

7. A device control method, applied to a smart device, characterized in that: include: Receive a query instruction and broadcast feedback information for the query instruction; wherein the feedback information includes its own device address; If a control instruction is received, determining whether the target address information in the control instruction is consistent with the device address of the device itself; If they are consistent, executing the control instruction; The query instruction, the feedback information and the control instruction are Bluetooth broadcast packets or ZigBee broadcast packets.

8. The method according to claim 7, characterized in that The method further comprises: If an address write instruction is received, determine whether the device address is the default factory address; If so, update its own device address to the target address information in the address write instruction, and broadcast write success information; wherein, the write success information includes the target address information, and the address write instruction and the write success information are Bluetooth broadcast packets or ZigBee broadcast packets.

9. The method according to claim 7, characterized in that: The method further comprises: If an address write instruction is received, determine whether the device address is the default factory address; If yes, broadcast write inquiry information; wherein the write inquiry information includes the target address information in the address write instruction and its own internal device identification; If a write confirmation instruction is received, compare the internal device identification in the write confirmation instruction with its own internal device identification to see if they are consistent, and if they are consistent, update its own device address to the target address information in the address write instruction, and broadcast write success information; wherein the write success information includes the target address information; If an address invalidation instruction is received, the device will give up updating its own device address; The address write instruction, the write inquiry information, the write confirmation instruction, the write success information and the address invalidation instruction are Bluetooth broadcast packets or ZigBee broadcast packets.

10. The method according to claim 7, characterized in that The method further comprises: After receiving the control instruction, determining whether the model information in the control instruction is consistent with the device model of the device itself; If the model information is consistent with the own device model, continue to perform the step of determining whether the target address information in the control instruction is consistent with the own device address; If the model information is inconsistent with the own device model, the control instruction is ignored.

Citation Information

Patent Citations

  • Internet of Things control method based on Bluetooth communication

    CN108400914A

  • Intelligent equipment control method and terminal

    CN112492569A

  • Method and device for pairing Bluetooth remote controller with multiple devices, equipment and storage medium

    CN114071439A