Data transmission method and device

By determining the main device and other devices in the terminal device to establish a physical link, the problem of connection conflicts in WiFi direct connection is solved, and the service success rate and user experience are improved.

CN120264499APending Publication Date: 2025-07-04HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311840355.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-27
Publication Date
2025-07-04

AI Technical Summary

Technical Problem

When a terminal device establishes a direct WiFi connection with multiple devices, it may lead to a conflict in connection and lead to a poor user experience.

Method used

By determining the master device in the first device and the multiple devices, the master device establishes a physical link with the remaining devices, reducing connection conflicts and improving service success rate.

Benefits of technology

Effectively reduce connection conflicts, improve the success rate of business establishment between terminal devices, and enhance user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120264499A_ABST
    Figure CN120264499A_ABST
Patent Text Reader

Abstract

The invention provides a data transmission method and device, and relates to the technical field of terminals. The scene of connection conflict generated in the process of establishing services between the first device and multiple devices can be reduced, and the user experience is improved. The method comprises the following steps: first equipment discovers online equipment, wherein the online equipment comprises second equipment and third equipment; the first device determines a master device from the first device and the online device in response to an operation of establishing a first service with the online device indicated by a user; the first device instructs the master device to establish a physical link with other devices, the other devices are devices except the master device in the online device and the first device, and the first device is not the master device; or, the first device establishes physical links with the second device and the third device, and the first device is the main device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of terminals, and in particular, to a data transmission method and apparatus. Background Art

[0002] Multiple terminal devices can implement various services between terminal devices through the wireless fidelity (WiFi) direct connection technology. For example, multi-screen collaboration, mouse and keyboard sharing, and other services between terminal devices can be implemented through technologies such as peer-to-peer (P2P) direct connection, WiFi wireless access point (AP) and station (STA) connection.

[0003] Among them, multiple terminal devices that establish a WiFi direct connection can be referred to as a group. For example, multiple terminal devices that establish a P2P direct connection can be referred to as a P2P group; a group formed by multiple terminal devices that establish a WiFi AP-STA connection can be referred to as an AP-STA group. However, when a terminal device establishes a WiFi direct connection with multiple terminal devices, connection conflicts may occur. Exemplarily, the terminal device can only establish a physical link with some of the multiple terminal devices, and fails to establish a physical link with the remaining terminal devices, so that the terminal device cannot establish services with multiple terminal devices simultaneously, resulting in a poor user experience. Summary of the Invention

[0004] This application provides a data transmission method and apparatus, which can reduce the scenario of connection conflicts generated during the process of a first device establishing services with multiple devices, thereby improving the user experience.

[0005] In a first aspect, a data transmission method is provided. The method includes: a first device discovers online devices, where the online devices include a second device and a third device; in response to an operation of establishing a first service with the online devices indicated by a user, the first device determines a master device from the first device and the online devices; the first device instructs the master device to establish a physical link with the remaining devices, where the remaining devices are devices other than the master device among the online devices and the first device, and the first device is not the master device; or, the first device respectively establishes a physical link with the second device and the third device, and the first device is the master device.

[0006] In the data transmission method of the present application, when the first device needs to establish a first service with multiple devices, the first device can determine the master device among the first device and the multiple devices, so that the master device can establish a physical link with the remaining devices. In this way, compared with the first device first determining the master device in one of the multiple devices and the first device to form a group, and then enabling the other devices among the multiple devices to join the group in turn, the first device can determine a master device that is conducive to forming a group of the first device and the multiple devices among the first device and the multiple devices, which can reduce the scenarios of connection conflicts, thereby improving the success rate of establishing the first service between the first device and the multiple devices, and further improving the user experience.

[0007] It should be understood that the second device and the third device can be some or all of the online devices discovered by the first device. The second device and / or the third device can refer to one or more devices.

[0008] Among them, the first service can be understood as global collection. When the first device is the master device, the first device can be understood as device 1 in the following text, the second device can be understood as device 2 in the following text, and the third device can be understood as device 3 in the following text. When the first device is not the master device, the second device or the third device is the master device, and the first device can be understood as the second terminal device in the following text, that is, one of the second device or the third device that is the master device can be understood as the first terminal device in the following text, and one of the second device or the third device that is not the master device can be understood as the third terminal device in the following text; or, the first device can be understood as device 4 in the following text, that is, one of the second device or the third device that is the master device can be understood as device 6 in the following text, and one of the second device or the third device that is not the master device can be understood as device 5 in the following text.

[0009] In combination with the first aspect, in some implementation manners of the first aspect, after the first device instructs the master device to establish a physical link with the remaining devices, the method further includes: receiving first information from the master device, where the first information is used to indicate that the physical link between the master device and the remaining devices is established; in response to the first information, the first device establishes a first service with the online devices. In this way, the first device can establish a first service with the online devices after the master device establishes a physical link with the remaining devices.

[0010] Among them, the first device can be understood as the second terminal device in the following text, the master device can be understood as the first terminal device in the following text, and the online devices can be understood as the second terminal device and the third terminal device in the following text. The first information can be understood as the information sent by the first terminal device to the second terminal device to indicate the success of global networking. The first service can be understood as global collection.

[0011] In combination with the first aspect, in certain implementations of the first aspect, after the first device establishes a first service with an online device, the method further includes: sending information for indicating exiting a first state to the master device, where the first state is the state in which the master device establishes a physical link with the remaining devices; receiving a first response from the master device and exiting the first state.

[0012] It should be understood that when the first device, the second device, and the third device are in the first state, the first device, the second device, and the third device may not process connection requests from other devices, thereby improving the success rate of global networking. In the above manner, after the first device, the second device, and the third device exit the first state, the first device, the second device, and the third device can continue to process connection requests from other devices.

[0013] Among them, the first device can be understood as the second terminal device in the following text, the master device can be understood as the first terminal device in the following text, and the first state can be understood as the state of global networking in the following text. The first response can be understood as response 1 in the following text.

[0014] In combination with the first aspect, in certain implementations of the first aspect, after the first device establishes physical links with the second device and the third device respectively, the method further includes: the first device establishing a first service with an online device.

[0015] The first device establishing a first service with an online device can be understood as the intelligent interconnection of the first device sending the data of the first service to the intelligent interconnection of the second device, and the intelligent interconnection of the first device sending the data of the first service to the intelligent interconnection of the third device.

[0016] Among them, the first device can be understood as device 1 in the following text, the online device can be understood as device 2 and device 3 in the following text. The first service can be understood as global collection in the following text.

[0017] In combination with the first aspect, in certain implementations of the first aspect, after the first device establishes a first service with an online device, the method further includes: the first device respectively receiving information for indicating exiting a first state from the second device and the third device, where the first state is the state in which the master device establishes a physical link with the remaining devices; in response to the information for indicating exiting the first state from the second device and the third device, the first device exits the first state.

[0018] Among them, the first device can be understood as device 1 in the following text, the second device can be understood as device 2 in the following text, and the third device can be understood as device 3 in the following text. The first service can be understood as global collection in the following text. The first state can be understood as the state of global networking in the following text.

[0019] In combination with the first aspect, in some implementations of the first aspect, for the first device to establish a first service with an online device, it includes: the first device establishing a first transmission channel with a second device; the first device sending data of the first service to the second device using the first transmission channel; the first device establishing a second transmission channel with a third device; the first device sending data of the first service to the third device using the second transmission channel.

[0020] Among them, when the first device is the master device, the first device can be understood as device 1 in the following text, the second device can be understood as device 2 in the following text, and the third device can be understood as device 3 in the following text. When the first device is not the master device, the second device or the third device is the master device. The first device can be understood as the second terminal device in the following text, that is, one of the second device or the third device that is the master device can be understood as the first terminal device in the following text, and one of the second device or the third device that is not the master device can be understood as the third terminal device in the following text. The first service can be understood as global collection, and the data of the first service can be understood as the files collected by the second terminal device or device 1.

[0021] In combination with the first aspect, in some implementations of the first aspect, for the first device to establish a first transmission channel with the second device, it includes: the first device sending information for indicating multiplexing a physical link to the second device; receiving information from the second device for indicating successful physical link multiplexing, and the information for indicating successful physical link multiplexing carries information for indicating the Internet Protocol (IP) of the second device; in response to the information for indicating successful physical link multiplexing, sending information for indicating establishing a transmission channel to the second device, and the information for indicating establishing a transmission channel carries information for indicating the IP of the first device; receiving information from the second device for indicating successful establishment of the transmission channel.

[0022] Among them, the first transmission channel is established using the IP of the first device and the IP of the second device. The first device can be understood as the second terminal device in the following text, and the second device can be understood as the first terminal device in the following text. The information for indicating successful physical link multiplexing can be understood as the physical link multiplexing response in the following text.

[0023] In combination with the first aspect, in some implementations of the first aspect, the master device satisfies one or more of the following conditions: the master device is set with the ability to be the master device in a group; or, the master device is the device with the largest Media Access Control (MAC) address among the first device and the online device; or, the master device is the device with the minimum power consumption per unit time among the first device and the online device; the master device belongs to the master device in the first group, and the first group is a group established by the first device before determining the master device from the first device and the online device; or, the master device is a plugged-in device.

[0024] When selecting a device with the ability to be the master device in a group as the master device, it is convenient to improve the success rate of forming a new group; select the device with the lowest power consumption per unit time and / or select a plugged-in device, so that the master device has a lower sensitivity to power consumption. Since the power consumption of the master device may be relatively large, this can reduce the situation of group disbanding caused by insufficient power of the master device. Selecting the device with the largest MAC address allows more types of devices to connect to this master device. Since the master device in the first group is the master device selected when forming the first group, therefore, the master device of the first group may meet one or more of the above rules. Therefore, the first device can directly determine the master device in the first group as the master device.

[0025] The first group can be, for example, a group established by the second device and the third device before the first device determines the master device.

[0026] Among them, the master device can be understood as the first terminal device in the following text, and the first device can be understood as the second terminal device in the following text. The conditions satisfied by the master device can be understood as the rules for the second terminal device to determine the GO in the following text.

[0027] Combined with the first aspect, in some implementation manners of the first aspect, the first device includes a first intelligent interconnection and a first WiFi connection module; the first device determines the master device from the first device and the online devices, including: the first intelligent interconnection sends information indicating the first device and the online devices to the first WiFi connection module; the first WiFi connection module determines the master device from the first device and the online devices.

[0028] Among them, the first device can be understood as the second terminal device in the following text. The first intelligent interconnection can be understood as the intelligent interconnection of the second terminal device in the following text, and the first WiFi connection module can be understood as the WiFi connection module of the second terminal device in the following text.

[0029] Combined with the first aspect, in some implementation manners of the first aspect, the master device includes a second WiFi connection module; the first device instructs the master device to establish a physical link with the remaining devices, including: the first WiFi connection module sends information indicating global networking to the second WiFi connection module, and the information indicating global networking carries information indicating each of the remaining devices, and global networking means that the master device establishes a physical link with the remaining devices.

[0030] Among them, the first device can be understood as the second terminal device in the following text. The first intelligent interconnection can be understood as the intelligent interconnection of the second terminal device in the following text, and the first WiFi connection module can be understood as the WiFi connection module of the second terminal device in the following text. The master device can be understood as the first terminal device in the following text, and the second WiFi connection module can be understood as the WiFi connection module of the first terminal device in the following text.

[0031] In combination with the first aspect, in some implementation manners of the first aspect, the physical link between the master device and the first device is established through the first WiFi connection module and the second WiFi connection module.

[0032] Among them, the first device can be understood as the second terminal device in the following text. The first intelligent interconnection can be understood as the intelligent interconnection of the second terminal device in the following text, and the first WiFi connection module can be understood as the WiFi connection module of the second terminal device in the following text. The master device can be understood as the first terminal device in the following text, and the second WiFi connection module can be understood as the WiFi connection module of the first terminal device in the following text.

[0033] In a second aspect, a data transmission device is provided for executing the method in any one of the possible implementation manners of the first aspect. Specifically, the device includes a module for executing the method in any one of the possible implementation manners of the first aspect.

[0034] In a third aspect, an embodiment of the present application provides a data transmission device. The data transmission device can be an electronic device, or a chip or a chip system inside the electronic device. The data transmission device can include a display unit and a processing unit. When the data transmission device is an electronic device, the display unit here can be a display screen. The display unit is used to execute the display step so that the electronic device implements a data transmission method described in the first aspect or any one of the possible implementation manners of the first aspect. When the data transmission device is an electronic device, the processing unit can be a processor. The data transmission device can further include a storage unit, and the storage unit can be a memory. The storage unit is used to store instructions, and the processing unit executes the instructions stored in the storage unit so that the electronic device implements a data transmission method described in the first aspect or any one of the possible implementation manners of the first aspect. When the data transmission device is a chip or a chip system inside the electronic device, the processing unit can be a processor. The processing unit executes the instructions stored in the storage unit so that the electronic device implements a data transmission method described in the first aspect or any one of the possible implementation manners of the first aspect. The storage unit can be a storage unit inside the chip (for example, a register, a cache, etc.), or a storage unit outside the chip inside the electronic device (for example, a read-only memory, a random access memory, etc.).

[0035] Exemplarily, assume that the device is a first device, which includes a discovery unit and a processing unit. The discovery unit is used to discover the online devices. The processing unit is used to determine the master device.

[0036] In a possible implementation, the processing unit is further used to instruct the master device to establish a physical link with the remaining devices.

[0037] In a fourth aspect, an embodiment of the present application provides an electronic device, including a processor and a memory. The memory is used to store code instructions, and the processor is used to run the code instructions to execute the method described in the first aspect or any possible implementation manner of the first aspect.

[0038] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program or instruction is stored. When the computer program or instruction runs on a computer, the computer is caused to execute the method described in the first aspect or any possible implementation manner of the first aspect.

[0039] In a sixth aspect, an embodiment of the present application provides a computer program product including a computer program. When the computer program runs on a computer, the computer is caused to execute the method described in the first aspect or any possible implementation manner of the first aspect.

[0040] In a seventh aspect, the present application provides a chip or a chip system. The chip or the chip system includes at least one processor and a communication interface. The communication interface and the at least one processor are interconnected by a line. The at least one processor is used to run a computer program or instruction to execute the method described in the first aspect or any possible implementation manner of the first aspect. Among them, the communication interface in the chip can be an input / output interface, a pin, a circuit, etc.

[0041] In a possible implementation, the chip or the chip system described above in the present application further includes at least one memory, and instructions are stored in the at least one memory. The memory can be an internal storage unit of the chip, such as a register, a cache, etc., or a storage unit of the chip (such as a read-only memory, a random access memory, etc.).

[0042] It should be understood that the second to seventh aspects of the present application correspond to the technical solutions of the first aspect of the present application. The beneficial effects obtained by each aspect and the corresponding feasible implementation manners are similar and will not be elaborated herein. Description of the Drawings

[0043] Figure 1 It is a schematic diagram of the interface of the first terminal device provided by the embodiment of the present application;

[0044] Figure 2 Schematic diagram of the interface of the second terminal device provided by the embodiment of the present application;

[0045] Figure 3 Schematic diagram of the interface of the third terminal device provided by the embodiment of the present application;

[0046] Figure 4 Schematic diagram of the interface of the fourth terminal device provided by the embodiment of the present application;

[0047] Figure 5 Schematic diagram of the interface of the fifth terminal device provided by the embodiment of the present application;

[0048] Figure 6 Schematic diagram of the interface of the sixth terminal device provided by the embodiment of the present application;

[0049] Figure 7 Schematic diagram of the interface of the seventh terminal device provided by the embodiment of the present application;

[0050] Figure 8 Schematic diagram of the physical link and transmission channel provided by the embodiment of the present application;

[0051] Figure 9 Flow chart of the process of establishing a global collection between a mobile phone and a tablet computer in a method for establishing a global collection;

[0052] Figure 10 Flow chart of the process of a mobile phone determining a connection conflict in a method for establishing a global collection;

[0053] Figure 11 Schematic block diagram of the structure of a terminal device provided by the embodiment of the present application;

[0054] Figure 12 Schematic diagram of the software structure of a terminal device provided by the embodiment of the present application;

[0055] Figure 13 Schematic diagram of the software structure of another terminal device provided by the embodiment of the present application;

[0056] Figure 14 Flow chart of the process of device discovery and establishing a global collection in a data transmission method provided by the embodiment of the present application;

[0057] Figure 15 Flow chart of the process of exiting the global networking state in a data transmission method provided by the embodiment of the present application;

[0058] Figure 16 Flow chart of another data transmission method provided by the embodiment of the present application;

[0059] Figure 17 Schematic flowchart of another data transmission method provided by an embodiment of this application;

[0060] Figure 18 Schematic block diagram of a data transmission device provided by an embodiment of this application. Detailed implementation manners

[0061] Next, the technical solutions in this application will be described with reference to the accompanying drawings.

[0062] In the embodiments of this application, terms such as "first" and "second" are used to distinguish identical or similar items with basically the same functions and effects. For example, the first value and the second value are only used to distinguish different values, and do not limit their order. Those skilled in the art can understand that terms such as "first" and "second" do not limit the quantity and execution order, and terms such as "first" and "second" do not necessarily mean different.

[0063] It should be noted that in the embodiments of this application, words such as "exemplarily" or "for example" are used to give examples, illustrations or explanations. Any embodiment or design solution described as "exemplarily" or "for example" in this application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Rather, the use of words such as "exemplarily" or "for example" is intended to present related concepts in a specific manner.

[0064] In the embodiments of this application, "at least one" means one or more, and "a plurality" means two or more. "And / or" describes the association relationship of associated objects and indicates that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone, where A and B may be singular or plural. The character " / " generally represents an "or" relationship between the associated objects before and after. "At least one (item)" or its similar expression below refers to any combination of these items, including any combination of single item (item) or plural items (items). For example, at least one (item) of a, b, or c may represent: a, b, c, a - b, a - c, b - c, or a - b - c, where a, b, and c may be single or multiple.

[0065] To facilitate a clear description of the technical solutions of the embodiments of this application, the following briefly introduces some terms and technologies involved in the embodiments of this application:

[0066] 1. A terminal device can be referred to as a terminal, user equipment (UE), mobile station (MS), mobile terminal (MT), etc. For example, the terminal device can be a mobile phone, smart TV, wearable device, tablet computer (Pad), a computer with wireless transceiver function, virtual reality (VR) terminal device, augmented reality (AR) terminal device, wireless terminal in industrial control, wireless terminal in self-driving, wireless terminal in remote medical surgery, wireless terminal in smart grid, wireless terminal in transportation safety, wireless terminal in smart city, wireless terminal in smart home, and so on. Embodiments of the present application do not limit the specific technologies and specific device forms adopted by the terminal device.

[0067] 2. Peer-to-peer (P2P) direct connection, also known as wireless fidelity (WiFi) direct connection, is a type of WiFi direct connection technology and an important technology under the "WiFi DIRECT" standard protocol launched by the WiFi Alliance. Through WiFi P2P, two WiFi devices can directly connect and communicate with the peer device without the intervention of WiFi.

[0068] Establishing a P2P direct connection between terminal devices usually requires the following four processes: WiFi P2P device discovery process, group formation process, WiFi protected setup (WPS) process, and association connection process. Through these four processes, multiple terminal devices that establish a P2P direct connection form a P2P group. The P2P group can also be referred to as a WiFi P2P group, etc. The terminal devices in the P2P group are each one of two roles: group owner (GO) and group client (GC). Among them, the number of GOs can be one, and the GCs establish P2P connections with the GO respectively.

[0069] 3. The WiFi wireless access point (AP) and station (STA) technology, also known as the WiFi AP-STA technology, is a type of WiFi direct connection technology. Similar to P2P direct connection, it is also a technology for enabling connection and communication between terminal devices. The roles of the terminal devices in the AP-STA group are either AP or STA. In the WiFi AP-STA technology, the terminal device acting as an STA can connect to the terminal device acting as an AP to form an AP-STA group.

[0070] 4. Global collection is a technology that enables file sharing among multiple terminal devices. Exemplarily, the user can drag files such as pictures, texts, and web pages in the initiating end of the global collection into the area of the collected files displayed on the display screen of the initiating end. In this way, on other terminal devices that have achieved the global collection service with the initiating end, the files collected by the initiating end can also be viewed or operated on.

[0071] In the first possible implementation manner, the initiating end of the global collection can start the global collection based on the operation of the user clicking on the icon of "Global Collection" in the items recommended in the start menu. Exemplarily, the interface corresponding to the items recommended in the start menu of the terminal device can be as Figure 1 shown. Based on the operation of the user clicking on the icon of "Global Collection", the terminal device can start the global collection.

[0072] In the second possible implementation manner, the initiating end of the global collection can display the icon of the global collection based on the operation of the user searching for the global collection in the start menu, and start the global collection based on the operation of the user clicking on the icon of the global collection. Exemplarily, the interface of the terminal device displaying the icon of the global collection based on the operation of the user searching for the global collection in the start menu can be as Figure 2 shown. Based on the operation of the user clicking on the icon of "Global Collection" in this interface, the terminal device can start the global collection.

[0073] In the third possible implementation manner, the initiating end of the global collection can start the global collection based on the operation of the user dragging a file into the area of the collected files displayed on the display screen of the initiating end. Exemplarily, as Figure 3 shown, the area 301 of the collected files can be displayed on the display screen of the terminal device. The area 301 of the collected files can be, for example, at the top of the display screen of the terminal device. Based on the operation of the user dragging a document into the area 301 of the collected files, the terminal device can start the global collection.

[0074] In the fourth possible implementation manner, the initiating end of the global collection can start the global collection based on the operation of the user dragging a file into the area of the collected files displayed on the display screen of the initiating end while browsing the web. Exemplarily, asFigure 4 As shown, in the display screen of the terminal device, an area 401 for displaying favorite files can be shown; when the user browses the web, based on the operation of the user dragging the picture 402 in the web page into the area 401 of the favorite files, the terminal device can initiate global favorites.

[0075] In the fifth possible implementation manner, the initiating end of the global favorites can create a shortcut for the global favorites based on the operation of the user indicating to create a desktop shortcut in the panel of the global favorites; then the initiating end of the global favorites can initiate the global favorites based on the operation of the user clicking on the shortcut of the global favorites. Exemplarily, as Figure 5 shown, based on the operation of the user clicking on the button 502 in the panel 501 of the global favorites, the terminal device can display a menu bar 503; based on the operation of the user clicking on the button 504 in the menu bar 503, the terminal device can create a desktop shortcut for the global favorites on the desktop; based on the operation of the user clicking on the desktop shortcut of the global favorites, the terminal device can initiate the global favorites.

[0076] After the terminal device initiates the global favorites, in the area of the favorite files, such as the above-mentioned area 301 of the favorite files or the panel 501 of the global favorites, etc., the files favorited by the user can be shown. In other terminal devices that establish the global favorites with the initiating end of the global favorites, the files favorited by the user can also be shown in the corresponding area of the favorite files. The favorited files can be dragged to other applications or shared to other applications later.

[0077] In one example, as Figure 6 shown, based on the operation of the user dragging the picture 402 in the web page into the area 401 of the favorite files in Figure 4 , the terminal device can initiate the global favorites, and the picture can be shown in the area 601 of the favorite files of the terminal device. Based on the operation of the user dragging the picture to the note, the picture can be inserted into the note.

[0078] In another example, as Figure 7 shown, for the picture 702 in the area 701 of the favorite files of the terminal device, after the user selects the picture 702, based on the operation of the user clicking on the share button 703, the terminal device can display a menu bar 704; based on the operation of the user clicking on the button 705 for sharing to the note, the picture 702 can be inserted into the editing area 707 of the picture note 706 of the note.

[0079] It should be understood that Figure 6 and Figure 7 in the examples shown, the terminal device can be or not be the initiating end of the global favorites. The terminal devices in these two examples can be any one of the multiple terminal devices that establish the global favorites. The present application does not make specific limitations on this.

[0080] Currently, information interaction and data transmission between terminal devices can be achieved through technologies such as P2P direct connection, WiFi AP-STA, etc. Exemplarily, multiple terminal devices such as mobile phones, tablets, and laptops can achieve functions such as global collection between devices through P2P direct connection.

[0081] It should be noted that to achieve functions such as global collection between multiple terminal devices, it is necessary to rely on the transmission channels between multiple terminal devices, and the transmission channels between multiple terminal devices are established relying on physical links.

[0082] 5. A physical link, which can also be referred to as a WiFi physical link or a physical channel, etc. For example, it can be a WiFi P2P link, a Bluetooth basic rate (BR) link, a Bluetooth socket link, or a Bluetooth enhanced data rate (EDR) link, etc. Only one physical link can be established between two terminal devices.

[0083] It should be noted that in the embodiments of the present application, when a terminal device establishes a WiFi direct connection, it can also be considered that a physical link is established between terminal devices. Exemplarily, when a P2P direct connection is established between terminal devices, the physical link established between the terminal devices is a WiFi P2P link.

[0084] Therefore, in the embodiments of the present application, a physical link can also be understood as a WiFi direct connection, a P2P connection, a P2P direct connection, or a WiFi AP-STA connection, etc. Exemplarily, establishing a physical link between a first terminal device and a second terminal device can also be understood as establishing a P2P direct connection or a WiFi AP-STA connection between the first terminal device and the second terminal device. The present application does not make specific limitations on this.

[0085] Among them, in a group formed by multiple terminal devices, a physical link is established between each slave device and the master device. The master device can be, for example, a GO in a P2P group or an AP in an AP-STA group, and the slave device can be, for example, a GC in a P2P group or an STA in an AP-STA group. For example, in a P2P group formed by multiple terminal devices, a physical link is established between each GC and the GO; in an AP-STA group formed by multiple terminal devices, a physical link is established between each STA and the AP.

[0086] 7. Transmission channel: A channel for data transmission established based on a physical link. The transmission channel can be used to implement User Datagram Protocol (UDP) communication and / or Transmission Control Protocol / Internet Protocol (TCP / IP) communication. Multiple transmission channels can be established between each terminal device and multiple other terminal devices, and each transmission channel can be used to transmit a type of service data. The terminal device can establish a transmission channel with the peer device based on the device IP of the peer device. For example, the local device can use the device IP of the peer device to call the protocol stack of the local device to establish a transmission channel with the peer device, so that the data of the local device can be transmitted to the peer device through this transmission channel.

[0087] The following will further illustrate the physical link and the transmission channel by taking a P2P group formed by three terminal devices as an example. Figure 8

[0088] Figure 8 FIG. is a schematic diagram of a physical link and a transmission channel provided by an embodiment of the present application. As Figure 8 shown, a P2P group is formed among terminal device 810, terminal device 820, and terminal device 830. Among them, terminal device 810 is the GO in this P2P group, and terminal device 820 and terminal device 830 are the GCs in this P2P group.

[0089] As Figure 8 shown in (a) of FIG., terminal device 820 and terminal device 830 respectively establish P2P direct connections with terminal device 810, that is, a physical link is established between terminal device 820 and terminal device 830 respectively and terminal device 810.

[0090] As Figure 8 shown in (b) of FIG., in order to enable terminal device 820 to perform global collection services with both terminal device 830 and terminal device 810 at the same time, based on the above physical link, a transmission channel is established between terminal device 810 and terminal device 820 for transmitting global collection service data; a transmission channel is established between terminal device 820 and terminal device 830 for transmitting global collection service data. Among them, during the process of transmitting service data between terminal device 820 and terminal device 830 through the transmission channel, the service data can be forwarded by terminal device 810. For example, when terminal device 820 sends service data to terminal device 830, the service data can be forwarded by terminal device 810 to terminal device 830.

[0091] It should be understood that when multiple terminal devices implement services between terminal devices through WiFi direct connection other than establishing P2P direct connection, in the group formed by these multiple terminal devices, the relationship between the physical links and transmission channels among the terminal devices is the same as that Figure 8 shown in the figure, which can be referred to the description above and will not be elaborated here.

[0092] 7. Group dissolution. The physical link between the master device and each slave device in the group can be disconnected, or the WiFi direct connection between the master device and each slave device in the group can be disconnected. For example, the dissolution of a P2P group can be understood as the disconnection of the P2P direct connection between the GO and each GC in the group.

[0093] Currently, when there is a need for multiple terminal devices to establish services for terminal device 1, terminal device 1 will establish a WiFi direct connection with one of the multiple terminal devices first, and then establish WiFi direct connections with the remaining terminal devices among the multiple terminal devices one by one. However, such a method may cause connection conflicts, resulting in terminal device 1 being unable to establish WiFi direct connections with multiple terminal devices, thereby preventing the services between terminal device 1 and multiple terminal devices from being realized and leading to a poor user experience.

[0094] Exemplarily, terminal device 1 is a mobile phone. The mobile phone needs to establish WiFi direct connections with a tablet computer and a laptop computer. The mobile phone first establishes a P2P direct connection with the tablet computer, and the mobile phone is the GO in the P2P group formed by the mobile phone and the tablet computer, and the tablet computer is the GC in the P2P group formed by the mobile phone and the tablet computer; then, the mobile phone establishes a P2P direct connection with the laptop computer. However, due to hardware limitations and / or protocol limitations, the laptop computer cannot fully be compatible with the P2P direct connection of the Android system, so that the laptop computer can only be used as a GO to connect other terminal devices. Since there is already a GO in the P2P group formed by the mobile phone and the tablet computer, connection conflicts will occur. As a result, the laptop computer cannot establish a P2P direct connection with the mobile phone, or the laptop computer establishes a P2P direct connection with the mobile phone, but the P2P direct connection between the mobile phone and the tablet computer is disconnected.

[0095] Next, in combination with Figure 9 and Figure 10 , the connection method 900 of the above example will be described in detail. Among them, Figure 9 is the process of establishing a P2P direct connection between the mobile phone and the tablet computer; Figure 10 is the process of connection conflicts caused by the laptop computer establishing a P2P direct connection with the mobile phone.

[0096] As Figure 9 shown, the connection method 900 of the above example includes the following steps:

[0097] Among them, S100 to S104 are the processes of device discovery by the laptop computer.

[0098] S100. In response to operation 1 of the user, the intelligent connection switch of the laptop is switched to the on state.

[0099] The intelligent connection switch can be a button on the system settings interface of the terminal device, or a button on the settings interface in application programs such as the computer manager in the terminal device. The state of the intelligent connection switch can control whether the terminal device can perform device discovery, and then establish an interconnection with other terminal devices to perform services such as multi-screen collaboration, keyboard and mouse sharing, and global collection. For example, when the intelligent connection switch of the laptop is in the on state, the laptop can discover other terminal devices, and the intelligent connection switches of other terminal devices are also in the on state.

[0100] Operation 1 can be an operation where the user clicks or slides the intelligent connection switch. In response to operation 1, the intelligent connection switch can switch the state of the intelligent connection switch. For example, it can be switched from the off state to the on state, or from the on state to the off state, etc. In the embodiment of the present application, operation 1 is an operation that switches the intelligent connection switch of the laptop from the off state to the on state.

[0101] S101. The intelligent connection of the laptop instructs the device discovery module of the laptop to perform device discovery.

[0102] Optionally, the intelligent connection of the laptop calls a function to instruct the device discovery module of the laptop to perform device discovery, or the intelligent connection of the laptop transmits an instruction for instructing the device discovery module to perform device discovery to the device discovery module of the laptop.

[0103] S102. In response to the instruction of the intelligent connection of the laptop in S101, the device discovery module of the laptop performs device discovery and discovers online devices.

[0104] Device discovery can also be referred to as WiFi P2P discovery. During the device discovery process, the terminal device can switch back and forth between the broadcast (listen) state and the discovery (search) phase. For example, when the laptop is in the discovery phase and the mobile phone is in the broadcast phase, the device discovery module in the laptop can discover the mobile phone and obtain the device information carried in the information broadcast by the mobile phone. The device information can include one or more of the following: device model, device ID, device name, logged-in account, or media access control (MAC) address of the device, etc.

[0105] In this way, the device discovery module of the laptop can discover the mobile phone and the tablet computer, and obtain the device information of the mobile phone and the tablet computer. The online devices can be understood as the devices discovered by the terminal device. For example, for the laptop, the online devices include the mobile phone and the tablet computer.

[0106] S103. The device discovery module of the laptop transmits the device information of the online devices to the intelligent interconnection of the laptop.

[0107] Exemplarily, the device discovery module of the laptop can transmit the device list of the online devices to the intelligent interconnection of the laptop, and the device list includes the device information of each online device. For example, the device list transmitted by the device discovery module of the laptop to the intelligent interconnection of the laptop includes: device information such as the device names and device models of the mobile phone and the tablet computer.

[0108] Optionally, for the laptop, the online devices can be the terminal devices with the same account logged in on the laptop. For example, the information of the online devices transmitted by the device discovery module of the laptop to the intelligent interconnection of the laptop can be the information of the mobile phone and the tablet computer. The account logged in on the mobile phone is the same as the account logged in on the laptop, and the account logged in on the tablet computer is the same as the account logged in on the laptop.

[0109] S104. Based on the device information of the online devices, the intelligent interconnection of the laptop instructs to display the online devices.

[0110] Displaying the online devices can be understood as displaying the device information such as the device model or device name of the online devices. For example, the online devices displayed by the laptop can be the device name or device model of the mobile phone, and the device name or device model of the tablet computer, etc.

[0111] S200 to S204 are the processes of the mobile phone for device discovery:

[0112] S200. In response to the operation 2 of the user, the intelligent interconnection switch of the intelligent interconnection of the mobile phone is switched to the on state.

[0113] S201. The intelligent interconnection of the mobile phone instructs the device discovery module of the mobile phone to perform device discovery.

[0114] S202. In response to the instruction of the intelligent interconnection of the mobile phone in S201, the device discovery module of the mobile phone performs device discovery and discovers the online devices.

[0115] S203. The device discovery module of the mobile phone transmits the device information of the online devices to the intelligent interconnection of the mobile phone.

[0116] S204. Based on the device information of the online devices, the intelligent interconnection of the mobile phone instructs to display the online devices.

[0117] S300 to S304 are the processes for the tablet computer to perform device discovery:

[0118] S300. In response to operation 3 of the user, the intelligent connection switch of the tablet computer is switched to the on state.

[0119] S301. The intelligent connection of the tablet computer instructs the device discovery module of the tablet computer to perform device discovery.

[0120] S302. In response to the instruction of the intelligent connection of the tablet computer in S301, the device discovery module of the tablet computer performs device discovery and discovers the online devices.

[0121] S303. The device discovery module of the tablet computer transmits the device information of the online devices to the intelligent connection of the tablet computer.

[0122] S304. Based on the device information of the online devices, the intelligent connection of the tablet computer instructs to display the online devices.

[0123] It should be noted that S200 to S204 and S300 to S304 are respectively similar to the implementation of S100 to S104, and can all refer to the description of S100 to S104, which will not be elaborated here.

[0124] S205. In response to operation 4 of the user on the mobile phone, the intelligent connection of the mobile phone obtains the first instruction, and the first instruction is used to instruct the mobile phone to perform global collection with the tablet computer and the laptop.

[0125] The first instruction can also be understood as the instruction for the terminal device to start global collection. Operation 4 can be the operation for the user to indicate to start global collection among the first to fifth ways for the terminal device to start global collection in the above text. For details, please refer to the description in the above text, which will not be elaborated here.

[0126] S206. In response to the first instruction, the intelligent connection of the mobile phone instructs the transmission module of the mobile phone to establish a transmission channel with the tablet computer.

[0127] Optionally, the intelligent connection of the mobile phone transmits information 1 to the transmission module of the mobile phone. Information 1 is used to instruct to establish a transmission channel with the tablet computer, and information 1 includes the information for instructing the tablet computer. Among them, the information for instructing the tablet computer can be, for example, the device ID, device name or device model of the tablet computer, etc.

[0128] S207. In response to the instruction of the intelligent connection of the mobile phone in S206, the transmission module of the mobile phone instructs the WiFi connection module of the mobile phone to establish a physical link with the tablet computer.

[0129] It should be understood that establishing a physical link can also be replaced by establishing a P2P connection, establishing a P2P direct connection, establishing a P2P link, etc. The present application does not make specific limitations in this regard.

[0130] Optionally, the transmission module of the mobile phone can call a function and input information for indicating the tablet computer, such as the device ID of the tablet computer, to instruct the WiFi connection module of the mobile phone to establish a physical link with the tablet computer.

[0131] S208. In response to the instruction of the transmission module of the mobile phone in S207, the WiFi connection module of the mobile phone determines whether a physical link has been established between the mobile phone and the tablet computer.

[0132] Optionally, a first list can be stored in the mobile phone. The first list includes the device information of the terminal devices that have established a physical link with the mobile phone. The first list can be stored in the WiFi connection module of the mobile phone, or the WiFi connection module of the mobile phone can query whether a physical link has been established with the tablet computer from the first list by calling a function or other means.

[0133] If not, the mobile phone executes S209 to S214.

[0134] If so, the mobile phone executes S212 to S214.

[0135] S209. The WiFi connection module of the mobile phone determines that the role of the mobile phone is GO and creates a GO role.

[0136] S210. After the GO is created, the WiFi connection module of the mobile phone sends Request 1 to the WiFi connection module of the tablet computer. Request 1 is used to request the establishment of a physical link. Request 1 can carry the account of the mobile phone, the password of the mobile phone, and the role information of the mobile phone. Since the WiFi connection module of the mobile phone determines that the role of the mobile phone is GO in S209, the role information of the mobile phone is used to indicate that the role of the mobile phone is GO.

[0137] It should be understood that the account and password of the mobile phone are the account and password for the tablet computer to establish a P2P direct connection with the mobile phone. For the sake of brevity, the account and password will not be explained hereinafter.

[0138] Optionally, Request 1 is also used to instruct the WiFi direct connection module of the tablet computer to increment the reference count of the physical link between the mobile phone and the tablet computer by 1.

[0139] The reference count can be understood as the number of times a service between terminal devices references the physical link established by the terminal devices. For example, since a global favorite service needs to be established between a mobile phone and a tablet computer, and the implementation of the global favorite service is based on the physical link between the mobile phone and the tablet computer, the reference count of the physical link between the mobile phone and the tablet computer is incremented by 1. For the sake of brevity, the reference count will not be explained further in the following text.

[0140] Optionally, the WiFi connection module of the mobile phone can call a function to obtain information indicating whether a physical link has been established between the mobile phone and the tablet computer. For example, the WiFi connection module of the mobile phone can call a function to check whether the list of established physical links of the mobile phone includes information indicating the tablet computer; if it does, it means that a physical link has been established between the mobile phone and the tablet computer; otherwise, it means that a physical link has not been established between the mobile phone and the tablet computer.

[0141] S305. In response to Request 1, the WiFi connection module of the tablet computer connects to the mobile phone through the account and password of the mobile phone, that is, establishes a physical link with the mobile phone. And increments the reference count of the physical link between the mobile phone and the tablet computer by 1.

[0142] Optionally, the WiFi connection module of the tablet computer can call a function to connect to the mobile phone using the account and password of the mobile phone.

[0143] S306. The WiFi connection module of the tablet computer sends a physical link establishment response to the WiFi connection module of the mobile phone. The physical link establishment response is used to indicate that the physical link establishment is successful.

[0144] Optionally, the physical link establishment response carries the device IP of the tablet computer. The device IP of the tablet computer can be used for the mobile phone to send data of the global favorite service, such as files collected by the user, to the tablet computer.

[0145] S211. In response to the physical link establishment response, the WiFi connection module of the mobile phone increments the reference count of the physical link between the mobile phone and the tablet computer by 1.

[0146] S212. In response to the physical link establishment response, the WiFi connection module of the mobile phone indicates that the data link establishment of the mobile phone is successful and indicates the device IP of the tablet computer.

[0147] Optionally, the WiFi connection module of the mobile phone transmits Information 3 to the transmission module of the mobile phone. Information 3 is used to indicate that the data link establishment is successful and indicates the device IP of the tablet computer.

[0148] Optionally, when a physical link is successfully established between the mobile phone and the tablet computer, the mobile phone sends a second list of the P2P group established between the mobile phone and the tablet computer to the online device outside the P2P group established between the mobile phone and the tablet computer. The second list includes the device ID and role of each terminal device in the P2P group. Since the online device outside the P2P group established between the mobile phone and the tablet computer is a laptop computer, the mobile phone sends the second list to the laptop computer.

[0149] In this way, the online device outside the P2P group established between the mobile phone and the tablet computer can obtain the P2P direct connection status between the mobile phone and the tablet computer, the role of the mobile phone, and the role of the tablet computer. When the online device outside the P2P group established between the mobile phone and the tablet computer needs to establish a P2P direct connection with the terminal devices in the group later, it can determine the roles of the terminal devices in the new P2P group to be established based on the roles and information of the terminal devices in the P2P group.

[0150] Optionally, when the role of the terminal device in the P2P group established between the mobile phone and the tablet computer changes or the connection relationship changes, the mobile phone can instruct the laptop computer to update the second list.

[0151] S213. The transmission module of the mobile phone sends information for instructing the establishment of a transmission channel to the transmission module of the tablet computer. The information for instructing the establishment of a transmission channel includes the device IP of the mobile phone. The device IP of the mobile phone can be used for the tablet computer to send data of the global collection service to the mobile phone.

[0152] Among them, the information for instructing the establishment of a transmission channel can also be understood as a handshake packet, etc., and this application does not make specific limitations on this.

[0153] S307. In response to the information for instructing the establishment of a transmission channel, the transmission module of the tablet computer sends a transmission channel establishment response to the transmission module of the mobile phone. The transmission channel establishment response is used to indicate consent to establish a transmission channel or successful establishment of a transmission channel.

[0154] S308. The transmission module of the tablet computer instructs the intelligent interconnection of the tablet computer that the transmission channel is successfully established.

[0155] S309. In response to the instruction of the transmission module of the tablet computer in S308, the intelligent interconnection of the tablet computer instructs to display the global collection interface. The global collection interface can be the area where the user collects files to the collected files of the mobile phone, such as Figure 3 the interface shown, etc.

[0156] S214. In response to the transmission channel establishment response in S307, the transmission module of the mobile phone instructs the intelligent interconnection of the mobile phone that the transmission channel is successfully established. In this way, a global collection service can be established between the intelligent interconnections of the mobile phone and the tablet computer, and data transmission can be realized.

[0157] S215. The intelligent connection indication of the mobile phone displays the global collection interface. The global collection interface can be the area where the user collects files to the collected files of the mobile phone, such as Figure 3 the interface shown, etc.

[0158] Furthermore, the intelligent connection of the mobile phone and the intelligent connection of the tablet computer can respectively indicate the transmission module of the local machine, and use the transmission channel between the mobile phone and the tablet computer to transmit the data of the global collection service.

[0159] Since the globally initiated collection service by the user is a global collection between the mobile phone, the tablet computer and the laptop, therefore, on the basis of establishing a global collection service between the mobile phone and the tablet computer, the laptop also needs to establish a global collection with the mobile phone.

[0160] As Figure 10 shown, method 900 further includes:

[0161] S216. The intelligent connection of the mobile phone instructs the transmission module of the mobile phone to establish a transmission channel with the laptop.

[0162] S217. The transmission module of the mobile phone instructs the WiFi connection module of the mobile phone to establish a physical link with the laptop.

[0163] S218. The WiFi connection module of the mobile phone sends a request 2 for requesting to establish a physical link to the WiFi connection module of the laptop. The request 2 carries information indicating that the mobile phone has established a P2P group and the role of the mobile phone is GO.

[0164] S105. The WiFi connection module of the laptop determines that a connection conflict has occurred based on request 2 and that the local machine can only be GO.

[0165] It should be understood that the laptop can be set with the ability to be GO in the P2P group. Or the hardware configuration of the laptop restricts the laptop to only be GO. The hardware configuration can be, for example, the model of the chip, etc. For example, when the model of the chip of the laptop belongs to the preset chip model, the laptop needs to be GO in the P2P group.

[0166] S106. The WiFi connection module of the laptop sends information 1 indicating a connection conflict to the WiFi connection module of the mobile phone.

[0167] S219. The WiFi connection module of the mobile phone instructs the transmission module of the mobile phone about information 1, that is, indicates a connection conflict.

[0168] S220. The transmission module of the mobile phone instructs the intelligent connection of the mobile phone about information 1, that is, indicates a connection conflict.

[0169] Optionally, based on Information 1, the intelligent interconnection of the mobile phone can display an interface for prompting the user that the file synchronization with the laptop fails.

[0170] It should be understood that in Method 900, the method of establishing a global favorite service with a mobile phone, a laptop, and a tablet computer is taken as an example to illustrate the connection conflict scenario between terminal devices. Among them, the mobile phone, laptop, or tablet computer can also be replaced by other types of terminal devices, and the global favorite service can also be replaced by other types of services that require establishing a WiFi direct connection between multiple terminal devices. The present application does not make specific limitations on this.

[0171] It should also be noted that for the scenario of establishing a WiFi direct connection other than the P2P direct connection between terminal devices, such as the scenario of establishing an AP-STA connection, it is similar to the scenario of establishing a P2P direct connection between terminal devices shown in Method 900 above. In some possible implementation manners, when establishing an AP-STA connection between terminal devices, the GO in Method 900 can be replaced by an AP, and the GC can be replaced by an STA. For the sake of brevity, the scenario of establishing other WiFi direct connections between terminal devices will not be elaborated here.

[0172] To solve the above technical problems, the present application provides a data transmission method. When a first terminal device needs to establish a WiFi direct connection with multiple terminal devices, the first terminal device can determine a master device among the first terminal device and the multiple terminal devices, so that devices other than the master device among the first terminal device and the multiple terminal devices can establish a physical link with the master device, so that the first terminal device can establish a service with the multiple terminal devices, which can reduce the connection conflict scenario and improve the user experience.

[0173] To better understand the terminal devices in the embodiments of the present application, the following combines Figure 11 to elaborate in detail on the hardware structure of the terminal devices in the embodiments of the present application.

[0174] Figure 11 It is a schematic structural diagram of the terminal device 1100 provided in the embodiment of the present application. As Figure 11 shown, the terminal device 1100 may include a processor 1110, an external memory interface 1120, an internal memory 1121, a universal serial bus (USB) interface 1130, a charging management module 1140, a power management module 1141, a battery 1142, an antenna 1, an antenna 2, a mobile communication module 1150, a wireless communication module 1160, an audio module 1170, a sensor module 1180, a button 1190, an indicator 1192, a camera 1193, and a display screen 1194, etc.

[0175] It can be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the terminal device 1100. In other embodiments of the present application, the terminal device 1100 may include more or fewer components than those illustrated, or combine certain components, or split certain components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0176] The processor 1110 may include one or more processing units. For example, the processor 1110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), a WiFi chip, etc. Optionally, a memory may also be provided in the processor 1110 for storing instructions and data. Among them, different processing units may be independent devices or integrated in one or more processors.

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

[0178] Among them, the I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL); the I2S interface can be used for audio communication; the PCM interface can also be used for audio communication to sample, quantize, and encode analog signals; the UART interface is a general-purpose serial data bus for asynchronous communication; the MIPI interface can be used to connect the processor 1110 to peripheral devices such as the display screen 1194 and the camera 1193; the MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc.; the GPIO interface can be configured by software; the GPIO interface can be configured as a control signal or a data signal.

[0179] The USB interface 1130 is an interface that complies with the USB standard specification, and can specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 1130 can be used to connect a charger to charge the terminal device 1100, can also be used to transfer data between the terminal device 1100 and peripheral devices, and can also be used to connect headphones to play audio through the headphones. This interface can also be used to connect other electronic devices, such as AR devices, etc.

[0180] It can be understood that the interface connection relationships between the modules illustrated in the embodiments of the present application are only illustrative descriptions and do not constitute a structural limitation on the terminal device 1100. In other embodiments of the present application, the terminal device 1100 can also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0181] The charging management module 1140 is used to receive a charging input from a charger. Among them, the charger can be a wireless charger or a wired charger. While the charging management module 1140 charges the battery 1142, it can also supply power to the electronic device through the power management module 1141. The power management module 1141 is used to connect the battery 1142, the charging management module 1140, and the processor 1110.

[0182] The wireless communication function of the terminal device 1100 can be implemented through antenna 1, antenna 2, the mobile communication module 1150, the wireless communication module 1160, the modulation and demodulation processor, and the baseband processor, etc.

[0183] Among them, antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals.

[0184] The mobile communication module 1150 can provide solutions for wireless communications such as 2G / 3G / 4G / 5G applied to the terminal device 1100.

[0185] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. Subsequently, the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After being processed by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs a sound signal through an audio device (not limited to speakers, receivers, etc.), or displays an image or video through the display screen 1194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 1110 and be provided in the same device as the mobile communication module 1150 or other functional modules.

[0186] The wireless communication module 1160 can provide solutions for wireless communications applied to the terminal device 1100, including wireless local area networks (WLAN) (such as wireless fidelity (WiFi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (IR), etc.

[0187] The sensor module 1180 may include, for example, a pressure sensor, a gyroscope sensor, etc.

[0188] The terminal device 1100 realizes the display function through the GPU, the display screen 1194, and the application processor, etc. The GPU is a microprocessor for image processing, connecting the display screen 1194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 1110 may include one or more GPUs, which execute program instructions to generate or change display information.

[0189] The display screen 1194 is used to display images, videos, etc. The display screen 1194 includes a display panel. The display panel can adopt a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Miniled, a MicroLed, a Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the terminal device 1100 may include one or N display screens 1194, where N is a positive integer greater than 1.

[0190] The terminal device 1100 can implement the shooting function through the ISP, the camera 1193, the video codec, the GPU, the display screen 1194, and the application processor, etc.

[0191] The ISP is used to process the data fed back by the camera 1193. For example, when taking a photo, the shutter is opened, and the light passes through the lens and is transmitted to the camera sensor. The optical signal is converted into an electrical signal, and the camera sensor transmits the electrical signal to the ISP for processing and converts it into an image visible to the naked eye, etc.

[0192] The camera 1193 is used to capture still images or videos. In some embodiments, the terminal device 1100 may include one or N cameras 1193, where N is a positive integer greater than 1.

[0193] The external memory interface 1120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the terminal device 1100. The external memory card communicates with the processor 1110 through the external memory interface 1120 to implement the data storage function. For example, files such as music and videos are saved in the external memory card.

[0194] The internal memory 1121 can be used to store computer-executable program code, and the executable program code includes instructions. The internal memory 1121 may include a program storage area and a data storage area. The processor 1110 executes various functional applications and data processing of the terminal device 1100 by running the instructions stored in the internal memory 1121 and / or the instructions stored in the memory provided in the processor.

[0195] The terminal device 1100 can implement audio functions through the audio module 1170, speakers, receivers, microphones, headphone jacks, and application processors, etc. For example, music playback, recording, etc.

[0196] The keys 1190 include the power-on key, volume keys, etc. The keys 1190 can be mechanical keys or touch keys. The terminal device 1100 can receive key inputs and generate key signal inputs related to the user settings and function controls of the terminal device 1100.

[0197] The indicator 1192 can be an indicator light, which can be used to indicate the charging status, power change, and can also be used to indicate messages, missed calls, notifications, etc.

[0198] The software system of the terminal device can adopt a layered architecture, event-driven architecture, microkernel architecture, microservices architecture, or cloud architecture. The following combines Figure 12 and Figure 13 , taking the Android system and Windows system with a layered architecture as examples, to exemplarily illustrate the process of establishing a WiFi direct connection between the terminal device 1201 and the terminal device 1202, and the process of establishing a WiFi direct connection between the terminal device 1301 and the terminal device 1302. The WiFi direct connection can include, but is not limited to, P2P direct connection or AP-STA connection.

[0199] Among them, the hardware structures of the terminal device 1201, terminal device 1202, terminal device 1301, and terminal device 1302 can be as Figure 11 shown. The Android system is installed on the terminal device 1201, terminal device 1301, and terminal device 1302 respectively; the Windows system is installed on the terminal device 1202. For ease of understanding, first combine Figure 12 , and explain the layered architecture of the Android system and the terms involved.

[0200] As Figure 12 shown, the layered architecture divides the software system of the terminal device 1201 into several layers, and each layer has a clear role and division of labor. The layers communicate through software interfaces. In some embodiments, the Android system is divided into six layers, from top to bottom are the application layer, application framework layer, Android runtime, system libraries, kernel layer, and hardware layer.

[0201] 1. The application layer can include a series of application packages that users can directly access, and it is the window for users to interact with the terminal device. Exemplarily, the application packages can include WiFi, Bluetooth, PC Manager, etc.

[0202] Among them, the PC manager can include a smart interconnection and device discovery module.

[0203] Smart interconnection can include multiple services such as multi-screen collaboration, keyboard and mouse sharing, call sharing, and global collection. In response to a user's selection operation on a service, smart interconnection can obtain a corresponding instruction and call the underlying module to establish or disconnect a WiFi direct connection between terminal devices, and then establish or disconnect the service between terminal devices. For example, in response to a user's operation indicating to establish a global collection with terminal device 1202, the smart interconnection of terminal device 1201 can call the underlying module to establish a WiFi direct connection with terminal device 1202, and then implement the global collection with terminal device 1202.

[0204] It should be understood that in the embodiments of the present application, a service can refer to a service established between terminal devices through smart interconnection, such as multi-screen collaboration, keyboard and mouse sharing, call sharing, or global collection, etc. A service can also be referred to as a service, an inter-device connection service, etc. The present application does not make specific limitations on this.

[0205] The device discovery module can be used for discovery between terminal devices and can indicate the device information of the discovered online devices to smart interconnection, so that smart interconnection can indicate to display the online devices. For example, when terminal device 1202 goes online, the device discovery module of terminal device 1201 can discover terminal device 1202 and indicate the device information such as the device ID and model of terminal device 1202 to the smart interconnection of terminal device 1201.

[0206] It should be understood that the smart interconnection and device discovery module can be two modules in the PC manager or two application programs independently existing in the application layer respectively. The present application does not make specific limitations on this.

[0207] 2. The application framework layer provides application programming interfaces (APIs) and programming frameworks for the applications in the application layer. The application framework layer includes some predefined functions. As Figure 4 shown, the application framework layer can include a transmission module, a WiFi connection module, a security authentication module, etc.

[0208] Among them, during the process of terminal device 1201 establishing or disconnecting a WiFi direct connection with terminal device 1202, the transmission module can instruct the WiFi connection module to establish or disconnect the WiFi direct connection between the terminal devices. It can also establish a transmission channel between terminal devices 1202 based on the WiFi direct connection established by the WiFi connection module and perform data transmission with terminal device 1202 using this transmission channel.

[0209] The WiFi connection module may include a WiFi direct dynamic networking control module, a WiFi direct module, and a WiFi direct connection counting module.

[0210] The WiFi direct dynamic networking control module may, based on an indication from the transmission module to establish or disconnect a WiFi direct connection between terminal devices, call the WiFi direct connection counting module to increment or decrement the reference count of the physical link with terminal device 1202; or, based on an indication from the transmission module to establish or disconnect a WiFi direct connection between terminal devices 1202, call the WiFi direct module to instruct the WiFi connection service to establish or disconnect the WiFi direct connection between terminal devices.

[0211] The security authentication module is used to perform security authentication on terminal device 1202 when the WiFi direct dynamic networking control module receives an indication from the transmission module to establish or disconnect a WiFi direct connection between terminal devices, and to indicate to the WiFi direct dynamic networking control module the key and / or keys for signaling interaction with terminal device 1202.

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

[0213] The core library consists of two parts: one part is the functional functions that need to be called by the Java language, and the other part is the core library of Android.

[0214] The application layer and the application framework layer run in the 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 lifecycle management, stack management, thread management, security and exception management, and garbage collection.

[0215] 4. The system library may include multiple functional modules. For example: function libraries (Function Libraries), graphics processing libraries (such as: OpenGL ES), WiFi connection services, etc.

[0216] The function library provides API interfaces for developers to provide various services, facilitating developers to quickly integrate and implement various functions.

[0217] The graphics processing library is used to implement graphics drawing, image rendering, synthesis, and layer processing, etc.

[0218] The WiFi connection service can call an interface to control the driver in the kernel layer. For example, the WiFi connection service can call an interface of the WiFi Management (Manager) type. The interfaces of the WiFi Management type include: interfaces such as discoverPeers and connect, and these interfaces can be directly controlled by the user for WiFi direct connection. Among them, the WiFi connection service calling the discover device interface can implement device discovery; calling the connect interface can enable the WiFi driver to drive the WiFi chip to establish or disconnect the WiFi direct connection with the terminal device 1202.

[0219] 5. The kernel layer is the layer between hardware and software. In an exemplary embodiment, the kernel layer includes a WiFi driver, a display driver, etc.

[0220] 6. The Android system may also include Figure 12 a hardware layer not shown in the figure. The hardware layer may include various hardware, such as a display screen, a GPU, a WiFi chip, etc.

[0221] Then, in combination with Figure 12 , the layered architecture of the Windows system and the related terms will be explained.

[0222] As Figure 12 shown, the layered architecture divides the software system of the terminal device 1202 into several layers, and each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Windows system is divided into a user mode and a kernel mode.

[0223] Among them, the user mode includes user application processes, system processes, and service processes. The kernel mode includes the kernel layer.

[0224] 1. User application processes may include a series of application program packages that users can directly access, and are the windows for users to interact with the terminal device. Exemplarily, the application program packages may include WiFi, Bluetooth, PC Manager, etc. Among them, the PC Manager may include intelligent interconnection and device discovery modules.

[0225] 2. System processes and service processes provide application programming interfaces (APIs) and programming frameworks for the application programs of user application processes. System processes and service processes include some predefined functions. As Figure 12 shown, system processes and service processes may include a transmission module, a WiFi connection module, a security authentication module, and a WiFi connection service, etc.

[0226] 3. The kernel layer is the layer between hardware and software. In an exemplary embodiment, the kernel layer includes a WiFi driver, a display driver, etc.

[0227] It should be understood that the specific functions and terms of each software module involved in the Windows system are similar to those of each software module involved in the above Android system, and reference can be made to the above description, which will not be elaborated here.

[0228] Figure 12 This is a schematic diagram of the process for an end device 1201 installed with an Android system and an end device 1202 installed with a Windows system to establish a service. The device discovery module of the end device 1201 can interact with the driver through the application framework layer, enabling the driver to drive the hardware in the end device 1201 to send and receive signals, thereby obtaining the device information of the end device 1202; the device discovery module of the end device 1202 can interact with the driver through the system process and the service process, enabling the driver to drive the hardware in the end device 1202 to send and receive signals, thereby obtaining the device information of the end device 1201. In this way, the end device 1201 and the end device 1202 can respectively display the peer device through intelligent interconnection.

[0229] Based on the selection operation of the user instructing the end device 1201 to establish a service with the end device 1202, the WiFi connection modules of the end device 1201 and the end device 1202 can perform signaling interaction, enabling the slave device in the two devices to obtain the account and password of the master device. In this way, the WiFi connection module of the slave device can use the account and password of the master device to call the connection interface of the WiFi module through the WiFi connection service, enabling the WiFi driver to connect the WiFi chip to the master device, so that the end device 1201 and the end device 1202 establish a WiFi direct connection, or it can also be said that the end device 1201 and the end device 1202 establish a physical link.

[0230] Furthermore, the transmission modules of the end device 1201 and the end device 1202 can perform signaling interaction, enabling the end device 1201 and the end device 1202 to obtain the device IP of the peer device, so as to establish a transmission channel between the end device 1201 and the end device 1202. Then, the end device 1201 and the end device 1202 can use this transmission channel to transmit the data generated by the service between the end device 1201 and the end device 1202, enabling the service between the end device 1201 and the end device 1202 to operate normally.

[0231] Figure 13Schematic diagram of the process of establishing a service between a terminal device 1301 installed with an Android system and a terminal device 1302 installed with an Android system provided by an embodiment of the present application.

[0232] It should be understood that the software structure of the terminal device 1301 and the terminal device 1302 is the same as that of the terminal device 1201, and reference can be made to the description of the Android system of the terminal device 1201 above; the process of establishing a service between the terminal device 1301 and the terminal device 1302 is similar to the process of establishing a service between the above-mentioned terminal device 1201 and the terminal device 1202, and reference can be made to the above description, which will not be elaborated here.

[0233] It should be noted that in the embodiments of the present application, the Android system and the Windows system are taken as examples for illustration, but the basic principle also applies to terminal devices using other operating systems, and the present application does not limit the operating system used by the terminal device.

[0234] It should also be noted that in the embodiments of the present application, the Android system and the Windows system are taken as examples for illustration, but the Android system and the Windows system used by the terminal device may also include more or fewer layers, or include more or fewer software modules. And, Figure 12 and Figure 13 The names of the software modules shown are only examples, and each module may also have other names. Figure 12 and Figure 13 The Android system and the Windows system shown do not constitute a limitation to the embodiments of the present application.

[0235] Next, in combination with Figures 14 to 17 The data transmission method of the present application will be introduced in detail. The embodiments shown in the present application can be executed by a terminal device, such as a mobile phone, a tablet computer, a smart bracelet, etc. The specific forms and quantities of the devices shown are only examples and should not constitute any limitation to the implementation of the method provided by the present application. Next, taking the first terminal device, the second terminal device, and the third terminal device as the execution subjects, from the perspective of device interaction among the three terminal devices, the data transmission method of the embodiments of the present application will be described in detail.

[0236] It should be understood that the terminal device can be the terminal device itself, or a chip, a chip system, or a processor that supports the terminal device to implement the data transmission method, or a logic module or software that can implement all or part of the functions of the terminal device. The hardware structure of the terminal device can be as Figure 11 shown, and the software structure can be as Figure 12 or Figure 13 shown. The present application does not make specific limitations on this.

[0237] First, taking the scenario shown in the above method 1000 as an example, combined with Figure 14 the data transmission method 1400 of the present application will be introduced in detail. Among them, the first terminal device can be understood as the laptop computer in method 1000, the second terminal device can be understood as the mobile phone in method 1000, and the third terminal device can be understood as the tablet computer in method 1000.

[0238] It should be noted that for the sake of easy understanding, in method 1400, the steps numbered starting with S1 and starting with S1000 are the steps executed by the first terminal device or the steps triggered by the first terminal device; the steps numbered starting with S2 and starting with S2000 are the steps executed by the second terminal device or the steps triggered by the second terminal device; the steps numbered starting with S3 and starting with S3000 are the steps executed by the third terminal device or the steps triggered by the third terminal device.

[0239] As Figure 14 shown, method 1400 includes:

[0240] Among them, S1401 is the process in which the first terminal device, the second terminal device, and the third terminal device perform device discovery.

[0241] It should be understood that the process of device discovery by the first terminal device can refer to the implementation manners of S100 to S104 in method 1000; the process of discovery by the second terminal device can refer to the implementation manners of S200 to S204 in method 1000; the process of device discovery by the third terminal device can refer to the implementation manners of S300 to S304 in method 1000, which will not be elaborated here.

[0242] S2001. In response to the operation 4 of the user on the second terminal device, the intelligent connection of the second terminal device obtains a first instruction, and the first instruction is used to instruct the second terminal device to perform file collection, that is, to instruct the second terminal device to enable global collection. Global collection requires the second terminal device to establish a transmission channel with all the online devices discovered by the second terminal device. The online devices discovered by the second terminal device include the first terminal device and the third terminal device.

[0243] Since in the process of S1401, the intelligent connection of the second terminal device can determine that the current online devices include the first terminal device and the third terminal device. Therefore, the first instruction here can also be understood as an instruction to instruct the second terminal device to establish P2P direct connections with the third terminal device and the first terminal device respectively.

[0244] It should be understood that the first instruction can also be understood as an instruction for instructing the second terminal device to start global collection. The first instruction is obtained based on the operation 4 input by the user to the second terminal device. Operation 4 can be an operation in which the user indicates to start global collection among the first to fifth ways for the terminal device to start global collection described above. For example, operation 4 can be the operation in which the user clicks the icon of "Global Collection" in the items recommended in the start menu bar in the first possible implementation manner; it can also be the operation in which the user clicks the icon of global collection in the second possible implementation manner; it can also be the operation in which the user drags a document into the collection file area 301 in the third possible implementation manner; it can also be the operation in which the user drags the picture 402 on the web page into the collection file area 401 in the fourth possible implementation manner; it can also be the operation in which the user clicks the desktop shortcut of global collection in the fifth possible implementation manner. For details, please refer to the above description and will not be elaborated here.

[0245] S2002. In response to the first instruction, the intelligent connection of the second terminal device obtains the list of online devices. The list of online devices includes information for indicating the online devices discovered during the device discovery process of the second terminal device, that is, information for indicating the first terminal device and information for indicating the third terminal device. The information for indicating the third terminal device (the first terminal device) can be, for example, the device ID, device name, or device model of the third terminal device (the first terminal device).

[0246] S2003. The intelligent connection of the second terminal device instructs the WiFi module of the second terminal device to perform global networking. Global networking can be understood as establishing a P2P group for the currently online devices. That is, the first terminal device, the second terminal device, and the third terminal device establish a P2P group.

[0247] The intelligent connection of the second terminal device also instructs the WiFi module of the second terminal device with the information for indicating the currently online devices. That is, the information for indicating the first terminal device, the information for indicating the second terminal device, and the information for indicating the third terminal device.

[0248] S2004. The WiFi connection module of the second terminal device determines the first terminal device as the GO among the currently online devices.

[0249] It should be understood that the currently online devices include the first terminal device, the second terminal device, and the third terminal device.

[0250] The WiFi connection module of the second terminal device may determine the GO by using one or more of the following rules: (1) Select a device with the ability to act as the master device in the group; (2) Select the device with the largest media access control (MAC) address; (3) Select the device with the lowest power consumption per unit time; (4) Select the master device belonging to the first group, where the first group is a group established by the WiFi connection module of the second terminal device before determining the GO among the currently online devices. For example, when the second terminal device determines the GO, if the first terminal device is the GO of the P2P group established by the first terminal device and the third terminal device, the second terminal device may determine the first terminal device as the GO; or, select a plugged-in device.

[0251] Among them, if there is a terminal device with the ability to act as the GO in the P2P group, the terminal device with the ability to act as the GO in the P2P group is preferably selected. In this way, when selecting a device with the ability to act as the master device in the group as the GO, it is convenient to improve the success rate of forming a new group; selecting the device with the lowest power consumption per unit time and / or selecting a plugged-in device makes the GO less sensitive to power consumption. Since the power consumption of the GO may be relatively large, this can reduce the situation of group disbanding due to insufficient power of the GO. Selecting the device with the largest MAC address can enable more types of terminal devices to connect to the GO. Since the master device in the first group is the master device selected when forming the first group, the master device of the first group may meet one or more of the above rules. Therefore, the second terminal device may directly determine the master device in the first group as the GO.

[0252] In the embodiment of the present application, the first terminal device may be a terminal device with the ability to act as the GO in the P2P group. For example, the first terminal device is a laptop computer or the like. Therefore, the WiFi connection module of the second terminal device determines the first terminal device as the GO.

[0253] S2005. The WiFi connection module of the second terminal device sends information for instructing global networking to the WiFi connection module of the first terminal device.

[0254] Optionally, the information for instructing global networking carries a list of devices that need to perform global networking and information indicating that the first terminal device is the GO. The list of devices that need to perform global networking includes information about each device that needs to perform global networking, such as device ID, device model, device name, etc. The devices that need to perform global networking may be the first terminal device, the second terminal device, and the third terminal device.

[0255] Optionally, the information for indicating global network formation may further carry information for indicating that the first terminal device is a GO and information for indicating the terminal devices that the first terminal device needs to connect to, that is, information for indicating the second terminal device and information for indicating the third terminal device.

[0256] Based on the information for indicating global network formation, the WiFi connection module of the first terminal device can create a GO.

[0257] S1001. After the GO is created, the WiFi connection module of the first terminal device sends Request 3 to the WiFi connection module of the second terminal device. Request 3 is used to request the establishment of a physical link. Request 3 may carry the account of the first terminal device and the password of the first terminal device.

[0258] It should be understood that the account and password of the first terminal device are the account and password for the second terminal device to establish a P2P direct connection with the first terminal device. For simplicity, the account and password will not be further explained hereinafter.

[0259] Optionally, Request 1 is further used to instruct the WiFi direct connection module of the second terminal device to increment the reference count of the physical link between the first terminal device and the second terminal device by 1.

[0260] The reference count can be understood as the number of times the services between terminal devices reference the established physical link between terminal devices. For example, since a global collection service needs to be established between the first terminal device and the second terminal device, and the implementation of the global collection service is based on the physical link between the first terminal device and the second terminal device, the reference count of the physical link between the first terminal device and the second terminal device is incremented by 1. For simplicity, the reference count will not be further explained hereinafter.

[0261] Optionally, before S1001, the first terminal device may first determine whether a physical link has been established between the first terminal device and the second terminal device. If not, then execute S1001. If so, S1003 can be executed.

[0262] The WiFi connection module of the first terminal device can call a function to obtain information for indicating whether a physical link has been established between the first terminal device and the second terminal device. For example, the WiFi connection module of the first terminal device can call a function to check whether the list of established physical links of the first terminal device includes information for indicating the second terminal device; if it includes, it means that a physical link has been established between the first terminal device and the second terminal device; otherwise, it means that a physical link has not been established between the first terminal device and the second terminal device.

[0263] S2006. In response to Request 3, the WiFi connection module of the second terminal device connects to the first terminal device via the account of the first terminal device and the password of the mobile phone, that is, a physical link is established with the first terminal device.

[0264] Optionally, the WiFi connection module of the second terminal device may call a function to connect to the first terminal device by using the account and password of the first terminal device, that is, a P2P direct connection is established with the first terminal device.

[0265] S2007. In response to Request 3, the WiFi connection module of the second terminal device increments the reference count of the physical link between the first terminal device and the second terminal device by 1.

[0266] It should be understood that S2007 may be executed before or after S2006, and this application does not make specific limitations on this.

[0267] S2008. The WiFi connection module of the second terminal device sends a physical link establishment response to the WiFi connection module of the first terminal device. The physical link establishment response is used to indicate that the physical link is successfully established.

[0268] S1002. In response to the physical link establishment response, the WiFi connection module of the first terminal device increments the reference count of the physical link between the first terminal device and the second terminal device by 1.

[0269] S1003. The WiFi connection module of the first terminal device sends Request 4 to the WiFi connection module of the third terminal device. Request 4 is used to request the establishment of a physical link. Request 4 may carry the account of the first terminal device and the password of the first terminal device.

[0270] S3000. In response to Request 4, the WiFi connection module of the third terminal device connects to the first terminal device via the account of the first terminal device and the password of the mobile phone, that is, a physical link is established with the first terminal device.

[0271] S3001. In response to Request 4, the WiFi connection module of the third terminal device increments the reference count of the physical link between the first terminal device and the third terminal device by 1.

[0272] It should be understood that S3001 may be executed before or after S3000, and this application does not make specific limitations on this.

[0273] S3002. The WiFi connection module of the third terminal device sends a physical link establishment response to the WiFi connection module of the first terminal device. The physical link establishment response is used to indicate that the physical link is successfully established.

[0274] S1004. In response to the physical link establishment response, the WiFi connection module of the first terminal device increments the reference count of the physical link between the first terminal device and the third terminal device by 1.

[0275] It should be understood that the implementation manners of S1003 and S1004 are similar to those of S1001 and S1002, and the implementation manners of S3000 to S3002 are similar to those of S2006 to S2008. Refer to the above description and will not be elaborated here.

[0276] S1005. The WiFi connection module of the first terminal device sends information indicating successful global networking to the WiFi connection module of the second terminal device. The information indicating successful global networking indicates that the first terminal device has established physical links with the second terminal device and the third terminal device respectively.

[0277] S2009. In response to the information indicating successful global networking, the WiFi connection module of the second terminal device indicates to the intelligent interconnection of the second terminal device that the global networking is successful and indicates to start establishing a transmission channel.

[0278] S2010. The intelligent interconnection of the second terminal device instructs the transmission module of the second terminal device to establish transmission channel 1 between the second terminal device and the third terminal device. For example, the intelligent interconnection of the second terminal device can instruct the transmission module of the second terminal device with information indicating the third terminal device, such as the device ID of the third terminal device, etc. Based on this, the transmission module of the second terminal device can determine that it needs to establish transmission channel 1 with the third terminal device.

[0279] S2011. The transmission module of the second terminal device instructs the WiFi connection module of the second terminal device to establish transmission channel 1 between the second terminal device and the third terminal device.

[0280] S2012. In response to the instruction of the transmission module of the second terminal device in S2011, the WiFi connection module of the second terminal device sends information indicating physical link multiplexing to the WiFi connection module of the third terminal device. The WiFi connection module of the third terminal device can determine, according to the information indicating physical link multiplexing, that it is necessary to utilize the existing physical link between the second terminal device and the third terminal device to establish a transmission channel between the second terminal device and the third terminal device.

[0281] S3003. In response to the information indicating physical link multiplexing from the WiFi connection module of the second terminal device, the WiFi connection module of the third terminal device sends a physical link multiplexing request to the WiFi connection module of the first terminal device.

[0282] Since the establishment of the transmission channel between the second terminal device and the third terminal device depends on the physical link between the first terminal device and the second terminal device and the physical link between the first terminal device and the third terminal device, here the third terminal device needs to instruct the first terminal device that the second terminal device and the third terminal device need to reuse the established physical link.

[0283] S1006. In response to the physical link reuse request, the WiFi connection module of the first terminal device increments the reference count by 1.

[0284] S3004. In response to the information for instructing physical link reuse from the WiFi connection module of the second terminal device, the WiFi connection module of the third terminal device increments the reference count by 1.

[0285] S3005. The WiFi connection module of the third terminal device sends a physical link reuse response to the WiFi connection module of the second terminal device. The physical link reuse response is used to instruct the third terminal device to determine to establish a transmission channel between the third terminal device and the second terminal device by using the existing physical link. The physical link establishment response carries the device IP of the third terminal device.

[0286] S2013. The WiFi connection module of the second terminal device increments the reference count by 1.

[0287] It should be understood that S2013 can be executed in parallel with S2012, or S2013 can be executed before or after S2012. This application does not make specific limitations on this.

[0288] It should be noted that the physical link reuse process, namely S2012 and S2013, S3003 and S3004, and S1006, is to perform a virtual physical link establishment process between the WiFi connection module of the second terminal device and the WiFi connection module of the third terminal device, that is, no physical link is actually established, but the WiFi connection module of the second terminal device, the WiFi connection module of the third terminal device, and the WiFi connection module of the first terminal device all increment the reference count by 1.

[0289] S2014. The WiFi connection module of the second terminal device instructs the transmission module of the second terminal device that the physical link reuse is successful. And it instructs the device IP of the third terminal device.

[0290] S3006. The WiFi connection module of the third terminal device instructs the transmission module of the third terminal device that the physical link reuse is successful.

[0291] S2015. The transmission module of the second terminal device sends information for indicating the establishment of Transmission Channel 1 to the transmission module of the third terminal device. The information for indicating the establishment of Transmission Channel 1 carries the device IP of the second terminal device.

[0292] S3007. In response to the information for indicating the establishment of a transmission channel from the transmission module of the second terminal device, the transmission module of the third terminal device sends a transmission channel establishment response to the transmission module of the second terminal device. The transmission channel establishment response is used to indicate consent to establish the transmission channel or successful establishment of the transmission channel.

[0293] S3008. The transmission module of the third terminal device indicates to the intelligent interconnection of the third terminal device that Transmission Channel 1 is successfully established.

[0294] S3009. In response to the indication of successful establishment of Transmission Channel 1, the intelligent interconnection of the third terminal device indicates to display the global favorites interface 1. The global favorites interface 1 can display the files collected by the second terminal device.

[0295] S2016. The transmission module of the second terminal device indicates to the intelligent interconnection of the second terminal device that Transmission Channel 1 is successfully established.

[0296] S2017. The intelligent interconnection of the second terminal device sends the files collected by the second terminal device to the intelligent interconnection of the third terminal device through Transmission Channel 1. In this way, the third terminal device can display the files collected by the second terminal device, that is, the global favorites interface 1 can display the files collected by the second terminal device.

[0297] S2018. The intelligent interconnection of the second terminal device instructs the transmission module of the second terminal device to establish Transmission Channel 2 between the second terminal device and the first terminal device. For example, the intelligent interconnection of the second terminal device can instruct the transmission module of the second terminal device with information indicating the first terminal device. Based on this, the transmission module of the second terminal device can determine that it is necessary to establish Transmission Channel 2 with the first terminal device.

[0298] S2019. The transmission module of the second terminal device instructs the WiFi connection module of the second terminal device to establish Transmission Channel 2 between the second terminal device and the first terminal device.

[0299] S2020. In response to the instruction of the transmission module of the second terminal device in S2011, the WiFi connection module of the second terminal device sends information for indicating the reuse of the physical link to the WiFi connection module of the first terminal device.

[0300] Based on the information indicating the multiplexing of the physical link, the WiFi connection module of the first terminal device can determine that a transmission channel needs to be established between the second terminal device and the first terminal device using the existing physical link.

[0301] S1007. The WiFi connection module of the first terminal device sends a physical link multiplexing response to the WiFi connection module of the second terminal device. The physical link multiplexing response is used to indicate that the first terminal device determines to establish a transmission channel between the first terminal device and the second terminal device using the existing physical link. The device IP of the first terminal device is carried in the physical link establishment response.

[0302] S1008. The WiFi connection module of the first terminal device increments the reference count by 1.

[0303] S2021. The WiFi connection module of the second terminal device increments the reference count by 1.

[0304] S2022. The WiFi connection module of the second terminal device indicates that the physical link multiplexing of the second terminal device is successful. And it indicates the device IP of the first terminal device.

[0305] S1009. The WiFi connection module of the first terminal device indicates that the physical link multiplexing of the first terminal device is successful.

[0306] S2023. The transmission module of the second terminal device sends information indicating the establishment of transmission channel 2 to the transmission module of the first terminal device. The information indicating the establishment of transmission channel 2 carries the device IP of the second terminal device.

[0307] S1010. In response to the information indicating the establishment of the transmission channel from the transmission module of the second terminal device, the transmission module of the first terminal device sends a transmission channel establishment response to the transmission module of the second terminal device. The transmission channel establishment response is used to indicate consent to establish the transmission channel or successful establishment of the transmission channel.

[0308] S1011. The transmission module of the first terminal device indicates to the intelligent interconnection of the first terminal device that transmission channel 2 is successfully established.

[0309] S2024. The transmission module of the second terminal device indicates to the intelligent interconnection of the second terminal device that transmission channel 2 is successfully established.

[0310] S2025. The intelligent interconnection of the second terminal device sends the files collected by the second terminal device to the intelligent interconnection of the first terminal device through transmission channel 2. In this way, the first terminal device can display the files collected by the second terminal device, that is, the global collection interface 2 can display the files collected by the second terminal device.

[0311] S1012. The intelligent connection indication of the first terminal device displays the global collection interface 2. The global collection interface 2 can display the files collected by the second terminal device.

[0312] Optionally, the process of establishing global collection between the second terminal device, the first terminal device, and the third terminal device can be carried out when the first terminal device, the second terminal device, and the third terminal device are in the state of global networking.

[0313] Based on the above embodiments, after the second terminal device establishes global collection with the first terminal device and the third terminal device, that is, the first terminal device and the third terminal device can display and obtain the files collected by the second terminal device, the first terminal device, the second terminal device, and the third terminal device can exit the state of global networking. The process of the first terminal device, the second terminal device, and the third terminal device exiting the state of global networking can be as Figure 15 shown.

[0314] As Figure 15 shown, method 1400 further includes the following steps:

[0315] S2026. The WiFi connection module of the second terminal device sends information indicating the exit from the state of global networking to the WiFi connection module of the first terminal device. Exiting the state of global networking can also be understood as that the global networking of the second terminal device has been completed and there is no need to be in the state of global networking anymore.

[0316] S1023. The WiFi connection module of the first terminal device sends response 1 to the WiFi connection module of the second terminal device. Response 1 is a response to the information indicating the exit from the state of global networking. Response 1 can be an ACK message.

[0317] S1024. The WiFi connection module of the first terminal device sends a disconnection request to the WiFi connection module of the second terminal device. The disconnection request is used to request to disconnect a physical link. That is, the first terminal device and the second terminal device execute a disconnection logic of a physical link.

[0318] S2027. The WiFi connection module of the second terminal device sends a disconnection response to the WiFi connection module of the first terminal device. The disconnection response indicates that the second terminal device determines to execute a disconnection logic of a physical link.

[0319] S2028. The WiFi connection module of the second terminal device decrements the reference count by 1.

[0320] S1025. The WiFi connection module of the first terminal device decrements the reference count by 1.

[0321] Execute the disconnection logic of a physical link through the first terminal device and the second terminal device. The first terminal device and the second terminal device each decrement the reference count by 1, so as to subtract the extra reference count added when the first terminal device and the second terminal device establish the physical link (S1002 and S2007).

[0322] S3010. The WiFi connection module of the third terminal device sends information indicating the status of exiting the global networking to the WiFi connection module of the first terminal device.

[0323] S1026. The WiFi connection module of the first terminal device sends Response 2 to the WiFi connection module of the third terminal device. Response 2 is a response to the information indicating the status of exiting the global networking. Response 2 can be an ACK message.

[0324] S1027. The WiFi connection module of the first terminal device sends a disconnection request to the WiFi connection module of the third terminal device. The disconnection request is used to request to disconnect a physical link once. That is, the first terminal device and the third terminal device execute the disconnection logic of a physical link once.

[0325] S3011. The WiFi connection module of the third terminal device sends a disconnection response to the WiFi connection module of the first terminal device. The disconnection response indicates that the third terminal device determines to execute the disconnection logic of a physical link once.

[0326] S3012. The WiFi connection module of the third terminal device decrements the reference count by 1.

[0327] S1028. The WiFi connection module of the first terminal device decrements the reference count by 1.

[0328] Execute the disconnection logic of a physical link through the first terminal device and the third terminal device. The first terminal device and the third terminal device each decrement the reference count by 1, so as to subtract the extra reference count added when the first terminal device and the third terminal device establish the physical link (S1004 and S3001).

[0329] Optionally, the WiFi connection module of the second terminal device can exit the global networking status based on Response 2; and / or, the WiFi connection module of the third terminal device can exit the global networking status based on Response 2; and / or, the first terminal device can exit the global networking status when sending Response 2 to all GCs connected to it. In this way, when the first terminal device, the second terminal device or the third terminal device receives a connection request from other devices, it can process the connection request from other devices.

[0330] It should also be noted that the method of the embodiments of the present application has been described above by taking the establishment of a P2P direct connection between a first terminal device, a second terminal device, and a third terminal device as an example. In some implementations, the above P2P direct connection can also be replaced by a WiFi AP+STA connection, the above GO can be replaced by an AP, and the above GC can be replaced by an STA. The present application does not make specific limitations on this.

[0331] The data transmission method of the present application will be described below from the perspective of interactions between multiple devices. The devices involved below can be terminal devices, chips in terminal devices, chip systems, or processors, and can also be logic modules or software that can implement all or part of the functions of terminal devices. The hardware structure of the terminal device can be as Figure 3 shown, and the software structure can be as Figure 4 or Figure 5 shown. The present application does not make specific limitations on this.

[0332] The embodiments of the present application also provide a data transmission method 1600. The hardware structure of the devices involved can be as Figure 11 shown, and the software structure can be as Figure 12 or Figure 13 shown. As Figure 16 shown, the method 1600 includes the following steps:

[0333] S1601. Device 1 discovers online devices, and the online devices include Device 2 and Device 3.

[0334] S1602. In response to the operation of the user instructing Device 1 to establish a globally collected service, determine that Device 1 is the master device among Device 1 and the online devices.

[0335] S1603. Device 1 establishes a physical link with Device 2.

[0336] S1604. Device 1 establishes a physical link with Device 3.

[0337] It should be understood that the implementation of S1601 is similar to that of S200 to S204 in method 900; the implementation of S1602 is similar to that of S2001 to S2004 in method 1400, where device 1 can be understood as the second terminal device in method 1400, device 2 can be understood as the first terminal device in method 1400, and device 3 can be understood as the third terminal device in method 1400; the implementation of S1603 is similar to that of S1001 and S1002 and S2006 to S2008 in method 1400, where device 1 can be understood as the first terminal device in method 1400 and device 2 can be understood as the second terminal device in method 1400; the implementation of S1604 is similar to that of S1003 and S1004 and S3000 to S3002 in method 1400, where device 1 can be understood as the first terminal device in method 1400 and device 3 can be understood as the third terminal device in method 1400. Referring to the description above, it will not be elaborated here.

[0338] Optionally, after S1604, method 1600 may further include: S1605, device 1 establishes a transmission channel with device 2 and implements a global collection service with device 2; S1606, device 1 establishes a transmission channel with device 3 and implements a global collection service with device 3.

[0339] It should be understood that the implementations of S1605 and S1606 are respectively similar to those of S2020 to S2025 and S1007 to S1012 in method 1400. Referring to the description above, it will not be elaborated here.

[0340] Optionally, after device 1 establishes a global collection service with device 2 and device 3, device 1, device 2, and device 3 may exit the global networking state.

[0341] It should be understood that the implementations in which device 1, device 2, and device 3 may exit the global networking state are respectively similar to those of S2026 to S2028, S1013 to S1018, and S3010 to S3012 in method 1400. Referring to the description above, it will not be elaborated here.

[0342] The embodiment of the present application also provides a data transmission method 1700, and the hardware structure of the devices involved may be as Figure 11 shown, and the software structure may be as Figure 12 or Figure 13 shown. As Figure 17 shown, method 1700 includes the following steps:

[0343] S1701, device 4 discovers the online devices, and the online devices include device 5 and device 6.

[0344] S1702. In response to an operation of the user instructing device 4 to establish a global favorite service, determine device 6 as the master device among device 4 and the online devices.

[0345] S1703. Device 4 sends information for instructing to establish a physical link with device 4 and device 5 to device 6.

[0346] It should be understood that the information for instructing to establish a physical link with device 4 and device 5 may include information for instructing device 6 as the master device and a global networking device list. The global networking device list may include information for instructing devices that need global networking: information for instructing device 4, such as the device ID of device 4; information for instructing device 5, such as the device ID of device 5; and information for instructing device 6, such as the device ID of device 6.

[0347] S1704. In response to the information for instructing to establish a physical link with device 4 and device 5, device 6 establishes a physical link with device 5.

[0348] S1705. In response to the information for instructing to establish a physical link with device 4 and device 5, device 6 establishes a physical link with device 4.

[0349] Optionally, after S1705, method 1700 may further include: Device 4 establishes a transmission channel with device 5 and implements the global favorite service with device 5; Device 4 establishes a transmission channel with device 6 and implements the global favorite service with device 6.

[0350] Optionally, after device 6 establishes a global favorite with device 4 and device 5, device 4, device 5, and device 6 may exit the global networking state.

[0351] It should be understood that in method 1700, device 4 may be understood as the second terminal device in method 1400, device 5 may be understood as the third terminal device in method 1400, and device 6 may be understood as the first terminal device in method 1400. The implementation manners of the steps in method 1700 are similar to those of the steps in method 1400, and reference may be made to the above description, which will not be elaborated here.

[0352] It should also be understood that the magnitudes of the serial numbers of the above methods do not mean the sequence of execution. The execution sequence of each method should be determined by its function and internal logic.

[0353] It should be noted that in the embodiments of the present application, states such as the first state and the state of global networking are states in which the terminal device enters a state of executing a specific processing strategy. For example, when the terminal device enters the state of global networking, global networking will be performed, that is, the master device will establish a physical link with the remaining devices. Entering a certain state above can also be understood as the terminal device entering a certain mode, etc. The present application does not make specific limitations on this.

[0354] It should also be noted that in the embodiments of the present application, multiple devices that discover each other can be devices with Bluetooth switches and / or WiFi switches turned on and logged in to the same user account. Different from the accounts of devices used to establish WiFi direct connection, the user account here refers to the account that the user logs in to on the device to identify which user the device belongs to.

[0355] As described above in conjunction with Figures 1 to 17 , the data transmission method of the embodiments of the present application has been described in detail. Next, in conjunction with Figure 18 , the data transmission device of the embodiments of the present application will be described in detail.

[0356] Figure 18 FIG. 1800 is a schematic block diagram of a data transmission device 1800 provided in an embodiment of the present application. The device 1800 includes a processor 1801, a communication interface 1802, and a memory 1803. Among them, the processor 1801, the communication interface 1802, and the memory 1803 communicate with each other through an internal connection path. The memory 1803 is used to store instructions, and the processor 1801 is used to execute the instructions stored in the memory 1803. The communication interface 1802 can be used to send signals to other devices (such as the processor 1801 or the touch screen of the terminal device), and can also be used to receive signals from other devices (such as the memory 1803). Exemplarily, the communication interface 1802 reads the instructions stored in the memory 1803 and sends the instructions to the processor 1801.

[0357] It should be understood that the device 1800 can specifically be the terminal device or device in the above embodiments, and can be used to execute the respective steps and / or processes corresponding to the terminal device or device in the above method embodiments. Optionally, the memory 1803 may include a read-only memory and a random access memory, and provide instructions and data to the processor. A part of the memory may also include a non-volatile random access memory. For example, the memory may also store information about the device type. The processor 1801 can be used to execute the instructions stored in the memory, and when the processor 1801 executes the instructions stored in the memory, the processor 1801 is used to execute the respective steps and / or processes of the above method embodiments.

[0358] It should be understood that in the embodiments of the present application, the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0359] In the implementation process, each step of the above method may be completed by the integrated logic circuit of the hardware in the processor or the instructions in the form of software. The steps of the method disclosed in combination with the embodiments of the present application may be directly embodied as being executed and completed by the hardware processor, or executed and completed by the combination of the hardware and software modules in the processor. The software module may be located in a mature storage medium in the art such as random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, registers, etc. This storage medium is located in the memory, and the processor executes the instructions in the memory and combines its hardware to complete the steps of the above method. To avoid repetition, it will not be described in detail here.

[0360] The present application also provides a computer-readable storage medium, which is used to store a computer program, and the computer program is used to implement the method shown in the above method embodiments.

[0361] The present application also provides a computer program product, which includes a computer program (which may also be referred to as code or instructions). When the computer program runs on a computer, the computer can execute the method shown in the above method embodiments.

[0362] Those of ordinary skill in the art can realize that the modules and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professionals can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.

[0363] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the systems, devices, and modules described above can refer to the corresponding processes in the foregoing method embodiments, and will not be described in detail here.

[0364] In several embodiments provided in the present application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the modules is only a logical function division. In actual implementation, there can be other division methods. For example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections between each other can be through some interfaces. The indirect couplings or communication connections of the devices or modules can be in electrical, mechanical, or other forms.

[0365] The modules described as separate components may or may not be physically separated. The components shown as modules may or may not be physical modules, that is, they can be located in one place or distributed to multiple network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0366] In addition, in each embodiment of the present application, the various functional modules can be integrated in a processing module, or each module can exist physically alone, or two or more modules can be integrated in one module.

[0367] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs that can store program codes.

[0368] As described above, it is only the specific implementation manner of the present application, but the protection scope of the embodiments of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed in the embodiments of the present application can easily think of changes or substitutions, which should all be covered within the protection scope of the embodiments of the present application. Therefore, the protection scope of the embodiments of the present application should be subject to the protection scope of the claims.

Claims

1. A data transmission method, characterized in that, The method includes: The first device discovers the online devices, where the online devices include a second device and a third device; In response to an operation of the user to establish a first service with the online devices, the first device determines a master device from the first device and the online devices; The first device instructs the master device to establish a physical link with the remaining devices, where the remaining devices are the devices other than the master device among the online devices and the first device, and the first device is not the master device; or, the first device respectively establishes a physical link with the second device and the third device, and the first device is the master device.

2. The method according to claim 1, characterized in that, After the first device instructs the master device to establish a physical link with the remaining devices, the method further includes: Receiving first information from the master device, where the first information is used to indicate that the physical link between the master device and the remaining devices is established; In response to the first information, the first device establishes the first service with the online devices.

3. The method according to claim 2, wherein After the first device establishes the first service with the online devices, the method further includes: Sending information for instructing to exit a first state to the master device, where the first state is the state in which the master device establishes a physical link with the remaining devices; Receiving a first response from the master device and exiting the first state.

4. The method according to claim 1, wherein After the first device respectively establishes a physical link with the second device and the third device, the method further includes: The first device establishes the first service with the online devices.

5. The method according to claim 4, characterized in that After the first device establishes the first service with the online devices, the method further includes: The first device respectively receives information for instructing to exit a first state from the second device and the third device, where the first state is the state in which the master device establishes a physical link with the remaining devices; In response to the information for instructing to exit the first state from the second device and the third device, the first device exits the first state.

6. The method according to any one of claims 2 to 5, characterized in that The first device establishing the first service with the online devices includes: The first device establishes a first transmission channel with the second device; The first device uses the first transmission channel to send data of the first service to the second device; The first device establishes a second transmission channel with the third device; The first device uses the second transmission channel to send data of the first service to the third device.

7. The method according to claim 6, characterized in that, The first device establishing the first transmission channel with the second device includes: The first device sends information for instructing to multiplex a physical link to the second device; Receiving information for indicating successful physical link multiplexing from the second device, where the information for indicating successful physical link multiplexing carries information for indicating the Internet Protocol (IP) of the second device; In response to the information for indicating successful physical link multiplexing, sending information for instructing to establish a transmission channel to the second device, where the information for instructing to establish a transmission channel carries information for indicating the IP of the first device; Receive information from the second device indicating successful establishment of a transmission channel.

8. The method according to any one of claims 1 to 7, characterized in that, The master device satisfies one or more of the following conditions: The master device is set with the ability to be the master device in a group; The master device is the device with the largest Media Access Control (MAC) address among the first device and the online devices; The master device is the device with the lowest power consumption per unit time among the first device and the online devices; The master device belongs to the master device in the first group, and the first group is a group established before the first device determines the master device from the first device and the online devices; or, The master device is a plugged-in device.

9. The method according to any one of claims 1 to 8, characterized in that The first device includes a first intelligent interconnection and a first Wireless Fidelity (WiFi) connection module; The first device determines the master device from the first device and the online devices, including: The first intelligent interconnection sends information indicating the first device and the online devices to the first WiFi connection module; The first WiFi connection module determines the master device from the first device and the online devices.

10. The method according to claim 9, characterized in that, The master device includes a second WiFi connection module; The first device instructs the master device to establish a physical link with the remaining devices, including: The first WiFi connection module sends information indicating global networking to the second WiFi connection module. The information indicating global networking carries information indicating each device among the remaining devices, and the global networking means that the master device establishes a physical link with the remaining devices.

11. The method according to claim 10, wherein The physical link between the master device and the first device is established through the first WiFi connection module and the second WiFi connection module.

12. An electronic device, characterized in that, Includes a module for executing the method according to any one of claims 1 to 11.

13. An electronic device, characterized in that, Includes: A processor coupled to a memory. The memory is used to store a computer program. When the processor calls the computer program, the electronic device executes the method according to any one of claims 1 to 11.

14. A computer-readable storage medium, characterized in that, For storing a computer program, the computer program includes instructions for implementing the method according to any one of claims 1 to 11.

15. A chip system, characterized in that, Includes at least one processor and a communication interface. The communication interface and the at least one processor are interconnected by a line. The at least one processor is used to run a computer program or instructions to execute the method according to any one of claims 1 to 11.

16. A computer program product, characterized in that, The computer program product includes computer program code. When the computer program code runs on a computer, the computer implements the method according to any one of claims 1 to 11.