Communication connection method

By establishing P2P channels between multiple electronic devices, control information sharing connections are quickly established, which solves the time-consuming problem of classic Bluetooth basic rate channels and improves connection speed and user experience.

CN118555683APending Publication Date: 2024-08-27HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310227235.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-02-27
Publication Date
2024-08-27

AI Technical Summary

Technical Problem

In scenarios where multiple electronic devices are used, when establishing a control information sharing connection, the classic Bluetooth basic rate (BR) channel takes a long time and the data transmission rate is not high, which affects the user experience.

Method used

By establishing a P2P channel between the first device and the second device, sending a request to create a control information sharing service, and using the P2P channel to transmit data to reduce the negotiation interaction process and avoid the interaction process of the BR connection, thereby quickly establishing a control information sharing connection. .

Benefits of technology

It significantly reduces the time required to establish a control information sharing connection and improves user experience. The high data transmission rate through the P2P channel is superior to that of the BR channel, enabling faster connection establishment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118555683A
    Figure CN118555683A
Patent Text Reader

Abstract

The embodiment of the invention discloses a communication connection method, relates to the technical field of electronic equipment, and can realize rapid establishment of DMSG connection between first equipment and second equipment and reduce time consumption. According to the specific scheme, the method is applied to a first device, and the method is used for establishing DMSG connection between the first device and a second device to carry out data transmission between services. And the first device sends a first request to the second device through the first P2P channel, wherein the first request is used for indicating the second device to create the first DMSG service. The first P2P channel is a data transmission channel of the first P2P connection established between the first device and the second device. And the first equipment receives a first response, wherein the first response comprises a first port address corresponding to the first DMSG service. And the first equipment establishes DMSG connection with the second equipment through the first port address.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of electronic equipment, and in particular to a communication connection method. Background Art

[0002] In the scenario where multiple electronic devices are used, a communication connection can be established between electronic devices. Through the minimalist protocol stack message transmission module in the communication connection, hereinafter referred to as the message transmission module, data transmission between services can be performed, which is convenient for user operation. The multi-electronic device may include a first device and a second device. Before establishing a message transmission module connection between the first device and the second device, a physical channel, such as a classic Bluetooth basic rate (Basic Rate, BR) channel, needs to be established first. Based on the BR channel, the first device and the second device negotiate to establish a peer-to-peer (Peer to Peer, P2P) connection, and negotiate to establish a control information sharing connection. Among them, the control information sharing connection may include a minimalist protocol stack message transmission module connection DMSG, etc. for sharing control information input by users among multiple devices.

[0003] Since it takes a long time to establish the BR channel and the data transmission rate based on the BR channel is not high, the overall time consumed when establishing a control information sharing connection between the first device and the second device is relatively long, affecting the user experience. Summary of the invention

[0004] The embodiment of the present application provides a communication connection method, which can realize rapid establishment of a DMSG connection between a first device and a second device, thereby reducing time consumption.

[0005] In order to achieve the above purpose, the embodiment of the present application adopts the following technical solution:

[0006] In a first aspect, a communication connection method is provided, the method is applied to a first device, the method is used to establish a control information sharing connection between the first device and the second device, and the control information sharing connection is used for data transmission between the services of the first device and the second device. The method includes: the first device sends a first request to the second device through a first P2P channel, and the first request is used to instruct the second device to create a first control information sharing service. The first P2P channel is a data transmission channel for the first P2P connection established between the first device and the second device. The first device receives a first response, and the first response includes a first port address corresponding to the first control information sharing service. The first device establishes a control information sharing connection with the second device through the first port address. The first port address is the port address corresponding to the first control information sharing service.

[0007] In the above scheme, the first device sends a request to create a first control information sharing service to the second device through the first P2P channel. Since the data transmission rate of the first P2P channel is better than that of the BR channel, the time for the first device to send the request to create the first control information sharing service is reduced.

[0008] Optionally, the first P2P connection corresponding to the first P2P channel is a P2P connection that has been established before the first device sends the first request.

[0009] Optionally, the first request is also used to instruct the second device to reuse the first P2P channel. The first response is also used to indicate confirmation of multiplexing the first P2P channel. The first device combines the request to reuse the first P2P channel and to create a first control information sharing service, and sends it to the second device through the first P2P channel. As a result, only one negotiation and interaction process is required between the first device and the second device to establish a control information sharing connection. At the same time, the interaction process of performing a BR connection is avoided, which greatly reduces the time spent on establishing the control information sharing connection.

[0010] Optionally, the method further includes: the first device adding 1 to a reference count of the first P2P channel according to the first response.

[0011] Optionally, before the first device sends the first request, the method further includes: the first device sends a second request to the second device through the first P2P channel, the second request is used to indicate the reuse of the first P2P channel. The first device receives a second response, the second response is used to confirm the reuse of the first P2P channel. The first device increases the reference count of the first P2P channel by 1. In the above scheme, through the first P2P channel, the first device sends a request to the second device to reuse the first P2P channel. Since the data transmission rate of the first P2P channel is better than that of the BR channel, the time consumption of P2P multiplexing is reduced.

[0012] Optionally, the first P2P connection corresponding to the first P2P channel is a P2P connection that has been established before the first device sends the second request.

[0013] Optionally, a classic Bluetooth basic rate BR physical channel is established between the first device and the second device. The first device sends a third request to the second device through the BR physical channel, and the third request is used to establish the first P2P connection. The third request includes an identifier of the first device and first channel information. The first channel information is the channel information of the available P2P connection of the first device. The first device receives a third response, and the third response is used to indicate confirmation that the first channel information is used for the first P2P connection. The first device establishes the first P2P connection with the second device through the channel indicated by the first channel information.

[0014] Optionally, the first P2P channel is a TCP channel.

[0015] In a second aspect, a P2P communication method is provided, which is applied to a second device, and is used to establish a control information sharing connection between the second device and the first device, and the control information sharing connection is used for data transmission between the services of the second device and the first device. The method includes: the second device receives a first request, and the first request is used to instruct the second device to create a first control information sharing service. The second device sends a first response to the first device through a first P2P channel, and the first response includes a first port address corresponding to the first control information sharing service. The first control information sharing service is created by the second device according to the first request. The first P2P channel is a data transmission channel of the first P2P connection established between the second device and the first device.

[0016] In the above scheme, the second device sends a response to the first device for creating a first control information sharing service through the first P2P channel. Since the data transmission rate of the first P2P channel is better than that of the BR channel, the time for the second device to send a response to create the first control information sharing service is reduced.

[0017] Optionally, the first P2P connection corresponding to the first P2P channel is a P2P connection that has been established before the second device sends the first response to the first device.

[0018] Optionally, the first request is also used to instruct the second device to reuse the first P2P channel. The first response is also used to indicate confirmation of multiplexing the first P2P channel. In the above scheme, the second device combines the response of multiplexing the first P2P channel and creating the first control information sharing service, and sends it to the first device through the first P2P channel. As a result, only one negotiation and interaction process is required between the second device and the first device to establish a control information sharing connection. At the same time, the interaction process of performing a BR connection is avoided, which greatly reduces the time spent on establishing the communication connection.

[0019] Optionally, the second device increases the reference count of the first P2P channel by 1 according to the first request.

[0020] Optionally, before the second device sends a first response to the first device through the first P2P channel, the method further includes: the second device receives a second request, the second request is used to indicate the reuse of the first P2P channel. The second device increases the reference count of the first P2P channel by 1. The second device sends a second response to the first device through the first P2P channel, the second response is used to confirm the reuse of the first P2P channel. In the above scheme, through the first P2P channel, the second device sends a response to the first device confirming the reuse of the first P2P channel. Since the data transmission rate of the first P2P channel is better than that of the BR channel, the time consumption of P2P multiplexing is reduced.

[0021] Optionally, the first P2P connection corresponding to the first P2P channel is a P2P connection that has been established before the second device sends the second response to the first device.

[0022] Optionally, a BR physical channel is established between the second device and the first device. The second device receives a third request, and the third request is used to establish the first P2P connection. The third request includes an identifier of the first device and first channel information. The first channel information is channel information of an available P2P connection of the first device. The second device sends a third response to the first device through the BR physical channel, and the third response is used to indicate confirmation that the first channel information is used for the first P2P connection.

[0023] Optionally, the first P2P channel is a TCP channel.

[0024] In a third aspect, an electronic device is provided, the electronic device comprising one or more processors and one or more memories. The one or more memories are coupled to the one or more processors, and the one or more memories store computer instructions. When the one or more processors execute the computer instructions, the electronic device performs the communication connection method provided in the first aspect and any possible design thereof.

[0025] In a fourth aspect, an electronic device is provided, the electronic device comprising one or more processors and one or more memories. The one or more memories are coupled to the one or more processors, and the one or more memories store computer instructions. When the one or more processors execute the computer instructions, the electronic device performs the communication connection method provided in the second aspect and any possible design thereof.

[0026] In a fifth aspect, a communication system is provided, the communication system comprising a first device and at least one second device. The first device is used to execute the communication connection method provided in the first aspect and any possible design thereof, and the second device is used to execute the communication connection method provided in the second aspect and any possible design thereof.

[0027] In a sixth aspect, a computer-readable storage medium is provided, which includes computer instructions. When the computer instructions are executed, the communication connection method provided in the first aspect and any one of its optional designs is executed.

[0028] In a seventh aspect, a computer program product is provided, wherein the computer program includes instructions, and when a computer runs the instructions, the communication connection method provided in the first aspect and any one of its optional designs is executed.

[0029] In an eighth aspect, a chip system is provided, the chip system comprising a processor and a communication interface. The processor is used to call and run a computer program stored in a storage medium from a storage medium, and execute a communication connection method as provided in any one of the first aspect and its optional designs.

[0030] It can be understood that the technical solutions provided in the third to eighth aspects above can respectively correspond to the communication connection methods provided in the aforementioned designs, and the beneficial effects that can be obtained are similar and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 A schematic diagram of an electronic device interface;

[0032] Figure 2 is a schematic diagram of another electronic device interface;

[0033] Figure 3 A schematic diagram of a communication connection method;

[0034] Figure 4 A schematic diagram of the composition of an electronic device provided in an embodiment of the present application;

[0035] Figure 5 A schematic diagram of the composition of a first device provided in an embodiment of the present application;

[0036] Figure 6 A schematic diagram of the composition of a second device provided in an embodiment of the present application;

[0037] Figure 7 A schematic diagram of a communication connection method provided in an embodiment of the present application;

[0038] Figure 8 A schematic diagram of another communication connection method provided in an embodiment of the present application;

[0039] Fig. 9 A schematic diagram of another communication connection method provided in an embodiment of the present application;

[0040] Fig.10 A schematic diagram of another communication connection method provided in an embodiment of the present application;

[0041] Fig.11 A schematic diagram of another communication connection method provided in an embodiment of the present application;

[0042] Fig.12 A schematic diagram of another communication connection method provided in an embodiment of the present application;

[0043] Fig.13 A schematic diagram of the composition of an electronic device provided in an embodiment of the present application;

[0044] Fig.14 A schematic diagram of another electronic device provided in an embodiment of the present application;

[0045] Fig.15 A schematic diagram of the composition of a chip system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0046] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this embodiment, unless otherwise specified, "plurality" means two or more.

[0047] In a scenario where multiple electronic devices are used, data can be exchanged between electronic devices by establishing communication connections, thereby facilitating user operations.

[0048] Exemplarily, multiple electronic devices provide super keyboard and mouse functions based on communication connections, so that users can control multiple electronic devices or input information through one input device.

[0049] Taking the multi-electronic device including two electronic devices as an example, the realization and effect of the super keyboard and mouse function are illustrated.

[0050] Exemplarily, the two electronic devices may include a first device and a second device. A communication connection may be established between the first device and the second device, and the communication connection may be used to transmit input information. The input information may be control information or keyed information input by a user through an input device (such as a keyboard, a mouse, a touchpad, etc.) of the first device. In this way, the input information on the first device may be transmitted to the second device based on the communication connection, thereby enabling the user to control the second device through the input device of the first device.

[0051] It can be understood that the input device of the first device can be built-in or external.

[0052] Taking the first device as a laptop, the second device as a tablet, and the input device of the first device including a touchpad provided on the laptop as an example, the specific implementation of the super keyboard and mouse function is described.

[0053] For example, refer to Figure 1 In the case where the laptop computer and the tablet computer have not established a communication connection, the user can input an operation 101 through the touch pad of the laptop computer to control the position of the cursor on the display screen. At this time, the cursor of the laptop computer moves from the initial position 102 to the position 103. That is, the touch pad of the laptop computer can only control the laptop computer.

[0054] like Figure 2 As shown, when a communication connection is established between the laptop computer and the tablet computer, the laptop computer and the tablet computer can realize the super keyboard and mouse function based on the communication connection. For example, when a user inputs an operation 101 through the touch pad of the laptop computer, the mouse cursor of the tablet computer can correspondingly move from the initial position 104 to the position 105. That is, the touch pad of the laptop computer can also control the tablet computer.

[0055] Similarly, input information from the keyboard, mouse, etc. of the laptop computer can also be transmitted to the tablet computer based on the communication connection to achieve control of the second device.

[0056] Between two devices that have established a communication connection, data such as input information can be transmitted through the DMSG connection in the communication connection. The DMSG connection is based on a P2P connection, and the P2P connection provides a communication port for data transmission of the DMSG connection. For example, the DMSG connection can be a User Datagram Protocol (UDP) connection based on a P2P connection. It should be noted that the DMSG connection in the embodiment of the present application may be an implementation of a P2P connection, and the DMSG connection can be used to realize the sharing of control information between multiple devices after the user inputs control information to a certain device. In other embodiments of the present application, the P2P connection that can realize the above-mentioned control information sharing function may also be referred to as a control information sharing connection. That is, in the present application, the control information sharing connection may include a P2P connection such as a DMSG connection that has the above-mentioned control information sharing capability. In the following example, the control information sharing connection is taken as an example as a DMSG connection.

[0057] Before the DMSG connection is established, the two devices need to perform device-level authentication. The device-level authentication method can include certificate authentication and key authentication. Through device-level authentication, the two devices can achieve identity authentication and secure connection. This facilitates data transmission between the two devices during the subsequent DMSG connection establishment process.

[0058] Exemplarily, the first device and the second device may establish a Bluetooth Low Energy (BLE) connection, and perform device-level authentication based on the BLE connection.

[0059] For example, the first device sends broadcast data through the broadcast channel of BLE. In some implementations, the broadcast data may include the device name of the first device and the media access control (MAC) address corresponding to the Bluetooth of the first device. The broadcast data can be used to establish a BLE connection. The second device receives the broadcast data by monitoring and establishes a BLE connection with the first device. Based on the BLE connection, the first device and the second device can perform device-level authentication.

[0060] Therefore, after completing the device-level authentication, the first device can establish a DMSG connection with the second device.

[0061] The following combination Figure 3 , a method for establishing a DMSG between a first device and a second device is described. Figure 3 FIG. 1 is a flow chart of a method for establishing a DMSG connection. Figure 3 As shown, the method may include:

[0062] S301: A physical channel is established between a first device and a second device.

[0063] Exemplarily, the physical channel established between the first device and the second device may be a BR channel.

[0064] For example, the first device may send a request to establish a BR connection to the second device. In some implementations, the first device may send its Bluetooth MAC address, second channel information, etc. to the second device to request to establish a BR connection.

[0065] Taking the establishment of a BR channel as an example, after the second device receives the request to establish a BR connection sent by the first device, it obtains the Bluetooth MAC address and second channel information of the first device. Based on the MAC address and second channel information of the first device, the second device can establish a BR connection with the first device. The BR connection can correspond to a BR channel.

[0066] In some implementations, during the process of establishing a BR connection between the first device and the second device, BR channel authentication and session establishment and other interactive processes may also be performed. In this way, the first device and the second device can transmit data more securely and reliably through the BR channel.

[0067] Through the BR channel, the first device and the second device can continue to establish a P2P connection through S302.

[0068] S302: The first device negotiates P2P information with the second device.

[0069] Exemplarily, taking the BR channel as an example, the first device can send a request to establish a P2P connection to the second device through the BR channel. In some implementations, the request may include the identifier of the first device, the first channel information, the MAC address of the P2P, and role negotiation information, etc. The first channel information is the channel information of the P2P connection available to the first device.

[0070] In some embodiments of the present application, after receiving the request sent by the first device, the second device performs P2P connection processing. The P2P connection processing may include confirming the channel used by the P2P connection, and confirming the group owner (GroupOwner, GO), the group client (GroupClient, GC), etc.

[0071] It is understandable that, in the above negotiation information, the first channel information of the first device, the MAC address of the P2P and the role negotiation information etc. can also be sent multiple times. Similarly, the response corresponding to the request can also be sent multiple times.

[0072] Through S302, the first device and the second device may establish a P2P connection. The P2P connection provides a communication port for data transmission between the first device and the second device. Based on the P2P connection, the first device and the second device may also perform step S303 to establish a DMSG connection between the first device and the second device. In this way, the input information of the super keyboard and mouse may be transmitted through the DMSG connection.

[0073] S303: The first device negotiates DMSG with the second device.

[0074] Exemplarily, the first device may send a request for negotiating DMSG to the second device through the physical channel established in S301, so as to instruct the second device to create a DMSG service. After the second device receives the request for negotiating DMSG sent by the first device, in response to the request, the second device may create a DMSG service in the DMSG module.

[0075] As an implementation, the second device may send a response message to the first device through the physical channel established in S301. The response message may include the port address of the DMSG service.

[0076] It is understandable that after receiving the port address of the DMSG service of the second device, the first device can connect to the DMSG service through the port address of the DMSG service of the second device, that is, a DMSG connection is established between the first device and the second device.

[0077] Through the above S301 to S303, the first device and the second device can complete the DMSG connection.

[0078] Combination Figure 3 According to the description, when establishing a DMSG connection between the first device and the second device, a BR connection such as S301 needs to be performed first. Then, based on the BR channel on the BR connection, two negotiation interactions such as S302 and S303 are performed. Since it takes a long time to establish the BR connection and the data transmission rate based on the BR channel is not high, the overall time consumed when establishing the DMSG connection is relatively long, which affects the user experience.

[0079] The embodiment of the present application provides a communication connection method, wherein a DMSG negotiation is performed between a first device and a second device through a P2P channel. When a P2P connection is established between the first device and the second device, the P2P channel can be obtained by reusing an existing P2P channel. When a P2P connection is not established between the first device and the second device, the P2P channel is obtained by creating a new P2P connection.

[0080] It should be noted that if a P2P connection is established between the first device and the second device, the P2P connection corresponds to a P2P channel. For example, the P2P channel may be a TCP channel.

[0081] The communication connection method is described in detail below with reference to the accompanying drawings.

[0082] Exemplarily, the solution provided in the embodiment of the present application can be used to quickly establish a DMSG connection between a first device and a second device. The first device and the second device can both be electronic devices. The specific implementations of the first device and the second device can be the same or different.

[0083] The electronic device in the embodiments of the present application may be a mobile phone, a tablet computer, a desktop, a laptop, a handheld computer, a notebook computer, a vehicle-mounted device, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) or a virtual reality (VR) device, etc. The embodiments of the present application do not impose any special restrictions on the specific form of the electronic device.

[0084] As an implementation, the structure of the electronic device may have the following Figure 4 The structure of the electronic device 400 is shown. Figure 4 The illustrated components may be applied to the electronic devices (such as the first device and / or the second device) involved in the embodiments of the present application.

[0085] like Figure 4 As shown, the electronic device 400 may include a processor 410, an external memory interface 420, an internal memory 421, a universal serial bus (USB) connector 430, a charging management module 440, a power management module 441, a battery 442, an antenna 1, an antenna 2, a mobile communication module 450, a wireless communication module 460, an audio module 470, a speaker 470A, a receiver 470B, a microphone 470C, an earphone interface 470D, a sensor module 480, a button 490, a motor 491, an indicator 492, a camera module 493, a display screen 494, and a subscriber identification module (SIM) card interface 495, etc. The sensor module 480 may include a pressure sensor 480A, a gyroscope sensor 480B, an air pressure sensor 480C, a magnetic sensor 480D, an acceleration sensor 480E, a distance sensor 480F, a proximity light sensor 480G, a fingerprint sensor 480H, a temperature sensor 480J, a touch sensor 480K, an ambient light sensor 480L, a bone conduction sensor 480M, etc.

[0086] It is understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 400. In other embodiments of the present application, the electronic device 400 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0087] The processor 410 may include one or more processing units, for example, the processor 410 may include an application processor (AP), a modem processor, a graphics processor (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), etc. Among them, different processing units may be independent devices or integrated in one or more processors.

[0088] The processor can generate operation control signals based on instruction opcodes and timing signals to complete the control of instruction fetching and execution.

[0089] The processor 410 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 410 may be a cache memory. The memory may store instructions or data that have been used or are frequently used by the processor 410. If the processor 410 needs to use the instruction or data, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 410, and thus improves the efficiency of the system.

[0090] In some embodiments, the processor 410 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc. The processor 410 may be connected to a touch sensor, an audio module, a wireless communication module, a display, a camera, and other modules through at least one of the above interfaces.

[0091] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the electronic device 400. In other embodiments of the present application, the electronic device 400 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0092] It should be noted that the above Figure 4 The electronic device components shown are only examples and do not constitute a limitation on the electronic device involved in the technical solution provided in the embodiment of the present application. The embodiment of the present application does not limit the specific components of the electronic device.

[0093] In other embodiments, from the perspective of software composition, an operating system may be run in the electronic device (such as the first device and / or the second device) involved in the embodiments of the present application, and the operating system may be Or other operating systems. The operating system can have a layered architecture. The layered architecture divides the software into several layers, each with a clear role and division of labor. The layers communicate with each other through software interfaces.

[0094] Exemplarily, the first device is running Take operating system as an example. Figure 5 As a possible implementation, the first device may be: Figure 1 or Figure 2 Laptop shown.

[0095] like Figure 5 As shown, the first device The operating system can generally be divided into kernel mode (Kernel Mode l) and user mode (User Mode l).

[0096] The code running in kernel mode may include core code, which is safe and will not be attacked maliciously. The code running in user mode (such as application code) is relatively less secure and vulnerable to attacks. In some implementations, the code running permissions in user mode are restricted to improve system security. In addition, if the application performs some actions such as directly accessing physical memory, it needs to make a request to the component in kernel mode. In this example, kernel mode can correspond to the operating environment of operating system-level code, and user mode can correspond to the operating environment of application programs.

[0097] As an implementation, the kernel mode and the user mode can be distributed in different privileged layers of the central processing unit (CPU) of the first device to cope with different operation requirements. The CPU has multiple privileged layers, for example, The 386 CPU can include 4 privilege levels: from level 0 to level 3. Level 0 has the highest privilege, which means that any code can be executed. Level 3 has the lowest privilege and can only execute limited code. Then, kernel mode can run in CPU level 0, and user mode can run in CPU level 3.

[0098] In this example, the first device can run The operating system provides various functions to the user. Exemplarily, an application program (such as application A) may be provided in the user mode. Different applications may be used to provide different functions. The application program may call the software / hardware of the first device to implement its respective functions by calling various components in the kernel mode.

[0099] In some embodiments, the user mode in the first device may also include other components. For example, the user mode may be provided with subsystems corresponding to various applications, and the subsystems may include win32, POSIX, OS / 2, etc. When an application (such as application A) is running, it may call the application programming interface (API) in the corresponding subsystem to achieve internal communication with the kernel mode. For example, the second application calls the API function of the win32 subsystem, and the Win32 subsystem converts the API function into a native API (Nat ive API). The Nat ive API may correspond to a system service function, and the system service function may be passed to the module in the kernel mode that calls the response to achieve the corresponding function.

[0100] As another example, the second device is running Take operating system as an example. Figure 6 As a possible implementation, the second device may be: Figure 2 Tablet computer shown.

[0101] like Figure 6 As shown, in the second device An operating system may have a layered architecture, which includes, from top to bottom, the application layer, the application framework layer, the Android runtime (ART) and system libraries, the hardware abstraction layer (HAL), and the kernel layer.

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

[0103] like Figure 6 As shown, the application layer may include applications such as music, video, call, ringtone, alarm, Bluetooth, navigation, video, gallery, application B, etc.

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

[0105] like Figure 6 As shown, the application framework layer may include a window manager, a content provider, a view system, a resource manager, a notification manager, an activity manager, an input manager, and the like.

[0106] The window manager provides window management services (WMS). WMS can be used for window management, window animation management, surface management, and as a transfer station for the input system.

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

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

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

[0110] The activity manager can provide activity management services (AMS), which can be used to start, switch, and schedule system components (such as activities, services, content providers, and broadcast receivers) as well as manage and schedule application processes.

[0111] The input manager can provide input management services (IMS), which can be used to manage system input, such as touch screen input, key input, sensor input, etc. IMS takes events from input device nodes and distributes them to appropriate windows through interaction with WMS.

[0112] The Android runtime includes the core library and the Android runtime. The Android runtime is responsible for converting source code into machine code. The Android runtime mainly uses the ahead-of-time (AOT) compilation technology and the just-in-time (JIT) compilation technology.

[0113] The core library is mainly used to provide basic Java class library functions, such as basic data structures, mathematics, IO, tools, databases, networks, etc. The core library provides an API for users to develop Android applications.

[0114] The system library can include multiple functional modules, such as surface manager, media framework, media library, and OpenGL ES.

[0115] The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications. The media framework supports playback and recording of multiple common audio and video formats, as well as static image files. The media library can support multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc. OpenGL ES provides drawing and operation of 2D and 3D graphics in applications.

[0116] The hardware abstraction layer runs in user space, encapsulates kernel layer drivers, and provides a calling interface to the upper layer.

[0117] The kernel layer is the layer between hardware and software. The kernel layer includes at least display driver, audio driver, and Bluetooth driver.

[0118] The first device has Figure 5 The software architecture shown in FIG. 1 is as follows: Figure 6 Taking the software architecture shown as an example, the interaction between the first device and the second device to establish a DMSG connection is described.

[0119] For example, the first device and the second device are connected as follows: Figure 3 Take the DMSG connection in as an example.

[0120] Combination Figure 5 and Figure 6 According to the description, application A is installed in the first device, and application B is installed in the second device. Application A and application B can be used to provide super keyboard and mouse functions.

[0121] For example, the first device runs application A, which calls The system's native API (Native API). The Native API corresponds to the system service function, which is then passed to the module in kernel mode to call the response and initiate a request to establish a DMAG connection with the second device. The second device receives the DMAG connection request and The driver of the corresponding module in the system kernel layer passes the relevant instructions or data to application B through the hardware abstraction layer, system library, application framework layer, and application layer in sequence.

[0122] The following embodiments can be applied to Figures 4 to 6 In any electronic device shown in .

[0123] The first device has Figure 5 The software architecture shown in FIG. 1 is as follows: Figure 6 Taking the software architecture shown as an example, the solution provided by the embodiment of the present application is explained.

[0124] Exemplary, reference Figure 7 In the case where a P2P connection is established between the first device and the second device, the first device and the second device can establish a DMSG connection through this process to implement a super keyboard and mouse function between the first device and the second device. Figure 7 As shown, the program may include:

[0125] S701: A first device sends a P2P multiplexing negotiation request to a second device through a P2P channel.

[0126] In some embodiments of the present application, the request indicated by S701 may also be referred to as a second request, and the P2P channel may also be referred to as a first P2P channel.

[0127] It should be noted that when the first device detects that there is a P2P connection between the first device and the second device, the first device starts the negotiation process of S701 when confirming that the P2P connection is valid.

[0128] Understandably, reference Figure 8 , multiple service processes can be carried out simultaneously between the first device and the second device, and the multiple service processes may include service A and service B. Among them, service A needs to perform data transmission based on P2P connection to realize the corresponding function. Service B can be used to realize the super keyboard and mouse function.

[0129] Exemplarily, when the first device detects that there is an existing P2P connection between the first device and the second device, the first device sends a request for negotiating P2P multiplexing to the second device based on the P2P channel corresponding to the existing P2P connection.

[0130] For example, when the first device detects that a P2P connection of service A is established between the first device and the second device, the first device can send a request for negotiating P2P reuse to the second device based on the P2P channel corresponding to the P2P connection, such as a TCP channel. The P2P reuse request is used to instruct the second device to increase the reference count of the P2P channel of service A by 1.

[0131] In some embodiments of the present application, when the second device receives the request of S701, it executes S702, that is, the reference count of the existing P2P channel is increased by 1. For example, the second device increases the reference count of the P2P channel of the above service A by 1. In this way, the second device can maintain the P2P connection and will not actively close it.

[0132] In some embodiments of the present application, after the second device completes the operation of S702, it may proceed to S703.

[0133] S703: The second device sends a negotiation P2P multiplexing response to the first device through the P2P channel.

[0134] In some embodiments of the present application, the response indicated by S703 may also be referred to as a second response, and the P2P channel may also be referred to as a first P2P channel.

[0135] Exemplarily, the second device may send a P2P multiplexing response message to the first device based on an existing P2P channel.

[0136] For example, a P2P connection for service A is established between the first device and the second device. The second device can send an identification of successful reference counting of the P2P channel of service A as a response message to the first device based on the P2P channel of service A, such as a TCP channel.

[0137] In some embodiments of the present application, after receiving the response message of S703, the first device executes S704, that is, the reference count of the existing P2P connection is increased by 1. For example, the first device increases the reference count of the P2P channel of the above service A by 1. In this way, the first device can maintain the P2P connection and will not actively close it.

[0138] In this example, through S701 to S704, a P2P channel of service B may correspond between the first device and the second device.

[0139] In some embodiments of the present application, the first device and the second device may further continue to perform the operation of S705 to complete the DMSG connection between the first device and the second device.

[0140] S705: The first device and the second device negotiate DMSG through a P2P channel.

[0141] As an implementation method, through the P2P channel multiplexed from S701 to S704, such as a TCP channel, the first device sends a request for negotiating DMSG to the second device, for instructing the second device to create a DMSG service. In some embodiments of the present application, the request may also be referred to as a first request, and the DMSG service may also be referred to as a first DMSG service.

[0142] Exemplarily, after the second device receives the request for negotiating DMSG sent by the first device, in response to the request, the second device can create a DMSG service in the DMSG module. The DMSG service can be used to monitor data on the P2P connection. Through the multiplexed P2P channel, the second device sends the port address of the DMSG service as a response to the first device. In some embodiments of the present application, the response may also be referred to as a first response, and the port address may also be referred to as a first port address.

[0143] It is understandable that after receiving the port address of the DMSG service of the second device, the first device can connect to the DMSG service through the port address of the DMSG service of the second device, that is, a DMSG connection is established between the first device and the second device.

[0144] Through the above S701 to S705, the first device and the second device reuse the existing P2P channel and negotiate DMSG through the P2P channel, so that the DMSG connection of service B between the first device and the second device can be established. In this way, the interaction process such as S301 is avoided, that is, the operation of establishing a BR connection is reduced. At the same time, the speed of data transmission of the P2P channel is better than that of the BR channel. In addition, the time to establish a DMSG connection between the first device and the second device is reduced as a whole.

[0145] In the above implementation, the first device and the second device need to first perform a negotiation interaction for P2P multiplexing and then perform a negotiation interaction for DMSG, that is, two negotiation interaction processes need to be performed.

[0146] In another implementation of the embodiment of the present application, the two interaction processes of P2P multiplexing and DMSG negotiation can be combined between the first device and the second device, that is, the first device and the second device only need to perform one negotiation interaction process to establish a DMSG connection.

[0147] Exemplary, reference Fig. 9 In the case where there is already a P2P connection between the first device and the second device, the first device and the second device can also establish a DMSG connection through this process. Fig. 9 As shown, the program may include:

[0148] S901. The first device sends a request for negotiation A to the second device through a P2P channel.

[0149] In some embodiments of the present application, the request indicated by S901 may also be referred to as a first request, and the P2P channel may also be referred to as a first P2P channel.

[0150] Exemplarily, when the first device detects that there is an existing P2P connection between the first device and the second device, based on the existing P2P channel, the first device sends a request for negotiation A to the second device. The negotiation A may include negotiating DMSG and negotiating P2P multiplexing. The request for negotiating DMSG is used to instruct the second device to create a DMSG service, and the request for P2P multiplexing is used to instruct the second device to add 1 to the reference count of the existing P2P channel.

[0151] For example, refer to Figure 8 , the first device detects that a P2P connection of service A is established between the first device and the second device, then the first device can send the request for negotiating DMSG and negotiating P2P multiplexing based on the P2P channel of service A, such as a TCP channel.

[0152] In some embodiments of the present application, after the second device receives the request of S901, in response to the request, the second device executes S902. That is, the second device adds 1 to the reference count of the existing P2P channel, so that the second device can maintain the P2P connection. In addition, the second device executes S903. That is, the second device creates a DMSG service in the DMSG module.

[0153] After the second device completes the operations of S902 and S903, it may proceed to S904.

[0154] S904: The second device sends a response of negotiation A to the first device through the P2P channel.

[0155] In some embodiments of the present application, the response indicated by S904 may also be referred to as a first response, and the P2P channel may also be referred to as a first P2P channel.

[0156] Exemplarily, the second device may combine the identification of successful reference counting of the existing P2P channel and the port address of the DMSG service created in S903 as a response message based on the existing P2P channel, and send the response message to the first device.

[0157] In some embodiments of the present application, after receiving the response message of S904, the first device executes S905, that is, adding 1 to the reference count of the existing P2P channel. In this way, the first device can maintain the P2P connection.

[0158] It can be understood that after the first device and the second device both complete the operation of adding 1 to the reference count of the existing P2P channel, the first device and the second device establish a P2P channel with service B.

[0159] In some embodiments of the present application, the first device may further continue to execute S906. That is, after the first device obtains the port address of the DMSG service of the second device, the first device may connect to the DMSG service. That is, a DMSG connection of service B is established between the first device and the second device.

[0160] Through S901 to S906, the first device and the second device reuse the P2P channel based on the P2P channel of service A, and merge the interaction processes of negotiating P2P multiplexing and negotiating DMSG, and establish the DMSG connection of service B. In this way, the number of interactions of negotiation messages is compressed, 50% of the negotiation processes are removed, and the time to establish the DMSG connection is greatly reduced.

[0161] In the above embodiment, the first device and the second device establish a DMSG connection through an existing P2P connection.

[0162] In another embodiment of the present application, when a P2P connection is not established between the first device and the second device, the first device and the second device negotiate DMSG based on a P2P channel corresponding to the newly created P2P connection to establish a DMSG connection.

[0163] Exemplary, reference Fig.10 , the method may include:

[0164] S1001. A physical channel is established between a first device and a second device.

[0165] It should be noted that before performing S1001, the first device and the second device have completed device-level authentication.

[0166] Exemplarily, the physical channel established between the first device and the second device may be a BR channel. The implementation of establishing the BR channel may refer to Figure 2 The description of S301 will not be repeated here.

[0167] In some other embodiments of the present application, when a BR connection is established between the first device and the second device, the first device and the second device may further reuse a BR channel corresponding to the BR connection.

[0168] Exemplary, reference Fig.11 , the BR multiplexing may include:

[0169] S1101. A first device sends a request for negotiating BR multiplexing to a second device.

[0170] Exemplarily, when the first device detects that there is an existing BR connection between the first device and the second device, the first device sends a request for negotiating BR multiplexing to the second device. The BR multiplexing request is used to instruct the second device to increase the reference count of the existing BR channel by 1.

[0171] In some embodiments of the present application, when the second device receives the request of S1101, it executes S1102, that is, adding 1 to the reference count of the existing BR channel. In this way, the second device can maintain the BR connection.

[0172] After the second device completes the operation of S1102, it can continue with the interaction process of S1103.

[0173] S1103: The first device sends a response for negotiating BR multiplexing to the second device.

[0174] Exemplarily, the second device may send, as a response message, an indication of successful reference counting of an existing BR channel to the first device.

[0175] In some embodiments of the present application, after receiving the response message of S1103, the first device executes S1104, that is, the reference count of the existing BR channel is increased by 1. In this way, the first device can maintain the BR connection.

[0176] Through S1101 to S1104, the first device and the second device complete the multiplexing operation of the existing BR channel. By multiplexing the existing BR channel, the first device and the second device can also continue the operation of S1002 to complete the P2P connection between the first device and the second device.

[0177] S1002: The first device and the second device negotiate P2P information.

[0178] Exemplarily, the first device may send a request to establish a P2P connection to the second device through the BR channel in S1001. In some implementations, the request may include an identifier of the first device, first channel information, a MAC address of the P2P, and role negotiation information, etc. The first channel information is channel information of the P2P connection available to the first device. In some embodiments of the present application, the request may also be referred to as a third request, and the P2P connection may also be referred to as a first P2P connection.

[0179] It is understandable that, in the request, the first channel information of the first device, the MAC address of the P2P and the role negotiation information etc. may also be sent in multiple times. Similarly, the response corresponding to the request may also be sent in multiple times.

[0180] Exemplarily, after receiving the request sent by the first device, the second device performs P2P connection processing, which may include confirming the channel used by the P2P connection, and confirming the group owner (Group Owner, GO), the group client (Group Client, GC), etc.

[0181] As an implementation, after completing the processing of the P2P connection, the second device sends a response to the first device through the physical channel of S1001. The response is used to indicate to the first device that the first channel information is used for the P2P connection. In some embodiments of the present application, the response may also be referred to as a third response.

[0182] After receiving the response, the first device establishes a P2P connection with the second device through the channel indicated by the first channel information.

[0183] In some embodiments of the present application, after the first device and the second device complete S1002, they may continue to perform the operation of S1003 to complete the DMSG connection between the first device and the second device.

[0184] S1003: The first device and the second device negotiate DMSG through a P2P channel.

[0185] The first device and the second device negotiate DMSG through the P2P channel. Figure 7 The example of S705 in the figure can be referenced for specific contents.

[0186] For example, through the P2P channel established in S1002, such as a TCP channel, the first device sends a request to negotiate DMSG to the second device, which is used to instruct the second device to create a DMSG service. In some embodiments of the present application, the request may also be referred to as a first request, and the DMSG service may also be referred to as a first DMSG service.

[0187] Exemplarily, after the second device receives the request for negotiating DMSG sent by the first device, in response to the request, the second device can create a DMSG service in the DMSG module. Through the P2P channel corresponding to the P2P connection established by S1002, such as a TCP channel, the second device sends the port address of the DMSG service as a response to the first device. In some embodiments of the present application, the response may also be referred to as a first response, and the port address may also be referred to as a first port address.

[0188] It is understandable that after receiving the port address of the DMSG service of the second device, the first device can connect to the DMSG service through the port address of the DMSG service of the second device, that is, a DMSG connection is established between the first device and the second device.

[0189] Through S1001 to S1003, when no P2P connection is established, the first device and the second device establish a new P2P connection. Then, the DMSG negotiation interaction process is performed through the corresponding P2P channel on the newly established P2P connection, and the first device and the second device establish a DMSG connection. It can be understood that the transmission rate of the P2P channel is better than the BR channel. In this way, the time for negotiating DMSG between the first device and the second device is reduced.

[0190] In the above implementation, the first device and the second device need to first perform negotiation interaction of P2P information and then perform negotiation interaction of DMSG, that is, two negotiation interaction processes are required.

[0191] In another implementation of the embodiment of the present application, when a P2P connection is not established between the first device and the second device, the first device and the second device can combine the two processes of P2P information negotiation and DMSG negotiation together. That is, the first device and the second device only need to perform one negotiation interaction process to establish a DMSG connection.

[0192] Exemplary, reference Fig.12 , the method may include:

[0193] S1201. Establish a physical channel between a first device and a second device.

[0194] The implementation method of establishing a physical channel between the first device and the second device can refer to the description of S1001, and the specific contents can be referenced to each other and will not be repeated here.

[0195] S1202: The first device sends a request for negotiation B to the second device.

[0196] Exemplarily, the first device may send a request for negotiation B to the second device based on the physical channel established in S1201. The negotiation B may include negotiating P2P information and negotiating DMSG.

[0197] For example, the first device combines the request for negotiating DMSG and the request for negotiating P2P through the BR channel and sends them to the second device. The request for negotiating DMSG is used to instruct the second device to create a DMSG service. In some implementations, the request for negotiating P2P may include the identifier of the first device, the first channel information, the MAC address of the P2P, and role negotiation information. The first channel information is the channel information of the P2P connection available to the first device. In some embodiments of the present application, the P2P connection may also be referred to as the first P2P connection, and the DMSG service may also be referred to as the first DMSG service.

[0198] Exemplarily, after receiving the request in S1202, the second device may perform the operation in S1203. That is, the second device may create a DMSG service in the DMSG module. At the same time, the second device may also perform S1204. That is, the second device performs the processing of the P2P connection. The processing of the P2P connection may include confirming the channel used by the P2P connection, and confirming GO, GC, etc.

[0199] In some embodiments of the present application, after the second device completes the operations of S1203 and S1204, it can proceed to S1205.

[0200] S1205. The second device sends a response message of negotiation B to the first device.

[0201] Exemplarily, the second device may send a response of negotiation B to the first device based on the physical channel established in S1201.

[0202] For example, the second device combines the first channel information used for the P2P connection identifier and the port address of the DMSG service created by the second device as a response message and sends it to the first device through the BR channel. In some embodiments of the present application, the port address of the DMSG service may also be referred to as the first port address.

[0203] As an implementation, after receiving S1205, the first device obtains the port address of the DMSG service of the second device and can continue to execute S1206. That is, through the port address of the DMSG service, the first device can connect to the DMSG service and establish a DMSG connection with the second device.

[0204] The first device may also continue to execute S1207. The first device establishes a P2P connection with the second device through the channel indicated by the first channel information.

[0205] Through S1201 to S1207, the first device and the second device combine the interaction process of negotiating P2P information and negotiating DMSG, thereby reducing the number of negotiation interactions between the first device and the second device.

[0206] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of each functional module. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiment disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present application.

[0207] The above integrated modules can be implemented in the form of hardware or software functional modules. It should be noted that the division of modules in the embodiments of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0208] Please refer to Fig.13 , is a schematic diagram of another electronic device provided in an embodiment of the present application. The electronic device may be the first device involved in the above embodiment. Fig.13 As shown, the electronic device 1300 may include: a processor 1301 and a memory 1302. The memory 1302 is used to store computer-executable instructions. Exemplarily, in some embodiments, when the processor 1301 executes the instructions stored in the memory 1302, the electronic device 1300 may execute any one of the technical solutions shown in the first device involved in the above embodiments.

[0209] It should be noted that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module and will not be repeated here.

[0210] Please refer to Fig.14 , is a schematic diagram of another electronic device provided in an embodiment of the present application. The electronic device may be the second device involved in the above embodiment. Fig.14 As shown, the electronic device 1400 may include: a processor 1401 and a memory 1402. The memory 1402 is used to store computer-executable instructions. Exemplarily, in some embodiments, when the processor 1401 executes the instructions stored in the memory 1402, the electronic device 1400 may execute any one of the technical solutions shown in the second device involved in the above embodiments.

[0211] It should be noted that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module and will not be repeated here.

[0212] Fig.15 A schematic diagram of the composition of a chip system 1500 is shown. The chip system 1500 may include: a processor 1501 and a communication interface 1502, which are used to support related devices (such as the first device or the second device) to implement the functions involved in the above embodiments. In one example, the chip system also includes a memory for storing program instructions and data necessary for the terminal. The chip system may be composed of chips, or may include chips and other discrete devices. It should be noted that in some implementations of the present application, the communication interface 1502 may also be referred to as an interface circuit.

[0213] It should be noted that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module and will not be repeated here.

[0214] The functions or actions or operations or steps in the above embodiments, etc., can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using a software program, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loading and executing computer program instructions on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server, data center, etc. that includes one or more servers that can be integrated with a medium. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (eg, a solid state drive (SSD)).

[0215] Although the present application has been described in conjunction with specific features and embodiments thereof, it is obvious that various modifications and combinations may be made thereto without departing from the spirit and scope of the present application. Accordingly, this specification and the drawings are merely exemplary illustrations of the present application as defined by the appended claims, and are deemed to have covered any and all modifications, variations, combinations or equivalents within the scope of the present application. Obviously, those skilled in the art may make various modifications and variations to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A communication connection method, characterized in that: The method is applied to a first device, and the method is used to establish a control information sharing connection between the first device and a second device, and the control information sharing connection is used to transmit user control information between the first device and the second device; The method comprises: The first device sends a first request to the second device through a first P2P channel, where the first request is used to instruct the second device to create a first control information sharing service; the first P2P channel is a data transmission channel of a first P2P connection established between the first device and the second device; The first device receives a first response, where the first response includes a first port address corresponding to the first control information sharing service; The first device establishes a control information sharing connection with the second device through the first port address; the first port address is a port address corresponding to the first control information sharing service.

2. The method according to claim 1, characterized in that The first P2P connection corresponding to the first P2P channel is a P2P connection that has been established before the first device sends the first request.

3. The method according to claim 2, characterized in that The first request is also used to instruct the second device to reuse the first P2P channel; The first response is also used to indicate confirmation of multiplexing the first P2P channel.

4. The method according to claim 3, characterized in that The method further comprises: The first device increases the reference count of the first P2P channel by 1 according to the first response.

5. The method according to claim 2, characterized in that: Before the first device sends the first request, the method further includes: The first device sends a second request to the second device through the first P2P channel, where the second request is used to instruct to reuse the first P2P channel; The first device receives a second response, where the second response is used to confirm the reuse of the first P2P channel; The first device increases the reference count of the first P2P channel by 1.

6. The method according to claim 5, characterized in that The first P2P connection corresponding to the first P2P channel is a P2P connection that has been established before the first device sends the second request.

7. The method according to any one of claims 1 to 6, characterized in that The method further comprises: Establishing a classic Bluetooth basic rate (BR) physical channel between the first device and the second device; The first device sends a third request to the second device through the BR physical channel, where the third request is used to establish the first P2P connection; the third request includes an identifier of the first device and first channel information; the first channel information is channel information of an available P2P connection of the first device; The first device receives a third response, where the third response is used to indicate confirmation that the first channel information is used to perform the first P2P connection; The first device establishes the first P2P connection with the second device through the channel indicated by the first channel information.

8. The method according to any one of claims 1 to 7, characterized in that The first P2P channel is a TCP channel.

9. The method according to any one of claims 1 to 8, characterized in that The control information sharing connection is a minimalist protocol stack message transmission module DMSG connection, and the first control information sharing service is a first DMSG service.

10. A communication connection method, characterized in that: The method is applied to a second device, and the method is used to establish a control information sharing connection between the second device and a first device, and the control information sharing connection is used for data transmission between services of the second device and the first device; The method comprises: The second device receives a first request, where the first request is used to instruct the second device to create a first control information sharing service; The second device sends a first response to the first device through a first P2P channel, where the first response includes a first port address corresponding to the first control information sharing service; the first control information sharing service is created by the second device according to the first request; The first P2P channel is a data transmission channel of a first P2P connection established between the second device and the first device.

11. The method according to claim 10, characterized in that The first P2P connection corresponding to the first P2P channel is a P2P connection that has been established before the second device sends a first response to the first device.

12. The method according to claim 11, characterized in that The first request is also used to instruct the second device to reuse the first P2P channel; The first response is also used to indicate confirmation of multiplexing the first P2P channel.

13. The method according to claim 12, characterized in that The second device increases the reference count of the first P2P channel by 1 according to the first request.

14. The method according to claim 11, characterized in that Before the second device sends a first response to the first device through the first P2P channel, the method further includes: The second device receives a second request, where the second request is used to instruct to reuse the first P2P channel; The second device increases the reference count of the first P2P channel by 1; The second device sends a second response to the first device through the first P2P channel, where the second response is used to confirm the reuse of the first P2P channel.

15. The method according to claim 14, characterized in that The first P2P connection corresponding to the first P2P channel is a P2P connection that has been established before the second device sends a second response to the first device.

16. The method according to any one of claims 10 to 15, characterized in that The method further comprises: Establishing a BR physical channel between the second device and the first device; The second device receives a third request, where the third request is used to establish the first P2P connection; the third request includes an identifier of the first device and first channel information; the first channel information is channel information of an available P2P connection of the first device; The second device sends a third response to the first device through the BR physical channel, where the third response is used to indicate confirmation that the first channel information is used for performing the first P2P connection.

17. The method according to any one of claims 10 to 16, characterized in that The first P2P channel is a TCP channel.

18. The method according to any one of claims 10 to 17, characterized in that: The control information sharing connection is a minimalist protocol stack message transmission module DMSG connection, and the first control information sharing service is a first DMSG service.

19. An electronic device, characterized in that: The electronic device comprises one or more processors and one or more memories; the one or more memories are coupled to the one or more processors, and the one or more memories store computer instructions; When the one or more processors execute the computer instructions, the electronic device executes the communication connection method as described in any one of claims 1 to 9, or executes the communication connection method as described in any one of claims 10 to 18.

20. A communication system, characterized in that: The communication system includes a first device and at least one second device; the first device is used to execute the communication connection method as described in any one of claims 1-9, and the second device is used to execute the communication connection method as described in any one of claims 10-18.