Electronic device, device list acquisition method, and storage medium

By using device placeholders in the device list of the HomeKit client, the issue of the HomeKit app's inability to dynamically update the device list was resolved, enabling dynamic updating and management of the device list.

CN117812135BActive Publication Date: 2026-07-24HISENSE VISUAL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HISENSE VISUAL TECH CO LTD
Filing Date
2022-12-22
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

The HomeKit app cannot dynamically update the list of devices connected to electronic devices, making it impossible to add other devices that later connect to electronic devices.

Method used

By adding device placeholders to the target information, a device list is generated and updated, dynamically updating the device list displayed in the HomeKit client.

Benefits of technology

It allows for reserving space for devices to be connected without misleading users, dynamically updating the device list displayed in the HomeKit client, and supporting the dynamic addition and deletion of devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117812135B_ABST
    Figure CN117812135B_ABST
Patent Text Reader

Abstract

The present disclosure relates to an electronic device and a device list obtaining method and a storage medium, the electronic device comprising: a communicator configured to receive a device list obtaining request sent by a HomeKit client after establishing a connection with the HomeKit client based on a HomeKit protocol; a controller configured to determine device information of the electronic device and device information of each target device based on the device list obtaining request; generate target information based on the device information of the electronic device, the device information of each target device and at least one device placeholder, each device placeholder being used to indicate one unknown device to be accessed, and the device information corresponding to each device placeholder being empty; the communicator is further configured to send the target information to the HomeKit client, so that the HomeKit client displays a device list based on the target information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of terminal technology. More specifically, it relates to an electronic device, a method for obtaining a device list, and a storage medium. Background Technology

[0002] With the development of smart home technology, users can control all devices in their home that support the HomeKit protocol through the HomeKit app on the device. These devices include lights, locks, thermostats, smart plugs, and other devices.

[0003] Electronic devices equipped with the HomeKit protocol can also be discovered and controlled by the HomeKit app. Taking electronic device A as an example, after it is discovered and connected to the HomeKit app, the user can control it through the app. The HomeKit app can not only control device A, but also device B connected to it, and even device C connected to device B. Thus, users can control multiple electronic devices through the HomeKit app, providing great convenience.

[0004] According to the HomeKit protocol, the HomeKit app acts as the control terminal. The device list displayed on the HomeKit app is obtained during initialization after the HomeKit app connects to electronic device A. However, once the device list is initialized, no other devices that subsequently connect to electronic device A can be added to the list. In other words, after the HomeKit app connects to and initializes with electronic device A, it cannot dynamically update the device list displayed on the HomeKit app. Summary of the Invention

[0005] To address or at least partially address the aforementioned technical problems, embodiments of this application provide an electronic device, a method for obtaining a device list, and a storage medium, which can dynamically update the device list displayed on the HomeKit app.

[0006] In a first aspect, embodiments of this application provide an electronic device, including: a communicator configured to: after establishing a connection with a HomeKit client based on the HomeKit protocol, receive a device list retrieval request sent by the HomeKit client, the device list retrieval request being used to instruct the acquisition of device information of each target device connected to the electronic device, the device information including device identifiers; a controller configured to: determine the device information of the electronic device and the device information of each target device based on the device list retrieval request, the device information including the identifiers of the corresponding devices; generate target information based on the device information of the electronic device, the device information of each target device, and at least one device placeholder, each device placeholder being used to indicate an unknown device to be connected, the device information corresponding to each device placeholder being empty; the communicator is further configured to: send the target information to the HomeKit client, so that the HomeKit client displays a device list based on the target information, the device list including the identifier of the electronic device and the identifiers of each target device.

[0007] In some embodiments of this application, the controller is further configured to: after sending the target information to the HomeKit client, detect that the first device has established a connection with the electronic device; update a device placeholder in the target information to the device information of the first device to update the target information; the communicator is further configured to: send the updated target information to the HomeKit client so that the HomeKit client updates the device list based on the updated target information, the updated device list including the identifier of the electronic device, the identifier of each target device and the identifier of the first device.

[0008] In some embodiments of this application, the controller is further configured to: after sending the target information to the HomeKit client, detect that the second device has disconnected from the electronic device, wherein the second device is any one of the target devices; update the device information of the second device in the target information with a device placeholder to update the target information; the communicator is further configured to: send the updated target information to the HomeKit client so that the HomeKit client updates the device list based on the updated target information, wherein the updated device list includes the identifier of the electronic device and the identifiers of each of the target devices other than the second device.

[0009] In some embodiments of this application, each target device includes at least one third device; or, each target device includes at least one third device and at least one fourth device; wherein each third device is directly connected to the electronic device, and each fourth device is connected to the electronic device through a corresponding third device.

[0010] In some embodiments of this application, the electronic device is connected to each of the third devices via an HDMI interface; in cases where each target device includes the at least one fourth device, each third device is connected to the corresponding third device via an HDMI interface.

[0011] In some embodiments of this application, the device information may also include the type of the corresponding device; the device list may also include the type of the electronic device and the type of each target device.

[0012] In some embodiments of this application, the number of each target device and the number of the at least one device placeholder are equal to a first preset value; or, the number of the at least one device placeholder is equal to a second preset value.

[0013] Secondly, embodiments of this application provide a device list acquisition method applied to an electronic device, comprising: after establishing a connection with a HomeKit client based on the HomeKit protocol, receiving a device list acquisition request sent by the HomeKit client, the device list acquisition request being used to instruct the acquisition of device information of each target device connected to the electronic device, the device information including device identifiers; determining the device information of the electronic device and the device information of each target device based on the device list acquisition request, the device information including the identifiers of the corresponding devices; generating target information based on the device information of the electronic device, the device information of each target device, and at least one device placeholder, each device placeholder being used to indicate an unknown device to be connected, the device information corresponding to each device placeholder being empty; and sending the target information to the HomeKit client so that the HomeKit client displays a device list based on the target information, the device list including the identifier of the electronic device and the identifiers of each target device.

[0014] In some embodiments of this application, after sending the target information to the HomeKit client, the method further includes: detecting that the first device has established a connection with the electronic device; updating a device placeholder in the target information to the device information of the first device to update the target information; and sending the updated target information to the HomeKit client so that the HomeKit client updates the device list based on the updated target information, wherein the updated device list includes the identifier of the electronic device, the identifiers of each target device, and the identifier of the first device.

[0015] In some embodiments of this application, after sending the target information to the HomeKit client, the method further includes: detecting that a second device is disconnected from the electronic device, wherein the second device is any one of the target devices; updating the device information of the second device in the target information with a device placeholder to update the target information; and sending the updated target information to the HomeKit client so that the HomeKit client updates the device list based on the updated target information, wherein the updated device list includes the identifier of the electronic device and the identifiers of each of the target devices other than the second device.

[0016] In some embodiments of this application, each target device includes at least one third device; or, each target device includes at least one third device and at least one fourth device; wherein each third device is directly connected to the electronic device, and each fourth device is connected to the electronic device through a corresponding third device.

[0017] In some embodiments of this application, the electronic device is connected to each of the third devices via an HDMI interface; in cases where each target device includes the at least one fourth device, each third device is connected to the corresponding third device via an HDMI interface.

[0018] In some embodiments of this application, the device information may also include the type of the corresponding device; the device list may also include the type of the electronic device and the type of each target device.

[0019] In some embodiments of this application, the number of each target device and the number of the at least one device placeholder are equal to a first preset value; or, the number of the at least one device placeholder is equal to a second preset value.

[0020] Thirdly, embodiments of this application provide a computer-readable storage medium, including: storing a computer program on the computer-readable storage medium, wherein when the computer program is executed by a processor, it implements the device list acquisition method as shown in the second aspect.

[0021] Fourthly, embodiments of this application provide a computer program product, including: when the computer program product is run on a computer, causing the computer to implement the device list acquisition method as shown in the second aspect.

[0022] Compared with the prior art, the technical solution provided in this application has the following advantages: In this application embodiment, by adding device placeholders to the target information, since each device placeholder is used to indicate an unknown device to be connected, and the device information corresponding to each device placeholder is empty, not only will the device list generated by the HomeKit client based on the target information not mislead users because it includes the identification of some unconnected devices, but also a space will be reserved in the device list for unknown devices to be connected. Therefore, when other devices establish a connection with the electronic device, the device information of the other device can be used to update a device placeholder in the target information to update the target information. Then, the HomeKit client updates the device list based on the updated target information to achieve dynamic updating of the device list displayed on the HomeKit client. Attached Figure Description

[0023] To more clearly illustrate the implementation methods in the embodiments of this application or related technologies, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings.

[0024] Figure 1 This illustrates one of the operational scenarios between a control device and an electronic device according to some embodiments;

[0025] Figure 2 A hardware configuration block diagram of an electronic device 200 according to some embodiments is shown;

[0026] Figure 3 This illustrates a second operational scenario between a control device and an electronic device according to some embodiments;

[0027] Figure 4 A third operational scenario between a control device and an electronic device according to some embodiments is illustrated;

[0028] Figure 5 One of the flowcharts illustrating a method for obtaining a device list according to some embodiments is shown;

[0029] Figure 6 A second schematic flowchart of a device list acquisition method according to some embodiments is shown;

[0030] Figure 7 A third schematic flowchart of a device list acquisition method according to some embodiments is shown;

[0031] Figure 8 A structural block diagram of the relationship between a mobile phone and a television according to some embodiments is shown;

[0032] Figure 9 A fourth flowchart illustrating a method for obtaining a device list according to some embodiments is shown;

[0033] Figure 10 Fifth of a flowchart illustrating a method for obtaining a device list according to some embodiments is shown. Detailed Implementation

[0034] To make the objectives and implementation methods of this application clearer, the exemplary implementation methods of this application will be clearly and completely described below with reference to the accompanying drawings of the exemplary embodiments of this application. Obviously, the exemplary embodiments described are only some embodiments of this application, and not all embodiments.

[0035] It should be noted that the brief descriptions of terms in this application are only for the convenience of understanding the embodiments described below, and are not intended to limit the embodiments of this application. Unless otherwise stated, these terms should be understood in their ordinary and common meaning.

[0036] The terms "first," "second," "third," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar or related objects or entities, and do not necessarily imply a specific order or sequence, unless otherwise specified. It should be understood that such terms are interchangeable where appropriate.

[0037] The terms “comprising” and “having”, and any variations thereof, are intended to cover but not exclude inclusion, for example, a product or device that includes a range of components is not necessarily limited to all of the components that are clearly listed, but may include other components that are not clearly listed or that are inherent to such product or device.

[0038] The electronic device provided in this application can have various implementation forms, such as a television, a smart television, a laser projection device, a monitor, an electronic bulletin board, an electronic table, a mobile phone, a tablet computer, a laptop computer, a handheld computer, an in-vehicle electronic device, etc.

[0039] Figure 1 This is a schematic diagram of the operation scenario between the control device and the electronic device according to the embodiment. The control device 100 is equipped with a HomeKit app, and the electronic device 200 supports the HomeKit protocol. Therefore, after the control device 100 establishes a connection with the electronic device 200 through the HomeKit app, the user can control the electronic device 200 that supports the HomeKit protocol, as well as other devices that are directly or indirectly connected to the electronic device 200, through the HomeKit app installed on the control device 100.

[0040] In some embodiments, the control device 100 may be an iOS device with the HomeKit app installed and running the iOS operating system, such as an iPhone or iPad, or a device with the HomeKit app installed and running other operating systems. The control device 100 can establish a connection with the electronic device 200 via device discovery after connecting to the same wired or wireless network. Users can control the device 100 by inputting user commands through voice input, control panel input, gesture input, etc.

[0041] like Figure 2 The electronic device 200 includes at least one of the following: a tuner / demodulator 210, a communicator 220, a detector 230, an external device interface 240, a controller 250, a display 260, an audio output interface 270, a user interface 280, an external memory, and a power supply.

[0042] In some embodiments, the controller includes a processor, a video processor, an audio processor, a graphics processor, RAM, ROM, and a first interface to an nth interface for input / output.

[0043] The display 260 includes a display screen assembly for presenting images, a driving assembly for driving image display, a component for receiving image signals from the controller output, and a user control UI interface for displaying video content, image content, menu control interface, and user control UI interface.

[0044] The display 260 can be an LCD display, an OLED display, or a projection display, and can also be a projection device and a projection screen.

[0045] The communicator 220 is a component used to communicate with external devices or servers according to various communication protocol types. For example, the communicator may include at least one of the following: a Wi-Fi module, a Bluetooth module, a wired Ethernet module, other network communication protocol chips or near-field communication protocol chips, and an infrared receiver. The electronic device 200 can establish the transmission and reception of control signals and data signals with the external control device 100 or the server 400 through the communicator 220.

[0046] User interface 280 can be used to receive control signals from control device 100 (such as an infrared remote control). It can also be used to directly receive user input operation commands and convert the operation commands into commands that electronic device 200 can recognize and respond to; in this case, it can be called a user input interface.

[0047] Detector 230 is used to collect signals from the external environment or to interact with the external environment. For example, detector 230 includes a light receiver, a sensor for collecting ambient light intensity; or, detector 230 includes an image acquisition device, such as a camera, which can be used to collect external environmental scenes, user attributes, or user interaction gestures; or, detector 230 includes a sound acquisition device, such as a microphone, for receiving external sounds.

[0048] The external device interface 240 may include, but is not limited to, one or more of the following: High Definition Multimedia Interface (HDMI), analog or high-definition component input interface (component), composite video input interface (CVBS), USB input interface (USB), RGB port, etc. It may also be a composite input / output interface formed by multiple interfaces mentioned above.

[0049] The tuner / demodulator 210 receives broadcast television signals via wired or wireless means, and demodulates audio and video signals, such as EPG data signals, from multiple wireless or wired broadcast television signals.

[0050] In some embodiments, the controller 250 and the tuner 210 may be located in different separate devices, that is, the tuner 210 may also be located in an external device of the main device where the controller 250 is located, such as an external set-top box.

[0051] The controller 250 controls the operation of the electronic device and responds to user operations through various software control programs stored in memory (internal or external memory). The controller 250 controls the overall operation of the electronic device 200. For example, in response to receiving a user command to select a UI object to display on the display 260, the controller 250 can perform operations related to the object selected by the user command.

[0052] In some embodiments, the controller includes at least one of a central processing unit (CPU), a video processor, an audio processor, a graphics processing unit (GPU), and random access memory (RAM), read-only memory (ROM), a first to an nth interface for input / output, a communication bus, etc.

[0053] RAM, also known as main memory, is an internal memory that directly exchanges data with the controller. It can be read and written at any time (except during refresh) and is very fast, typically serving as temporary data storage for the operating system or other running programs. Its biggest difference from ROM is data volatility; data stored in RAM is lost when power is off. RAM is used in computers and digital systems to temporarily store programs, data, and intermediate results. ROM operates in a non-destructive read-only manner; information can only be read, not written. Once information is written, it is fixed and will not be lost even if power is cut off; therefore, it is also called fixed-function memory.

[0054] Users can input commands through a graphical user interface (GUI) displayed on the monitor 260, and the user input interface receives the user input commands through the GUI. Alternatively, users can input commands by entering specific sounds or gestures, and the user input interface receives the user input commands by recognizing the sounds or gestures through sensors.

[0055] A "user interface" is the medium through which an application or operating system interacts and exchanges information with the user. It converts information from its internal form to a form that the user can accept. A common form of user interface is the graphical user interface (GUI), which refers to a user interface related to computer operation displayed graphically. It can be an icon, window, control, or other interface element displayed on the screen of an electronic device. Controls can include visual interface elements such as icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, and widgets.

[0056] With the development of smart home technology, users can control all devices in their home that support the HomeKit protocol through the HomeKit app on their iOS devices. These devices include lights, locks, thermostats, smart plugs, and more.

[0057] Electronic devices equipped with the HomeKit protocol can also be discovered and controlled by the HomeKit app on iOS devices. Taking electronic device A as an example, after it is discovered and connected by the HomeKit app, the user can control electronic device A through the HomeKit app on the iOS device. The HomeKit app can not only control electronic device A, but also electronic device B connected to it, and even electronic device C connected to electronic device B. Thus, users can control multiple electronic devices through the HomeKit app on their iOS devices, providing great convenience.

[0058] According to the HomeKit protocol, the iOS device acts as the controller. The device list displayed on the iOS device is obtained during initialization after the iOS device connects to electronic device A. However, once the device list is initialized, no other devices that are subsequently directly or indirectly connected to electronic device A can be added to the list. In other words, after the iOS device connects to and initializes with electronic device A, it is not possible to dynamically update the device list displayed on the iOS device.

[0059] To address the aforementioned technical problems, this application provides a method for obtaining a device list. Specifically, it is a method for dynamically updating the device list based on the HomeKit protocol using preset device placeholders. The method involves: after establishing a connection with a HomeKit client based on the HomeKit protocol, receiving a device list acquisition request from the HomeKit client. This request instructs the acquisition of device information for each target device connected to the electronic device, including device identifiers. Based on the device list acquisition request, determining the device information of the electronic device and the device information of each target device, including the identifiers of the corresponding devices. Generating target information based on the device information of the electronic device, the device information of each target device, and at least one device placeholder, where each device placeholder indicates an unknown device to be connected, and the device information corresponding to each placeholder is empty. Sending the target information to the HomeKit client, so that the HomeKit client displays a device list based on the target information, including the identifier of the electronic device and the identifiers of each target device. In this way, by adding device placeholders to the target information, since each device placeholder is used to indicate an unknown device to be connected, and the device information corresponding to each device placeholder is empty, not only will the device list generated by the HomeKit client based on the target information not mislead users because it includes the identification of some unconnected devices, but also a space will be reserved in the device list for unknown devices to be connected. Therefore, when other devices establish a connection with the electronic device, the device information of the other device can be used to update a device placeholder in the target information to update the target information. Then, the HomeKit client updates the device list based on the updated target information to achieve dynamic updates of the device list displayed on the HomeKit client.

[0060] This application provides an electronic device and a device list acquisition method, wherein the electronic device can implement the device list acquisition method provided in this application embodiment, or a functional module or functional entity in the electronic device can implement the device list acquisition method provided in this application embodiment. The electronic device includes: a communicator and a controller, respectively corresponding to the above-described... Figure 2The communicator 220 and controller 250 are shown in the diagram. The HomeKit client can be the control device 100 shown in the diagram, or it can be the HomeKit app installed on the control device 100. The specific choice can be determined according to the actual situation and is not limited here.

[0061] In some embodiments of this application, in order to enable the HomeKit client to dynamically update the device list of devices controlled by the electronic device, after the communicator establishes a connection with the HomeKit client based on the HomeKit protocol, it receives a device list retrieval request sent by the HomeKit client, which instructs the acquisition of device information (including device identifiers) of each target device connected to the electronic device; the controller determines the device information of the electronic device and the device information of each target device based on the device list retrieval request, the device information including the identifier of the corresponding device; then, it generates target information based on the device information of the electronic device, the device information of each target device, and at least one device placeholder; the communicator sends the target information to the HomeKit client so that the HomeKit client displays the device list based on the target information, the device list including the identifier of the electronic device and the identifiers of each target device. In this embodiment, by adding device placeholders to the target information, since each device placeholder is used to indicate an unknown device to be connected, and the device information corresponding to each device placeholder is empty, not only will the device list generated by the HomeKit client based on the target information not mislead the user because it includes the identification of some unconnected devices, but also a space will be reserved in the device list for unknown devices to be connected. Therefore, when other devices establish a connection with the electronic device, the device information of the other device can be used to update a device placeholder in the target information to update the target information. Then, the HomeKit client updates the device list based on the updated target information to dynamically update the device list displayed on the HomeKit client.

[0062] Each device placeholder indicates an unknown device to be connected. Think of it as a reserved space in the target information for the device information of that device. Thus, the device list generated by the HomeKit client based on the target information reserves a space for the device to be connected. The device to be connected can be any device that is directly or indirectly connected to an electronic device; there are no restrictions here.

[0063] HomeKit client devices are used to discover and control electronic devices and other devices connected to them (directly or indirectly). After the HomeKit client and the electronic device are connected to the same wired or wireless network, the HomeKit client performs device discovery. Once the HomeKit client discovers the electronic device, it establishes a connection with it. The specific process can be found in existing related technologies and will not be elaborated here.

[0064] After establishing a connection with an electronic device, the HomeKit client sends a device list retrieval request to the device and then receives the target information from the device. The HomeKit client generates the device list based on this target information. Specifically, it generates the device list based on the identifiers of the electronic devices and each target device in the target information. Since the device information corresponding to the device placeholders is empty, the device list does not include the identifiers of the unknown devices to be connected indicated by these placeholders. In other words, the HomeKit client displays the identifiers of devices whose device information in the target information is not empty in the device list, ignoring device placeholders whose device information in the target information is empty and not displaying them in the device list.

[0065] In this context, a direct connection between an electronic device and device A refers to a wired or wireless connection between the electronic device and device A, without the need for other devices. An indirect connection between an electronic device and device B refers to a connection between the electronic device and device B via device C; this can also be understood as a direct connection between the electronic device and device C, and vice versa. Device A and device C can be considered the inherent connection of the electronic device, while device B can be considered the extended connection.

[0066] In some embodiments of this application, when an electronic device detects that it has established a connection (direct or indirect) with another device, the identifier of that other device can be dynamically updated in the device list so that the HomeKit client can control the newly connected other device.

[0067] In some embodiments of this application, after the controller sends the target information to the HomeKit client, it detects that the first device has established a connection with the electronic device; then it updates a device placeholder in the target information to the device information of the first device to update the target information; the communicator sends the updated target information to the HomeKit client so that the HomeKit client updates the device list based on the updated target information, and the updated device list includes the identifier of the electronic device, the identifier of each target device and the identifier of the first device.

[0068] In this embodiment, when the first device establishes a connection with the electronic device, a device placeholder in the target information is replaced with the device information of the first device to obtain updated target information. Then, the updated target information is sent to the HomeKit client so that the HomeKit client adds the identifier of the first device to the device list based on the information of the first device in the updated target information. This enables the dynamic updating of the device list displayed by the HomeKit client when a new device is connected to the electronic device. In this process, there is no need for the electronic device to disconnect from the HomeKit client and then reconnect. Instead, the device list displayed by the HomeKit client is dynamically updated while the electronic device and the HomeKit client remain connected.

[0069] In this embodiment of the application, when an electronic device detects that it has lost connection (direct or indirect) with a target device, the identifier of the target device can be dynamically removed from the device list to prevent the user from controlling the disconnected target device through the HomeKit client.

[0070] In some embodiments of this application, after the controller sends the target information to the HomeKit client, it detects that the second device has disconnected from the electronic device, where the second device is any one of the target devices; then it updates the device information of the second device in the target information with a device placeholder to update the target information; then the communicator sends the updated target information to the HomeKit client so that the HomeKit client updates the device list based on the updated target information, and the updated device list includes the identifier of the electronic device and the identifiers of each of the target devices other than the second device.

[0071] In some embodiments of this application, after the controller sends the target information to the HomeKit client, it detects that the second device has disconnected from the electronic device, where the second device is any one of the target devices; then it deletes the device information of the second device from the target information to update the target information; then the communicator sends the updated target information to the HomeKit client so that the HomeKit client updates the device list based on the updated target information, and the updated device list includes the identifier of the electronic device and the identifiers of each of the target devices other than the second device.

[0072] In this embodiment, when the second device disconnects from the electronic device, a device placeholder can be used to replace the device information of the second device in the target information, or the device information of the second device can be deleted from the target information to obtain updated target information. Then, the updated target information is sent to the HomeKit client so that the HomeKit client can delete the identifier of the second device from the device list based on the updated target information that does not include the device information of the second device. This enables the dynamic updating of the device list displayed by the HomeKit client when an already connected device connects to the electronic device. This process does not require the electronic device to disconnect from the HomeKit client and then reconnect. Instead, the device list displayed by the HomeKit client is dynamically updated while the electronic device and the HomeKit client remain connected.

[0073] In this embodiment of the application, the number of devices directly connected to the electronic device or indirectly connected to the electronic device is not limited. The specific number can be determined according to the actual situation and is not limited here.

[0074] In some embodiments of this application, each target device includes at least one third device, each third device being directly connected to the electronic device. That is, each target device is a third device, and each target device is a device directly connected to the electronic device.

[0075] For example, such as Figure 3 As shown, the HomeKit client is a mobile phone 301 with the HomeKit app installed, the electronic device is a TV 201 that supports the HomeKit protocol, and at least one third device is three third devices, each of which is an HDMI device 302 that is directly connected to the TV via an HDMI interface.

[0076] In some embodiments of this application, each target device includes at least one third device and at least one fourth device; wherein each third device is directly connected to the electronic device, and each fourth device is connected to the electronic device through a corresponding third device. That is, a target device is either a third device or a fourth device. The at least one fourth device can be connected to the electronic device through the same third device or through different third devices, which can be determined according to the actual situation and is not limited here.

[0077] For example, such as Figure 4As shown, the HomeKit client is a mobile phone 301 with the HomeKit app installed, the electronic device is a TV 302 that supports the HomeKit protocol, at least one third device is two third devices, at least one fourth device is two fourth devices, each third device is an HDMI device 303 that is directly connected to the TV via an HDMI interface, and each fourth device is an HDMI device 304 that is directly connected to one of the third devices via an HDMI interface.

[0078] In this embodiment, the connection method between the target device and the electronic device that are directly connected to the electronic device is not limited, nor is the connection method between the target device and the electronic device that are indirectly connected to the electronic device. It can be a wired interface connection, such as a High Definition Multimedia Interface (HDMI) connection or a USB interface connection, or a wireless connection, such as a Bluetooth connection or a WiFi connection. The specific connection method can be determined according to the actual situation and is not limited here.

[0079] In some embodiments of this application, the electronic device is connected to each of the third devices via an HDMI interface; in cases where each target device includes the at least one fourth device, each third device is connected to the corresponding third device via an HDMI interface.

[0080] HDMI is a digital video / audio interface technology, a dedicated digital interface suitable for image transmission. It can transmit audio and video signals simultaneously, with a maximum data transfer speed of 2.25 GB / s, without requiring digital-to-analog or analog-to-digital conversion before signal transmission. HDMI can be paired with High-bandwidth Digital Content Protection (HDCP) technology to prevent unauthorized copying of copyrighted audio and video content. The extra capacity of HDMI can be used for future upgrades to audio and video formats.

[0081] In this embodiment of the application, when the electronic device and each target device are devices with displays, and when the transmitted data is audio and video data, connecting through the HDMI interface can improve the data transmission efficiency, protect the security of the data during transmission, and support future upgrades to audio and video formats.

[0082] In some embodiments of this application, the device information may also include the type of the corresponding device; the device list may also include the type of the electronic device and the type of each target device.

[0083] For example, when an electronic device connects to and initializes with a HomeKit client, the device list includes the identifier and type of the electronic device, as well as the identifier and type of each target device; when a connection is established between the electronic device and a first device, the device list is updated to include the identifier and type of the electronic device, the identifier and type of each target device, and the identifier and type of the first device; when a disconnection is detected between the electronic device and a second device, the device list is updated to include the identifier and type of the electronic device, as well as the identifiers and types of the other target devices besides the second device.

[0084] In this embodiment, the device information includes the device type. The device list can then display the device identifier and type. This allows users to better understand the identifier and type of each device based on the device list displayed by the HomeKit client, and thus better control each device according to their needs.

[0085] In some embodiments of this application, the number of each target device and the number of the at least one device placeholder are equal to a first preset value; or, the number of the at least one device placeholder is equal to a second preset value.

[0086] The first and second preset values ​​can be determined according to the actual situation, and are not limited here.

[0087] In some embodiments of this application, the first preset value is greater than the second preset value.

[0088] In this embodiment, the total number of devices controlled by the HomeKit client based on the connection with the electronic device can be set according to the attributes of the electronic device and the total number of devices controlled by the HomeKit client input by the user (i.e., the total number of electronic devices, each target device, and at least one device placeholder, i.e., the sum of the first preset value and 1). The number of at least one device placeholder can also be set according to the attributes of the electronic device and the total number of devices controlled by the HomeKit client input by the user (i.e., the second preset value). In this way, the number of device placeholders to be added in the target information can be set according to actual needs, which can improve the management efficiency of the device list.

[0089] To illustrate this solution in more detail, the following will use examples to illustrate it. Figures 5 to 10 To explain, it is understandable that Figures 5 to 10The steps involved may include more or fewer steps in actual implementation, and the order of these steps may also differ, as long as the device list acquisition method provided in this application embodiment can be achieved. The executing entity of the device list acquisition method can be an electronic device, or a functional module or functional entity within the electronic device that can implement the device list acquisition method; no limitation is made here. Furthermore, the specific description of the device list acquisition method provided in this application embodiment can be found in the relevant description of the aforementioned electronic device, and the same or similar technical effects can be achieved; further details are omitted here.

[0090] Figure 5 The flowchart illustrates the steps of a device list acquisition method implemented according to one or more embodiments of this application. The device list acquisition method may include:

[0091] S501. After establishing a connection with the HomeKit client based on the HomeKit protocol, receive a device list retrieval request sent by the HomeKit client.

[0092] The device list retrieval request is used to instruct the retrieval of device information for each target device connected to the electronic device, including the device's identifier.

[0093] S502. Based on the device list retrieval request, determine the device information of the electronic device and the device information of each target device.

[0094] The device information includes the identifier of the corresponding device.

[0095] S503. Generate target information based on the device information of the electronic device, the device information of each target device, and at least one device placeholder.

[0096] Each device placeholder is used to indicate an unknown device to be connected, and the device information corresponding to each device placeholder is empty.

[0097] S504. Send the target information to the HomeKit client so that the HomeKit client can display a list of devices based on the target information.

[0098] The device list includes the identifier of the electronic device and the identifier of each target device.

[0099] In this embodiment, by adding device placeholders to the target information, since each device placeholder is used to indicate an unknown device to be connected, and the device information corresponding to each device placeholder is empty, not only will the device list generated by the HomeKit client based on the target information not mislead the user because it includes the identification of some unconnected devices, but also a space will be reserved in the device list for unknown devices to be connected. Therefore, when other devices establish a connection with the electronic device, the device information of the other device can be used to update a device placeholder in the target information to update the target information. Then, the HomeKit client updates the device list based on the updated target information to dynamically update the device list displayed on the HomeKit client.

[0100] In some embodiments of this application, combined with Figure 5 ,like Figure 6 As shown, after S504 above, the device list acquisition method provided in this application embodiment may further include S505 to S507 below.

[0101] S505: A connection between the first device and the electronic device has been detected.

[0102] S506. Update the target information by replacing one of the device placeholders with the device information of the first device.

[0103] S507. Send the updated target information to the HomeKit client so that the HomeKit client updates the device list based on the updated target information.

[0104] The updated device list includes the identifier of the electronic device, the identifier of each target device, and the identifier of the first device.

[0105] In some embodiments of this application, combined with Figure 5 ,like Figure 7 As shown, after S504 above, the device list acquisition method provided in this application embodiment may further include S508 to S510 below.

[0106] S508: The second device has been detected as disconnected from the electronic device.

[0107] The second device is any one of the target devices.

[0108] S509. Update the device information of the second device in the target information with a placeholder for that device to update the target information.

[0109] S510. Send the updated target information to the HomeKit client so that the HomeKit client updates the device list based on the updated target information.

[0110] The updated device list includes the identifier of the electronic device and the identifiers of each of the target devices, excluding the second device.

[0111] In some embodiments of this application, each target device includes at least one third device; or, each target device includes at least one third device and at least one fourth device; wherein each third device is directly connected to the electronic device, and each fourth device is connected to the electronic device through a corresponding third device.

[0112] In some embodiments of this application, the electronic device is connected to each of the third devices via an HDMI interface; in cases where each target device includes the at least one fourth device, each third device is connected to the corresponding third device via an HDMI interface.

[0113] In some embodiments of this application, the device information may also include the type of the corresponding device; the device list may also include the type of the electronic device and the type of each target device.

[0114] In some embodiments of this application, the number of each target device and the number of the at least one device placeholder are equal to a first preset value; or, the number of the at least one device placeholder is equal to a second preset value.

[0115] For example, taking an iOS device as a phone, an electronic device as a TV, and the electronic device connected to other devices via HDMI, according to the HomeKit protocol, the device list displayed on the phone is initialized after the phone and TV are connected. Once the list is initialized, no new devices can be added. Although the number of HDMI ports on a TV is fixed and remains so after the phone and TV are connected, devices connected to the HDMI ports of external devices can be extended to connect to other HDMI devices; this data is dynamic. Given that the phone and TV have already established a connection, this data cannot be dynamically added to the phone; therefore, the phone cannot dynamically display newly connected devices.

[0116] For example, such as Figure 8As shown, the mobile phone acts as the control terminal, with the HomeKit app installed on it, while the TV is the controlled terminal that supports the HomeKit protocol. The TV consists of a HomeKit proxy module 601, a data processing module 602, and a device management module 603. The HomeKit Proxy module 601 is responsible for establishing a network connection and data communication with the mobile phone. The system receives control commands and data (including device list retrieval requests) sent from the mobile phone. The data processing module 602 is responsible for parsing the control commands and data, receiving device list retrieval requests forwarded by the HomeKit Proxy, forwarding the parsed device list retrieval requests to the device management module 603, and receiving device information from the device management module, as well as device information from each device directly or indirectly connected to the TV. The data processing module then adds at least one device placeholder based on the TV's device information and the device information of each device, reassembles the data, generates target information, and returns the target information to the HomeKit Proxy module 601 so that the HomeKit Proxy module 601 can return it to the mobile phone. The device management module 603 obtains the TV's device information, the device information of each device connected to the TV, and determines the number of devices connected to the TV, and reports this information to the data processing module 602.

[0117] In the following description, the inherent device list information includes the device information of the TV and the device information of devices directly connected to the TV; the extended device list information includes the device information of devices indirectly connected to the TV. When the TV is directly or indirectly connected to the target device via an HDMI interface, the device management module 603 identifies the connection information corresponding to each HDMI interface of the TV, determines the third device connected to the TV's inherent HDMI interface, and obtains the corresponding device information of the third device. Then, based on the TV's device information and the device information of each third device, it determines the inherent device list information; then, through the HDMI interface, it obtains the fourth device connected to the third device directly connected to the TV via the HDMI interface, obtains the device information of the fourth device, and then obtains the extended device list based on the device information of each fourth device.

[0118] In some embodiments of this application, such as Figure 9 As shown, the device list acquisition method provided in this application embodiment includes the following steps S701 to S710.

[0119] S701: After the mobile phone and TV are connected to the same network, the device is discovered through the HomeKit app and a connection is established with the TV.

[0120] S702. Once the connection between the mobile phone and the TV is established, the mobile phone sends a device list retrieval request to the TV.

[0121] After receiving the device list retrieval request, the HomeKit Proxy module of the S703 TV sends the device list retrieval request to the data processing module.

[0122] S704, the TV's data processing module sends a device list retrieval request to the device management module.

[0123] After receiving the device list retrieval request, the TV's HomeKit Proxy module calls the TV's data processing module to request the device list from the device management module.

[0124] S705, the device management module obtains the inherent device list information and the extended device list information.

[0125] It is understandable that the device management module obtains the number of the TV's native HDMI ports and the TV's device information, as well as the device information of the devices connected to the HDMI ports, to obtain the inherent device list information. At the same time, it obtains whether any expansion devices are connected to the devices already connected to the HDMI ports, and obtains the device information of the expansion devices connected to the devices already connected to the HDMI ports, to obtain the expansion device list information.

[0126] S706. The device management module returns the inherent device list information and the extended device list information to the data processing module.

[0127] S707 The data processing module adds N device placeholders to the existing device list information and the extended device list information, sets the device names to empty, and generates target information.

[0128] S708, the data processing module returns the target information to the HomeKit Proxy module.

[0129] The S709 and HomeKit Proxy modules send target information to the mobile phone.

[0130] S710: After receiving the target information, the mobile phone displays a list of devices based on the target information.

[0131] This can be understood as the phone displaying the identifiers or types of each inherent device based on the device information in the inherent device list, and displaying the identifiers or types of each extended device based on the device information in the extended device list, while ignoring device placeholders. Alternatively, it can be understood as the phone displaying the device information of devices whose device information in the target information is not empty, ignoring and not displaying placeholders for devices with empty device information. This completes the initialization of the device list, reserving space for devices to be connected in the initialized device list.

[0132] In some embodiments of this application, after the device list initialization is complete, if the user connects a new extended device during TV use, the HomeKit app on the mobile phone needs to be notified to update the list, such as... Figure 10 The specific process includes the following steps S801 to S808.

[0133] The S801 and HomeKit Proxy modules send listening commands to the data processing module to listen for any devices connected to the TV or devices connected to the TV.

[0134] S802, the data processing module forwards the monitoring command to the device management module.

[0135] S803 The device management module responds to the listening command and, when it detects a new extended device connected to the TV, obtains the device information of the newly connected extended device.

[0136] S804. The device management module returns the device information of the newly connected extended device to the data processing module.

[0137] The device management module can update the device information of the newly connected extended device to the extended device list information and then send it to the data processing module, or it can send the device information of the newly connected extended device to the data processing module separately.

[0138] S805. The data processing module receives the device information of the newly connected extended device and replaces a device placeholder in the target information with the newly connected extended device information to update the target information.

[0139] S806, the data processing module sends the updated target information to the HomeKit Proxy module.

[0140] The S807 and HomeKit Proxy modules send the updated target information to the phone.

[0141] S808: After receiving the updated target information, the mobile phone displays the updated device list based on the updated target information.

[0142] As you can understand, after the device management module detects a new extended device connecting, it returns the device information of the newly connected extended device to the data processing module. The data processing module then updates a device placeholder in the target information with the device information of the newly connected extended device, setting the name, type, and other information of the newly connected extended device. In this way, the device placeholder becomes a real device. The updated target information is sent to the mobile device through the HomeKit Proxy module. After receiving the updated target information, the mobile device refreshes the device placeholder in the list. Since the placeholder now has real information such as name and type, it can be refreshed and displayed in the device list on the mobile device.

[0143] This invention also provides a computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements the various processes of the device list acquisition method described above and achieves the same technical effect. To avoid repetition, it will not be described again here.

[0144] The computer-readable storage medium can be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.

[0145] The present invention provides a computer program product, comprising: when the computer program product is run on a computer, causing the computer to implement the above-described device list acquisition method.

[0146] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

[0147] For ease of explanation, the above description has been provided in conjunction with specific embodiments. However, the above exemplary discussion is not intended to be exhaustive or to limit the embodiments to the specific forms disclosed above. Various modifications and variations can be obtained based on the above teachings. The selection and description of the above embodiments are for the purpose of better explaining the principles and practical applications, thereby enabling those skilled in the art to better utilize the described embodiments and various different variations of embodiments suitable for specific use considerations.

Claims

1. An electronic device, characterized in that, include: The communicator is configured to: after establishing a connection with a HomeKit client based on the HomeKit protocol, receive a device list retrieval request sent by the HomeKit client, the device list retrieval request being used to instruct the acquisition of device information of each target device connected to the electronic device, the device information including the device identifier; The controller is configured to: based on the device list acquisition request, determine the device information of the electronic device and the device information of each target device, wherein the device information includes the identifier of the corresponding device; Target information is generated based on the device information of the electronic device, the device information of each target device, and at least one device placeholder. Each device placeholder is used to indicate an unknown device to be accessed, and the device information corresponding to each device placeholder is empty. The communicator is further configured to send the target information to the HomeKit client, so that the HomeKit client displays a device list based on the target information, the device list including the identifiers of the electronic devices and the identifiers of each target device; The controller is further configured to: after sending the target information to the HomeKit client, detect that a second device has disconnected from the electronic device, wherein the second device is any one of the target devices; The device information of the second device in the target information is updated with a device placeholder to update the target information; The communicator is further configured to send the updated target information to the HomeKit client, so that the HomeKit client updates the device list based on the updated target information, wherein the updated device list includes the identifier of the electronic device and the identifiers of each of the target devices other than the second device.

2. The electronic device according to claim 1, characterized in that, The controller is further configured to: detect that the first device has established a connection with the electronic device after sending the target information to the HomeKit client; Update one of the device placeholders in the target information with the device information of the first device to update the target information; The communicator is further configured to send the updated target information to the HomeKit client, so that the HomeKit client updates the device list based on the updated target information, wherein the updated device list includes the identifier of the electronic device, the identifier of each target device, and the identifier of the first device.

3. The electronic device according to claim 1, characterized in that, Each of the target devices includes: at least one third device; or, Each of the target devices includes: at least one third device and at least one fourth device; Each of the third devices is directly connected to the electronic device, and each of the fourth devices is connected to the electronic device through the corresponding third device.

4. The electronic device according to claim 1, characterized in that, The electronic device is connected to each of the third devices via an HDMI interface; In the case where each target device includes the at least one fourth device, each third device is connected to the corresponding third device via an HDMI interface.

5. The electronic device according to claim 1, characterized in that, The device information also includes the type of the corresponding device; the device list also includes the type of the electronic device and the type of each target device.

6. The electronic device according to any one of claims 1 to 5, characterized in that, The number of each target device and the number of the at least one device placeholder are equal to a first preset value; or, The number of at least one device placeholder is equal to a second preset value.

7. A method for obtaining a device list, characterized in that, Applied to electronic devices, including: After establishing a connection with the HomeKit client based on the HomeKit protocol, a device list retrieval request is received from the HomeKit client. The device list retrieval request is used to instruct the acquisition of device information for each target device connected to the electronic device. The device information includes the device identifier. Based on the device list retrieval request, determine the device information of the electronic device and the device information of each target device, wherein the device information includes the identifier of the corresponding device; Target information is generated based on the device information of the electronic device, the device information of each target device, and at least one device placeholder. Each device placeholder is used to indicate an unknown device to be accessed, and the device information corresponding to each device placeholder is empty. The target information is sent to the HomeKit client so that the HomeKit client displays a device list based on the target information, the device list including the identifiers of the electronic devices and the identifiers of each target device; After sending the target information to the HomeKit client, it is detected that the second device has disconnected from the electronic device, where the second device is any one of the target devices; The device information of the second device in the target information is updated with a device placeholder to update the target information; The updated target information is sent to the HomeKit client so that the HomeKit client updates the device list based on the updated target information. The updated device list includes the identifier of the electronic device and the identifiers of each of the target devices other than the second device.

8. The method according to claim 7, characterized in that, After sending the target information to the HomeKit client, the method further includes: A connection was detected between the first device and the electronic device; Update one of the device placeholders in the target information with the device information of the first device to update the target information; The updated target information is sent to the HomeKit client so that the HomeKit client updates the device list based on the updated target information. The updated device list includes the identifier of the electronic device, the identifier of each target device, and the identifier of the first device.

9. A computer-readable storage medium, characterized in that, include: A computer program is stored on a computer-readable storage medium, which, when executed by a processor, implements the device list acquisition method as described in claim 7 or 8.