Electronic device and device control method

By setting up first and second communication interfaces in electronic devices to establish communication connections with terminal devices and devices to be distributed to the network, the problem of inconvenient interaction between the control end and Matter devices in the distribution network is solved, and the distribution network efficiency is improved.

WO2025001613A1PCT designated stage expired Publication Date: 2025-01-02HISENSE VISUAL TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/093733
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-08-14
Filing Date
2024-05-16
Publication Date
2025-01-02

AI Technical Summary

Technical Problem

Due to different home structure designs, the distance between the control terminal and Matter devices may be far, making Bluetooth connection difficult and scanning QR codes inconvenient, resulting in inconvenient network configuration and interaction.

Method used

By setting a first communication interface in the electronic device to establish a first communication connection with the terminal device, using the terminal device to scan the identification code information, and establishing a wireless communication channel with the device to be distributed through a second communication interface, wireless communication scanning and distribution can be realized.

Benefits of technology

It improves the network configuration efficiency between electronic devices and devices to be configured, solves the problems of distance and inconvenient scanning, and realizes a more convenient network configuration process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024093733_02012025_PF_FP_ABST
    Figure CN2024093733_02012025_PF_FP_ABST
Patent Text Reader

Abstract

The present disclosure provides an electronic device and a device control method. In response to a network configuration instruction inputted by a user, the electronic device sends, to a terminal device, the device information of a device to be subjected to network configuration, then acquires, by means of a first communication channel, identification code information generated by scanning a paring code corresponding to the device information by the terminal device, and on the basis of the identification code information, carries out wireless communication scanning on a network configuration device within a first preset range, so as to establish, when generating a first scanning result, a second communication channel with the device to be subjected to network configuration, and complete network configuration of the device to be subjected to network configuration. According to the present disclosure, the electronic device is connected to the terminal device, and the device to be subjected to network configuration is scanned by means of the terminal device, so that scanning is carried out within the wireless communication range of the electronic device by means of the identification code information of the device to be subjected to network configuration, thereby conveniently establishing a connection between the electronic device and the device to be subjected to network configuration, and improving the network configuration efficiency between the electronic device and the device to be subjected to network configuration.
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 the Chinese application No. 202311016639.4 filed on August 14, 2023; and No. 202310772834.3 filed on June 27, 2023, the entire contents of which are incorporated by reference into this disclosure. Technical Field

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

[0004] The Matter protocol is an open-source smart home connectivity protocol that supports interconnection between smart home devices and control platforms, enabling the operation of smart home devices to be controlled through the control platform. Matter devices are smart home hardware products that support the Matter protocol and can connect to and be controlled by Matter controllers. Examples include light bulbs, switches, sensors, thermostats, blind motors, door locks, bridge devices, and media players.

[0005] Matter devices require network configuration through a control terminal to operate normally. The control terminal can be other home devices such as smart TVs and computers. The control terminal can complete the connection through Bluetooth connection or by scanning the QR code on the Matter device, thereby enabling the control terminal to configure the network for the Matter device. However, due to different structural designs of home appliances, if the control terminal is far away from the Matter device to be configured, it cannot connect to the Bluetooth of the Matter device, and it is not convenient to scan the QR code on the Matter device, which makes the network configuration interaction between the control terminal and the Matter device inconvenient.

[0006] Summary of the Invention

[0007] An embodiment of the present disclosure provides an electronic device, which may include: a user input interface, which may be configured to receive instructions from a user; a first communication interface, which may be configured to establish a first communication channel with a terminal device; a second communication interface, which may be configured to establish a second communication channel with a device to be networked; a memory, which may be configured to store computer instructions and data associated with the electronic device; at least one processor, connected to the user input interface, the first communication interface, the second communication interface and the memory, and may be configured to execute computer instructions so that the electronic device performs the following: in response to a network configuration instruction input by the user, sending device information of the device to be networked to the terminal device, wherein the terminal device and the electronic device are in the same network environment; obtaining identification code information through the first communication channel, wherein the identification code information is generated by the terminal device scanning a pairing code corresponding to the device information; performing wireless communication scanning on network configuration devices within a first preset range according to the identification code information; if a first scanning result is generated, establishing a second communication channel with the device to be networked, and performing network configuration on the device to be networked through the second communication channel.

[0008] An embodiment of the present disclosure provides a device control method, which may include: in response to a network configuration instruction input by a user, sending device information of a device to be configured to a terminal device, wherein the terminal device and the electronic device are in the same network environment; obtaining identification code information through a first communication channel, wherein the identification code information is generated by the terminal device scanning a pairing code corresponding to the device information; performing wireless communication scanning on the configuration devices within a first preset range according to the identification code information; if a first scanning result is generated, establishing a second communication channel with the device to be configured, and performing network configuration on the device to be configured through the second communication channel. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] FIG1 is a schematic diagram of an application scenario according to some embodiments;

[0010] FIG2 is a block diagram of a hardware configuration of a control device 100 according to some embodiments;

[0011] FIG3 is a hardware configuration diagram of an electronic device according to some embodiments;

[0012] FIG4 shows a software configuration diagram of the display device 200 according to some embodiments;

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

[0014] FIG6 is a flow chart of generating network distribution device information according to some embodiments;

[0015] FIG7 is a schematic diagram of a process of a terminal device scanning a pairing code according to some embodiments;

[0016] FIG8 is a flowchart of network distribution device information pairing according to some embodiments;

[0017] FIG9 is a flowchart of determining pairing failure based on the first pairing duration according to some embodiments;

[0018] FIG10 is a flowchart of refreshing the first pairing duration according to added network configuration device information according to some embodiments;

[0019] FIG11 is a flowchart of pairing based on network distribution device information within a second preset range according to some embodiments;

[0020] FIG12 is a flow chart illustrating pairing based on network configuration feedback information according to some embodiments;

[0021] FIG13 is another flow chart of a device control method according to some embodiments;

[0022] FIG14 is another flow chart of a device control method according to some embodiments;

[0023] FIG15 is another flow chart of a device control method according to some embodiments;

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

[0025] FIG17 is another flow chart of a device control method according to some embodiments;

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

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

[0028] FIG20 is another flow chart of a device control method according to some embodiments. DETAILED DESCRIPTION

[0029] Figure 1 is a schematic diagram of an operation scenario between a terminal device and a control device according to an embodiment. As shown in Figure 1 , a user can operate an electronic device 200 through a terminal device 300 or a control device 100 .

[0030] In some embodiments, the control device 100 may be a remote controller, and communication between the remote controller and the electronic device 200 may include infrared protocol communication, Bluetooth protocol communication, or other short-range communication methods, to control the electronic device 200 wirelessly or wiredly. A user may control the electronic device 200 (e.g., a television, laser projection equipment, monitor, electronic bulletin board, electronic table, etc.) by inputting user commands through buttons on the remote controller, voice input, or control panel input.

[0031] In some embodiments, a terminal device 300 (such as a mobile phone, tablet computer, computer, laptop computer, etc.) can also be used to control the electronic device 200. For example, the electronic device 200 can be controlled using an application running on the terminal device 300.

[0032] In some embodiments, the electronic device 200 may not use the above-mentioned terminal device 300 or the control device 100 to receive instructions, but may receive user control through touch or gestures.

[0033] In some embodiments, the electronic device 200 can also be controlled in ways other than the control device 100 and the terminal device 300. For example, the user's voice command control can be directly received through a module for obtaining voice commands configured inside the electronic device 200, or the user's voice command control can be received through a voice terminal device set outside the electronic device 200.

[0034] In some embodiments, the electronic device 200 also communicates data with the server 400. The electronic device 200 may be connected to a local area network (LAN), a wireless local area network (WLAN), or other networks. The server 400 may provide various content and interactions to the electronic device 200. The server 400 may be a single cluster or multiple clusters, and may include one or more types of servers.

[0035] Figure 2 is a block diagram of the configuration of control device 100. As shown in Figure 2, control device 100 may include a processor 110, a communication interface 130, a user input / output interface 140, an external memory, and a power supply. Control device 100 can receive user input commands and convert them into commands that electronic device 200 can recognize and respond to, acting as an intermediary for interaction between the user and electronic device 200.

[0036] As shown in FIG3 , the electronic device 200 may include at least one of a tuner 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.

[0037] In some embodiments, the processor 250 may include at least one processor, such as a video processor, an audio processor, a graphics processor, RAM, ROM, and first to nth interfaces for input / output.

[0038] The display 260 may include the following components, namely: a display screen component for presenting images; a driving component for driving image display; a component for receiving image signals output from the processor 250 to display video content, image content, and a menu control interface, as well as a component for user control UI interface, etc.

[0039] The display 260 may be a liquid crystal display, an OLED display, or a projection display, and may also be a projection device and a projection screen.

[0040] Communication device 220 is a component used to communicate with external devices or server 400 using various communication protocols. For example, the communication device may include at least one of a Wi-Fi module, a Bluetooth module, a wired Ethernet module, or other network communication protocol chip or a near-field communication protocol chip, as well as an infrared receiver. Electronic device 200 can use communication device 220 to send and receive control signals and data signals with control device 100 or server 400.

[0041] The user interface 280 may be configured to receive a control signal from the control device 100 (eg, an infrared remote controller, etc.).

[0042] Detector 230 is used to collect signals from the external environment or external interactions. For example, detector 230 may include a light receiver, a sensor for collecting ambient light intensity; or, detector 230 may include an image collector, such as a camera, for collecting external environmental scenes, user attributes, or user interaction gestures; or, detector 230 may include a sound collector, such as a microphone, for receiving external sounds or voice commands from the user.

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

[0044] The tuner / demodulator 210 can receive broadcast television signals via wired or wireless reception, and demodulate audio and video signals, such as EPG data signals, from multiple wireless or wired broadcast television signals. In some embodiments, the processor 250 and the tuner / demodulator 210 can be located in different separate devices, that is, the tuner / demodulator 210 can also be located in an external device of the main device where the processor 250 is located, such as an external set-top box.

[0045] The processor 250 controls the operation of the terminal device 300 and responds to user operations through various software control programs stored in the memory. The processor 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 be displayed on the display 260, the processor 250 may perform operations related to the object selected by the user command.

[0046] In some embodiments, the processor 250 may include at least one of a central processing unit (CPU), a video processor, an audio processor, a graphics processing unit (GPU), RAM (Random Access Memory, RAM), ROM (Read-Only Memory, ROM), a first interface to an nth interface for input / output, a communication bus, etc.

[0047] The user may input a user command through a graphical user interface (GUI) displayed on the display 260, and the user input interface receives the user input command through the graphical user interface (GUI). Alternatively, the user may input a user command through a specific voice or gesture, and the user input interface may recognize the voice or gesture through a sensor to receive the user input command.

[0048] A user interface is the medium for interaction and information exchange between an application or operating system and the user. It converts information between its internal form and a user-friendly format. A common user interface is the graphical user interface (GUI), which refers to a graphical user interface related to computer operations. It can be an icon, window, control, or other interface element displayed on an electronic device's display. Controls can include visual interface elements such as icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, and widgets.

[0049] Referring to Figure 4, in some embodiments, the system can be divided into four layers, namely, from top to bottom, the application layer (referred to as "application layer"), the Android framework layer (referred to as "framework layer"), the Android runtime (Android runtime) and system library layer (referred to as "system runtime library layer"), and the kernel layer.

[0050] In some embodiments, at least one application runs in the application layer. These applications can be window programs, system settings programs, clock programs, etc. that come with the operating system, or applications developed by third-party developers. In specific implementations, the application packages in the application layer are not limited to the above examples.

[0051] The framework layer provides applications with an application programming interface (API) and programming framework. The application framework layer includes predefined functions. The application framework layer acts as a processing center, determining the actions taken by applications in the application layer. Applications use the API to access system resources and services during execution.

[0052] In some embodiments, the electronic device 200 can integrate a Matter application in the application layer. The Matter application can assist the electronic device 200 in establishing an interactive connection with the Matter device, thereby enabling the electronic device 200 to perform home control on the Matter device according to the Matter protocol. The Matter protocol is an open source smart home connection protocol that supports interconnection between smart home devices and a control platform, and can control the operating status of smart home devices through the control platform. In this embodiment, the electronic device 200 can be installed indoors to act as a control terminal to control Matter devices in the same area according to control instructions issued by the user.

[0053] Matter devices can be smart home hardware products that comply with the Matter protocol and can use electronic device 200 as their control terminal and be controlled by electronic device 200. Matter devices can be household appliances located in the same area as electronic device 200, such as light bulbs, switches, sensors, thermostats, blind motors, door locks, bridge devices, and media playback devices. Matter devices can be equipped with sensors or sensor switches to control the startup and operation of Matter devices.

[0054] In some embodiments, the electronic device 200 can be wirelessly connected to the Matter device, thereby controlling the Matter device through remote communication. For example, the user sends a voice command to the electronic device 200: "Please turn on the bedroom light." The processor 250 of the electronic device 200 can convert the voice command into a control command and send the control command to the bedroom light bulb through the wireless connection channel to turn on the bedroom light.

[0055] In the above embodiment, the electronic device 200 needs to send control instructions to the sensor of the Matter device through the wireless network, and the sensor will start or shut down the Matter device according to the control instructions. To this end, before the electronic device 200 controls the operation of the Matter device, it is necessary to perform Matter network configuration on the Matter device.

[0056] In some embodiments, the electronic device 200 can perform network configuration on the Matter device through wireless communication, for example, by starting the Bluetooth module of the electronic device 200 and searching for the device to be configured to complete the pairing connection and thus complete the network configuration. The electronic device 200 can also be provided with an image acquisition interface, and connected to a camera through the image acquisition interface, and the identification code on the Matter device is scanned by the camera. The identification code contains a network signal for establishing a network configuration connection with the Matter device, thereby completing the pairing connection between the electronic device 200 and the Matter device and realizing the network configuration of the Matter device by the control end.

[0057] However, due to different home design structures, electronic device 200 may be some distance away from the Matter device to be networked. When electronic device 200 is far away from the Matter device, it cannot connect to the Matter device's Bluetooth. Furthermore, due to the large footprint of electronic device 200, it is not convenient to scan the QR code on the Matter device, making network interaction between electronic device 200 (likely a control terminal) and the Matter device inconvenient.

[0058] In order to solve the problem of difficult network configuration interaction between the control end and the Matter device, an embodiment of the present disclosure provides an electronic device 200, which may include a first communication interface and a second communication interface, wherein the first communication interface is used to establish a first communication connection with the terminal device 300, and the second communication interface is used to establish a second communication connection with the device to be configured.

[0059] The first communication connection can be established via a WiFi connection or the same hotspot network. The terminal device 300 can be a mobile device such as a smart phone or a smart watch, so that after the electronic device 200 is connected to the terminal device 300, the terminal device 300 can scan the identification code of the device to be networked.

[0060] In some embodiments, the electronic device 200 and the terminal device 300 may have an application for Matter connection installed on them. The electronic device 200 and the terminal device 300 may simultaneously launch the application to pair the two devices using their identity information and establish a first communication channel. In this embodiment, to ensure a stable network environment for the first communication channel, the electronic device 200 and the terminal device 300 may be in the same network environment.

[0061] In some embodiments, the electronic device 200 may further include at least one processor 250, which is connected to the display, the user input interface, the first communication interface, the second communication interface, and the memory, and may be configured to execute computer instructions to cause the electronic device 200 to perform the process shown in FIG5 :

[0062] S100: In response to a network configuration instruction input by a user, the device information of the device to be configured is sent to the terminal device.

[0063] In some embodiments, a user can input a network configuration instruction to the electronic device 200 through various input methods, such as voice, gestures, a touchpad, or a remote control. The network configuration instruction may include device information of the device to be configured, which may include information such as the device name, device model, device installation location, and device readiness status. As shown in FIG6 , when a user inputs the network configuration instruction "Please turn on the light in the master bedroom" into the electronic device 200 by voice, the processor performs voice recognition on the network configuration instruction, thereby obtaining that the location of the device to be configured is "master bedroom" and the device type is "light," and then sends the above network configuration information to the terminal device 300 via the first communication channel.

[0064] The periphery of the electronic device 200 may include one or more devices having Matter protocol functions, wherein the device to be networked is the Matter device specified in the network configuration instruction.

[0065] In some embodiments, before receiving the network configuration instruction, the processor may also establish a communication connection with the power system in the area where the electronic device 200 is located, which may be a home interior, an office area, a home exhibition area, etc. The processor may determine the readiness status of the device to be configured through the power system based on the device information of the device to be configured, such as the power level of the device to be configured, whether the device to be configured has a fault, etc., and send the device information to the terminal device 300 based on the readiness status.

[0066] S200: Acquire authentication code information through the first communication channel.

[0067] The authentication code information is generated by the terminal device 300 scanning the pairing code corresponding to the device information. After the terminal device 300 obtains the device information of the device to be configured sent by the electronic device 200, the user can activate the camera of the terminal device 300 and call the scan box to scan the pairing code of the device to be configured through the terminal device 300.

[0068] The terminal device 300 can use the Matter connection application to display the device information of the device to be paired on the terminal device 300's display, prompting the user to hold the terminal device 300 close to the device to be paired and scan the pairing code on the device to be paired with the terminal device 300. The terminal device 300 can parse the pairing code to obtain the authentication code information. The authentication code information is the authentication information of the device to be paired. Each Matter device has a unique authentication code information, which is used to identify the corresponding Matter device.

[0069] The terminal device 300 may return the authentication code information to the electronic device 200 through the first communication channel, so that the processor can search for the device to be networked according to the authentication code information.

[0070] In some embodiments, as shown in FIG7 , the processor may send a code scanning instruction to the terminal device 300 via the first communication channel while sending the device information of the device to be networked to the terminal device 300. After receiving the device information of the device to be networked and the code scanning instruction, the terminal device 300 may establish a code scanning task based on the device information to prompt the user to complete scanning of the pairing code corresponding to the device information through the terminal device 300. After generating the code scanning task, the processor may send a prompt message to the terminal device 300 at a first interval to remind the user to complete the scanning task as soon as possible through the terminal device 300. After the terminal device 300 completes the scan, the code scanning task may be cancelled.

[0071] In some embodiments, in order to prevent non-network-pairing devices from performing network configuration on the device to be configured, the pairing code can also be set with a decoding key. After the terminal device 300 scans the pairing code, the scanned code information obtained by scanning the pairing code can be obtained, and the scanned code information can be decoded using the pre-stored decoding key to obtain the identification code information, thereby improving the security of the device to be configured.

[0072] In some embodiments, the terminal device 300 can convert the pairing code into a digital signal through optical recognition technology and extract the identification code information from the digital signal. In the above process, the terminal device 300 can obtain the pairing code through the image acquisition interface and identify the type of the pairing code, for example, whether the pairing code is a QR code or a barcode, and then use the image processing recognition algorithm to identify the shape of the pairing code and the black and white bars in the pairing code, etc., and then convert it into a digital signal according to the position of these black and white bars to extract the identification code information.

[0073] S300: Perform wireless communication scanning on network distribution devices within a first preset range according to the authentication code information.

[0074] After receiving the authentication code information, the electronic device 200 needs to search for the network device to be configured based on the authentication code information, establish a second communication channel with the network device to be configured through the second communication interface, and thus complete the network configuration of the network device to be configured. In this embodiment, the network configuration device can be scanned by wireless communication.

[0075] In some embodiments, wireless communication may include technologies such as Bluetooth modules, infrared scanning, radio or electromagnetic waves. However, different wireless communication technologies have different coverage scanning ranges. Therefore, wireless communication scanning can be performed on network distribution devices within a first preset range. The first preset range is the coverage range of the communication method with the largest wireless communication coverage range.

[0076] Since different wireless communication technologies cover different scanning ranges, for network distribution devices that are less than the first distance from the electronic device 200, infrared scanning, electromagnetic waves and other technologies can be used to perform scanning. For network distribution devices that are greater than the first distance from the electronic device 200, Bluetooth modules, radio and other wireless communication technologies can be used to perform scanning, and the network distribution devices around the electronic device 200 are paired one by one through scanning to determine the device to be networked.

[0077] It should be noted that the network configuration devices are all Matter devices, which are equipped with a communication device for being scanned by the electronic device 200. When the Matter device is in working state or standby state, the communication device can continuously send communication signals to the outside to facilitate the electronic device 200 to perform scanning and pairing on it.

[0078] In some embodiments, the processor may detect the wireless communication operation state of the electronic device 200 based on the authentication code information sent by the terminal device 300. If the wireless communication operation state is not started, the processor may switch the wireless communication operation state to the started state.

[0079] When the processor detects that the wireless communication operation state is enabled, it starts to perform wireless communication scanning for network configuration devices within a first preset range and obtains network configuration device information of the scanned network configuration devices. In order to screen the network configuration devices to be configured, the processor can perform pairing based on the network configuration information using the authentication code information.

[0080] Among them, in order to facilitate pairing, as shown in Figure 8, the processor can generate a device information table based on the network configuration device information obtained by scanning. When the first network configuration device information appears in the device information table, the processor can start pairing through the identification code information. During the pairing process, the processor continuously performs wireless communication scanning on the network configuration devices around the electronic device 200, and adds its network configuration device information one by one to the device information table to save the time used for pairing and improve the network configuration efficiency.

[0081] The network configuration device information may include the identification code information of the network configuration device. The processor can compare the identification code information of the device to be configured with the identification code information of other network configuration devices. If the identification code information of the other network configuration devices is the same as the identification code information of the device to be configured, it means that the pairing is successful.

[0082] In some embodiments, the processor may record a first pairing duration of the electronic device 200 when the electronic device 200 performs a wireless communication device scan on the network pairing device, and the processor may pair the network pairing device information according to the identification code information within the first pairing duration.

[0083] As shown in FIG9 , the embodiment of the present disclosure may further determine whether the pairing of the electronic device 200 fails through the following steps S310 to S314:

[0084] S310, pairing network device information through authentication code information;

[0085] S311. Record the first pairing duration;

[0086] S312: Determine whether the first pairing duration is greater than a first duration threshold;

[0087] S313: If it is greater than, pairing fails;

[0088] S314: If not, continue pairing.

[0089] In the above process, a first time threshold is set to assist in determining the pairing result. When the first pairing duration exceeds the first time threshold, it means that no pairing is found to a network configuration device with the same authentication code information within the first time threshold. In some embodiments, since the pairing process is still underway based on scanning of network configuration devices and adding network configuration device information, the first pairing duration may also include the waiting time for scanning. To this end, as shown in FIG10 , the first pairing duration may also be recorded when pairing is performed on the most recently added network configuration device information, and the first pairing duration may be re-timed when new network configuration device information is added.

[0090] S400: If a first scanning result is generated, a second communication channel is established with the device to be networked, and network configuration is performed on the device to be networked through the second communication channel.

[0091] When the first scan result is generated, it indicates that the network configuration device information of the device to be configured has been obtained within the scanning range of electronic device 200. Therefore, a second communication channel can be directly established with the device to be configured. The wireless communication method of the second communication channel can be different from that of the first communication channel. For example, the first communication channel can be a wireless network connection, and the second communication channel can be a Bluetooth communication connection. After the second communication channel is established with the device to be configured, network configuration can be performed on the device to be configured through the second communication channel.

[0092] In some embodiments, the electronic device 200 can also obtain authentication code information by inputting an authentication code. The user can control the electronic device 200 to display an authentication code input box through the control device 100, and input the authentication code information through the keyboard on the control device 100, so that the electronic device 200 obtains the authentication code information.

[0093] When the first scanning result is not generated, it indicates that the electronic device 200 fails to pair with the network device to be paired. At this time, a second scanning result is generated.

[0094] The second scan result indicates that the electronic device 200 has not scanned any other network-pairing devices that are paired with the device to be network-paired. This indicates that none of the other network-pairing devices located around the electronic device 200 are devices to be network-paired. In some embodiments, to expand the scanning range for searching for devices to be network-paired, after generating the second scan result, the second scan result can be sent to the terminal device 300. Upon receiving the second scan result, the terminal device 300 activates its wireless communication operating module, such as its Bluetooth module, based on the second scan result.

[0095] When the terminal device 300 activates the Bluetooth module, it also has the ability to scan for network devices. At this time, the terminal device 300 can scan for other network devices in the second preset area through Bluetooth communication and obtain device information of these network devices. The second preset area is the maximum wireless communication scanning coverage range of the terminal device 300.

[0096] In some embodiments, a terminal scanning instruction may be generated based on the second scanning result. The terminal scanning instruction is used to instruct the terminal device 300 to start the wireless communication operation module. The terminal scanning instruction may be sent to the terminal device 300. In response to the terminal scanning instruction, the terminal device 300 starts the wireless communication operation module and begins to perform wireless communication scanning on the coverage area where the terminal device 300 is located.

[0097] Since the terminal device 300 is a certain distance away from the electronic device 200, the terminal device 300 can scan a range that the electronic device 200 cannot scan, thereby expanding the range of scanning devices to be networked. Therefore, as shown in Figure 11, the terminal device 300 can obtain networked device information outside the scanning range of the electronic device 200, and return this networked device information to the electronic device 200 as networked device feedback information corresponding to the terminal scanning instruction.

[0098] After receiving the device information sent by the terminal device 300, the device information sent by the terminal device 300 can be added to the original device information table, and pairing can be continued for these device information.

[0099] In some embodiments, there may be overlapping scanning areas between the first preset range and the second preset range. When there is a network distribution device in the overlapping scanning area, for ease of description, this embodiment defines the network distribution device located in the overlapping scanning area as an overlapping device. Both the electronic device 200 and the terminal device 300 can scan and obtain the network distribution device information of the overlapping device, thereby obtaining the network distribution device information of the overlapping device multiple times, reducing the network distribution efficiency. To this end, at least one processor of the electronic device 200 can also execute computer instructions to enable the electronic device to perform steps S121 to S as shown in Figure 12:

[0100] S121. Obtain distribution network feedback information;

[0101] S122, determining whether the distribution network device information of the overlapping device can be included;

[0102] S123. If it cannot be included, performing pairing on the distribution network feedback information;

[0103] S124. If it can be included, filter out the distribution network equipment information of the overlapping equipment;

[0104] S125. Perform pairing on the remaining distribution network feedback information;

[0105] In the above process, after receiving network configuration feedback information, the network configuration feedback information can be filtered based on the network configuration device information in the device information table. The network configuration feedback information may include one or more network configuration device information. The network configuration device information in the current device information table can be obtained, and the network configuration feedback information can be traversed based on the network configuration device information in the current device information table. If the network configuration feedback information includes network configuration device information that already exists in the device information table, it indicates that the network configuration device corresponding to the network configuration device information is a duplicate device. In this case, the network configuration device information in the device information table is retained, and the network configuration device information of the duplicate device in the network configuration feedback information is deleted.

[0106] After the screening is completed, the network configuration device information that is not the overlapping device in the network configuration feedback information is added to the device information table, and the network configuration device information in the network configuration feedback information is paired according to the identification code information. When there is successfully paired network configuration device information in the network configuration feedback information, the network configuration device corresponding to the successfully paired network configuration device information can be marked as the device to be configured.

[0107] In some embodiments, the network configuration feedback information can also be paired through the terminal device 300. Since the terminal device 300 has scanned the pairing code with the network configuration device, the terminal device 300 can also include identification code information. For this reason, the terminal device 300 can also perform the above-mentioned steps of filtering out the network configuration device information of overlapping devices in the network configuration feedback information, and pair the network configuration device information in the network configuration feedback information through the identification code information.

[0108] After the terminal device 300 successfully pairs the network configuration device information using the authentication code information, a network configuration instruction can be sent to the terminal device 300, thereby establishing a wireless communication connection between the terminal device 300 and the network configuration device. This wireless communication connection may include a Bluetooth communication connection. The terminal device 300 has already enabled the Bluetooth communication module when scanning the network configuration device information. Therefore, the terminal device 300 can directly issue a Bluetooth connection request to the network configuration device and wait for the network configuration device to respond to the Bluetooth connection request.

[0109] After receiving the Bluetooth connection request, the device to be paired automatically determines its connection status. If the device is currently establishing a Bluetooth communication connection with another device, it cannot establish a Bluetooth communication connection with the terminal device 300. In this case, the device to be paired can provide busy information to the terminal device 300. The busy information indicates that the device to be paired is currently connected to another device and the Bluetooth communication connection is busy. The busy information may also include device information about the device to which the device to be paired is currently connecting, as well as the duration of the connection, so that the user can obtain the current status of the device to be paired.

[0110] In some embodiments, since the size of the terminal device 300 is smaller than that of the electronic device 200, the user can hold the terminal device 300 and move it. Therefore, after generating the second scanning result, the movement information can be sent to the terminal device 300 through the first communication channel. The movement information can be displayed on the display of the terminal device 300 to prompt the user to move the terminal device 300 toward the device to be paired with the network, so that the terminal device 300 is paired with the device to be paired with the network.

[0111] In some embodiments, the location information of the terminal device 300 and the distance between the terminal device 300 and the device to be networked can also be obtained through the first communication channel. During the above process, the terminal device 300 can send a GPS positioning request to the server 400 to obtain the positioning information of the terminal device 300 fed back by the server 400, and then send the positioning information to the processor. Based on the positioning information of the terminal device 300 and the location of the device to be networked, corresponding movement information can be generated, thereby guiding the user to move the terminal device 300 according to the corresponding movement information.

[0112] In some embodiments, when a user moves the terminal device 300, the scanning range of the terminal device 300 may also change as the terminal device 300 moves. To this end, a movement trajectory of the terminal device 300 can be generated based on the positioning information of the terminal device 300 fed back by the server 400, and a second preset range can be defined based on the movement trajectory. The second preset range is the maximum range scanned by the terminal device 300 when moving along the movement trajectory. This allows the terminal device 300 to be controlled to obtain information about network distribution devices within the second preset range based on the authentication code information.

[0113] In some embodiments, the pairing time of the terminal device 300 can be timed, and the second pairing time of the terminal device 300 can be recorded through the first communication channel. Since the device model of the terminal device 300 is different from that of the electronic device 200, a second time threshold can be set to determine the pairing status of the terminal device 300. When the second pairing time exceeds the second time threshold, it means that the terminal device 300 has not been paired with the network distribution device within the second preset range. At this time, the terminal device 300 can generate a prompt message, and the prompt message is used to prompt that the terminal device 300 failed to pair within the second time threshold. The content of the prompt message can be in text or voice form, for example, "Pairing failed, please try again later!" After generating the prompt message, the terminal device 300 can send the prompt message to the electronic device 200. After receiving the prompt message, the electronic device 200 can re-execute the pairing according to the prompt message.

[0114] In some embodiments, the present disclosure provides a terminal device 300, which may include a display, a communication device, and a processor, wherein the communication device is used to establish a first communication channel with the electronic device 200, and the processor is configured to:

[0115] In response to a network configuration instruction input by a user, the device information of the device to be configured is received, which is sent by the electronic device 200 through the first communication channel, wherein the terminal device 300 and the electronic device 200 are in the same network environment.

[0116] Identification code information is sent to the electronic device 200 through the first communication channel, so that the electronic device 200 performs wireless communication scanning on the network configuration device within a first preset range according to the identification code information, the identification code information is generated according to the pairing code corresponding to the scanned device information, and when the electronic device 200 generates a first scanning result, the electronic device 200 establishes a second communication channel with the device to be configured, and performs network configuration on the device to be configured through the second communication channel.

[0117] It will be appreciated that in some embodiments, after receiving device information from the device to be networked, the user can activate a keyboard key or touch function configured on the terminal device 300. The processor can monitor the user's key press or touch event and generate a corresponding network configuration instruction based on the key press or touch event. In response to the network configuration instruction, the processor can control the display of the terminal device 300 to display a scan box. At this time, the user can manually adjust the position and angle of the terminal device 300 to align the scan box with the pairing code, thereby improving the accuracy of the terminal device 300 in recognizing the pairing code.

[0118] In some embodiments, the terminal device 300 may also receive a network configuration instruction sent by the electronic device 200, and the processor may respond to the network configuration instruction and execute the above method steps.

[0119] In some embodiments, the terminal device 300 may send a GPS positioning request to the server 400 to obtain the positioning information of the terminal device 300 fed back by the server 400, and send the positioning information to the processor. The processor may generate corresponding movement information based on the positioning information of the terminal device 300 and the location of the device to be configured, thereby guiding the user to move the terminal device 300 according to the corresponding movement information.

[0120] The present disclosure also provides a server 400, which may include a communication module and a processing module. The communication module is configured to establish a communication connection with the terminal device 300, and the processing module is configured to:

[0121] The device information of the device to be networked is received from the electronic device 200 , and the terminal device 300 and the electronic device 200 are in the same network environment.

[0122] The device information is sent to the terminal device 300 .

[0123] The authentication code information returned by the terminal device 300 is obtained, where the authentication code information is obtained by the terminal device 300 scanning the pairing code corresponding to the device information.

[0124] The identification code is sent to the electronic device 200, so that the electronic device 200 performs a wireless communication scan on the network configuration device within a first preset range according to the identification code information, and when the electronic device 200 generates a first scanning result, the electronic device 200 establishes a second communication channel with the device to be configured, and performs a network configuration operation on the device to be configured through the second communication channel.

[0125] It can be understood that the electronic device 200 can execute the step of obtaining the network configuration device information of the network configuration device to be configured on the terminal device 300 through the above-mentioned server 400. In this embodiment, the terminal device 300 and the electronic device 200 may not establish a first communication channel with each other, but only interact through the server 400.

[0126] Thus, in the embodiment of the present disclosure, the device information of the device to be networked can be sent to the terminal device in response to the network configuration instruction input by the user, and then the identification code information generated by the terminal device scanning the pairing code corresponding to the device information is obtained through the first communication channel, and a wireless communication scan is performed on the network configuration devices within the first preset range according to the identification code information, so that when the first scanning result is generated, a second communication channel is established with the device to be networked, and the network configuration of the device to be networked is completed. The present disclosure connects the electronic device to the terminal device, and scans the code of the device to be networked by the terminal device, so as to scan the identification code information of the device to be networked within the wireless communication range of the electronic device, thereby facilitating the establishment of a connection between the electronic device and the device to be networked, and improving the network configuration efficiency between the electronic device and the device to be networked.

[0127] In addition, considering that in actual applications, electronic devices such as televisions are usually defined as basic video players (Basic Video Player) device types in the Matter protocol, this type needs to support the media playback control function set (Media Playback Cluster). Among them, the Media Playback Cluster requires that electronic devices need to support at least the control of three playback instructions: play (Play), pause (Pause) and stop (Stop), and need to support at least the acquisition of four playback states: Playing, Paused, Not Playing and Buffering.

[0128] Because different playback content is played by different video applications (Application, App), electronic devices need to obtain the playback status of different video applications and control the playback instructions. These electronic devices need to establish separate docking interfaces with different video applications. Furthermore, the developer needs to write interface docking code to implement the docking interface between the electronic device and each video application.

[0129] However, the separate docking interfaces of electronic devices with different video applications will increase the management complexity and software cost of the interfaces on the electronic devices. The embodiment of the present disclosure provides a method for improving user satisfaction, wherein at least one processor in the electronic device 200 is further configured to execute computer instructions so that the electronic device performs: when a change in the playback state of the current video is detected by the video player, obtaining the target playback state of the current video through the video player; sending a status message carrying the target playback state to the Matter service in the form of Android broadcast through the video player; receiving the status message through the Matter service, and setting the current state attribute of the Matter service to the target playback state.

[0130] In the embodiments of the present disclosure, unless otherwise specified, the video player is a local player of the electronic device, that is, a player component provided by the system of the electronic device. The target playback state may include any of the following: Playing, Paused, Not Playing, and Buffering. It is understood that before the playback state of the current video changes, the playback state of the current video is also a playback state different from the target playback state among Playing, Paused, Not Playing, and Buffering.

[0131] In some embodiments, the change in playback status may be that the playback status changes from Playing to Paused (target playback status); the change in playback status may be that the playback status changes from Not Playing to Playing (target playback status); the change in playback status may be that the playback status changes from Buffering to Playing (target playback status); the specific changes can be determined based on actual conditions and are not limited here.

[0132] In some embodiments, the Matter service can send a state change message to the Matter control end device after setting the current state attribute to the target playback state. The state change message carries the target playback state, so that after the Matter control end device receives the state change message, it updates the playback state stored in the Matter control end device, thereby achieving synchronization of the playback state between the Matter service and the Matter control end device.

[0133] Among them, the Matter service sends a status change message to the Matter control end device. The Matter service can actively send a status change message to the Matter control end device after setting the current state attribute to the target playback state; or it can send a status change message to the Matter control end device after receiving a status acquisition instruction sent by the Matter control end device. The specific details can be determined according to actual conditions and are not limited here.

[0134] It should be noted that after the Matter service sets the current state attribute to the target playback state, it may or may not send a state change message to the Matter control end device. The specific determination can be made based on actual conditions and is not limited here.

[0135] Among them, the Matter control end device can be a device installed with a Matter control end, and interacts with the electronic device based on the Matter protocol through the Matter control end.

[0136] The video player may be a media player (MediaPlayer) or other players, which are not limited here.

[0137] In some embodiments, MediaPlayer is a player component provided by the Android system framework. Most video playback software uses this component to complete video playback. Therefore, the playback status can be obtained in MediaPlayer. When an application calls MediaPlayer to play a video, MediaPlayer sends Android broadcasts of Playing, Paused, Not Playing, and Buffering status changes based on the status of the ongoing playback. The Matter service receives this broadcast and changes the CurrentState property value. Specifically:

[0138] (1) Upon receiving the Playing broadcast sent by MediaPlayer, the Matter service sets the property value of the CurrentState property to Playing.

[0139] (2) Upon receiving the Paused broadcast from MediaPlayer, the Matter service sets the CurrentState property value to Paused.

[0140] (3) Upon receiving the Not Playing broadcast from MediaPlayer, the Matter service sets the CurrentState property value to Not Playing.

[0141] (4) Upon receiving the Buffering broadcast from MediaPlayer, the Matter service sets the CurrentState property value to Buffering.

[0142] In this way, video applications use MediaPlayer for playback without the need for interface docking. By sending an Android broadcast, the corresponding playback status can be obtained and set in the Matter protocol service. In this way, based on the Android broadcast method, a method for obtaining the playback status of multiple video applications is provided. Electronic devices do not need to dock with each video application separately to achieve playback status acquisition, which greatly reduces the management complexity and software cost of the interface on the electronic device.

[0143] In some embodiments, the reason for the change in the above-mentioned playback status may be that the electronic device switches the playback status of the current video in response to a user key operation (such as a remote control key operation) or touch operation on the electronic device; it may also be that the electronic device switches the playback status of the current video in response to a control instruction sent by a Matter control end device; it may also be that the electronic device changes the current video from Playing to Not Playing when it detects that the current video playback has ended or a playback error has occurred; it may also be other reasons, which can be determined specifically according to the time situation and are not limited here.

[0144] In some embodiments, when the reason for the above-mentioned change in playback status is in response to a control instruction sent by a Matter control end device, and the electronic device switches the playback status of the current video, at least one processor is further configured to execute computer instructions to enable the electronic device 200 to execute: when a change in the playback status of the current video is detected by the video player, before obtaining the target playback state of the current video through the video player, receiving a target control instruction for the target video application sent by the Matter control end device through the Matter service; generating a target key event corresponding to the target control instruction through the Matter service; calling the target system interface through the Matter service to send the target key event to the target system layer; sending the target key event to the target video application through the target system layer, so that the target video application controls the video player to execute the target control instruction based on the target key event.

[0145] The target control instruction may include any one of the following: Play, Pause, and Stop.

[0146] It can be understood that if the target control instruction is Play, the target key event is the Play key event, and the target playback status is Playing or Buffering, then the above-mentioned playback status changes from other playback status to Playing or Buffering; if the target control instruction is Pause, the target key event is the Pause key event, and the target playback status is Paused, then the above-mentioned playback status changes from other playback status to Paused; if the target control instruction is Stop, the target key event is the Stop key event, and the target playback status is Not Playing, then the above-mentioned playback status changes from other playback status to Not Playing.

[0147] It can be understood that in the embodiment of the present disclosure, the target key event corresponding to the target control instruction is simulated through the Matter service, and then the generated target key event is sent to the target system layer through the target system interface, and then the target key event is sent to the video player through the target system layer, so that the video player executes the target control instruction based on the target key event. In this way, the process of simulating the target key event corresponding to the target control instruction through the Matter service and reusing the target system interface to send the target key event to the video player realizes that the electronic device supports at least the control of three playback instructions of Play, Pause and Stop as a Media Playback Cluster. The electronic device does not need to interface with each video application separately, so the control of the playback instruction can be realized, which greatly reduces the management complexity and software cost of the interface on the electronic device.

[0148] In some embodiments, when the target system layer is an Android framework layer, the target system interface is an interface corresponding to the Android framework layer.

[0149] In some embodiments, the interface corresponding to the Android framework layer may be the android.app.Instrumentation interface.

[0150] In some embodiments, when the target system layer is a kernel layer, the target system interface is an interface corresponding to the kernel layer.

[0151] In some embodiments, the kernel layer may be a Linux kernel layer, and the interface corresponding to the Linux kernel layer is a uinput interface.

[0152] In some embodiments, when the target system layer is a driver layer, the target system interface is an interface corresponding to the driver layer.

[0153] In some embodiments, the interface corresponding to the driver layer is the / dev / input / eventX interface.

[0154] In some embodiments, the target key event may include a target key press event corresponding to the target control instruction and a target key pop-up event corresponding to the target control instruction. At least one processor is specifically configured to execute computer instructions so that the electronic device 200 enables the target video application to control the video player to execute the target control instruction based on the target key event through the following execution: generating the target key press event through the Matter service; calling the target system interface through the Matter service to send the target key press event to the target system layer; sending the target key press event to the target video application through the target system layer; after a preset time, generating the target key pop-up event through the Matter service; calling the target system interface through the Matter service to send the target key pop-up event to the target system layer; sending the target key pop-up event to the target video application through the target system layer, so that the target video application controls the video player to execute the target control instruction based on the target key press event and the target key pop-up event.

[0155] The preset duration can be determined according to actual conditions and is not limited here. In some embodiments, the preset duration can be 100ms.

[0156] In some embodiments, the Matter service starts the Matter protocol stack and listens for control commands sent by the Matter control device on the network port. The Android system has defined buttons for Play, Pause, and Stop. After receiving the playback control command, it sends the key event to the Android framework key module. The Android system will automatically distribute the response to the foreground video application. The process is as follows:

[0157] (1) When Matter's Media Playback Cluster receives the Play command, it first sends the Play button press event to the Android framework key module, waits for a short period of time, such as 100ms, and then sends the Play button pop-up event to the Android framework key module to simulate the process of pressing the Play button. Specifically, you can use KeyEvent.ACTION_DOWN and the key value KeyEvent.KEYCODE_MEDIA_PLAY to create a KeyEvent for pressing the Play button, and then use the android.app.Instrumentation.sendKeySync() interface to send the KeyEvent for pressing the Play button to the Android framework. After waiting for 100ms, use KeyEvent.ACTION_UP and the key value KeyEvent.KEYCODE_MEDIA_PLAY to create a KeyEvent for popping up the Play button, and then use the android.app.Instrumentation.sendKeySync() interface to send the KeyEvent for popping up the Play button to the Android framework.

[0158] (2) When Matter's Media Playback Cluster receives the Pause command, it first sends the Pause button press event to the Android framework key module, waits for a short period of time, such as 100ms, and then sends the Pause button pop-up event to the Android framework key module to simulate the process of pressing the Pause button. Specifically, you can use KeyEvent.ACTION_DOWN and the key value KeyEvent.KEYCODE_MEDIA_PAUSE to create a KeyEvent for pressing the Pause button, and then use the android.app.Instrumentation.sendKeySync() interface to send the Pause button press KeyEvent to the Android framework. After waiting for 100ms, use KeyEvent.ACTION_UP and the key value KeyEvent.KEYCODE_MEDIA_PAUSE to create a KeyEvent for popping up the Pause button, and then use the android.app.Instrumentation.sendKeySync() interface to send the Pause button pop-up KeyEvent to the Android framework.

[0159] (3) When Matter's Media Playback Cluster receives the Stop command, it first sends the Stop button press event to the Android framework key module, waits for a short period of time, such as 100ms, and then sends the Stop button pop-up event to the Android framework key module to simulate the process of pressing the Stop button. Specifically, you can use KeyEvent.ACTION_DOWN and the key value KeyEvent.KEYCODE_MEDIA_STOP to create a KeyEvent for pressing the Stop button, and then use the android.app.Instrumentation.sendKeySync() interface to send the KeyEvent for pressing the Stop button to the Android framework. After waiting for 100ms, use KeyEvent.ACTION_UP and the key value KeyEvent.KEYCODE_MEDIA_STOP to create a KeyEvent for popping up the Stop button, and then use the android.app.Instrumentation.sendKeySync() interface to send the KeyEvent for popping up the Stop button to the Android framework.

[0160] The video application needs to monitor and process corresponding key events on the playback interface to control the player to perform Play, Pause, and Stop operations.

[0161] Among them, calling the android.app.Instrumentation interface is only one way to simulate keystrokes on the Android system. This function can also be achieved using other simulation methods.

[0162] In some embodiments, the Matter service starts the Matter protocol stack and listens for control commands sent by the Matter control device on the network port. The Android system has defined buttons for Play, Pause, and Stop. Taking the uinput interface provided by the Linux kernel as an example: When the Matter service starts, the uinput descriptor is initialized. Here, taking the Android system as an example, the specific process is to first use the open function to open the " / dev / uinput" file, then use ioctl to create a virtual input device and initialize the corresponding buttons for Play, Pause, and Stop. At this time, the simulated button execution can be performed. The specific process can be:

[0163] When Matter's Media Playback Cluster receives the Play command, it creates an input_event structure and sets its type to EV_KEY, code to KEY_PLAY, and value to 1 (indicating a press). It then uses write to the open uinput file descriptor. It then creates an input_event structure and sets its type to EV_SYNC, code to SYNC_REPORT, and value to 0. It then uses write to the open uinput file descriptor to simulate the Play button press event. After waiting for 100ms, it creates an input_event structure and sets its type to EV_KEY, code to KEY_PLAY, and value to -1 (indicating a pop-up). It then uses write to the open uinput file descriptor. It then creates an input_event structure and sets its type to EV_SYNC, code to SYNC_REPORT, and value to 0. It then uses write to the open uinput file descriptor to simulate the Play button pop-up event.

[0164] The Stop and Pause key simulation process is the same as above, except that the key values ​​to be simulated are KEY_STOP and KEY_PAUSE, respectively. The video application needs to listen for and handle the corresponding key events on the playback interface to control the player to perform Play, Pause, and Stop operations.

[0165] In some embodiments, the Matter service starts the Matter protocol stack and listens to the control instructions sent by the Matter control device on the network port. The Android system has defined buttons for Play, Pause, and Stop, and the button simulation can also be performed by adding input nodes through the driver layer. For example, an input node can be registered in the driver layer by inserting a kernel module, such as " / dev / input / eventX". When Matter's Media Playback Cluster receives a Play command, it can write a KEY_PLAY press event to the driver node, then wait for 100ms, and then write a KEY_PLAY pop-up event to the driver node to implement the simulated input of the Play button; when Matter's Media Playback Cluster receives a Pause command, it can write a KEY_Pause press event to the driver node, then wait for 100ms, and then write a KEY_Pause pop-up event to the driver node to implement the simulated input of the Pause button; when Matter's Media Playback Cluster receives a Stop command, it can write a KEY_Stop press event to the driver node, then wait for 100ms, and then write a KEY_Stop pop-up event to the driver node to implement the simulated input of the Stop button.

[0166] In the disclosed embodiment, the Matter service simulates the final target key event by generating a target key press event and a target key release event.

[0167] In some embodiments, when the reason for the change in the above-mentioned playback status is in response to a control instruction sent by a Matter control end device, and the electronic device switches the playback status of the current video, at least one processor is further configured to execute computer instructions to enable the electronic device 200 to execute: receiving the target control instruction for the target video application sent by the Matter control end device through the Matter service; sending an instruction message carrying the target control instruction to the target video application in the form of Android broadcast through the Matter service, so that the target video application controls the video player to execute the target control instruction after receiving the instruction message.

[0168] The target control instruction may include any one of the following: Play, Pause, and Stop.

[0169] In the disclosed embodiments, without requiring interface docking, the electronic device can be controlled as a Media Playback Cluster by sending an Android broadcast to the video application, supporting at least three playback commands: Play, Pause, and Stop. This allows the electronic device to control playback commands without requiring separate interface docking with each video application, significantly reducing interface management complexity and software costs on the electronic device.

[0170] In some embodiments, when the target video application calls a target player corresponding to the target video application instead of a local video player of the electronic device for playback, the video application can obtain the target playback state of the target player when the video application detects that the playback state of the target player (the playback state of the current video) has changed; then the target video application sends a status message carrying the target playback state to the Matter service in the form of Android broadcast; the status message is received through the Matter service, and the current state attribute of the Matter service is set to the target playback state. For instruction control, please refer to the above description.

[0171] In some embodiments, at least one processor is further configured to execute computer instructions to cause the electronic device 200 to perform: when a change in the playback status of the current video is detected by the video player, obtaining the target playback status of the current video through the video player; storing the target playback status in a preset storage area; obtaining the target playback status from the preset storage area through the Matter service; and setting the current status attribute of the Matter service to the target playback status.

[0172] The target playback state may include any one of the following: Playing, Paused, Not Playing, and Buffering. It is understood that before the playback state of the current video changes, the playback state of the current video is also a playback state different from the target playback state among Playing, Paused, Not Playing, and Buffering.

[0173] The preset storage area may be a database type storage area, a file type storage area, or a memory variable type storage area, which may be determined based on actual conditions and is not limited here.

[0174] In an embodiment of the present disclosure, a method for obtaining the playback status of multiple video applications is provided by setting a preset storage area. The electronic device does not need to separately connect to the interface of each video application, so the playback status can be obtained, reducing the management complexity and software cost of the interface on the electronic device.

[0175] In some embodiments, the reason for the change in the above-mentioned playback status may be that the electronic device switches the playback status of the current video in response to a user key operation (such as a remote control key operation) or touch operation on the electronic device; it may also be that the electronic device switches the playback status of the current video in response to a control instruction sent by a Matter control end device; it may also be that the electronic device changes the current video from Playing to Not Playing when it detects that the current video playback has ended or a playback error has occurred; it may also be other reasons, which can be determined specifically according to the time situation and are not limited here.

[0176] In some embodiments, when the reason for the change in the above-mentioned playback state is that the electronic device switches the playback state of the current video in response to a control instruction sent by a received Matter control end device, the processor is further configured to: receive a target control instruction for the target video application sent by the Matter control end device through the Matter service, and the target control instruction may include any of the following: a play instruction, a pause instruction, and a stop instruction; generate a target key event corresponding to the target control instruction through the Matter service; call the target system interface through the Matter service to send the target key event to the target system layer; send the target key event to the target video application through the target system layer, so that the target video application controls the video player to execute the target control instruction based on the target key event. For a specific description, please refer to the above-mentioned related description, which will not be repeated here.

[0177] In some embodiments, when the target system layer is the Android framework layer, the target system interface is the interface corresponding to the Android framework layer; when the target system layer is the kernel layer, the target system interface is the interface corresponding to the kernel layer; when the target system layer is the driver layer, the target system interface is the interface corresponding to the driver layer. For detailed descriptions, please refer to the above related descriptions and will not be repeated here.

[0178] In some embodiments, the target key event may include a target key press event corresponding to the target control instruction and a target key pop-up event corresponding to the target control instruction. At least one processor is specifically configured to execute computer instructions so that the electronic device 200 causes the target video application to control the video player to execute the target control instruction based on the target key event by performing the following: generating the target key press event through the Matter service; calling the target system interface through the Matter service to send the target key press event to the target system layer; sending the target key press event to the target video application through the target system layer; after a preset time, generating the target key pop-up event through the Matter service; calling the target system interface through the Matter service to send the target key pop-up event to the target system layer; sending the target key pop-up event to the target video application through the target system layer, so that the target video application controls the video player to execute the target control instruction based on the target key press event and the target key pop-up event. For a specific description, please refer to the above-mentioned related description, which will not be repeated here.

[0179] In some embodiments, when the reason for the change in the above-mentioned playback state is in response to a control instruction sent by a received Matter control end device, and the electronic device switches the playback state of the current video, at least one processor is further configured to execute computer instructions to enable the electronic device 200 to execute: receiving a target control instruction for a target video application sent by the Matter control end device through the Matter service; and sending an instruction message carrying the target control instruction to the target video application in an Android broadcast manner through the Matter service, so that the target video application controls the video player to execute the target control instruction after receiving the instruction message. For a specific description, please refer to the above-mentioned related description, which will not be repeated here.

[0180] In order to explain the present solution in more detail, the following will be explained in an exemplary manner in conjunction with Figures 13 to 20. It can be understood that the steps involved in Figures 13 to 20 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, and 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.

[0181] FIG13 is a flowchart showing steps for implementing a device control method according to one or more embodiments of the present disclosure. The device control method may include S501 to S503.

[0182] S501: When a video player detects that a play state of a current video has changed, the video player obtains a target play state of the current video.

[0183] S502: Send a status message carrying the target playback status to the Matter service through the video player in an Android broadcast manner.

[0184] S503: Receive the status message through the Matter service, and set the current status attribute of the Matter service to the target playback status.

[0185] In some embodiments, in combination with FIG. 13 , as shown in FIG. 14 , before the above S501 , the device control method provided by the embodiment of the present disclosure may further include the following S504 to S507 .

[0186] S504: Receive a target control instruction for a target video application sent by the Matter control terminal device through the Matter service.

[0187] S505: Generate a target key event corresponding to the target control instruction through the Matter service.

[0188] S506: Call the target system interface through the Matter service to send the target key event to the target system layer.

[0189] S507: Send the target key event to the target video application through the target system layer, so that the target video application controls the video player to execute the target control instruction based on the target key event.

[0190] In some embodiments, when the target system layer is the Android framework layer, the target system interface is the interface corresponding to the Android framework layer; when the target system layer is the kernel layer, the target system interface is the interface corresponding to the kernel layer; when the target system layer is the driver layer, the target system interface is the interface corresponding to the driver layer.

[0191] In some embodiments, the target key event may include a target key press event corresponding to the target control instruction and a target key pop-up event corresponding to the target control instruction. Combined with Figure 14, as shown in Figure 15, the above S505 can be specifically implemented through the following S505a and S505b; the above S506 can be specifically implemented through the following S506a and S506b; the above S507 can be specifically implemented through the following S507a and S507b.

[0192] S505a: Generate the target button press event through the Matter service.

[0193] S506a: Call the target system interface through the Matter service to send the target button press event to the target system layer.

[0194] S507a: Send the target button press event to the target video application through the target system layer.

[0195] S505b: After the preset time, the target button pop-up event is generated through the Matter service.

[0196] S506b: Call the target system interface through the Matter service to send the target button pop-up event to the target system layer.

[0197] S507b: Send the target button pop-up event to the target video application through the target system layer, so that the target video application controls the video player to execute the target control instruction based on the target button press event and the target button pop-up event.

[0198] In some embodiments, in combination with FIG. 13 , as shown in FIG. 16 , before the above S501 , the device control method provided by the embodiment of the present disclosure may further include the following S508 to S509 .

[0199] S508: Receive a target control instruction for a target video application sent by the Matter control terminal device through the Matter service.

[0200] S509: Send an instruction message carrying the target control instruction to the target video application through the Matter service in an Android broadcast manner, so that the target video application controls the video player to execute the target control instruction after receiving the instruction message.

[0201] FIG17 is a flowchart showing steps for implementing a device control method according to one or more embodiments of the present disclosure. The device control method may include S901 to S904.

[0202] S901: When a video player detects that a play state of a current video has changed, the video player obtains a target play state of the current video.

[0203] S902: Store the target playback state in a preset storage area.

[0204] S903: Obtain the target playback status from the preset storage area through the Matter service.

[0205] S904: Set the current state attribute of the Matter service to the target playback state.

[0206] In some embodiments, in combination with FIG. 17 , as shown in FIG. 18 , before the above S901 , the device control method provided by the embodiment of the present disclosure may further include the following S905 to S508 .

[0207] S905: Receive a target control instruction for a target video application sent by the Matter control terminal device through the Matter service.

[0208] S906: Generate a target key event corresponding to the target control instruction through the Matter service.

[0209] S907: Call the target system interface through the Matter service to send the target key event to the target system layer.

[0210] S908: Send the target key event to the target video application through the target system layer, so that the target video application controls the video player to execute the target control instruction based on the target key event.

[0211] In some embodiments, when the target system layer is the Android framework layer, the target system interface is the interface corresponding to the Android framework layer; when the target system layer is the kernel layer, the target system interface is the interface corresponding to the kernel layer; when the target system layer is the driver layer, the target system interface is the interface corresponding to the driver layer.

[0212] In some embodiments, the target key event may include a target key press event corresponding to the target control instruction and a target key pop-up event corresponding to the target control instruction. Combined with Figure 18 and as shown in Figure 19, the above S906 can be specifically implemented through the following S906a and S906b; the above S907 can be specifically implemented through the following S907a and S907b; the above S908 can be specifically implemented through the following S908a and S908b.

[0213] S906a: Generate the target button press event through the Matter service.

[0214] S907a: Call the target system interface through the Matter service to send the target button press event to the target system layer.

[0215] S908a: Send the target button press event to the target video application through the target system layer.

[0216] S906b: After the preset time, the target button pop-up event is generated through the Matter service.

[0217] S907b: Call the target system interface through the Matter service to send the target button pop-up event to the target system layer.

[0218] S908b: Send the target button pop-up event to the target video application through the target system layer, so that the target video application controls the video player to execute the target control instruction based on the target button press event and the target button pop-up event.

[0219] In some embodiments, in combination with FIG. 17 , as shown in FIG. 20 , before the above S901 , the device control method provided by the embodiment of the present disclosure may further include the following S909 to S910 .

[0220] S909: Receive a target control instruction for a target video application sent by the Matter control terminal device through the Matter service.

[0221] S910. Send a command message carrying the target control instruction to the target video application through the Matter service in an Android broadcast manner, so that the target video application controls the video player to execute the target control instruction after receiving the command message.

[0222] The embodiment of the present disclosure also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the various processes of the above-mentioned device control method and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

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

[0224] The embodiment of the present disclosure further provides a computer program product, which may include: when the computer program product is run on a computer, the computer is enabled to implement the above-mentioned device control method.

Claims

1. An electronic device may include: A user input interface, which may be configured to receive instructions from a user; A first communication interface, which may be configured to establish a first communication channel with a terminal device; The second communication interface may be configured to establish a second communication channel with the network device to be configured; a memory that may be configured to store computer instructions and data associated with the electronic device; At least one processor is connected to the user input interface, the first communication interface, the second communication interface and the memory, and is configured to execute computer instructions to cause the electronic device to perform: In response to a network configuration instruction input by a user, the device information of the device to be configured is sent to a terminal device, where the terminal device and the electronic device are in the same network environment; Acquire authentication code information through the first communication channel, where the authentication code information is generated by the terminal device scanning a pairing code corresponding to the device information; Performing wireless communication scanning on the network distribution devices within the first preset range according to the identification code information; If the first scanning result is generated, a second communication channel is established with the device to be networked, and network configuration is performed on the device to be networked through the second communication channel.

2. The electronic device according to claim 1, wherein the at least one processor is specifically configured to execute computer instructions so that the electronic device obtains the authentication code information through the first communication channel by performing the following: Sending a scanning instruction to the terminal device through the first communication channel; Obtaining scanning information obtained by the terminal device scanning the pairing code; A decoding operation is performed on the scanned code information to obtain the authentication code information.

3. The electronic device according to claim 1, wherein the at least one processor is specifically configured to execute computer instructions so that the electronic device performs wireless communication scanning on the network distribution devices within the first preset range according to the identification code information by performing the following: Switching the wireless communication operation state of the electronic device to a start state according to the authentication code information; Performing wireless communication scanning on the network configuration devices within the first preset range to obtain network configuration device information; Perform pairing on the network configuration device information according to the authentication code information; If there is network configuration device information that is successfully paired, the first scanning result is generated, and the network configuration device corresponding to the network configuration device information is marked as a network configuration device to be configured.

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: Recording a first pairing duration of the electronic device; if the first pairing duration exceeds a first time threshold and the first scanning result is not generated, generating a second scanning result; Switching the wireless communication operation state of the terminal device to a start state according to the second scanning result; A wireless communication scan is performed on the network distribution devices within a second preset range through the terminal device.

5. The electronic device according to claim 4, wherein the at least one processor is specifically configured to execute computer instructions so that the electronic device performs wireless communication scanning on the network distribution devices within the second preset range through the terminal device by performing the following: Sending a terminal scanning instruction to the terminal device according to the second scanning result; Acquire network configuration feedback information sent by the terminal device, where the network configuration feedback information is network configuration device information acquired by the terminal device within the second preset range after the terminal device responds to the terminal scanning instruction; If there is successfully paired network configuration device information in the network configuration feedback information, the network configuration device corresponding to the network configuration device information is marked as a to-be-configured network configuration device; A network configuration instruction is sent to the terminal device, where the network configuration instruction is used to instruct the terminal device to establish a wireless communication connection with the device to be configured.

6. The electronic device according to claim 5, wherein the at least one processor is specifically configured to execute computer instructions so that the electronic device obtains the network configuration feedback information sent by the terminal device by performing the following: Obtaining a movement trajectory of the terminal device; Delimiting the second preset range according to the movement trajectory; According to the identification code information, the network configuration device information within the second preset range is obtained through the terminal device.

7. The electronic device according to claim 5, wherein the at least one processor is further configured to execute computer instructions to cause the electronic device to perform: Recording a second pairing duration of the terminal device through the first communication channel; If the second pairing time exceeds a second time threshold, the search failure prompt information generated by the terminal device is obtained.

8. The electronic device according to any one of claims 1 to 7, wherein the at least one processor is further configured to execute computer instructions to cause the electronic device to perform: When a video player detects that a play state of a current video has changed, the video player acquires a target play state of the current video; Sending a status message carrying the target playback status to the Matter service by means of Android broadcast via the video player; The status message is received through the Matter service, and a current status attribute of the Matter service is set to the target playback status.

9. The electronic device according to claim 8, wherein the at least one processor is further configured to execute computer instructions to cause the electronic device to perform: Receiving, through the Matter service, a target control instruction for a target video application sent by a Matter control terminal device; Generate a target key event corresponding to the target control instruction through the Matter service; Calling the target system interface through the Matter service to send the target key event to the target system layer; The target key event is sent to the target video application through the target system layer, so that the target video application controls the video player to execute the target control instruction based on the target key event.

10. The electronic device according to claim 9, wherein the at least one processor is further configured to execute computer instructions to cause the electronic device to perform: If the target system layer is an Android framework layer, determining that the interface corresponding to the Android framework layer is the target system interface; If the target system layer is a kernel layer, determining that the interface corresponding to the kernel layer is the target system interface; If the target system layer is a driver layer, it is determined that the interface corresponding to the driver layer is the target system interface.

11. The electronic device according to claim 9, wherein the target key event may include a target key press event corresponding to the target control instruction and a target key pop-up event corresponding to the target control instruction, and the at least one processor is specifically configured to execute computer instructions so that the electronic device causes the target video application to control the video player to execute the target control instruction based on the target key event by performing the following operations: Generate the target button press event through the Matter service; Calling the target system interface through the Matter service to send the target button pressing event to the target system layer; Sending the target button pressing event to the target video application through the target system layer; After a preset time, the target button pop-up event is generated through the Matter service; Calling the target system interface through the Matter service to send the target button pop-up event to the target system layer; The target key pop-up event is sent to the target video application through the target system layer, so that the target video application controls the video player to execute the target control instruction based on the target key press event and the target key pop-up event.

12. The electronic device according to claim 8, wherein the at least one processor is further configured to execute computer instructions to cause the electronic device to perform: Receiving, through the Matter service, a target control instruction for a target video application sent by a Matter control terminal device; The Matter service sends a message carrying the target control to the target video application in an Android broadcast manner. The target video application receives the instruction message and controls the video player to execute the target control instruction.

13. The electronic device according to any one of claims 1 to 7, wherein the at least one processor is further configured to execute computer instructions to cause the electronic device to perform: When a video player detects that a play state of a current video has changed, the video player acquires a target play state of the current video; Storing the target playback state in a preset storage area; Acquire the target playback state from the preset storage area through the Matter service; The current state attribute of the Matter service is set to the target playback state.

14. The electronic device according to claim 13, wherein the at least one processor is further configured to execute computer instructions to cause the electronic device to perform: Receive target control instructions for target video applications sent by the Matter control terminal device through the Matter service; Generate a target key event corresponding to the target control instruction through the Matter service; Calling the target system interface through the Matter service to send the target key event to the target system layer; The target key event is sent to the target video application through the target system layer, so that the target video application controls the video player to execute the target control instruction based on the target key event.

15. The electronic device according to claim 13, wherein the at least one processor is further configured to execute computer instructions to cause the electronic device to perform: Receiving, through the Matter service, a target control instruction for a target video application sent by a Matter control terminal device; The Matter service sends a command message carrying the target control command to the target video application in an Android broadcasting manner, so that the target video application controls the video player to execute the target control command after receiving the command message.

16. A device control method, applied to the electronic device according to any one of claims 1 to 15, the method may include: In response to a network configuration instruction input by a user, the device information of the device to be configured is sent to a terminal device, where the terminal device and the electronic device are in the same network environment; Acquire authentication code information through the first communication channel, where the authentication code information is generated by the terminal device scanning a pairing code corresponding to the device information; Performing wireless communication scanning on the network distribution devices within the first preset range according to the identification code information; If the first scanning result is generated, a second communication channel is established with the device to be networked, and network configuration is performed on the device to be networked through the second communication channel.

Citation Information

Patent Citations

  • Smart home appliance network distribution method, apparatus and system

    CN108366006A

  • Network distribution method and device, intelligent television and computer readable storage medium

    CN112367203A

  • Wireless remote network distribution method, control center and equipment

    CN114727367A

  • Electronic equipment, terminal equipment and equipment network distribution method

    CN117614758A

  • Electronic Device, Control Terminal, Non-Transitory Computer-Readable Storage Medium and Device Connection Method

    US20220038877A1