Equipment collaboration method and electronic equipment

By quickly triggering the device discovery and authentication process, and automatically establishing data transmission channels using the device status, solving the problem of low coordination efficiency of electronic devices and improving user experience.

CN119227030AActive Publication Date: 2024-12-31HONOR DEVICE CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202310790210.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-28
Publication Date
2024-12-31
Estimated Expiration
2043-06-28

AI Technical Summary

Technical Problem

Electronic devices take a long time to discover the counterpart equipment and establish a data transmission channel, resulting in long wait times for users, low device coordination efficiency and poor user experience.

Method used

By quickly triggering the device discovery and authentication process during user operations, identifying the device status and directly establishing or skipping the authentication process based on the status, using Bluetooth addresses and stored information to quickly determine the process of data transmission channels, and achieving automated data transmission channel establishment.

Benefits of technology

It shortens the time for establishing data transmission channels between devices, improves the efficiency of device collaboration, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119227030A_ABST
    Figure CN119227030A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an equipment collaboration method and electronic equipment. The method comprises the steps that first electronic equipment responds to first operation of a user, after second electronic equipment is found, a first window is displayed, and a first equipment authentication process is carried out on the first electronic equipment and the second electronic equipment. And the first electronic equipment identifies the equipment state of the second electronic equipment in response to the second operation of the user. And if the state is the first state, establishing a data transmission channel between the first electronic equipment and the second electronic equipment. And if the first electronic device is in the second state, the first electronic device and the second electronic device carry out a second device authentication process, and after the second electronic device passes the authentication, a data transmission channel is established with the second electronic device. Therefore, the first electronic equipment can quickly discover the second electronic equipment and automatically perform equipment authentication on the second electronic equipment without waiting for the second operation of the user, so that the time for the first electronic equipment to establish a data transmission channel with the second electronic equipment in response to the second operation is shortened.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of terminal technology, and in particular to a device collaboration method and an electronic device. Background Art

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

[0003] After discovering the peer device, the electronic device establishes a data transmission channel with the peer device in response to the user operation, and exchanges data with the peer device through the data transmission channel to achieve device collaboration with the peer device. After discovering the peer device, if the electronic device does not receive the user operation, it will not establish a data transmission channel with the peer device until it receives the user operation, and then it will establish a data transmission channel with the peer device.

[0004] Since it takes a certain amount of time for an electronic device to discover a peer device and for the electronic device to establish a data transmission channel with the peer device after discovering the peer device, the user needs to wait for a long time before being able to use the electronic device to collaborate with the peer device. It can be seen that the efficiency of the electronic device collaborating with the peer device is low, resulting in a poor user experience. Summary of the invention

[0005] The embodiments of the present application provide a device collaboration method and an electronic device to solve the problem of low efficiency of device collaboration between an electronic device and a peer device.

[0006] In the first aspect, the embodiment of the present application provides a device collaboration method, including: the first electronic device displays a first window in response to a first operation of the user, after discovering the second electronic device, and performs a first device authentication process with the second electronic device based on a first connection, and the first window includes a first button. The first electronic device identifies the device state of the second electronic device in response to the second operation of the user on the first button, and the device state of the second electronic device includes a first state and a second state. If the second electronic device is in the first state, the first electronic device and the second electronic device establish the data transmission channel based on the second connection. If the second electronic device is in the second state, the first electronic device and the second electronic device perform a second device authentication process based on the first connection, and after the second electronic device passes the authentication, the first electronic device and the second electronic device establish a data transmission channel based on the second connection. Among them, the first state includes that the second electronic device passes the authentication, and the second electronic device maintains the first connection with the first electronic device or can receive the broadcast response message of the other party; the second state includes that the second electronic device fails to pass the authentication, or the second electronic device passes the authentication, and the second electronic device disconnects the first connection with the first electronic device, and cannot receive the broadcast response message of the other party.

[0007] According to the method provided in the embodiment of the present application, when a user needs to use a first electronic device to perform device collaboration with a second electronic device, the first electronic device can be quickly triggered to discover the second electronic device through a first operation. After discovering the second electronic device, the first electronic device displays a first window and directly and automatically starts the first device authentication process with the second electronic device. In this way, when the user performs a second operation on the first button of the first window, if the second electronic device is in the first state, the first electronic device can directly establish a data transmission channel with the second electronic device based on the authentication result of the second electronic device passing the authentication, thereby shortening the time for the first electronic device to establish a data transmission channel with the second electronic device and improving the efficiency of device collaboration between the first electronic device and the second electronic device.

[0008] In one implementation, the first electronic device identifies the device state of the second electronic device in response to the second operation of the user on the first button, including: 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 stored first information, the Bluetooth address of the second electronic device is obtained when the first electronic device discovers the second electronic device, and the first information includes the Bluetooth address and device state of the authenticated device. When the first information includes the Bluetooth address of the second electronic device, and the authenticated device corresponding to the Bluetooth address of the second electronic device is in the first state, the second electronic device is in the first state. When the first information includes the Bluetooth address of the second electronic device, and the authenticated device corresponding to the Bluetooth address of the second electronic device is in the second state, or when the first information does not include the Bluetooth address of the second electronic device, the second electronic device is in the second state. In this way, by storing the Bluetooth address and device state of the authenticated device, the first electronic device can quickly obtain the device state of the authenticated device based on the Bluetooth address when the Bluetooth address of the authenticated device is obtained, and then quickly and accurately determine the process of establishing a data transmission channel according to the device state.

[0009] In one implementation, if the second electronic device is in the first state, the first electronic device and the second electronic device establish a data transmission channel based on the second connection, including: the first electronic device exchanges the connection information of the wireless network with the second electronic device based on the first connection, the first connection is the first connection established between the first electronic device and the second electronic device, or the first electronic device determines to disconnect the first connection with the second electronic device and then re-establishes the first connection with the second electronic device. The first electronic device establishes a second connection with the second electronic device according to the connection information of the wireless network. The first electronic device establishes a data transmission channel with the second electronic device based on the second connection. In this way, if the second electronic device is in the first state, the first electronic device can bypass the device authentication process and establish a data transmission channel with the second electronic device in response to the second operation of the user, thereby improving the efficiency of establishing the data transmission channel. Moreover, the data transmission channel established based on the second connection can meet a larger data transmission volume, thereby meeting the device collaboration between the first electronic device and the second electronic device.

[0010] In one implementation, the first information also includes a device identity number ID of the authenticated device, the device ID includes a universal unique identifier UUID, the first electronic device also stores second information, the second information includes the device ID of the authenticated device, the device ID includes a unique device identifier UDID, and the first electronic device interacts with the second electronic device based on the first connection. Connection information of the wireless network includes: the first electronic device obtains the UUID of the second electronic device based on the Bluetooth address of the second electronic device and the first information. The first electronic device obtains the UDID of the second electronic device based on the UUID of the second electronic device and the second information. The first electronic device identifies the device state of the second electronic device based on the UDID of the second electronic device and the first information. When the first electronic device determines that the second electronic device is in the first state, it interacts with the second electronic device based on the first connection. Connection information of the wireless network. In this way, the first electronic device can accurately determine the second electronic device to establish a data transmission channel through the specified device ID, thereby ensuring the security and effectiveness of the data transmission channel.

[0011] In one implementation, the data transmission channel is an encrypted channel. If the second electronic device is in the first state, the key of the data transmission channel is obtained by the first electronic device based on the Bluetooth address of the second electronic device and the first information. The first information includes the device identity code ID of the second electronic device, and the key of the data transmission channel corresponds to the device ID of the second electronic device. In this way, if the second electronic device is in the first state, the first electronic device can directly obtain the key of the data transmission channel from the first information, and then exchange encrypted information with the second electronic device through the data transmission channel to ensure the security of data transmission.

[0012] In one implementation, the first electronic device and the second electronic device perform a first device authentication process based on a first connection, including: the first electronic device obtains a user account logged in by the second electronic device. The first electronic device determines whether the user account logged in by the local device is the same as the user account logged in by the second electronic device. If they are the same, the first electronic device and the second electronic device perform a first device authentication process based on the first 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 networking operations by the first electronic device.

[0013] In one implementation, the first electronic device discovers the second electronic device in response to the first operation of the user, 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 easily 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.

[0014] In one implementation, the first electronic device discovers the second electronic device in response to the first operation of the user, including: the first electronic device obtains the Bluetooth address associated with the QR code in response to the user using the first electronic device to scan the QR code provided by the second electronic device. In this way, the user can quickly and easily trigger the first electronic device to discover the second electronic device by scanning the code with the first electronic device.

[0015] In one implementation, the first electronic device discovers the second electronic device in response to the first operation of the user, including: the first electronic device broadcasts a device discovery request. In response to the user bringing 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, and the response message includes the Bluetooth address of the second electronic device. In this way, the user can quickly and easily trigger the first electronic device to discover the second electronic device by bringing the first electronic device close to the second electronic device.

[0016] In one implementation, the first electronic device discovers the second electronic device in response to the first operation of the user, including: the first electronic device receives a device discovery request broadcast by the second electronic device in response to the third operation performed by the user on the second button on the first page, the device discovery request includes the Bluetooth address of the second electronic device. In this way, the user can quickly and easily trigger the first electronic device to discover the second electronic device by performing the second operation on the second button on the second page.

[0017] In one implementation, if the second electronic device is in the second state, the first electronic device and the second electronic device perform a second device authentication process based on the first connection, and after the second electronic device passes the authentication, the first electronic device and the second electronic device establish a data transmission channel based on the second connection, including: the first electronic device establishes a first connection with the second electronic device according to the Bluetooth address of the second electronic device. The first electronic device and the second electronic device perform a second device authentication process based on the first connection. After the second electronic device passes the authentication, the first electronic device exchanges the connection information of the wireless network with the second electronic device based on the first connection. The first electronic device establishes a second connection with the second electronic device according to the connection information of the wireless network. The first electronic device establishes a data transmission channel with the second electronic device based on the second connection. In this way, the first electronic device responds to the second operation of the user, quickly starts the second device authentication process with the second electronic device, and no longer waits for the authentication result of the first device authentication process with the second electronic device, avoiding extra waste of time waiting for the authentication result of the first device authentication process, thereby shortening the time for the first electronic device to establish a data transmission channel with the second electronic device and improving the collaborative efficiency of the first electronic device and the second electronic device.

[0018] In one implementation, the data transmission channel is an encrypted channel. If the second electronic device is in the second state, the key of the data transmission channel is exchanged between the first electronic device and the second electronic device during the second authentication process. In this way, the first electronic device and the second electronic device can accurately obtain the key applicable to the data transmission channel established this time.

[0019] In one implementation, if the second electronic device is in the second state, the first electronic device executes the first process and the second process in parallel. The first process is that the first electronic device and the second electronic device perform the first device authentication process based on the first connection, and the second process is that the first electronic device and the second electronic device perform the second device authentication process based on the first connection, and after the second electronic device passes the authentication, the first electronic device and the second electronic device establish a data transmission channel based on the second connection. In this way, the first electronic device can establish a data transmission channel with the second electronic device based on the result of passing the authentication with the second electronic device in the second device authentication process. At the same time, the first electronic device can store the full amount information and Bluetooth address of the second electronic device based on the result of passing the authentication with the second electronic device in the first device authentication process, so that when the second electronic device is subsequently coordinated with the second electronic device, the full amount information of the second electronic device is directly obtained according to the Bluetooth address of the second electronic device, and the data transmission channel is established with the second electronic device based on the full amount information of the second electronic device, without having to authenticate the device with the second electronic device again, thereby improving the efficiency of device coordination with the second electronic device.

[0020] In one implementation, the first electronic device identifies the device state of the second electronic device in response to the second operation of the user on the first button, including: the first electronic device identifies whether the business package to be executed is a business package of the collaborative service in response to the second operation of the user on the first button. When the business package is a business package of the collaborative service, the device state of the second electronic device is identified. In this way, the first electronic device can establish a data transmission channel for the collaborative service with the second electronic device in a targeted manner.

[0021] In one implementation, the method further includes: the first electronic device displays a first window in response to a third operation performed by the user on the second 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 a second electronic device, wherein each device search result corresponds to one of the first buttons. 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.

[0022] In one implementation, the device discovery request includes a user account logged in by the second electronic device, and the first electronic device displays a first window in response to a third operation performed by the user on the second button on the first page, including: the first electronic device determines whether the user account information logged in by the local device is the same as the user account information logged in by the second electronic device. If they are the same, 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 with the same user account logged in as the first electronic device through the first identifier, and then can perform corresponding operations based on the device with the same account.

[0023] In one implementation, it also includes: after the second electronic device passes the first device authentication process, the first electronic device adds the device information of the second electronic device to the second information, the second information includes the device information of the authenticated device, and the device information of the authenticated device includes the device status of the authenticated device. The first electronic device responds to the user's fourth operation and displays a third page according to the second information, and the second page includes the first electronic device and the interactive controls 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 controls on the second page, which can effectively simplify the user operation and improve the interactivity between the user and the first electronic device.

[0024] In one implementation, the first electronic device responds to the fourth operation of the user and displays the third page according to the second information, including: the first electronic device responds to the fourth operation of the user, the first electronic device obtains the user account logged in by the authenticated device; the first electronic device displays the third page according to the user account information logged in by the local device and the user account logged in by the authenticated device. Among them, the third page also includes a second identifier, and the second identifier 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 identifier, and then can perform corresponding operations based on the device with the same account.

[0025] In a second aspect, an embodiment of the present application further provides a device coordination device, comprising: a display module, for displaying a first window after discovering a second electronic device in response to a first operation of a user, the first window comprising a first button. A first authentication module, for performing a first device authentication process with the second electronic device based on a first connection after discovering the second electronic device. An identification module, for identifying a device state of the second electronic device in response to a second operation of the user on the first button, the device state of the second electronic device comprising a first state and a second state. A connection module, for establishing the data transmission channel with the second electronic device based on a second connection if the second electronic device is in the first state. A second authentication module, for performing a second device authentication process with the second electronic device based on the first connection if the second electronic device is in the second state. The connection module is further used to establish a data transmission channel with the second electronic device based on a second connection after the second electronic device passes the authentication. The first state comprises that the second electronic device passes the authentication, and the second electronic device maintains a first connection with the first electronic device or can receive a broadcast response message from the other party; the second state comprises that the second electronic device fails the authentication, or the second electronic device passes the authentication, and the second electronic device disconnects the first connection with the first electronic device, and cannot receive a broadcast response message from the other party.

[0026] In the device provided in the embodiment of the present application, when a user needs to use a first electronic device to perform device collaboration with a second electronic device, the first electronic device can be quickly triggered to discover the second electronic device through a first operation. After discovering the second electronic device, the first electronic device displays a first window and directly and automatically starts the first device authentication process with the second electronic device. In this way, when the user performs a second operation on the first button of the first window, if the second electronic device is in the first state, the first electronic device can directly establish a data transmission channel with the second electronic device based on the authentication result of the second electronic device passing the authentication, thereby shortening the time for the first electronic device to establish a data transmission channel with the second electronic device and improving the efficiency of device collaboration between the first electronic device and the second electronic device.

[0027] In a third aspect, an embodiment of the present application further provides a computer-readable storage medium, in which instructions are stored, and when the computer-readable storage medium is run on a computer, the computer executes the above-mentioned aspects and methods of each implementation thereof.

[0028] In a fourth aspect, an embodiment of the present application further provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the above-mentioned aspects and methods of each of its implementation methods.

[0029] In a fifth aspect, an embodiment of the present application further provides a chip system, which includes a processor for supporting the above-mentioned terminal device to implement the functions involved in the above-mentioned aspects, for example, generating or processing the information involved in the above-mentioned method. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 It is a software architecture block diagram of an electronic device implementing multi-device collaboration provided by an embodiment of the present application;

[0031] Figure 2 is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;

[0032] Figure 3 is a software structure block diagram of the electronic device of the embodiment of the present application;

[0033] Figure 4 is a flow chart of a device collaboration method provided by an embodiment of the present application;

[0034] Figure 5A and Figure 5B is a first set of interaction example diagrams of a first electronic device discovering a second electronic device and displaying a first window, shown in an embodiment of the present application;

[0035] Fig. 6A , Figure 6B , Figure 6C and Fig.6D is a second group of interaction example diagrams of a first electronic device discovering a second electronic device and displaying a first window, shown in an embodiment of the present application;

[0036] Fig. 7A , Figure 7B and Figure 7C is a third group of interaction example diagrams of a first electronic device discovering a second electronic device and displaying a first window, shown in an embodiment of the present application;

[0037] Fig. 8A and Figure 8B is a fourth group of interaction example diagrams of a first electronic device discovering a second electronic device and displaying a first window, shown in an embodiment of the present application;

[0038] Fig. 9 This is a flowchart of a first device authentication process between a first electronic device and a second electronic device provided in an embodiment of the present application;

[0039] Fig.10 This is a flow chart of a first electronic device and a second electronic device establishing a data transmission channel provided by an embodiment of the present application;

[0040] Fig.11 This is a flowchart of a first type of wireless network connection information exchanged between a first electronic device and a second electronic device provided by an embodiment of the present application;

[0041] Fig.12 This is a flow chart of establishing a data transmission channel between a first electronic device and a second electronic device according to a second embodiment of the present application;

[0042] Fig.13 This is a first interaction example diagram of a first electronic device performing device authentication with a second electronic device in response to any first operation in the first to third implementation modes performed by a user, as shown in an embodiment of the present application;

[0043] Fig.14 The first electronic device and the second electronic device shown in the embodiment of the present application are based on Fig.13 The device authentication method shown, a first interactive example diagram for device collaboration;

[0044] Fig.15 The first electronic device and the second electronic device shown in the embodiment of the present application are Fig.14 An example diagram of interaction between a first electronic device and a second electronic device to establish a data transmission channel when the second electronic device is in the second state;

[0045] Fig.16 This is a second interaction example diagram of a first electronic device performing device collaboration with a second electronic device in response to any first operation in the first to third implementation modes performed by a user, as shown in an embodiment of the present application;

[0046] Fig.17 is a third interaction example diagram of a first electronic device performing device authentication with a second electronic device in response to a first operation in a fourth implementation manner performed by a user, shown in an embodiment of the present application;

[0047] Fig.18 The first electronic device and the second electronic device shown in the embodiment of the present application are based on Fig.17 The device authentication method shown, and the third interactive example diagram for device collaboration;

[0048] Fig.19This is an example diagram of a second page when a first electronic device and a second electronic device log in to the same user account, as shown in an embodiment of the present application;

[0049] Fig. 20A , Fig. 20B , Fig. 20C and Fig.20D This is an example diagram of an interaction between a first electronic device and a second electronic device for device collaboration after the second electronic device passes device authentication, as shown in an embodiment of the present application;

[0050] Fig.21 It is a structural diagram of a device authentication device provided in an embodiment of the present application;

[0051] Fig. 22 It is a structural diagram of another device collaboration apparatus provided in an embodiment of the present application. DETAILED DESCRIPTION

[0052] The technical solutions in the embodiments of the present application will be described clearly below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments of the present application, other embodiments obtained by ordinary technicians in this field without making creative work all belong to the protection scope of the present application.

[0053] The terms "first", "second", and "third" in the specification and claims of this application are used to distinguish different objects, rather than to limit a specific order. In the description of this application, unless otherwise specified, "at least one" means one, two, and more than two.

[0054] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0055] The terms used in the implementation method part of this application are only used to explain the specific embodiments of this application, and are not intended to limit this application. The embodiments of this application will be described in detail below in conjunction with the accompanying drawings.

[0056] Multi-device collaboration is a distributed technology applied to multiple electronic devices. Using multi-device collaboration technology, two or more electronic devices can collaborate across systems and devices to achieve information synchronization, resource sharing, and collaborative operations.

[0057] Multi-device collaboration can be applied to electronic devices of the same or different types. The types of electronic devices include but are not limited to mobile phones, tablet computers, laptops, large-screen devices (such as smart TVs, smart screens), personal computers (persona1computers, PCs), handheld computers, netbooks, personal digital assistants (personal digital assistants, PDAs), wearable electronic devices, vehicle-mounted devices, virtual reality devices, and other devices.

[0058] Multi-device collaboration needs to be achieved based on a trusted relationship between devices. After an electronic device discovers a peer device, it can establish a data transmission channel with the peer device and interact with data based on the data transmission channel to achieve multi-device collaboration only after passing device authentication on both sides.

[0059] Electronic devices discover peer devices by broadcasting. In order to reduce the power consumption of electronic devices, electronic devices can broadcast according to a preset trigger mechanism. Among them, the preset trigger mechanism may include: electronic devices broadcast periodically according to different periods in different screen states, for example, electronic devices broadcast continuously for 5 seconds every 30 seconds in the bright screen state, and electronic devices broadcast continuously for 2 seconds or 5 seconds every 5 minutes in the sleep state (screen off and unplugged), wherein the broadcast of 2 seconds and the broadcast of 5 seconds can be performed alternately, in conjunction with the scanning of the peer device for 2 seconds and 3 seconds. The preset trigger mechanism may also include: the electronic device triggers the broadcast when the state of the specified device changes, and the electronic device triggers the broadcast when the network group in which it is located changes. Among them, the specified device state of the electronic device includes the bright screen unlock state, the screen off state, the charging state, the unplugging state, the opening of the networking function, etc. On the basis of periodic broadcasting, when the state of the specified device changes, or the network group in which it is located changes, the electronic device triggers a broadcast of a certain duration, such as an additional broadcast of 5 seconds.

[0060] After discovering the peer device, the electronic device will display a window, which also includes a connection button. When the user operates based on the connection button, the electronic device will respond to the operation and perform device authentication with the peer device. If the electronic device does not receive the user's operation on the connection button, it will not perform device authentication with the peer device.

[0061] Figure 1 This is a software architecture block diagram of the electronic device provided in the embodiment of the present application to achieve multi-device collaboration.

[0062] like Figure 1As shown, the software architecture may include an application service framework, a multi-device collaborative decision engine, and a connection basic 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 collaboration. After the electronic device starts the multi-device collaborative application, it transmits the relevant data to the connection basic capability subsystem, and realizes the functions of device management, service registration, synchronization of devices, service online and offline through the multi-device collaborative decision engine. The connection basic capability subsystem includes: device management service, peripheral control service, device discovery connection service, and data transmission service. Among them, the device management service can obtain an account through the account service, such as obtaining the user account logged in by the local device and the user account logged in by the peer device. The device discovery connection service can realize regular wake-up through the system timing service, so as to broadcast and discover nearby devices after wake-up. The period of the system timing service scheduled wake-up can meet the preset trigger conditions, 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 nearby devices, the device discovery connection service can authenticate the device with the peer device through the security service, such as obtaining the device certificate of the peer device, authenticating the same account with the peer device, distributing secret keys to the peer device, and encrypting and decrypting data during data transmission with the peer device. The data transmission service can establish a near-field physical connection with the peer device through the communication service, and send and receive data through the physical channel. Among them, the communication service can be implemented through low-power hardware.

[0063] Since the process of the electronic device discovering the other electronic device and the process of responding to the user's operation of the connection button and authenticating the device with the other device will take a long time, it takes a long time for the electronic device to establish a data transmission channel with the other electronic device, and the user needs to wait for a long time before using the electronic device to coordinate with the other device. It can be seen that the efficiency of the electronic device and the other device in device coordination is low, resulting in a poor user experience.

[0064] In order to solve the above technical problems, an embodiment of the present application provides a device collaboration method.

[0065] Figure 2 Schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. If the device for multi-device collaboration includes a first electronic device and a second electronic device, the electronic device can be used as both the first electronic device and the second electronic device. Figure 2As shown, the electronic device 100 may 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.

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

[0067] In some embodiments, the processor 110 may include one or more interfaces. The interface may 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.

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

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

[0070] 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, the modem processor and the baseband processor.

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

[0072] The mobile communication module 150 can provide a solution for wireless communications including 2G / 3G / 4G / 5G, etc., for applications on the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves through the antenna 141, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 141. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0073] The modem processor may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the 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. After the low-frequency baseband signal is processed by the baseband processor, it is passed 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 video through a display screen 180. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.

[0074] The wireless communication module 160 may 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 may be one or more devices integrating at least one of the above modules. The wireless communication module 160 receives electromagnetic waves via the antenna 141, modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 may also receive the signal to be sent from the processor 110, modulate the frequency, amplify it, and convert it into electromagnetic waves for radiation via the antenna 141.

[0075] In the embodiment of the present application, the wireless communication function of the electronic device 100 may 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), fifth generation mobile networks new radio (5G NR), BT, GNSS, WLAN, NFC, FM, and / or IR. GNSS may 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 system (SBAS).

[0076] The camera 170 is used to capture still images or videos. The camera 170 includes a lens and a photosensitive element. The object generates an optical image through the lens and is projected onto the photosensitive element. 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, and then passes the electrical signal to the ISP for conversion into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV, RYYB or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 170, where N is a positive integer greater than 1.

[0077] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. NPU can realize applications such as intelligent cognition of electronic device 100, such as image recognition, face recognition, voice recognition, text understanding, etc.

[0078] The display screen 180 is used to display images, videos, etc. 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 or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), MiniLED, MicroLED, Micro-OLED, quantum dot light-emitting diodes (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 180, where N is a positive integer greater than 1.

[0079] The touch sensor 190 is also called a "touch control device". The touch sensor 190 can be arranged on the display screen 180. The touch sensor 190 and the display screen 180 form a touch screen, also called a "touch control screen". The touch sensor 190 is used to detect touch operations acting on or near it. The touch sensor can pass 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 arranged on the surface of the electronic device 100, which is different from the position of the display screen 180.

[0080] The air pressure sensor 210 is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 210 to assist in positioning and navigation.

[0081] The key 220 includes a power key, a volume key, etc. The key 220 may be a mechanical key or a touch key. The electronic device 100 may receive key input and generate key signal input related to user settings and function control of the electronic device 100.

[0082] It is to be understood that the structure illustrated in the embodiment 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 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0083] The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. In the embodiment of the present invention, the Android system of the layered architecture is taken as an example to exemplify the software structure of the electronic device 100.

[0084] Figure 3 It is a software structure block diagram of the electronic device 100 according to an embodiment of the present application.

[0085] The layered architecture divides the software into several layers, each with clear roles 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 system library, and the kernel layer.

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

[0087] like Figure 3 As shown, the application package may include camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and other applications.

[0088] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.

[0089] like Figure 3 As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.

[0090] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.

[0091] Content providers are used to store and retrieve data and make it accessible to applications. The data can include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.

[0092] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.

[0093] The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including connecting, hanging up, etc.).

[0094] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.

[0095] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.

[0096] Android Runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.

[0097] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.

[0098] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.

[0099] The system library may include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.

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

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

[0102] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0103] A 2D graphics engine is a drawing engine for 2D drawings.

[0104] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.

[0105] The device collaboration method provided in the embodiment of the present application can be implemented in the first electronic device.

[0106] Figure 4 It is a flow chart of a device collaboration method provided in an embodiment of the present application.

[0107] like Figure 4 As shown, when the first electronic device and the second electronic device enable the multi-device collaboration function, the method may include the following steps S401-S404:

[0108] Step S401: The first electronic device responds to a first operation of a user, displays a first window after discovering a second electronic device, and performs a first device authentication process with the second electronic device based on a first connection.

[0109] The user's first operation is used to quickly trigger the first electronic device to discover the second electronic device. The user's first operation may 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 uses the first electronic device to scan the QR code provided by the second electronic device, the user brings the first electronic device close to the second electronic device, and the user performs a third operation on the second button on the first page. Among them, the first page can be a multi-device collaboration page, and the second button can be an entry to search for nearby devices, such as a collaboration option for a specified type of device in a multi-device collaboration page. The third operation can be a single-click operation, a double-click operation, a long press operation, etc.

[0110] If the first electronic device finds the second electronic device, the Bluetooth address of the second electronic device can be obtained. The Bluetooth address of the second electronic device may include: Basic Rate (BR) Media Access Control Address (MAC), Bluetooth Low Energy (BLE) MAC.

[0111] The first window may be used to prompt the user that the second electronic device has been discovered. The first window includes a first button, and the user may perform a second operation based on the first button to cause the first electronic device to establish a data transmission channel with the second electronic device. The second operation may be a single-click operation, a double-click operation, a long-press operation, etc. The first window may also include a cancel button, and the user may 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 cause the first electronic device to close the first window.

[0112] In one implementation, the first window may be a toast. In this way, the first electronic device can display a toast of a smaller size to minimize the obstruction of the interface displayed by the first electronic device when quickly prompting the user that the second electronic device has been found. The toast includes a first button, such as a connect button. When the user performs a second operation based on the first button, the electronic device will establish a data transmission channel with the second electronic device in response to the second operation.

[0113] In one implementation, the first window is the first area in the second page for displaying device search results. The second page can be a collaborative page for a specified type of device, wherein the entrance to the second page can be set on the first page, such as the entrance to the second page is a second button on the first page. If the first electronic device finds the second electronic device, the device search results include the device search results of the second electronic device. In this way, the first electronic device can display all the discovered electronic devices to the user by displaying the first window. The first window includes a first button, wherein each device search result corresponds to a first button, such as a connect 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 and establish a data transmission channel with the second electronic device.

[0114] Based on different first operations of the user, the first electronic device will display in different forms. In combination with the following implementations, different interactions of the first electronic device displaying the first window in response to the first operation are described.

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

[0116] Both the first electronic device and the second electronic device have NFC functions. For example, both the first electronic device and the second electronic device are equipped with NFC chips. The NFC area of ​​the second electronic device can be identified by an NFC mark so that the user can accurately locate the NFC area of ​​the second electronic device. In response to the user's operation of bringing it close to or touching 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. Thus, the first electronic device can obtain the Bluetooth address of the second electronic device from the second electronic device based on 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, which has a smaller data volume, is more suitable for transmission through NFC communication, and has a faster transmission speed.

[0117] 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, such as "touching".

[0118] Figure 5A and Figure 5B This is a first set of interaction example diagrams showing a first electronic device discovering a second electronic device and displaying a first window, as shown in an embodiment of the present application.

[0119] For example, the first electronic device is a mobile phone, and the second electronic device is 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 functions turned on. Figure 5A As shown, an NFC logo 501 can be pasted on the lower right corner of the PC. When the user wants to establish a network between the mobile phone and the PC, the user can perform the first operation 11 of bringing the mobile phone close to or touching the NFC logo 501. Figure 5B As shown, when the mobile phone touches the NFC mark 501, the mobile phone finds the PC and establishes NFC communication with the PC. Taking the Bluetooth address of the PC as BRMAC_1 as an example, the PC sends BR MAC_1 to the mobile phone through NFC communication. After the mobile phone obtains the BR MAC_1 of the PC, it can leave the NFC area of ​​the PC. However, the mobile phone needs to remain within the range of Bluetooth communication with the PC. After the mobile phone obtains the BR MAC_1 of the PC, the first window is displayed. Taking the first window as a pop-up window as an example, Figure 5B As shown, the mobile phone displays a pop-up window 502 , which may include a first button 503 , and the pop-up window 502 may also include a cancel button 504 .

[0120] In a second implementation manner, the first operation of the user is that the user uses the first electronic device to scan the QR code provided by the second electronic device.

[0121] The first electronic device has a function of scanning a QR code. Among them, a QR code scanning entrance can be set on the fourth page. In some embodiments, the fourth page can be a desktop, a smart vision page, a browser page, etc., and the QR code scanning entrance can be an icon of a code scanning application on the desktop, an icon of a code scanning in a smart vision page, an icon of a code scanning on a browser page, etc. When the first electronic device displays the fourth page, the user can click on the scanning entrance on the fourth page to make the first electronic device display the scanning page.

[0122] The second electronic device has a function of providing a QR code. Among them, a display entrance of the QR code can be set on the fifth page. In some embodiments, the fifth page can be a multi-device collaboration page, and the display entrance of the QR code can be a collaboration option for a specified type of device in the multi-device collaboration page. When the second electronic device displays the fifth page, the user can click on the display entrance of the QR code on the fifth page to display the QR code on the second electronic device. Alternatively, the second electronic device can paste the QR code on the device housing. The QR code is associated with the Bluetooth address of the second electronic device.

[0123] When the first electronic device displays a scan page and the second electronic device displays a QR code, the user uses the scan page of the first electronic device to scan the QR code provided by the second electronic device. In response to the first operation, the first electronic device finds the second electronic device when the QR code is recognized, and obtains the Bluetooth address associated with the QR code in the scan box.

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

[0125] Fig. 6A , Figure 6B , Figure 6C and Fig.6D This is a second set of interaction example diagrams shown in an embodiment of the present application, in which a first electronic device discovers a second electronic device and displays a first window.

[0126] For example, the first electronic device is a mobile phone and the second electronic device is a PC. Fig. 6A As shown, the mobile phone displays a fourth page, such as a desktop, which includes a QR code scanning entry, such as a scan code icon 601. The user can perform a click operation 13 on icon 601. The PC displays a fifth page, such as a multi-device collaboration page, which includes a QR code display entry, such as a mobile phone collaboration option 602. The user can perform a click operation 14 on option 602. Figure 6BAs shown, the mobile phone displays a scan page 603 in response to the click operation 13, and the PC displays a QR code 604 in response to the click operation 14. When the user wants to establish a network between the mobile phone and the PC, the user can scan the QR code 604 of the PC through the scan page 603 on the mobile phone. Figure 6C As shown, when the QR code 604 is within the scanning range of the scanning page 603, the mobile phone recognizes the QR code 604 and obtains the associated Bluetooth address, such as BR MAC_2, through the QR 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 of Bluetooth communication with the PC. After the mobile phone obtains the BR MAC_2 of the PC, the first window is displayed. Take the first window as an example, as shown in Fig.6D As shown, the mobile phone jumps to display a pop-up window 605. The pop-up window 605 includes a first button 606, and the pop-up window 605 may also include a cancel button 607.

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

[0128] The first electronic device has a function of broadcasting a device discovery request. After the first electronic device turns on the Bluetooth function, it starts broadcasting the device discovery request externally.

[0129] The second electronic device has a function of scanning nearby devices. Among them, an entry for scanning nearby devices can be set on the sixth page. In some embodiments, the sixth page can be a multi-device collaboration page, and the entry for scanning nearby devices can be a collaboration option for a specified type of device in the multi-device collaboration page. When the second electronic device displays the sixth page, the user can click on the entry for scanning nearby devices on the sixth page to make the second electronic device scan nearby devices.

[0130] 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 it and the first electronic device according to the Bluetooth signal strength of the device discovery request. Among them, the stronger the Bluetooth signal strength, the closer the second electronic device can determine to be to the first electronic device. The weaker the Bluetooth signal strength, the farther the second electronic device can determine to be to 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, it can be determined that the distance between it and the first electronic device is less than or equal to the distance threshold, that is, the first electronic device and the second electronic device are close enough. 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, it broadcasts a response message in response to the device discovery request of the first electronic device, and carries the Bluetooth address in the response message. When the first electronic device receives the response message, it discovers the second electronic device and obtains the Bluetooth address of the second electronic device from the response message. Based on the way in which the second electronic device transmits the Bluetooth address by broadcasting the response message, the Bluetooth address of the second electronic device obtained by the first electronic device is BR MAC, and the data volume of BRMAC is smaller and more suitable for broadcasting.

[0131] In this way, when the function of scanning nearby devices of the second electronic device is turned on, the user can simply and quickly trigger the first electronic device to discover the second electronic device by bringing the first electronic device closer to the second electronic device.

[0132] Fig. 7A , Figure 7B and Figure 7C This is a third set of interaction example diagrams of a first electronic device discovering a second electronic device and displaying a first window, shown in an embodiment of the present application.

[0133] For example, the first electronic device is a mobile phone and the second electronic device is a PC. Fig. 7A As shown, 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 option 701 for mobile phone collaboration. The user can perform a click operation 15 on option 701. Figure 7B As shown, the PC scans nearby devices in response to the click operation 15. When the user wants to establish a network between the mobile phone and the PC, the user performs the operation 16 of bringing the mobile phone closer to the PC. The PC determines the distance from the mobile phone based on the Bluetooth signal strength of the received device discovery request. 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, it 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 receives the response message and discovers the PC, and obtains the BR MAC_3 of the PC from the response message. After obtaining the BR MAC_3 of the PC, the mobile phone displays the first window. Take the first window as a pop-up window as an example, as shown in Figure 7C As shown, the mobile phone displays a pop-up window 702. The pop-up window 702 includes a first button 703, and the pop-up window 702 may also include a cancel button 704.

[0134] In a fourth implementation manner, the first operation of the user is a third operation performed by the user on a second button on the first page.

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

[0136] When the user wants to network the first electronic device with the second electronic device, the user can perform a third operation on the second button on the first page when the first electronic device displays the first page, so that the first electronic device searches for nearby devices. After the second electronic device turns on the device discovery service, it broadcasts a device discovery request. In response to the third operation, the first electronic device receives the device discovery request broadcast by the second electronic device. 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.

[0137] In this way, the user can simply and quickly trigger the first electronic device to discover the second electronic device by triggering the first electronic device to receive a device discovery request from a nearby device.

[0138] Figure 8A-B This is a fourth group of interaction example diagrams of a first electronic device discovering a second electronic device and displaying a first window, shown in an embodiment of the present application.

[0139] For example, the first electronic device is a PC and the second electronic device is a tablet. Fig. 8A As shown, the tablet computer broadcasts a device discovery request. The PC displays a first page, such as a multi-device collaboration page, which includes an entry for searching for nearby devices, such as option 801 for tablet collaboration. When the user wants to establish a network for the PC and the tablet computer, a third operation can be performed on option 801, such as clicking operation 17. Figure 8BAs shown, the PC searches for nearby devices in response to the click operation 17. When the PC receives the device discovery request broadcast by the tablet computer, the tablet computer is discovered. The PC obtains the Bluetooth address of the tablet computer from the received device discovery request, such as BLE MAC_4. After obtaining the BR MAC_4 of the tablet computer, the PC displays a first window. The first window may be the first area on the second page, and the first window 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. For example, if the devices searched by the PC include a tablet computer and a mobile phone, the device search results in the first window 802 include a tablet computer and a mobile phone. It can be seen that when the PC finds a tablet computer, the device search results of the tablet computer can be displayed in the first window 802. The first window 802 includes first buttons 803, and each first button 803 corresponds to a device search result.

[0140] After the first electronic device discovers the second electronic device, if it needs to collaborate with the second electronic device, it needs to perform device authentication with the second electronic device. The device authentication between the first electronic device and the second electronic device includes a first device authentication process and a second device authentication process. Among them, the first device authentication process is used to perform online authentication of the second electronic device. When the second electronic device passes the authentication in the first device authentication process, the second electronic device successfully establishes a networking relationship with the first electronic device. Based on the networking relationship, the first electronic device can obtain the connection and transmission information of the second electronic device based on the data transmitted or cached data when discovering the second electronic device, and can directly connect the device and transmit data with the second electronic device based on the connection and transmission information. The second device authentication process is used to perform device connection authentication on the second electronic device. When the second electronic device passes the authentication in the second device authentication process, the second electronic device has the authority to establish a connection with the first electronic device, and the authority is applicable to the establishment of a data transmission channel and device collaboration between the first electronic device and the second electronic device this time.

[0141] It can be seen that based on the networking relationship between the first electronic device and the second electronic device, not only can the first electronic device and the second electronic device establish a data transmission channel and device collaboration this time, but also can meet the needs of the first electronic device and the second electronic device to establish a data transmission channel and device collaboration later, that is, when the first electronic device and the second electronic device establish a data transmission channel and device collaboration later, there is no need to perform device authentication again. By omitting the device authentication process, the time for the first electronic device and the second electronic device to establish a data transmission channel and device collaboration later can be reduced, and the efficiency of the first electronic device and the second electronic device to establish a data transmission channel and device collaboration later can be improved. Based on this, the first electronic device performs the first device authentication process with the second electronic device in parallel before displaying the first window, or when displaying the first window and not receiving the second operation of the user.

[0142] Fig. 9 1 is a flowchart of a first device authentication process between a first electronic device and a second electronic device provided in an embodiment of the present application. Fig. 9 As shown, the process may include the following steps S901-S903:

[0143] Step S901: The first electronic device identifies the device status of the second electronic device according to the Bluetooth address of the second electronic device and the first information stored in the first electronic device.

[0144] In some embodiments, the first electronic device can store / manage the second information through the device management module. Since the device management module is used to manage the information of the device itself, the second information only includes the device information in the full information of the authenticated device, such as the device ID, device status, etc., but does not include the Bluetooth address of the authenticated device and the link information in the full information. The authenticated device is an electronic device that is discovered by the first electronic device and is authenticated during the first device authentication process with the first electronic device. The first electronic device has a networking relationship with the authenticated device. Therefore, the first electronic device cannot directly query the full information of the authenticated device based on the Bluetooth address of the authenticated device through the device management module.

[0145] In order to facilitate the first electronic device to quickly query the full information of the authenticated device according to the Bluetooth address of the authenticated device. The first electronic device can store / manage the first information through a networking module, and the networking module can be used to provide online authentication services for the first electronic device and the second electronic device. The networking module can be a smart interconnection module. The first information includes the Bluetooth address and full information of the authenticated device. The first electronic device can store the first information in the form of a device list, such as the device list includes the Bluetooth address of the authenticated device, and the full information of the authenticated device corresponding to the Bluetooth address. Therefore, when the first electronic device obtains the Bluetooth address of the authenticated device, it can directly query the full information of the authenticated device through the smart interconnection module according to the Bluetooth address of the authenticated device and the first information.

[0146] The Bluetooth address of the authenticated device may include: BR MAC, BLE MAC.

[0147] The full information of the authenticated device may include the device information of the authenticated device. The device information of the authenticated device may include the device status, and the device status includes a first status and a second status. The first status may also be referred to as an online status, and the first status includes that the authenticated device has passed the authentication, and the first electronic device has established a Bluetooth connection with the authenticated device or can receive the broadcast response message of the other party. The networking relationship between the first electronic device and the authenticated device in the first status 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 the broadcast response message of the authenticated device.

[0148] The second state can also be called an offline state. The second state includes that the authenticated device passes the authentication, and the first electronic device disconnects the Bluetooth connection with the authenticated device, and cannot receive the other party's broadcast response message. 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 of the authenticated device through heartbeat broadcast, unicast confirmation, etc., or the authenticated device cannot pass the device authentication of the first electronic device again.

[0149] The device information of the authenticated device may also include the device ID, operating status, device type, device model, supported collaborative functions, whether smart interconnection is supported, supported versions of smart interconnection, etc. Among them, the device ID may include a node identifier (Node ID), a universally unique identifier (UUID), etc. The operating status may include screen on, screen off, sleep, etc. Collaborative functions may include screen extension, screen projection, super call, screen mirroring, multi-screen collaboration, super notification, keyboard and mouse sharing, super keyboard and mouse, etc. Device types may include mobile phones, folding screen mobile phones, PCs, tablets, etc.

[0150] The full information of the authenticated device may also include link information, such as link status, network status, etc.

[0151] The device state of the second electronic device includes a first state and a second state. The first state includes that the second electronic device passes the authentication, and the second electronic device maintains a first connection with the first electronic device or can receive a broadcast response message from the other party. The second state includes that the second electronic device fails the authentication, or the second electronic device passes the authentication, and the second electronic device disconnects the first connection with the first electronic device, and cannot receive a broadcast response message from the other party.

[0152] The first electronic device may identify the device status of the second electronic device according to the Bluetooth address of the second electronic device and the first information, specifically as follows:

[0153] The first electronic device can determine whether the second electronic device is an authenticated device based on the Bluetooth address of the second electronic device and the first information. For example, the first electronic device determines whether the first information contains the Bluetooth address of the second electronic device. If so, the second electronic device is an authenticated device; if not, the second electronic device is not an authenticated device.

[0154] If the second electronic device is an authenticated device, the first electronic device determines the device state of the second electronic device according to the stored first information. For example, if the device state in the first 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 first information with the same Bluetooth address is the second state, the device state of the second electronic device is the second state.

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

[0156] In some embodiments, based on the first to third implementations of the first operation in step S401, the first electronic device may further determine the service type before executing step S901. The service is the service to be run by the first electronic device and the second electronic device after the first electronic device passes the authentication in the first device authentication process. The service type may include a first type and a second type, the first type being an open type, that is, allowing / supporting the service to be run by the first electronic device and the second electronic device based on a networking relationship, and the second type being a closed type, that is, not allowing / supporting the service to be run by the first electronic device and the second electronic device based on a networking relationship. When the service type is the first type, the first electronic device executes step S901. When the service type is the second type, the first electronic device does not execute step S901.

[0157] In some embodiments, based on the fourth implementation of the first operation in step S401, the first electronic device obtains the user account logged in by the second electronic device before identifying the device status of the second electronic device. The device discovery request broadcast by the second electronic device may include the logged-in user account. After the first electronic device receives the device discovery request of the second electronic device, it 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 local 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 to the same user account, the first electronic device identifies the device status of the second electronic device. If the first electronic device and the second electronic device log in to different user accounts, the first electronic device no longer performs the first device authentication process on the second electronic device. In this way, the second electronic device can be authenticated once by the user accounts 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. It is also possible to avoid wasting resources in executing subsequent device status identification and device authentication processes when the second electronic device and the first electronic device log in to different user accounts.

[0158] If the device state of the second electronic device is the first state, the first electronic device does not need to perform device authentication with the second electronic device again, and the first electronic device can directly connect to and transmit data with the second electronic device.

[0159] Step S902: if the device state of the second electronic device is the second state, the first electronic device establishes a first connection with the second electronic device according to the Bluetooth address of the second electronic device.

[0160] If the device state of the second electronic device is the second state, the first electronic device establishes a first 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 first connection with the second electronic device according to the BR MAC, and the first connection is a BR connection. If the Bluetooth address of the second electronic device is BLE MAC, the first electronic device establishes a first connection with the second electronic device according to the BLE MAC, and the first connection is a BLE connection.

[0161] Step S903: The first electronic device performs a first device authentication process with the second electronic device based on the first connection.

[0162] After the first electronic device establishes a first connection with the second electronic device, the first electronic device exchanges security module information with the second electronic device based on the first connection, so as to perform a first device authentication process according to the exchanged security module information.

[0163] In some embodiments, during the process of the first electronic device and the second electronic device performing device authentication by exchanging security module messages, if the first electronic device and the second electronic device pass the authentication, 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 they each hold to exchange encrypted information to complete the device authentication process. Among them, the first electronic device uses the first key to encrypt and 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 and obtain the second encrypted information, and transmits the second encrypted information to the first electronic device.

[0164] In some embodiments, the first encrypted information may include the full information of the first electronic device, and the second encrypted information may include the full information of the second electronic device. Therefore, the first electronic device and the second electronic device can obtain more comprehensive information about each other during the first device authentication process.

[0165] In some embodiments, after acquiring the second encrypted information, the first electronic device stores the full information and Bluetooth address of the second electronic device, and the first electronic device can add the full information and Bluetooth address of the second electronic device to the first information. As a result, in the subsequent process of connecting and cooperating with the second electronic device, after acquiring the Bluetooth address of the second electronic device, the first electronic device can directly acquire the full information of the second electronic device, such as the device ID, through the smart interconnection module based on the simple Bluetooth address and the first information, so as to quickly connect and collaborate with the second electronic device based on the acquired full information to realize different upper-layer services. For example, accurately locate the second electronic device according to the device ID; determine the key corresponding to the device ID, and use the key to exchange data during the device collaboration process.

[0166] Step S402: the first electronic device identifies a device state of the second electronic device in response to a second operation of the user on the first button.

[0167] This process is similar to step S901 and will not be described in detail here.

[0168] The first electronic device executes different processes for establishing a data transmission channel according to different device states of the second electronic device. If the second electronic device is in the first state, the first process for establishing a data transmission channel is executed, and the first process is that the first electronic device crosses the device authentication process with the second electronic device and establishes a data channel with the second electronic device; if the second electronic device is in the second state, the second process for establishing a data transmission channel is executed, and the second process is that the first electronic device re-authenticates the device with the second electronic device, and then establishes a data channel with the second electronic device after passing the authentication.

[0169] Step S403: if the second electronic device is in the first state, the first electronic device and the second electronic device establish a data transmission channel based on the second connection.

[0170] If the second electronic device is in the first state, it means that the networking relationship between the second electronic device and the first electronic device is available, and the first electronic device and the second electronic device do not need to perform device authentication again. In response to the user's second operation, the first electronic device can bypass the device authentication process and establish a data transmission channel with the second electronic device. In this way, the process of the first electronic device establishing a data transmission channel with the second electronic device in response to the user's second operation can save the time of device authentication, thereby shortening the process of establishing a data transmission channel between the first electronic device and the second electronic device. Correspondingly, after the user performs the second operation, he only needs to wait for a short time to use the first electronic device and the second electronic device for device collaboration, thereby effectively improving the user experience.

[0171] Fig.10This is a flow chart of a first electronic device and a second electronic device establishing a data transmission channel provided by an embodiment of the present application. Fig.10 As shown, the method may include the following steps S1001-S1003:

[0172] Step S1001: The first electronic device exchanges wireless network connection information with the second electronic device based on the first connection.

[0173] The first connection is a first connection established between the first electronic device and the second electronic device, or a first connection re-established between the first electronic device and the second electronic device after the first electronic device determines to disconnect the first connection with the second electronic device.

[0174] The wireless network connection information is used for the first electronic device to establish a second connection with the second electronic device, and the second connection may be a Wi-Fi peer-to-peer (P2P) connection. When the second connection is a Wi-Fi P2P connection, the wireless network connection information may be network configuration information, address information, etc. related to the Wi-Fi P2P connection.

[0175] Before the first electronic device and the second electronic device exchange wireless network connection information, it is necessary to ensure the accuracy and validity of the interaction object, thereby ensuring the accuracy and security of the subsequent establishment of the data transmission channel.

[0176] Fig.11 This is a flow chart of the first method of exchanging wireless network connection information between a first electronic device and a second electronic device provided by an embodiment of the present application. Fig.11 As shown, the method may include the following steps S1101-S1104:

[0177] Step S1101: The first electronic device obtains the UUID of the second electronic device according to the Bluetooth address of the second electronic device and the first information.

[0178] The first information may include multiple device IDs of authenticated devices, such as Node ID, UUID, etc. When the second electronic device passes authentication in the first authentication process, the first information includes multiple device IDs of the second electronic device. The second information stored by the first electronic device includes device information of authenticated devices, such as a unique device identifier (UDID). When the second electronic device passes authentication in the first authentication process, the second information includes the UDID of the second electronic device.

[0179] The first electronic device can determine the UUID of the second electronic device based on the Bluetooth address of the second electronic device and the first information. The UUID of the second electronic device will change dynamically with the upgrade of the space download technology (Over the Air) of the second electronic device, so the first electronic device adds the UUID of the second electronic device in the first information. The first electronic device can determine the latest version of the second electronic device based on the Bluetooth address of the second electronic device.

[0180] Step S1102: The first electronic device obtains the UDID of the second electronic device according to the UUID of the second electronic device and the second information.

[0181] The first electronic device can determine the UDID of the second electronic device based on the UUID of the second electronic device and the second information. The UDID of the second electronic device is a device ID generated based on the unique device information of the second electronic device and is fixed. Since some information in the full information corresponds to the UDID of the device, such as device status, keys, etc. Therefore, in order to accurately find the partial status of the second electronic device, the first electronic device needs to determine the UDID of the second electronic device.

[0182] Step S1103: The first electronic device identifies the device status of the second electronic device according to the UDID of the second electronic device and the first information.

[0183] The first electronic device identifies the device status of the second electronic device again. Once the device status of the second electronic device changes from the first status to the second status during the above process, such as the authentication of the second electronic device fails, the first connection with the first electronic device is disconnected, the message of the other party's response cannot be received through broadcasting, etc., it is re-determined that a data transmission channel cannot be established with the second electronic device based on the previous authentication result, and it is necessary to re-authenticate the device with the second electronic device to ensure the security and effectiveness of data transmission.

[0184] In some embodiments, if the first electronic device recognizes that the second electronic device is in the second state, the first electronic device performs a second device authentication process with the second electronic device, and establishes a data transmission channel with the second electronic device after the second electronic device passes the authentication.

[0185] Step S1104: when the first electronic device determines that the second electronic device is in the first state, the first electronic device exchanges wireless network connection information with the second electronic device based on the first connection.

[0186] If the first electronic device determines that the second electronic device is still in the first state, it means that the first electronic device can establish a data transmission channel with the second electronic device based on the networking relationship with the second electronic device without re-authenticating the device. At this time, the first electronic device can exchange wireless network connection information with the second electronic device based on the first connection.

[0187] Step S1002: The first electronic device establishes a second connection with the second electronic device according to the connection information of the wireless network.

[0188] Taking the wireless network connection information as an example, which is network configuration information, address information, etc. related to Wi-Fi P2P connection, the first electronic device establishes a Wi-Fi P2P connection with the second electronic device.

[0189] Step S1003: The first electronic device establishes a data transmission channel with the second electronic device based on the second connection.

[0190] The data transmission channel is an encrypted channel, wherein the key of the data transmission channel can be obtained based on the Bluetooth address of the second electronic device and the first information. The full information of the second electronic device includes the device ID, and the key of the data transmission channel has a corresponding relationship with the device ID. Therefore, when the second electronic device is in the first state, the first information includes the Bluetooth address and full information of the second electronic device. The first electronic device can obtain the device ID in the full information of the second electronic device based on the Bluetooth address of the second electronic device and the first information, and obtain the key of the data transmission channel based on the device ID. Accordingly, the second electronic device can obtain the corresponding key based on the stored Bluetooth address and full information of the first electronic device.

[0191] After the first electronic device establishes a data transmission channel with the second electronic device, the key is used to encrypt and decrypt the exchanged data.

[0192] Step S404: if the second electronic device is in the second state, the first electronic device and the second electronic device perform a second device authentication process based on the first connection, and after the second electronic device passes the authentication, establish a data transmission channel with the second electronic device based on the second connection.

[0193] If the second electronic device is in the second state, it means that the second electronic device has not passed the authentication during the first device authentication process, or the networking relationship with the first electronic device is unavailable, then the first electronic device needs to re-authenticate the device with the second electronic device. At this time, the first electronic device responds to the user's second operation, performs the second device authentication process with the second electronic device, and establishes a data transmission channel with the second electronic device after the second electronic device passes the device authentication. In this way, the first electronic device responds to the user's second operation, quickly starts the second device authentication process with the second electronic device, and no longer waits for the authentication result of the first device authentication process with the second electronic device, avoiding extra waste of time waiting for the authentication result of the first device authentication process, thereby shortening the time for the first electronic device to establish a data transmission channel with the second electronic device, and improving the collaborative efficiency of the first electronic device and the second electronic device.

[0194] Fig.12 This is a flow chart of establishing a data transmission channel between a first electronic device and a second electronic device according to an embodiment of the present application. Fig.12 As shown, the method may include the following steps S1201-S1205:

[0195] Step S1201: The first electronic device establishes a first connection with the second electronic device according to the Bluetooth address of the second electronic device.

[0196] The first electronic device and the second electronic device re-execute the process of establishing the first connection to ensure that there is an effective path for exchanging connection information of the wireless network.

[0197] Step S1202: The first electronic device and the second electronic device perform a second device authentication process based on the first connection.

[0198] The first electronic device performs a second device authentication process with the second electronic device to ensure the safety and reliability of the second electronic device. Step S1202 is similar to step S903 and will not be described in detail herein.

[0199] In some embodiments, during the second device authentication process performed by the first electronic device and the second electronic device, if the first electronic device and the second electronic device pass the authentication, the first electronic device and the second electronic device obtain a key based on the security module information, and use the key to encrypt and decrypt the exchanged information. For example, the first electronic device obtains the first key based on the security module information transmitted by the second electronic device, and the second electronic device obtains the second key based on the security module information transmitted by the first electronic device. The first electronic device and the second electronic device use their respective keys to exchange encrypted information to complete the device authentication process. Among them, the first electronic device uses the first key to encrypt and 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 and obtain the second encrypted information, and transmits the second encrypted information to the first electronic device.

[0200] In some embodiments, the first encrypted information may include device information of the first electronic device. The second encrypted information may include device information of the second electronic device. Among them, the device information of the first electronic device and the second electronic device may include: device ID, operating status, device type, device model, supported collaborative functions, etc. Among them, the device ID may include NodeID, UDID, etc. The operating status may include screen on, screen off, sleep, etc. Collaborative functions may include screen extension, screen projection, super call, screen mirroring, multi-screen collaboration, super notification, keyboard and mouse sharing, super keyboard and mouse, etc. Device types may include mobile phones, folding screen mobile phones, PCs, tablets, etc. Therefore, the first electronic device and the second electronic device can obtain each other's device information during the device authentication process.

[0201] In some embodiments, after acquiring the second encrypted information, the first electronic device stores the device information of the second electronic device and manages the device information of the second electronic device. The first electronic device can add the device information of the second electronic device to the second information to store / manage the device information of the second electronic device through the device management module.

[0202] Step S1203: After the second electronic device passes authentication, the first electronic device exchanges wireless network connection information with the second electronic device based on the first connection.

[0203] The second electronic device passes the authentication, indicating that the second electronic device is safe and reliable, and the first electronic device can establish a data transmission channel with the second electronic device.

[0204] The wireless network connection information is used for the first electronic device to establish a second connection with the second electronic device, and the second connection may be a Wi-Fi P2P connection. When the second connection is a Wi-Fi P2P connection, the wireless network connection information may be network configuration information, address information, etc. related to the Wi-Fi P2P connection.

[0205] Step S1204: the first electronic device establishes a second connection with the second electronic device according to the connection information of the wireless network.

[0206] Taking the wireless network connection information as an example, which is network configuration information, address information, etc. related to Wi-Fi P2P connection, the first electronic device establishes a Wi-Fi P2P connection with the second electronic device.

[0207] Step S1205: The first electronic device establishes a data transmission channel with the second electronic device based on the second connection.

[0208] The data transmission channel is an encrypted path, wherein the key exchanged between the first electronic device and the second electronic device during the second device authentication process is the key of the data transmission channel.

[0209] After the first electronic device establishes a data transmission channel with the second electronic device, the key is used to encrypt and decrypt the exchanged data.

[0210] In some embodiments, if the second electronic device is in the second state, the first electronic device executes the first process and the second process in parallel. Among them, the first process is that the first electronic device and the second electronic device perform the first device authentication process based on the first connection, and the second process is that the first electronic device and the second electronic device perform the second device authentication process based on the first connection, and after the second electronic device passes the authentication, the data transmission channel is established with the second electronic device based on the second connection. In this way, the first electronic device can establish a data transmission channel with the second electronic device based on the result of passing the authentication with the second electronic device in the second device authentication process. At the same time, the first electronic device can store the full amount information and Bluetooth address of the second electronic device based on the result of passing the authentication with the second electronic device in the first device authentication process, so that when the device is subsequently coordinated with the second electronic device, the full amount information of the second electronic device is directly obtained according to the Bluetooth address of the second electronic device, and the data transmission channel is established with the second electronic device based on the full amount information of the second electronic device, without having to authenticate the device with the second electronic device again, thereby improving the efficiency of device coordination with the second electronic device.

[0211] The device authentication method steps S401-S404 of the embodiment of the present application are schematically described with reference to the following examples.

[0212] Example 1

[0213] This example illustrates a first interaction process in which a first electronic device performs device collaboration with a second electronic device in response to a first operation in any one of the first to third implementation modes performed by a user.

[0214] Fig.13 It is a first interaction example diagram shown in an embodiment of the present application, in which a first electronic device performs device authentication with a second electronic device in response to any first operation in the first to third implementation methods performed by a user. Fig.14 The first electronic device and the second electronic device shown in the embodiment of the present application are based on Fig.13 The device authentication method shown is a first interactive example diagram for device collaboration. Fig.15 The first electronic device and the second electronic device shown in the embodiment of the present application are Fig.14 An example diagram of interaction in which a first electronic device establishes a data transmission channel with a second electronic device when the second electronic device is in the second state.

[0215] like Fig.13 As shown, taking the user performing the first operation in the first implementation as an example, the first electronic device may be a mobile phone, and the second electronic device may be a PC. The modules of the mobile phone participating in the first interaction process include a pop-up application, a smart interconnection module, a device management module, a collaborative service module, and a communication module. The modules of the PC participating in the first interaction process include a communication module, a collaborative service module, a device management module, and a smart interconnection module.

[0216] The communication module of the mobile phone provides an NFC communication function, and the communication module of the PC provides an NFC communication function. When 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 collaborative 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 message of discovering the device to the collaborative service module, and the message of discovering the device includes the BR MAC of the PC. The communication module of the PC transmits a message of discovering the device to the collaborative service module, and the message of discovering the device includes the BR MAC of the mobile phone. The mobile phone transmits a notification of initiating a pop-up window to the pop-up application through the collaborative service module, and the notification includes the BR MAC of the PC. In response to the notification, the pop-up application of the mobile phone displays a first window, such as a pop-up window. The first window includes a first button.

[0217] When the mobile phone displays a pop-up window, the pop-up application calls the forced online interface of the smart interconnection module to trigger the smart interconnection module to execute forced online on the PC. The smart interconnection module of the mobile phone determines the service type of the corresponding service of the pop-up application. When the service type is the first type, the mobile phone identifies the device status of the PC through the smart interconnection module according to the BR MAC of the PC and the stored first information. If the device status of the PC is the first status, that is, the PC is online, the smart interconnection module sends an online notification to the pop-up application, and the online notification may include the device ID of the PC, such as the Node ID of the PC. Among them, if the first information includes the device ID, the smart interconnection module can obtain the corresponding device ID from the first information according to the BR MAC of the PC.

[0218] If the device status of the PC is the second status, that is, the PC is offline, the smart interconnection module sends an offline notification to the pop-up application, and the smart interconnection module sends a connection instruction to the communication module, and the connection instruction may include the BR MAC of the PC. The mobile phone establishes a BR connection with the PC through the communication module according to the BR MAC of the PC. 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.

[0219] The first authentication process of the mobile phone through the smart interconnection module and the smart interconnection module of the PC for device authentication. Among them, 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 exchanges security module messages with the security service module of the PC based on the BR connection, and uses the security module messages to authenticate the device. Before the security service module of the mobile phone exchanges security module messages with the security service module of the PC based on the BR connection, the security service module of the mobile phone can determine whether the mobile phone and the PC are logged in to the same user account, and when the same user account is logged in, it exchanges security module messages with the PC.

[0220] If the PC fails to pass the authentication, the security service module of the mobile phone returns a notification of authentication failure to the smart interconnection module, and the smart interconnection module feeds back the authentication failure notification to the pop-up application. Among them, the authentication failure notification may include the reason for the authentication failure. If the mobile phone and the PC pass the device authentication, the security service module of the mobile phone returns the first key to the smart interconnection module, and the security service module of the PC returns the second key to the smart interconnection module. The smart interconnection module of the mobile phone and the smart interconnection module of the PC use the first key and the second key to exchange the first encrypted information and the second encrypted information respectively. The first encrypted information and the second encrypted information may include the full amount of 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 each other, confirm that the authentication is successful. Among them, the mobile phone feeds back the authentication success notification to the pop-up application through the smart interconnection module, and the authentication success notification may include the device ID of the PC, and the device ID of the PC may be obtained by the mobile phone from the second encrypted information, such as the Node ID of the PC. After the PC passes the authentication, the smart interconnection module of the mobile phone adds the PC to the authenticated device, such as the smart interconnection module of the mobile phone adds the full amount of information and Bluetooth address of the PC to the first information. After the PC passes the authentication, the smart interconnection module of the mobile phone also sends a device BR online message to the device management module. The device BR online message includes the device information of the PC, such as device ID, device status, device type, etc. The mobile phone adds the device information of the PC to the second information. The mobile phone can update and display the relevant pages according to the updated second information through the device management module. After the mobile phone passes the authentication, the smart interconnection module of the PC adds the mobile phone to the authenticated devices, such as the smart interconnection module of the PC adds the full information and Bluetooth address of the mobile phone. After the mobile phone passes the authentication, the smart interconnection module of the PC also sends a device BR online message to the device management module. The device BR online message includes the device information of the mobile phone, such as device ID, device status, device type, etc. The PC adds the device information of the mobile phone to the second information. The PC can update and display the relevant pages according to the updated second information through the device management module.

[0221] like Fig.14As shown, when the user wants to use the mobile phone to collaborate with the PC, the user can perform the second operation on the first button, such as clicking the first button. The pop-up application identifies whether the business package to be executed is a business package of the collaborative service. When the business package is a business package of the collaborative service, it continues to respond to the second operation and collaborate with the PC. The pop-up application sends the message of the second operation to the collaborative service module. In response to the second operation, the collaborative service module sends a forced online notification to the device management module, which may include the BR MAC of the PC. The device management module sends a forced online notification to the smart interconnection module and calls the query interface of the smart interconnection module. The notification may include the BR MAC of the PC. The smart interconnection module of the mobile phone identifies the device status of the PC based on the BR MAC of the PC and the stored first information.

[0222] If the PC is in the first state, it is determined to execute the first process of establishing a data transmission channel. The smart interconnection module of the mobile phone sends an online notification to the device management module, and the online notification may include the UUID of the PC. In response to the online notification, the device management module returns the UDID of the PC to the smart interconnection module, and sends a message of successful online and the UDID of the PC to the collaborative service module. In response to the message of successful online, the collaborative service module identifies the device state of the PC again according to the UDID of the PC. If it is determined that the PC is in the first state, it is determined to continue to execute the first process of establishing a data transmission channel; if it is determined that the PC is in the second state, it is determined to execute the second process of establishing a data transmission channel. When it is determined to continue to execute the first process of establishing a data transmission channel, the collaborative service module of the mobile phone returns a message of obtaining a device object (getDevice) to the device management module, and returns a notification of opening a session to the smart interconnection module. The smart interconnection module of the mobile phone establishes a data transmission channel with the smart interconnection module of the PC. Among them, the smart interconnection module of the mobile phone identifies whether the first connection has been established with the PC at present. If the first connection has not been established, the smart interconnection module of the mobile phone notifies the communication module to establish the first connection with the PC. After the smart interconnection module of the mobile phone recognizes that a first connection has been established with the PC, it exchanges connection information of the wireless network with the smart interconnection module of the PC based on the first connection, such as network configuration information and address information related to the Wi-Fi P2P connection. The communication module of the mobile phone and the PC establishes a second connection based on the connection information of the interacted wireless network. For example, after the Wi-Fi P2P connection, the smart interconnection module of the mobile phone and the smart interconnection module of the PC establish a data transmission channel (opensession) based on the second connection. After the mobile phone and the PC establish a data transmission channel, the smart interconnection module of the mobile phone sends a message to the collaborative service module that the session has been started (onsessionOpende), and the smart interconnection module of the PC sends a message to the collaborative service module that the session has been started. In this way, the collaborative service module of the mobile phone can exchange information (sendMessage) with the collaborative service module of the PC based on the data transmission channel.

[0223] If the PC is in the second state, it is determined to execute the second process of establishing the data transmission channel. Fig.15As shown, the collaborative service module of the mobile phone sends a notification of Bluetooth connection to the communication module, and the notification of Bluetooth connection may include the BRMAC of the PC. The communication module of the mobile phone establishes a first connection with the PC according to the BR MAC of the PC, and after the first connection is successfully established, the communication module returns a notification of successful Bluetooth connection to the collaborative service module. In response to the notification of successful Bluetooth connection, the collaborative service module of the mobile phone may perform a second authentication process of device authentication with the security service module of the PC through the security service module. The security service module of the mobile phone may exchange security module messages with the security service module of the PC based on the first connection, and use the security module messages to perform device authentication.

[0224] If the PC fails to pass the authentication, the security service module of the mobile phone returns a notification of authentication failure to the collaborative service module, and the authentication failure notification may include the reason for the authentication failure. If the mobile phone and the PC pass the device authentication, the security service module of the mobile phone returns the first key to the collaborative service module, and the security service module of the PC returns the second key to the collaborative service module. The collaborative service module of the mobile phone and the collaborative service module of the PC use the first key and the second key to exchange the first encrypted information and the second encrypted information respectively. The first encrypted information and the second encrypted information may include the device information of the corresponding electronic device. After the collaborative service module of the mobile phone and the collaborative service module of the PC obtain the encrypted information of the other party, they confirm that the authentication is successful. Among them, after the PC passes the authentication, the collaborative service module of the mobile phone can store / manage the device information of the PC by the collaborative service module, or send the device information of the PC to the device management module, and the mobile phone adds the device information of the PC to the second information. After the mobile phone passes the authentication, the collaborative service module of the PC can store / manage the device information of the mobile phone by the collaborative service module, or send the device information of the mobile phone to the device management module, and the PC adds the device information of the mobile phone.

[0225] If the mobile phone and the PC pass the second authentication process, the mobile phone determines to continue to execute the second process of establishing a data transmission channel. Among them, the collaborative service module of the mobile phone identifies whether the first connection has been established with the PC. If the first connection has not been established, the collaborative service module of the mobile phone notifies the communication module to establish a first connection with the PC. After the collaborative service module of the mobile phone identifies that the first connection has been established with the PC, it exchanges the connection information of the wireless network with the collaborative service module of the PC based on the first connection, such as network configuration information and address information related to the Wi-Fi P2P connection. The communication module of the mobile phone and the PC establish a second connection based on the connection information of the interacted wireless network. For example, after the Wi-Fi P2P connection, the collaborative service module of the mobile phone and the collaborative service module of the PC establish a data transmission channel based on the second connection. After the mobile phone and the PC start a session, the collaborative service module of the mobile phone can exchange information with the collaborative service module of the PC based on the data transmission channel.

[0226] During the execution of the second process, the mobile phone can execute the first authentication process with the PC in parallel through the smart interconnection module. Among them, if the PC passes the authentication in the first authentication process, the smart interconnection module of the mobile phone sends a successful online notification to the device management module, and the device management module sends a successful online notification to the collaborative service module, and the successful online notification may include the UDID of the PC. The smart interconnection module of the mobile phone also reports the notification of the device going online to the device management module, and the notification of the device going online may include the device information of the PC. The device management module can update and display the relevant pages according to the device information of the PC. If the PC fails to authenticate in the first authentication process, the smart interconnection module of the mobile phone sends an online failure notification to the device management module. In this way, the next time the mobile phone performs device collaboration with the PC, it can establish a data transmission channel with the PC based on the stored device information.

[0227] Example 2

[0228] This example illustrates a second interaction process in which the first electronic device performs device collaboration with the second electronic device after displaying the first window in response to any first operation in the first to third implementation modes performed by the user.

[0229] Fig.16 It is a second interaction example diagram shown in an embodiment of the present application, in which a first electronic device performs device collaboration with a second electronic device in response to any first operation in the first to third implementation methods performed by a user.

[0230] like Fig.16 As shown, taking the user performing the first operation in the first implementation as an example, the first electronic device may be a mobile phone, and the second electronic device may 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 smart interconnection module. Among them, the business module corresponds to the pop-up application. The modules of the PC participating in the second interaction process include a smart interconnection module.

[0231] After the user brings the mobile phone close to or touches the NFC area of ​​the PC, the first window, such as a pop-up window, is displayed. The process can refer to Example 1 and will not be repeated here. The mobile phone calls the device management's force online by MAC address (forceOnlineByMac) interface through the business module to notify the PC to be forced online. The device management module constructs a device information (DeviceInfo) object and calls the authentication device (verifyDevice()) interface of the smart interconnection module to perform the first authentication process of device authentication on the PC through the smart interconnection module to force the PC to go online. The smart interconnection module of the mobile phone identifies the device status of the PC based on the BR MAC of the PC and the first information stored. If the device status of the PC is the first status, that is, the PC is online, the smart interconnection module calls back the authentication callback device authentication pass (VerifyCallback.onDeviceVerifyPass) interface of the business module and carries the device ID of the PC, such as the Node ID of the PC. If the device status of the PC is the second status, that is, the PC is not online, the smart interconnection module calls back the authentication callback device authentication failure (VerifyCallback.onDeviceVerifyFail) interface of the business module, and notifies the business module that authentication is in progress. If the device status of the PC is the second status, 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 and will not be repeated here. After the authentication is completed, the smart interconnection module of the mobile phone calls back the corresponding authentication callback (VerifyCallback) interface of the business module according to the authentication result, and puts the PC online. Among them, if the PC passes the device authentication, the smart interconnection module of the mobile phone calls back the Pass interface of VerifyCallback. If the PC fails the device authentication, the smart interconnection module of the mobile phone calls back the Fail interface of VerifyCallback.

[0232] The user performs a second operation on the first button in the first window, such as clicking the first button. In response to the second operation, the business module calls the getDevice(Nodeid) interface of the device management module to obtain the device object of the PC from the device management module. After obtaining the device object of the PC, the business module determines the process of establishing a data transmission channel to be executed according to the device status of the PC. The determination process can refer to Example 1 and is not repeated here. Among them, when the business module recognizes that the PC is in the first state, it also calls the getProperty interface to obtain the service support version (servicesupportVersion) field of the PC to determine whether the PC supports the smart interconnection function, that is, whether it supports the execution of the first process. If supported, it is determined to continue to execute the first process; if not supported, the second process is executed. The business module monitors whether the PC is online, that is, whether the PC is in the first state. If it is monitored that the PC is in the first state, a data transmission channel can be quickly established with the PC by executing the first process, and device collaborative services can be implemented based on the data transmission channel.

[0233] Example 3

[0234] This example illustrates a third interaction process of device collaboration between a first electronic device and a second electronic device in response to a first operation in the fourth implementation manner performed by a user.

[0235] Fig.17 This is a third interaction example diagram shown in an embodiment of the present application, in which a first electronic device performs device authentication with a second electronic device in response to a first operation in a fourth implementation method performed by a user. Fig.18 The first electronic device and the second electronic device shown in the embodiment of the present application are based on Fig.17 The device authentication method shown is a third interactive example diagram for device collaboration.

[0236] like Fig.17 As shown, taking the user performing the first operation in the fourth implementation as an example, the first electronic device may be a PC, and the second electronic device may be a tablet computer. The modules of the PC participating in the third interaction process include a communication module, a collaborative service module, a device management module, and a smart interconnection module. The modules of the tablet computer participating in the third interaction process include a smart interconnection module, a device management module, a collaborative service module, and a communication module.

[0237] The communication module of the PC provides a BLE / BR communication function, and the communication module of the tablet computer provides a BLE / BR communication function. The tablet computer notifies the smart interconnection module to create a session service (addSessionService) through the collaborative service module, and notifies the smart interconnection module to start the 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 the device discovery request. The user performs the first operation based on the second button on the first page displayed by the PC, such as clicking the tablet collaboration option on the multi-device collaboration page. The process can refer to the relevant description of the fourth implementation method of the first operation, which is not repeated here. In response to the first operation, the PC notifies the smart interconnection module through the collaborative service module to start searching for nearby devices (startDiscovery). 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, and the device discovery message may include the BLE / BR MAC of the tablet computer. The device discovery message may also include the user account that the tablet computer has logged in. The communication module of the tablet computer sends a device discovery message to the smart interconnection module, which may include the BLE / BR MAC of the PC. The smart interconnection module of the PC transmits the BLE / BR MAC of the tablet computer and the logged-in user account to the collaborative service module.

[0238] The PC displays a first window according to the device search results, and the first window may be an area on the first page for displaying the device search results. If the PC finds a tablet computer, the first window includes the device search results for the tablet computer. The first window also includes a first button corresponding to the device search results.

[0239] The collaborative service module of the PC determines whether the tablet computer and the local computer are logged in to the same user account based on the user account logged in to the tablet computer and the user account logged in to the local computer. If the tablet computer and the local computer are logged in to different user accounts, the PC ignores this task. If the tablet computer and the local computer are logged in to the same user account, the collaborative service module of the PC calls the forced online interface of the device management module to force the tablet computer to go online. The device management module of the PC calls the forced online interface of the smart interconnection module to trigger the smart interconnection module to force the tablet computer to go online. The PC identifies the device status of the PC through the smart interconnection module based on the BLE / BR MAC of the tablet computer and the stored first information. When discovering the tablet computer, the PC can obtain the device information of the tablet computer and identify the device status of the PC based on the device information of the tablet computer and the first information.

[0240] If the device state of the tablet computer is the first state, that is, the tablet computer is in the online state, the smart interconnection module sends an online notification to the device management module, and the notification may include the device ID of the tablet computer, such as the UUID of the tablet computer. In response to the notification, the device management module requests the UDID of the tablet computer from the smart interconnection module. After obtaining the UDID of the tablet computer, the device management module sends an online success message to the collaborative service module, and the message includes the UDID of the tablet computer.

[0241] If the device state of the tablet computer is the second state, that is, the tablet computer is offline, the smart interconnection module sends an offline notification to the device management module, and the device management module sends an offline notification to the collaborative service module. The smart interconnection module also sends a connection instruction to the communication module, and the connection instruction may include the BLE / BR MAC of the tablet computer. The PC establishes a BLE / BR connection with the tablet computer through the communication module according to the BLE / BR MAC of the tablet computer.

[0242] After the PC and the tablet successfully establish a BLE / BR connection, the PC performs the first authentication process of device authentication with the tablet's smart interconnection module through the smart interconnection module. Among them, 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 exchanges security module messages with the tablet's security service module based on the BLE / BR connection, and uses the security module messages to perform device authentication. Before the PC's security service module exchanges security module messages with the tablet's security service module based on the BLE / BR connection, the PC's security service module can determine whether the local machine and the tablet are logged in to the same user account. When the same user account is logged in, the security module message is exchanged with the tablet.

[0243] If the tablet computer fails to pass the authentication, the security service module of the PC returns a notification of authentication failure to the smart interconnection module, and the smart interconnection module feeds back the authentication failure notification to the device management module. Among them, the authentication failure notification may include the reason for the authentication failure. The device management module then feeds back the authentication failure notification to the collaborative service module. If the tablet computer passes the authentication, the security service module of the PC returns the first key to the smart interconnection module, and the security service module of the tablet computer returns the second key to the smart interconnection module. The smart interconnection module of the PC and the smart interconnection module of the tablet computer use the first key and the second key to exchange the first encrypted information and the second encrypted information respectively. The first encrypted information and the second encrypted information may include the full amount of 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 each other, confirm that the authentication is successful. The PC feeds back the authentication success notification to the device management module through the smart interconnection module, and the authentication success notification may include the device ID of the tablet computer. The device ID of the tablet computer may be obtained by the PC from the second encrypted information, or may be obtained when the PC discovers the tablet computer. The device management module then feeds back the authentication success notification to the collaborative service module, and adds the tablet computer to the authenticated devices. The PC can manage / store the full amount of information and Bluetooth address of the tablet computer through the smart interconnection module. After the tablet computer passes the authentication, the smart interconnection module of the PC also sends a device BR online message to the device management module. The device BR online message may include the device information of the tablet computer, such as device ID, device status, device type, etc. The PC adds the device information of the tablet computer to the second information. The PC can update and display the relevant pages according to the updated second information through the device management module. The tablet computer can manage / store the full information and Bluetooth address of the PC through the smart interconnection module. After the PC passes the authentication, the smart interconnection module of the tablet computer also sends a device BR online message to the device management module. The device BR online message may include the device information of the PC, such as device ID, device status, device type, etc. The tablet computer adds the device information of the PC to the second information. The tablet computer can update and display the relevant pages according to the updated second information through the device management module.

[0244] like Fig.18As shown, when a user wants to use a PC to collaborate with a tablet computer, the user can perform a second operation on the first button corresponding to the device search result of the tablet computer, such as clicking the first button. The collaborative service module of the PC identifies whether the business package to be executed is a business package of a collaborative service. When the business package is a business package of a collaborative service, it continues to respond to the second operation and collaborates with the tablet computer. In response to the second operation, the collaborative service module sends a forced online notification to the device management module, which may include the BLE / BR MAC of the tablet computer. The device management module sends a forced online notification to the smart interconnection module and calls the query interface of the smart interconnection module, which may include the BLE / BR MAC of the tablet computer. The smart interconnection module of the mobile phone identifies the device status of the tablet computer based on the BLE / BR MAC of the PC and the stored first information.

[0245] If the tablet computer is in the first state, it is determined to execute the first process of establishing a data transmission channel. The smart interconnection module of the PC sends an online notification to the device management module, and the online notification may include the UUID of the tablet computer. In response to the online notification, the device management module returns the UDID of the tablet computer to the smart interconnection module, and sends a message of successful online and the UDID of the tablet computer to the collaborative service module. In response to the message of successful online, the collaborative service module identifies the device state of the tablet computer again according to the UDID of the tablet computer. If it is determined that the tablet computer is in the first state, it is determined to continue to execute the first process of establishing a data transmission channel; if it is determined that the tablet computer is in the second state, it is determined to execute the second process of establishing a data transmission channel. When it is determined to continue to execute the first process of establishing a data transmission channel, the collaborative service module of the PC returns a message of obtaining a device object (getDevice) to the device management module, and returns a notification of opening a session to the smart interconnection module. The smart interconnection module of the PC establishes a data transmission channel with the smart interconnection module of the tablet computer. Among them, the smart interconnection module of the PC identifies whether a first connection has been established with the tablet computer at present. If the first connection has not been established, the smart interconnection module of the PC notifies the communication module to establish a first connection with the tablet computer. After the PC's smart interconnection module recognizes that a first connection has been established with the tablet computer, it exchanges wireless network connection information with the tablet computer's smart interconnection module based on the first connection, such as network configuration information and address information related to the Wi-Fi P2P connection. The PC and the tablet computer's communication module establish a second connection based on the exchanged wireless network connection information. For example, after the Wi-Fi P2P connection, the PC's smart interconnection module and the tablet computer's smart interconnection module establish a data transmission channel based on the second connection. After the PC and the tablet computer establish a data transmission channel, the PC's smart interconnection module sends a message to the collaborative service module that the session has been started, and the tablet computer's smart interconnection module sends a message to the collaborative service module that the session has been started. In this way, the PC's collaborative service module can exchange information with the tablet computer's collaborative service module based on the data transmission channel.

[0246] If the tablet computer is in the second state, it is determined to execute the second process of establishing the data transmission channel. The second process of establishing the data transmission channel between the PC and the tablet computer can refer to Fig.15 , the collaborative service module and communication module of the PC Fig.15 The collaborative service module and communication module of the mobile phone are similar to the process executed by the collaborative service module and communication module of the tablet computer. Fig.15The processes executed by the collaborative service module and the communication module of the PC are similar. The collaborative service module of the PC sends a notification of Bluetooth connection to the communication module, and the notification of Bluetooth connection may include the BR MAC of the tablet computer. The communication module of the PC establishes a first connection with the tablet computer according to the BR MAC of the tablet computer, and after the first connection is successfully established, the communication module returns a notification of successful Bluetooth connection to the collaborative service module. In response to the notification of successful Bluetooth connection, the collaborative service module of the PC may perform a second authentication process of device authentication with the security service module of the tablet computer through the security service module. The security service module of the PC exchanges security module messages with the security service module of the tablet computer based on the first connection, and uses the security module messages to perform device authentication.

[0247] If the tablet computer fails to pass the authentication, the security service module of the PC returns a notification of authentication failure to the collaborative service module, and the authentication failure notification may include the reason for the authentication failure. If the PC and the tablet computer pass the device authentication, the security service module of the PC returns the first key to the collaborative service module, and the security service module of the tablet computer returns the second key to the collaborative service module. The collaborative service module of the PC and the collaborative service module of the tablet computer use the first key and the second key to exchange the first encrypted information and the second encrypted information respectively. The first encrypted information and the second encrypted information may include the device information of the corresponding electronic device. After the collaborative service module of the PC and the collaborative service module of the tablet computer obtain the encrypted information of each other, they confirm that the authentication is successful. Among them, after the tablet computer passes the authentication, the collaborative service module of the PC can store / manage the device information of the tablet computer by the collaborative service module, or send the device information of the tablet computer to the device management module, and the PC adds the device information of the tablet computer to the second information. After the PC passes the authentication, the collaborative service module of the tablet computer can store / manage the device information of the PC by the collaborative service module, or send the device information of the PC to the device management module, and the tablet computer adds the device information of the PC.

[0248] If the PC and the tablet computer pass the second authentication process, the PC determines to continue to execute the second process of establishing a data transmission channel. Among them, the collaborative service module of the PC identifies whether the first connection has been established with the tablet computer. If the first connection has not been established, the collaborative service module of the PC notifies the communication module to establish a first connection with the tablet computer. After the collaborative service module of the PC identifies that the first connection has been established with the tablet computer, based on the first connection, it exchanges the connection information of the wireless network with the collaborative service module of the tablet computer, such as the network configuration information and address information related to the Wi-Fi P2P connection. The communication module of the PC and the tablet computer establish a second connection based on the connection information of the interacted wireless network. For example, after the Wi-Fi P2P connection, the collaborative service module of the PC and the collaborative service module of the tablet computer establish a data transmission channel based on the second connection. After the PC and the tablet computer establish a data transmission channel, the collaborative service module of the PC can exchange information with the collaborative service module of the tablet computer based on the data transmission channel.

[0249] During the execution of the second process, the PC can execute the first authentication process with the tablet computer in parallel through the smart interconnection module. Among them, if the tablet computer passes the authentication in the first authentication process, the smart interconnection module of the PC sends a successful online notification to the device management module, and the device management module sends a successful online notification to the collaborative service module, and the successful online notification may include the UDID of the tablet computer. The smart interconnection module of the PC also reports a notification of the device going online to the device management module, and the notification of the device going online may include the device information of the tablet computer. The device management module can update and display related pages based on the device information of the tablet computer. If the tablet computer fails to authenticate in the first authentication process, the smart interconnection module of the PC sends an online failure notification to the device management module. In this way, the next time the PC performs device collaboration with the tablet computer, it can establish a data transmission channel with the tablet computer based on the stored device information.

[0250] In some embodiments, based on the first operation of the fourth implementation method in step S401, if the second electronic device is logged in to the same user account as the discovered device, the first electronic device displays a first identifier on the device search results of the discovered device with the same user account as the first electronic device in the first window.

[0251] In this way, the user can use the first identifier to quickly and accurately locate the discovered device that has the same user account as the first electronic device logged in, and then can perform corresponding operations based on the device with the same account.

[0252] Fig.19 This is an example diagram of a second page when a first electronic device and a second electronic device log in to the same user account, as shown in an embodiment of the present application.

[0253] The first electronic device may be a PC, and the second electronic device may be a tablet. If the device search results include a tablet and a mobile phone, the device information of the tablet includes the device type, such as a tablet, the device model, such as V7Pro, and the logged-in user account, such as user account b. The device information of the mobile phone includes the device type, such as a folding screen mobile phone, the device model, such as Magic V, and the logged-in user account, such as user account c. Fig.19 As shown, the first window 1901 of the second page includes device search results for tablet computers and mobile phones. If the user account logged in by the PC is user account b, the device search results for the tablet computer also include a first identifier, such as "my device".

[0254] In some embodiments, the first electronic device is configured with a page for displaying the authenticated device in the first state, and the page may include a third page. The third page includes the first electronic device and interactive controls of the authenticated device in the first state.

[0255] The first electronic device may display a third page based on the second information. If the second electronic device passes the device authentication and is in the first state, the second page includes an identifier of the second electronic device. If the second electronic device fails the device authentication or is in the second state, the second page does not include an identifier of the second electronic device.

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

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

[0258] In this way, when the user needs to use the first electronic device to collaborate with the authenticated device, the user can establish a data transmission channel between the authenticated device and the first electronic device based on the interactive controls on the second page, which can effectively simplify user operations and improve the interactivity between the user and the first electronic device. When the first electronic device establishes a data transmission channel with the second electronic device, the first electronic device can obtain the full information of the second electronic device based on the first information and the device ID, Bluetooth address, etc. of the second electronic device, and collaborate with the second electronic device based on the full information of the second electronic device.

[0259] In some embodiments, the second information may include a user account logged in by the authenticated device. 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.

[0260] In response to the third operation of the user, the first electronic device obtains the user account logged in by the authenticated device in the first state.

[0261] The first electronic device displays a third page based on 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 also includes a second identifier, which is located on an interactive control of the authenticated device with the same user account as the first electronic device.

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

[0263] Fig. 20A , 20B 20C and 20D are example diagrams of interaction between a first electronic device and a second electronic device for device collaboration after the second electronic device passes device authentication, as shown in an embodiment of the present application.

[0264] The first electronic device may be a mobile phone, and the second electronic device may 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 functions turned on. Fig. 20A As shown, the mobile phone displays the seventh page, such as the control center page, which includes an entrance to the third page, such as icon 2001. After the PC passes the device authentication of the mobile phone, if the user performs a fourth operation on icon 2001, such as click operation 18, the mobile phone responds to click operation 18 and displays the third page according to the first information. Take the second information including device information of the PC and the tablet computer, wherein the device information of the PC includes device status, such as the first status, device type, such as PC, device model, such as MagicBook X14, and logged-in user account, such as user account a. The device information of the tablet computer includes device status, such as the first status, device type, such as tablet computer, device model, such as V7 Pro, and logged-in user account, such as user account b as an example. Fig. 20BAs shown, the third page includes interactive controls 2002 for mobile phones, interactive controls 2003 for PCs, and interactive controls 2004 for tablet computers. The icon of interactive control 2003 corresponds to the device type of the PC, and is an icon of a PC. The icon of interactive control 2004 corresponds to the device type of the tablet computer, and is an icon of a tablet computer. If the user account logged in by the mobile phone is user account a, then interactive control 2003 also includes a second identifier, such as "My Device". When the user needs the mobile phone to collaborate with the PC, such as Fig. 20C As shown, an operation is performed on the interactive control 2003, such as a drag operation 19. Fig.20D As shown, the mobile phone moves the interactive control 2003 to contact the interactive control 2002 in response to the drag operation 19, and after the interactive control 2003 contacts the interactive control 2002, the collaborative task of the mobile phone and the PC is executed.

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

[0266] Fig.21 is a schematic diagram of a device authentication apparatus provided in an embodiment of the present application. In one embodiment, an electronic device, such as a first electronic device, can be Fig.21 The hardware devices shown in the figure implement the corresponding functions. Fig.21 As shown, the device authentication apparatus may include: a display screen 1001 , a memory 1002 , a processor 1003 and a communication module 1004 . The above components may be connected via one or more communication buses 1005 .

[0267] In one embodiment, the display screen 1001 may include a display panel 10011 and a touch sensor 10012, wherein the display panel 10011 is used to display an image, and the touch sensor 10012 may pass the detected touch operation to the application processor to determine the type of touch event, and provide a visual output related to the touch operation through the display panel 10011. The processor 1003 may include one or more processing units, for example: the processor 1003 may 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. Among them, different processing units may be independent devices or integrated in one or more processors. The memory 1002 is coupled to the processor 1003 and is used to store various software programs and / or multiple sets of instructions. The memory 1002 may include a volatile memory and / or a non-volatile memory.

[0268] When the software program and / or multiple 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 the user's first operation, after discovering the second electronic device, displaying a first window, and performing a first device authentication process with the second electronic device based on the first connection, the first window includes a first button. In response to the user's second operation on the first button, identify the device state of the second electronic device, the device state of the second electronic device includes a first state and a second state. If the second electronic device is in the first state, establish the data transmission channel with the second electronic device based on the second connection. If the second electronic device is in the second state, perform a second device authentication process with the second electronic device based on the first connection, and after the second electronic device passes the authentication, establish a data transmission channel with the second electronic device based on the second connection. Among them, the first state includes that the second electronic device passes the authentication, and the second electronic device maintains the first connection with the first electronic device or can receive the broadcast response message of the other party; the second state includes that the second electronic device fails the authentication, or the second electronic device passes the authentication, and the second electronic device disconnects the first connection with the first electronic device, and cannot receive the broadcast response message of the other party.

[0269] In the device provided in the embodiment of the present application, when a user needs to use a first electronic device to perform device collaboration with a second electronic device, the first electronic device can be quickly triggered to discover the second electronic device through a first operation. After discovering the second electronic device, the first electronic device displays a first window and directly and automatically starts the first device authentication process with the second electronic device. In this way, when the user performs a second operation on the first button of the first window, if the second electronic device is in the first state, the first electronic device can directly establish a data transmission channel with the second electronic device based on the authentication result of the second electronic device passing the authentication, thereby shortening the time for the first electronic device to establish a data transmission channel with the second electronic device and improving the efficiency of device collaboration between the first electronic device and the second electronic device.

[0270] In one implementation, when the software program and / or the plurality of groups 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 in response to the second operation of the user on the first button: the device state of the second electronic device is identified according to the Bluetooth address of the second electronic device and the stored first information, the Bluetooth address of the second electronic device is obtained when the first electronic device discovers the second electronic device, and the first information includes the Bluetooth address and device state of the authenticated device. When the first information includes the Bluetooth address of the second electronic device and the authenticated device corresponding to the Bluetooth address of the second electronic device is in the first state, the second electronic device is in the first state. When the first information includes the Bluetooth address of the second electronic device and the authenticated device corresponding to the Bluetooth address of the second electronic device is in the second state, or when the first information does not include the Bluetooth address of the second electronic device, the second electronic device is in the second state. In this way, by storing the Bluetooth address and device state of the authenticated device, the first electronic device can quickly obtain the device state of the authenticated device based on the Bluetooth address when the Bluetooth address of the authenticated device is obtained, and then quickly and accurately determine the process of establishing a data transmission channel according to the device state.

[0271] In one implementation, when the software program and / or multiple groups of instructions in the memory 1002 are executed by the processor 1003, the first electronic device specifically implements the following method steps to establish a data transmission channel with the second electronic device based on the second connection if the second electronic device is in the first state: based on the first connection, the connection information of the wireless network is exchanged with the second electronic device, and the first connection is the first connection established between the first electronic device and the second electronic device, or the first electronic device determines that the first connection with the second electronic device is disconnected, and then the first connection is re-established with the second electronic device. Establish a second connection with the second electronic device according to the connection information of the wireless network. Establish a data transmission channel with the second electronic device based on the second connection. In this way, if the second electronic device is in the first state, when the first electronic device responds to the second operation of the user, it can bypass the device authentication process and establish a data transmission channel with the second electronic device, thereby improving the efficiency of establishing the data transmission channel. Moreover, the data transmission channel established based on the second connection can meet a large amount of data transmission, thereby meeting the device collaboration between the first electronic device and the second electronic device.

[0272] In one implementation, the first information also includes a device identification number ID of the authenticated device, the device ID includes a universal unique identifier UUID, and the first electronic device also stores second information, the second information includes the device ID of the authenticated device, and the device ID includes a unique device identifier UDID. When the software program and / or multiple groups of instructions in the memory 1002 are executed by the processor 1003, the first electronic device specifically implements the following method steps to realize the connection information of the wireless network exchanged with the second electronic device based on the first connection: according to the Bluetooth address of the second electronic device and the first information, the UUID of the second electronic device is obtained. According to the UUID of the second electronic device and the second information, the UDID of the second electronic device is obtained. According to the UDID of the second electronic device and the first information, the device state of the second electronic device is identified. When it is determined that the second electronic device is in the first state, the connection information of the wireless network exchanged with the second electronic device is based on the first connection. In this way, the first electronic device can accurately determine the second electronic device to establish a data transmission channel through the specified device ID, thereby ensuring the security and effectiveness of the data transmission channel.

[0273] In one implementation, the data transmission channel is an encrypted channel. If the second electronic device is in the first state, the key of the data transmission channel is obtained by the first electronic device based on the Bluetooth address of the second electronic device and the first information. The first information includes the device identity code ID of the second electronic device, and the key of the data transmission channel corresponds to the device ID of the second electronic device. In this way, if the second electronic device is in the first state, the first electronic device can directly obtain the key of the data transmission channel from the first information, and then exchange encrypted information with the second electronic device through the data transmission channel to ensure the security of data transmission.

[0274] In one implementation, when the software program and / or multiple groups of instructions in the memory 1002 are executed by the processor 1003, the first electronic device specifically implements the following method steps to implement a first device authentication process with the second electronic device based on the first connection: obtain a user account logged in by the second electronic device. Determine whether the user account logged in by the local device is the same as the user account logged in by the second electronic device. If they are the same, perform a first device authentication process with the second electronic device based on the first 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 networking operations by the first electronic device.

[0275] In one implementation, when the software program and / or multiple groups of instructions in the memory 1002 are executed by the processor 1003, the first electronic device specifically implements the following method steps to realize that in response to the user's first operation, the second electronic device is discovered, including: in response to the user bringing the first electronic device close to or touching the NFC area of ​​the second electronic device, NFC communication is established with the second electronic device. The Bluetooth address of the second electronic device is obtained from the second electronic device based on the NFC communication. In this way, the user can quickly and easily 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.

[0276] In one implementation, when the software program and / or the plurality of groups of instructions in the memory 1002 are executed by the processor 1003, the first electronic device specifically implements the following method steps to realize that in response to the first operation of the user, the second electronic device is discovered, including: in response to the user using the first electronic device to scan the QR code provided by the second electronic device, the Bluetooth address associated with the QR code is obtained. In this way, the user can quickly and easily trigger the first electronic device to discover the second electronic device by scanning the code with the first electronic device.

[0277] In one implementation, when the software program and / or multiple groups of instructions in the memory 1002 are executed by the processor 1003, the first electronic device specifically implements the following method steps to realize that in response to the user's first operation, the second electronic device is discovered, including: 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 when the Bluetooth signal strength of the device discovery request is greater than or equal to the strength threshold, the response message includes the Bluetooth address of the second electronic device. In this way, the user can quickly and easily trigger the first electronic device to discover the second electronic device by bringing the first electronic device close to the second electronic device.

[0278] In one implementation, when the software program and / or the plurality of groups of instructions in the memory 1002 are executed by the processor 1003, the first electronic device specifically implements the following method steps to realize that in response to the first operation of the user, the second electronic device is discovered, including: in response to the third operation performed by the user on the second button on the first page, a device discovery request broadcast by the second electronic device is received, 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 second operation on the second button on the second page.

[0279] In one implementation, when the software program and / or multiple groups of instructions in the memory 1002 are executed by the processor 1003, the first electronic device specifically implements the following method steps to realize that if the second electronic device is in the second state, the second device authentication process is performed with the second electronic device based on the first connection, and after the second electronic device passes the authentication, a data transmission channel is established with the second electronic device based on the second connection: Establish a first connection with the second electronic device according to the Bluetooth address of the second electronic device. Perform a second device authentication process with the second electronic device based on the first connection. After the second electronic device passes the authentication, exchange connection information of the wireless network with the second electronic device based on the first connection. Establish a second connection with the second electronic device according to the connection information of the wireless network. Establish a data transmission channel with the second electronic device based on the second connection. In this way, the first electronic device quickly starts the second device authentication process with the second electronic device in response to the second operation of the user, and no longer waits for the authentication result of the first device authentication process with the second electronic device, avoiding extra waste of time waiting for the authentication result of the first device authentication process, thereby shortening the time for the first electronic device to establish a data transmission channel with the second electronic device and improving the collaborative efficiency of the first electronic device and the second electronic device.

[0280] In one implementation, the data transmission channel is an encrypted channel. If the second electronic device is in the second state, the key of the data transmission channel is exchanged between the first electronic device and the second electronic device during the second authentication process. In this way, the first electronic device and the second electronic device can accurately obtain the key applicable to the data transmission channel established this time.

[0281] In one implementation, when the software program and / or multiple sets of instructions in the memory 1002 are executed by the processor 1003, the first electronic device specifically implements the following method steps to realize that if the second electronic device is in the second state, the first process and the second process are executed in parallel. Among them, the first process is that the first electronic device and the second electronic device perform a first device authentication process based on the first connection, and the second process is that the first electronic device and the second electronic device perform a second device authentication process based on the first connection, and after the second electronic device passes the authentication, the data transmission channel is established with the second electronic device based on the second connection. In this way, the first electronic device can establish a data transmission channel with the second electronic device based on the result of passing the authentication with the second electronic device in the second device authentication process. At the same time, the first electronic device can store the full amount of information and Bluetooth address of the second electronic device based on the result of passing the authentication with the second electronic device in the first device authentication process, so that when the second electronic device is subsequently coordinated with the second electronic device, the full amount of information of the second electronic device is directly obtained according to the Bluetooth address of the second electronic device, and the data transmission channel is established with the second electronic device based on the full amount of information of the second electronic device, without having to authenticate the device with the second electronic device again, thereby improving the efficiency of device coordination with the second electronic device.

[0282] In one implementation, when the software program and / or multiple groups 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 status of the second electronic device in response to the user's second operation on the first button: In response to the user's second operation on the first button, identify whether the business package to be executed is a business package of a collaborative service. When the business package is a business package of a collaborative service, identify the device status of the second electronic device. In this way, the first electronic device can establish a data transmission channel for the collaborative service with the second electronic device in a targeted manner.

[0283] In one implementation, when the software program and / or multiple groups of instructions in the memory 1002 are executed by the processor 1003, the first electronic device is also caused to implement the following method steps: the first electronic device displays a first window in response to a third operation performed by the user on the second 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 a second electronic device, wherein each device search result corresponds to one of the first buttons. 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.

[0284] In one implementation, the device discovery request includes a user account logged in by the second electronic device. When the software program and / or multiple groups of instructions in the memory 1002 are executed by the processor 1003, the first electronic device specifically implements the following method steps to display the first window in response to the third operation performed by the user on the second button on the first page: determine whether the user account information logged in by the local device is the same as the user account information logged in by the second electronic device. If they are the same, the first identifier 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 identifier, and then perform corresponding operations based on the device with the same account.

[0285] In one implementation, when the software program and / or multiple groups of instructions in the memory 1002 are executed by the processor 1003, the first electronic device also implements the following method steps: after the second electronic device passes the first device authentication process, the device information of the second electronic device is added to the second information, the second information includes the device information of the authenticated device, and the device information of the authenticated device includes the device status of the authenticated device. In response to the user's fourth operation, the third page is displayed according to the second information, and the second page includes the first electronic device and the interactive controls 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 controls on the second page, which can effectively simplify the user operation and improve the interactivity between the user and the first electronic device.

[0286] In one implementation, when the software program and / or multiple groups of instructions in the memory 1002 are executed by the processor 1003, the first electronic device specifically implements the following method steps to realize the display of the third page according to the second information in response to the user's fourth operation: in response to the user's fourth operation, obtain the user account logged in by the authenticated device; display the third page according to the user account information logged in by the local computer and the user account logged in by the authenticated device. Among them, the third page also includes a second identifier, and the second identifier 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 identifier, and then can perform corresponding operations based on the same account device.

[0287] Fig. 22 is a schematic diagram of another device coordination apparatus provided in an embodiment of the present application. In one embodiment, an electronic device, such as a first electronic device, can be Fig. 22 The software device shown in the figure realizes the corresponding functions. Fig. 22 As shown, the device coordination apparatus may include: a display module 2201, a first authentication module 2202, an identification module 2203, a connection module 2204, and a second authentication module 2205. Among them:

[0288] The display module 2201 is used to display a first window after discovering the second electronic device in response to the first operation of the user, and the first window includes a first button. The first authentication module 2202 is used to perform a first device authentication process with the second electronic device based on the first connection after discovering the second electronic device. The identification module 2203 is used to identify the device state of the second electronic device in response to the second operation of the user on the first button, and the device state of the second electronic device includes a first state and a second state. The connection module 2204 is used to establish the data transmission channel with the second electronic device based on the second connection if the second electronic device is in the first state. The second authentication module 2205 is used to perform a second device authentication process with the second electronic device based on the first connection if the second electronic device is in the second state. The connection module 2204 is also used to establish a data transmission channel with the second electronic device based on the second connection after the second electronic device passes the authentication. Among them, the first state includes that the second electronic device passes the authentication, and the second electronic device maintains the first connection with the first electronic device or can receive the broadcast response message of the other party; the second state includes that the second electronic device fails the authentication, or the second electronic device passes the authentication, and the second electronic device disconnects the first connection with the first electronic device, and cannot receive the broadcast response message of the other party.

[0289] In the device provided in the embodiment of the present application, when a user needs to use a first electronic device to perform device collaboration with a second electronic device, the first electronic device can be quickly triggered to discover the second electronic device through a first operation. After discovering the second electronic device, the first electronic device displays a first window and directly and automatically starts the first device authentication process with the second electronic device. In this way, when the user performs a second operation on the first button of the first window, if the second electronic device is in the first state, the first electronic device can directly establish a data transmission channel with the second electronic device based on the authentication result of the second electronic device passing the authentication, thereby shortening the time for the first electronic device to establish a data transmission channel with the second electronic device and improving the efficiency of device collaboration between the first electronic device and the second electronic device.

[0290] In one implementation, a storage module 2206 is also included for storing the first information. The identification module 2203 is specifically used to: identify the device state of the second electronic device according to the Bluetooth address of the second electronic device and the stored first information, the Bluetooth address of the second electronic device is obtained when the first electronic device discovers the second electronic device, and the first information includes the Bluetooth address and device state of the authenticated device. When the first information includes the Bluetooth address of the second electronic device, and the authenticated device corresponding to the Bluetooth address of the second electronic device is in the first state, the second electronic device is in the first state. When the first information includes the Bluetooth address of the second electronic device, and the authenticated device corresponding to the Bluetooth address of the second electronic device is in the second state, or when the first information does not include the Bluetooth address of the second electronic device, the second electronic device is in the second state. In this way, by storing the Bluetooth address and device state of the authenticated device, the first electronic device can quickly obtain the device state of the authenticated device based on the Bluetooth address when the Bluetooth address of the authenticated device is obtained, and then quickly and accurately determine the process of establishing a data transmission channel according to the device state.

[0291] In one implementation, the connection module 2204 is specifically used to: based on the first connection, exchange the connection information of the wireless network with the second electronic device, the first connection is the first connection established between the first electronic device and the second electronic device, or the first electronic device determines to disconnect the first connection with the second electronic device and then re-establish the first connection with the second electronic device. Establish a second connection with the second electronic device according to the connection information of the wireless network. Establish a data transmission channel with the second electronic device based on the second connection. In this way, if the second electronic device is in the first state, the first electronic device can bypass the device authentication process and establish a data transmission channel with the second electronic device in response to the second operation of the user, thereby improving the efficiency of establishing the data transmission channel. Moreover, the data transmission channel established based on the second connection can meet a larger data transmission volume, thereby meeting the device collaboration between the first electronic device and the second electronic device.

[0292] In one implementation, the first information also includes a device identity number ID of the authenticated device, the device ID includes a universal unique identifier UUID, the first electronic device also stores second information, the second information includes the device ID of the authenticated device, the device ID includes a unique device identifier UDID, and the connection module 2204 is specifically used to: obtain the UUID of the second electronic device according to the Bluetooth address of the second electronic device and the first information. Obtain the UDID of the second electronic device according to the UUID of the second electronic device and the second information. Identify the device status of the second electronic device according to the UDID of the second electronic device and the first information. When it is determined that the second electronic device is in the first state, the connection information of the wireless network is exchanged with the second electronic device based on the first connection. In this way, the first electronic device can accurately determine the second electronic device to establish a data transmission channel through the specified device ID, thereby ensuring the security and effectiveness of the data transmission channel.

[0293] In one implementation, the data transmission channel is an encrypted channel. If the second electronic device is in the first state, the key of the data transmission channel is obtained by the first electronic device based on the Bluetooth address of the second electronic device and the first information. The first information includes the device identity code ID of the second electronic device, and the key of the data transmission channel corresponds to the device ID of the second electronic device. In this way, if the second electronic device is in the first state, the first electronic device can directly obtain the key of the data transmission channel from the first information, and then exchange encrypted information with the second electronic device through the data transmission channel to ensure the security of data transmission.

[0294] In one implementation, the first authentication module 2202 is specifically used to: obtain a user account logged in by the second electronic device. Determine whether the user account logged in by the local device is the same as the user account logged in by the second electronic device. If they are the same, perform a first device authentication process with the second electronic device based on the first 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, so as to ensure device security and avoid invalid networking operations of the first electronic device.

[0295] In one implementation, a response module 2207 is also included, which is used to establish 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 Bluetooth address of the second electronic device is obtained from the second electronic device based on the NFC communication. In this way, the user can quickly and easily 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.

[0296] In one implementation, the response module 2207 is further configured to: in response to the user using the first electronic device to scan the QR code provided by the second electronic device, obtain the Bluetooth address associated with the QR code. In this way, the user can quickly and easily trigger the first electronic device to discover the second electronic device by scanning the code with the first electronic device.

[0297] In one implementation, the response module 2207 is further used to: broadcast a device discovery request. In response to the user bringing the first electronic device close to the second electronic device, 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 the strength threshold is received, and the response message includes the Bluetooth address of the second electronic device. In this way, the user can quickly and easily trigger the first electronic device to discover the second electronic device by bringing the first electronic device close to the second electronic device.

[0298] In one implementation, the response module 2207 is further used to: in response to a third operation performed by the user on the second button on the first page, receive 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 easily trigger the first electronic device to discover the second electronic device by performing the second operation on the second button on the second page.

[0299] In one implementation, the second authentication module 2205 is specifically used to: establish a first connection with the second electronic device according to the Bluetooth address of the second electronic device. Perform a second device authentication process with the second electronic device based on the first connection. The connection module 2204 is specifically used to: after the second electronic device passes the authentication, exchange the connection information of the wireless network with the second electronic device based on the first connection. Establish a second connection with the second electronic device according to the connection information of the wireless network. Establish a data transmission channel with the second electronic device based on the second connection. In this way, the first electronic device responds to the second operation of the user, quickly starts the second device authentication process with the second electronic device, and no longer waits for the authentication result of the first device authentication process with the second electronic device, avoiding extra waste of time waiting for the authentication result of the first device authentication process, thereby shortening the time for the first electronic device to establish a data transmission channel with the second electronic device and improving the collaborative efficiency of the first electronic device and the second electronic device.

[0300] In one implementation, the data transmission channel is an encrypted channel. If the second electronic device is in the second state, the key of the data transmission channel is exchanged between the first electronic device and the second electronic device during the second authentication process. In this way, the first electronic device and the second electronic device can accurately obtain the key applicable to the data transmission channel established this time.

[0301] In one implementation, the first authentication module 2202, the connection module 2204, and the second authentication module 2205 are specifically used to: if the second electronic device is in the second state, the first process and the second process are executed in parallel. Among them, the first process is that the first electronic device and the second electronic device perform the first device authentication process based on the first connection, and the second process is that the first electronic device and the second electronic device perform the second device authentication process based on the first connection, and after the second electronic device passes the authentication, the data transmission channel is established with the second electronic device based on the second connection. In this way, the first electronic device can establish a data transmission channel with the second electronic device based on the result of passing the authentication with the second electronic device in the second device authentication process. At the same time, the first electronic device can store the full amount information and Bluetooth address of the second electronic device based on the result of passing the authentication with the second electronic device in the first device authentication process, so that when the second electronic device is subsequently coordinated with the second electronic device, the full amount information of the second electronic device is directly obtained according to the Bluetooth address of the second electronic device, and the data transmission channel is established with the second electronic device based on the full amount information of the second electronic device, without having to authenticate the device with the second electronic device again, thereby improving the efficiency of device coordination with the second electronic device.

[0302] In one implementation, the identification module 2203 is specifically used to: in response to the user's second operation on the first button, identify whether the business package to be executed is a business package of the collaborative service. When the business package is a business package of the collaborative service, identify the device state of the second electronic device. In this way, the first electronic device can establish a data transmission channel for the collaborative service and the second electronic device in a targeted manner.

[0303] In one implementation, the display module 2201 is specifically used to: in response to the user performing a third operation on the second button on the first page, display the first window. The first window is a first area on the second page for displaying device search results, and the device search results include second electronic devices, wherein each device search result corresponds to a first 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.

[0304] In one implementation, the device discovery request includes a user account logged in by the second electronic device, and the display module 2201 is specifically used to determine whether the user account information logged in by the local device is the same as the user account information logged in by the second electronic device. If they are the same, the first identifier 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 identifier, and then perform corresponding operations based on the device with the same account.

[0305] In one implementation, the storage module 2206 is specifically used to: after the second electronic device passes the first device authentication process, add the device information of the second electronic device to the second information, the second information includes the device information of the authenticated device, and the device information of the authenticated device includes the device status of the authenticated device. The display module 2201 is specifically used to: in response to the user's fourth operation, display the third page according to the second information, the second page includes the first electronic device and the interactive controls 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 controls on the second page, which can effectively simplify the user operation and improve the interactivity between the user and the first electronic device.

[0306] In one implementation, the display module 2201 is specifically used to: in response to the user's fourth operation, obtain the user account logged in by the authenticated device; and display the third page according to the user account information logged in by the local device and the user account logged in by the authenticated device. The third page also includes a second identifier, and the second identifier 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 identifier, and then perform corresponding operations based on the device with the same account.

[0307] The above specific implementation methods further explain in detail the purpose, technical solutions and beneficial effects of the embodiments of the present application. It should be understood that the above are only specific implementation methods of the embodiments of the present application and are not used to limit the protection scope of the embodiments of the present application. Any modifications, equivalent substitutions, improvements, 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 collaboration method, characterized in that: The method comprises: The first electronic device, in response to a first operation of a user, displays a first window after discovering a second electronic device, and performs a first device authentication process with the second electronic device based on a first connection, wherein the first window includes a first button; The first electronic device identifies, in response to a second operation of the user on the first button, a device state of the second electronic device, wherein the device state of the second electronic device includes a first state and a second state; If the second electronic device is in the first state, the first electronic device and the second electronic device establish the data transmission channel based on a second connection; If the second electronic device is in the second state, the first electronic device and the second electronic device perform a second device authentication process based on the first connection, and after the second electronic device passes the authentication, the first electronic device and the second electronic device establish the data transmission channel based on the second connection; Among them, the first state includes that the second electronic device passes the authentication, and the second electronic device maintains a first connection with the first electronic device or can receive the other party's broadcast response message; the second state includes that the second electronic device fails the authentication, or the second electronic device passes the authentication, and the second electronic device disconnects the first connection with the first electronic device and cannot receive the other party's broadcast response message.

2. The device coordination method according to claim 1, characterized in that: The first electronic device identifies the device state of the second electronic device in response to a second operation of the user on the first button, including: The first electronic device identifies the device status of the second electronic device according to the Bluetooth address of the second electronic device and the stored first information, the Bluetooth address of the second electronic device is obtained when the first electronic device discovers the second electronic device, and the first information includes the Bluetooth address and device status of the authenticated device; When the first information includes the Bluetooth address of the second electronic device, and the authenticated device corresponding to the Bluetooth address of the second electronic device is in the first state, the second electronic device is in the first state; When the first information includes the Bluetooth address of the second electronic device and the authenticated device corresponding to the Bluetooth address of the second electronic device is in the second state, or when the first information does not include the Bluetooth address of the second electronic device, the second electronic device is in the second state.

3. The device coordination method according to claim 2, characterized in that: If the second electronic device is in the first state, the first electronic device and the second electronic device establish the data transmission channel based on the second connection, including: The first electronic device exchanges connection information of a wireless network with the second electronic device based on a first connection, where the first connection is a first connection established between the first electronic device and the second electronic device, or a first connection re-established between the first electronic device and the second electronic device after the first electronic device determines to disconnect the first connection with the second electronic device; The first electronic device establishes a second connection with the second electronic device according to the connection information of the wireless network; The first electronic device establishes the data transmission channel with the second electronic device based on the second connection.

4. The device coordination method according to claim 3, characterized in that: The first information also includes a device identification number ID of the authenticated device, the device ID includes a universal unique identifier UUID, the first electronic device also stores second information, the second information includes the device ID of the authenticated device, the device ID includes a unique device identifier UDID, and the connection information of the first electronic device exchanging a wireless network with the second electronic device based on the first connection includes: The first electronic device acquires the UUID of the second electronic device according to the Bluetooth address of the second electronic device and the first information; The first electronic device acquires the UDID of the second electronic device according to the UUID of the second electronic device and the second information; The first electronic device identifies a device status of the second electronic device according to the UDID of the second electronic device and the first information; When determining that the second electronic device is in the first state, the first electronic device exchanges wireless network connection information with the second electronic device based on the first connection.

5. The device coordination method according to claim 2, characterized in that: The data transmission channel is an encrypted path, wherein, if the second electronic device is in the first state, the key of the data transmission channel is obtained by the first electronic device based on the Bluetooth address of the second electronic device and the first information, the first information includes the device identity identification code ID of the second electronic device, and the key of the data transmission channel corresponds to the device ID of the second electronic device.

6. The device coordination method according to claim 1, characterized in that: The first electronic device and the second electronic device perform a first device authentication process based on the first connection, including: The first electronic device obtains a user account logged in by the second electronic device; The first electronic device determines whether a user account logged in by the first electronic device is the same as a user account logged in by the second electronic device; If they are the same, the first electronic device and the second electronic device perform the first device authentication process based on the first connection.

7. The device coordination method according to any one of claims 1 to 6, characterized in that: The first electronic device discovers, in response to a first operation by a user, that the second electronic device includes: 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 acquires a Bluetooth address of the second electronic device from the second electronic device based on the NFC communication.

8. The device coordination method according to any one of claims 1 to 6, characterized in that: The first electronic device discovers, in response to a first operation by a user, that the second electronic device includes: In response to a user using the first electronic device to scan a two-dimensional code provided by the second electronic device, the first electronic device obtains a Bluetooth address associated with the two-dimensional code.

9. The device coordination method according to any one of claims 1 to 6, characterized in that: The first electronic device discovers, in response to a first operation by a user, that the second electronic device includes: The first electronic device broadcasts a device discovery request; In response to a user bringing 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 including the Bluetooth address of the second electronic device.

10. The device coordination method according to any one of claims 1 to 6, characterized in that: The first electronic device discovers, in response to a first operation by a user, that the second electronic device includes: In response to a third operation performed by the user on a second button on the first page, the first electronic device receives a device discovery request broadcast by the second electronic device, where the device discovery request includes a Bluetooth address of the second electronic device.

11. The device coordination method according to claim 2, characterized in that: If the second electronic device is in the second state, the first electronic device and the second electronic device perform a second device authentication process based on the first connection, and after the second electronic device passes the authentication, the first electronic device and the second electronic device establish the data transmission channel based on the second connection, including: The first electronic device establishes a first connection with the second electronic device according to the Bluetooth address of the second electronic device; The first electronic device and the second electronic device perform a second device authentication process based on the first connection; After the second electronic device passes the authentication, the first electronic device exchanges wireless network connection information with the second electronic device based on the first connection; The first electronic device establishes a second connection with the second electronic device according to the connection information of the wireless network; The first electronic device establishes the data transmission channel with the second electronic device based on the second connection.

12. The device coordination method according to claim 2, characterized in that: The data transmission channel is an encrypted path, wherein if the second electronic device is in the second state, the key of the data transmission channel is exchanged between the first electronic device and the second electronic device during the second authentication process.

13. The device coordination method according to any one of claims 1, 11-12, characterized in that: If the second electronic device is in the second state, the first electronic device executes the first process and the second process in parallel; Among them, the first process is that the first electronic device and the second electronic device perform the first device authentication process based on the first connection, and the second process is that the first electronic device and the second electronic device perform the second device authentication process based on the first connection, and after the second electronic device passes the authentication, the data transmission channel is established with the second electronic device based on the second connection.

14. The device coordination method according to claim 1, characterized in that: The first electronic device identifies the device state of the second electronic device in response to a second operation of the user on the first button, including: The first electronic device identifies, in response to a second operation of the user on the first button, whether the service package to be executed is a service package of the collaborative service; When the service package is a service package of the collaborative service, the first electronic device identifies a device state of the second electronic device.

15. The device coordination method according to claim 10, characterized in that: Also includes: The first electronic device displays the first window in response to a third operation performed by the user on a second button on the first page, where 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 one of the first buttons.

16. The device coordination method according to claim 15, characterized in that: The device discovery request includes a user account logged in by the second electronic device, and the first electronic device displays the first window in response to a third operation performed by the user on a second button on the first page, including: The first electronic device determines 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 they are the same, the first electronic device displays the first identifier on the second electronic device when displaying the first window.

17. The device coordination method according to claim 13, characterized in that: Also includes: After the second electronic device passes the first device authentication process, the first electronic device adds device information of the second electronic device to second information, wherein the second information includes device information of the authenticated device, and the device information of the authenticated device includes a device status of the authenticated device; The first electronic device displays a third page according to the second information in response to a fourth operation of the user, where the second page includes interactive controls of the first electronic device and the authenticated device in the first state.

18. The device coordination method according to claim 17, characterized in that: The first electronic device displays a third page according to the second information in response to a fourth operation of the user, including: In response to a fourth operation of the user, the first electronic device obtains the user account logged in by the authenticated device; The first electronic device displays the third page based on the user account information of the local device and the user account of the authenticated device, wherein the third page also includes a second identifier, which is located on an interactive control of the authenticated device with the same user account as that of the first electronic device.

19. An electronic device, characterized in that: include: A processor and a memory; the memory stores program instructions, and when the program instructions are executed by the processor, the electronic device executes the device collaboration method described in any one of claims 1-18.

Citation Information

Patent Citations

  • Equipment interconnection security authentication system, method and device, server and medium

    CN114866251A

  • Method and apparatus for providing communication service

    US20200404501A1

  • Bluetooth connection method and electronic apparatus

    WO2021037208A1