Electronic equipment, mobile terminal and method for controlling electronic equipment by mobile terminal

CN120476623APending Publication Date: 2025-08-12HISENSE VISUAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202380088678.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-08-14
Filing Date
2023-11-29
Publication Date
2025-08-12

AI Technical Summary

Technical Problem

It is difficult for smart home devices from different brands to be interconnected, causing users to face the problem of low adaptability when controlling electronic devices.

Method used

By realizing the exchange of device certification certificates and the installation of node operation certificates between electronic devices and mobile terminals, the same ecosystem is established to achieve cross-brand control capabilities.

Benefits of technology

It improves the adaptability of electronic devices to controlled scenarios, enables various mobile terminals to control electronic devices in a unified and standard manner, and enhances user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120476623A_ABST
    Figure CN120476623A_ABST
Patent Text Reader

Abstract

The invention relates to electronic equipment, a mobile terminal and a method for controlling the electronic equipment by the mobile terminal, and relates to the technical field of electronic equipment. The electronic equipment comprises a processor which is configured to respond to a received equipment authentication certificate request sent by a mobile terminal, and send an equipment authentication certificate to the mobile terminal, so that the mobile terminal performs security authentication according to the equipment authentication certificate; under the condition that the node operation certificate sent by the mobile terminal is received, the node operation certificate is installed, and network distribution is carried out, so that the electronic equipment and the mobile terminal are located in the same ecological system; and receiving operation information sent by the mobile terminal, and determining a corresponding control instruction according to the operation information so as to execute corresponding operation according to the control instruction. According to the embodiment of the invention, various mobile terminals can control the electronic equipment according to a unified standard, and the adaptability of the controlled scene of the electronic equipment is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Electronic device, mobile terminal, and method for mobile terminal to control electronic device

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to Chinese patent applications filed with the China Patent Office on February 10, 2023, with application number 202310109829.4, filed with the China Patent Office on June 27, 2023, with application number 202310772834.3, filed with the China Patent Office on July 27, 2023, with application number 202310936037.4, filed with the China Patent Office on July 27, 2023, with application number 202310938000.5, and filed with the China Patent Office on August 14, 2023, the entire contents of which are incorporated herein by reference. Technical Field

[0003] The present application relates to the technical field of electronic devices, and in particular to an electronic device, a mobile terminal, and a method for a mobile terminal to control the electronic device. Background Art

[0004] With the increase in smart terminals in the home, the interconnection between different smart terminals has brought convenience to users. Thanks to the development of multi-screen interactive technology, users can control the TV end to achieve functions such as power on and off, volume adjustment, etc. by operating the multi-screen interactive application on the mobile terminal. At present, different brands have developed different multi-screen interactive applications that can be installed on mobile terminals such as mobile phones. If the TV end wants to be controlled by the mobile phone, it is necessary to integrate the services provided by different brands and manufacturers and perform corresponding adaptation and development. In actual applications, the TV end often integrates the corresponding services of one or two multi-screen interactive applications, which is difficult to adapt to the various multi-screen interactive applications on the mobile phone end. The adaptability of electronic equipment to controlled scenarios is low.

[0005] Summary of the Invention

[0006] An embodiment of the present application provides an electronic device, including: a processor, configured to: in response to a device authentication certificate request received from a mobile terminal, send a device authentication certificate to the mobile terminal, so that the mobile terminal performs security authentication based on the device authentication certificate; in the case of receiving a node operation certificate sent by the mobile terminal, install the node operation certificate and perform network configuration so that the electronic device and the mobile terminal are in the same ecosystem; receive operation information sent by the mobile terminal, and determine corresponding control instructions based on the operation information, so as to perform corresponding operations based on the control instructions.

[0007] An embodiment of the present application provides a mobile terminal, including: a processor, configured to: send a device authentication certificate request to an electronic device; in response to the device authentication certificate received and returned by the electronic device, send the device authentication certificate to a server so that the server performs security authentication; upon receiving an authentication pass message returned by the server, send a node operation certificate to the electronic device so that the electronic device and the mobile terminal are in the same ecosystem; wherein the authentication pass message indicates that the electronic device has passed the security authentication; receive operation information input by a user, and send the operation information to the electronic device so as to control the electronic device according to the operation information.

[0008] An embodiment of the present application provides a method for a mobile terminal to control an electronic device, the method including: as an optional implementation of the embodiment of the present application, upon receiving a node operation certificate sent by a mobile terminal, installing the node operation certificate and performing network configuration, including: upon receiving a node operation certificate sent by a mobile terminal, verifying whether the node operation certificate is legal based on a root certificate; wherein the root certificate is a root certificate corresponding to the ecosystem to which the mobile terminal belongs; if the node operation certificate is legal, installing the node operation certificate and performing network configuration.

[0009] An embodiment of the present application provides a method for a mobile terminal to control an electronic device, the method comprising: sending a device authentication certificate request to the electronic device; in response to the device authentication certificate received and returned by the electronic device, sending the device authentication certificate to a server so that the server performs security authentication; upon receiving an authentication pass message returned by the server, sending a node operation certificate to the electronic device so that the electronic device and the mobile terminal are in the same ecosystem; wherein the authentication pass message indicates that the electronic device has passed the security authentication; receiving operation information input by a user, and sending the operation information to the electronic device so as to control the electronic device according to the operation information.

[0010] An embodiment of the present application provides a computer non-volatile readable storage medium, including: a computer program stored on the computer non-volatile readable storage medium, and when the computer program is executed by a processor, the method for a mobile terminal to control an electronic device as shown in the third aspect or the fourth aspect is implemented.

[0011] An embodiment of the present application provides a computer program product, which includes a computer program. When the computer program runs on a computer, it enables the computer to implement the method of a mobile terminal controlling an electronic device as shown in the third aspect or the fourth aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] FIG1 is a schematic diagram of a scenario in some embodiments according to the embodiments of the present application;

[0013] FIG2 is a block diagram of a configuration of a control device 100 according to an embodiment of the present application;

[0014] FIG3 is a hardware configuration block diagram of an electronic device 200 according to an embodiment of the present application;

[0015] FIG4 is a schematic diagram of software configuration in the electronic device 200 according to an embodiment of the present application;

[0016] FIG5 is a first structural diagram of a mobile terminal according to an embodiment of the present application;

[0017] FIG6 is a second structural diagram of a mobile terminal according to an embodiment of the present application;

[0018] FIG7 is a flowchart of a method for a mobile terminal to control an electronic device according to an embodiment of the present application;

[0019] FIG8 is a schematic diagram showing the relationship between endpoints and clusters according to an embodiment of the present application;

[0020] FIG9 is a second flow chart of a method for a mobile terminal to control an electronic device according to an embodiment of the present application;

[0021] FIG10 is a third flow chart of a method for a mobile terminal to control an electronic device according to an embodiment of the present application;

[0022] FIG11 is a flow chart of a service control method according to an embodiment of the present application;

[0023] FIG12 is a second flow chart of a service control method according to an embodiment of the present application;

[0024] FIG13 is a third flow chart of a service control method according to an embodiment of the present application;

[0025] FIG14 is a fourth flow chart of a service control method according to an embodiment of the present application;

[0026] FIG15 is a fifth flow chart of a service control method according to an embodiment of the present application;

[0027] FIG16 is a sixth flow chart of a service control method according to an embodiment of the present application;

[0028] FIG17 is a seventh flow chart of a service control method according to an embodiment of the present application;

[0029] FIG18 is a flowchart of the service control method according to an embodiment of the present application;

[0030] FIG19 is a schematic diagram of a scenario in which a master device configures a network for a controlled device according to an embodiment of the present application;

[0031] FIG20 is a flowchart of a master device 1 configuring a network for a controlled device 2 according to an embodiment of the present application;

[0032] FIG21 is a schematic diagram of a system architecture for implementing a Matter service on a controlled device 2 according to an embodiment of the present application;

[0033] FIG22 is a schematic diagram of a system architecture for implementing Matter services on a controlled device according to an embodiment of the present application;

[0034] FIG23 is a flow chart of device authentication between a controlled device and a master device according to an embodiment of the present application;

[0035] FIG24 is a flow chart of a certificate chain interaction between a controlled device and a master device according to an embodiment of the present application;

[0036] FIG25 is a flow chart showing a controlled device switching from REE to TEE according to an embodiment of the present application;

[0037] FIG26 is a schematic diagram of a mode of a controlled device according to an embodiment of the present application;

[0038] FIG27 is a flowchart of a controlled device signing authentication data through a first application and a second application according to an embodiment of the present application;

[0039] FIG28 is a flowchart of a controlled device calling a first application according to an embodiment of the present application;

[0040] FIG29 is a schematic diagram of CA and TA of a controlled device according to an embodiment of the present application;

[0041] 30 is a flowchart of a controlled device using a second application to sign authentication data using a private key according to an embodiment of the present application;

[0042] FIG31 is a schematic diagram of a service module in a TEE according to an embodiment of the present application;

[0043] FIG32 is a flow chart of a controlled device sending signed data to a master device according to an embodiment of the present application;

[0044] FIG33 is a flowchart of a device authentication process between a master device and a controlled device according to an embodiment of the present application;

[0045] FIG34 is a flow chart showing a list of master devices displayed by a controlled device according to an embodiment of the present application;

[0046] FIG35 is a schematic diagram of a master control device list according to an embodiment of the present application;

[0047] FIG36 is a schematic diagram of a master control device list according to an embodiment of the present application;

[0048] FIG37 is a schematic diagram of a master control device list according to an embodiment of the present application;

[0049] FIG38 is a flow chart of a controlled device updating a master device list according to an embodiment of the present application;

[0050] FIG39 is a schematic diagram of an interaction in which a controlled device updates a list of master devices according to an embodiment of the present application;

[0051] FIG40 is a schematic diagram of interaction of a controlled device updating a master device list according to an embodiment of the present application;

[0052] FIG41 is a flow chart showing complete device information displayed by a controlled device according to an embodiment of the present application;

[0053] FIG42 is a schematic diagram of an interaction between a controlled device and displaying complete device information according to an embodiment of the present application;

[0054] FIG43 is a flow chart of a controlled device removing a master device according to an embodiment of the present application;

[0055] FIG44 is a schematic diagram of interaction between a controlled device and a master device according to an embodiment of the present application;

[0056] FIG45 is a flowchart of a controlled device modifying the control authority of a master device according to an embodiment of the present application;

[0057] FIG46 is a schematic diagram of an interaction in which a controlled device modifies the control authority of a master device according to an embodiment of the present application;

[0058] FIG47 is a flow chart of a controlled device renaming a master device according to an embodiment of the present application;

[0059] FIG48 is a schematic diagram of an interaction between a controlled device and a master device according to an embodiment of the present application;

[0060] FIG49 is a flow chart of a device network configuration method according to an embodiment of the present application;

[0061] FIG50 is a flow chart of generating network configuration device information through voice recognition according to an embodiment of the present application;

[0062] FIG51 is a schematic diagram of a process of scanning a pairing code by a terminal device according to an embodiment of the present application;

[0063] FIG52 is a flowchart of pairing based on network distribution device information within a first preset range according to an embodiment of the present application;

[0064] FIG53 is a flowchart of determining pairing failure based on the first pairing duration according to an embodiment of the present application;

[0065] FIG54 is a flowchart of refreshing the first pairing duration according to added network configuration device information according to an embodiment of the present application;

[0066] FIG55 is a flowchart of pairing based on network distribution device information within a second preset range according to an embodiment of the present application;

[0067] Figure 56 is a flowchart of performing pairing based on configuration network feedback information according to an embodiment of the present application. DETAILED DESCRIPTION

[0068] In order to more clearly understand the above-mentioned objectives, features and advantages of the present application, the scheme of the present application will be further described below. It should be noted that, in the absence of conflict, the embodiments of the present application and the features therein can be combined with each other.

[0069] In the following description, many specific details are set forth to facilitate a full understanding of the present application, but the present application can also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present application, not all of the embodiments.

[0070] With the development of intelligent home appliances, more and more IoT manufacturers have developed their own unique ecosystems. Smart home devices produced by each brand manufacturer can only be controlled through its own multi-screen interactive application and cannot be connected with other devices. Smart home devices in different ecosystems are difficult to work together, which affects the user experience. Currently, if electronic devices want to be controlled by multi-frequency interactive applications developed by different brands, they need to integrate the services provided by these brands and perform corresponding adaptation and development. However, in actual applications, electronic devices cannot integrate all services due to factors such as cost and computing power. As a result, electronic devices are difficult to adapt to the various multi-frequency interactive applications on mobile phones and are also difficult to adapt to diverse control scenarios.

[0071] In order to solve the above technical problems, the embodiment of the present application provides an electronic device, a mobile terminal and a method for a mobile terminal to control an electronic device, wherein the electronic device includes a processor, which first responds to a device authentication certificate request received from a mobile terminal and sends the requested device authentication certificate to the mobile terminal, so that the mobile terminal performs security authentication based on the device authentication certificate. Then, when the node operation certificate sent by the mobile terminal is received, the node operation certificate is installed and network configuration is performed so that the electronic device and the mobile terminal are in the same ecosystem, and then the operation information sent by the mobile terminal is received, and the corresponding control instruction is determined based on the operation information to perform the corresponding operation based on the control instruction. The electronic device is not limited to being controlled by mobile terminals developed by individual or specific brand manufacturers, and can join the ecosystems of different brand manufacturers, breaking through the technical barriers between different brand manufacturers, so that various mobile terminals can control electronic devices according to unified standards, and improve the adaptability of electronic devices to controlled scenarios.

[0072] Figure 1 is a schematic diagram of scenarios in some embodiments provided by the present application. As shown in Figure 1 , a control device 100, an electronic device 200, a mobile terminal 300, and a server 400 are shown. A user can operate the electronic device 200 through the mobile terminal 300 or the control device 100 to play audio and video resources on the electronic device 200.

[0073] In the scenario shown in Figure 1, the user operates the electronic device 200 through the mobile terminal 300. First, the mobile terminal 300 sends a device authentication certificate request to the electronic device 200. In response to the received device authentication certificate request, the electronic device 200 sends a device authentication certificate to the mobile terminal 300, so that the mobile terminal 300 performs security authentication based on the device authentication certificate. After the security authentication is passed, the mobile terminal 300 sends a node operation certificate to the electronic device 200; when the electronic device 200 receives the node operation certificate, it installs the node operation certificate and performs network configuration to configure the electronic device 200 and the mobile terminal 300 to be in the same network, so that the electronic device 200 joins the ecosystem to which the mobile terminal belongs. When the electronic device 200 and the mobile terminal 300 are in the same ecosystem, the electronic device 200 receives the operation information sent by the mobile terminal 300, and determines the corresponding control instruction based on the operation information, so as to perform the corresponding operation according to the control instruction, thereby realizing the control of the electronic device 200 by the mobile terminal 300. Through the above process, the electronic device 200 can join the ecosystems to which different mobile terminals belong, and can be controlled by mobile terminals of different brands and manufacturers, and the adaptability of the electronic device to controlled scenarios is effectively improved.

[0074] In some embodiments, the control device 100 may be a remote controller, and communication between the remote controller and the electronic device may include infrared protocol communication, Bluetooth protocol communication, wireless or other wired methods to control the electronic device 200. The user may control the electronic device 200 by inputting user commands through buttons on the remote controller, voice input, control panel input, etc. In some embodiments, a mobile terminal, tablet computer, computer, laptop computer, or other mobile terminal may also be used to control the electronic device 200.

[0075] In some embodiments, the mobile terminal 300 can install software applications with the electronic device 200, and achieve connection and communication through a network communication protocol to achieve the purpose of one-to-one control operation and data communication. The audio and video content displayed on the mobile terminal 300 can also be transmitted to the electronic device 200 to achieve a synchronous display function. The electronic device 200 also communicates data with the server 400 through a variety of communication methods. The electronic device 200 can be allowed to communicate and connect through a local area network (LAN), a wireless local area network (WLAN) and other networks. The server 400 can provide various content and interactions to the electronic device 200. The electronic device 200 can be a liquid crystal display, an OLED display, or a projection electronic device. In addition to providing a broadcast receiving television function, the electronic device 200 can also provide an intelligent network TV function that provides computer support functions.

[0076] Figure 2 is a configuration block diagram of the control device 100 provided in an embodiment of the present application. As shown in Figure 2, the control device 100 includes a processor 110, a communication interface 130, a user input / output interface 140, a memory, and a power supply. The control device 100 can receive input operation instructions from the user, and convert the operation instructions into instructions that can be recognized and responded to by the electronic device 200, acting as an intermediary for interaction between the user and the electronic device 200. The communication interface 130 is used for external communication and includes at least one of a WIFI chip, a Bluetooth module, NFC or an alternative module. The user input / output interface 140 includes at least one of a microphone, a touchpad, a sensor, a button or an alternative module.

[0077] FIG3 is a hardware configuration block diagram of the electronic device 200 provided in an embodiment of the present application. As shown in FIG3 , the electronic device 200 includes: a tuner and demodulator 210, a communicator 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, etc. Among them, the processor 250 includes a central processing unit, a video processor, an audio processor, a graphics processor, RAM, ROM, and a first interface to an nth interface for input / output. The display 260 can be at least one of a liquid crystal display, an OLED display, a touch display, and a projection display, and can also be a projection device and a projection screen. The tuner and demodulator 210 receives broadcast and television signals through wired or wireless reception, and demodulates audio and video signals, such as EPG data signals, from multiple wireless or wired broadcast and television signals. The detector 230 is used to collect signals from the external environment or interact with the outside. The processor 250 and the tuner / demodulator 210 may be located in different separate devices, that is, the tuner / demodulator 210 may also be located in an external device of the main device where the processor 250 is located, such as an external set-top box.

[0078] In some embodiments, the electronic device is a terminal device with a display function, such as a television, a mobile phone, a computer, a learning machine, etc.

[0079] In some embodiments, the processor 250 controls the operation of the electronic device 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. The user can enter user commands through the graphical user interface (GUI) displayed on the display 260, and the user input interface receives the user input commands through the graphical user interface (GUI). Alternatively, the user can enter user commands by inputting specific sounds or gestures, and the user input interface recognizes the sounds or gestures through sensors to receive the user input commands.

[0080] The output interface (display 260 and / or audio output interface 270 ) is configured to output user interaction information; the communicator 220 is used to communicate with the server 400 or other devices.

[0081] As shown in Figure 4, Figure 4 is a schematic diagram of the software configuration in the electronic device 200 provided in an embodiment of the present application. As shown in Figure 4, the system is divided into four layers, which are, from top to bottom, the application layer (hereinafter referred to as the "application layer"), the application framework layer (hereinafter referred to as the "framework layer"), the Android runtime and system library layer (hereinafter referred to as the "system runtime layer"), and the kernel layer. The kernel layer includes at least one of the following drivers: audio driver, display driver, Bluetooth driver, camera driver, WIFI driver, USB driver, HDMI driver, sensor driver (such as fingerprint sensor, temperature sensor, pressure sensor, etc.), and power driver, etc. The method for controlling an electronic device by a mobile terminal provided in an embodiment of the present application can be implemented based on the above-mentioned electronic device.

[0082] An embodiment of the present application provides an electronic device 200, which includes:

[0083] The processor 250 is configured to: in response to a received device authentication certificate request sent by the mobile terminal 300, send the device authentication certificate to the mobile terminal 300, so that the mobile terminal 300 performs security authentication according to the device authentication certificate;

[0084] Upon receiving the node operation certificate sent by the mobile terminal 300, the node operation certificate is installed and network configuration is performed so that the electronic device 200 and the mobile terminal 300 are in the same ecosystem;

[0085] Receive the operation information sent by the mobile terminal 300, and determine the corresponding control instruction according to the operation information, so as to perform the corresponding operation according to the control instruction.

[0086] In some embodiments, the processor 250, upon receiving the node operation certificate sent by the mobile terminal 300, installs the node operation certificate and performs network configuration, and is configured to:

[0087] Upon receiving the node operation certificate sent by the mobile terminal 300, verifying whether the node operation certificate is legitimate based on the root certificate; wherein the root certificate is the root certificate corresponding to the ecosystem to which the mobile terminal 300 belongs;

[0088] If the node operation certificate is legal, install the node operation certificate and configure the network.

[0089] In some embodiments, the processor 250 receives operation information sent by the mobile terminal 300, determines a corresponding control instruction based on the operation information, and performs a corresponding operation based on the control instruction, and is configured to:

[0090] In the case where the electronic device 200 and the mobile terminal 300 are in the same ecosystem, in response to the received operation information sent by the mobile terminal 300, determining whether the operation information comes from the mobile terminal 300 based on the root certificate; wherein the root certificate is a root certificate corresponding to the ecosystem;

[0091] If it is determined that the operation information comes from the mobile terminal 300, a corresponding control instruction is determined according to the operation information, so as to perform a corresponding operation according to the control instruction.

[0092] In some embodiments, the processor 250, upon receiving the node operation certificate sent by the mobile terminal 300, installs the node operation certificate, performs network configuration, receives operation information sent by the mobile terminal 300, and determines a corresponding control instruction based on the operation information, and before performing a corresponding operation based on the control instruction, is further configured to:

[0093] Obtain an access control list, which includes authorized terminal information and authorized operation information corresponding to the authorized terminal;

[0094] Accordingly, the processor 250 receives the operation information sent by the mobile terminal 300, and determines the corresponding control instruction according to the operation information, so as to perform the corresponding operation according to the control instruction, and is configured to:

[0095] receiving operation information sent by the mobile terminal 300, where the operation information includes information of the mobile terminal 300;

[0096] Determine whether the mobile terminal 300 is an authorized terminal based on the mobile terminal 300 information and the authorized terminal information; and determine whether the operation information is authorized operation information based on the operation information and the authorized operation information;

[0097] In the case that the mobile terminal 300 is an authorized terminal and the operation information is authorized operation information, a corresponding control instruction is determined according to the operation information, so as to perform a corresponding operation according to the control instruction.

[0098] In some embodiments, the processor 250, before sending the device authentication certificate to the mobile terminal 300 in response to the received device authentication certificate request sent by the mobile terminal 300, is further configured to:

[0099] Controlling the communicator 220 to broadcast so that the mobile terminal 300 can detect the electronic device 200;

[0100] In response to the feedback message sent by the mobile terminal 300, establishing a wireless connection with the mobile terminal 300;

[0101] The device parameters are sent to the mobile terminal 300 via a wireless connection, so that the mobile terminal 300 sends a device authentication certificate request to the electronic device 200 according to the device parameters.

[0102] In some embodiments, the processor 250, in response to receiving a device authentication certificate request sent by the mobile terminal 300, after sending the device authentication certificate to the mobile terminal 300, is further configured to:

[0103] When receiving an authentication failure message sent by the mobile terminal 300 , which indicates that the electronic device 200 has failed security authentication, the display 260 is controlled to display a prompt message.

[0104] As shown in FIG5 , FIG5 is a structural diagram of a mobile terminal provided in an embodiment of the present application. The mobile terminal includes:

[0105] The processor 51 is configured to: send a device authentication certificate request to the electronic device 200;

[0106] In response to the device authentication certificate returned by the electronic device 200, the device authentication certificate is sent to the server 400 for security authentication by the server 400;

[0107] Upon receiving an authentication pass message returned by the server 400, the node operation certificate is sent to the electronic device 200, so that the electronic device 200 and the mobile terminal 300 are in the same ecosystem; wherein the authentication pass message indicates that the electronic device has passed the security authentication;

[0108] The operation information input by the user is received, and the operation information is sent to the electronic device 200 to control the electronic device 200 according to the operation information.

[0109] It should be noted that the mobile terminal 300 also includes other modules such as a communicator 52 and a display, but this application does not impose any limitation thereto.

[0110] As shown in Figure 6, Figure 6 is a second structural diagram of a mobile terminal provided in an embodiment of the present application. The mobile terminal includes: a processor 601, a memory 602, and a computer program stored in the memory 602 and executable on the processor 601. The computer program, when executed by the processor 601, can implement the various processes of the method for controlling an electronic device by the mobile terminal and can achieve the same technical effects. To avoid repetition, the details will not be repeated here.

[0111] In order to illustrate this solution in more detail, the following will be explained in an exemplary manner in conjunction with Figure 7. It can be understood that the steps involved in Figure 7 may include more steps or fewer steps in actual implementation, and the order of these steps may also be different, so as to implement the method of mobile terminal controlling electronic equipment provided in the embodiment of the present application.

[0112] As shown in FIG. 7 , FIG. 7 is a flowchart of a method for a mobile terminal to control an electronic device according to an embodiment of the present application. The method includes the following steps S701 to S703 :

[0113] S701: In response to a received device authentication certificate request sent by a mobile terminal, send a device authentication certificate to the mobile terminal, so that the mobile terminal performs security authentication according to the device authentication certificate.

[0114] The Device Attestation Certificate Request is used to request a device authentication certificate for an electronic device. A Device Attestation Certificate (DAC) is signed by a Certificate Authority (CA) and written into the electronic device during its manufacturing process. It verifies the identity of the electronic device and ensures its inclusion in other ecosystems, allowing it to interoperate with other devices within the ecosystem.

[0115] In some embodiments, on the mobile terminal side, a device authentication certificate request is sent to the electronic device, and when the device authentication certificate returned by the electronic device in response to the device authentication request is received, the device authentication certificate is used to perform security authentication. Optionally, the mobile terminal uploads the device authentication certificate to the server, and the server verifies the legitimacy of the device authentication certificate to determine whether the security authentication is passed. The server is a Distributed Compliance Ledger (DCL) server, which is a secure distributed network encrypted by cryptography. Public information of specific devices is published by IoT device manufacturers, authorized testing organizations and alliance certification teams. When it is determined that the security authentication is passed, the DCL server will send an authentication pass message to the mobile terminal to notify the mobile terminal that the device authentication certificate sent by the electronic device is legal and has passed the security authentication. This ensures the security of the mobile terminal controlling the electronic device.

[0116] In some embodiments, before executing step S701, an embodiment of the present application provides an implementation method: the electronic device controls its configured communicator to broadcast so that the mobile terminal can detect the electronic device. The communicator includes but is not limited to: multicast Domain Name System (mDNS), Bluetooth module (Bluetooth Low Energy, BLE), near field communication (NFC). Exemplarily, the electronic device controls the Bluetooth module to be turned on for broadcasting so that the mobile terminal can detect the electronic device by monitoring the Bluetooth broadcast. After the mobile terminal discovers the electronic device, it sends a feedback message to the electronic device, thereby establishing a wireless connection between the electronic device and the mobile terminal. Furthermore, the electronic device sends the device parameters of the electronic device to the mobile terminal via the wireless connection, so that the mobile terminal can clarify the identity of the electronic device based on these device parameters, and then send a device authentication certificate request to the electronic device.

[0117] In some embodiments, after the electronic device and the mobile terminal establish a wireless connection, a Password Authenticated Session Establishment (PASE) is established, thereby sending the device authentication certificate to the mobile terminal based on the PASE encryption mechanism. It should be noted that the password authentication session is closed after step S702 is completed.

[0118] Exemplarily, a QR code is displayed on the electronic device. After the user operates the mobile terminal to scan the QR code, a password authentication session is established between the electronic device and the mobile terminal to ensure the security of subsequent communication interactions.

[0119] S702: Upon receiving the node operation certificate sent by the mobile terminal, install the node operation certificate and perform network configuration so that the electronic device and the mobile terminal are in the same ecosystem.

[0120] Among them is the Node Operational Certificate (NOC). The NOC uses the X.509 format standard and contains a unique identifier that can be used to identify a node, namely the Node Operational Identifier (Node ID). The mobile terminal is configured with its own NOC in the ecosystem to which it belongs. The ecosystem is called Matter Fabric in the Smart Home Connectivity (Matter) protocol.

[0121] In some embodiments, on the mobile terminal side, if it is determined that the security authentication is passed according to the device authentication certificate, a node operation certificate is sent to the electronic device. When the electronic device receives the node operation certificate sent by the mobile terminal, it verifies whether the node operation certificate is legal based on the root certificate. Among them, the root certificate (Root CA Certificate, CAC) is the root certificate corresponding to the ecosystem to which the mobile terminal belongs. Each ecosystem will also have its corresponding root certificate, which is used to verify the identity of each node in the ecosystem, that is, to verify the node operation certificate of each node. When the node operation certificate is verified to be legal based on the root certificate, the electronic device installs the node operation certificate issued by the mobile terminal and performs network configuration, so that the electronic device and the mobile terminal are in the same network environment, and the electronic device is added to the ecosystem to which the mobile terminal belongs.

[0122] In some embodiments, on the mobile terminal side, if it is determined based on the device authentication certificate that the security authentication has failed, an authentication failure message is sent to the electronic device. The authentication failure message indicates that the electronic device has failed the security authentication. The electronic device then generates and displays a prompt message in response to the received authentication failure message. The prompt message is used to prompt the user that the electronic device has failed the authentication, indicating that the user cannot control the electronic device through the mobile terminal.

[0123] Steps S701-S702 are performed when a mobile terminal first controls an electronic device, authenticating and configuring the electronic device, allowing the electronic device to join the mobile terminal's ecosystem. These steps allow the electronic device to be placed in ecosystems belonging to mobile terminals from different manufacturers, allowing it to be controlled by mobile terminals in different ecosystems.

[0124] S703: Receive operation information sent by the mobile terminal, and determine a corresponding control instruction according to the operation information, so as to perform a corresponding operation according to the control instruction.

[0125] In some embodiments, after the electronic device is network-connected, it is placed in the same network as the mobile terminal, so that the electronic device is added to the ecosystem to which the mobile terminal belongs. Therefore, the electronic device and the mobile terminal are in the same ecosystem. The user can then perform operations on the mobile terminal. The mobile terminal generates operation information based on the user's operation and sends it to the electronic device. When the electronic device receives the operation information sent by the mobile terminal, it determines a corresponding control instruction based on the operation information and performs the corresponding operation according to the control instruction, thereby satisfying the user's need to control the electronic device through the mobile terminal.

[0126] In some embodiments, the electronic device serves as a node in the ecosystem, which includes multiple endpoints, and each endpoint includes multiple clusters.

[0127] To facilitate understanding, here are the definitions of nodes, endpoints, and clusters: A node is generally defined as a unique, network-addressable entity with certain functions. Mobile terminals and electronic devices are all nodes in an ecosystem. An endpoint is a virtual device that provides one or more functions. A cluster is a reusable module that combines multiple common operations.

[0128] As shown in Figure 8, Figure 8 is a schematic diagram of the relationship between endpoints and clusters provided in an embodiment of the present application. The figure shows endpoint 0 (Endpoint0) and endpoint 1 (Endpoint 1). Endpoint 0 provides the overall control function of the electronic device, and endpoint 1 provides the volume control function of the electronic device. Among them, the clusters included in Endpoint 0 are: On / Off, Media Playback, Channel Change, Input Control, Output Control, Lower Power, Keypad Input, Content Launcher, and Application Launcher; the clusters included in Endpoint 1 are: Volume On / Off and Level Control.

[0129] In the process of an electronic device determining the corresponding control instruction based on the operation information to perform the corresponding operation according to the control instruction, the electronic device first determines the cluster indicated by the operation information based on the operation information, and then the protocol stack initializes the device function. Further, the SDK calls the operation information back to the upper-layer application, so that the upper-layer application calls the business function interface to determine the control instruction corresponding to the operation information, thereby performing the corresponding operation.

[0130] In some embodiments, when the electronic device and the mobile terminal are in the same ecosystem, the electronic device obtains the root certificate corresponding to the ecosystem, and then, in response to the received operation information sent by the mobile terminal, determines whether the operation information comes from the mobile terminal in the ecosystem based on the root certificate. If it is determined that the operation information comes from the mobile terminal, the corresponding control instruction is determined based on the operation information sent by the mobile terminal to perform the corresponding operation according to the control instruction. It should be noted that the control logic of mobile terminals in different ecosystems is different. Even if the operation information is the same, different control instructions are corresponding to different ecosystems. Therefore, the electronic device needs to verify the identity of the mobile terminal sending the operation information based on the root certificate of the current ecosystem 1. If it is determined that the mobile terminal is a node in the ecosystem 1, the control instruction corresponding to the ecosystem is determined based on the operation information, so that the mobile terminal can accurately control the electronic device to perform the corresponding operation.

[0131] In some embodiments, when an electronic device receives a node operation certificate sent by a mobile terminal, after installing the node operation certificate and performing network configuration, the electronic device obtains an access control list (ACL), which includes authorized terminal information and authorized operation information corresponding to the authorized terminal. The access control list specifies the authorized operations that the authorized terminal can perform on the electronic device in the ecosystem in which the electronic device is located, such as having read / write / callable permissions on the mobile terminal on the electronic device. Furthermore, after receiving the operation information sent by the mobile terminal, the electronic device determines whether the mobile terminal is an authorized terminal based on the mobile terminal and the authorized terminal information, and determines whether the operation information is authorized operation information based on the operation information and the authorized operation information, thereby determining through the access control list whether the mobile terminal has the permission to control the operation corresponding to the execution operation information of the electronic device.

[0132] If the mobile terminal is determined to be an authorized terminal and the operation information is authorized operation information, the electronic device allows the mobile terminal to control it to perform the operation corresponding to the operation information. The corresponding control instruction is then determined based on the operation information, so that the electronic device performs the corresponding operation according to the control instruction. This achieves the purpose of the mobile terminal controlling the electronic device.

[0133] In some embodiments, after executing step S702, the electronic device and the mobile terminal are in the same ecosystem, and a certificate authentication session (CASE) is established between the electronic device and the mobile terminal, so that the mobile terminal encrypts the operation information and sends it to the electronic device. After receiving the operation information, the electronic device verifies the legitimacy of the operation information and decrypts it to obtain the operation information if the operation information is legal. Furthermore, the electronic device determines the corresponding control instruction based on the operation information to perform the corresponding operation according to the control instruction, thereby ensuring the security of the mobile terminal controlling the electronic device. In the case that the operation information is illegal, the electronic device returns an error code to the mobile terminal to prompt the user of an operation error.

[0134] In some embodiments, after an electronic device receives operation information sent by a mobile terminal, determines a corresponding control instruction based on the operation information, and executes the corresponding operation, it then returns the result of executing the operation information based on the certificate authentication session. Alternatively, if the operation information is invalid, the electronic device returns an error code based on the certificate authentication session.

[0135] In summary, the embodiment of the present application provides a method for a mobile terminal to control an electronic device. The method is applied to an electronic device. First, in response to a device authentication certificate request received from a mobile terminal, the method sends the requested device authentication certificate to the mobile terminal, so that the mobile terminal performs security authentication based on the device authentication certificate. Then, upon receiving the node operation certificate sent by the mobile terminal, the node operation certificate is installed, and network configuration is performed so that the electronic device and the mobile terminal are in the same ecosystem. The method then receives the operation information sent by the mobile terminal, and determines the corresponding control instruction based on the operation information, so as to perform the corresponding operation based on the control instruction. The electronic device is not limited to being controlled by mobile terminals developed by individual or specific brand manufacturers, and can join the ecosystems of different brand manufacturers, breaking through the technical barriers between different brand manufacturers, so that various mobile terminals can control electronic devices according to unified standards, and improving the adaptability of electronic devices to controlled scenarios.

[0136] As shown in FIG9 , FIG9 is a second flow chart of a method for controlling an electronic device by a mobile terminal provided in an embodiment of the present application. The method is applied to a mobile terminal and includes the following steps S91 to S94:

[0137] S91. Send a device authentication certificate request to the electronic device.

[0138] In some embodiments, before executing step S91, the mobile terminal performs detection via a configured communicator and, upon detecting a broadcast from an electronic device, sends a feedback message to the electronic device, thereby establishing a wireless connection with the electronic device. The communicators configured in the mobile terminal include, but are not limited to, mDNS, BLE, and NFC.

[0139] In some embodiments, after the mobile terminal and the electronic device establish a wireless connection, a password authentication session is established, thereby encrypting and sending a device authentication certificate request to the electronic device based on the PASE encryption mechanism to ensure the security of communication interaction between the mobile terminal and the electronic device.

[0140] S92: In response to the received device authentication certificate returned by the electronic device, send the device authentication certificate to the server so that the server performs security authentication.

[0141] In some embodiments, the electronic device sends a device authentication certificate to the mobile terminal in response to a device authentication certificate request received from the mobile terminal. After receiving the device authentication certificate, the mobile terminal forwards it to a server for security authentication. The server is a DCL server. The server performs security authentication based on the received device authentication certificate to confirm its legitimacy. If so, an authentication pass message is returned to the mobile terminal. This authentication pass message indicates that the electronic device has passed security authentication.

[0142] S93. When receiving the authentication success message returned by the server, send the node operation certificate to the electronic device, so that the electronic device and the mobile terminal are in the same ecosystem.

[0143] In some embodiments, when an authentication pass message is received from the server, it indicates that the device authentication certificate of the electronic device is legal, and thus a node operation certificate is sent to the electronic device. The node operation certificate is issued by the mobile terminal. After the electronic device installs the node operation certificate, it can join the ecosystem to which the mobile terminal belongs.

[0144] S94: Receive operation information input by the user, and send the operation information to the electronic device to control the electronic device according to the operation information.

[0145] When a user needs to control an electronic device through a mobile terminal, the user inputs information on the mobile terminal. This application does not restrict the input method. The mobile terminal receives the operation information input by the user and sends the operation information to the electronic device, so that the electronic device performs the corresponding operation according to the operation information, thereby realizing the control of the electronic device through the mobile terminal.

[0146] The above steps S91 to S94 enable mobile terminals in different ecosystems to join electronic devices to their ecosystems according to a unified process, and when the electronic devices and mobile terminals are in the same ecosystem, the mobile terminals control the electronic devices to perform corresponding operations and implement corresponding functions.

[0147] In summary, an embodiment of the present application provides a method for a mobile terminal to control an electronic device, which is applied to a mobile terminal. The method first sends a device authentication certificate request to the electronic device, and then, in response to the device authentication certificate returned by the electronic device, forwards the device authentication certificate to a server to perform security authentication with the server; upon receiving an authentication pass message returned by the server, which indicates that the security authentication is passed, a node operation certificate is sent to the electronic device, so that the electronic device joins the ecological network to which the mobile terminal belongs according to the node operation certificate; further, when the mobile terminal and the electronic device are in the same ecosystem, the mobile terminal receives operation information input by the user, and sends the operation information to the electronic device to control the electronic device to perform the operation corresponding to the operation information, thereby realizing control of the electronic device through the mobile terminal.

[0148] As shown in FIG10 , FIG10 is a flow chart of a method for controlling an electronic device by a mobile terminal according to an embodiment of the present application. The method is applied to an Internet of Things system composed of a mobile terminal, an electronic device, and a server. The method includes the following steps S1001 to S1011:

[0149] S1001: The electronic device controls the communicator to broadcast.

[0150] S1002: After monitoring the broadcast, the mobile terminal sends a feedback message to the electronic device.

[0151] S1003: Establish a wireless connection between the electronic device and the mobile terminal.

[0152] S1004: The mobile terminal sends a device authentication certificate request to the electronic device via a wireless connection.

[0153] S1005. The electronic device sends the device authentication certificate to the mobile terminal in response to the device authentication certificate request.

[0154] S1006. The mobile terminal forwards the device authentication certificate to the server.

[0155] S1007. The server performs security authentication based on the device authentication certificate. If the security authentication is successful, the server returns an authentication success message to the mobile terminal.

[0156] S1008. The mobile terminal sends the node operation certificate to the electronic device in response to the authentication pass message.

[0157] Optionally, the above steps S1004 to S1005 and S1008 are implemented based on the PASE encryption mechanism.

[0158] S1009. The electronic equipment installs the node operation certificate and performs network configuration.

[0159] After the electronic device installs the node operation certificate and performs network configuration, it joins the ecosystem to which the mobile terminal belongs, so that the electronic device and the mobile terminal are in the same ecosystem.

[0160] S1010. The mobile terminal receives operation information input by the user and sends the operation information to the electronic device.

[0161] S1011. The electronic device determines a corresponding control instruction according to the operation information, and performs a corresponding operation according to the control instruction.

[0162] Optionally, the above steps S1010 to S1011 are implemented based on a CASE encryption mechanism.

[0163] The implementation of the above steps is the same as or similar to the implementation of the aforementioned steps S701 to S703 and S91 to S94, and is not described in detail in this application.

[0164] In addition to the above embodiments, this application also provides some other embodiments of electronic devices and service control methods, which are described in detail as follows:

[0165] In the Matter protocol, large-screen devices (such as televisions) are often defined as Basic Video Player devices. This type of device needs to support the Media Playback Cluster, which requires that large-screen devices support at least three playback commands: Play, Pause, and Stop, and at least four playback states: Playing, Paused, Not Playing, and Buffering. Because different playback content is played by different video applications (Applications, Apps), large-screen devices need to acquire playback states and control playback commands for different video applications. This requires separate docking interfaces between the large-screen device and different video applications, and developers need to write interface docking code to implement the docking interface between the large-screen device and each video application.

[0166] However, separate interfaces for large-screen devices and different video applications will increase the management complexity and software costs of the interfaces on the large-screen devices.

[0167] The present application relates to the field of terminal interconnection and Matter protocol-related functions, providing a method for implementing a Media Playback Cluster. Currently, most large-screen electronic devices, as Matter Media Playback Clusters, only support local media playback (local video application playback) for playback control and playback status feedback. The present application provides a method for implementing a Media Playback 25Cluster that can support multiple video applications.

[0168] An embodiment of the present application provides an electronic device and a service control method, wherein the electronic device can implement the service control method provided by the embodiment of the present application or the functional module or functional entity in the electronic device can implement the service control method provided by the embodiment of the present application. The electronic device includes: a processor, corresponding to the processor 250 in Figure 3 above. An embodiment of the present application provides an electronic device, including: a processor, configured to: when a change in the playback state of the current video is detected through a video player, obtain the target playback state of the current video through the video player; send a status message carrying the target playback state to the Matter service in the form of Android broadcast through the video player; receive the status message through the Matter service, and set the current state attribute of the Matter service to the target playback state.

[0169] In the embodiments of the present application, 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.

[0170] The target playback state includes 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.

[0171] Exemplarily, 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 change can be determined according to actual conditions and is not limited here.

[0172] In some embodiments of the present application, 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 the Matter control end device updates the playback state stored in the Matter control end device after receiving the state change message, thereby achieving synchronization of the playback state of the Matter service and the Matter control end device. The Matter service sends the state change message to the Matter control end device, which can be the Matter service actively sending the state change message to the Matter control end device after setting the current state attribute to the target playback state; or it can be the Matter service sending the state change message to the Matter control end device after receiving the state acquisition instruction sent by the Matter control end device; the specific details can be determined according to actual conditions and are not limited here.

[0173] 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.

[0174] The Matter control terminal device may be a device that is installed with a Matter control terminal and interacts with the electronic device based on the Matter protocol through the Matter control terminal.

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

[0176] For example, 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:

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

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

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

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

[0181] In this way, the video application uses MediaPlayer for playback, and there is no need for interface docking. By sending an Android broadcast, the corresponding playback status can be obtained and set to the Matter protocol service. In this way, a method for obtaining the playback status of multiple video applications is provided based on the Android broadcast method. The electronic device, as a large-screen device, does not need to dock with each video application separately, so the playback status can be obtained, which greatly reduces the management complexity and software cost of the interface on the large-screen device. In some embodiments of the present application, 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 the user's received key operation (such as remote control key operation) or touch operation on the electronic device; it can also be that the electronic device switches the playback status of the current video in response to the control instruction sent by the received Matter control terminal device; it can also be that when it detects that the current video playback has ended or a playback error has occurred, the electronic device changes the current video from Playing to Not Playing; it can also be other reasons, which can be determined according to the time situation and are not limited here.

[0182] In some embodiments of the present application, 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 received from the Matter control end device, the processor is further configured to: when the video player detects that the playback state of the current video has changed, before obtaining the target playback state of the current video through the video player, receive the target control instruction for the target video application sent by the Matter control end device through the Matter service; 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; and 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.

[0183] The target control instruction includes any one of the following: Play, Pause, and Stop.

[0184] It can be understood that if the target control instruction is Play, the target key event is a Play key event, and the target playback state is Playing or Buffering, then the above playback state changes from other playback states to Playing or Buffering; if the target control instruction is Pause, the target key event is a Pause key event, and the target playback state is Paused, then the above playback state changes from other playback states to Paused;

[0185] If the target control command is Stop, the target key event is a Stop key event, and the target playback state is Not Playing, then the playback state changes from other playback states to Not Playing.

[0186] It can be understood that in the embodiment of the present application, 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. As a large-screen device, the electronic device does not need to interface with each video application separately, and can realize the control of playback instructions, which greatly reduces the management complexity and software cost of the interface on the large-screen device.

[0187] In some embodiments of the present application, when the target system layer is an Android framework layer, the target system interface is an interface corresponding to the Android framework layer.

[0188] Exemplarily, the interface corresponding to the Android framework layer may be the android.app.Instrumentation interface.

[0189] In some embodiments of the present application, when the target system layer is a kernel layer, the target system interface is an interface corresponding to the kernel layer.

[0190] Exemplarily, the kernel layer may be a Linux kernel layer, and the interface corresponding to the Linux kernel layer is a uinput interface.

[0191] In some embodiments of the present application, when the target system layer is a driver layer, the target system interface is an interface corresponding to the driver layer.

[0192] Exemplarily, the interface corresponding to the driver layer is the / dev / input / eventX interface.

[0193] In some embodiments of the present application, the target key event includes a target key press event corresponding to the target control instruction and a target key pop-up event corresponding to the target control instruction. The processor is specifically configured to: generate the target key press event through the Matter service; call the target system interface through the Matter service to send the target key press event to the target system layer; send the target key press event to the target video application through the target system layer; after a preset time, generate the target key pop-up event through the Matter service; call the target system interface through the Matter service to send the target key pop-up event to the target system layer; send 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.

[0194] The preset duration can be determined according to actual conditions and is not limited here. For example, the preset duration can be 100ms.

[0195] For example, 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 automatically distributes the response to the foreground video application. The process is as follows:

[0196] (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.

[0197] (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.

[0198] (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.

[0199] 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.

[0200] 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.

[0201] For example, 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. 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:

[0202] 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 (representing 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 (representing 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.

[0203] 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.

[0204] For example, 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 key 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. The process of implementing case simulation at the driver layer can refer to existing related technologies and will not be described here.

[0205] In the embodiment of the present application, the Matter service simulates the final target key event by generating a target key press event and a target key pop-up event.

[0206] In some embodiments of the present application, when the reason for the change in the above-mentioned playback status is that the electronic device switches the playback status of the current video in response to a control instruction received from the Matter control end device, the processor is further configured to: receive the target control instruction for the target video application sent by the Matter control end device through the Matter service; and send 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.

[0207] The target control instruction includes any one of the following: Play, Pause, and Stop.

[0208] In the embodiments of this application, without requiring interface docking, the electronic device can be used as a Media Playback Cluster to control at least three playback commands: Play, Pause, and Stop, by sending an Android broadcast to the video application. This allows the electronic device, acting as a large-screen device, to control playback commands without requiring separate interface docking with each video application, significantly reducing interface management complexity and software costs on large-screen devices.

[0209] In some embodiments of the present application, 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.

[0210] An embodiment of the present application provides an electronic device, including: a processor, configured to: when a video player detects that the playback state of a current video has changed, obtain the target playback state of the current video through the video player; store the target playback state in a preset storage area; obtain the target playback state from the preset storage area through a Matter service; and set the current state attribute of the Matter service to the target playback state.

[0211] The target playback state includes 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.

[0212] 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.

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

[0214] In some embodiments of the present application, 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's 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 NotPlaying 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 based on the time situation and are not limited here.

[0215] In some embodiments of the present application, 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 terminal device, the processor is further configured to: receive a target control instruction for a target video application sent by the Matter control terminal device through a Matter service, the target control instruction including 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.

[0216] In some embodiments of the present application, 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.

[0217] In some embodiments of the present application, the target key event includes a target key press event corresponding to the target control instruction and a target key pop-up event corresponding to the target control instruction. The processor is specifically configured to: generate the target key press event through the Matter service; call the target system interface through the Matter service to send the target key press event to the target system layer; send the target key press event to the target video application through the target system layer; after a preset time, generate the target key pop-up event through the Matter service; call the target system interface through the Matter service to send the target key pop-up event to the target system layer; send 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 specific descriptions, please refer to the above-mentioned related descriptions, which will not be repeated here.

[0218] In some embodiments of the present application, 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 received from a Matter control terminal device, the processor is further configured to: receive a target control instruction for a target video application sent by the Matter control terminal device through the Matter service; and send 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.

[0219] Referring to Figure 4 , 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 examples above.

[0220] 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. Through the API, applications can access system resources and services during execution.

[0221] As shown in Figure 4, the application framework layer in the embodiment of the present application includes managers, content providers, etc., wherein the manager includes at least one of the following modules: an activity manager (Activity Manager) is used to interact with all activities running in the system; a location manager (Location Manager) is used to provide system services or applications with access to system location services; a package manager (Package Manager) is used to retrieve various information related to the application package currently installed on the device; a notification manager (Notification Manager) is used to control the display and clearing of notification messages; a window manager (Window Manager) is used to manage icons, windows, toolbars, wallpapers and desktop components on the user interface.

[0222] In some embodiments, the activity manager is used to manage the lifecycle of each application and common navigation back functions, such as controlling the exit, opening, and backing of an application. The window manager is used to manage all window programs, such as obtaining the display screen size, determining whether there is a status bar, locking the screen, taking screenshots, and controlling display window changes (such as shrinking the display window, shaking the display, distorting the display, etc.).

[0223] In some embodiments, the system runtime layer provides support for the upper layer, namely the framework layer. When the framework layer is used, the Android operating system will run the C / C++ library contained in the system runtime layer to implement the functions to be implemented by the framework layer.

[0224] In some embodiments, the kernel layer is a layer between hardware and software. As shown in FIG4 , the kernel layer includes a driver layer, which includes at least one of the following drivers: an audio driver, a display driver, a Bluetooth driver, a camera driver, a Wi-Fi driver, a USB driver, an HDMI driver, a sensor driver (such as a fingerprint sensor, a temperature sensor, a pressure sensor, etc.), and a power driver.

[0225] In order to explain this solution in more detail, the following will be explained in an exemplary manner in conjunction with Figures 11 to 18. It can be understood that the steps involved in Figures 11 to 18 may include more steps, or fewer steps in actual implementation, and the order between these steps may also be different, so as to be able to implement the service control method provided in the embodiment of the present application. The service control method is applied to an electronic device, and the execution subject of the service control method can be an electronic device, or a functional module or functional entity in the electronic device that can implement the service control method, which is not limited here. Moreover, the specific description of the service control method provided in the embodiment of the present application 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.

[0226] FIG11 is a flowchart showing the steps of implementing a service control method according to one or more embodiments of the present application. The service control method may include S501 to S503.

[0227] 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.

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

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

[0230] In some embodiments of the present application, in combination with FIG. 11 , as shown in FIG. 12 , before the above-mentioned S501 , the service control method provided in the embodiment of the present application may further include the following S504 to S507 .

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

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

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

[0234] 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.

[0235] In some embodiments of the present application, 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.

[0236] In some embodiments of the present application, the target key event includes a target key press event corresponding to the target control instruction and a target key pop-up event corresponding to the target control instruction. In combination with Figure 12, as shown in Figure 13, the above-mentioned S505 can be specifically implemented through the following S505a and S505b; the above-mentioned S506 can be specifically implemented through the following S506a and S506b; the above-mentioned S507 can be specifically implemented through the following S507a and S507b.

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

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

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

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

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

[0242] 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.

[0243] In some embodiments of the present application, in combination with FIG. 11 , as shown in FIG. 14 , before the above-mentioned S501 , the service control method provided in the embodiment of the present application may further include the following S508 to S509 .

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

[0245] 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.

[0246] FIG15 is a flowchart showing the steps of implementing a service control method according to one or more embodiments of the present application. The service control method may include S901 to S904.

[0247] 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.

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

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

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

[0251] In some embodiments of the present application, in combination with FIG. 15 , as shown in FIG. 16 , before the above-mentioned S901 , the service control method provided in the embodiment of the present application may further include the following S905 to S508 .

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

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

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

[0255] 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.

[0256] In some embodiments of the present application, 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.

[0257] In some embodiments of the present application, the target key event includes a target key press event corresponding to the target control instruction and a target key pop-up event corresponding to the target control instruction. In combination with Figure 16 and as shown in Figure 17, the above-mentioned S906 can be specifically implemented through the following S906a and S906b; the above-mentioned S907 can be specifically implemented through the following S907a and S907b; the above-mentioned S908 can be specifically implemented through the following S908a and S908b.

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

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

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

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

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

[0263] 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.

[0264] In some embodiments of the present application, in combination with Figure 15, as shown in Figure 18, before the above-mentioned S901, the service control method provided in the embodiment of the present application may also include the following S909 to S910.

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

[0266] 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.

[0267] In addition to the above embodiments, this application also provides other embodiments of device information management methods and device authentication methods for controlled devices and master devices, which are described in detail as follows:

[0268] The Matter standard is an open-source standard for smart homes, developed, certified, and promoted by the Connectivity Standards Alliance. Based on the Internet Protocol (IP), the Matter standard enables smart home devices, mobile applications, and cloud services that adhere to the Matter standard to connect and communicate. A master device can configure network configuration for controlled devices based on the Matter standard, adding them to the master device's Matter network, or virtual domain. Once a controlled device joins the master device's virtual domain, the master device gains control over the controlled device.

[0269] The master device and controlled device provided in the embodiments of the present application can have various implementation forms. For example, the master device and the controlled device can be electronic devices or non-electronic devices, can have Bluetooth functionality or not, can have cameras or not, can be fixed devices or movable devices, etc. The distance between the master device and the controlled device and the spatial range in which they are located are not limited. For example, the distance between the master device and the controlled device can be greater than 10 meters, or the master device and the controlled device can be in different rooms.

[0270] In some embodiments, if the master device and the controlled device are electronic devices, the electronic devices may have various implementation forms, for example, they may be smart TVs, laser projection devices, monitors, electronic bulletin boards, electronic tables, etc., or they may be devices with display screens such as mobile phones, tablet computers, and smart watches.

[0271] In some embodiments, if the master device and the controlled device are non-electronic devices, the non-electronic devices may have various implementation forms, such as smart lights, smart refrigerators, smart kitchen appliances, smart bathroom fixtures, smart air conditioners, smart speakers, and other devices without display screens. The non-electronic devices may establish control signal and data signal transmission and reception with other devices, such as third-party devices, the master device, or the controlled device, via a communicator.

[0272] In an embodiment of the present application, the process of the master device configuring the network for the controlled device is to add the controlled device to the Matter network of the master device, which can be a virtual domain (Fabric). The master device has a corresponding virtual domain, which includes the master device and all controlled devices controlled by the master device. The master device and the controlled device belonging to the same virtual domain are connected to the same local area network (i.e., a designated network). The devices in the virtual domain are identified by the node operation certificate (NOC) they hold to identify the virtual domain to which they belong, as well as their identity in the virtual domain. After the master device configures the network for the controlled device, it assigns a NOC certificate to the controlled device to mark the addition of the controlled device to its own virtual domain. The NOC certificate held by each device in the virtual domain includes: a virtual domain identifier for uniquely identifying the virtual domain, such as a Fabric ID, and a node identifier for uniquely identifying the device in the virtual domain, such as a Node ID. In other words, the virtual domains of different master devices have different Fabric IDs, and the Node IDs of each device in the same virtual domain are different, but the Node IDs of devices belonging to different virtual domains can be the same. The same LAN may include one or more virtual domains, and there may be overlaps between the virtual domains.

[0273] During the network configuration process, the master device acts as the network configuration device, and the controlled device acts as the network access device. Figure 19 is a schematic diagram of a scenario in which the master device configures the network for the controlled device in an embodiment of the present application. As shown in Figure 19, master device 1 configures the network for controlled device 2. Master device 1 can configure the network for controlled device 2 according to the process shown in Figure 20. The specific steps are as follows:

[0274] In step S401 , the master device 1 and the controlled device 2 perform device discovery.

[0275] When the master device 1 configures the network for the controlled device 2, it performs device discovery based on a device discovery protocol, such as the Multicast Domain Name System (mDNS) protocol. Alternatively, the master device 1 can quickly discover the device by scanning the QR code of the controlled device 2, entering the pairing code provided by the controlled device 2, or communicating with the controlled device 2 using Near Field Communication (NFC).

[0276] Step S402: The master device 1 establishes a first secure session with the controlled device 2.

[0277] After discovering the controlled device 2, the master device 1 establishes a first connection with the controlled device 2, which is a Bluetooth connection, and obtains a passcode provided by the controlled device 2. Based on the first connection, the master device 1 and the controlled device 2 establish a first secure session, such as a Passcode-Authenticated Session Establishment (PASE) session, according to the passcode.

[0278] Based on the first secure session, the master device 1 and the controlled device 2 perform the following interactions:

[0279] In step S403 , the master device 1 and the controlled device 2 perform device authentication.

[0280] In step S404 , the master device 1 requests the controlled device 2 for an Operational Certificate Signing Request (Op-CSR).

[0281] In step S405 , the main control device 1 obtains a Product Attestation Authority (PAA) certificate from the cloud or locally.

[0282] Step S406 : After the controlled device 2 passes the authentication, the master device 1 distributes a NOC certificate to the controlled device 2 .

[0283] Step S407 : the master device 1 configures the control authority for the controlled device 2 .

[0284] For example, the master device 1 sends device information, including control authority, to the controlled device 2, so that the controlled device 2 stores the device information of the master device 1 in an access control list (ACL) to manage the master device 1 through the ACL.

[0285] Step S408 : The master device 1 sends the configuration information of the wireless network to the controlled device 2 .

[0286] The master device 1 sends the configuration information of the wireless network to the controlled device 2 and instructs the controlled device 2 to join the wireless network.

[0287] Step S409: The master device 1 establishes a second secure session with the controlled device 2.

[0288] After the controlled device 1 joins the wireless network, the master device 1 and the controlled device 2 can establish a second connection based on the wireless network, which is a Wi-Fi connection. The master device 1 and the controlled device 2 can establish a second secure session based on the second connection and the NOC certificate they each hold, such as a Certificate-Authenticated Session Establishment (CASE) session, to transmit instructions and data through the second secure session.

[0289] Based on the above process, master device 1 completes network configuration for controlled device 2. As shown in Figure 19, controlled device 2 joins master device 1's virtual domain, such as Fabric 1. The NOC certificate held by master device 1 includes its Node ID in Faric1, such as Node ID: 1. The NOC certificate held by controlled device 2 includes its Node ID in Faric1, such as Node ID: 2. Master device 1 can now control controlled device 2 and transmit data with it.

[0290] In step S403, master device 1 requests controlled device 2 to provide authentication data for device authentication based on the authentication data. In response to the request, controlled device 2 returns signed data to master device 1. This signed data includes the authentication data and a signature. The signature is used by master device 1 to verify the identity of the device that received the authentication data. This signature is obtained by signing the authentication data using the private key of controlled device 2. Therefore, the private key of controlled device 2 is crucial for ensuring the validity of the signature.

[0291] The permanent identity of each Matter device (including the master device 1 and the controlled device 2) is based on a pair of public keys and private keys, and the key pair is unique to each Matter device. Figure 21 shows the system architecture of the controlled device 2 to implement the Matter service. As shown in Figure 21, the Matter protocol stack integrates the Software Development Kit (SDK), such as the Op-CSR module, the device authentication module, and other public implementation modules of the protocol stack, into the upper-layer application controlled by Matter. Users can control the switch of the Matter service through the visual page of the upper-layer application and implement corresponding functions through the whole machine function modules, such as the button module, the media module, and the channel module. Based on the system architecture shown in Figure 21, the storage security of the private key cannot be guaranteed, and the security of the private key during use cannot be guaranteed, and thus the validity of the signature and the accuracy of the subsequent verification of the identity of the controlled device cannot be guaranteed. In order to solve the above problems, in the embodiment of the present application, the controlled device 2 is configured to support a conventional execution environment (Rich Execution Environment, REE) and a trusted execution environment (Trusted Execution Environment, TEE). The REE is a common execution environment for all devices, running a common operating system (OS) such as Android and iOS. TEE is commonly used for digital rights management (DRM), mobile payments, and sensitive data protection, and offers high security. The TEE stores the private key of the controlled device 2 and does not make this key publicly available. For example, by not exposing any external interfaces, other applications running outside the TEE cannot access the private key. This ensures the security of the private key storage.

[0292] An embodiment of the present application provides a system architecture for a controlled device to implement Matter services as shown in Figure 22. Compared with the system architecture shown in Figure 21, the system architecture shown in Figure 22 integrates client applications (Client App, CA) and trusted applications (Trusted App, TA) at the platform layer. The CA application belongs to the application in REE, and the TA application belongs to the application in TEE. The private key of the controlled device 2 can be stored by TA.

[0293] Based on the system architecture shown in FIG22 , the embodiment of the present application further provides a device authentication method. The controlled device can perform device authentication with the master device according to the process shown in FIG23 . The specific steps are as follows:

[0294] S71: Receive an authentication request sent by the master device based on the Matter protocol stack under REE.

[0295] Before step S71, the controlled device establishes a first secure session with the master device in response to the network configuration request of the master device. The process may refer to steps S401-S402 and will not be described in detail here. Based on the first secure session, the controlled device and the master device perform a device authentication process.

[0296] The data required for device authentication between the controlled device and the master device include the certificate chain of the controlled device and the authentication data provided by the controlled device.

[0297] In some embodiments, if the master device already has the certificate chain of the controlled device, there is no need to request the certificate chain from the controlled device again.

[0298] In other embodiments, if the master device does not have the certificate chain of the controlled device, the controlled device may exchange the certificate chain with the master device according to the process shown in FIG24 . The specific steps are as follows:

[0299] S801: Receive a certificate chain request sent by a master device based on the Matter protocol stack under REE.

[0300] This certificate chain request is used to request the controlled device's certificate chain. The master device can use the CertificateChainRequest command to read the controlled device's certificate chain. This certificate chain includes the Product Attestation Intermediate (PAI) and the Device Attestation Certificate (DAC). Therefore, the master device typically needs to obtain these two certificates using two separate commands.

[0301] S802: In response to the certificate chain request, generate response information under REE.

[0302] In response to the master device's certificate chain request, the controlled device generates a response message under the REE. The response message includes the certificate chain, the public key corresponding to the private key, and a certification declaration (CD) file. The CD file is signed and issued by the Cloud Security Alliance (CSA).

[0303] S803: Send response information to the master control device, so that the master control device uses the public key to verify the signature after receiving the signed data.

[0304] The controlled device sends this response information to the master device so that the master device can verify the controlled device's certificate chain to ensure that it links back to a trusted root CA (Certificate Authority) for the device authentication PKI (Public Key Infrastructure). These root CAs are called Product Attestation Authorities (PAAs) and are distributed using a Distributed Conformance Ledger (DCL).

[0305] The master device performs verification based on the response information, such as verifying whether the CD file is signed by the CSA Alliance, verifying whether the vendor unique identifier (Vendor ID, VID) and product unique identifier (Product ID, PID) in the DAC certificate and CD certificate match, etc.

[0306] After the master device verifies the certificate chain, it generates a random number (nonce) and sends an authentication request to the controlled device. The authentication request includes the random number and is used to request authentication data of the controlled device. The authentication data may include the random number sent by the master device.

[0307] The controlled device receives the authentication request sent by the master device based on the Matter protocol stack. At this time, the controlled device is in the REE execution environment.

[0308] S72, in response to the authentication request, switches from REE to TEE, and uses the private key to sign the authentication data under TEE to obtain the signed data.

[0309] By executing the process of signing and authenticating data with a private key under TEE, the controlled device can prevent the private key from leaving the TEE and ensure the security and reliability of the signing process.

[0310] In some embodiments, the controlled device can switch from REE to TEE according to the process shown in Figure 25. The specific steps are as follows:

[0311] S251, under REE, calling the TEE driver through the first interface to enter the monitor.

[0312] In conjunction with the model diagram shown in Figure 26, the REE is the normal world and the TEE is the secure world. The TEE also includes a monitor, which is used to switch the execution environment of the controlled device between the REE and TEE.

[0313] If the controlled device needs to switch to TEE when in REE, it can call the TEE driver (Driver) through the first interface to enter the monitor. The first interface can be an open source (Open Portable) - TEE client interface (Client API), which provides a set of functions that allow CA applications in the normal world to communicate with TA applications in the secure world and utilize the services provided by them. TEE Driver can be OP-TEE Linux Driver, a driver for communicating with OP-TEE in the Linux system. The driver provides the necessary underlying support so that applications can utilize the security and protection mechanisms of OP-TEE and enter the monitor through the TEE Driver.

[0314] S252, switch the REE to the TEE through the monitor.

[0315] After entering the monitor, the REE is switched to the TEE through the monitor, that is, switching from the normal world to the secure world, and completing related tasks through the secure world, such as signing the authentication data, to ensure the security of various data in the task and the security of the task execution process.

[0316] In some embodiments, during the switching process between REE and TEE, the controlled device can sign the authentication data through the first application and the second application according to the process shown in Figure 27. The specific steps are as follows:

[0317] S1101: In REE, a second application is called by a first application.

[0318] The first application is an application running on REE, namely a CA application. The second application is a trusted application running on TEE, namely a TA application.

[0319] In some embodiments, the controlled device may call the first application according to the process shown in FIG28 , with the following specific steps:

[0320] S1201: Call back the Matter upper-layer application in the first way based on the Matter protocol stack.

[0321] The first method involves the JNI approach. The Matter protocol stack uses the JNI approach to call back into Matter upper-layer applications, ensuring cross-platform compatibility. Through JNI, the Matter protocol stack can interact with the underlying native code, thus achieving cross-platform compatibility. The Matter protocol stack can run on different operating systems and hardware platforms and communicate seamlessly with applications through JNI. This approach allows the Matter protocol stack to directly call the underlying native code without requiring additional language translation or intermediate layers. This improves execution efficiency and performance, especially for applications that require processing large amounts of data or frequent calls. With native library support, through JNI, the Matter protocol stack can directly utilize existing native libraries and functions, which may be widely used and optimized in the underlying system. This saves development time and resources while providing the efficient and stable functionality provided by the underlying libraries. JNI offers superior system interface access, allowing the Matter protocol stack to directly access underlying system interfaces and functions, such as the file system, network, and sensors. This enables more flexible integration and interaction with specific device features.

[0322] The first method may also include other methods, such as callback function pointer, event mechanism, message queue, interface call, etc.

[0323] S1202: The Matter upper layer application calls the first application program.

[0324] The Matter upper-layer application first calls the first application in the REE to call the second application in the TEE through the first application.

[0325] Referring to the schematic diagram of CA and TA shown in Figure 29, the first application (CA) calls a TEE driver, such as the OP-TEE Linux Driver, through the TEE client interface (OP-TEE Client API) and enters the monitor through the TEE driver. The monitor can call the Hardware Abstraction Layer (HAL) in the TEE to switch the REE to the TEE, thereby calling the second application (TA).

[0326] S1102: Under TEE, obtain the private key through the second application.

[0327] As shown in Figure 29, the second application (TA) can access the TEE core (Core) and TEE functional implementations, such as TEE functions, through the TEE internal API within the TEE. Thus, the second application can obtain the private key stored in the TEE through the TEE internal API. In this way, the process of the second application obtaining the private key is completely implemented within the TEE, effectively ensuring the security of the private key acquisition process.

[0328] S1103, the second application uses the private key to sign the authentication data to obtain the signed data.

[0329] The second application uses the private key under TEE to complete the signing process of the authentication data. This ensures that the private key will never leave the TEE, and the signing process will also be protected by TEE, thereby ensuring the security of the private key and the security of the private key usage process.

[0330] The controlled device can use the private key to sign the authentication data using the second application according to the process shown in Figure 30. The specific steps are as follows:

[0331] S1401: The second application program calls a signature module and transmits a private key to the signature module.

[0332] You can refer to the schematic diagram of the business module in TEE shown in Figure 31. TEE includes a second application (TA), a TA interface, a certificate storage module and a signature module. It can be seen that the above modules are all modules running based on TEE and are internal modules of TEE.

[0333] The second application calls the signature module through the TA interface and passes the obtained private key as a parameter to the signature module. Therefore, the acquisition of the parameters (private key) required when the signature module executes the signature method is also performed in the TEE, which can ensure that the private key never leaves the TEE.

[0334] S1402, the signature module signs the authentication data according to the private key to obtain the signed data.

[0335] The signature module can be based on the Elliptic Curve Digital Signature Algorithm (ECDSA). Before signing, the authentication data is first hashed with Hash256 to produce the data to be signed. The second application passes the public key, private key, curve type, and the data to be signed into the signature module to perform the signature and obtain the signed data.

[0336] S73: Switch from TEE to REE, and send the signed data to the master device based on the Matter protocol stack under REE, so that the master device verifies the signature based on the signed data and configures the network for the controlled device.

[0337] After obtaining the signed data, the controlled device switches the TEE to the REE through the monitor, and the second application returns the signed data to the first application to ensure that the data leaving the TEE does not carry the private key, thereby ensuring the security of the private key.

[0338] Under REE, the first application transmits the signed data back to the Matter upper-layer application through the OP-TEE Client API, and the Matter upper-layer application passes it to the Matter protocol stack, which then sends the signed data to the master device through the Matter protocol stack.

[0339] In some embodiments, the controlled device may send the signed data to the master device according to the process shown in FIG32 . The specific steps are as follows:

[0340] S1601: Convert the signed data into a specified format based on the Matter protocol stack.

[0341] The signed data in a specified format satisfies a communication protocol supported by the master device, such as a Tag-Length-Value (TLV) format.

[0342] S1602: Send the signed data in the specified format to the main control device.

[0343] This ensures that the master device can correctly parse and process the received signed data to authenticate the controlled device.

[0344] The master device will verify whether the signed data includes the random number sent by the master device and whether it is signed by the private key of the controlled device.

[0345] In conjunction with Figure 33, the device authentication process between the master device and the controlled device is exemplified. As shown in Figure 33, taking the controlled device as a TV as an example, S1701, the master device sends a certificate chain request to the TV; S1702, the Matter protocol stack in the TV responds to the certificate chain request and calls the Matter upper-layer application. The Matter upper-layer application generates a response message under REE, and the response message includes the PAI certificate, DAC certificate and public key; S1703, the Matter upper-layer application returns the response message to the Matter protocol stack in the TV; S1704, the Matter protocol stack in the TV returns the response message to the master device; S1705, the master device verifies the certificate chain according to the response message, and generates a random number after the verification is passed; S1706, the master device sends an authentication request to the TV, and the authentication request includes a random number; S1707, the Matter protocol stack in the TV responds to the authentication request and calls the private key signature interface; S1708, the Matter upper-layer application calls the CA application in REE to call T through the CA application. Private key signature interface of the TA application in EE; S1709, the TA application obtains the private key stored by the TEE in TEE; S1710, the TA application uses the private key to sign the authentication data under the TEE to obtain the signed data; S1711, the TA application returns the signed data to the Matter upper-layer application through the CA application; S1712, the Matter upper-layer application returns the signed data to the Matter protocol stack; S1713, the Matter protocol stack converts the signed data into a specified format, such as a TLV structure; S1714, the Matter protocol stack returns the signed data after the converted format to the main control device; S1715, the main control device uses the public key to verify the signed data.

[0346] After the controlled device joins the virtual domain of the master device, it can be controlled by the master device. Based on the multi-admin function of the Matter protocol, the controlled device can join the virtual domains of multiple master devices at the same time. In a virtual domain, each device shares the same CA and agrees on a Fabric ID. After the controlled device joins the virtual domain of the master device, it is assigned a NOC certificate. Based on the above security features, a virtual domain can usually be an ecosystem, such as Google Fabric, Apple Fabric, Home kit Fabric, Amazon Fabric, etc. Therefore, when a controlled device joins the virtual domains of multiple master devices, it is equivalent to being used by multiple ecosystems at the same time. If the user cannot quickly and accurately know all the master devices, it will not be possible to reasonably and effectively control the master devices.

[0347] In order to solve the above problem, in an embodiment of the present application, the controlled device stores master device information, where the master device information is device information of the master device having control authority over the controlled device.

[0348] In some embodiments, the controlled device can manage the master device information through the ACL table. An example of the ACL table provided by Matter is given as follows:

[0349] The ACL array in the Access Control Cluster contains only one element. FabricIndex represents the Fabric ID of the virtual domain to which the controlled device belongs; Privilege represents the permission, such as Administer; AuthMode represents the authentication mode, such as CASE; Subjects:[] represents the Node ID of the node with control permission in the virtual domain; and Targets:[] indicates that the node has control permission for all content. This element can also include other parameters, such as manufacturer information, product name, and device name, which are not limited here.

[0350] In some embodiments, the controlled device is an electronic device and is configured to display a list of master devices, wherein the list of master devices includes master devices corresponding to the master device information, that is, master devices that have control authority over the controlled device.

[0351] When the controlled device does not display the master device list, the controlled device can display the master device list according to the process shown in Figure 34. The specific steps are as follows:

[0352] S1801 : In response to a network configuration request from a first master device, join a virtual domain of the first master device based on the Matter protocol.

[0353] The first master device is the master device that currently performs network configuration for the controlled device. Step S1801 may refer to steps S401-S409 and S71-S73, which are not described in detail here.

[0354] S1802: Obtain device information of a first master control device, and add the device information of the first master control device to the master control device information.

[0355] After joining the virtual domain of the first master device, the controlled device establishes a second secure session with the first master device and receives the NOC certificate and device information from the first master device based on this second secure session. The NOC certificate includes the Fabric ID of the virtual domain to which the first master device belongs. The device information of the first master device may include manufacturer information, product name, device name, control permissions, etc. The manufacturer information may include the manufacturer name and the name of the control app. The control app must support the Matter function.

[0356] The controlled device adds the device information of the first master device to the master device information to manage the device information of the first master device.

[0357] S1803: Display a list of master control devices according to the master control device information.

[0358] The updated master control device information includes the device information of the first master control device. Therefore, the master control device list displayed according to the master control device information includes the first master control device.

[0359] In some embodiments, the virtual domain of the first master device can be the first virtual domain joined by the controlled device. In this case, the master device information only includes the device information of the first master device. Therefore, the master device list only includes the first master device. For example, taking the controlled device as a television and the first master device as a mobile phone, the device information of the mobile phone includes a device name, such as Mobile Phone 1. After the television adds the device information of the mobile phone to the master device information, a master device list 1901 as shown in Figure 35 is displayed based on the master device information. If master device list 1901 uses device names to represent corresponding master devices, then master device list 1901 includes Mobile Phone 1.

[0360] In other embodiments, the controlled device has already joined the virtual domain of other master devices before joining the virtual domain of the first master device. In this case, the master device information includes both the device information of the first master device and the device information of the other master devices. Therefore, the master device list includes the first master device and the other master devices. Taking the controlled device as a television and the first master device as a mobile phone as an example, the mobile phone's device information may include a device name, such as "Mobile Phone 1." Before joining the mobile phone's virtual domain, the television has already joined the tablet computer's virtual domain. That is, the master device information already includes the tablet computer's device information, and the tablet computer's device information may include a device name, such as "Tablet Computer 1." After the television adds the mobile phone's device information to the master device information, it displays a master device list 2001 as shown in FIG36 based on the master device information. If master device list 2001 uses device names to represent corresponding master devices, master device list 2001 includes Tablet Computer 1 and Mobile Phone 1. The tablet computer and the mobile phone may belong to different ecosystems, such as a tablet computer belonging to Apple and a mobile phone belonging to Amazon.

[0361] In some embodiments, after the controlled device adds the device information of the first master device to the master device information, it automatically displays a master device list based on the master device information. This allows the user to quickly verify that the currently used master device has successfully paired with the controlled device through the master device list, and can also obtain all master devices corresponding to the controlled device based on the master device list.

[0362] In other embodiments, the controlled device displays a list of master devices based on the master device information in response to a first control instruction from the user. The first control instruction is used to instruct the display of the list of master devices, so that the controlled device can display the list of master devices according to the actual needs of the user. The display entry for the list of master devices can be set in a corresponding application of the controlled device, in a settings menu of the controlled device, as a shortcut on a designated page, and / or on a control device of the controlled device, such as a remote control.

[0363] In some embodiments, if the master device information includes device information of multiple master devices, the master device list includes at least one group, and the device information of the corresponding master device is displayed in the group. Among them, the grouping is set according to preset conditions, and the preset conditions can be that the same virtual domain is the same group, the same ecosystem is the same group, the same product category is the same group, the same space (such as bedroom, living room, etc.) is the same group, the same control authority is the same group, and the same special mark added by the user (such as a common mark) is the same group. The device information of the master device may include parameters related to the preset conditions, such as product category, location, control authority, user-added mark, etc. The controlled device can determine the group to which the master device belongs based on the device information of the master device. Taking the controlled device as a TV and the master devices corresponding to the master device information including mobile phone 1, mobile phone 2 and tablet computer 1 as an example, if grouped by product category, the TV can display the master device list 2101 shown in Figure 37. The master device list 2101 includes group 1 and group 2. Group 1 includes mobile phone 1 and mobile phone 2, and group 2 includes tablet computer 1.

[0364] In some embodiments, the user can customize the names of the groups, such as customizing group 1 in Figure 37 as a mobile phone group and customizing group 2 as a tablet computer group.

[0365] In some embodiments, the user can customize the preset conditions, which are not limited to the categories disclosed above.

[0366] In some embodiments, the user can customize the group to which the master device belongs. For example, the user can perform an edit operation on the controlled device to move the target master device from the current group to the target group. The edit operation can be when the master device list is displayed, when the user selects the option of the target master device, dragging the option from the current group to the target group. After adjusting the group to which the target master device belongs, the controlled device accordingly modifies the device information of the target master device in the master device information to modify the device information of the target master device to include the target group based on the current preset conditions, so that when the master device list is displayed again, the target master device is displayed in the target group.

[0367] When the controlled device displays the master device list, the controlled device can update the master device list according to the process shown in Figure 38. The specific steps are as follows:

[0368] S2201 : In response to a network configuration request from a second master device, join the virtual domain of the second master device based on the Matter protocol.

[0369] S2202: Acquire device information of a second master device, and add the device information of the second master device to the master device information.

[0370] Steps S2201-S2202 can refer to steps S1801-S1802 and are not repeated here.

[0371] S2203: Add and display the second master control device in the master control device list according to the master control device information.

[0372] The second master device can be added and displayed at the first or last position in the master device list or at the first or last position in the corresponding group. In this way, the user can determine that the second master device has successfully configured the controlled device based on the second master device added and displayed in the master device list.

[0373] In some embodiments, if the virtual domain of the second master device is the first virtual domain joined by the controlled device, the master device list displayed by the controlled device is empty before joining the virtual domain of the second master device. After the controlled device joins the virtual domain of the second master device, the updated master device list includes the second master device. Taking the controlled device as a television and the second master device as mobile phone 1 as an example, as shown in ① of Figure 39, when the television displays master device list 2301, it is being paired with the network by mobile phone 1, and master device list 2301 is empty. After the television is successfully paired with the network by mobile phone 1, it updates and displays master device list 2302 as shown in ② of Figure 39, and master device list 2302 includes mobile phone 1.

[0374] In some embodiments, if the controlled device has already joined the virtual domain of another master device before joining the virtual domain of the second master device, such as joining the virtual domain of the first master device in accordance with steps S1801-S1803, the master device list displayed by the controlled device before joining the virtual domain of the second master device includes the first master device. After the controlled device joins the virtual domain of the second master device, the updated master device list includes the first master device and the second master device. For example, if the controlled device is a television, the first master device is mobile phone 1, and the second master device is mobile phone 2, the television has already joined the virtual domain of mobile phone 1, as shown in FIG40 (1). The television displays master device list 2401, which includes mobile phone 1. While displaying master device list 2401, the television is paired with mobile phone 2. After successful network pairing, the television updates and displays master device list 2402, as shown in FIG40 (2). Master device list 2402 includes mobile phone 1 and mobile phone 2.

[0375] In some embodiments, the Fabric capabilities that the controlled device can support are limited, that is, the number of virtual domains that can be joined at the same time is limited, such as the upper limit of the number of virtual domains that can be joined is 5 to 254. The controlled device determines the master device that can be displayed in the master device list based on the supported Fabric capabilities. For example, if the virtual domain that the controlled device has joined reaches the upper limit of the capability, then if the controlled device is configured again, the controlled device can display a pop-up window to prompt the user through the pop-up window that it can no longer join other virtual domains and terminate the configuration. Alternatively, the controlled device automatically exits the virtual domain of a master device to join the virtual domain of the master device that is currently being configured to ensure the current needs of the user.

[0376] In some embodiments, when displaying the master device list, the controlled device may display a portion of the master device's device information, such as the name of the electronic device, in the master device list based on the size limitation of the master device list display area, to allow the user to quickly determine the main device information of the master device. The controlled device is configured to display more complete device information of the master device based on the user's needs. The controlled device may display complete device information according to the process shown in FIG41. The specific steps are as follows:

[0377] S2501 : In response to a second control instruction from a user, an option of a first target device in a master control device list is selected.

[0378] The second control instruction is used to instruct the display of device information of the first target device. In some embodiments, the user can enter the second control instruction by moving the focus to an option of the first target device. In some embodiments, the user can enter the second control instruction by moving the focus to an option of the first target device and selecting the option.

[0379] The controlled device selects an option of the first target device in response to the second control instruction.

[0380] S2502: Display device information of the first target device.

[0381] The controlled device can display the device information of the first target device in the form of a pop-up window. The pop-up window can correspond to the option display of the first target device, so that the user can accurately match the device information in the pop-up window with the corresponding control device.

[0382] Taking the controlled device as a TV as an example, as shown in ① in Figure 42, the TV displays a master device list 2601, which includes mobile phone 1, mobile phone 2 and tablet computer 1. If the user wants to browse more complete device information of mobile phone 1, the remote control can be used to control the focus to move to the option of mobile phone 1 to input a second control instruction to the TV. In response to the second control instruction, the TV displays a pop-up window 2602 at a position corresponding to the option of mobile phone 1, as shown in ② in Figure 42, and displays the device information of mobile phone 1 in the pop-up window 2602, such as manufacturer information: manufacturer name, control end App name, control permissions (such as View, i.e., permission to read or subscribe to data). The displayed device information can also include: device type, product name, location, etc. Pop-up window 2602 can also display the Fabric ID of the virtual domain to which mobile phone 1 belongs, such as Fabric 01.

[0383] In some embodiments, the controlled device is configured with the editing function of the controlling device.

[0384] The controlled device can remove the master device according to the process shown in Figure 43. The specific steps are as follows:

[0385] S2701 , in response to a third control instruction of the user, selecting an option of a second target device in the master control device list.

[0386] The third control instruction is used to instruct the display of an edit page for the second target device. In some embodiments, the user can enter the third control instruction by moving the focus to an option on the second target device. In some embodiments, the user can enter the third control instruction by moving the focus to an option on the second target device and selecting the option.

[0387] The controlled device selects an option of the second target device in response to the third control instruction.

[0388] S2702: Display an edit page for the second target device.

[0389] The edit page includes a remove option. In some embodiments, the edit page can be a pop-up window in step S2602, and the remove option is an option within the pop-up window. In some embodiments, the edit page can be a dedicated page, and the remove option is an option within the dedicated page.

[0390] S2703 : In response to a confirmation instruction input by the user based on the removal option, cancel the control authority of the second target device over the controlled device, and delete the second target device from the master control device list.

[0391] The controlled device cancels the second target device's control authority over the controlled device in response to the determination instruction. For example, the controlled device deletes the device information of the second target device from the ACL table and sends a removal message to the second target device, so that the second target device determines that it no longer has control authority over the controlled device based on the removal message. The second target device can manage the device information of each controlled device it has control authority over through the binding cluster provided by Matter. After the second target device receives the removal message sent by the controlled device, it deletes the device information of the controlled device from the binding cluster.

[0392] The controlled device deletes the second target device from the master device list and deletes the device information of the second target device from the master device information. In this way, the user can confirm that the second target device has been successfully removed based on the updated master device list, and the controlled device can no longer display the second target device when displaying the master device list again.

[0393] Taking the controlled device as a TV as an example, as shown in Figure 44 (1), the TV displays a master device list 2801, which includes mobile phone 1, mobile phone 2, and tablet computer 1. If the user wishes to remove mobile phone 1 from controlling the TV, they can use the remote control to move the focus to the option for mobile phone 1, thereby inputting a third control command to the TV. In response to this third control command, as shown in Figure 44 (2), the TV displays a pop-up window 2802 corresponding to the option for mobile phone 1. This pop-up window 2802 serves as an edit page. Pop-up window 2802 displays mobile phone 1's device information, the Fabric ID of the virtual domain to which mobile phone 1 belongs, and a remove option 2803. The user enters a confirmation command based on the remove option 2803. In response to this confirmation command, the TV removes mobile phone 1 from master device list 2801 and displays master device list 2804, as shown in Figure 44 (3). Master device list 2804 includes mobile phone 2 and tablet computer 1, but not mobile phone 1. The TV cancels the control permission of mobile phone 1, such as deleting the device information of mobile phone 1 from the ACL table, and sends a removal message to mobile phone 1, so that mobile phone 1 is no longer displayed when the main control device list is displayed again.

[0394] In some embodiments, the edit page may also include a permission management option. The controlled device can modify the control permission of the master device according to the process shown in Figure 45. The specific steps are as follows:

[0395] S2901 , in response to a confirmation instruction input by the user based on the permission management option, displaying a permission management page.

[0396] The Permission Management page is used to set the type of permissions the secondary target device has for the controlled device. Permission types include View, Operate, Manage, and Administer. Operate permissions allow you to write operational data and invoke operational commands, Manage permissions allow you to write configuration data and invoke configuration commands, and Administer permissions allow you to write management data and invoke management commands.

[0397] The permission management page may include switches for each permission type. By turning on the switch for each permission type, the permission type is enabled, and by turning off the switch for each permission type, the permission type is disabled. The permission management page may include selection items for the permission type, through which the permission type to be enabled is selected.

[0398] S2902: In response to a switching instruction input by the user, modify the control permission in the device information of the second target device to a target permission type, and send a first message to the second target device.

[0399] The switching instruction is used to instruct to modify the current control authority of the second target device to the target authority type, and accordingly modify the control authority in the device information of the second target device to the target authority type, so that when the main control device list is displayed, the control authority of the second target device is displayed as the target authority type.

[0400] The controlled device also sends a first message to the second target device, which includes modifying the control authority to the target authority type, so that the second target device modifies the control authority to the target authority type in response to the first message to determine that the control authority for the controlled device is the target authority type.

[0401] Taking the controlled device as a TV as an example, as shown in Figure 46 (1), the TV displays a list of master devices 3001, which includes mobile phone 1, mobile phone 2, and tablet computer 1. If the user wants to modify mobile phone 1's control permissions over the TV, they can use the remote control to move the focus to the option for mobile phone 1 to enter a third control command into the TV. In response to this third control command, as shown in Figure 46 (2), the TV displays a pop-up window 3002 at the location corresponding to the option for mobile phone 1. This pop-up window 3002 serves as an editing page. Pop-up window 3002 displays mobile phone 1's device information, the Fabric ID of the virtual domain to which mobile phone 1 belongs, and permission management options 3003. The user enters a confirmation command based on the permission management options 3003. In response to this confirmation command, as shown in Figure 46 (3), the TV displays a permission management page. This permission management page includes switches for various permission types, such as View 3004, Operate 3005, Manage 3006, and Administer 3007. If the current permission type of mobile phone 1 is View, View switch 3004 is turned on. The user can input a switch instruction based on Operate switch 3005, as shown in Figure 46 (4), to switch the control permission of mobile phone 1 to Operate. The TV changes the control permission in the device information of mobile phone 1 to Operate. If the TV displays the device information of mobile phone 1 again, it may display a pop-up window 3008 as shown in Figure 46 (5), indicating that the control permission of mobile phone 1 is Operate. The TV also sends a first message to mobile phone 1, which includes the message that the control permission has been changed to Operate.

[0402] In some embodiments, the edit page may also include a rename option. The controlled device may rename the master device according to the process shown in FIG47 , with the following specific steps:

[0403] S3101 , in response to a confirmation instruction input by the user based on a rename option, displaying a rename page.

[0404] The rename page includes a text input box for the user to enter a new name for the second target device.

[0405] S3102, rename the second target device according to the first name entered by the user on the rename page, modify the name in the device information of the second target device to the first name, update the name of the second target device in the master device list to the first name, and send a second message to the second target device.

[0406] The first name is a new name set by the user for the second target device. The controlled device modifies the name in the device information of the second target device to the first name, so that the first name of the second target device is displayed when the master device list is displayed.

[0407] The controlled device further sends a second message to the second target device, where the second message includes modifying the name to the first name, so that the second target device modifies the name to the first name in response to the second message and provides the first name externally.

[0408] Taking the controlled device as a TV as an example, as shown in Figure 48 (1), the TV displays a list of master devices 3201, which includes Phone 1, Phone 2, and Tablet 1. If the user wants to rename Phone 1, they can use the remote control to move the focus to the option for Phone 1, thereby inputting a third control command to the TV. In response to this third control command, as shown in Figure 48 (2), the TV displays a pop-up window 3202 corresponding to the option for Phone 1. This pop-up window 3202 serves as an edit page. Pop-up window 3202 displays Phone 1's device information, the Fabric ID of the virtual domain to which Phone 1 belongs, and a rename option 3203. The user enters a confirmation command based on the rename option 3203. In response to this confirmation command, as shown in Figure 48 (3), the TV displays a rename page, which includes a text input box 3204. The user can enter a first name, such as Phone AAA, in text input box 3204. Based on the first name, the TV modifies the name in the device information of mobile phone 1 to mobile phone AAA. If the TV controls the device list again, it may display the controlled device list 3205 shown in Figure 48 (4), which includes mobile phone AAA, mobile phone 2, and tablet computer 1. The TV also sends a second message to mobile phone 1, which includes the name change to mobile phone AAA.

[0409] In addition to the above embodiments, this application also provides some other embodiments related to electronic devices, terminal devices, and device network configuration, which are specifically described as follows:

[0410] The terminal device provided in the embodiments of the present application may have various implementation forms, for example, it may be a television, a laser projection device, a monitor, an electronic bulletin board, an electronic table, etc.

[0411] 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.

[0412] Matter devices are smart home hardware products that utilize the Matter protocol. They 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 players. Matter devices can be equipped with sensors or sensor switches to control the startup and operation of Matter devices.

[0413] 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.

[0414] 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.

[0415] 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.

[0416] 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.

[0417] In order to solve the problem of difficult network configuration interaction between the control end and the Matter device, some embodiments of the present application provide an electronic device 200, which includes 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.

[0418] 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.

[0419] 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.

[0420] As shown in FIG49 , the electronic device 200 further includes a processor 250, and the processor 250 is configured to execute the following method:

[0421] 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.

[0422] In some embodiments, a user can input a network configuration instruction to the electronic device 200 through various input methods such as voice, gestures, touchpad, and remote control. The network configuration instruction may include device information of the device to be configured, including device name, device model, device installation location, and device readiness status. As shown in FIG50 , 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 250 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 transmits the above-mentioned network configuration information to the terminal device 300 via the first communication channel.

[0423] 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.

[0424] In some embodiments, before receiving the network configuration instruction, the processor 250 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 250 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.

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

[0426] 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.

[0427] 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.

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

[0429] In some embodiments, as shown in FIG51 , the processor 250 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 250 may send a prompt message to the terminal device 300 at intervals of a first duration 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.

[0430] 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.

[0431] 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.

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

[0433] After electronic device 200 receives the authentication code information, processor 250 searches for the device to be networked based on the authentication code information, establishes a second communication channel with the device to be networked via the second communication interface, and thereby completes network configuration for the device to be networked. In this embodiment, processor 250 may scan for networked devices via wireless communication.

[0434] In some embodiments, wireless communication may include technologies such as Bluetooth modules, infrared scanning, radio or electromagnetic waves, but different wireless communication technologies have different coverage scanning ranges. Therefore, the processor 250 can perform wireless communication scanning on the distribution network equipment within a first preset range, and the first preset range is the coverage range of the communication method with the largest wireless communication coverage range.

[0435] 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.

[0436] 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.

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

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

[0439] Among them, in order to facilitate pairing, as shown in Figure 52, the processor 250 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 250 can start to perform pairing through the identification code information. During the pairing process, the processor 250 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.

[0440] The network configuration device information may include the authentication code information of the network configuration device. The processor 250 may compare the authentication code information of the device to be configured with the authentication code information of other network configuration devices. If the authentication code information of the other network configuration devices is the same as the authentication code information of the device to be configured, it indicates that the pairing is successful.

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

[0442] In order to determine whether the pairing of the electronic device 200 fails, in this embodiment, as shown in FIG53 , a first time threshold may be set to assist in determining the pairing result, specifically including:

[0443] S5301. Distribute network device information through authentication code information;

[0444] S5302. Record the first pairing duration;

[0445] S5303: Determine whether the first pairing duration is greater than a first duration threshold. If so, execute step S5304; otherwise, execute step S5305.

[0446] S5304: Confirm pairing failure.

[0447] That is, when the first pairing duration exceeds the first duration threshold, it means that within the first duration threshold, the processor 250 has not paired with a network-pairing device having the same authentication code information.

[0448] S5305: Continue pairing.

[0449] In some embodiments, since the processor 250 is still scanning for network configuration devices and adding network configuration device information during the pairing process, the first pairing duration also includes the waiting time for the processor 250 to scan. To this end, as shown in FIG54 , the processor 250 may also start recording the first pairing duration when pairing the most recently added network configuration device information, and restart the first pairing duration when new network configuration device information is added.

[0450] 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.

[0451] When processor 250 generates a first scan result, it indicates that network configuration device information for the device to be configured has been obtained within the scanning range of electronic device 200. Therefore, processor 250 can directly establish a second communication channel with the device to be configured. The second communication channel can use a different wireless communication method than the first communication channel, for example, the first communication channel can be a wireless network connection, while the second communication channel can be a Bluetooth communication connection. After processor 250 establishes the second communication channel with the device to be configured, network configuration can be performed on the device to be configured via the second communication channel.

[0452] 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.

[0453] When the processor 250 does not generate the first scanning result, it indicates that the electronic device 200 fails to pair with the network device to be paired. At this time, the processor 250 generates a second scanning result.

[0454] 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 processor 250 may send the second scan result to the terminal device 300. Upon receiving the second scan result, the terminal device 300 may activate its wireless communication operating module, such as its Bluetooth module, based on the second scan result.

[0455] 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.

[0456] In some embodiments, the processor 250 may further generate a terminal scanning instruction based on the second scanning result, the terminal scanning instruction being used to instruct the terminal device 300 to start the wireless communication operation module, and the processor 250 may send the terminal scanning instruction to the terminal device 300. The terminal device 300 will respond to the terminal scanning instruction, start the wireless communication operation module, and begin performing wireless communication scanning on the coverage area where the terminal device 300 is located.

[0457] Since the terminal device 300 is separated from the electronic device 200 by a certain distance, the terminal device 300 can scan the range that the electronic device 200 cannot scan, thereby expanding the range of scanning the devices to be networked. Therefore, as shown in Figure 55, 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.

[0458] After receiving the device information sent by the terminal device 300, the processor 250 may continue to add the device information sent by the terminal device 300 on the basis of the original device information table, and continue to perform pairing on the device information.

[0459] In some embodiments, the first and second preset ranges may have overlapping scanning areas. When a network distribution device is located 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 may scan and obtain network distribution device information for the overlapping device, resulting in multiple acquisitions of network distribution device information for the overlapping device, reducing network distribution efficiency.

[0460] To this end, as shown in FIG56 , the processor 250 performs the following steps:

[0461] S561. Obtain distribution network feedback information;

[0462] S562, determine whether the distribution network device information of the overlapping device is included; if so, execute step S563; otherwise, execute step S565;

[0463] S563, filtering out the distribution network equipment information of overlapping equipment;

[0464] S564. Perform pairing on the remaining distribution network feedback information.

[0465] S565: Perform pairing on the distribution network feedback information.

[0466] That is, after receiving the network configuration feedback information, the processor 250 can filter the network configuration feedback information 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 processor 250 can obtain the network configuration device information in the current device information table and traverse the network configuration feedback information 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 means that the network configuration device corresponding to the network configuration device information is an overlapping device. In this case, the processor 250 retains the network configuration device information in the device information table and deletes the network configuration device information of the overlapping device in the network configuration feedback information.

[0467] After the screening is completed, the processor 250 adds the network configuration device information that is not the overlapping device in the network configuration feedback information to the device information table. At the same time, the processor 250 performs pairing on the network configuration device information in the network configuration feedback information according to the identification code information. When there is successfully paired network configuration device information in the network configuration feedback information, the processor 250 can mark the network configuration device corresponding to the successfully paired network configuration device information as a device to be configured.

[0468] 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 also includes 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.

[0469] After the terminal device 300 successfully pairs the network configuration device information using the authentication code information, the processor 250 can send a network configuration instruction to the terminal device 300, thereby establishing a wireless communication connection between the terminal device 300 and the network configuration device. The 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 send a Bluetooth connection request to the network configuration device and wait for the network configuration device to respond to the Bluetooth connection request.

[0470] 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.

[0471] 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 the processor 250 generates 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.

[0472] In some embodiments, the processor 250 may also obtain the location information of the terminal device 300 and the distance between the terminal device 300 and the device to be networked through the first communication channel. In the above process, 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 250. The processor 250 may generate corresponding movement information based on the positioning information of the terminal device 300 and the location of the device to be networked, thereby guiding the user to move the terminal device 300 according to the corresponding movement information.

[0473] 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, the processor 250 may generate a movement trajectory of the terminal device 300 based on the positioning information of the terminal device 300 fed back by the server 400, and define a second preset range 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. The processor 250 can then control the terminal device 300 to obtain the network configuration device information within the second preset range based on the authentication code information.

[0474] In some embodiments, the processor 250 may also time the pairing time of the terminal device 300 and record the second pairing time of the terminal device 300 through the first communication channel. Since the device model of the terminal device 300 is different from that of the electronic device 200, the processor may set a second time threshold 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 may 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 may be in text or voice form, for example, "Pairing failed, please try again later!" After generating the prompt message, the terminal device 300 may send the prompt message to the electronic device 200. After receiving the prompt message, the electronic device 200 may re-pair according to the prompt message.

[0475] In some embodiments, the present application provides a terminal device 300, which includes a display, a communicator, and a processor, wherein the communicator is used to establish a first communication channel with the electronic device 200, and the processor is configured to:

[0476] 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.

[0477] 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.

[0478] 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.

[0479] 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.

[0480] 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 250. The processor 250 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.

[0481] Some embodiments of the present application further provide a server 400, including a communication module and a processing module, wherein the communication module is configured to establish a communication connection with the terminal device 300, and the processing module is configured to:

[0482] 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.

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

[0484] 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.

[0485] 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.

[0486] 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.

[0487] Some embodiments of the present application further provide a device network configuration method, the method comprising:

[0488] 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.

[0489] The terminal device and the electronic device are in the same network environment.

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

[0491] The authentication code information is generated by the terminal device scanning a pairing code corresponding to the device information.

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

[0493] 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.

[0494] As can be seen from the above technical solutions, the present application provides an electronic device, a terminal device, and a device network configuration method, which sends the device information of the device to be configured to the terminal device in response to the network configuration command input by the user, and then obtains the identification code information generated by the terminal device scanning the pairing code corresponding to the device information through the first communication channel, and performs a wireless communication scan 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 configured, and the network configuration of the device to be configured is completed. The present application connects the electronic device to the terminal device, and scans the code of the device to be configured through the terminal device, so as to scan the identification code information of the device to be configured 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 configured, and improving the network configuration efficiency between the electronic device and the device to be configured.

[0495] An embodiment of the present application provides a computer non-volatile readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the various processes of executing any of the methods provided in the above-mentioned embodiments of the present application and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

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

[0497] The present application provides a computer program product, which includes a computer program. When the computer program is run on a computer, the computer is enabled to implement any one of the methods provided in the above-mentioned embodiments of the present application.

[0498] For ease of explanation, the above description has been made in conjunction with specific embodiments. However, the above discussion of some embodiments is not intended to be exhaustive or to limit the embodiments to the specific forms disclosed above. Based on the above teachings, various modifications and variations can be obtained. The selection and description of the above embodiments are intended to better explain the principles and practical applications, so that those skilled in the art can better use the embodiments and various different variations of the embodiments suitable for specific use considerations.

Claims

1. An electronic device, comprising: The processor is configured to: in response to a received device authentication certificate request sent by a mobile terminal, send a device authentication certificate to the mobile terminal, so that the mobile terminal performs security authentication according to the device authentication certificate; When receiving the node operation certificate sent by the mobile terminal, installing the node operation certificate and performing network configuration so that the electronic device and the mobile terminal are in the same ecosystem; The operation information sent by the mobile terminal is received, and a corresponding control instruction is determined according to the operation information, so as to perform a corresponding operation according to the control instruction.

2. The electronic device according to claim 1, wherein the processor, upon receiving the node operation certificate sent by the mobile terminal, installs the node operation certificate and performs network configuration, and is configured to: Upon receiving the node operation certificate sent by the mobile terminal, verifying whether the node operation certificate is legal according to the root certificate; wherein, The root certificate is a root certificate corresponding to the ecosystem to which the mobile terminal belongs; If the node operation certificate is legal, the node operation certificate is installed and network configuration is performed.

3. The electronic device according to claim 1, wherein the processor receives the operation information sent by the mobile terminal, and determines the corresponding control instruction according to the operation information, so as to perform the corresponding operation according to the control instruction, and is configured to: In the case where the electronic device and the mobile terminal are in the same ecosystem, in response to the received operation information sent by the mobile terminal, determining whether the operation information comes from the mobile terminal according to the root certificate; wherein, The root certificate is a root certificate corresponding to the ecosystem; If it is determined that the operation information comes from the mobile terminal, a corresponding control instruction is determined according to the operation information, so as to perform a corresponding operation according to the control instruction.

4. The electronic device according to claim 1, wherein the processor, after receiving the node operation certificate sent by the mobile terminal, installs the node operation certificate, and performs network configuration, before receiving the operation information sent by the mobile terminal and determining the corresponding control instruction according to the operation information to perform the corresponding operation according to the control instruction, is further configured to: Obtaining an access control list, wherein the access control list includes authorized terminal information and authorized operation information corresponding to the authorized terminal; Accordingly, the processor receives the operation information sent by the mobile terminal, and determines the corresponding control instruction according to the operation information, so as to perform the corresponding operation according to the control instruction, and is configured to: receiving operation information sent by the mobile terminal, wherein the operation information includes mobile terminal information; Determining whether the mobile terminal is an authorized terminal according to the mobile terminal information and the authorized terminal information; and determining, based on the operation information and the authorized operation information, whether the operation information is the authorized operation information; In the case that the mobile terminal is an authorized terminal and the operation information is the authorized operation information, a corresponding control instruction is determined according to the operation information, so as to perform a corresponding operation according to the control instruction.

5. The electronic device according to claim 1, wherein the processor, before sending the device authentication certificate to the mobile terminal in response to the received device authentication certificate request sent by the mobile terminal, is further configured to: Controlling the communicator to broadcast so that the mobile terminal detects the electronic device; In response to the feedback message sent by the mobile terminal, establishing a wireless connection with the mobile terminal; The device parameters are sent to the mobile terminal through the wireless connection, so that the mobile terminal sends the device authentication certificate request to the electronic device according to the device parameters.

6. The electronic device according to claim 1, wherein the processor, in response to receiving a device authentication certificate request sent by a mobile terminal, after sending the device authentication certificate to the mobile terminal, is further configured to: When receiving an authentication failure message sent by a mobile terminal, wherein the authentication failure message indicates that the electronic device has not passed the security authentication, the display is controlled to display a prompt message.

7. A mobile terminal, comprising: The processor is configured to: send a device authentication certificate request to the electronic device; In response to the received device authentication certificate returned by the electronic device, sending the device authentication certificate to a server so that the server performs security authentication; When receiving an authentication pass message returned by the server, sending a node operation certificate to the electronic device so that the electronic device and the mobile terminal are in the same ecosystem; wherein the authentication pass message indicates that the electronic device has passed the security authentication; The operation information input by the user is received, and the operation information is sent to the electronic device to control the electronic device according to the operation information.

8. A method for controlling an electronic device by a mobile terminal, comprising: In response to a received device authentication certificate request sent by a mobile terminal, sending a device authentication certificate to the mobile terminal, so that the mobile terminal performs security authentication according to the device authentication certificate; When receiving the node operation certificate sent by the mobile terminal, installing the node operation certificate and performing network configuration so that the electronic device and the mobile terminal are in the same ecosystem; The operation information sent by the mobile terminal is received, and a corresponding control instruction is determined according to the operation information, so as to perform a corresponding operation according to the control instruction.

9. A method for controlling an electronic device by a mobile terminal, comprising: Sending a device authentication certificate request to the electronic device; In response to the received device authentication certificate returned by the electronic device, sending the device authentication certificate to a server so that the server performs security authentication; When receiving an authentication pass message returned by the server, sending a node operation certificate to the electronic device so that the electronic device and the mobile terminal are in the same ecosystem; wherein the authentication pass message indicates that the electronic device has passed the security authentication; The operation information input by the user is received, and the operation information is sent to the electronic device to control the electronic device according to the operation information.

10. A computer non-volatile readable storage medium, comprising: The computer non-volatile readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for a mobile terminal to control an electronic device as claimed in claim 8 or claim 9 is implemented.