Electronic device and device control method

CN122122905APending Publication Date: 2026-05-29JUHAOKAN TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
JUHAOKAN TECH CO LTD
Filing Date
2024-12-24
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

The existing Bluetooth network distribution method has limited content when displaying device information, resulting in poor user experience and inability to effectively display detailed information of smart devices.

Method used

By obtaining the device category list and the reported information of the smart device in the current environment, using the actual logo to query the corresponding theoretical logo in the device category list, confirming that the smart device supports the Internet of Things function, and obtaining device model information, generating a display device list, including device icons, names and models, and displaying them on the user interface.

Benefits of technology

Improve the user experience and help users better identify and add smart devices through detailed device information display.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122122905A_ABST
    Figure CN122122905A_ABST
Patent Text Reader

Abstract

The present disclosure relates to the technical field of Internet of Things, and particularly relates to an electronic device and a device control method, which are used to solve the problem of limited content of application display and poor user experience in the prior art. The method comprises the following steps: in response to a starting operation, obtaining a device category list and report information reported by a smart device to be configured in a current environment; based on an actual identifier, querying in the device category list to determine whether there is a same theoretical identifier as the actual identifier, and whether the same theoretical identifier as the actual identifier supports an Internet of Things function; and when device model information is obtained based on configuration information of the smart device corresponding to the actual identifier, generating a display device list based on the device model information; wherein the device model information at least comprises a device icon, a device name and a device model, the display device list comprises a smart device corresponding to each device model information; and displaying based on the display device list.
Need to check novelty before this filing date? Find Prior Art

Description

Electronic device and device control method

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This disclosure claims priority to Chinese applications filed on January 3, 2024, with application numbers 202410008004.8; filed on January 3, 2024, with application numbers 202410009157.4; and filed on January 3, 2024, with application numbers 202410009495.8, the entire contents of which are incorporated herein by reference. Technical Field

[0003] The present disclosure relates to the technical field of Internet of Things, and in particular to an electronic device and a device control method. Background Art

[0004] Currently, Bluetooth pairing is the most common method for configuring smart devices. Following the instructions on the mobile app (application), the Bluetooth module is configured for network configuration. The module then sends a broadcast packet. Due to the limited length of the content stored in the broadcast packet, the device type is typically encoded in the broadcast content, displaying the device category name, device category icon, and a portion of the Bluetooth module's unique identifier to the user. This limited display content results in a poor user experience. Summary of the Invention

[0005] In a first aspect, the present disclosure provides an electronic device, which may include: a display; a communication device, which may be configured to establish a communication connection with a smart device; at least one processor, connected to the display and the communication device, and configured to execute computer instructions to enable the electronic device to execute: in response to a startup operation, controlling the communication device to obtain a device category list and reported information reported by smart devices to be networked in the current environment; wherein the device category list includes a correspondence between a theoretical identifier and a network identifier, the network identifier is used to indicate whether the smart device supports an Internet of Things function, the theoretical identifier includes a local area network device identification code or a Bluetooth network device identification code, and the reported information includes an actual identifier; based on The actual identifier obtained by the communication device is queried in the device category list obtained by the communication device to determine whether there is a theoretical identifier that is identical to the actual identifier, and the network identifier corresponding to the theoretical identifier that is identical to the actual identifier is used to indicate that the smart device supports the Internet of Things function, and based on the configuration information of the smart device corresponding to the actual identifier, when the device model information is obtained, a display device list is generated based on the device model information; wherein, the device model information includes at least a device icon, a device name and a device model, and the display device list includes each smart device corresponding to the device model information; and the control display is displayed based on the display device list.

[0006] In a second aspect, the present disclosure provides a device control method, which may include: in response to a startup operation, obtaining a device category list and reported information reported by smart devices to be networked in the current environment; wherein, the device category list includes a correspondence between a theoretical identifier and a network identifier, and the network identifier is used to indicate whether the smart device supports the Internet of Things function. The theoretical identifier includes a local area network device identification code or a Bluetooth network pairing device identification code, and the reported information includes an actual identifier; based on the actual identifier, a query is performed in the device category list to determine whether there is a theoretical identifier that is the same as the actual identifier, and the network identifier corresponding to the theoretical identifier that is the same as the actual identifier is used to indicate that the smart device supports the Internet of Things function, and based on the configuration information of the smart device corresponding to the actual identifier, when the device model information is obtained, a display device list is generated based on the device model information; wherein, the device model information includes at least a device icon, a device name and a device model, and the display device list includes each smart device corresponding to the device model information; and display is performed based on the display device list. BRIEF DESCRIPTION OF THE DRAWINGS

[0007] FIG1 is a schematic diagram of a scenario of a device control method according to some embodiments;

[0008] FIG2 is a schematic diagram of the structure of a smart device according to some embodiments;

[0009] FIG3 is another schematic structural diagram of a smart device according to some embodiments;

[0010] FIG4 is a flow chart of a device control method according to some embodiments;

[0011] FIG5 is a schematic diagram of a scenario of a device control method according to some embodiments;

[0012] FIG6 is a schematic diagram of another scenario of a device control method according to some embodiments;

[0013] FIG7 is another schematic flow chart of a device control method according to some embodiments;

[0014] FIG8 is another schematic flow chart of a device control method according to some embodiments;

[0015] FIG9 is another schematic flow chart of a device control method according to some embodiments;

[0016] FIG10 is another flowchart of a device control method according to some embodiments;

[0017] FIG11 is a schematic diagram of another scenario of a device control method according to some embodiments;

[0018] FIG12 is a schematic diagram of another scenario of a device control method according to some embodiments;

[0019] FIG13 is a schematic diagram of another scenario of a device control method according to some embodiments;

[0020] FIG14 is a schematic diagram of another scenario of a device control method according to some embodiments;

[0021] FIG15 is a schematic diagram of another scenario of a device control method according to some embodiments;

[0022] FIG16 is another flowchart of a device control method according to some embodiments;

[0023] FIG17 is another flowchart of a device control method according to some embodiments;

[0024] FIG18 is another schematic flow chart of a device control method according to some embodiments;

[0025] FIG19 is another flowchart of a device control method according to some embodiments;

[0026] FIG20 is another flowchart of a device control method according to some embodiments;

[0027] FIG21 is another schematic flow chart of a device control method according to some embodiments;

[0028] FIG22 is another flowchart of a device control method according to some embodiments;

[0029] FIG23 is another flowchart of a device control method according to some embodiments;

[0030] FIG24 is another schematic flow chart of a device control method according to some embodiments;

[0031] FIG25 is another schematic flow chart of a device control method according to some embodiments;

[0032] FIG26 is another schematic flow chart of a device control method according to some embodiments;

[0033] FIG27 is another flowchart of a device control method according to some embodiments;

[0034] FIG28 is another flowchart of a device control method according to some embodiments;

[0035] FIG29 is another schematic flow chart of a device control method according to some embodiments;

[0036] FIG30 is another schematic flow chart of a device control method according to some embodiments;

[0037] FIG31 is another flowchart of a device control method according to some embodiments;

[0038] FIG32 is a schematic structural diagram of a mobile terminal according to some embodiments;

[0039] FIG33 is a schematic diagram of a chip system according to some embodiments. DETAILED DESCRIPTION

[0040] FIG1 is a schematic diagram of a device control method according to some embodiments. As shown in FIG1 , a user may operate a smart device 200 through a mobile terminal 300 and / or a control apparatus 100 .

[0041] The control device 100 can be a remote controller, and the communication between the remote controller and the smart device includes infrared protocol communication, Bluetooth protocol communication, wireless or other wired methods to control the smart device 200. The user can control the smart device 200 by inputting user commands through buttons on the remote controller, voice input, control panel input, etc.

[0042] In some embodiments, mobile terminals, tablet computers, computers, laptop computers, and other smart devices may also be used to control the smart device 200 .

[0043] In some embodiments, the smart device 200 may have various implementation forms, for example, it may be a television, a smart TV, a laser projection device, an electronic whiteboard (electronic bulletinboard), an electronic table (electronic table), etc.

[0044] The electronic device of the embodiment of the present disclosure may be the mobile terminal 300 described above. A user may control the smart device 200 through the mobile terminal 300 while using the mobile terminal 300. If no binding relationship has been established between the smart device 200 and the mobile terminal 300, the user may open a first application on the mobile terminal 300. In response to the startup operation, the first application obtains information reported by the smart devices in the current environment and sends the obtained information to the IoT server 400.

[0045] After receiving the acquisition information sent by mobile terminal 300, IoT server 400 sends a device category list to mobile terminal 300. Mobile terminal 300 receives the device category list sent by IoT server 400, thereby obtaining the device category list. The first application then searches the device category list based on the actual identifier, determines whether a theoretical identifier identical to the actual identifier exists, and that the network identifier corresponding to the theoretical identifier identical to the actual identifier indicates that the smart device supports IoT functions. Based on the configuration information of the smart device corresponding to the actual identifier, the first application sends a query message containing the configuration information to IoT server 400.

[0046] Based on the query information sent by mobile terminal 300, IoT server 400 queries the database and obtains the device model information corresponding to the configuration information in the query information. IoT server 400 then sends the device model information to mobile terminal 300. Mobile terminal 300 receives the device model information sent by IoT server 400, and the first application then obtains the device model information. Based on the device model information, the first application then generates a list of displayed devices. This allows the first application to display device icons, device names, and device models that better match the smart device, thereby enhancing the content displayed by the first application and improving the user experience. The first application then performs a display based on the list of displayed devices.

[0047] Figure 2 is a block diagram of the hardware configuration of a smart device 200 according to some embodiments. As shown in Figure 2, the smart device 200 includes at least one of a tuner and demodulator 210, a communication device 220, a detector 230, an external device interface 240, a processor 250, a display 260, an audio output interface 270, a memory, a power supply, and a user interface 280. The processor includes a central processing unit, a video processor, an audio processor, a graphics processor, RAM, ROM, and first to nth interfaces for input / output. The display 260 can be a display with touch functionality, such as a touch display. The detector 230 is used to collect signals from the external environment or external interactions.

[0048] In some embodiments, the processor 250 controls the operation of the smart device and responds to user operations through various software control programs stored in the memory. The processor 250 can be used to control the overall operation of the smart device 200.

[0049] In some embodiments, the smart device 200 is a television 1, and the operating system of the television 1 is an Android system. As shown in Figure 3, the television 1 can be logically divided into an application layer (referred to as "application layer") 21, an application framework layer (referred to as "framework layer") 22, an Android runtime (Android runtime) and system library layer (referred to as "system runtime library layer") 23, and a kernel layer 24.

[0050] The application layer 21 includes one or more applications. These applications can be system applications or third-party applications. The framework layer 22 provides an application programming interface (API) and programming framework for the applications in the application layer 21. The system runtime layer 23 provides support for the upper layer, the framework layer 22. When the framework layer 22 is used, the Android operating system runs the C / C++ libraries contained in the system runtime layer 23 to implement the functions required by the framework layer 22. The kernel layer 24 serves as the software middleware between the hardware layer and the application layer 21, and is used to manage and control hardware and software resources.

[0051] In some embodiments, while using the mobile terminal 300, the user can control the television 1 through the mobile terminal 300. If the television 1 and the mobile terminal 300 have not yet established a binding relationship, the user can open a first application on the mobile terminal 300. In this case, the processing unit 201 of the first application, in response to the startup operation, controls the transceiver unit 202 to obtain the reported information reported by the smart devices in the current environment, and controls the transceiver unit 202 to send the acquisition information to the IoT server 400. After receiving the acquisition information sent by the mobile terminal 300, the IoT server 400 sends a device category list to the mobile terminal 300. The transceiver unit 202 of the mobile terminal 300 receives the device category list sent by the IoT server 400, thereby obtaining the device category list. The control transceiver unit 202 obtains a list of device categories and information reported by smart devices in the current environment. Subsequently, the processing unit 201 of the first application searches the device category list obtained by the transceiver unit 202 based on the actual identifier obtained by the transceiver unit 202. It determines whether a theoretical identifier identical to the actual identifier exists, and whether the network identifier corresponding to the theoretical identifier identical to the actual identifier indicates that the smart device supports IoT functionality. Based on the configuration information of the smart device corresponding to the actual identifier, the control transceiver unit 202 sends a query message containing the configuration information to the IoT server 400. Based on the query message sent by the mobile terminal 300, the IoT server 400 searches a database to obtain the device model information corresponding to the configuration information in the query message. The IoT server 400 then sends the device model information to the mobile terminal 300. The transceiver unit 202 of the mobile terminal 300 receives the device model information sent by the IoT server 400, and the first application thereby obtains the device model information. Next, the processing unit 201 generates a display device list based on the device model information obtained by the transceiver unit 202. This allows the first application to display device icons, device names, and device models that are more appropriate for the smart device, thereby improving the content displayed by the first application and enhancing the user experience. Next, the first application processing unit 201 controls the display unit 203 to display based on the display device list.

[0052] In some embodiments, the execution subject of the device control method provided by the embodiment of the present disclosure is the mobile terminal 300, and the storage unit 204 of the mobile terminal 300 is used to store data such as program code of the device control method provided by the embodiment of the present disclosure.

[0053] In the following embodiments, the method of the embodiment of the present disclosure is described by taking the mobile terminal 300 as an example of an execution subject of the device control method provided by the embodiment of the present disclosure.

[0054] An embodiment of the present disclosure provides a device control method, which is applied to a television 1 . As shown in FIG4 , the device control method may include the following steps S11 - S13 .

[0055] S11. In response to the start operation, obtain a device category list and reported information reported by the smart devices to be networked in the current environment. The device category list includes a correspondence between a theoretical identifier and a network identifier, the network identifier is used to indicate whether the smart device supports the Internet of Things function, the theoretical identifier includes a local area network device identification code or a Bluetooth network device identification code, and the reported information includes an actual identifier.

[0056] In some embodiments, the actual identifier includes a local area network device identification code or a Bluetooth pairing device identification code.

[0057] In some embodiments, in response to a startup operation, the first application in the mobile terminal 300 invokes the Bluetooth module of the mobile terminal 300 to obtain information reported by the smart device in the current environment, such as the content of a Bluetooth broadcast packet. After parsing the content of the broadcast packet, the first application connects to the IoT server 400 to obtain device model information. In addition, after the first application successfully pairs with the smart device through Bluetooth, as long as the first application and the smart device are in the same local area network, the first application can use the local area network discovery protocol to determine whether the smart device is connected to the local area network.

[0058] In some embodiments, the first application continuously obtains the reporting information reported by the smart devices in the current environment within a specified time, and stops obtaining the reporting information reported by the smart devices in the current environment until the specified time is reached or a communication connection is established with the smart devices.

[0059] In some embodiments, a mobile terminal 300 installed with a first application is used as a scanning center, and multiple target protocols are used to discover smart devices in the current environment. The target protocols include any of the Bluetooth protocol and the local area network protocol. The purpose of discovering smart devices in the current environment through target protocols is to accommodate multiple application scenarios. For example, a Bluetooth device waiting to be networked can be discovered using the Bluetooth protocol. For a Bluetooth device that has already been networked, if the first application and the Bluetooth device are in the same local area network, the first application can discover the Bluetooth device using the local area network protocol.

[0060] In some embodiments, when there is only one smart device in the current environment, a display list can be directly generated.

[0061] In some embodiments, when there are more than or equal to two smart devices in the current environment, it is necessary to deduplicate the smart devices to obtain a list of display devices. For example, when deduplicating the smart devices bound to the current account and at least two smart devices that can be added to the current environment, since there is a problem of re-acquiring smart devices obtained through the Bluetooth protocol and the smart devices obtained through the local area network protocol, it is possible to first deduplicate the smart devices obtained through the local area network protocol and the Bluetooth protocol to obtain deduplicated smart devices; then, the deduplicated smart devices and the smart devices obtained through the Digital Living Network Alliance protocol are merged to obtain a merged smart device. Since the merged smart devices include a smart device that has been bound to the current account currently logged in by the first application, it is necessary to deduplicate the smart devices bound to the current account and the merged smart devices to obtain the displayable smart devices. Then, based on the available smart devices, a display device list is generated that includes each available smart device. For example, the smart devices that are identical to the smart devices bound to the current account (e.g., the same device identification code used to uniquely identify the smart device) are deleted from the merged smart devices to obtain the available smart devices. Alternatively, under normal circumstances, smart devices discovered via the Bluetooth protocol or the LAN protocol can be discovered repeatedly within a certain period of time (e.g., 10 seconds). Therefore, it is necessary to remove smart devices that have not been discovered repeatedly within 10 seconds to obtain the available smart devices.

[0062] Afterwards, based on the actual identification of the displayable smart device, a query is performed in the device category list to determine whether there is a theoretical identification that is the same as the actual identification, and the network identification corresponding to the theoretical identification that is the same as the actual identification is used to indicate that the smart device supports the Internet of Things function. Based on the configuration information of the smart device corresponding to the actual identification, when the device model information is obtained, a display device list is generated based on the device model information.

[0063] In some embodiments, for ease of understanding, assume that the smart device discovered via the Bluetooth protocol (e.g., referred to as the Bluetooth device) is B_1, and the smart device discovered via the LAN service (e.g., referred to as the LAN device) is W_1. The unique Media Access Control Address (MAC) of the WiFi module is used to verify that the smart device discovered via the Bluetooth protocol and the smart device discovered via the LAN service are the same smart device. This solution relies on the MAC address of the WiFi module reported by the Bluetooth device during broadcasting.

[0064] In some embodiments, the process for a Bluetooth device to obtain the MAC address of a WiFi module is as follows: When the first M bits of the manufacturer_data information in the advertising packet content reported by the Bluetooth device are ≥ 128 (e.g., M is equal to 2), the Bluetooth device is deleted and the LAN device is retained. When the first two bits of the manufacturer_data information in the advertising packet content reported by the Bluetooth device are less than 128, such as the "manufacturer_data" information in the advertising packet content of B_1 is "40007638640773889c", the first two bits "40" in "40007638640773889c" are converted to decimal 64. Since 64 < 128, it indicates that the smart device supports MAC resolution. The MAC address length is then determined by comparing the first two bits of the "manufacturer_data" information in the broadcast packet with a preset threshold (e.g., 64). For example, if the first two bits of the "manufacturer_data" information in the broadcast packet are ≥ 64, the MAC address length is determined to be 12. If the first two bits of the "manufacturer_data" information in the broadcast packet are < 64, the MAC address length is determined to be 8. For example, if the "manufacturer_data" information in the broadcast packet is "40007638640773889c," the first two bits "40" in "40007638640773889c" are converted to decimal 64. Since 64=64, the MAC address length is 12. Then, based on the address length, characters of the address length are truncated from the "manufacturer_data" information in the broadcast packet content as the MAC (the characters after the address length in the "manufacturer_data" information in the broadcast packet content are taken). For example, if the "manufacturer_data" information in the broadcast packet content is "40007638640773889c", the characters starting from the last character "c" are truncated forward with a step length equal to the address length as the MAC, that is, the MAC is "8640773889c".

[0065] Afterwards, the process for the LAN device to obtain the MAC of the WiFi module is as follows: The definition rule of the WiFi ID stipulates that the last 12 characters of the WiFi ID are the MAC of the WiFi module. Since the length of the MAC of the WiFi module obtained by the Bluetooth device is dynamic, the length of the MAC of the WiFi module obtained by the Bluetooth device is compared with 12. When the length of the MAC of the WiFi module obtained by the Bluetooth device is greater than or equal to 12, characters with a step length of 12 are intercepted from the last character of the WiFi ID forward as the MAC. When the length of the MAC of the WiFi module obtained by the Bluetooth device is less than 12, characters with a step length equal to the length of the MAC of the WiFi module obtained by the Bluetooth device are intercepted from the last character of the WiFi ID forward as the MAC. In some embodiments, combined with the numbers given above, the length of the MAC of the WiFi module obtained by B_1 is 12, and the length of the MAC of the WiFi module obtained by W_1 is 12, and the minimum value of the two is 12.

[0066] Assume that the WiFi ID of W_1 is "86100c00fffe00600000004038640773889c". The MAC is obtained by truncating the characters starting from the last character c with a step length of 12, that is, the MAC is "8640773889c".

[0067] Afterwards, the MAC address of the WiFi module obtained by the Bluetooth device is compared with the MAC address of the WiFi module obtained by the LAN device. If the MAC address of the WiFi module obtained by the Bluetooth device is the same as the MAC address of the WiFi module obtained by the LAN device, it indicates that the Bluetooth device and the LAN device are the same device. The Bluetooth device can be deleted, and the LAN device can be retained. The retained LAN device is used as the deduplicated smart device. If the MAC address of the WiFi module obtained by the Bluetooth device is different from the MAC address of the WiFi module obtained by the LAN device, it indicates that the Bluetooth device and the LAN device are not the same device. Therefore, both need to be retained. That is, the retained Bluetooth device and LAN device are used as the deduplicated smart device.

[0068] In some embodiments, the device control method provided by the embodiments of the present disclosure can also perform deduplication using the category information to which the Bluetooth device belongs and the category information to which the local area network device belongs. For example, the category information corresponding to B_1 is a washing machine, and the category information corresponding to W_1 is an air conditioner. Since the category information of the two is different, it is necessary to retain both the Bluetooth device and the local area network device, that is, the retained Bluetooth device and the local area network device will be used as the deduplicated smart devices.

[0069] In some embodiments, when the first application is launched, it obtains the current category data and persists it to the terminal device's memory. Each time the first application is launched, it detects whether the locally stored category data needs to be updated. For example, the first application sends an update request to the IoT server containing the update date of the current category data. The IoT server determines that no new category data exists after the update date and sends a non-update indication to the terminal device. Based on this indication, the terminal device no longer updates the category data for the current time. The category data includes category information, Bluetooth module code information, WiFi module code information, etc.

[0070] Assume the smart device is a "range hood." The corresponding category code for this smart device is "connector.device.type.greasepump," the Bluetooth module code is "23," and the WiFi module code is "35." The Bluetooth module code or the WiFi module code can be used to uniquely match the corresponding category code. For example, the "service_data" corresponding to B_1 is "0202040f000000," where each two bits correspond to a hexadecimal value. Extract bits 3 and 4 from "service_data," such as "02." Obtain the hType field corresponding to W_1, such as "2." Pad the leading digits of hType to the target length. If the target length is 2, the WiFi module code is "02." Then, query the category data for the Bluetooth module code "23" and find that the corresponding category code is "connector.device.type.fridge." The code information "02" of the WiFi module is searched in the category data, and the code information of the category information corresponding to the code information "02" of the WiFi module is obtained as "connector.device.type.fridge".

[0071] Afterwards, when the code information of the category information corresponding to the code information of the Bluetooth module is the same as the code information of the category information corresponding to the code information of the WiFi module, it means that the Bluetooth device and the LAN device are the same smart device. Therefore, the Bluetooth device can be deleted, the LAN device can be retained, and the retained LAN device can be used as the deduplicated smart device. When the code information of the category information corresponding to the code information of the Bluetooth module is different from the code information of the category information corresponding to the code information of the WiFi module, it means that the two are not the same smart device. At this time, both need to be retained, that is, the retained Bluetooth device and LAN device will be used as the deduplicated smart devices.

[0072] In some embodiments, the device control method provided by the embodiments of the present disclosure can use the network configuration information of the smart device to determine whether the Bluetooth device and the local area network device are the same smart device because the smart device cannot be discovered by the local area network service when it is not networked.

[0073] In some embodiments, the first application can determine network configuration information based on the "service_data" field in the broadcast packet reported by B_1. For example, if "service_data" is "0202040f000000," where each two bits correspond to a hexadecimal value, the first application extracts bits 5 and 6 of "service_data" and finds the value "01." The first application then converts "01" to an 8-bit binary value, "00000100," and extracts bits 4 through 6, "001," from "00000100."

[0074] Among them, "000" indicates that the network configuration information is not configured; "001" indicates that the network configuration information is configured.

[0075] When the network configuration information is not configured, it means that the smart device has not been connected to the network, so the Bluetooth device needs to be retained. When the network configuration information is configured, it means that the smart device has been connected to the network, so the Bluetooth device can be deleted.

[0076] In some embodiments, as shown in FIG5 , the first application provides M types of entrances to view the list of devices to be networked. For example, when M is equal to 3, the user can view the list of devices to be networked (i.e., smart devices in the current environment) through any one of the nearby device control 2-1, the scan code add control 2-2, and the manual add control 2-3 in the add page 1 shown in FIG5 . After the user selects the nearby device control 2-1, the first application can display the smart devices discovered through the Bluetooth protocol and the smart devices discovered through the LAN protocol in the display control 3-1 for displaying the list of devices to be networked. After the user selects the scan code add control 2-2 or the manual add control 2-3, the first application can display the specified smart devices to be networked in the display control 3-1 for displaying the list of devices to be networked. Regardless of whether the user selects any of the nearby device controls 2-1, the scan code to add control 2-2, and the manual add control 2-3, the smart devices in the list of devices to be networked displayed in the display control 3-1 must be removed in the above manner to ensure the accuracy of the smart devices in the list of devices to be networked displayed to the user.

[0077] S12. Based on the actual identifier, query the device category list to determine whether there is a theoretical identifier that is the same as the actual identifier, and the network identifier corresponding to the theoretical identifier that is the same as the actual identifier is used to indicate that the smart device supports the Internet of Things function, and based on the configuration information of the smart device corresponding to the actual identifier, when the device model information is obtained, generate a display device list based on the device model information.

[0078] The device model information includes at least a device icon, a device name, and a device model, and the displayed device list includes the smart device corresponding to each device model information.

[0079] In some embodiments, the correspondence between the theoretical identifier and the network identifier is pre-configured in the device category list, such as the network identifier is the netconfigStatus identifier (wherein, when the netconfigStatus identifier is 0, it indicates that the smart device does not support the Internet of Things function; when the netconfigStatus identifier is 1, it indicates that the smart device supports the Internet of Things function, the theoretical identifier includes a local area network device identification code (deviceIdCode) or a Bluetooth pairing device identification code (deviceIdCodeBLE).

[0080] In some embodiments, deviceIdCodeBLE is obtained from the manufacturer data (Manufacturer Data) in the Bluetooth advertising packet.

[0081] In some embodiments, the reported information includes a Bluetooth broadcast packet; when the first application receives the Bluetooth broadcast packet reported by the smart device in the current environment, the first application parses the Bluetooth broadcast packet and determines the actual identifier (such as deviceIdCodeBLE1). Afterwards, based on deviceIdCodeBLE1, a query is performed in the device category list to determine the theoretical identifier that is the same as deviceIdCodeBLE1 in the device category list, as well as the network identifier corresponding to the theoretical identifier. If the network identifier is used to indicate that the smart device supports the Internet of Things function, the configuration information of the smart device corresponding to the deviceIdCodeBLE1 is sent to the Internet of Things server. After receiving the configuration information sent by the mobile terminal, the Internet of Things server queries the database based on the configuration information to obtain the device model information. Afterwards, the Internet of Things server sends the device model information to the mobile terminal, so that the mobile terminal can display it in the display device list based on the device model information sent by the Internet of Things service. Alternatively, if the network identifier is used to indicate that the smart device does not support the Internet of Things function, the smart device corresponding to deviceIdCodeBLE1 is deleted. Alternatively, based on deviceIdCodeBLE1, a query is performed in the device category list to determine the theoretical identifier in the device category list that is the same as deviceIdCodeBLE1, as well as the network identifier corresponding to the theoretical identifier. If the network identifier indicates that the smart device supports IoT functionality, configuration information of the smart device corresponding to deviceIdCodeBLE1 is sent to the IoT server.

[0082] After the IoT server receives the configuration information sent by the mobile terminal, it queries the database based on the configuration information. If the device model information is not found, the IoT server sends the target information to the mobile terminal to indicate that the device model information has not been obtained. After the mobile terminal receives the target information sent by the IoT server, it queries the device category list based on deviceIdCodeBLE1. When it is determined that the device category corresponding to the theoretical identifier corresponding to deviceIdCodeBLE1 has a corresponding device icon and device name, the device icon and device name corresponding to the device category are used as the device model information. In this way, the mobile terminal can display it in the display device list based on the device model information. Alternatively, based on deviceIdCodeBLE1, it queries the device category list to determine the theoretical identifier in the device category list that is the same as deviceIdCodeBLE1, as well as the network identifier corresponding to the theoretical identifier.

[0083] If the network identifier is used to indicate that the smart device supports the Internet of Things function, the configuration information of the smart device corresponding to the deviceIdCodeBLE1 is sent to the Internet of Things server. After the Internet of Things server receives the configuration information sent by the mobile terminal, it queries the database based on the configuration information. If the device model information is not found, the Internet of Things server sends the target information to the mobile terminal to indicate that the device model information has not been obtained. After the mobile terminal receives the target information sent by the Internet of Things server, it queries the device category list based on deviceIdCodeBLE1. When it is determined that the device category corresponding to the theoretical identifier corresponding to deviceIdCodeBLE1 does not have a corresponding device icon and device name, it queries the database of the mobile terminal based on deviceIdCodeBLE1. If there is a pre-configured local icon and local name corresponding to the deviceIdCodeBLE1, the local icon and the local name are used as the device model information. In this way, the mobile terminal can be displayed in the display device list based on the device model information.

[0084] In some embodiments, the reported information includes an online package; when the first application receives the online package reported by the smart device in the current environment, the first application parses the online package to determine the actual identifier (such as deviceIdCode 1). Afterwards, based on deviceIdCode 1, a query is performed in the device category list to determine the theoretical identifier that is the same as deviceIdCode 1 in the device category list, as well as the network identifier corresponding to the theoretical identifier. If the network identifier is used to indicate that the smart device supports the Internet of Things function, the configuration information of the smart device corresponding to the deviceIdCode 1 is sent to the Internet of Things server. After receiving the configuration information sent by the mobile terminal, the Internet of Things server queries the database based on the configuration information to obtain the device model information. Afterwards, the Internet of Things server sends the device model information to the mobile terminal, so that the mobile terminal can display it in the display device list based on the device model information sent by the Internet of Things service.

[0085] Alternatively, if the network identifier indicates that the smart device does not support IoT functionality, the smart device corresponding to deviceIdCode 1 is deleted. Alternatively, based on deviceIdCode 1, a query is performed in the device category list to determine the theoretical identifier in the device category list that is the same as deviceIdCode 1, as well as the network identifier corresponding to the theoretical identifier. If the network identifier indicates that the smart device supports IoT functionality, configuration information containing the smart device corresponding to deviceIdCode 1 is sent to the IoT server.

[0086] After the IoT server receives the configuration information sent by the mobile terminal, it queries the database based on the configuration information. If the device model information is not found, the IoT server sends the target information to the mobile terminal to indicate that the device model information has not been obtained. After the mobile terminal receives the target information sent by the IoT server, it queries the device category list based on deviceIdCode 1. When it is determined that the device category corresponding to the theoretical identifier corresponding to deviceIdCode 1 has a corresponding device icon and device name, the device icon and device name corresponding to the device category are used as the device model information. In this way, the mobile terminal can display it in the display device list based on the device model information. Alternatively, based on deviceIdCode 1, it queries the device category list to determine the theoretical identifier in the device category list that is the same as deviceIdCode 1, as well as the network identifier corresponding to the theoretical identifier.

[0087] If the network identifier is used to indicate that the smart device supports the Internet of Things function, the configuration information of the smart device corresponding to the deviceIdCode 1 is sent to the Internet of Things server. After the Internet of Things server receives the configuration information sent by the mobile terminal, it queries the database based on the configuration information. If the device model information is not found, the Internet of Things server sends the target information to the mobile terminal to indicate that the device model information has not been obtained. After the mobile terminal receives the target information sent by the Internet of Things server, it queries the device category list based on deviceIdCode 1. When it is determined that the device category corresponding to the theoretical identifier corresponding to deviceIdCode 1 does not have a corresponding device icon and device name, it queries the database of the mobile terminal based on deviceIdCode 1. If there is a pre-configured local icon and local name corresponding to the deviceIdCode 1, the local icon and the local name are used as the device model information. In this way, the mobile terminal can be displayed in the display device list based on the device model information.

[0088] S13. Display based on the display device list.

[0089] In some embodiments, the display conditions for displaying the device list may include:

[0090] 1. The device list is displayed only once during the lifecycle of the first app (after launch and before the background process is killed). For example, after the first app is launched, a display flag is recorded. For example, the default value of deviceListShowed is false. After the device list is displayed on the target page, the default value of the display flag is set to true. The next time the target page is displayed again, the device list is not displayed.

[0091] 2. The first application loads successfully on the target page and is displayed on the top layer. For example, if the target page fails to load, the device list will not be displayed even if there are devices that can be displayed in the current display device list. The device list will only be displayed when the currently displayed top layer page is the target page.

[0092] 3. There are currently smart devices that can be added; the display device list can only be displayed when the number of smart devices in the display device list is greater than 1.

[0093] In some embodiments, the target page may be a home page.

[0094] In some embodiments, a homepage corresponds to a tab page. The homepage is the first tab page of the homepage (i.e., the page displayed after the first application is launched and the startup page is displayed). The homepage may display categories such as an upgrade list, a user guide list, or a display device list. Only one list can be displayed at a time.

[0095] In some embodiments, each time the first application is started, a list of eligible display devices will automatically pop up. If the smart device found in the display device list is a neighbor's TV, or a smart device that the user does not want to bind, the user experience will be affected if the smart device continues to be displayed in the display device list each time the first application is started. Therefore, the display method provided in the embodiment of the present disclosure is to optimize this problem and provide the user with an entry to ignore the smart device. The user can ignore all or ignore a single device with one click. The first application locally records the device ignore mark as a basis for whether the device is displayed in the device list next time.

[0096] In some embodiments, the first application displays page 2 as shown in FIG. 6 , and the user can select the ignore control 1 - 1 or the add control 1 - 2 in page 2 to delete or add smart devices.

[0097] The device control method provided by the present disclosure is that the electronic device responds to the startup operation and obtains the device category list and the reported information reported by the smart devices in the current environment; then, the smart device searches the device category list based on the actual identifier to determine whether there is a theoretical identifier that is the same as the actual identifier, and the theoretical identifier that is the same as the actual identifier corresponds to the support of the Internet of Things function, and based on the configuration information of the smart device corresponding to the actual identifier, when the device model information is obtained, a display device list is generated based on the device model information; in this way, the smart device can display the device icon, device name and device model that are more in line with the smart device, thereby improving the content displayed by the first application and improving the user experience. Afterwards, the smart device displays based on the display device list. In this way, the user can see information on the smart device that is more in line with the currently addable smart devices, thereby improving the user's interactive experience.

[0098] In some embodiments, the configuration information includes any one of a device model identifier, a device identifier, and a module identifier, and the module identifier includes any one of a Bluetooth identifier and a wireless communication technology identifier.

[0099] In some embodiments, the device category list also includes device icons and device names corresponding to different device categories; the mobile terminal can query in the device category list based on the actual identifier to determine whether there is a theoretical identifier that is the same as the actual identifier, and the network identifier corresponding to the theoretical identifier that is the same as the actual identifier is used to indicate that the smart device supports the Internet of Things function, and based on the configuration information of the smart device corresponding to the actual identifier, the device model information is not obtained, and the device category corresponding to the theoretical identifier that is the same as the actual identifier has a corresponding device icon and device name, the device icon and device name corresponding to the device category are used as the device model information.

[0100] In combination with FIG4 , as shown in FIG7 , the device control method provided by the embodiment of the present disclosure may further include the following steps S141 to S145:

[0101] S141. Based on the actual identifier, query the device category list to determine whether there is a theoretical identifier that is the same as the actual identifier;

[0102] S142. Determine whether the network identifier corresponding to the theoretical identifier is used to indicate that the smart device supports the Internet of Things function;

[0103] S143: If yes, determine whether the device model information is obtained based on the configuration information of the smart device corresponding to the actual identifier;

[0104] S144: If not, determine whether there is a corresponding device icon and device name for the device category corresponding to the theoretical identifier that is the same as the actual identifier; if obtained, execute the above step S12;

[0105] S145. If it exists, the device icon and device name corresponding to the device category are used as the device model information.

[0106] In some embodiments, in combination with FIG7 , as shown in FIG8 , the device control method provided in the embodiment of the present disclosure may execute the following steps S15 and S16 after executing the above step S144 to determine whether a device category corresponding to the theoretical identifier that is the same as the actual identifier has a corresponding device icon and device name:

[0107] S15. Obtain a pre-configured local icon and local name corresponding to the actual identifier;

[0108] S16. Use the local icon and local name as device model information.

[0109] In some embodiments, the configuration information may be obtained by parsing the reported information, wherein the configuration information includes any one of a device model identifier, a device identifier, and a module identifier, and the module identifier includes any one of a Bluetooth identifier (BLE ID) and a wireless communication technology identifier (WiFi ID).

[0110] In some embodiments, it is difficult to directly obtain device model information during the network configuration phase of a smart device. Therefore, the device control method provided in the disclosed embodiments designs multiple ways to indirectly obtain configuration information through other data, and then query device model information based on the configuration information, making it easier to transmit device model information during the network configuration phase.

[0111] The IoT server provides multiple ways to identify device model information during the network configuration phase, such as identifying device model information based on device model identification (such as device model), identifying device model information based on device identification (such as device identification code), identifying device model information based on Bluetooth identification, or identifying device model information based on wireless communication technology identification.

[0112] Among them, identifying device model information based on the device model identifier (such as the device model) is that the IoT server queries the device model identifier in a pre-configured database based on the device model identifier to obtain the device model information. Among them, some manufacturers have fixed device identifier generation rules for device model identifiers. The device model identifier can be obtained by parsing the device identifier based on these rules; some manufacturers will store the device identifier in advance and associate the device model identifier with the device model identifier when storing it in the database. In this way, the device type identifier can be obtained through the device identifier, and then the device type identifier can be used to query the device model identifier.

[0113] Identifying the device model information based on the device identifier (such as the device identification code) is that the Internet of Things server queries the device identifier in a pre-configured database through the device identifier to obtain the device model information.

[0114] The device model information is identified based on the wireless communication technology identifier through the WiFi module. Some manufacturers' WiFi modules cannot obtain device model information. Only the WiFi identifier corresponding to the WiFi module can be obtained. The mapping relationship between device model information and WiFi identifier is imported into the IoT server in advance, and the device model information can be queried based on the WiFi identifier.

[0115] Identifying device model information based on the Bluetooth identifier is for the case where the Bluetooth identifier is too long and the complete Bluetooth identifier cannot be broadcast in the Bluetooth broadcast packet. The mapping code of the characteristic value part in the Bluetooth identifier can be defined, and the Internet of Things server obtains the first characteristic value based on the characteristic value code query, and then splices the other part of the second characteristic value to form the Bluetooth identifier. For example: the Bluetooth identifier is composed of A (such as a 24-bit characteristic value and B (such as a 12)-bit MAC. At this time, a unique characteristic value code starting from 1 is given to the characteristic value. The Internet of Things server can find the first characteristic value based on this characteristic value code. Afterwards, the Internet of Things server splices the second characteristic value (such as the continuous 12-bit characters in the MAC of the mobile terminal, or the continuous 12-bit characters in the MAC of the Bluetooth module) after the first characteristic value to obtain the Bluetooth identifier. Afterwards, the Internet of Things server queries the pre-configured database according to the Bluetooth identifier based on the Bluetooth identifier to obtain the device model information.

[0116] In some embodiments, the WiFi ID definition rule is as follows: To distinguish product information, the WiFi ID begins with the product model number (featureCode) of the first target number of digits, such as 24. The featureCode is then followed by the MAC address of the WiFi module of the second target number of digits, such as 12. This yields the WiFi ID (if the first target number of digits is 24 and the second target number of digits is 12, the WiFi ID is 36 bits long).

[0117] For example: the WiFi ID is "86100c00fffe00600000004038640773889c", where the featureCode is "86100c00fffe006000000040" and the MAC is "38640773889c".

[0118] BLE ID definition rules: To distinguish devices from other manufacturers, the BLE ID begins with the target identifier, such as "HIS-." The target identifier is followed by the last N digits of the WiFi ID. For example, if the WiFi ID is "86100c00fffe00600000004038640773889c," where N is 4, the BLE ID can be determined to be "HIS-889c."

[0119] In some embodiments, in combination with FIG7 , as shown in FIG9 , after executing the above step S142 to determine whether the network identifier corresponding to the theoretical identifier indicates that the device supports the Internet of Things function, if it is detected that the device does not support it, the device control method provided in the embodiment of the present disclosure may execute the following step S17:

[0120] S17: Delete the smart device corresponding to the actual identifier.

[0121] In some embodiments, at least one smart device is displayed in the device list, and the device model information that needs to be displayed for each smart device includes at least a device icon, a device name, and a device model.

[0122] In some embodiments, the device icon is an actual product image corresponding to the smart device, such as a main view.

[0123] Furthermore, since the aforementioned smart devices, such as televisions and refrigerators, can be controlled by electronic devices such as the mobile terminal 300 to power on, shut down, adjust operations, and other commands, users typically need to bind the smart device to the electronic device when controlling the smart device through the electronic device. During this process, the user needs to manually retrieve the currently available smart devices and select the smart device to be added for binding. However, due to differences in user familiarity with products, users often encounter the problem of being unable to find the currently available smart devices when adding smart devices.

[0124] In view of this, the embodiments of the present disclosure can obtain at least two addable smart devices in the current environment through target protocols based on a start-up operation triggered by a first application on the mobile terminal when no binding relationship has been established between the smart device and the mobile terminal. The target protocols include LAN protocol, Bluetooth protocol, and Digital Living Network Alliance protocol.

[0125] The first application then deduplicates the smart devices bound to the current account and at least two smart devices that can be added in the current environment to obtain the addable smart devices. If no other preset pop-up windows are currently displayed and the currently displayed page is the target page, the first application displays a device list pop-up window on the target page. The device list pop-up window includes every addable smart device. This allows the user to view the smart devices currently to be added in the device list pop-up window displayed on the target page, such as the homepage, and perform the corresponding addition operation.

[0126] For ease of understanding, as shown in Figure 1, if the smart device 200 and the mobile terminal 300 have not yet established a binding relationship, the user can open the first application on the mobile terminal 300. At this time, the first application responds to the startup operation and obtains the smart devices that can be added in the current environment through the target protocol. The target protocol includes the local area network protocol, the Bluetooth protocol, and the Digital Living Network Alliance protocol. The first application then generates a display list based on the smart devices;

[0127] The display list may include one or more smart devices. When the first application determines that no other preset pop-up windows are currently displayed and the currently displayed page is the target page, the first application displays a device list pop-up window according to the display list on the target page. In this way, the user can view the smart device 200 currently to be added in the device list pop-up window displayed on the target page, such as the homepage, and perform the corresponding addition operation.

[0128] Therefore, when the user needs to add a smart device, he only needs to open the first application installed on the electronic device (i.e., the mobile terminal 300) to view the smart devices that can be added in the current environment on the target page, without the user having to manually obtain the smart devices that can be added.

[0129] In view of this, the present disclosure provides a device control method as shown in FIG10 , including the following steps S21-S23:

[0130] S21. Obtain smart devices that can be added to the current environment through a target protocol, wherein the target protocol includes a local area network protocol, a Bluetooth protocol, and a Digital Living Network Alliance (DLNA) protocol.

[0131] In some embodiments, the first application responds to the startup operation and uses the target protocol to send broadcast information. After receiving the broadcast information sent by the first application, the smart device reports configuration information to the first application; for example: when the target protocol is the Bluetooth protocol, the configuration information includes the media access control address (MAC) corresponding to the mobile hotspot module of the mobile terminal 300 and the Bluetooth identifier (code information of the Bluetooth module); when the target protocol is the local area network protocol, the configuration information includes the local area network identifier (code information of the WiFi module).

[0132] In some embodiments, after the first application is started, the first application automatically discovers a first smart device, such as a TV, a speaker, or a game console, which is in the same local area network as the terminal device currently installed with the first application through the DLNA service. The first application automatically discovers a second smart device, such as a washing machine, a dryer, a dishwasher, etc., which is in the same local area network as the terminal device currently installed with the first application through the Bluetooth service and / or the local area network service.

[0133] It should be noted that the first application starts the DLNA service, Bluetooth service and LAN service immediately after the first application is started, and saves the new devices (such as the first smart device and / or the second smart device) discovered by the DLNA service, Bluetooth service and LAN service in the "Device Update Subunit" of the first application. After waiting for the "Upgrade Detection Subunit" and "Guidance Detection Subunit" to complete the detection, it will start to actively notify the outside of the changes in the device list pop-up window.

[0134] In some embodiments, the processing unit further includes a device update subunit, an upgrade detection subunit, a boot detection subunit, and a home page Tab manager.

[0135] In which, after the first application is started, the upgrade detection subunit detects the version information, such as: the detection information carrying the current version information sent by the first application to the Internet of Things server. After receiving the detection information sent by the first application, the Internet of Things server determines whether there is new version information. When there is new version information, the Internet of Things server sends the upgrade information to the terminal device on which the first application is installed. After the upgrade detection subunit of the first application receives the upgrade information sent by the Internet of Things server, it adds an upgrade pop-up window to the home page Tab manager. When the home page Tab manager determines that the upgrade pop-up window needs to be displayed, it initializes the PageStatus to the unstarted state. PageStatus includes pop-up label attributes (upgrade, guide) and display status (not started, displaying, and ended). The upgrade pop-up window is inserted into pageList. In which, pageList is initialized to an empty list. The home page Tab manager determines that the current home page is the target page (such as the home page identifier indicates that the current home page is the homepage), displays the upgrade pop-up window on the target page, and at the same time, the home page Tab manager sends an indication that the upgrade pop-up window has been displayed to the upgrade detection subunit. Afterwards, the upgrade detection subunit responds to the closing operation of the upgrade pop-up window by sending an indication message of pop-up window closure to the home page Tab manager. The home page Tab manager takes out the corresponding PageStatus in the pageList and modifies the display status to "ended". Or when the home page display changes, or the home page identifier changes, or the device update subunit determines that the display list sends a change, the home page Tab manager determines that the current page is not the target page, and does not take any action. The home page Tab manager determines that the current page is the target page, and the display status of the pop-ups in the pageList are all "ended", and deviceListshowed is all false, and there is a display list that can be displayed, then it will be displayed in the device list pop-up window according to the display list. The home page Tab manager determines that the current page is the target page, and the display status of the pop-ups in the pageList is not all "ended", and there is a pop-up window being displayed, then it will continue to display the pop-up window. The home page Tab manager determines that the current page is the target page, and the display status of the pop-ups in the pageList is not all "ended", and there is a pop-up window being displayed, then it will remove the next display pop-up window in the pageList for display. If the Home Tab Manager determines that the current page is not the target page, no action will be taken. If the Home Tab Manager determines that the current page is the target page, and the display status of the pop-up windows in pageList are all "ended", and deviceListshowed is not all false, the Home Tab Manager notifies the device update sub-unit to continue obtaining the display list.

[0136] The Home Tab Manager determines that the current page is not the target page and does not take any action. The Home Tab Manager determines that the current page is the target page and the display status of the pop-up windows in pageList are all "ended", and deviceListshowed is all false, and there is no display list to display, so it continues to wait.

[0137] It should be noted that the process of guiding the detection sub-unit to display and close the user guidance pop-up window is similar to the process of upgrading the detection sub-unit to display and close the upgrade pop-up window, which will not be repeated here.

[0138] In some embodiments, since the Bluetooth service and the LAN service may discover the same smart device, it is necessary to deduplicate the acquired smart devices. For example, if the second smart device has been networked (i.e., the second smart device can establish a communication connection with the LAN), then the second smart device can be discovered not only through the Bluetooth protocol, but also through the LAN protocol. Therefore, the same smart device can be discovered as two devices, one is a smart device discovered by the LAN service, and the other is a smart device discovered by the Bluetooth service. However, when actually displayed in the device list pop-up window, it is necessary to give priority to presenting the user with the smart devices discovered by the LAN service and filter out the same smart devices discovered by the Bluetooth service. Therefore, it involves the problem of deduplication of discovered devices.

[0139] In some embodiments, the content of the broadcast packet of the smart device discovered by the local area network service or the smart device discovered by the Bluetooth service is as shown in Table 1:

[0140] Table 1

[0141] Among them, the wifiId definition rules of the wifi module are:

[0142] To distinguish product information, the Wi-Fi ID begins with the product model number (featureCode) with the first target number of digits, for example, if the first target number of digits is 24. The Wi-Fi ID is then derived by appending the MAC address of the Wi-Fi module with the second target number of digits, for example, if the second target number of digits is 12. (If the first target number of digits is 24 and the second target number of digits is 12, the Wi-Fi ID is 36 bits long.)

[0143] For example, the wifiId is "86100c00fffe00600000004038640773889c", the featureCode is "86100c00fffe006000000040", and the MAC address is "38640773889c".

[0144] The local_name definition rules of the Bluetooth module are:

[0145] To distinguish devices from other manufacturers, local_name begins with the target identifier, such as "HIS-".

[0146] After that, continue to splice the last N digits of the wifiId corresponding to the wifi module after the target identifier. For example, if the wifiId is "86100c00fffe00600000004038640773889c", N is equal to 4. At this time, it can be determined that local_name is "HIS-889c".

[0147] S22: Generate a display list based on the smart device; wherein the display list includes one or more smart devices.

[0148] In some embodiments, based on the actual identifier in the reported information reported by the smart device, a query can be performed in the device category list to determine whether there is a theoretical identifier that is identical to the actual identifier, and the network identifier corresponding to the theoretical identifier that is identical to the actual identifier is used to indicate that the smart device supports the Internet of Things function. Based on the configuration information of the smart device corresponding to the actual identifier, when device model information is obtained, a display list is generated based on the device model information. The device model information includes at least a device icon, a device name, and a device model, and the display list includes the smart device corresponding to each device model information.

[0149] In some embodiments, when the number of smart devices that can be added to the current environment obtained through the target protocol is greater than or equal to 2, it is necessary to deduplicate the addable smart devices to obtain a display list. For example, when deduplicating the smart devices bound to the current account and the at least two smart devices that can be added to the current environment, since there is a problem of re-acquiring the smart devices obtained through the Bluetooth protocol and the smart devices obtained through the local area network protocol, the smart devices obtained through the local area network protocol and the Bluetooth protocol can be deduplicated first to obtain deduplicated smart devices; then, the deduplicated smart devices and the smart devices obtained through the Digital Life Network Alliance protocol are merged to obtain merged smart devices. Since there are smart devices in the merged smart devices that are bound to the current account currently logged in by the first application, it is necessary to deduplicate the smart devices bound to the current account and the merged smart devices to obtain the smart devices that can be displayed. Afterwards, based on the displayable smart devices, a display list containing each displayable smart device is generated, such as deleting the smart devices in the merged smart devices that are identical to the smart devices bound to the current account (such as the same device identification code used to uniquely identify the smart device), thereby obtaining the displayable smart devices.

[0150] S23. If no other preset pop-up window is currently displayed and the currently displayed page is the target page, a device list pop-up window is displayed in the target page according to the display list.

[0151] In some embodiments, the display conditions of the device list pop-up window include:

[0152] 1. The device list pop-up window is displayed only once during the lifecycle of the first app (after launch and before the background process is killed). For example, after the first app is launched, a display flag is recorded. For example, the default value of deviceListShowed is false. After the device list pop-up window is displayed on the target page, the default value of the display flag is set to true. The next time the target page is displayed again, the device list pop-up window will not be displayed.

[0153] 2. The first application loads successfully on the target page and is displayed on the top layer. For example, if the target page fails to load, the device list pop-up window will not be displayed even if there are devices that can be displayed in the current device list pop-up window. The device list pop-up window will only be displayed when the currently displayed top layer page is the target page.

[0154] 3. There are currently smart devices that can be added; when the number of smart devices that can be added is greater than 1, the device list pop-up window will be displayed.

[0155] In some embodiments, the target page may be a home page.

[0156] In some embodiments, in response to a startup operation, the first application first displays a startup page as shown in FIG11, and then enters a set home page, such as the home page. The first application includes at least one home page. For example, the first application includes four home pages, namely, home page 1 as shown in FIG12, home page 2 as shown in FIG13, home page 3 as shown in FIG14, and home page 4 as shown in FIG15. When the user sets home page 1 as the home page, the first application first enters the startup page as shown in FIG11, and then enters the home page as shown in FIG12, in response to the startup operation.

[0157] In some embodiments, a homepage corresponds to a tab page. The homepage is the first tab page of the homepage (i.e., the page displayed after the first application is launched and the startup page is displayed). Pop-ups may be displayed on the homepage, such as the upgrade pop-up window 3-1, the user guidance pop-up window 4-1, and the device list pop-up window 5-1. Only one pop-up window can be displayed at a time.

[0158] In some embodiments, the display priority of the pop-up window includes the priority of the upgrade pop-up window being greater than the priority of the user guidance pop-up window, and the priority of the user guidance pop-up window being greater than the priority of the device list pop-up window.

[0159] In some embodiments, because the first application uses hybrid stack routing management, the tab pages include two forms: Flutter pages (such as Home 1, Home 4, etc.) and Native pages (such as Startup Page, Home 2, Home 3, etc.). If the pop-ups are displayed according to priority, it is necessary to ensure that the high-priority pop-ups do not exist or are closed before displaying the subsequent pop-ups. Therefore, when displaying the device list pop-up, it is necessary to ensure that the upgrade pop-up and the user guidance pop-up are closed.

[0160] From the above, it can be seen that by adopting the device control method provided by the present invention, when a user needs to add a smart device, the user only needs to open the first application installed on the terminal device, and can then check the smart devices that can be added in the current environment on the target page. The user does not need to manually obtain the smart devices that can currently be added, thereby avoiding the problem that different users have different proficiency in using terminal devices, which often causes users to be unable to find the smart devices that can currently be added when adding smart devices.

[0161] In some embodiments, as shown in FIG16 in combination with FIG10 , the above S22 can be specifically implemented through the following S220 - S222 .

[0162] S220 , performing deduplication processing on the smart devices obtained respectively by the local area network protocol and the Bluetooth protocol to obtain deduplicated smart devices.

[0163] S221. Obtain a merged smart device based on the deduplicated smart devices and the smart devices obtained through the Digital Living Network Alliance protocol.

[0164] S222: De-duplicate the smart devices bound to the current account and the merged smart devices to generate a display list.

[0165] In some embodiments, for some scenarios where the accuracy of deduplication is not high, it is possible to determine whether the smart device discovered by the Bluetooth service and the smart device discovered by the LAN service are the same smart device by using local_name and wifiId. For example, in combination with the example given in S21 above, deduplication is performed using the last 4 digits of local_name and the last 4 digits of wifiId. If the last 4 digits of local_name and the last 4 digits of wifiId are equal, it means that the smart device discovered by the Bluetooth service and the smart device discovered by the LAN service are the same smart device. In this case, the smart device discovered by the LAN service is retained, the smart device discovered by the Bluetooth service is deleted, and the retained smart device discovered by the LAN service is used as the deduplicated smart device.

[0166] In some embodiments, a 4-digit hexadecimal number can enumerate up to 65,536 devices. Therefore, when determining whether a smart device discovered by the Bluetooth service and a smart device discovered by the LAN service are the same smart device using local_name and wifiId, the last 4 digits of local_name and wifiId may be the same, but the smart device discovered by the Bluetooth service and the smart device discovered through the LAN service are two different devices. This can lead to the problem of incorrectly filtering out the smart devices discovered through the Bluetooth service. Therefore, the device control method provided in the embodiments of the present disclosure deduplicates smart devices discovered by the Bluetooth service and smart devices discovered by the LAN service using one or more of the category information, media access control address, and network configuration information, thereby ensuring the accuracy of deduplication.

[0167] In some embodiments, as shown in FIG17 in combination with FIG16 , the above S220 may be specifically implemented through the following S2200 and S2201 .

[0168] S2200: Acquire target information of the smart device obtained by the local area network protocol and the Bluetooth protocol respectively.

[0169] S2201: Deduplication is performed on smart devices obtained by the LAN protocol and the Bluetooth protocol based on target information to obtain deduplication smart devices, wherein the target information includes any one of a media access control address or configuration information corresponding to the mobile hotspot module.

[0170] In some embodiments, the target information includes a media access control address corresponding to the mobile hotspot module; in combination with FIG. 17 , as shown in FIG. 18 , the above S2201 can be specifically implemented through the following S2210 and S2211 .

[0171] S2210: Acquire Bluetooth information reported by each smart device using a Bluetooth protocol; wherein the Bluetooth information includes information added to indicate a media access control address;

[0172] S2211. When the media access control address and Bluetooth information corresponding to the mobile hotspot module are the same, delete the smart device obtained by the first protocol, retain the smart device obtained by the second protocol, and use the retained smart device obtained by the second protocol as the deduplicated smart device; wherein the first protocol includes any one of the local area network protocol and the Bluetooth protocol, and the second protocol includes any one of the local area network protocol and the Bluetooth protocol except the first protocol.

[0173] In some embodiments, the retained smart devices obtained using the second protocol are used as deduplicated smart devices.

[0174] In some embodiments, for ease of understanding, assume that the smart device discovered through the Bluetooth service (e.g., referred to as the Bluetooth device) is B_1, and the smart device discovered through the LAN service (e.g., referred to as the LAN device) is W_1. The unique MAC identifier of the Wi-Fi module is used to verify that the smart device discovered by the Bluetooth service and the smart device discovered by the LAN service are the same smart device. This solution relies on the Wi-Fi module MAC reported by the Bluetooth device during broadcasting.

[0175] In some embodiments, in conjunction with the example given in Table 1, the process for a Bluetooth device to obtain the MAC address of a Wi-Fi module is as follows: When the first M bits of the manufacturer_data information in the advertising packet reported by the Bluetooth device are ≥ 128 (e.g., M is 2), the Bluetooth device is deleted and the LAN device is retained. When the first two bits of the manufacturer_data information in the advertising packet reported by the Bluetooth device are less than 128, such as the "manufacturer_data" information in the advertising packet of B_1 is "40007638640773889c", the first two bits "40" in "40007638640773889c" are converted to decimal 64. Since 64 < 128, it indicates that the smart device supports MAC resolution. The MAC address length is then determined by comparing the first two bits of the "manufacturer_data" information in the broadcast packet with a preset threshold (e.g., 64). For example, if the first two bits of the "manufacturer_data" information in the broadcast packet are ≥ 64, the MAC address length is determined to be 12. If the first two bits of the "manufacturer_data" information in the broadcast packet are < 64, the MAC address length is determined to be 8. For example, if the "manufacturer_data" information in the broadcast packet is "40007638640773889c," the first two bits "40" in "40007638640773889c" are converted to decimal 64. Since 64=64, the MAC address length is 12. Then, based on the address length, characters of the address length are truncated from the "manufacturer_data" information in the broadcast packet content as the MAC (the characters after the address length in the "manufacturer_data" information in the broadcast packet content are taken). For example, if the "manufacturer_data" information in the broadcast packet content is "40007638640773889c", the characters starting from the last character "c" are truncated forward with a step length equal to the address length as the MAC, that is, the MAC is "8640773889c".

[0176] Afterwards, the process of the LAN device obtaining the MAC of the wifi module is as follows: As can be seen from Table 1, the definition rule of wifiId stipulates that the last 12 of wifiId are the MAC of the wifi module. Since the length of the MAC of the wifi module obtained by the Bluetooth device is dynamic, the length of the MAC of the wifi module obtained by the Bluetooth device is compared with 12. When the length of the MAC of the wifi module obtained by the Bluetooth device is greater than or equal to 12, the characters with a step length of 12 are intercepted from the last character of wifiId as the MAC. When the length of the MAC of the wifi module obtained by the Bluetooth device is less than 12, the characters with a step length equal to the length of the MAC of the wifi module obtained by the Bluetooth device are intercepted from the last character of wifiId as the MAC. In some embodiments, combined with the numbers given above, the length of the MAC of the wifi module obtained by B_1 is 12, and the length of the MAC of the wifi module obtained by W_1 is 12, and the minimum value of the two is 12.

[0177] Assume that W_1's wifiId is "86100c00fffe00600000004038640773889c." Here, the MAC is obtained by truncating the characters starting from the last character c with a step length of 12, that is, the MAC is "8640773889c." Next, the MAC of the wifi module obtained by the Bluetooth device is compared with the MAC of the wifi module obtained by the LAN device. If the MAC of the wifi module obtained by the Bluetooth device and the MAC of the wifi module obtained by the LAN device are the same, it indicates that the Bluetooth device and the LAN device are the same device. The Bluetooth device can be deleted, and the LAN device can be retained. The retained LAN device is used as the deduplicated smart device. If the MAC of the wifi module obtained by the Bluetooth device and the LAN device are different, it indicates that the Bluetooth device and the LAN device are different devices. Therefore, both need to be retained. That is, the retained Bluetooth device and LAN device are used as the deduplicated smart device.

[0178] In some embodiments, the target information includes configuration information, and the configuration information includes category information to which the smart device belongs; in combination with FIG. 17 , as shown in FIG. 19 , the above S2201 can be specifically implemented through the following S2212.

[0179] S2212. When there are smart devices with the same category information, delete the smart devices obtained by the third protocol, retain the smart devices obtained by the fourth protocol, and use the retained smart devices obtained by the fourth protocol as the deduplicated smart devices; wherein the third protocol includes any one of the local area network protocol and the Bluetooth protocol, and the fourth protocol includes any one of the local area network protocol and the Bluetooth protocol except the first protocol.

[0180] In some embodiments, the retained smart devices obtained using the fourth protocol are used as deduplicated smart devices.

[0181] In some embodiments, combined with the example given in S2211 above, the device control method provided by the embodiments of the present disclosure can also perform deduplication using the category information to which the Bluetooth device belongs and the category information to which the LAN device belongs. For example, the category information corresponding to B_1 is a washing machine, and the category information corresponding to W_1 is an air conditioner. Since the category information of the two is different, it is necessary to retain both the Bluetooth device and the LAN device, that is, the retained Bluetooth device and LAN device will be used as the deduplicated smart devices.

[0182] In some embodiments, when the first application is launched, it obtains the current category data and persists it to the terminal device's memory. Each time the first application is launched, it detects whether the locally stored category data needs to be updated. For example, the first application sends an update request to the IoT server containing the update date of the current category data. The IoT server determines that no new category data exists after the update date and sends a non-update indication to the terminal device. Based on this indication, the terminal device no longer updates the category data for the current time. The category data includes category information, Bluetooth module code information, WiFi module code information, etc.

[0183] Assume the smart device is a "range hood." The corresponding category code for this smart device is "connector.device.type.greasepump," the Bluetooth module code is "23," and the Wi-Fi module code is "35." The Bluetooth module code or the Wi-Fi module code can be used to uniquely match the corresponding category code. For example, based on the example in Table 1 above, the "service_data" corresponding to B_1 is "0202040f000000," where each two bits correspond to a hexadecimal value. Take bits 3 and 4 of "service_data," for example, "02." Get the hType field corresponding to W_1, for example, "2." Pad the leading digits of hType to the target length. If the target length is 2, the Wi-Fi module code is "02." Then, search the category data for the Bluetooth module code "23" and find that the corresponding category code is "connector.device.type.fridge." The code information "02" of the WiFi module is queried in the category data, and the code information of the category information corresponding to the code information "02" of the WiFi module is obtained as "connector.device.type.fridge".

[0184] Afterwards, when the code information of the category information corresponding to the code information of the Bluetooth module is the same as the code information of the category information corresponding to the code information of the WiFi module, it means that the Bluetooth device and the LAN device are the same smart device. Therefore, the Bluetooth device can be deleted, the LAN device can be retained, and the retained LAN device can be used as the deduplicated smart device. When the code information of the category information corresponding to the code information of the Bluetooth module is different from the code information of the category information corresponding to the code information of the WiFi module, it means that the two are not the same smart device. At this time, both need to be retained, that is, the retained Bluetooth device and LAN device will be used as the deduplicated smart devices.

[0185] In some embodiments, the target information includes configuration information, the configuration information includes network configuration information, and the network configuration information includes any one of configured network and unconfigured network; combined with Figure 17, as shown in Figure 20, the above S2201 can be specifically implemented through the following S2213 and S2214.

[0186] S2213. When the network configuration information of the smart device obtained through the Bluetooth protocol indicates that the smart device is not network configured, retain the smart device whose network configuration information indicates that the smart device is not network configured, and use the retained smart device whose network configuration information indicates that the smart device is not network configured as the deduplicated smart device.

[0187] S2214: When the network configuration information of the smart device obtained through the Bluetooth protocol indicates that the smart device has been configured, delete the smart device whose network configuration information indicates that the smart device has been configured.

[0188] In some embodiments, the retained network configuration information of the unconfigured smart devices is used as the deduplicated smart devices.

[0189] In some embodiments, combined with the example given in S2211 above, the device control method provided by the embodiments of the present disclosure can use the network configuration information of the smart device to determine whether the Bluetooth device and the local area network device are the same smart device, because the smart device cannot be discovered by the local area network service when it is not networked.

[0190] In some embodiments, the first application can determine network configuration information based on the "service_data" field in the broadcast packet reported by B_1. For example, if "service_data" is "0202040f000000," where each two bits correspond to a hexadecimal value, the first application extracts bits 5 and 6 of "service_data" and finds the value "01." The first application then converts "01" to an 8-bit binary value, "00000100," and extracts bits 4 through 6, "001," from "00000100."

[0191] Among them, "000" indicates that the network configuration information is not configured; "001" indicates that the network configuration information is configured.

[0192] When the network configuration information is not configured, it means that the smart device has not been connected to the network, so the Bluetooth device needs to be retained. When the network configuration information is configured, it means that the smart device has been connected to the network, so the Bluetooth device can be deleted.

[0193] In some embodiments, as shown in FIG21 in combination with FIG16 , the above S222 can be specifically implemented through the following S2220 .

[0194] S2220: Delete the smart devices bound to the current account from the merged smart devices to obtain addable smart devices.

[0195] In some embodiments, if a device is found that has already been bound to the current account, the device is removed from the homepage device list to avoid the user's home bound devices repeatedly popping up every time the user starts up the device, which affects the user experience.

[0196] In some embodiments, the device list pop-up window also includes an ignore control for not displaying within a preset time, and one smart device corresponds to one ignore control; combined with Figure 10, as shown in Figure 22, the device control method provided in the embodiment of the present disclosure also includes: S24.

[0197] S24. In response to the selection operation of the ignore control, the smart device corresponding to the ignore control is deleted from the device list pop-up window, and the smart device corresponding to the ignore control is no longer displayed in the device list pop-up window displayed within a preset time.

[0198] In some embodiments, each time the first application is started, a pop-up window with a list of devices that meet the conditions will automatically pop up. If the smart device found in the device list pop-up window is a neighbor's TV, or a smart device that the user does not want to bind, the user experience will be affected if the smart device continues to be displayed in the device list pop-up window each time the first application is started. Therefore, the device control method provided in the embodiment of the present disclosure is to optimize this problem and provide the user with an entry to ignore the smart device. The user can ignore all or ignore a single device with one click. The first application locally records the device ignore mark as a basis for whether the device is displayed in the device list next time.

[0199] In some embodiments, in conjunction with the homepage 5 shown in FIG15 , the user can select the smart device to be added in the device list pop-up window 5-1 displayed on the homepage 5. For example, when the user needs to add the refrigerator RDDDEE-af(b888b), the user can select the add control 5-1-1 corresponding to the refrigerator RDDDEE-af(b888b), thereby adding the refrigerator RDDDEE-af(b888b) to the AAA home. Alternatively, when the user no longer needs to display the refrigerator RDDDEE-af(b888b) in the device list pop-up window, the user can select the ignore control 5-1-2 corresponding to the refrigerator RDDDEE-af(b888b), thereby no longer displaying the refrigerator RDDDEE-af(b888b) in the device list pop-up window.

[0200] In some embodiments, to prevent the user from ignoring a smart device in the device list pop-up window and then needing to display the smart device in the device list pop-up window again, the first application can periodically (e.g., once a month) prompt the user whether to display the smart device in the device list pop-up window.

[0201] In some embodiments, in combination with FIG10 , as shown in FIG23 , the above S23 may be specifically implemented through the following S230 - S232 .

[0202] S230: Obtain the priority of the category to which each addable smart device belongs.

[0203] S231. Sort the addable smart devices in descending order of priority to obtain a display order.

[0204] S232: If no other preset pop-up window is currently displayed and the currently displayed page is the target page, the addable smart devices are displayed in the device list pop-up window displayed on the target page in the order in which they are displayed.

[0205] In some embodiments, since there are differences in the shipping quantities corresponding to different categories, in order to improve the user experience, the device control method provided in the embodiments of the present disclosure sorts the categories to which the smart devices displayed in the device list pop-up window belong based on the shipping quantities corresponding to different categories, thereby ensuring the order of display of the smart devices displayed in the device list pop-up window.

[0206] In some embodiments, the priority of the first smart device is greater than the priority of the second smart device.

[0207] In some embodiments, smart devices of the same priority are displayed in the device list pop-up window in ascending order of discovery time.

[0208] Furthermore, considering that most current smart IoT modules offer multiple network configuration methods, they address the industry's current trend of relying heavily on a single network configuration method for a specific technology or operation path. Currently, most modules support both Bluetooth and Wireless Access Point (AP) network configuration modes, entering different technical interaction processes based on the user's mobile phone operating status.

[0209] The electronic device of the disclosed embodiment may also predetermine whether a Bluetooth broadcast packet of the smart device to be networked is scanned within a preset time period during the network configuration phase; if not, while keeping Bluetooth scanning enabled, detect whether there is an AP network generated by the smart device to enter the AP network configuration process, and execute the network configuration of the smart device based on the AP network configuration process; before sending network configuration information to the smart device through the AP connection between the electronic device and the smart device, if a Bluetooth broadcast packet sent by the smart device is scanned, stop the AP network configuration process; establish a Bluetooth connection with the smart device based on the Bluetooth broadcast packet sent by the smart device to enter the Bluetooth network configuration process, and execute the network configuration of the smart device based on the Bluetooth network configuration process. The preset time period can be determined according to actual needs and is not limited here.

[0210] In the above process, when pairing the smart device with a network, Bluetooth pairing is preferred. However, if no Bluetooth broadcast packet sent by the smart device is detected within a preset time, while continuing to detect the Bluetooth broadcast packet sent by the smart device, the system detects whether there is an AP network generated by the smart device to enter the AP pairing process (if no Bluetooth broadcast packet is detected after a timeout, the system automatically switches from the Bluetooth pairing mode to the AP pairing mode, but at the same time maintains scanning for Bluetooth broadcast packets). Before the AP pairing process is executed to the point where the network pairing information is sent to the smart device through the AP connection, if a Bluetooth broadcast packet sent by the smart device is scanned, the AP pairing process is stopped, a Bluetooth connection is established based on the Bluetooth broadcast packet sent by the smart device, and then the Bluetooth pairing process is entered (i.e., switching from the AP pairing mode to the Bluetooth pairing mode). In this way, the smart device is paired with a network based on the Bluetooth pairing process. Since the Bluetooth pairing mode has simpler steps and a higher success rate, the system switches to the Bluetooth pairing mode when a Bluetooth broadcast packet is detected during the AP pairing process, thereby improving the success rate of pairing the smart device with a network.

[0211] In some embodiments, the AP network generated by the smart device can be an AP network generated by the WiFi module of the smart device. The WiFi module of the smart device includes a wireless module called soft AP (Soft-AP). The specific hardware part of the soft AP is a standard wireless network card, but the soft AP uses a driver to enable the soft AP to provide the same signal switching, routing and other functions as the AP.

[0212] It should be noted that for electronic devices with different operating systems, the above process of detecting whether there is an AP network generated by the smart device and establishing an AP connection may be the same or different. The specific process can be determined based on actual conditions and is not limited here.

[0213] For an electronic device whose operating system is an Android system, the process of detecting whether an AP network generated by the smart device exists and establishing an AP connection may specifically include: detecting whether the AP network is currently connected; if the AP network is currently connected, detecting whether the WiFi name of the currently connected AP network begins with a preset mark; if the WiFi name of the currently connected AP network begins with the preset mark, ending;

[0214] If the WiFi name of the currently connected AP network does not begin with a preset tag, or if no AP network is currently connected, scan nearby AP networks to detect whether there is an AP network with a WiFi name beginning with a preset tag among at least one of the currently scanned AP networks. After filtering based on the LAN identification code, it can be determined how many AP networks with WiFi names beginning with a preset tag exist among the at least one previously scanned AP network. If there is an AP network with a WiFi name beginning with a preset tag among at least one of the AP networks (the AP network is an AP network generated by the smart device), the AP network is automatically connected, that is, the electronic device establishes an AP connection with the smart device;

[0215] If there are multiple AP networks whose WiFi names start with a preset tag in at least one AP network (the multiple AP networks include the AP network generated by the smart device), the identifiers of the multiple AP networks are displayed on the electronic device (that is, the AP list is displayed, and the AP list includes the identifiers of the multiple AP networks) for the user to select, and then the AP network selected by the user is connected, that is, the electronic device establishes an AP connection with the smart device; if there is no AP network whose WiFi name starts with a preset tag in at least one AP network, a reminder message is output to prompt the user to go to the settings page of the electronic device to select the required AP network for connection, and then return to the APP to determine whether the WiFi name of the currently connected AP network starts with the preset tag.

[0216] When the WiFi name of the currently connected AP network begins with a preset mark, it is determined that the currently connected AP network is the AP network of the smart device.

[0217] For an electronic device whose operating system is iOS, the above-mentioned process of detecting whether there is an AP network generated by the smart device and establishing an AP connection may specifically include: detecting whether the AP network is currently connected; if the AP network is currently connected, detecting whether the WiFi name of the currently connected AP network starts with a preset tag; if the WiFi name of the currently connected AP network starts with a preset tag, then ending; if the WiFi name of the currently connected AP network does not start with a preset tag, or if the AP network is not currently connected, outputting a reminder message to prompt the user to go to the phone settings page and select an AP network whose WiFi name starts with a preset tag for connection, and then returning to the APP to end.

[0218] Among them, the AP network whose WiFi name begins with a preset mark, that is, the AP network generated by the electronic device that needs to be networked. The smart device is an electronic device that needs to be networked. Therefore, the WiFi name of the AP network generated by the smart device begins with a preset mark.

[0219] The preset mark can be determined according to actual conditions and is not limited here. The preset mark can be "HIS", where "HIS" represents a pre-agreed device type.

[0220] The following describes the more commonly used AP network configuration process:

[0221] S401: Establish an AP connection between the electronic device and the smart device.

[0222] The above S401 may include the following S401a and S401b.

[0223] S401a: The electronic device connects to the AP network generated by the smart device.

[0224] S401b: The electronic device establishes a communication channel with the smart device by opening a protocol stack.

[0225] In the embodiment of the present disclosure, the protocol stack is a private connection protocol, specifically referring to establishing a communication channel between the electronic device and the smart device through the private protocol.

[0226] Start the protocol stack and determine whether it is successfully started. If the protocol stack fails to start within a timeout, retry a preset number of times (usually 3 times). If each retry still fails to start the protocol stack within a timeout, it is determined that the network configuration has failed. The reason for the network configuration failure is that the protocol stack failed to start. If the protocol stack is successfully started, enter the device to determine whether the electronic device supports the preset protocol.

[0227] S402: Determine whether the smart device supports a preset protocol.

[0228] The preset protocol may be a private directory 8 protocol or other protocols, which are not limited here.

[0229] It is understood that the electronic device of the present disclosure obtains a WiFi list and determines whether the smart device is online in different ways for smart devices that support the preset protocol and smart devices that do not support the preset protocol. Specifically, for a smart device that supports the preset protocol, the electronic device can obtain a first WiFi list searched by the smart device through steps S403 to S408 and determine whether the smart device is successfully online through step S412. For a smart device that does not support the preset protocol, the electronic device can obtain a second WiFi list searched by itself through step S414 and determine whether the smart device is successfully online through step S418.

[0230] If it is determined that the smart device is a device that supports the preset protocol, the following S403 is executed; if it is determined that the smart device is not a device that supports the preset protocol, the following S414 is executed.

[0231] S403: Send a message to the smart device to obtain device information.

[0232] S404: Determine whether a message for obtaining device information is successfully sent to the smart device.

[0233] Retry a preset number of times (usually 3 times). If each retry fails, it is determined that the network configuration has failed. The reason for the network configuration failure is that the device information cannot be sent. If the device information is successfully sent, the following S405 is executed.

[0234] S405: Determine whether the device information returned by the smart device is successfully received.

[0235] A timeout timer of a certain length (usually 20 seconds) is set, and a retry interval is set (e.g., retry once every 10 seconds). After success, the timer is removed and the following S406 is executed; if the timeout is unsuccessful, it is determined that the network configuration has failed, and the reason for the network configuration failure is that the device information has not been obtained.

[0236] S406: Send a message to the smart device to obtain the WiFi list.

[0237] S407: Determine whether the message for obtaining the WiFi list is successfully sent to the smart device.

[0238] Retry a preset number of times (usually 3 times). If each retry fails, it is determined that the network configuration has failed. The reason for the network configuration failure is that the WiFi list cannot be sent. If the WiFi list is successfully sent, the following S408 is executed.

[0239] S408: Determine whether the first WiFi list returned by the smart device is successfully received.

[0240] A timeout timer of a certain length (usually 20 seconds) is set, and a retry interval is set (e.g., 1 retry every 10 seconds). After success, the timer is removed, and the following S409 is executed; if the timeout is unsuccessful, it is determined that the network configuration has failed, and the reason for the network configuration failure is that the WiFi list has not been obtained.

[0241] S409: Based on the first WiFi list, send network configuration information to the smart device.

[0242] The network configuration information is the WiFi name and WiFi password of the target WiFi used by the smart device for network configuration. The target WiFi is a WiFi selected by the electronic device for the smart device from the first WiFi list. The first WiFi list includes at least one WiFi.

[0243] S410: Determine whether the network configuration information is written successfully.

[0244] Retry a preset number of times (usually 3 times). If each retry fails, it is determined that the network configuration has failed. The reason for the network configuration failure is the failure to send the network configuration information. If the network configuration information is successfully written, the following S411 is executed.

[0245] S411 , determining whether a callback indicating successful distribution network information delivery is received successfully.

[0246] A timeout timer of a certain length (usually 20 seconds) is set, and a retry interval is set (e.g., 1 retry every 10 seconds). After success, the timer is removed, and the following S412 is executed; if the timeout is unsuccessful, it is determined that the network configuration has failed, and the reason for the network configuration failure is the failure to send the network configuration information.

[0247] S412: The interface polls the device status.

[0248] The interface polls the device status and sends a query message to the smart device to check whether it is online. If a reply message indicating successful online status is received from the smart device, it means that the smart device is online, that is, the smart device has been successfully provisioned. If a reply message indicating unsuccessful online status is received from the smart device, the smart device is not online.

[0249] A timeout timer of a certain length (e.g., 60s) is set, and a retry interval (e.g., retry once every 3s) is set. After a success, the timer is removed and the following S413 is executed. If the timeout fails, the network configuration fails. The reason for the network configuration failure is that no device supporting the preset protocol is found online.

[0250] S413. Remind the user to connect back to the original router and bind electronic devices and smart devices to the cloud.

[0251] If the electronic device and smart device are successfully bound in the cloud, the network configuration is successful.

[0252] In the embodiment of the present disclosure, due to the AP network configuration process, the electronic device needs to connect to the AP network generated by the smart device. Therefore, in the above S412, if the electronic device communicates with the smart device and determines that the smart device is successfully online, the electronic device needs to disconnect the AP network generated by the connected smart device, connect back to the previously connected router, and then complete the network configuration by binding the electronic device and the smart device through the cloud.

[0253] If the smart device is a device that supports the preset protocol, the electronic device executes the AP network configuration process described in S403 to S413 above; if the smart device is not a device that supports the preset protocol, the electronic device executes the AP network configuration process described in S414 to S417 below.

[0254] S414: The electronic device obtains the second WiFi list searched by itself.

[0255] S415. Send network configuration information to the smart device.

[0256] The network configuration information is the WiFi name and WiFi password of the target WiFi used by the smart device for network configuration. The target WiFi is a WiFi selected by the electronic device for the smart device from the second WiFi list. The second WiFi list includes at least one WiFi.

[0257] S416: Determine whether the network configuration information is written successfully.

[0258] Retry a preset number of times (usually 3 times). If each retry fails, it is determined that the network configuration has failed. The reason for the network configuration failure is the failure to send the network configuration information. If the network configuration information is successfully written, the following S415 is executed.

[0259] S417: Determine whether the callback indicating that the distribution network information has been successfully sent is received.

[0260] A timeout timer of a certain length (usually 20 seconds) is set, and a retry interval is set (e.g., 1 retry every 10 seconds). After success, the timer is removed, and the following S416 is executed; if the timeout is unsuccessful, it is determined that the network configuration has failed, and the reason for the network configuration failure is the failure to send the network configuration information.

[0261] S418. Remind the user to connect back to the original router and monitor the device online.

[0262] After the electronic device is connected back to the original router, the electronic device monitors whether the smart device is online from the cloud. If the smart device is detected to be online, it is determined that the smart device is online. If the smart device is not detected to be online, the smart device is not online.

[0263] Set a timeout timer of a certain length (usually 20 seconds) and a retry interval (such as retry once every 10 seconds or retry once every 1 second). After success, remove the timer and execute the following S418. If the timeout fails, it is determined that the network configuration has failed. The reason for the network configuration failure is that no device that does not support the preset protocol was found online.

[0264] S419. Go to the cloud to bind electronic devices and smart devices.

[0265] If the electronic device and smart device are successfully bound in the cloud, the network configuration is successful.

[0266] According to the above-mentioned AP network configuration process, it can be seen that the AP network configuration process steps are relatively complex and time-consuming. Therefore, before the above-mentioned S409 or S415, if a Bluetooth broadcast packet sent by a smart device is detected, the AP network configuration process can be switched to the Bluetooth network configuration process, thereby simplifying the steps of smart device network configuration, reducing network configuration time, improving smart device network configuration efficiency, and increasing the success rate of smart device network configuration.

[0267] In some embodiments, the processor is further configured to: after entering the AP network configuration process and executing until the network configuration information is sent to the smart device through the AP connection, if the Bluetooth broadcast packet sent by the smart device is still not scanned, continue to execute the AP network configuration process to complete the network configuration of the smart device.

[0268] In some embodiments, when a Bluetooth broadcast packet sent by a smart device is scanned within a preset time period, the electronic device pairs the smart device through a Bluetooth network pairing process. The Bluetooth broadcast packet sent by the smart device that is not scanned within the preset time period may be a Bluetooth broadcast packet sent by any device that is not scanned within the preset time period (then the Bluetooth broadcast packet sent by the smart device must not be scanned); the Bluetooth broadcast packet sent by the smart device that is not scanned within the preset time period may also be a Bluetooth broadcast packet sent by at least one device that is scanned within the preset time period, but at least one device is not a smart device (at least one device identifier can be displayed to the user (a device identifier is used to indicate a device in at least one device), and then whether the at least one device includes a smart device is determined based on the user's selection. For example, if the user selects a device identifier from the at least one device identifier, the device indicated by the device identifier selected by the user is a smart device. If the user does not select any of the at least one device identifier, but chooses to continue scanning, it means that the at least one device does not include a smart device).

[0269] In some embodiments, after detecting whether there is an AP network generated by the smart device and before successfully establishing the AP connection, if at least one Bluetooth broadcast packet that has not been scanned before is scanned (hereinafter referred to as at least one first Bluetooth broadcast packet, which is not sent by the same device as the Bluetooth broadcast packet scanned within a preset time period), at least one first device identifier can be displayed to the user. Each first device identifier is used to indicate the device that sends a first Bluetooth broadcast packet. If the user selects a first device identifier from at least one first device identifier, the device indicated by the first device identifier is the smart device, and the AP network configuration process is switched to the Bluetooth network configuration process. If the user does not select any first device identifier from at least one first device identifier, but chooses to continue scanning, it means that the Bluetooth broadcast packet sent by the smart device has not been scanned yet.

[0270] In some embodiments, the above-mentioned display of at least one first device identifier can be a pop-up window displaying at least one first device identifier when displaying the AP network configuration process interface, or it can be switching the AP network configuration page to a Bluetooth network configuration page, and the Bluetooth network configuration page displays at least one first device identifier.

[0271] It is understood that after detecting the existence of an AP network generated by the smart device and before successfully establishing the AP connection, whether a Bluetooth advertising packet sent by the smart device has been scanned needs to be determined through user interaction. After confirming that a Bluetooth advertising packet sent by the smart device has been scanned through user interaction, Bluetooth scanning can be stopped, the AP network configuration process can be stopped, and the Bluetooth network configuration process can be entered.

[0272] In some embodiments, the processor is specifically configured to: after successfully establishing the AP connection and before sending network configuration information to the smart device through the AP connection, if a Bluetooth broadcast packet sent by the smart device is scanned, stop the AP network configuration process.

[0273] In some embodiments, after the AP connection is successfully established and before the network configuration information is sent to the smart device through the AP connection, it is possible to determine whether the scanned Bluetooth broadcast packet is a Bluetooth broadcast packet sent by the smart device by interacting with the user, or it is possible to determine whether the scanned Bluetooth broadcast packet is a Bluetooth broadcast packet sent by the smart device based on the AP connection.

[0274] Among them, to determine whether the scanned Bluetooth broadcast packet is a Bluetooth broadcast packet sent by the smart device by interacting with the user, you can refer to the above description of determining whether the scanned Bluetooth broadcast packet is a Bluetooth broadcast packet sent by the smart device by interacting with the user after detecting whether there is an AP network generated by the smart device and before successfully establishing the AP connection. No further details will be given here.

[0275] Determining whether a scanned Bluetooth broadcast packet is a Bluetooth broadcast packet sent by a smart device based on an AP connection may involve the electronic device communicating with the smart device based on the AP connection, obtaining a device identifier of the smart device, and then comparing the device identifier carried in the scanned Bluetooth broadcast packet with the device identifier of the smart device to see if they match. If so, it is determined that a Bluetooth broadcast packet sent by the smart device has been scanned; otherwise, it is determined that no Bluetooth broadcast packet sent by the smart device has been scanned. A detailed description can be found in the following related description, which is not repeated here.

[0276] In some embodiments, after the AP connection is successfully established and before the network configuration information is sent to the smart device through the AP connection, if it is determined that a Bluetooth broadcast packet sent by the smart device is scanned, the Bluetooth scan can be stopped, the AP network configuration process can be stopped, and the Bluetooth network configuration process can be entered.

[0277] Accordingly, before sending the network configuration information to the smart device through the AP connection, if the Bluetooth broadcast packet sent by the smart device is still not detected, the Bluetooth scanning can be stopped.

[0278] In the embodiment of the present disclosure, after entering the AP network configuration process, the AP network configuration page will be displayed on the electronic device. Therefore, after the AP connection is successful, the electronic device already knows which smart device needs to be configured, and can then determine whether there is a Bluetooth broadcast packet sent by the smart device in the scanned Bluetooth broadcast packet based on the AP connection. Then, after switching to the Bluetooth network configuration, there is no need to display the Bluetooth network configuration page (for the user to select the smart device to be configured). In this way, switching between AP network configuration and Bluetooth network configuration is performed without user perception and does not affect the user experience (the user experience of switching network configuration pages back and forth is poor, such as first switching from the Bluetooth network configuration page to the AP network configuration page, and then switching from the AP network configuration page to the Bluetooth network configuration page, the user will think that the device is faulty), thereby improving the success rate and efficiency of smart device network configuration.

[0279] In some embodiments, the processor is specifically configured to: after successfully establishing the AP connection and before determining whether the smart device is a device that supports the preset protocol, stop the AP network configuration process if a Bluetooth broadcast packet sent by the smart device is scanned.

[0280] In the embodiment of the present disclosure, after the AP connection is successfully established and before determining whether the smart device is a device that supports the preset protocol, if a Bluetooth broadcast packet sent by the smart device is scanned, the Bluetooth network configuration process is switched to. This can improve the network configuration efficiency and network configuration success rate while minimizing the execution of the AP network configuration process, and the implementation process is relatively simple.

[0281] In some embodiments, after successfully establishing the AP connection and before determining whether the smart device is a device that supports the preset protocol, if a Bluetooth broadcast packet sent by the smart device is scanned, the Bluetooth scan can be stopped, the AP network configuration process can be stopped, and the Bluetooth network configuration process can be entered.

[0282] Accordingly, in some embodiments, after determining whether the smart device is a device that supports the preset protocol, if no Bluetooth broadcast packet sent by the smart device is still detected, the Bluetooth scanning may be stopped.

[0283] In some embodiments, the processor is further configured to: upon detecting that the device identifier carried by the target Bluetooth broadcast packet matches the device identifier of the smart device obtained through the AP connection, determine that the target Bluetooth broadcast packet is a Bluetooth broadcast packet sent by the smart device.

[0284] It can be understood that detecting whether the device identification carried by the Bluetooth broadcast packet matches the device identification of the smart device obtained through the AP connection is a method of determining whether the scanned Bluetooth broadcast packet is a Bluetooth broadcast packet sent by the smart device based on the AP connection.

[0285] The device identifier may be a Media Access Control (MAC) address of the smart device, a unique identifier (device ID) of the smart device, or other device identifiers that uniquely identify the smart device, which are not limited here.

[0286] Among them, the Bluetooth broadcast packet carries the device identification. After the electronic device establishes an AP connection with the smart device (the electronic device connects to the AP network generated by the smart device, and opens the protocol stack to establish a communication channel with the smart device), the electronic device can communicate with the smart device through the AP connection to obtain the device identification of the smart device. The electronic device then compares whether the device identification in the scanned Bluetooth broadcast packet matches the device identification of the smart device. If it matches, it means that the scanned Bluetooth broadcast packet is a Bluetooth broadcast packet sent by the smart device.

[0287] It can be understood that if the device identifier carried by the target Bluetooth broadcast packet matches the device identifier of the smart device obtained through the AP connection, it means that the target Bluetooth broadcast packet is a Bluetooth broadcast packet sent by the smart device, which also means that the smart device is a device that the user has determined needs to be networked. Therefore, based on the target Bluetooth broadcast packet, the AP network configuration process for the smart device can be switched to the Bluetooth network configuration process for the smart device, and then the mode switching for network configuration for the smart device can be realized without the need for user participation.

[0288] The device identifier carried by the target Bluetooth broadcast packet may be exactly the same as the device identifier of the smart device obtained through the AP connection, which means that the device identifier carried by the target Bluetooth broadcast packet matches the device identifier of the smart device obtained through the AP connection; or the last preset digits (for example, the last four digits) of the device identifier carried by the target Bluetooth broadcast packet may be the same as the last preset digits (for example, the last four digits) of the device identifier of the smart device obtained through the AP connection, which means that the device identifier carried by the target Bluetooth broadcast packet matches the device identifier of the smart device obtained through the AP connection. The specific determination can be made based on actual conditions and is not limited here.

[0289] In the embodiment of the present disclosure, whether the target Bluetooth broadcast packet is a Bluetooth broadcast packet sent by the smart device is determined based on whether the device identifier carried by the target Bluetooth broadcast packet matches the device identifier of the smart device obtained through the AP connection. This can automatically confirm whether the Bluetooth broadcast packet sent by the smart device is detected without the need for user participation, and thus can achieve switching between the AP network configuration process and the Bluetooth network configuration process without the user's perception, thereby improving the user experience.

[0290] In some embodiments, the processor is further configured to: after establishing a Bluetooth connection with the smart device based on the Bluetooth broadcast packet sent by the smart device, and before sending network configuration information to the smart device through the Bluetooth connection, if it is detected that the Bluetooth network configuration process fails, continue to execute the AP network configuration process.

[0291] Among them, after sending the network configuration information to the smart device through the Bluetooth connection, if it is detected that the Bluetooth network configuration process fails, network configuration through the AP network configuration process usually cannot be successful. It is necessary to detect whether the network configuration failure is caused by other reasons.

[0292] In the embodiment of the present disclosure, before sending the network configuration information to the smart device via the Bluetooth connection, if it is detected that the Bluetooth network configuration process fails, the AP network configuration process is continued, and the smart device network configuration may succeed, thereby improving the success rate of the smart device network configuration.

[0293] In some embodiments, the processor is further configured to: after sending network configuration information to the smart device through the AP connection, send a query message to the smart device through the Bluetooth connection to determine whether the network configuration is successful; and determine that the network configuration is completed when a response message of successful network configuration is received from the smart device through the Bluetooth.

[0294] In the embodiment of the present disclosure, since in the AP network configuration process, after sending the network configuration information, the process of determining whether the smart device has successfully configured the network is relatively complicated, it may be necessary to switch the WiFi network to which the electronic device is connected, and switching failure or delay may occur during the network switching process. Therefore, the present disclosure combines Bluetooth connection to determine whether the smart device has successfully configured the network, which can improve the network configuration efficiency and network configuration success rate.

[0295] In order to explain this solution in more detail, the following will be explained in an exemplary manner with reference to Figures 24 to 29. It can be understood that the steps involved in Figures 24 to 29 may include more steps or fewer steps in actual implementation, and the order of these steps may also be different, so as to be able to implement the device control method provided in the embodiment of the present disclosure. The device control method is applied to an electronic device that is controlled by an electronic device. The execution subject of the device control method can be an electronic device, or a functional module or functional entity in the electronic device that can implement the device control method, which is not limited here. Moreover, the specific description of the device control method provided in the embodiment of the present disclosure can refer to the relevant description of the above-mentioned electronic device, and the same or similar technical effects can be achieved, which will not be repeated here.

[0296] FIG24 is another flowchart of a device control method according to some embodiments. The device control method may include the following S501 to S504 .

[0297] S501: Determine whether a Bluetooth broadcast packet of a smart device to be networked is not scanned within a preset time period.

[0298] S502: While keeping Bluetooth scanning enabled, detect whether there is an AP network generated by the smart device to enter the AP network configuration process, and execute the network configuration of the smart device based on the AP network configuration process.

[0299] S503: Before sending network configuration information to the smart device through the AP connection between the electronic device and the smart device, if a Bluetooth broadcast packet sent by the smart device is scanned, stop the AP network configuration process;

[0300] S504: Establish a Bluetooth connection with the smart device based on the Bluetooth broadcast packet sent by the smart device to enter a Bluetooth network configuration process, and execute network configuration of the smart device based on the Bluetooth network configuration process.

[0301] In an embodiment of the present disclosure, during network pairing for a smart device, Bluetooth pairing is preferentially selected. However, if no Bluetooth broadcast packet sent by the smart device is detected within a preset time period, while continuing to detect the Bluetooth broadcast packet sent by the smart device, a detection is performed to detect whether an AP network generated by the smart device exists, thereby entering the AP pairing process (if no Bluetooth broadcast packet is detected after a timeout, the mode is automatically switched from Bluetooth pairing mode to AP pairing mode, while scanning for Bluetooth broadcast packets is maintained). Furthermore, before the AP pairing process reaches the point where network pairing information is sent to the smart device via an AP connection, if a Bluetooth broadcast packet sent by the smart device is scanned, the AP pairing process is stopped, a Bluetooth connection is established based on the Bluetooth broadcast packet sent by the smart device, and then the Bluetooth pairing process is entered (i.e., switching from AP pairing mode to Bluetooth pairing mode). Thus, the smart device is paired with a network based on the Bluetooth pairing process. Since the Bluetooth pairing mode has simpler steps and a higher success rate, detecting a Bluetooth broadcast packet during the AP pairing process and switching to Bluetooth pairing mode can improve the success rate of network pairing for the smart device.

[0302] In some embodiments, as shown in FIG. 25 in combination with FIG. 24 , the above S502 may be specifically implemented through the following S502a and S502b.

[0303] S502a: After the AP connection is successfully established and before the network configuration information is sent to the smart device through the AP connection, a Bluetooth broadcast packet sent by the smart device is scanned.

[0304] S502b: Stop the AP network configuration process.

[0305] In some embodiments, as shown in FIG26 in combination with FIG25 , the above S502a can be specifically implemented through the following S601.

[0306] S601: After the AP connection is successfully established and before determining whether the smart device is a device that supports a preset protocol, a Bluetooth broadcast packet sent by the smart device is scanned.

[0307] In some embodiments, as shown in FIG27 in combination with FIG26 , the above S601 can be specifically implemented through the following S6011.

[0308] S6011. After successfully establishing the AP connection and before sending the network configuration information to the smart device through the AP connection, when it is detected that the device identifier carried by the target Bluetooth broadcast packet matches the device identifier of the smart device obtained through the AP connection, it is determined that the target Bluetooth broadcast packet is the Bluetooth broadcast packet sent by the smart device.

[0309] In some embodiments, in combination with FIG. 27 , as shown in FIG. 28 , after the above S504 , the device control method provided by the embodiment of the present disclosure may further include the following S505 .

[0310] S505: After establishing a Bluetooth connection with the smart device based on the Bluetooth broadcast packet sent by the smart device and before sending network configuration information to the smart device through the Bluetooth connection, if it is detected that the Bluetooth network configuration process fails, continue to execute the AP network configuration process.

[0311] In some embodiments, in combination with FIG. 28 , as shown in FIG. 29 , after the above S505 , the device control method provided by the embodiment of the present disclosure may further include the following S506 and S507 .

[0312] S506: After sending the network configuration information to the smart device through the AP connection, a query message is sent to the smart device through the Bluetooth connection to check whether the network configuration is successful.

[0313] S507: When a response message indicating that the network configuration of the smart device is successful is received through the Bluetooth connection, it is determined that the network configuration is completed.

[0314] Figures 30 and 31 show another flow chart of a device control method provided in an embodiment of the present disclosure, including steps S1101a to S1115. The first processor, the first Bluetooth module, and the first WiFi module are functional modules or entities in the smart device to be networked, and the second processor, the second Bluetooth module, the second WiFi module, and the display are functional modules or entities in the electronic device.

[0315] S1101a: The first processor detects that it has entered the network configuration state, and generates a Bluetooth signal instruction and an AP network generation instruction.

[0316] S1101b. The first processor sends a Bluetooth activation instruction to the first Bluetooth module.

[0317] S1101c: The first Bluetooth module responds to the Bluetooth signal instruction and broadcasts a Bluetooth broadcast packet.

[0318] S1101d. The first processor sends an AP network generation instruction to the first WiFi module.

[0319] S1101e. The first WiFi module responds to the AP network generation instruction and generates an AP network.

[0320] S1102a: The second processor receives a network configuration instruction for configuring a network for the smart device, generates a Bluetooth scan instruction, and sends the Bluetooth scan instruction to the second Bluetooth module.

[0321] S1102b: The second Bluetooth module responds to the Bluetooth scanning instruction and starts Bluetooth scanning.

[0322] S1102c. The second processor controls the display to display a Bluetooth scanning interface, and the Bluetooth scanning interface displays a Bluetooth scanning animation.

[0323] S1102d: After the second Bluetooth module scans for a certain period of time, if the second Bluetooth module scans at least one first Bluetooth broadcast packet, the second Bluetooth module sends at least one first device identifier corresponding to the scanned at least one first Bluetooth broadcast packet to the second processor.

[0324] A first device identifier is used to indicate a device that sends a Bluetooth broadcast packet, and at least one first Bluetooth broadcast packet corresponds to at least one first device identifier.

[0325] The first device identification includes at least one of the following information: device name, device model, and device category.

[0326] S1102e: The second processor controls the display to display at least one first device identifier on the Bluetooth scanning interface.

[0327] The second Bluetooth module scans two Bluetooth broadcast packets, which correspond to the device identification 1 of device 1 and the device identification 2 of device 2 respectively.

[0328] If at least one of the first device identifiers includes a target device identifier (the target device identifier is used to indicate a smart device), the user selects the target device identifier and executes the following steps S1102f to S1102h to establish a Bluetooth connection between the electronic device and the smart device, entering the Bluetooth network pairing process. If at least one of the first device identifiers does not include the target device identifier, the user selects to continue Bluetooth scanning and returns to execute the above steps S1102c to S1102e again. If a Bluetooth broadcast packet sent by the smart device is scanned within the preset time period, the following steps S1102f to S1102h are executed. If no Bluetooth broadcast packet sent by the smart device is scanned within the preset time period, the following step S1102i is executed.

[0329] S1102f: In response to the user selecting a target device identifier from at least one first device identifier, the second processor generates and sends a first Bluetooth connection instruction to the second Bluetooth module.

[0330] The first Bluetooth connection instruction is used to instruct the second Bluetooth module to establish a Bluetooth connection with the smart device based on the first Bluetooth broadcast packet corresponding to the target device identifier.

[0331] S1102g: The second Bluetooth module responds to the first Bluetooth connection instruction and establishes a Bluetooth connection with the smart device based on the first Bluetooth broadcast packet corresponding to the target device identifier.

[0332] S1102h. The second processor executes a Bluetooth network configuration process based on the Bluetooth connection to configure the smart device.

[0333] It should be noted that the process of executing the Bluetooth network configuration process in S1102h includes the process of sending the network configuration information based on the Bluetooth connection shown in S1201 to S1205 below.

[0334] S1201: The second processor obtains a WiFi list and controls the display to display the WiFi list.

[0335] Among them, the WiFi list can be a WiFi list corresponding to at least one WiFi signal scanned by the second processor through the second WiFi module, or it can be a WiFi list received by the second processor from the first processor through a Bluetooth connection. The WiFi list is a WiFi list corresponding to at least one WiFi information scanned by the first processor through the first WiFi module.

[0336] S1202: In response to the user selecting a target WiFi from the WiFi list, the second processor controls the display to display a password input interface for the target WiFi.

[0337] S1203: In response to the user inputting the WiFi password, the second processor sends network configuration information to the first processor via the Bluetooth connection, where the network configuration information includes the target WiFi and the WiFi password.

[0338] S1204: The first processor sends a WiFi connection instruction to the first WiFi module based on the received network configuration information.

[0339] S1205: The first WiFi module responds to the WiFi connection instruction and establishes a connection with the target WiFi to continue network configuration.

[0340] For the specific Bluetooth network configuration process, please refer to the relevant technology and will not be described here.

[0341] S1102i: The second processor determines that no Bluetooth broadcast packet is scanned within a preset time period.

[0342] S1103a: When the second Bluetooth module keeps performing Bluetooth scanning, the second processor sends a query instruction to the second WiFi module to query whether the second WiFi module is currently connected to the home router.

[0343] S1103b: The second WiFi module responds to the query instruction, generates a response message based on whether it is connected to the home router, and sends the response message to the second processor.

[0344] If the response message indicates that the second WiFi module is currently connected to the home router, execute the following S1103c to S1103d. If the response message indicates that the second WiFi module is not currently connected to the home router (data networking state), execute the following S1103e to S1103f.

[0345] S1103c. When the response message indicates that the second WiFi module is currently connected to the home router, the second processor generates an instruction to disconnect from the home router and an instruction to search for an AP network, and sends the instruction to disconnect from the home router and the instruction to search for an AP network to the second WiFi module.

[0346] S1103d. The second WiFi module responds to the disconnect home router instruction to disconnect the currently connected home router; and responds to the search AP network instruction to search for the AP network in the current environment.

[0347] S1103e: When the response message indicates that the second WiFi module is not currently connected to the home router, the second processor generates an AP network search instruction and sends the AP network search instruction to the second WiFi module.

[0348] S1103f. The second WiFi module responds to the AP network search instruction and searches for the AP network in the current environment.

[0349] S1104a: The second processor controls the display to display an AP network search interface, where the AP network search interface displays a search animation.

[0350] S1104b: After the second WiFi module searches for a certain period of time, if the second WiFi module searches for at least one AP network, at least one WiFi name corresponding to the at least one AP network is sent to the second processor.

[0351] A WiFi name is used to indicate a device that generates an AP network, and at least one AP network corresponds to at least one WiFi name.

[0352] S1104c: The second processor determines whether there is a target WiFi name including a preset tag in the at least one WiFi name.

[0353] If the second processor determines that there is a target WiFi name in the at least one WiFi name, then the WiFi name is the WiFi name of the AP network generated by the smart device, and the following S1105a to S1105b are executed to establish an AP connection between the electronic device and the smart device; if the second processor determines that there are multiple target WiFi names in the at least one WiFi name, the following S1106a to S1106c are executed; if the second processor determines that there is no target WiFi name in the at least one WiFi name, the following S1107a to S1107c are executed.

[0354] S1105a: When the second processor determines that there is a target WiFi name in the at least one WiFi name, the second processor generates and sends to the second WiFi module a first connection instruction for connecting to an AP network corresponding to the target WiFi name.

[0355] S1105b. The second WiFi module responds to the first connection instruction and connects to the AP network corresponding to the target WiFi name.

[0356] After executing S1105b, execute the following S1108.

[0357] S1106a: When the second processor determines that there are multiple target WiFi names in the at least one WiFi name, the second processor controls the display to display the multiple target WiFi names.

[0358] S1106b: In response to the received trigger operation of selecting a first target WiFi name from a plurality of target WiFi names, the second processor generates and sends to the second WiFi module a second connection instruction for connecting to the AP network corresponding to the first target WiFi name.

[0359] The AP network corresponding to the first target WiFi name is the AP network generated by the smart device.

[0360] S1106c. The second WiFi module responds to the second connection instruction and connects to the AP network corresponding to the first target WiFi name.

[0361] After executing S1106c, execute the following S1108.

[0362] S1107a: When determining that the target WiFi name does not exist in the at least one WiFi name, the second processor controls the display to display a prompt message to prompt the user to go to the setting page to select the AP network to be connected.

[0363] S1107b: In response to the received user operation of selecting the target AP network on the setting page, the second processor generates and sends a third connection instruction for connecting to the target AP network to the second WiFi module.

[0364] The target AP network is the AP network generated by the smart device.

[0365] S1107c. The second WiFi module responds to the third connection instruction and connects to the target AP network.

[0366] After executing S1107c, execute the following S1108.

[0367] S1108: The second WiFi module establishes a communication channel with the first WiFi module by opening the protocol stack, so as to successfully establish an AP connection with the smart device.

[0368] S1109: The second WiFi module obtains a device identification of the smart device through the AP connection, and sends the device identification of the smart device to the second processor.

[0369] S1110: The second Bluetooth module sends at least one scanned second Bluetooth broadcast packet to the second processor.

[0370] The at least one second Bluetooth broadcast packet is a Bluetooth broadcast packet sent by different devices scanned after S1103a, and each second Bluetooth broadcast packet carries a second device identifier.

[0371] The second device identifier is used to uniquely indicate a device, and the second device identifier may be a MAC address of the device.

[0372] The second device identifier is different from the first device identifier.

[0373] S1111. The second processor determines whether there is a Bluetooth broadcast packet in at least one second Bluetooth broadcast packet whose carried device identifier matches the device identifier of the smart device.

[0374] Before the AP network configuration process is executed to determine whether the smart device is a device that supports the preset protocol, at least one second Bluetooth broadcast packet is scanned. If the device identifier carried by the target Bluetooth broadcast packet in the at least one second Bluetooth broadcast packet matches the device identifier of the smart device, it is determined that the target Bluetooth broadcast packet is a Bluetooth broadcast packet sent by the smart device, and the following S1112a to S1112c are executed. If the device identifier carried by any Bluetooth broadcast packet in the at least one second Bluetooth broadcast packet does not match the device identifier of the smart device, it is determined that no Bluetooth broadcast packet sent by the smart device is scanned, and the following S1113 is executed.

[0375] S1112a: When determining that the device identifier carried in the target Bluetooth broadcast packet matches the device identifier of the smart device, the second processor generates and sends a stop Bluetooth scanning instruction to the second Bluetooth module, and generates and sends a second Bluetooth connection instruction.

[0376] The second Bluetooth connection instruction is used to instruct the second Bluetooth module to establish a Bluetooth connection with the smart device based on the target Bluetooth broadcast packet.

[0377] S1112b: The second Bluetooth module responds to the stop Bluetooth scanning instruction, stops Bluetooth scanning, responds to the second Bluetooth connection instruction, and establishes a Bluetooth connection with the smart device based on the target Bluetooth broadcast packet.

[0378] S1112c: The second processor executes the Bluetooth network configuration process based on the Bluetooth connection to continue configuring the smart device.

[0379] It should be noted that the process of executing the Bluetooth network configuration process in S1112c includes the process of issuing the network configuration information based on the Bluetooth connection shown in S1201 to S1205. For details, please refer to the above related description and will not be repeated here.

[0380] S1113. When the second processor determines that there is no Bluetooth broadcast packet in the scanned Bluetooth broadcast packet whose device identifier matches the device identifier of the smart device or no Bluetooth broadcast packet is scanned, it determines whether the smart device is a device that supports the preset protocol, so as to continue to execute the AP network configuration process to configure the smart device.

[0381] It should be noted that the process of executing the AP network configuration process in S1113 includes the process of sending network configuration information based on AP connection shown in S1301 to S1305 below.

[0382] S1301: The second processor obtains a WiFi list and controls the display to display the WiFi list.

[0383] Among them, the WiFi list can be a WiFi list corresponding to at least one WiFi signal scanned by the second processor through the second WiFi module, or it can be a WiFi list received by the second processor from the first processor through the AP connection. The WiFi list is a WiFi list corresponding to at least one WiFi information scanned by the first processor through the first WiFi module.

[0384] S1302: In response to the user selecting a target WiFi from the WiFi list, the second processor controls the display to display a password input interface for the target WiFi.

[0385] S1303: In response to the user inputting the WiFi password, the second processor sends network configuration information to the first processor through the AP connection, where the network configuration information includes the target WiFi and the WiFi password.

[0386] S1304: The first processor sends a WiFi connection instruction to the first WiFi module based on the received network configuration information.

[0387] S1305: The first WiFi module responds to the WiFi connection instruction and establishes a connection with the target WiFi to continue network configuration.

[0388] It should be understood that the above content mainly introduces the solution provided by the embodiment of the present disclosure from the perspective of method. In order to realize the above functions, it includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present disclosure can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in a hardware or computer software driven hardware manner depends on the specific application and design constraints of the solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present disclosure.

[0389] FIG32 is a schematic diagram of the structure of a mobile terminal 300 according to some embodiments. As shown in FIG32 , the mobile terminal 300 may include at least one processor 101, a communication device 102, and a display 103. The at least one processor 101 is connected to the communication device 102 and the display 103 and is configured to execute computer instructions so that the mobile terminal 300 performs:

[0390] In response to the startup operation, the communication device 102 is controlled to obtain a device category list and reported information reported by the smart devices in the current environment; wherein, the device category list includes a correspondence between a theoretical identifier and a network identifier, the network identifier is used to indicate whether the smart device supports the Internet of Things function, the theoretical identifier includes a local area network device identification code or a Bluetooth pairing device identification code, and the reported information includes an actual identifier; the processor 101 is also configured to query the device category list obtained by the communication device 102 based on the actual identifier obtained by the communication device 102, and determine whether there is a theoretical identifier that is the same as the actual identifier, and the network identifier corresponding to the theoretical identifier that is the same as the actual identifier is used to indicate that the smart device supports the Internet of Things function, and based on the configuration information of the smart device corresponding to the actual identifier, when the device model information is obtained, a display device list is generated based on the device model information; wherein the device model information includes at least a device icon, a device name and a device model, and the display device list includes the smart device corresponding to each device model information; the processor 101 is also configured to control the display 103 to display based on the display device list.

[0391] In some embodiments, the configuration information includes any one of a device model identifier, a device identifier, and a module identifier, and the module identifier includes any one of a Bluetooth identifier and a wireless communication technology identifier.

[0392] In some embodiments, the device category list also includes device icons and device names corresponding to different device categories; at least one processor 101 is further configured to execute computer instructions to enable the mobile terminal 300 to execute: based on the actual identifier obtained by the communication device 102, query in the device category list obtained by the communication device 102, and determine whether there is a theoretical identifier that is the same as the actual identifier, and the network identifier corresponding to the theoretical identifier that is the same as the actual identifier is used to indicate that the smart device supports the Internet of Things function, and based on the configuration information of the smart device corresponding to the actual identifier, the device model information is not obtained, and when the device category corresponding to the theoretical identifier that is the same as the actual identifier has a corresponding device icon and device name, the device icon and device name corresponding to the device category are used as the device model information.

[0393] In some embodiments, at least one processor 101 is further configured to execute computer instructions to cause the mobile terminal 300 to execute: based on the actual identification obtained by the communication device 102, query in the device category list obtained by the communication device 102, and determine whether there is a theoretical identification that is the same as the actual identification, and the network identification corresponding to the theoretical identification that is the same as the actual identification is used to indicate that the smart device supports the Internet of Things function, and based on the configuration information of the smart device corresponding to the actual identification, the device model information is not obtained, and the device category corresponding to the theoretical identification that is the same as the actual identification does not have a corresponding device icon and device name, obtain a pre-configured local icon and local name corresponding to the actual identification; the processor 101 is also configured to use the local icon and local name as the device model information.

[0394] In some embodiments, at least one processor 101 is further configured to execute computer instructions to cause the mobile terminal 300 to perform: based on the actual identification obtained by the communication device 102, query in the device category list obtained by the communication device 102, and determine whether there is a theoretical identification that is the same as the actual identification, and when the network identification corresponding to the theoretical identification that is the same as the actual identification is used to indicate that the smart device does not support the Internet of Things function, delete the smart device corresponding to the actual identification.

[0395] Among them, all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, and its role will not be repeated here.

[0396] Of course, the mobile terminal 300 provided in the embodiments of the present disclosure includes but is not limited to the above modules. For example, the mobile terminal 300 may also include a memory. The memory may be used to store program code of the mobile terminal 300 and may also be used to store data generated during operation of the mobile terminal 300, such as data in a write request.

[0397] As an example, in combination with Figure 4, the function implemented by the acquisition unit 202 in the mobile terminal 300 is the same as the function of the communication device 102, the function implemented by the processing unit 201 is the same as the function of the processor 101, the function implemented by the display unit 203 is the same as the function of the display 103, and the function implemented by the storage unit 204 is the same as the function of the memory 104.

[0398] As shown in Figure 33, an embodiment of the present disclosure further provides a chip system, which can be applied to the mobile terminal 300 in the aforementioned embodiment. The chip system includes at least one processor 1501 and at least one interface circuit 1502. The processor 1501 can be the processor in the aforementioned mobile terminal 300. The processor 1501 and the interface circuit 1502 can be interconnected via a line. The processor 1501 can receive and execute computer instructions from the memory of the aforementioned mobile terminal 300 through the interface circuit 1502. When the computer instructions are executed by the processor 1501, the mobile terminal 300 can execute the various steps performed by the mobile terminal 300 in the aforementioned embodiment. Of course, the chip system can also include other discrete components, which are not specifically limited in the embodiment of the present disclosure.

[0399] The embodiment of the present disclosure further provides a computer-readable storage medium for storing computer instructions executed by the mobile terminal 300 .

[0400] The foregoing description is intended only to provide specific embodiments of the present disclosure, intended to enable those skilled in the art to understand and implement the present disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure is not intended to be limited to the embodiments described herein, but rather to be construed in the broadest manner consistent with the principles and novel features disclosed herein.

Claims

1. An electronic device, comprising: A display; A communication device configured to establish a communication connection with a smart device; At least one processor, connected to the display and the communication device, configured to execute computer instructions to cause the electronic device to perform: In response to a startup operation, control the communication device to obtain a device category list and reporting information reported by smart devices to be networked in the current environment; wherein, the device category list includes the correspondence between a theoretical identifier and a network identifier, the network identifier is used to indicate whether the smart device supports the Internet of Things function, the theoretical identifier includes a local area network device identification code or a Bluetooth network configuration device identification code, and the reporting information includes an actual identifier; Based on the actual identifier obtained by the communication device, query in the device category list obtained by the communication device, determine that there is a theoretical identifier identical to the actual identifier, and the network identifier corresponding to the theoretical identifier identical to the actual identifier is used to indicate that the smart device supports the Internet of Things function, and when device model information is obtained based on the configuration information of the smart device corresponding to the actual identifier, generate a display device list based on the device model information; wherein, the device model information at least includes a device icon, a device name, and a device model, and the display device list includes smart devices corresponding to each piece of the device model information; Control the display to display based on the display device list.

2. The electronic device according to claim 1, wherein the configuration information includes any one of a device model identifier, a device identifier, and a module identifier, and the module identifier includes any one of a Bluetooth identifier and a wireless communication technology identifier.

3. The electronic device according to claim 1, wherein the device category list further includes device icons and device names corresponding to different device categories; the at least one processor is further configured to execute computer instructions to cause the electronic device to perform: Based on the actual identifier obtained by the communication device, query in the device category list obtained by the communication device, determine that there is a theoretical identifier identical to the actual identifier, and the network identifier corresponding to the theoretical identifier identical to the actual identifier is used to indicate that the smart device supports the Internet of Things function, and when device model information is not obtained based on the configuration information of the smart device corresponding to the actual identifier, and there are corresponding device icons and device names for the device category corresponding to the theoretical identifier identical to the actual identifier, use the device icons and device names corresponding to the device category as the device model information.

4. The electronic device according to claim 3, wherein the at least one processor is further configured to execute computer instructions to cause the electronic device to perform: Based on the actual identifier obtained by the communication device, query in the device category list obtained by the communication device to determine that there is a theoretical identifier identical to the actual identifier, and the network identifier corresponding to the theoretical identifier identical to the actual identifier is used to indicate that the intelligent device supports the Internet of Things function, and based on the configuration information of the intelligent device corresponding to the actual identifier, no device model information is obtained, and when there is no corresponding device icon and device name for the device category corresponding to the theoretical identifier identical to the actual identifier, obtain the pre-configured local icon and local name corresponding to the actual identifier; Use the local icon and the local name as the device model information.

5. The electronic device according to claim 1, wherein the at least one processor is further configured to execute computer instructions to cause the electronic device to perform: Based on the actual identifier obtained by the communication device, query in the device category list obtained by the communication device to determine that there is a theoretical identifier identical to the actual identifier, and when the network identifier corresponding to the theoretical identifier identical to the actual identifier is used to indicate that the intelligent device does not support the Internet of Things function, delete the intelligent device corresponding to the actual identifier.

6. The electronic device according to claim 1, wherein the at least one processor is further configured to execute computer instructions to cause the electronic device to perform: The control communication device obtains the intelligent devices that can be added in the current environment through the target protocol; among them, The target protocols include a local area network protocol, a Bluetooth protocol, and a Digital Living Network Alliance protocol; Generate a display list based on the intelligent devices obtained by the communication device; wherein, the display list includes one or more of the intelligent devices; If there is no other preset pop-up window being displayed currently and the currently displayed page is the target page, control the display to display a device list pop-up window in the target page according to the display list.

7. The electronic device according to claim 6, wherein the at least one processor is further configured to execute computer instructions to cause the electronic device to perform: Perform deduplication processing on the intelligent devices respectively obtained by the communication device through the local area network protocol and the Bluetooth protocol to obtain deduplicated intelligent devices; Based on the deduplicated intelligent devices and the intelligent devices obtained by the communication device through the Digital Living Network Alliance protocol, obtain merged intelligent devices; Perform deduplication processing based on the intelligent devices already bound to the current account and the merged intelligent devices to generate a display list.

8. The electronic device according to claim 7, wherein the at least one processor is further configured to execute computer instructions to cause the electronic device to perform: Obtain the target information of the intelligent devices respectively obtained by the local area network protocol and the Bluetooth protocol; Deduplicate the smart devices obtained respectively by the local area network protocol and the Bluetooth protocol acquired by the communication device based on the target information to obtain the deduplicated smart devices; wherein, The target information includes any one of the media access control address corresponding to the mobile hotspot module or the configuration information.

9. The electronic device according to claim 7, wherein the target information includes the media access control address corresponding to the mobile hotspot module; the communication device is further configured to: obtain the Bluetooth information reported by each smart device obtained by the Bluetooth protocol; wherein, The Bluetooth information includes information added for representing the media access control address; The at least one processor is further configured to execute computer instructions to cause the electronic device to perform: when the media access control address corresponding to the mobile hotspot module is the same as the Bluetooth information obtained by the communication device, deleting the smart devices obtained by the first protocol, retaining the smart devices obtained by the second protocol, and using the retained smart devices obtained by the second protocol as the de-duplicated smart devices; wherein, the first protocol includes any one of the local area network protocol and the Bluetooth protocol, and the second protocol includes the protocols other than the first protocol among the local area network protocol and the Bluetooth protocol.

10. The electronic device according to claim 7, wherein the target information includes configuration information, and the configuration information includes the category information to which the smart device belongs. The communication device is further configured to: in the case of the presence of intelligent devices with the same category information, delete the intelligent devices obtained by the third protocol, retain the intelligent devices obtained by the fourth protocol, and use the retained intelligent devices obtained by the fourth protocol as the deduplicated intelligent devices; wherein, The third protocol includes any one of the local area network protocol and the Bluetooth protocol, and the fourth protocol includes the protocols other than the first protocol among the local area network protocol and the Bluetooth protocol.

11. The electronic device according to claim 7, wherein the target information includes configuration information, the configuration information includes network configuration information, and the network configuration information includes either configured or unconfigured; the communication device is further configured to: when the network configuration information of the smart device obtained by the Bluetooth protocol is unconfigured, retaining the smart device with the unconfigured network configuration information, and using the retained smart device with the unconfigured network configuration information as the de-duplicated smart device; when the network configuration information of the smart device obtained by the Bluetooth protocol is configured, deleting the smart device with the configured network configuration information.

12. The electronic device according to claim 7, wherein the communication device is further configured to: deleting the smart devices among the merged smart devices that are already bound to the current account to obtain the smart devices that can be added.

13. The electronic device according to claim 6, wherein the device list pop-up window further includes an ignore control for not displaying again within a preset time, and one smart device corresponds to one ignore control; the communication device is further configured to: in response to a selection operation on the ignore control, deleting the smart device corresponding to the ignore control in the device list pop-up window, and not displaying the smart device corresponding to the ignore control in the device list pop-up window displayed within the preset time.

14. The electronic device according to claim 1, wherein the at least one processor is further configured to execute computer instructions to cause the electronic device to perform: determining that no Bluetooth broadcast packets of smart devices to be network-configured are scanned within a preset duration; while keeping Bluetooth scanning on, detecting whether there is an AP network generated by the smart device to enter the AP network configuration process, and performing the network configuration of the smart device based on the AP network configuration process; when a Bluetooth broadcast packet sent by the smart device is scanned before sending network configuration information to the smart device through the AP connection between the electronic device and the smart device, stopping the AP network configuration process. Establish a Bluetooth connection with the smart device based on the Bluetooth broadcast packet sent by the smart device to enter the Bluetooth network configuration process, and perform the network configuration of the smart device based on the Bluetooth network configuration process.

15. The electronic device according to claim 14, wherein the at least one processor is further configured to execute computer instructions to cause the electronic device to perform: After successfully establishing the AP connection and before sending network configuration information to the smart device through the AP connection, if a Bluetooth broadcast packet sent by the smart device is scanned, stop the AP network configuration process.

16. The electronic device according to claim 15, wherein the at least one processor is further configured to execute computer instructions to cause the electronic device to perform: After successfully establishing the AP connection and before determining whether the smart device is a device supporting a preset protocol, if a Bluetooth broadcast packet sent by the smart device is scanned, stop the AP network configuration process.

17. The electronic device according to claim 15, wherein the at least one processor is further configured to execute computer instructions to cause the electronic device to perform: If it is detected that the device identifier carried in the target Bluetooth broadcast packet matches the device identifier of the smart device obtained through the AP connection, determine that the target Bluetooth broadcast packet is the Bluetooth broadcast packet sent by the smart device.

18. The electronic device according to any one of claims 14 to 17, wherein the at least one processor is further configured to execute computer instructions to cause the electronic device to perform: After establishing a Bluetooth connection with the smart device based on the Bluetooth broadcast packet sent by the smart device and before sending network configuration information to the smart device through the Bluetooth connection, if it is detected that the Bluetooth network configuration process fails, continue to execute the AP network configuration process.

19. The electronic device according to claim 18, wherein the at least one processor is further configured to execute computer instructions to cause the electronic device to perform: after sending network configuration information to the smart device through the AP connection, send a query message indicating whether the network configuration is successful to the smart device through the Bluetooth connection; If a response message indicating successful network configuration of the smart device is received through the Bluetooth connection, determine that the network configuration ends.

20. A device control method, comprising: In response to a startup operation, obtain a device category list and the reported information reported by the smart device to be network-configured in the current environment; wherein, the device category list includes the correspondence between the theoretical identifier and the network identifier, the network identifier is used to indicate whether the smart device supports the Internet of Things function, the theoretical identifier includes a local area network device identification code or a Bluetooth network configuration device identification code, and the reported information includes the actual identifier. Query in the device category list based on the actual identifier, determine that there is a theoretical identifier identical to the actual identifier, and the network identifier corresponding to the theoretical identifier identical to the actual identifier is used to indicate that the intelligent device supports the Internet of Things function, and when obtaining the device model information based on the configuration information of the intelligent device corresponding to the actual identifier, generate a display device list based on the device model information; wherein, the device model information at least includes a device icon, a device name, and a device model, and the display device list includes intelligent devices corresponding to each device model information; Display based on the display device list.