Device authentication method and electronic device

By obtaining the Bluetooth address of the second electronic device and quickly triggering device discovery using NFC or QR code scanning, combined with Bluetooth connection and encrypted information exchange, the problem of low device authentication efficiency is solved, and a fast and secure device authentication process is achieved.

CN119233253BActive Publication Date: 2025-11-28HONOR DEVICE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310781420.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-28
Publication Date
2025-11-28
Estimated Expiration
2043-06-28

AI Technical Summary

Technical Problem

In existing technologies, electronic devices are inefficient in authenticating devices, resulting in long processing times for discovering and authenticating peer devices, which cannot guarantee an efficient networking process.

Method used

By obtaining the Bluetooth address of the second electronic device, device discovery can be quickly triggered using methods such as Near Field Communication (NFC) or scanning QR codes. Device authentication is then performed based on the Bluetooth connection, combined with user account verification and encrypted information exchange to ensure security and efficiency.

Benefits of technology

It enables rapid discovery and authentication of peer devices, improves device authentication efficiency, simplifies user operations, and enhances device security and data transmission reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119233253B_ABST
    Figure CN119233253B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a device authentication method and an electronic device. The method comprises: a first electronic device, in response to a user operation, obtaining a Bluetooth address of a second electronic device, and identifying a device state of the second electronic device according to the Bluetooth address of the second electronic device and device information of an authenticated device. If the device state of the second electronic device is a second state, the first electronic device establishes a Bluetooth connection with the second electronic device according to the Bluetooth address of the second electronic device, and performs device authentication with the second electronic device based on the Bluetooth connection. In this way, the first electronic device can quickly trigger discovery of the second electronic device in response to a user operation, and perform device authentication with the second electronic device after discovering the second electronic device, thereby improving the efficiency of device authentication. Thus, the efficiency of multi-device collaboration between the first electronic device and the second electronic device can be improved by improving the efficiency of device authentication between the first electronic device and the second electronic device.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the technical field of terminal, and in particular, to a device authentication method and an electronic device. BACKGROUND

[0002] Multi-device collaboration is a distributed technology applied to multiple electronic devices. With the multi-device collaboration technology, two or more electronic devices can collaborate across systems and devices, realizing resource sharing and collaborative operation.

[0003] Before the electronic device and the peer device perform multi-device collaboration, the electronic device needs to perform device authentication with the peer device to form a network with the peer device. In the process of device authentication between the electronic device and the peer device, the electronic device performs broadcasting according to a preset triggering mechanism to discover the peer device by itself. The preset triggering mechanism can include that the electronic device periodically triggers broadcasting according to different periods in different screen states, the electronic device triggers broadcasting when a specified device state changes, or the electronic device triggers broadcasting when a network group in which the electronic device is located changes. After discovering the peer device, the electronic device performs device authentication with the peer device.

[0004] Taking the preset triggering mechanism that the electronic device continuously broadcasts for 5 seconds every 30 seconds in the bright screen state as an example, the electronic device can need to wait for 25 seconds to discover the peer device and perform device authentication with the peer device. It can be seen that the way that the electronic device discovers the peer device and performs device authentication with the peer device can consume a long time to discover the peer device, and thus cannot guarantee the device authentication efficiency with the peer device. SUMMARY

[0005] Embodiments of the present application provide a device authentication method and an electronic device to solve the problem of low device authentication efficiency.

[0006] In a first aspect, an embodiment of the present application provides a device authentication method, including: a first electronic device obtaining a Bluetooth address of a second electronic device in response to a user operation. The first electronic device stores device information of an authenticated device, and the device information includes a Bluetooth address and a device state. The device state includes a first state and a second state. The first state includes that the first electronic device has established a Bluetooth connection with the authenticated device or can receive a broadcast response message of the authenticated device, and the second state includes that the first electronic device has not established a Bluetooth connection with the authenticated device. The first electronic device identifies a device state of the second electronic device according to the Bluetooth address of the second electronic device and the device information of the authenticated device. If the device state of the second electronic device is the second state, the first electronic device establishes a Bluetooth connection with the second electronic device according to the Bluetooth address of the second electronic device. The first electronic device performs device authentication with the second electronic device based on the Bluetooth connection.

[0007] The method provided by the embodiments of the present application can quickly trigger discovery of the second electronic device in response to a user operation when the first electronic device and the second electronic device support device cooperation, so that device authentication can be performed after the second electronic device is discovered, thereby improving the device authentication efficiency. In this way, when the user wants to perform multi-device cooperation between the first electronic device and the second electronic device, the device authentication efficiency between the first electronic device and the second electronic device can be improved, and the efficiency of multi-device cooperation between the first electronic device and the second electronic device can be improved.

[0008] In an implementation manner, the first electronic device obtains the Bluetooth address of the second electronic device in response to a user operation, including: the first electronic device establishes NFC communication with the second electronic device in response to the user bringing the first electronic device close to or touching the NFC area of the second electronic device. The first electronic device obtains the Bluetooth address of the second electronic device from the second electronic device based on the NFC communication. In this way, the user can quickly and simply trigger the first electronic device to discover the second electronic device by bringing the first electronic device close to or touching the second electronic device.

[0009] In an implementation manner, the first electronic device obtains the Bluetooth address of the second electronic device in response to a user operation, including: the first electronic device obtains the Bluetooth address associated with the two-dimensional code in response to the user scanning the two-dimensional code provided by the second electronic device by using the first electronic device. In this way, the user can quickly and simply trigger the first electronic device to discover the second electronic device by scanning the code by using the first electronic device.

[0010] In an implementation manner, the first electronic device obtains the Bluetooth address of the second electronic device in response to a user operation, including: the first electronic device broadcasts a device discovery request. The first electronic device receives a response message broadcast in response to the device discovery request by the second electronic device when the Bluetooth signal strength of the device discovery request is greater than or equal to a strength threshold value in response to the user bringing the first electronic device close to the second electronic device, and the response message includes the Bluetooth address of the second electronic device. In this way, the user can quickly and simply trigger the first electronic device to discover the second electronic device by bringing the first electronic device close to the second electronic device.

[0011] In an implementation manner, the first electronic device obtains the Bluetooth address of the second electronic device in response to a user operation, including: the first electronic device receives a device discovery request broadcast by the second electronic device in response to the user performing a first operation on the first button on the first page, and the device discovery request includes the Bluetooth address of the second electronic device. In this way, the user can quickly and simply trigger the first electronic device to discover the second electronic device by performing the first operation on the first button on the first page.

[0012] In an implementation manner, the device discovery request of the second electronic device further comprises a user account logged in by the second electronic device, and the first electronic device identifies the device state of the second electronic device according to the Bluetooth address of the second electronic device and the device information of the authenticated device, comprising: the first electronic device determines whether the user account logged in by the first electronic device is the same as the user account logged in by the second electronic device. If they are the same, the first electronic device identifies the device state of the second electronic device according to the Bluetooth address of the second electronic device and the device information of the authenticated device. In this way, the first electronic device can preliminarily judge whether it can be networked with the second electronic device through the user account logged in by the second electronic device, so as to ensure the device security and avoid invalid networking operation of the first electronic device.

[0013] In an implementation manner, the first electronic device identifies the device state of the second electronic device according to the Bluetooth address of the second electronic device and the device information of the authenticated device, comprising: the first electronic device determines whether the second electronic device is the authenticated device according to the Bluetooth address of the second electronic device. If the second electronic device is the authenticated device, the first electronic device determines the device state of the second electronic device according to the stored device information of the authenticated device. If the second electronic device is not the authenticated device, the first electronic device determines that the second electronic device is in the second state. In this way, the first electronic device can identify the device state of the second electronic device before device authentication with the second electronic device, and then perform device authentication with the second electronic device based on different device states.

[0014] In an implementation manner, the first electronic device identifies the device state of the second electronic device according to the Bluetooth address of the second electronic device and the device information of the authenticated device, further comprising: the first electronic device displays a first window in response to a user operation, and the first window comprises a first button. The first electronic device identifies the device state of the second electronic device according to the Bluetooth address of the second electronic device and the device information of the authenticated device after detecting the display of the first window. Wherein, in the case that the first electronic device has established a Bluetooth connection with the second electronic device, the first electronic device is configured to establish a data transmission path with the second electronic device in response to a second operation performed by the user on the second button. In the case that the first electronic device has not established a Bluetooth connection with the second electronic device, the first electronic device is configured to establish a Bluetooth connection with the second electronic device in response to the second operation performed by the user on the second button, and establish a data transmission path with the second electronic device after establishing the Bluetooth connection with the second electronic device. In this way, the first electronic device can force the second electronic device to be online without the user's awareness. If the user performs the first operation based on the first button, the first electronic device can directly establish a data transmission path with the second electronic device authenticated by the device, so as to perform device collaboration with the second electronic device, effectively reducing the waiting time of the user.

[0015] In an implementation, the device authentication between the first electronic device and the second electronic device based on the Bluetooth connection includes: the first electronic device interacting with the second electronic device a security module message based on the Bluetooth connection, the security module message being used for the device authentication. If the second electronic device passes the device authentication, the first electronic device transmits first encrypted information to the second electronic device based on the Bluetooth connection, and receives second encrypted information transmitted by the second electronic device. The first encrypted information is encrypted by the first electronic device using a first key, and includes device information and link information of the first electronic device. The second encrypted information is encrypted by the second electronic device using a second key, and includes device information and link information of the second electronic device. In this way, after the second electronic device passes the device authentication, the first electronic device and the second electronic device can obtain more complete information of each other in an encrypted manner, and the data transmission security can be ensured.

[0016] In an implementation, the first electronic device interacting with the second electronic device a security module message based on the Bluetooth connection includes: the first electronic device obtaining a user account logged in by the second electronic device based on the Bluetooth connection. The first electronic device determines whether a user account logged in by the first electronic device is same as the user account logged in by the second electronic device. If the user accounts are same, the first electronic device interacts with the second electronic device a security module message based on the Bluetooth connection. In this way, the first electronic device can preliminarily determine whether the first electronic device can be networked with the second electronic device through the user account logged in by the second electronic device, so as to ensure the device security and avoid invalid device authentication operation of the first electronic device.

[0017] In an implementation, if the second electronic device passes the device authentication, after the first electronic device transmits the first encrypted information to the second electronic device based on the Bluetooth connection, and receives the second encrypted information transmitted by the second electronic device, the first electronic device further stores full device information of the second electronic device. The full device information of the second electronic device includes device information, link information and Bluetooth address of the second electronic device. In this way, the first electronic device can directly obtain the corresponding full device information according to the simple Bluetooth address after obtaining the Bluetooth address of the second electronic device in the subsequent cooperation process with the second electronic device, so as to quickly cooperate with the second electronic device based on the obtained full device information, and implement different upper-layer businesses.

[0018] In an implementation, the first electronic device receives the device discovery request broadcast by the second electronic device in response to a first operation performed by the user on the first button on the first page, and further includes displaying a first window, the first window being a first area on the second page for displaying device search results, the device search results including the second electronic device, wherein each device search result corresponds to a second button. In this way, the first electronic device can show the user all discovered devices through the first window and provide an entry for each device to establish a data transmission channel.

[0019] In an implementation, the device discovery request further includes a user account logged in by the second electronic device, and the first electronic device displays the first window by determining whether the user account information logged in by the first electronic device is the same as the user account information logged in by the second electronic device. If so, the first electronic device displays a first identifier on the second electronic device when displaying the first window. In this way, the user can quickly and accurately locate the discovered device logged in by the same user account as the first electronic device based on the first identifier, and then perform corresponding operations based on the same account device.

[0020] In an implementation, after the first electronic device performs device authentication with the second electronic device based on a Bluetooth connection, the first electronic device further includes adding device information of the second electronic device to device management information if the second electronic device passes the device authentication, the device management information including device information of authenticated devices. The first electronic device displays a third page according to the device management information in response to a third operation of the user, the third page including interactive controls of the first electronic device and the authenticated device in the first state. In this way, the user can interact with the authenticated device based on the interactive controls on the third page, which can effectively simplify user operations and improve the interactivity between the user and the first electronic device.

[0021] In an implementation, the device management information further includes a user account logged in by the authenticated device, and the first electronic device displays the third page according to the device management information in response to the third operation of the user, including: the first electronic device acquires the user account logged in by the authenticated device in the first state in response to the third operation of the user. The first electronic device displays the third page according to the user account information logged in by the first electronic device and the user account information logged in by the authenticated device in the first state, wherein the third page further includes a second identifier on the interactive control of the authenticated device logged in by the same user account as the first electronic device. In this way, the user can quickly and accurately locate the authenticated device logged in by the same user account as the first electronic device based on the second identifier, and then perform corresponding operations based on the same account device.

[0022] In a second aspect, the embodiments of the present application further provide a device authentication apparatus, comprising: a first response module configured to obtain a Bluetooth address of a second electronic device in response to a user operation; a storage module configured to store device information of an authenticated device, the device information comprising a Bluetooth address and a device state, the device state comprising a first state and a second state, wherein the first state comprises that the first electronic device has established a Bluetooth connection with the authenticated device or can receive a broadcast response message from the authenticated device, and the second state comprises that the first electronic device has not established a Bluetooth connection with the authenticated device; an identification module configured to identify a device state of the second electronic device according to the Bluetooth address of the second electronic device and the device information of the authenticated device; a connection module configured to establish a Bluetooth connection with the second electronic device according to the Bluetooth address of the second electronic device if the device state of the second electronic device is the second state; and an authentication module configured to perform device authentication with the second electronic device based on the Bluetooth connection.

[0023] The apparatus provided by the embodiments of the present application can quickly trigger the first electronic device to establish a Bluetooth connection with the second electronic device and perform device authentication with the second electronic device in response to a user operation when the first electronic device and the second electronic device support the networking function. In this way, when the user wants to network the first electronic device with the second electronic device, the first electronic device can quickly perform device authentication on the second electronic device, thereby improving the device authentication efficiency.

[0024] In a third aspect, the embodiments of the present application further provide a computer-readable storage medium, which stores instructions, and when the instructions are run on a computer, the computer executes the method of the above aspects and each implementation manner thereof.

[0025] In a fourth aspect, the embodiments of the present application further provide a computer program product containing instructions, and when the instructions are run on a computer, the computer executes the method of the above aspects and each implementation manner thereof.

[0026] In a fifth aspect, the embodiments of the present application further provide a chip system, which comprises a processor configured to support the terminal device to implement the functions involved in the above aspects, for example, to generate or process the information involved in the above method. BRIEF DESCRIPTION OF DRAWINGS

[0027] Figure 1 FIG. 1 is a software architecture block diagram of an electronic device implementing multi-device collaboration provided by the embodiments of the present application;

[0028] Figure 2 FIG. 1 is a software architecture block diagram of an electronic device implementing multi-device collaboration provided by the embodiments of the present application;

[0029] Figure 3 FIG. 1 is a software architecture block diagram of an electronic device implementing multi-device collaboration provided by the embodiments of the present application;

[0030] Figure 4 is a flowchart of a device authentication method provided by an embodiment of the present application;

[0031] Figure 5A and Figure 5B is a first set of interaction example diagrams of a first electronic device discovering a second electronic device, as shown by an embodiment of the present application;

[0032] Figure 6A , Figure 6B , Figure 6C and Figure 6D is a second set of interaction example diagrams of a first electronic device discovering a second electronic device, as shown by an embodiment of the present application;

[0033] Figure 7A , Figure 7B and Figure 7C is a third set of interaction example diagrams of a first electronic device discovering a second electronic device, as shown by an embodiment of the present application;

[0034] Figure 8A and Figure 8B is a fourth set of interaction example diagrams of a first electronic device discovering a second electronic device, as shown by an embodiment of the present application;

[0035] Figure 9 is a first interaction example diagram of a first electronic device performing device authentication with a second electronic device in response to a user operation in any of the first to third implementation manners, as shown by an embodiment of the present application;

[0036] Figure 10 is a second interaction example diagram of a first electronic device performing device authentication with a second electronic device in response to a user operation in any of the first to third implementation manners, as shown by an embodiment of the present application;

[0037] Figure 11 is a third interaction example diagram of a first electronic device performing device authentication with a second electronic device in response to a user operation in the fourth implementation manner, as shown by an embodiment of the present application;

[0038] Figure 12 is an example diagram of a second page when a first electronic device and a second electronic device log in to a same user account, as shown by an embodiment of the present application;

[0039] Figure 13A , Figure 13B , Figure 13C and Figure 13D is an interaction example diagram of a first electronic device displaying a third page after device authentication by a second electronic device, as shown by an embodiment of the present application;

[0040] Figure 14 is a structural schematic diagram of a device authentication apparatus provided by an embodiment of the present application;

[0041] Figure 15 is a structural schematic diagram of another device authentication apparatus provided by an embodiment of the present application. DETAILED DESCRIPTION

[0042] The technical solutions in the embodiments of the present application will be clearly described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments of the present application, other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.

[0043] The terms “first”, “second”, and “third” and the like in the specification of the present application are used to distinguish different objects, and are not used to limit a specific sequence. In the description of the present application, unless otherwise specified, “at least one” means one, two, and two or more.

[0044] In the embodiments of the present application, the words “exemplary” or “for example” are used to mean serving as an example, instance, or illustration. Any embodiment or design solution described as “exemplary” or “for example” in the embodiments of the present application should not be interpreted as being more preferred or advantageous than other embodiments or design solutions. Rather, the use of “exemplary” or “for example” is intended to present relevant concepts in a specific manner.

[0045] The terms used in the embodiment part of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application. The embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0046] Multi-device collaboration is a distributed technology applied to multiple electronic devices. With the multi-device collaboration technology, two or more electronic devices can be cross-system and cross-device collaboration, realizing information synchronization, resource sharing, and collaborative operation.

[0047] Multi-device collaboration can be applied between electronic devices of the same type or different types. The types of electronic devices include, but are not limited to, mobile phones, tablet computers, notebook computers, large-screen devices (for example, smart televisions, smart screens), personal computers (PCs), handheld computers, netbooks, personal digital assistants (PDAs), wearable electronic devices, vehicle-mounted devices, virtual reality devices, and the like.

[0048] Multi-device cooperation needs to be realized based on the networking relationship between devices. The networking relationship between devices refers to the topology relationship formed after the communication connection between devices is established after device authentication. The electronic device can establish a networking relationship with the opposite device through a networking module, which can be a smart interconnection module. After the electronic device discovers the opposite device, the process of device authentication of the opposite device can also be called the online process of the opposite device. In the process of device authentication between the electronic device and the opposite device, the electronic device discovers the opposite device by broadcasting, and performs device authentication with the opposite device after discovering the opposite device. In order to reduce the power consumption of the electronic device, the electronic device can broadcast according to a preset triggering mechanism. The preset triggering mechanism can include: the electronic device periodically broadcasts in different cycles in different screen states, for example, the electronic device broadcasts continuously for 5 seconds in every 30 seconds in the bright screen state, and the electronic device broadcasts continuously for 2 seconds or 5 seconds every 5 minutes in the sleep state (off screen and not plugged in), wherein the broadcasting of 2 seconds and the broadcasting of 5 seconds can be alternately performed, and the scanning of the opposite device is 2 seconds and 3 seconds. The preset triggering mechanism can also include: the electronic device triggers broadcasting when the specified device state changes, and the electronic device triggers broadcasting when the network group changes. The specified device state of the electronic device includes the bright screen unlocked state, the off screen state, the charging state, the unplugged state, the networking function enabled state, etc. On the basis of periodic broadcasting, the electronic device additionally triggers broadcasting for a certain time when the specified device state changes or the network group changes, such as additionally triggering broadcasting for 5 seconds. The electronic device performs device authentication with the opposite device after discovering the opposite device.

[0049] Figure 1 The software architecture block diagram of the electronic device provided by the embodiment of the application to realize multi-device cooperation.

[0050] As Figure 1As shown, the software architecture can include an application service framework, a multi-device collaborative decision engine, and a connection base capability subsystem. The electronic device runs a multi-device collaborative application based on the application service framework, such as PC and mobile phone collaboration, PC and tablet computer collaboration. After the electronic device starts the multi-device collaborative application, the relevant data is transmitted to the connection base capability subsystem, and the device management, service registration, synchronization device, service online and offline functions are realized through the multi-device collaborative decision engine. The connection base capability subsystem includes: device management service, peripheral control service, device discovery and connection service, and data transmission service. Among them, the device management service can obtain an account through an account service, such as obtaining a user account logged in by the local device and a user account logged in by the opposite device. The device discovery and connection service can realize periodic wake-up through the system timing service to broadcast to discover nearby devices after wake-up. The period of the system timing service wake-up can meet the preset trigger condition, such as the broadcast period of the electronic device in different screen states, the change of the specified device state of the electronic device, and the change of the network group where the electronic device is located. After discovering the nearby devices, the device discovery and connection service can perform device authentication with the opposite device through the security service, such as obtaining the device certificate of the opposite device, performing the same account authentication with the opposite device, distributing the key to the opposite device, and performing data encryption and decryption during data transmission with the opposite device. The data transmission service can perform near-field physical connection with the opposite device through the communication service, and perform data transmission and reception through the physical channel. Among them, the communication service can be realized through low-power hardware.

[0051] The way that the electronic device discovers the opposite device and performs device authentication with the opposite device can consume a long time to discover the opposite device. Taking the preset trigger condition that the broadcast period of the electronic device in the bright screen state is 5 seconds within every 30 seconds as an example. The average device discovery and online time of the electronic device and the opposite device is 3.9 seconds. In a relatively extreme case, the electronic device can need to wait for 25 seconds to discover the opposite device and perform device authentication with the opposite device. Therefore, the device authentication efficiency of the electronic device and the opposite device is low.

[0052] To solve the above technical problems, the device authentication method provided by the embodiment of the application.

[0053] Figure 2 The hardware structure diagram of the electronic device provided by the embodiment of the application. If the device for multi-device collaboration includes a first electronic device and a second electronic device, the electronic device can act as the first electronic device and the second electronic device. For example, Figure 2As shown, the electronic device 100 can include a processor 110, a memory 120, a universal serial bus (USB) interface 130, a radio frequency circuit 140, a mobile communication module 150, a wireless communication module 160, a camera 170, a display screen 180, a touch sensor 190, an air pressure sensor 210, and a button 220, etc.

[0054] The processor 110 can include one or more processing units, for example: the processor 110 can include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units can be independent devices, or can be integrated in one or more processors, such as integrated in a system on a chip (SoC). The processor 110 can also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory can save instructions or data that the processor 110 has just used or repeatedly uses.

[0055] In some embodiments, the processor 110 can include one or more interfaces. The interface can include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0056] The memory 120 can be used to store computer executable program codes, including instructions. The memory 120 can include a program storage area and a data storage area. The program storage area can store an operating system, application programs required by at least one function (such as a sound playing function, an image playing function, etc.), and the like. The data storage area can store data created during use of the electronic device 100 (such as audio data, a phone book, etc.), and the like. In addition, the memory 120 can include one or more memory units, for example, can include a volatile memory such as a dynamic random access memory (DRAM), a static random access memory (SRAM), and the like; and can also include a non-volatile memory such as a read-only memory (ROM), a flash memory, and the like. The processor 110 executes various function applications and data processing of the electronic device 100 by running instructions stored in the memory 120 and / or instructions stored in a memory disposed in the processor.

[0057] It should be noted here that the operating system referred to in the embodiments of the present application includes, but is not limited to, an Android operating system, an IOS operating system, an iPad OS, a Windows operating system, a Linux operating system, a MAC OS operating system, an embedded system, and the like.

[0058] The wireless communication function of the electronic device 100 can be implemented through the radio frequency circuit 140, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.

[0059] The radio frequency circuit 140 can include at least one antenna 141 for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 100 can be used to cover a single or multiple communication frequency bands. In some embodiments, the antenna can be used in combination with a tuning switch.

[0060] The mobile communication module 150 can provide a solution for an application on the electronic device 100 including wireless communication of 2G / 3G / 4G / 5G, etc. The mobile communication module 150 can include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive an electromagnetic wave by the antenna 141, and perform filtering, amplification, etc. on the received electromagnetic wave, and transfer the processed signal to the modem processor for demodulation. The mobile communication module 150 can also amplify a signal modulated by the modem processor, and radiate the amplified signal as an electromagnetic wave through the antenna 141. In some embodiments, at least part of the function modules of the mobile communication module 150 can be disposed in the processor 110. In some embodiments, at least part of the function modules of the mobile communication module 150 can be disposed in the same device as at least part of the modules of the processor 110.

[0061] The modem processor can include a modulator and a demodulator. The modulator is configured to modulate a low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is configured to demodulate a received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. The low-frequency baseband signal processed by the baseband processor is transmitted to the application processor. The application processor outputs a sound signal through an audio device (including but not limited to a speaker, a receiver, etc.), or displays an image or a video through the display screen 180. In some embodiments, the modem processor can be a separate device. In other embodiments, the modem processor can be independent of the processor 110, and disposed in the same device as the mobile communication module 150 or other function modules.

[0062] The wireless communication module 160 can include a wireless fidelity (Wi-Fi) module, a Bluetooth (BT) module, a GNSS module, a near field communication (NFC) module, an infrared (IR) module, etc. The wireless communication module 160 can be one or more devices that integrate at least one of the above modules. The wireless communication module 160 receives an electromagnetic wave via the antenna 141, performs frequency modulation and filtering processing on the electromagnetic wave signal, and transmits the processed signal to the processor 110. The wireless communication module 160 can also receive a signal to be transmitted from the processor 110, perform frequency modulation and amplification, and radiate the processed signal as an electromagnetic wave through the antenna 141.

[0063] In the embodiments of the present application, the wireless communication function of the electronic device 100 can include, for example, global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), 5th generation mobile networks new radio (5G NR), BT, GNSS, WLAN, NFC, FM, and / or IR, etc. The GNSS can include global positioning system (GPS), global navigation satellite system (GLONASS), beidou navigation satellite system (BDS), quasi-zenith satellite system (QZSS), and / or satellite based augmentation systems (SBAS).

[0064] The camera 170 is configured to capture still images or videos. The camera 170 includes a lens and a photosensitive element. An object projects an optical image onto the photosensitive element through the lens. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, which is then transmitted to an ISP to be converted into a digital image signal. The ISP outputs the digital image signal to a DSP for processing. The DSP converts the digital image signal into an image signal in a standard format, such as RGB, YUV, RYYB, etc. In some embodiments, the electronic device 100 can include one or N cameras 170, where N is a positive integer greater than 1.

[0065] The NPU is a neural-network (NN) computing processor that rapidly processes input information by drawing on the structure of a biological neural network, such as the transmission mode between human brain neurons, and can also continuously self-learn. Through the NPU, the electronic device 100 can implement intelligent cognitive applications such as image recognition, face recognition, speech recognition, text understanding, and the like.

[0066] The display screen 180 is configured to display images, videos, and the like. The display screen 180 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flex light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-OLED, a quantum dot light emitting diode (QLED), or the like. In some embodiments, the electronic device 100 can include one or N display screens 180, where N is a positive integer greater than 1.

[0067] The touch sensor 190, also referred to as a “touch device”. The touch sensor 190 can be disposed on the display screen 180, and the touch sensor 190 and the display screen 180 together form a touch screen, also referred to as a “touch panel”. The touch sensor 190 is configured to detect a touch operation acting on or near the touch sensor 190. The touch sensor 190 can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 180. In other embodiments, the touch sensor 190 can also be disposed on the surface of the electronic device 100, which is different from the position of the display screen 180.

[0068] The barometer 210 is configured to measure air pressure. In some embodiments, the electronic device 100 calculates altitude, assists positioning and navigation by using the air pressure value measured by the barometer 210.

[0069] The keys 220 include a power key, a volume key, and the like. The keys 220 can be mechanical keys. Alternatively, the keys 220 can be touch keys. The electronic device 100 can receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 100.

[0070] It can be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device can include more or fewer components than illustrated, or combine certain components, or split certain components, or different arrangement of components. The illustrated components can be implemented in hardware, software or a combination of software and hardware.

[0071] The method steps of the multi-device cooperation method provided by the embodiments of the present application are exemplarily described below.

[0072] The software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. The embodiments of the present application take the Android system with a layered architecture as an example to exemplarily describe the software structure of the electronic device 100.

[0073] Figure 3 is a software structure block diagram of the electronic device 100 of the embodiments of the present application.

[0074] The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom, the application layer, the application framework layer, the Android runtime and the system library, and the kernel layer.

[0075] The application layer can include a series of application packages.

[0076] As shown in Figure 3 , the application package can include camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, etc.

[0077] The application framework layer provides the application programming interface (API) and programming framework for the applications of the application layer. The application framework layer includes some pre-defined functions.

[0078] As shown in Figure 3 , the application framework layer can include window manager, content provider, view system, phone manager, resource manager, notification manager, etc.

[0079] The window manager is used to manage the window program. The window manager can obtain the size of the display screen, determine whether there is a status bar, lock the screen, and intercept the screen, etc.

[0080] The content provider stores and retrieves data and makes the data accessible to the application programs. The data can include videos, images, audios, dialed and received phone numbers, browsing history and bookmarks, phone book, etc.

[0081] The view system includes visual controls, such as a control that displays text, a control that displays an image, etc. The view system can be used to build an application program. A display interface can be composed of one or more views. For example, a display interface that includes a short message notification icon can include a view that displays text and a view that displays an image.

[0082] The telephony manager is used to provide the communication function of the electronic device 100. For example, the management of the call state (including call connection, call hang-up, etc.).

[0083] The resource manager provides various resources for the application program, such as localized strings, icons, images, layout files, video files, etc.

[0084] The notification manager enables the application program to display notification information in the status bar, which can be used to convey a message of the notification type, which can automatically disappear after a short stay without user interaction. For example, the notification manager is used to notify the completion of the download, the message reminder, etc. The notification manager can also be a notification that appears in the top status bar of the system in the form of a chart or a scrolling text, such as a notification of an application program running in the background, and can also be a notification that appears on the screen in the form of a dialog window. For example, the text information is prompted in the status bar, a prompt sound is emitted, the electronic device is vibrated, the indicator light flashes, etc.

[0085] The Android runtime includes the core library and the virtual machine. The Android runtime is responsible for the scheduling and management of the Android system.

[0086] The core library includes two parts: one part is the function function that the java language needs to call, and the other part is the core library of Android.

[0087] The application program layer and the application program framework layer run in the virtual machine. The virtual machine executes the java file of the application program layer and the application program framework layer into a binary file. The virtual machine is used to perform the management of the object life cycle, the management of the stack, the management of the thread, the management of the security and the exception, and the garbage collection, etc.

[0088] The system library can include a plurality of functional modules. For example: the surface manager, the media library, the three-dimensional graphics processing library (for example: OpenGL ES), the two-dimensional graphics engine (for example: SGL), etc.

[0089] The surface manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.

[0090] The media library supports playback and recording of a variety of commonly used audio, video formats, and static image files. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0091] The three-dimensional graphics processing library is used to implement three-dimensional graphics drawing, image rendering, synthesis, and layer processing.

[0092] The two-dimensional graphics engine is a drawing engine for two-dimensional drawing.

[0093] The kernel layer is a layer between hardware and software. The kernel layer at least includes a display driver, a camera driver, an audio driver, and a sensor driver.

[0094] The device authentication method provided by the embodiments of the present application can be implemented in the first electronic device.

[0095] Figure 4 is a flowchart of a device authentication method provided by the embodiments of the present application.

[0096] As shown in Figure 4 When the first electronic device and the second electronic device start the multi-device collaboration function, the method can include the following steps S401-S404:

[0097] In step S401, the first electronic device acquires the Bluetooth address of the second electronic device in response to a user operation.

[0098] The user operation is used to quickly trigger the first electronic device to discover the second electronic device. The user operation can include: the user brings the first electronic device close to or touches the near field communication (NFC) area of the second electronic device, the user scans the two-dimensional code provided by the second electronic device using the first electronic device, the user brings the first electronic device close to the second electronic device, and the user performs a first operation on a first button on a first page. The first page can be a multi-device collaboration page, and the first button can be an entry for searching for nearby devices, such as a collaboration option of a specified type of device in the multi-device collaboration page. The first operation can be a single-click operation, a double-click operation, a long-press operation, etc.

[0099] If the first electronic device discovers the second electronic device, the Bluetooth address of the second electronic device can be acquired. The Bluetooth address of the second electronic device can include a Basic Rate (BR) Media Access Control Address (MAC) and a Bluetooth Low Energy (BLE) MAC.

[0100] The user operation quickly triggers the first electronic device to discover the second electronic device, and further quickly triggers the first electronic device to perform a network-on-line process on the second electronic device.

[0101] After acquiring the Bluetooth address of the second electronic device, the first electronic device can further display a first window. The first window can be used to prompt the user that the second electronic device has been discovered. The first window includes a second button, and the user can perform a second operation based on the second button to make the first electronic device establish a data transmission channel with the second electronic device. The second operation can be a single-click operation, a double-click operation, a long-press operation, etc. The first window can further include a cancel button, and the user can perform an operation based on the cancel button to prohibit the first electronic device from establishing a data transmission channel with the second electronic device, and make the first electronic device close the first window.

[0102] In an implementation manner, the first window can be a toast. In this way, the first electronic device can display a toast with a smaller size to quickly prompt the user that the second electronic device has been discovered, and minimize the obstruction to the interface displayed by the first electronic device. The toast includes a second button, such as a connection button. When the user performs a second operation based on the second button, the electronic device will respond to the second operation to establish a data transmission channel with the second electronic device.

[0103] In an implementation manner, the first window is a first area in a second page used to display device search results. The second page can be a collaboration page of a specified type of device, and an entry of the second page can be set on the first page, such as a first button on the first page. If the first electronic device discovers the second electronic device, the device search results include a device search result of the second electronic device. In this way, the first electronic device can display the first window to show the user all the discovered electronic devices. The first window includes a second button, and each device search result corresponds to a first button, such as a connection button. When the user performs a second operation based on the first button corresponding to the device search result of the second electronic device, the electronic device will respond to the second operation to establish a data transmission channel with the second electronic device.

[0104] The first electronic device will be displayed in different forms based on different user operations of the user. The different interactions of the first electronic device in response to the user operations are described in combination with the following implementation manners.

[0105] In a first implementation manner, the user operation is that the user brings the first electronic device close to or touches an NFC area of the second electronic device.

[0106] The first electronic device and the second electronic device both have NFC functions, for example, the first electronic device and the second electronic device are both configured with NFC chips. The NFC area of the second electronic device can be identified by an NFC mark, so as to facilitate the user to accurately locate the NFC area of the second electronic device. The first electronic device discovers the second electronic device and establishes NFC communication with the second electronic device in response to the operation of the user bringing the first electronic device close to or touching the NFC area of the second electronic device. Thus, the first electronic device can obtain the Bluetooth address of the second electronic device from the second electronic device based on the NFC communication. Based on the NFC communication between the first electronic device and the second electronic device, the Bluetooth address of the second electronic device obtained by the first electronic device is BR MAC, and the data amount of BR MAC is smaller, more suitable for transmission through NFC communication, and the transmission speed is faster.

[0107] In this way, the user can simply and quickly trigger the first electronic device to discover the second electronic device by bringing the first electronic device close to or touching the second electronic device.

[0108] Figure 5A And Figure 5B is a first group of interaction example diagrams in which a first electronic device discovers a second electronic device, as illustrated in an embodiment of the present application.

[0109] The first electronic device can be a mobile phone, and the second electronic device can be a PC. The mobile phone and the PC are both in a bright screen state, and the mobile phone and the PC both have Bluetooth functions turned on. As shown in Figure 5A , an NFC mark 501 can be pasted in the lower right corner of the PC. When the user wants to establish networking between the mobile phone and the PC, the user can bring the mobile phone close to or touch the NFC mark 501 to perform a user operation 11. As shown in Figure 5B , when the mobile phone touches the NFC mark 501, the mobile phone discovers the PC and establishes NFC communication with the PC. Taking the Bluetooth address of the PC as BR MAC_1 for example, the PC sends BR MAC_1 to the mobile phone through NFC communication. After obtaining the BR MAC_1 of the PC, the mobile phone can leave the NFC area of the PC. However, the mobile phone needs to remain within the range for Bluetooth communication with the PC. After obtaining the BR MAC_1 of the PC, the mobile phone displays a first window. Taking the first window as a pop-up window for example, as shown in Figure 5BAs shown, the mobile phone displays a pop-up window 502, which includes a second button 503 and a cancel button 504. If the user performs a second operation on the second button 503, the mobile phone will establish a data transmission channel with the PC in response to the second operation. If the user performs a second operation on the cancel button 504, the mobile phone will not establish a data transmission channel with the PC in response to the second operation.

[0110] In the second implementation, the user operation is that the user uses the first electronic device to scan the two-dimensional code provided by the second electronic device.

[0111] The first electronic device has a function of scanning a two-dimensional code. The scanning entry of the two-dimensional code can be set on a fourth page. In some embodiments, the fourth page can be a desktop, a smart vision page, a browser page, etc., and the scanning entry of the two-dimensional code can be an icon of a code scanning application on the desktop, an icon of code scanning in the smart vision page, an icon of code scanning on the browser page, etc. The user can display the fourth page on the first electronic device, and perform a click operation on the scanning entry on the fourth page to make the first electronic device display a scanning page.

[0112] The second electronic device has a function of providing a two-dimensional code. The display entry of the two-dimensional code can be set on a fifth page. In some embodiments, the fifth page can be a multi-device collaboration page, and the display entry of the two-dimensional code can be a collaboration option of a specified type of device in the multi-device collaboration page. The user can display the fifth page on the second electronic device, and perform a click operation on the display entry of the two-dimensional code on the fifth page to make the second electronic device display the two-dimensional code. Alternatively, the second electronic device can paste the two-dimensional code on the device shell. The two-dimensional code is associated with the Bluetooth address of the second electronic device.

[0113] When the first electronic device displays the scanning frame and the second electronic device displays the two-dimensional code, the user uses the scanning frame of the first electronic device to scan the two-dimensional code provided by the second electronic device. The first electronic device discovers the second electronic device when the two-dimensional code is recognized in response to the user operation, and obtains the Bluetooth address associated with the two-dimensional code in the scanning frame.

[0114] In this way, the user can simply and quickly trigger the first electronic device to discover the second electronic device by scanning the code.

[0115] The first electronic device also displays a first window after obtaining the Bluetooth address of the second electronic device. The first window is similar to the first window in the first implementation, which will not be described here.

[0116] Figure 6A 、 Figure 6B 、 Figure 6C and Figure 6Dis a first group interaction example diagram for a first electronic device discovering a second electronic device.

[0117] The first electronic device can be a mobile phone, and the second electronic device can be a PC. Both the mobile phone and the PC are in a bright screen state, and both the mobile phone and the PC have Bluetooth function turned on. As shown in Figure 6A , the mobile phone displays a fourth page, such as a desktop, which includes a scanning entrance of a two-dimensional code, such as an icon 601 for scanning a code. A user can perform a click operation 13 on the icon 601. The PC displays a fifth page, such as a multi-device collaboration page, which includes a display entrance of a two-dimensional code, such as an option 602 for mobile phone collaboration. A user can perform a click operation 14 on the option 602. As shown in Figure 6B , the mobile phone displays a scanning page 603 in response to the click operation 13, and the PC displays a two-dimensional code 604 in response to the click operation 14. When a user wants to establish networking for the mobile phone and the PC, the two-dimensional code 604 on the PC can be scanned by the scanning page 603 on the mobile phone. As shown in Figure 6C , when the two-dimensional code 604 is within the scanning range of the scanning page 603, the mobile phone recognizes the two-dimensional code 604 and obtains the associated Bluetooth address, such as BR MAC_2, through the two-dimensional code 604. After obtaining the BR MAC_2 of the PC, the mobile phone can move away from the PC. However, the mobile phone needs to remain within the range for Bluetooth communication with the PC. After obtaining the BR MAC_2 of the PC, the mobile phone displays a first window. Taking a pop-up window as an example, as shown in Figure 6D , the mobile phone jumps to display a pop-up window 605. The pop-up window 605 includes a second button 606 and a cancel button 607. If a user performs a second operation on the second button 606, the mobile phone will establish a data transmission path with the PC in response to the second operation. If a user performs a second operation on the cancel button 607, the mobile phone will not establish a data transmission path with the PC in response to the second operation.

[0118] In a third implementation manner, the user operation is that the user brings the first electronic device close to the second electronic device.

[0119] The first electronic device has a function of broadcasting a device discovery request. After the first electronic device turns on the Bluetooth function, the first electronic device starts to broadcast the device discovery request outward.

[0120] The second electronic device has a function of scanning nearby devices. The entrance for scanning nearby devices can be set on the fifth page. In some embodiments, the sixth page can be a multi-device collaboration page, and the entrance for scanning nearby devices can be a collaboration option of a specified type of device in the multi-device collaboration page. A user can perform a click operation on the entrance for scanning nearby devices on the sixth page to make the second electronic device scan nearby devices when the second electronic device displays the sixth page.

[0121] After the second electronic device starts scanning nearby devices, the user brings the first electronic device close to the second electronic device. The second electronic device can receive the device discovery request broadcast by the first electronic device, and determine the distance between the first electronic device according to the Bluetooth signal strength of the device discovery request. Wherein, the stronger the Bluetooth signal strength, the closer the second electronic device can determine the distance between the first electronic device. The weaker the Bluetooth signal strength, the farther the second electronic device can determine the distance between the first electronic device. When the second electronic device determines that the Bluetooth signal strength of the received device discovery request is greater than or equal to the strength threshold value, it can be determined that the distance between the first electronic device is less than or equal to the distance threshold value, that is, the first electronic device is close enough to the second electronic device. When the second electronic device determines that the Bluetooth signal strength of the received device discovery request is greater than or equal to the strength threshold value, it broadcasts a response message in response to the device discovery request of the first electronic device, and carries the Bluetooth address of the second electronic device in the response message. When the first electronic device receives the response message, it is equivalent to discovering the second electronic device. Based on the way that the second electronic device transmits the Bluetooth address by broadcasting the response information, the Bluetooth address of the second electronic device obtained by the first electronic device is BR MAC, which has a smaller data amount and is more suitable for broadcasting.

[0122] In this way, the user can trigger the first electronic device to discover the second electronic device simply and quickly by bringing the first electronic device close to the second electronic device.

[0123] After obtaining the Bluetooth address of the second electronic device, the first electronic device also displays a first window. The first window is similar to the first window in the first implementation, which will not be described here.

[0124] Figure 7A 、 Figure 7B and Figure 7C are a third group of interaction example diagrams of a first electronic device discovering a second electronic device according to an embodiment of the present application.

[0125] The first electronic device can be a mobile phone, and the second electronic device can be a PC. Both the mobile phone and the PC are in a bright screen state, and both the mobile phone and the PC have Bluetooth function turned on. As shown in Figure 7A , the mobile phone broadcasts a device discovery request. The PC displays a sixth page, such as a multi-device collaboration page, which includes an entry for scanning nearby devices, such as a mobile phone collaboration option 701. The user can perform a click operation 15 on the option 701. As shown in Figure 7B , the PC scans nearby devices in response to the click operation 15. When the user wants to establish a network for the mobile phone and the PC, the operation 16 of bringing the mobile phone close to the PC is performed. The PC determines the distance to the mobile phone according to the Bluetooth signal strength of the received device discovery request. As shown in Figure 7CAs shown, when the PC determines that the Bluetooth signal strength of the device discovery request is greater than or equal to the strength threshold, the PC broadcasts a response message to the mobile phone. The response message carries the Bluetooth address of the PC, such as BR MAC_3. The mobile phone discovers the PC after receiving the response message, and the mobile phone displays a first window after obtaining the BR MAC_3 of the PC. Taking the first window as a pop-up window as an example, as shown in Figure 7C As shown, the mobile phone displays the pop-up window 702. The pop-up window 702 includes a second button 703 and a cancel button 704. If the user performs a second operation on the second button 703, the mobile phone will establish a data transmission path with the PC in response to the second operation. If the user performs a second operation on the cancel button 704, the mobile phone will not establish a data transmission path with the PC in response to the second operation.

[0126] In a fourth implementation manner, the user operation is a first operation performed by the user on a first button on the first page.

[0127] The second electronic device has a function of broadcasting a device discovery request. After the second electronic device starts to broadcast the device discovery request, the second electronic device broadcasts the device discovery request. The device discovery request can include the Bluetooth address of the second electronic device, such as a BLE MAC or a BR MAC, and can also include device information of the second electronic device, such as a logged-in user account.

[0128] When the user wants to group the first electronic device and the second electronic device, the user can perform a first operation on a first button on a first page displayed by the first electronic device to make the first electronic device search for nearby devices. After the second electronic device starts to broadcast a device discovery request, the first electronic device receives the device discovery request broadcast by the second electronic device in response to the first operation. After receiving the device discovery request of the second electronic device, the first electronic device discovers the second electronic device and can obtain the Bluetooth address of the second electronic device from the received device discovery request.

[0129] In this way, the user can trigger the first electronic device to discover the second electronic device in a simple and fast manner by triggering the first electronic device to receive the device discovery request of the nearby device.

[0130] Figure 8A And Figure 8B is a fourth group of interaction example diagrams for the first electronic device to discover the second electronic device.

[0131] The first electronic device can be a PC, and the second electronic device can be a tablet computer. The PC and the tablet computer are both in a bright screen state, and the PC and the tablet computer both have Bluetooth functions. As shown in Figure 8AAs shown, the tablet broadcasts a device discovery request. The PC displays a first page, such as a multi-device collaboration page, which includes a first button, such as the entry point for searching nearby devices on the multi-device collaboration page, such as option 801 for tablet collaboration. When the user wants to establish a network between the PC and the tablet, they can perform a user action on option 801, such as clicking action 17. Figure 8B As shown, the PC responds to click operation 17 by searching for nearby devices. When the PC receives a device discovery request broadcast by the tablet, it discovers the tablet. The PC obtains the tablet's Bluetooth address, such as BLE MAC_4, from the received device discovery request. After obtaining the tablet's BLE MAC_4, the PC displays a first window. This first window can be the first area on a second page, and it includes the device search results. Figure 8B As shown, the PC displays a first window 802 on the second page. The first window 802 includes device search results. Taking the PC's search results for devices including tablets and mobile phones as an example, the device search results within the first window 802 include both tablets and mobile phones. Therefore, when the PC discovers a tablet, it can display the tablet's device search results within the first window 802. The first window 802 includes second buttons 803, each second button 803 corresponding to one device search result.

[0132] The first electronic device stores device information of authenticated devices. Authenticated devices are those discovered and authenticated by the first electronic device. A network relationship has been established between the first electronic device and the authenticated devices. Based on this network relationship, the first electronic device can obtain the connection and transmission information of the authenticated devices based on data transmitted or cached data when discovering them, and can directly connect and transmit data with the authenticated devices based on this connection and transmission information. The first electronic device can store the device information of authenticated devices in the form of a device list.

[0133] The device information includes a Bluetooth address and a device state. The Bluetooth address can include a BR MAC and a BLE MAC. The device state includes a first state and a second state. The first state can also be referred to as an online state, and the second state can also be referred to as an offline state. The first state includes that the first electronic device has established a Bluetooth connection with the authenticated device or can receive a broadcast response message from the authenticated device. The networking relationship between the first electronic device and the authenticated device in the first state can be maintained and used, for example, the first electronic device establishes a long connection with the authenticated device, or sends a broadcast to the authenticated device through heartbeat broadcast, unicast confirmation, etc., and can receive a broadcast response message from the authenticated device. The second state includes that the first electronic device has not established a Bluetooth connection with the authenticated device. The networking relationship between the first electronic device and the authenticated device in the second state cannot be maintained and used. For example, the first electronic device disconnects the long connection with the authenticated device, or the first electronic device cannot receive the broadcast response message from the authenticated device through heartbeat broadcast, unicast confirmation, etc., or the authenticated device cannot be authenticated by the first electronic device again.

[0134] In step S402, the first electronic device identifies the device state of the second electronic device according to the Bluetooth address of the second electronic device and the device information of the authenticated device.

[0135] The first electronic device can determine whether the second electronic device is the authenticated device according to the Bluetooth address of the second electronic device. For example, the first electronic device determines whether the device information of the authenticated device exists the Bluetooth address of the second electronic device. If the device information exists the Bluetooth address of the second electronic device, the second electronic device is the authenticated device. If the device information does not exist the Bluetooth address of the second electronic device, the second electronic device is not the authenticated device.

[0136] If the second electronic device is the authenticated device, the first electronic device determines the device state of the second electronic device according to the stored device information of the authenticated device. For example, if the device state in the device information with the same Bluetooth address is the first state, the device state of the second electronic device is the first state. If the device state in the device information with the same Bluetooth address is the second state, the device state of the second electronic device is the second state.

[0137] If the second electronic device is not the authenticated device, the first electronic device determines that the second electronic device is in the second state.

[0138] In some embodiments, based on the first-third implementation manners of the user operation in step S401, after detecting the display of the first window, the first electronic device identifies the device state of the second electronic device according to the Bluetooth address of the second electronic device and the device information of the authenticated device. After displaying the first window, the first electronic device can automatically force the second electronic device to be online in the network group without the user performing the second operation based on the second button, that is, identifying the device state of the second electronic device and performing device authentication with the second electronic device. In this way, the first electronic device can force the second electronic device to be online in the network group without the user's awareness. If the user performs the second operation based on the second button, the first electronic device can directly establish a data transmission path with the second electronic device authenticated by the device to perform device cooperation with the second electronic device, effectively reducing the user's waiting time.

[0139] In some embodiments, after detecting the display of the first window, before performing step S402, the first electronic device can also determine the service type. The service is the service to be run by the first electronic device and the second electronic device after the second electronic device is authenticated by the device. The service type can include a first type and a second type. The first type is an open type, that is, the first electronic device and the second electronic device are allowed / supported to run the service based on smart interconnection. The second type is a non-open type, that is, the first electronic device and the second electronic device are not allowed / supported to run the service based on smart interconnection. When the service type is the first type, the first electronic device performs step S402. When the service type is the second type, the first electronic device does not perform step S402.

[0140] In some embodiments, based on the fourth implementation manner of the user operation in step S401, before identifying the device state of the second electronic device, the first electronic device obtains the user account logged in by the second electronic device. The device discovery request broadcasted by the second electronic device can include device information such as the user account logged in. After receiving the device discovery request of the second electronic device, the first electronic device can obtain the user account logged in by the second electronic device from the device discovery request. The first electronic device determines whether the user account logged in by the first electronic device and the user account logged in by the second electronic device are the same. If the first electronic device and the second electronic device log in the same user account, the first electronic device identifies the device state of the second electronic device. If the first electronic device and the second electronic device log in different user accounts, the first electronic device no longer performs the network group online process on the second electronic device. In this way, the second electronic device can be authenticated by the user account logged in by the first electronic device and the second electronic device, to further ensure the identity security of the user of the second electronic device. When the second electronic device and the first electronic device log in different user accounts, the subsequent device state identification and device authentication processes can be avoided, and resources can be saved.

[0141] If the device state of the second electronic device is the second state, the first electronic device establishes a Bluetooth connection with the second electronic device according to the Bluetooth address of the second electronic device.

[0142] If the device state of the second electronic device is the first state, the first electronic device can directly connect and transmit data with the second electronic device.

[0143] If the device state of the second electronic device is the second state, the first electronic device establishes a Bluetooth connection with the second electronic device according to the Bluetooth address of the second electronic device. For example, if the Bluetooth address of the second electronic device is BR MAC, the first electronic device establishes a BR connection with the second electronic device according to the BR MAC. If the Bluetooth address of the second electronic device is BLE MAC, the first electronic device establishes a BLE connection with the second electronic device according to the BLE MAC.

[0144] In step S404, the first electronic device performs device authentication with the second electronic device based on the Bluetooth connection.

[0145] After the first electronic device establishes a Bluetooth connection with the second electronic device, the first electronic device interacts with the second electronic device based on the Bluetooth connection to exchange security module information, so as to perform device authentication according to the exchanged security module information. In this way, when the first electronic device and the second electronic device support multi-device cooperation, the first electronic device can quickly trigger the establishment of a Bluetooth connection with the second electronic device and perform device authentication with the second electronic device in response to a user operation, which can effectively avoid a long waiting time for the first electronic device to discover the second electronic device, thereby improving the efficiency of device authentication.

[0146] In some embodiments, before the first electronic device interacts with the second electronic device to exchange security module messages, the first electronic device can obtain a user account logged in by the second electronic device through the Bluetooth connection. The first electronic device determines whether the user account logged in by the first electronic device is the same as the user account logged in by the second electronic device. If the first electronic device and the second electronic device log in the same user account, the first electronic device interacts with the second electronic device to exchange security module messages based on the Bluetooth connection, and performs device authentication with the second electronic device. If the first electronic device and the second electronic device log in different user accounts, the first electronic device terminates the device authentication process with the second electronic device. In this way, the second electronic device can be first authenticated by the user account logged in by the first electronic device and the second electronic device, so as to further ensure the identity security of the user of the second electronic device. When the second electronic device logs in a different user account from the first electronic device, the subsequent device authentication process can be avoided, and resources can be saved.

[0147] In some embodiments, in the process of device authentication between the first electronic device and the second electronic device through the interaction security module message, if the first electronic device and the second electronic device are authenticated, the first electronic device and the second electronic device obtain the key according to the security module information. For example, the first electronic device obtains the first key according to the security module information transmitted by the second electronic device, and the second electronic device obtains the second key according to the security module information transmitted by the first electronic device. The first electronic device and the second electronic device use the keys held by each other to interact with the encrypted information, and complete the process of device authentication. Wherein, the first electronic device uses the first key to encrypt to obtain the first encrypted information, and transmits the first encrypted information to the second electronic device. The second electronic device uses the second key to encrypt to obtain the second encrypted information, and transmits the second encrypted information to the first electronic device.

[0148] In some embodiments, the first encrypted information can include device information and link information of the first electronic device. The second encrypted information can include device information and link information of the second electronic device. Wherein, the device information of the first electronic device and the second electronic device can include: device ID, running state, device type, device model, supported collaborative function, whether to support smart interconnection, version of supported smart interconnection, etc. Wherein, the device ID can include Node ID, Universally Unique Identifier (UUID), Unique Device Identifier (UDID), etc. The device state can include screen on, screen off, hibernate, etc. The collaborative function can include screen extension, screen projection, super call, screen mirroring, multi-screen collaboration, super notification, keyboard and mouse sharing, super keyboard and mouse, etc. The device type can include mobile phone, folding screen mobile phone, PC, tablet computer, etc. The link information of the first electronic device and the second electronic device can include: link state, network state, etc. Therefore, the first electronic device and the second electronic device can obtain more comprehensive information of the other party in the process of device authentication.

[0149] In some embodiments, after obtaining the second encryption information, the first electronic device stores the full amount of device information of the second electronic device. The full amount of device information of the second electronic device includes device information, link information and Bluetooth address of the second electronic device. The first electronic device can use the same module, such as the networking module, to manage / store the full amount of device information of the second electronic device, for example, store the full amount of device information of the second electronic device to the device information of the authenticated device. In this way, in the subsequent collaborative process with the second electronic device, after obtaining the Bluetooth address of the second electronic device, the first electronic device can directly obtain the corresponding full amount of device information according to the simple Bluetooth address, so as to quickly collaborate with the second electronic device based on the obtained full amount of device information, and realize different upper-layer businesses.

[0150] The device authentication method steps S401-S404 of the embodiments of the present application are illustratively described in combination with the following examples.

[0151] Example 1

[0152] This example illustrates the first interaction process in which the first electronic device responds to the user's execution of any one of the first-third implementation manners to perform device authentication with the second electronic device.

[0153] Figure 9 is a first interaction example diagram in which the first electronic device responds to the user's execution of any one of the first-third implementation manners to perform device authentication with the second electronic device.

[0154] As Figure 9 indicated, taking the user's execution of the user operation in the first implementation manner as an example, the first electronic device can be a mobile phone and the second electronic device can be a PC. The modules of the mobile phone participating in the first interaction process include the pop-up application, the networking module, the device management module, the collaboration service module and the communication module. The modules of the PC participating in the first interaction process include the communication module, the collaboration service module, the device management module and the networking module. Among them, the networking module of the mobile phone and the networking module of the PC can be the smart interconnection module.

[0155] The communication module of the mobile phone provides NFC communication function, and the communication module of the PC provides NFC communication function. The user brings the mobile phone close to or touches the NFC area of the PC, the communication module of the mobile phone and the communication module of the PC generate induction, and the mobile phone discovers the PC. The PC instructs the smart interconnection module to create a session service through the collaboration service module. The mobile phone establishes an NFC connection with the PC through the communication module, and the PC transmits a Bluetooth address such as BR MAC to the mobile phone based on the NFC connection through the communication module. The mobile phone can also transmit a Bluetooth address such as BR MAC to the PC based on the NFC connection through the communication module. The communication module of the mobile phone transmits a device discovery message to the collaboration service module, and the device discovery message includes the BR MAC of the PC. The communication module of the PC transmits a device discovery message to the collaboration service module, and the device discovery message includes the BR MAC of the mobile phone. The mobile phone transmits a notification of initiating a pop-up window to the pop-up window application through the collaboration service module, and the notification includes the BR MAC of the PC. The pop-up window application of the mobile phone displays a first window such as a pop-up window in response to the notification.

[0156] After the mobile phone displays the pop-up window, the pop-up window application calls the forced online interface of the smart interconnection module to trigger the smart interconnection module to perform forced online on the PC. The smart interconnection module of the mobile phone judges the service type of the pop-up window application corresponding service, and when the service type is a first type, the mobile phone identifies the device state of the PC according to the BR MAC of the PC and the stored device information of the authenticated device through the smart interconnection module. If the device state of the PC is a first state, that is, the PC is in an online state, the smart interconnection module sends an online notification to the pop-up window application, and the online notification can include the device ID of the PC, such as the Node ID of the PC. If the device information of the authenticated device includes the device ID, the smart interconnection module can obtain the corresponding device ID from the device information of the authenticated device according to the BR MAC of the PC.

[0157] If the device state of the PC is a second state, that is, the PC is in an offline state, the smart interconnection module sends an offline notification to the pop-up window application, and the smart interconnection module sends a connection instruction to the communication module, and the connection instruction can include the BR MAC of the PC. The mobile phone establishes a BR connection with the PC according to the BR MAC of the PC through the communication module. After the mobile phone and the PC successfully establish a BR connection, the communication module of the mobile phone feeds back a BR connection success notification to the smart interconnection module, and the communication module of the PC feeds back a BR connection success notification to the smart interconnection module.

[0158] The mobile phone performs device authentication with the smart interconnection module of the PC through the smart interconnection module. The modules of the mobile phone participating in the first interaction process can also include a security service module, and the modules of the PC participating in the first interaction process can also include a security service module. The mobile phone performs device authentication with the smart interconnection module and the security service module of the PC through the smart interconnection module and the security service module. The mobile phone sends a notification of device authentication to the security service module through the smart interconnection module, and the security service module of the mobile phone interacts with the security service module of the PC based on the BR connection to exchange security module messages, and uses the security module messages to perform device authentication. Before the security service module of the mobile phone interacts with the security service module of the PC based on the BR connection to exchange security module messages, the security service module of the mobile phone can determine whether the local and the PC are logged in to the same user account, and when logged in to the same user account, interact with the PC to exchange security module messages.

[0159] If the PC fails to pass the authentication, the security service module of the mobile phone returns an authentication failure notification to the smart interconnection module, and the smart interconnection module feeds back the authentication failure notification to the pop-up application. The authentication failure notification can include the reason for the authentication failure. When the user performs the first operation on the first button in the first window, the pop-up application can determine, according to the authentication failure notification, that the data transmission channel cannot be established directly between the PC and the mobile phone based on the smart interconnection. If the mobile phone and the PC pass the device authentication, the security service module of the mobile phone returns a first key to the smart interconnection module, and the security service module of the PC returns a second key to the smart interconnection module. The smart interconnection module of the mobile phone and the smart interconnection module of the PC respectively use the first key and the second key to interact first encrypted information and second encrypted information. The first encrypted information and the second encrypted information can include device information and link information of the corresponding electronic device. After the smart interconnection module of the mobile phone and the smart interconnection module of the PC obtain the encrypted information of the other party, it is confirmed that the authentication is successful. The mobile phone feeds back an authentication success notification to the pop-up application through the smart interconnection module, and the authentication success notification can include the device ID of the PC. The device ID of the PC can be obtained by the mobile phone from the second encrypted information, such as the Node ID of the PC. When the user performs the first operation on the first button in the first window, the pop-up application can determine, according to the authentication success notification, that the data transmission channel can be established directly between the PC and the mobile phone based on the smart interconnection. After the PC passes the authentication, the smart interconnection module of the mobile phone sends a device BR online message to the device management module to add the PC to the authenticated devices. The device BR online message can include device information of the PC, such as device ID, device status, device type, etc. The mobile phone can update the display related page according to the device BR online message through the device management module. The mobile phone can manage / store the full device information of the PC through the smart interconnection module, and the full device information of the PC can include the BR MAC, device information and link information of the PC. After the mobile phone passes the authentication, the smart interconnection module of the PC sends a device BR online message to the device management module to add the mobile phone to the authenticated devices. The device BR online message can include device information of the mobile phone, such as device ID, device status, device type, etc. The PC can update the display related page according to the device BR online message through the device management module. The PC can manage / store the full device information of the mobile phone through the smart interconnection module, and the full device information of the mobile phone can include the BR MAC, device information and link information of the mobile phone.

[0160] Example 2

[0161] This example describes a second interaction process of device authentication between the first electronic device and the second electronic device after displaying the first window in response to the user performing any one of the first-third user operations.

[0162] Figure 10is a second interaction example diagram that a first electronic device performs device authentication with a second electronic device in response to a user performing any one of the first to third implementation manners, illustrated by an embodiment of the present application.

[0163] As shown in Figure 10 , taking the user performing the user operation in the first implementation manner as an example, the first electronic device can be a mobile phone, and the second electronic device can be a PC. The modules of the mobile phone participating in the second interaction process include a business module, a device management module, and a networking module. Among them, the business module corresponds to a pop-up window application. The modules of the PC participating in the second interaction process include a networking module. Among them, the networking module of the mobile phone and the networking module of the PC can be a smart interconnection module.

[0164] After the user brings the mobile phone close to or touches the NFC area of the PC, a first window, such as a pop-up window, is displayed. The process can refer to Example 1, which will not be described here. The mobile phone calls the forceOnlineByMac interface of the device management through the business module to notify the PC to be forced online. The device management module constructs a DeviceInfo object and calls the verifyDevice() interface of the smart interconnection module to perform device authentication on the PC through the smart interconnection module, and forces the PC to be online. The smart interconnection module of the mobile phone identifies the device state of the PC according to the BR MAC of the PC and the stored device information of the authenticated device. If the device state of the PC is the first state, that is, the PC is in the online state, the smart interconnection module calls the VerifyCallback.onDeviceVerifyPass interface of the authentication callback device authentication passes of the business module, and carries the device ID of the PC, such as the Node ID of the PC. If the device state of the PC is the second state, that is, the PC is in the offline state, the smart interconnection module calls the VerifyCallback.onDeviceVerifyFail interface of the authentication callback device authentication fails of the business module, and notifies the business module that it is being authenticated. If the device state of the PC is the second state, the mobile phone performs device authentication with the smart interconnection module of the PC through the smart interconnection module. The device authentication process can refer to Example 1, which will not be described here. After the authentication is completed, the smart interconnection module of the mobile phone calls the corresponding authentication callback (VerifyCallback) interface of the business module according to the authentication result, and the PC is online. Among them, if the PC passes the device authentication, the smart interconnection module of the mobile phone calls the Pass interface of VerifyCallback. If the PC does not pass the device authentication, the smart interconnection module of the mobile phone calls the Fail interface of VerifyCallback.

[0165] Example 3

[0166] The present example illustrates a third interaction process in which the first electronic device performs device authentication with the second electronic device in response to a fourth implementation manner of user operation performed by the user.

[0167] Figure 11 is a third interaction example diagram in which the first electronic device performs device authentication with the second electronic device in response to a fourth implementation manner of user operation performed by the user, as illustrated in an embodiment of the present application.

[0168] As shown in Figure 11 , taking the user performing the user operation in the fourth implementation manner as an example, the first electronic device can be a PC, and the second electronic device can be a tablet computer. The modules of the PC participating in the third interaction process include a communication module, a collaboration service module, a device management module, and a networking module. The modules of the tablet computer participating in the third interaction process include a networking module, a device management module, a collaboration service module, and a communication module. Among them, the networking module of the PC and the networking module of the tablet computer can be a smart interconnection module.

[0169] The communication module of the PC provides BLE / BR communication function, and the communication module of the tablet computer provides BLE / BR communication function. The tablet computer notifies the smart interconnection module to create a session service (addSessionService) through the collaboration service module, and notifies the smart interconnection module to start a device discovery service (publishDiscoveryService). The smart interconnection module of the tablet computer notifies the communication module to start the device discovery service, and the tablet computer broadcasts a device discovery request. The user performs a second operation based on the second button on the second page displayed by the PC, for example, clicks the option of tablet collaboration on the multi-device collaboration page. The process can refer to the related description of the fourth implementation manner of user operation, which will not be repeated here. The PC responds to the second operation and notifies the smart interconnection module to start searching for nearby devices (startDiscovery) through the collaboration service module. The smart interconnection module of the PC notifies the communication module to start searching for nearby devices. Taking the PC discovering the tablet computer based on the BLE discovery protocol as an example, the communication module of the PC sends a device discovery message (onDeviceFound) to the smart interconnection module, which can include the BLE / BR MAC of the tablet computer. The device discovery message can also include the user account logged in by the tablet computer. The communication module of the tablet computer sends a device discovery message to the smart interconnection module, which can include the BLE / BR MAC of the PC. The smart interconnection module of the PC transmits the BLE / BR MAC and the logged-in user account of the tablet computer to the collaboration service module.

[0170] The PC's collaboration service module determines whether the tablet and the host computer are logged in to the same user account according to the user account logged in by the tablet and the user account logged in by the host computer. If the tablet and the host computer are logged in to different user accounts, the PC ignores the task. If the tablet and the host computer are logged in to the same user account, the PC's collaboration service module calls the forced online interface of the device management module to force the tablet to be online. The PC's device management module calls the forced online interface of the smart interconnection module to trigger the smart interconnection module to force the tablet to be online. The PC identifies the device state of the PC according to the BLE / BR MAC of the tablet and the stored device information of the authenticated device through the smart interconnection module. If the device information of the authenticated device includes the device ID of the authenticated device and other device information, the PC can obtain the device information of the tablet when the tablet is discovered, and identify the device state of the PC according to the device information of the tablet and the device information of the authenticated device. If the device state of the tablet is the first state, i.e., the tablet is in the online state, the smart interconnection module sends an online notification to the device management module, which can include the device ID of the tablet, such as the UUID of the tablet. The device management module responds to the notification and requests the UDID of the tablet from the smart interconnection module. After obtaining the UDID of the tablet, the device management module sends an online success message to the collaboration service module, which includes the UDID of the tablet.

[0171] If the device state of the tablet is the second state, i.e., the tablet is in the offline state, the smart interconnection module sends an offline notification to the device management module, and the device management module sends an offline notification to the collaboration service module. The smart interconnection module also sends a connection instruction to the communication module, which can include the BLE / BR MAC of the tablet. The PC establishes a BLE / BR connection with the tablet through the communication module according to the BLE / BR MAC of the tablet.

[0172] After the PC and the tablet establish the BLE / BR connection successfully, the PC performs device authentication with the smart interconnection module of the tablet through the smart interconnection module. The modules of the PC participating in the third interaction process can also include a security service module, and the modules of the tablet participating in the third interaction process can also include a security service module. The PC performs device authentication with the smart interconnection module and the security service module of the tablet through the smart interconnection module and the security service module. The PC sends a notification of device authentication to the security service module through the smart interconnection module, and the security service module of the PC interacts with the security service module of the tablet based on the BLE / BR connection to exchange security module messages and perform device authentication using the security module messages. Before the security service module of the PC interacts with the security service module of the tablet based on the BLE / BR connection to exchange security module messages, the security service module of the PC can determine whether the local device and the tablet are logged in to the same user account, and when logged in to the same user account, exchange security module messages with the tablet.

[0173] If the tablet computer is not authenticated, the security service module of the PC returns an authentication failure notification to the smart interconnection module, and the smart interconnection module feeds back the authentication failure notification to the device management module. The authentication failure notification can include the reason for the authentication failure. The device management module feeds back the authentication failure notification to the collaborative service module. If the tablet computer is authenticated, the security service module of the PC returns a first key to the smart interconnection module, and the security service module of the tablet computer returns a second key to the smart interconnection module. The smart interconnection module of the PC and the smart interconnection module of the tablet computer respectively use the first key and the second key to interact with first encrypted information and second encrypted information. The first encrypted information and the second encrypted information can include device information and link information of the corresponding electronic device. After the smart interconnection module of the PC and the smart interconnection module of the tablet computer obtain the encrypted information of the other party, it is confirmed that the authentication is successful. The PC feeds back an authentication success notification to the device management module through the smart interconnection module. The authentication success notification can include the device ID of the tablet computer. The device ID of the tablet computer can be obtained by the PC from the second encrypted information or can be obtained when the PC discovers the tablet computer. The device management module feeds back the authentication success notification to the collaborative service module, and the tablet computer is added to the authenticated devices. The PC can manage / store the full device information of the tablet computer through the smart interconnection module. The full device information of the tablet computer can include the BLE / BR MAC, device information and link information of the tablet computer. After the PC is authenticated, the smart interconnection module of the tablet computer sends a device BR online message to the device management module, and the PC is added to the authenticated devices. The device BR online message can include device information of the PC, such as device ID, device status, device type, etc. The tablet computer can update the display related page according to the device BR online message through the device management module. The tablet computer can manage / store the full device information of the PC through the smart interconnection module. The full device information of the PC can include the BLE / BR MAC, device information and link information of the PC.

[0174] In some embodiments, based on the user operation of the fourth implementation in step S401, if the second electronic device logs in the same user account as the discovered device, the first electronic device displays a first identifier on the device search result of the discovered device logged in the same user account as the first electronic device in the first window.

[0175] In this way, the user can quickly and accurately locate the discovered device logged in the same user account as the first electronic device through the first identifier, and then can perform corresponding operations based on the same account device.

[0176] Figure 12 is an example diagram of a second page when the first electronic device and the second electronic device log in the same user account according to an embodiment of the present application.

[0177] The first electronic device can be a PC, and the second electronic device can be a tablet. If the device search result includes a tablet and a phone, the device information of the tablet includes a device type such as a tablet, a device model such as V7 Pro, and a logged-in user account such as user account b. The device information of the phone includes a device type such as a foldable screen phone, a device model such as Magic V, and a logged-in user account such as user account c. As shown in FIG. 12A, the first window 1201 of the second page includes the device search result of the tablet and the phone. If the user account logged in by the PC is user account b, the device search result of the tablet further includes a first identifier such as "My Device". Figure 12

[0178] The first electronic device is configured to display a page showing the authenticated device in the first state, which can be a third page. The third page includes the first electronic device and the interactive control of the authenticated device in the first state.

[0179] After the second electronic device is authenticated, the first electronic device adds the device information of the second electronic device to the device management information. The device management information includes the device information of the authenticated device, such as device ID, device type, device state, device type, etc. The device management information can be stored / managed by the device management module.

[0180] The first electronic device displays the third page according to the device management information in response to a third operation of the user.

[0181] If the second electronic device is authenticated and in the first state, the third page includes the identifier of the second electronic device. If the second electronic device is not authenticated or is in the second state, the third page does not include the identifier of the second electronic device.

[0182] In some embodiments, the first electronic device can set an entry of the third page on a seventh page, such as a control center page. The user can perform a third operation on the entry of the third page, which can be a single-click operation, a double-click operation, a long-press operation, etc. The first electronic device displays the third page in response to the third operation, and the third page includes the first electronic device and the interactive control of the authenticated device in the first state.

[0183] ​In this way, when the user needs to use the first electronic device to perform device cooperation with the authenticated device, the user can cause the authenticated device to establish a data transmission channel with the first electronic device based on the interactive control on the third page, which can effectively simplify the user operation and improve the interactivity between the user and the first electronic device. When the first electronic device establishes the data transmission channel with the second electronic device, the first electronic device can obtain the full information of the second electronic device according to the full information of the authenticated device and the device ID, Bluetooth address, and the like of the second electronic device, and perform device cooperation with the second electronic device according to the full information of the second electronic device.

[0184] In some embodiments, the second information can include a user account logged in by the authenticated device, and if the second electronic device passes the device authentication, the device information of the second electronic device stored by the first electronic device includes the user account logged in by the second electronic device.

[0185] The first electronic device acquires the user account logged in by the authenticated device in the first state in response to a third operation of the user.

[0186] The first electronic device displays a third page according to the user account information logged in by the local device and the user account logged in by the authenticated device in the first state. The third page further includes a second identifier located on the interactive control of the authenticated device logged in by the same user account as the first electronic device.

[0187] In this way, the user can quickly and accurately locate the authenticated device logged in by the same user account as the first electronic device through the second identifier, and then can perform corresponding operations based on the same account device.

[0188] Figure 13A 、 Figure 13B 、 Figure 13C and Figure 13D is an interactive example diagram of the first electronic device displaying a third page after the second electronic device passes the device authentication.

[0189] The first electronic device can be a mobile phone, and the second electronic device can be a PC. The mobile phone and the PC are both in a bright screen state, and the mobile phone and the PC both have Bluetooth function turned on. As shown in Figure 13AAs shown, the mobile phone displays a seventh page, such as a control center page, which includes an entry of the third page, such as an icon 1301. After the PC is authenticated by the device of the mobile phone, if the user performs a third operation, such as a click operation 18, on the icon 1301, the mobile phone displays the third page according to the device information of the authenticated device in response to the click operation 18. For example, the device management information includes the device information of the PC and the tablet computer, wherein the device information of the PC includes the device state, such as the first state, the device type, such as the PC, the device model, such as MagicBook X14, and the logged-in user account, such as the user account a. The device information of the tablet computer includes the device state, such as the first state, the device type, such as the tablet computer, the device model, such as V7 Pro, and the logged-in user account, such as the user account b. As shown in the figure, Figure 13B As shown, the first page includes an interactive control 1302 of the mobile phone, an interactive control 1303 of the PC, and an interactive control 1304 of the tablet computer. The icon of the interactive control 1303 corresponds to the device type of the PC, which is an icon of a PC. The icon of the interactive control 1304 corresponds to the device type of the tablet computer, which is an icon of a tablet computer. If the user account logged in the mobile phone is the user account a, the interactive control 1303 further includes a first identifier, such as “My Device”. When the user needs to perform the cooperation between the mobile phone and the PC, as shown in the figure, Figure 13C As shown, the user performs an operation, such as a drag operation 19, on the interactive control 1303. As shown, Figure 13D As shown, the mobile phone moves the interactive control 1303 to contact the interactive control 1302 in response to the drag operation 19, and performs the cooperation task between the mobile phone and the PC after the interactive control 1303 contacts the interactive control 1302.

[0190] The above embodiments of the present application introduce the various schemes of the device authentication method provided by the present application. It can be understood that, in order to implement the above functions, the electronic device includes the corresponding hardware structure and / or software module for executing each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of the examples described in the embodiments disclosed in the present application, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is implemented in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical scheme. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0191] Figure 14 is a structural schematic diagram of a device authentication apparatus provided by an embodiment of the present application. In an embodiment, an electronic device, such as a first electronic device, can implement the corresponding functions through the hardware apparatus shown in the figure. Figure 14 As shown, the first electronic device includes a processor 1001, a memory 1002, a communication interface 1003, and a power supply 1004. The processor 1001, the memory 1002, the communication interface 1003, and the power supply 1004 are connected through a bus. The processor 1001 is configured to execute the instructions stored in the memory 1002 to implement the functions of the first electronic device.Figure 14 As shown, the device authentication apparatus can include a display screen 1001, a memory 1002, a processor 1003, and a communication module 1004. The above-mentioned devices can be connected through one or more communication buses 1005.

[0192] In an embodiment, the display screen 1001 can include a display panel 10011 and a touch sensor 10012, wherein the display panel 10011 is used to display images, and the touch sensor 10012 can pass the detected touch operation to the application processor to determine the touch event type, and provide visual output related to the touch operation through the display panel 10011. The processor 1003 can include one or more processing units, for example: the processor 1003 can include an application processor, a modem processor, a graphics processor, an image signal processor, a controller, a video codec, a digital signal processor, a baseband processor, and / or a neural network processor, etc. Different processing units can be independent devices, or can be integrated into one or more processors. The memory 1002 is coupled to the processor 1003, and is used to store various software programs and / or groups of instructions. The memory 1002 can include volatile memory and / or non-volatile memory.

[0193] When the software programs and / or groups of instructions in the memory 1002 are executed by the processor 1003, the first electronic device implements the following method steps: in response to a user operation, obtaining a Bluetooth address of a second electronic device. The first electronic device stores device information of an authenticated device, and the device information includes a Bluetooth address and a device state, and the device state includes a first state and a second state. The first state includes that the first electronic device and the authenticated device have established a Bluetooth connection or can receive a broadcast response message from the other party, and the second state includes that the first electronic device and the authenticated device have not established a Bluetooth connection. According to the Bluetooth address of the second electronic device and the device information of the authenticated device, the device state of the second electronic device is identified. If the device state of the second electronic device is the second state, a Bluetooth connection is established with the second electronic device according to the Bluetooth address of the second electronic device. Device authentication is performed with the second electronic device based on the Bluetooth connection.

[0194] The apparatus provided by the embodiments of the present application can quickly trigger discovery of the second electronic device in response to a user operation when the first electronic device and the second electronic device support device cooperation function, so as to improve the device authentication efficiency when the first electronic device and the second electronic device are authenticated after the second electronic device is discovered. In this way, when the user wants to perform multi-device cooperation between the first electronic device and the second electronic device, the device authentication efficiency between the first electronic device and the second electronic device can be improved, and the efficiency of multi-device cooperation between the first electronic device and the second electronic device can be improved.

[0195] In an implementation, when the software programs and / or sets of instructions in the memory 1002 are executed by the processor 1003, the first electronic device implements the following method steps to obtain the Bluetooth address of the second electronic device in response to a user operation: in response to the user bringing the first electronic device close to or touching the NFC region of the second electronic device, establishing NFC communication with the second electronic device. Obtaining the Bluetooth address of the second electronic device from the second electronic device based on the NFC communication. In this way, the user can quickly and simply trigger the first electronic device to discover the second electronic device by bringing the first electronic device close to or touching the second electronic device.

[0196] In an implementation, when the software programs and / or sets of instructions in the memory 1002 are executed by the processor 1003, the first electronic device implements the following method steps to obtain the Bluetooth address of the second electronic device in response to a user operation: in response to the user using the first electronic device to scan the two-dimensional code provided by the second electronic device, obtaining the Bluetooth address associated with the two-dimensional code. In this way, the user can quickly and simply trigger the first electronic device to discover the second electronic device by scanning the code with the first electronic device.

[0197] In an implementation, when the software programs and / or sets of instructions in the memory 1002 are executed by the processor 1003, the first electronic device implements the following method steps to obtain the Bluetooth address of the second electronic device in response to a user operation: broadcasting a device discovery request. In response to the user bringing the first electronic device close to the second electronic device, receiving a response message broadcast by the second electronic device in response to the device discovery request, the response message including the Bluetooth address of the second electronic device, when the Bluetooth signal strength of the device discovery request received by the second electronic device is greater than or equal to a strength threshold. In this way, the user can quickly and simply trigger the first electronic device to discover the second electronic device by bringing the first electronic device close to the second electronic device.

[0198] In an implementation, when the software programs and / or sets of instructions in the memory 1002 are executed by the processor 1003, the first electronic device implements the following method steps to obtain the Bluetooth address of the second electronic device in response to a user operation: in response to the user performing a first operation on the first button on the first page, receiving a device discovery request broadcast by the second electronic device, the device discovery request including the Bluetooth address of the second electronic device. In this way, the user can quickly and simply trigger the first electronic device to discover the second electronic device by performing the first operation on the first button on the first page.

[0199] In an implementation, the device discovery request of the second electronic device further comprises a user account logged in by the second electronic device, and when the software programs and / or sets of instructions in the memory 1002 are executed by the processor 1003, the first electronic device specifically implements the following method steps to identify the device state of the second electronic device according to the Bluetooth address of the second electronic device and the device information of the authenticated device: determine whether the user account logged in by the first electronic device is the same as the user account logged in by the second electronic device. If the same, identify the device state of the second electronic device according to the Bluetooth address of the second electronic device and the device information of the authenticated device. In this way, the first electronic device can preliminarily judge whether it can be networked with the second electronic device through the user account logged in by the second electronic device, so as to ensure the security of the device and avoid invalid network operation of the first electronic device.

[0200] In an implementation, when the software programs and / or sets of instructions in the memory 1002 are executed by the processor 1003, the first electronic device specifically implements the following method steps to identify the device state of the second electronic device according to the Bluetooth address of the second electronic device and the device information of the authenticated device: determine whether the second electronic device is an authenticated device according to the Bluetooth address of the second electronic device. If the second electronic device is an authenticated device, determine the device state of the second electronic device according to the stored device information of the authenticated device. If the second electronic device is not an authenticated device, determine that the second electronic device is in the second state. In this way, the first electronic device can identify the device state of the second electronic device before device authentication with the second electronic device, and then perform device authentication with the second electronic device based on different device states.

[0201] In an implementation, when the software programs and / or sets of instructions in the memory 1002 are executed by the processor 1003, the first electronic device specifically implements the following method steps to implement the identification of the device status of the second electronic device according to the Bluetooth address of the second electronic device and the device information of the authenticated device: in response to a user operation, a first window is displayed, and the first window includes a second button. After detecting the display of the first window, the device status of the second electronic device is identified according to the Bluetooth address of the second electronic device and the device information of the authenticated device. Wherein, in the case that the first electronic device has established a Bluetooth connection with the second electronic device, the first electronic device is configured to, in response to a second operation performed by the user on the second button, establish a data transmission channel with the second electronic device. In the case that the first electronic device has not established a Bluetooth connection with the second electronic device, the first electronic device is configured to, in response to the second operation performed by the user on the second button, establish a Bluetooth connection with the second electronic device, and after establishing the Bluetooth connection with the second electronic device, establish a data transmission channel with the second electronic device. The first electronic device can force the second electronic device to be online without the user's awareness. If the user performs the second operation based on the second button, the first electronic device can directly establish a data transmission channel with the second electronic device authenticated by the device to perform device collaboration with the second electronic device, effectively reducing the waiting time of the user.

[0202] In an implementation, when the software programs and / or sets of instructions in the memory 1002 are executed by the processor 1003, the first electronic device specifically implements the following method steps to implement the identification of the device status of the second electronic device according to the Bluetooth address of the second electronic device and the device information of the authenticated device: in response to a user operation, a first window is displayed, and the first window includes a second button. After detecting the display of the first window, the device status of the second electronic device is identified according to the Bluetooth address of the second electronic device and the device information of the authenticated device. Wherein, in the case that the first electronic device has established a Bluetooth connection with the second electronic device, the first electronic device is configured to, in response to a second operation performed by the user on the second button, establish a data transmission channel with the second electronic device. In the case that the first electronic device has not established a Bluetooth connection with the second electronic device, the first electronic device is configured to, in response to the second operation performed by the user on the second button, establish a Bluetooth connection with the second electronic device, and after establishing the Bluetooth connection with the second electronic device, establish a data transmission channel with the second electronic device. The first electronic device can force the second electronic device to be online without the user's awareness. If the user performs the second operation based on the second button, the first electronic device can directly establish a data transmission channel with the second electronic device authenticated by the device to perform device collaboration with the second electronic device, effectively reducing the waiting time of the user.

[0203] In an implementation, when the software programs and / or sets of instructions in the memory 1002 are executed by the processor 1003, the first electronic device implements the following method steps to implement the method of interacting with the second electronic device based on the Bluetooth connection: obtaining a user account logged in by the second electronic device based on the Bluetooth connection. Determining whether the user account logged in by the first electronic device and the user account logged in by the second electronic device are the same. If they are the same, interacting with the second electronic device based on the Bluetooth connection. In this way, the first electronic device can preliminarily determine whether it can be networked with the second electronic device through the user account logged in by the second electronic device to ensure device security and avoid invalid device authentication operations of the first electronic device.

[0204] In an implementation, when the software programs and / or sets of instructions in the memory 1002 are executed by the processor 1003, the first electronic device implements the following method steps to implement the method of interacting with the second electronic device based on the Bluetooth connection: obtaining a user account logged in by the second electronic device based on the Bluetooth connection. Determining whether the user account logged in by the first electronic device and the user account logged in by the second electronic device are the same. If they are the same, interacting with the second electronic device based on the Bluetooth connection. In this way, the first electronic device can preliminarily determine whether it can be networked with the second electronic device through the user account logged in by the second electronic device to ensure device security and avoid invalid device authentication operations of the first electronic device.

[0205] In an implementation, when the software programs and / or sets of instructions in the memory 1002 are executed by the processor 1003, the first electronic device implements the following method steps: the first electronic device displays a first window in response to a first operation performed by the user on the first button on the first page. The first window is a first area on the second page for displaying device search results, and the device search results include the second electronic device, wherein each device search result corresponds to a second button. In this way, the first electronic device can display all discovered devices to the user through the first window and provide an entry for each device to establish a data transmission channel.

[0206] In an implementation, the device discovery request includes a user account logged in by the second electronic device, and when the software programs and / or sets of instructions in the memory 1002 are executed by the processor 1003, the first electronic device implements the following method steps to display the first window in response to the first operation performed by the user on the first button on the first page: determining whether the user account information logged in by the first electronic device is the same as the user account information logged in by the second electronic device. If the same, the first identification is displayed on the second electronic device when the first window is displayed. In this way, the user can quickly and accurately locate the discovered device with the same user account logged in as the first electronic device through the first identification, and then can perform corresponding operations based on the same account device.

[0207] In an implementation, when the software programs and / or sets of instructions in the memory 1002 are executed by the processor 1003, the first electronic device also implements the following method steps: if the second electronic device is authenticated by the device, the first electronic device adds the device information of the second electronic device in the device management information, and the device management information includes the device information of the authenticated device. In response to the third operation of the user, a third page is displayed according to the device management information, and the third page includes the interactive control of the first electronic device and the authenticated device in the first state. In this way, the user can interact with the authenticated device and the first electronic device based on the interactive control on the third page, which can effectively simplify the user operation and improve the interactivity of the user and the first electronic device.

[0208] In an implementation, the device management information also includes a user account logged in by the authenticated device, and when the software programs and / or sets of instructions in the memory 1002 are executed by the processor 1003, the first electronic device implements the following method steps to display the third page according to the device management information in response to the third operation of the user: in response to the third operation of the user, the user account logged in by the authenticated device is obtained; and the third page is displayed according to the user account information logged in by the first electronic device and the user account logged in by the authenticated device. The third page also includes a second identification, and the second identification is located on the interactive control of the authenticated device with the same user account logged in as the first electronic device. In this way, the user can quickly and accurately locate the authenticated device with the same user account logged in as the first electronic device through the second identification, and then can perform corresponding operations based on the same account device.

[0209] Figure 15 is another device authentication apparatus provided by the embodiments of the present application. In an embodiment, an electronic device, for example, a first electronic device, can implement corresponding functions through the software apparatus shown in Figure 15 . Figure 15As shown, the device authentication apparatus can include a first response module 1501, a storage module 1502, an identification module 1503, a connection module 1504, and an authentication module 1505. Wherein:

[0210] The first response module 1501 is configured to obtain the Bluetooth address of the second electronic device in response to a user operation. The storage module 1502 is configured to store the device information of the authenticated device, the device information including the Bluetooth address and the device state, the device state including the first state and the second state. Wherein, the first state includes that the first electronic device has established a Bluetooth connection with the authenticated device or can receive the broadcast response message of the other party, and the second state includes that the first electronic device has not established a Bluetooth connection with the authenticated device. The identification module 1503 is configured to identify the device state of the second electronic device according to the Bluetooth address of the second electronic device and the device information of the authenticated device. The connection module 1504 is configured to establish a Bluetooth connection with the second electronic device according to the Bluetooth address of the second electronic device if the device state of the second electronic device is the second state. The authentication module 1505 is configured to perform device authentication with the second electronic device based on the Bluetooth connection.

[0211] The apparatus provided by the embodiments of the present application can quickly trigger the first electronic device to establish a Bluetooth connection with the second electronic device and perform device authentication with the second electronic device in response to a user operation when the first electronic device and the second electronic device support networking function. In this way, when the user wants to network the first electronic device with the second electronic device, the first electronic device can quickly trigger device authentication with the second electronic device, thereby improving the device authentication efficiency.

[0212] In an implementation manner, the first response module 1501 is specifically configured to: in response to the user bringing the first electronic device close to or touching the near field communication (NFC) area of the second electronic device, establish NFC communication with the second electronic device. Obtain the Bluetooth address of the second electronic device from the second electronic device based on the NFC communication. In this way, the user can quickly and simply trigger the first electronic device to discover the second electronic device by bringing the first electronic device close to or touching the second electronic device.

[0213] In an implementation manner, the first response module 1501 is specifically configured to: in response to the user using the first electronic device to scan the two-dimensional code provided by the second electronic device, obtain the Bluetooth address associated with the two-dimensional code. In this way, the user can quickly and simply trigger the first electronic device to discover the second electronic device by scanning the code with the first electronic device.

[0214] In an implementation manner, the first response module 1501 is specifically configured to: in response to the user bringing the first electronic device close to the second electronic device, receive a response message broadcasted by the second electronic device in response to a device discovery request when a Bluetooth signal strength of the device discovery request is greater than or equal to a strength threshold, the response message including a Bluetooth address of the second electronic device. In this way, the user can quickly and simply trigger the first electronic device to discover the second electronic device by bringing the first electronic device close to the second electronic device.

[0215] In an implementation manner, the first response module 1501 is specifically configured to: in response to the user performing a first operation on a first button on the first page, receive a device discovery request broadcasted by the second electronic device, the device discovery request including a Bluetooth address of the second electronic device. In this way, the user can quickly and simply trigger the first electronic device to discover the second electronic device by performing the first operation on the first button on the first page.

[0216] In an implementation manner, the device discovery request of the second electronic device further includes a user account logged in by the second electronic device, and the identification module 1503 is specifically configured to: determine whether the user account logged in by the first electronic device and the user account logged in by the second electronic device are the same. If the same, determine the device state of the second electronic device according to the Bluetooth address of the second electronic device and the device information of the authenticated device. In this way, the first electronic device can preliminarily judge whether it can be networked with the second electronic device through the user account logged in by the second electronic device, so as to ensure the device security and avoid invalid network operation of the first electronic device.

[0217] In an implementation manner, the identification module 1503 is specifically configured to: determine whether the second electronic device is an authenticated device according to the Bluetooth address of the second electronic device. If the second electronic device is an authenticated device, determine the device state of the second electronic device according to the stored device information of the authenticated device. If the second electronic device is not an authenticated device, determine the second electronic device to be in the second state. In this way, the first electronic device can identify the device state of the second electronic device before device authentication with the second electronic device, and then perform device authentication with the second electronic device based on different device states.

[0218] In an implementation manner, the identification module 1503 is specifically configured to: in response to a user operation, display a first window, the first window comprising a second button. After detecting that the first window is displayed, the device state of the second electronic device is identified according to the Bluetooth address of the second electronic device and the device information of the authenticated device. In a case where the first electronic device has established a Bluetooth connection with the second electronic device, the first electronic device is configured to, in response to a second operation performed by the user on the second button, establish a data transmission channel with the second electronic device. In a case where the first electronic device has not established a Bluetooth connection with the second electronic device, the first electronic device is configured to, in response to the second operation performed by the user on the second button, establish a Bluetooth connection with the second electronic device, and establish a data transmission channel with the second electronic device after the Bluetooth connection with the second electronic device is established. The first electronic device can force the second electronic device to be online without the user's awareness. If the user performs the second operation based on the second button, the first electronic device can directly establish a data transmission channel with the second electronic device authenticated by the device, so as to perform device collaboration with the second electronic device, and effectively reduce the waiting time of the user.

[0219] In an implementation manner, the authentication module 1505 is specifically configured to: based on the Bluetooth connection, interact with the second electronic device a security module message, the security module message being used for device authentication. If the second electronic device passes the device authentication, based on the Bluetooth connection, transmit first encrypted information to the second electronic device, and receive second encrypted information transmitted by the second electronic device. The first encrypted information is encrypted by the first electronic device using a first key, and the first encrypted information comprises device information and link information of the first electronic device. The second encrypted information is encrypted by the second electronic device using a second key, and the second encrypted information comprises device information and link information of the second electronic device. In this way, after the second electronic device passes the device authentication, the first electronic device and the second electronic device can obtain more complete information of each other in an encrypted manner, and the transmission safety of data can be ensured.

[0220] In an implementation manner, the authentication module 1505 is specifically configured to: based on the Bluetooth connection, obtain a user account logged in by the second electronic device. Determine whether the user account logged in by the first electronic device and the user account logged in by the second electronic device are the same. If the same, based on the Bluetooth connection, interact with the second electronic device a security module message. In this way, the first electronic device can preliminarily determine whether the first electronic device can be networked with the second electronic device through the user account logged in by the second electronic device, so as to ensure the device safety, and avoid invalid device authentication operation of the first electronic device.

[0221] In an implementation, if the second electronic device passes the device authentication, the storage module 1502 is specifically configured to store full device information of the second electronic device. The full device information of the second electronic device includes device information, link information and a Bluetooth address of the second electronic device. In this way, the first electronic device can directly obtain the corresponding full device information according to the simple Bluetooth address after obtaining the Bluetooth address of the second electronic device in the subsequent process of cooperating with the second electronic device, so as to quickly cooperate with the second electronic device based on the obtained full device information and implement different upper-layer businesses.

[0222] In an implementation, the display module 1506 is further included. The display module 1506 is specifically configured to display the first window in response to a first operation performed by the user on the first button on the first page. The first window is a first area on the second page for displaying device search results, and the device search results include the second electronic device, wherein each device search result corresponds to a first button. In this way, the first electronic device can show all discovered devices to the user through the first window and provide an entry for each device to establish a data transmission channel.

[0223] In an implementation, the device discovery request of the second electronic device further includes a user account logged in by the second electronic device. The display module 1506 is specifically configured to determine whether the user account information logged in by the first electronic device is the same as the user account information logged in by the second electronic device. If the same, the first electronic device displays the first identification on the second electronic device when displaying the first window. In this way, the user can quickly and accurately locate the discovered device logged in the same user account as the first electronic device through the first identification, and then can perform corresponding operations based on the same account device.

[0224] In an implementation, the storage module 1502 is specifically configured to add the device information of the second electronic device in the device management information if the second electronic device passes the device authentication. The display module 1506 is configured to display a third page according to the device management information in response to a third operation of the user. The third page includes the first electronic device and the interactive control of the authenticated device in the first state. In this way, the user can make the authenticated device interact with the first electronic device based on the interactive control on the third page, which can effectively simplify the user operation and improve the interactivity between the user and the first electronic device.

[0225] In an implementation manner, the device management information further includes a user account logged in by the authenticated device, and the display module 1506 is specifically configured to: in response to a third operation of the user, acquire the user account logged in by the authenticated device in the first state. According to the user account information logged in locally and the user account logged in by the authenticated device in the first state, a third page is displayed. The third page further includes a second identifier located on an interactive control of the authenticated device logged in with the same user account as the first electronic device. In this way, the user can quickly and accurately locate the authenticated device logged in with the same user account as the first electronic device through the second identifier, and then can perform corresponding operations based on the same account device.

[0226] The above detailed description of the embodiments of the present application has further detailed the purposes, technical solutions and beneficial effects of the embodiments of the present application. It should be understood that the above is only a specific implementation manner of the embodiments of the present application, and is not used to limit the protection scope of the embodiments of the present application. Any modification, equivalent replacement, improvement, etc. made on the basis of the technical solutions of the embodiments of the present application should be included in the protection scope of the embodiments of the present application.

Claims

1. A device authentication method, characterized in that, The method includes: In response to a user operation, the first electronic device obtains the Bluetooth address of the second electronic device. The first electronic device stores device information of the authenticated device, including the Bluetooth address and device status. The device status includes a first status and a second status. The first status includes the first electronic device having established a Bluetooth connection with the authenticated device or being able to receive a broadcast response message from the other party. The second status includes the first electronic device not having established a Bluetooth connection with the authenticated device. The first electronic device identifies the device status of the second electronic device based on the Bluetooth address of the second electronic device and the device information of the authenticated device; If the device status of the second electronic device is the second status, then the first electronic device establishes a Bluetooth connection with the second electronic device based on the Bluetooth address of the second electronic device; The first electronic device interacts with the second electronic device via the Bluetooth connection, and the security module message is used for device authentication. If the second electronic device passes device authentication, the first electronic device transmits first encrypted information to the second electronic device based on the Bluetooth connection, and receives second encrypted information transmitted by the second electronic device. The first encrypted information is obtained by the first electronic device using a first key and includes device information and link information of the first electronic device. The second encrypted information is obtained by the second electronic device using a second key and includes device information and link information of the second electronic device.

2. The device authentication method according to claim 1, characterized in that, The first electronic device, in response to a user operation, obtains the Bluetooth address of the second electronic device, including: The first electronic device establishes NFC communication with the second electronic device in response to the user bringing the first electronic device close to or touching the near-field communication (NFC) area of ​​the second electronic device; The first electronic device obtains the Bluetooth address of the second electronic device from the second electronic device based on the NFC communication.

3. The device authentication method according to claim 1, characterized in that, The first electronic device, in response to a user operation, obtains the Bluetooth address of the second electronic device, including: The first electronic device responds to a user scanning a QR code provided by the second electronic device to obtain the Bluetooth address associated with the QR code.

4. The device authentication method according to claim 1, characterized in that, The first electronic device, in response to a user operation, obtains the Bluetooth address of the second electronic device by including: The first electronic device broadcasts a device discovery request; When the user brings the first electronic device close to the second electronic device, the first electronic device receives a response message broadcast by the second electronic device in response to the device discovery request when the Bluetooth signal strength of the device discovery request is greater than or equal to a strength threshold. The response message includes the Bluetooth address of the second electronic device.

5. The device authentication method according to claim 1, characterized in that, The first electronic device, in response to a user operation, obtains the Bluetooth address of the second electronic device by including: In response to a first operation performed by a user on a first button on a first page, the first electronic device receives a device discovery request broadcast by the second electronic device, the device discovery request including the Bluetooth address of the second electronic device.

6. The device authentication method according to claim 5, characterized in that, The device discovery request also includes the user account logged into the second electronic device. The first electronic device identifies the device status of the second electronic device based on the Bluetooth address of the second electronic device and the device information of the authenticated device, including: The first electronic device determines whether the user account logged in on its own device is the same as the user account logged in on the second electronic device; If they are the same, the first electronic device identifies the device status of the second electronic device based on the Bluetooth address of the second electronic device and the device information of the authenticated device.

7. The device authentication method according to claim 1, characterized in that, The first electronic device identifies the device status of the second electronic device based on the Bluetooth address of the second electronic device and the device information of the authenticated device, including: The first electronic device determines whether the second electronic device is an authenticated device based on the Bluetooth address of the second electronic device; If the second electronic device is an authenticated device, the first electronic device determines the device status of the second electronic device based on the stored device information of the authenticated device; If the second electronic device is not an authenticated device, the first electronic device determines that the second electronic device is in the second state.

8. The device authentication method according to any one of claims 1-4 and 7, characterized in that, The first electronic device identifies the device status of the second electronic device based on the Bluetooth address of the second electronic device and the device information of the authenticated device, and further includes: The first electronic device responds to the user's operation by displaying a first window, the first window including a second button; After the first electronic device detects the display of the first window, it identifies the device status of the second electronic device based on the Bluetooth address of the second electronic device and the device information of the authenticated device. Wherein, when the first electronic device and the second electronic device have established a Bluetooth connection, the first electronic device is used to establish a data transmission path with the second electronic device in response to the second operation performed by the user on the second button; In the absence of a Bluetooth connection between the first electronic device and the second electronic device, the first electronic device is used to establish a Bluetooth connection with the second electronic device in response to a second operation performed by the user on the second button, and establish a data transmission path with the second electronic device after establishing a Bluetooth connection with the second electronic device.

9. The device authentication method according to claim 1, characterized in that, The security module messages exchanged between the first electronic device and the second electronic device based on the Bluetooth connection include: The first electronic device obtains the user account logged in by the second electronic device based on the Bluetooth connection; The first electronic device determines whether the user account logged in on its own device is the same as the user account logged in on the second electronic device; If they are the same, the first electronic device interacts with the second electronic device via the Bluetooth connection to exchange security module messages.

10. The device authentication method according to claim 1 or 9, characterized in that, If the second electronic device passes device authentication, the first electronic device transmits first encrypted information to the second electronic device via the Bluetooth connection, and receives second encrypted information transmitted by the second electronic device, further comprising: The first electronic device stores all device information of the second electronic device, which includes the device information, link information, and Bluetooth address of the second electronic device.

11. The device authentication method according to claim 5, characterized in that, The first electronic device, in response to a first operation performed by a user on a first button on a first page, receives a device discovery request broadcast by the second electronic device, and further includes: Display a first window, which is a first area on the second page for displaying device search results, including the second electronic device, wherein each device search result corresponds to a second button.

12. The device authentication method according to claim 11, characterized in that, The device discovery request also includes the user account logged into the second electronic device, and the first electronic device displays a first window, including: The first electronic device determines whether the user account information logged in on its own device is the same as the user account information logged in on the second electronic device; If they are the same, the first electronic device displays the first identifier on the second electronic device while displaying the first window.

13. The device authentication method according to claim 1, characterized in that, After the first electronic device authenticates with the second electronic device based on the Bluetooth connection, the system further includes: If the second electronic device passes device authentication, the first electronic device adds the device information of the second electronic device to the device management information, which includes the device information of the authenticated device. The first electronic device responds to a third operation by the user and displays a third page based on the device management information. The third page includes the first electronic device and interactive controls for the authenticated device in the first state.

14. The device authentication method according to claim 13, characterized in that, The device management information also includes the user account logged into the authenticated device. The first electronic device, in response to the user's third operation, displays a third page based on the device management information, including: In response to the user's third operation, the first electronic device obtains the user account logged in by the authenticated device in the first state; The first electronic device displays the third page based on the user account information logged in on the device itself and the user account logged in on the authenticated device in the first state. The third page further includes a second identifier, which is located on the interactive control of the authenticated device that has logged in with the same user account as the first electronic device.

15. An electronic device, characterized in that, include: Processor and memory; The memory stores program instructions that, when executed by the processor, cause the electronic device to perform the device authentication method according to any one of claims 1-14.

Citation Information

Patent Citations

  • Data Transfer Method and Electronic Device

    US20210400744A1