Connection negotiation methods and apparatuses, device and storage medium

By negotiating the data connection type on established connections between devices, such as switching from BLE to Wi-Fi P2P connection, the problem that the existing technology cannot meet the needs of high-speed and large-data transmission is solved, and more efficient and flexible data transmission is achieved.

WO2025050252A1PCT designated stage expired Publication Date: 2025-03-13GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/116804
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-09-04
Publication Date
2025-03-13

AI Technical Summary

Technical Problem

The prior art cannot meet the data transmission requirements of high-speed and large data volumes between devices in some scenarios, such as BLE connections that cannot support high-bandwidth data transmission.

Method used

By sending a negotiation message on an established first communication connection (such as a BLE connection), negotiate the data connection type, such as switching to a Wi-Fi P2P connection, to suit the needs of different data transmission scenarios.

Benefits of technology

It realizes adapting data connection types between different devices, meeting the needs of different data transmission scenarios, and improving data transmission efficiency and flexibility between devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023116804_13032025_PF_FP_ABST
    Figure CN2023116804_13032025_PF_FP_ABST
Patent Text Reader

Abstract

Connection negotiation methods and apparatuses, a device and a storage medium, relating to the technical field of communications. A method comprises: on the basis of a first communication connection, a first device sends a first message to a second device, the first message being used for negotiation of a data connection type (410); and the first device receives a second message sent by the second device on the basis of the first communication connection, the second message being used for indicating the data connection type (420). The first device sending the first message and receiving the second message in the method achieve the negotiation for the data connection type when the first device has established the first communication connection with the second device. Therefore, the data connection type between the first device and the second device can be suitable for different data transmission scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Connection negotiation method, device, equipment and storage medium Technical Field

[0001] The embodiments of the present application relate to the field of communication technologies, and in particular to a connection negotiation method, apparatus, device, and storage medium. Background Art

[0002] With the development of communication technology, the types of data connections that can be established between different devices are becoming increasingly diverse. For example, devices can establish BLE (Bluetooth Low Energy) connections or Wi-Fi P2P (Wireless Fidelity Peer to Peer) connections.

[0003] Different data connection types offer different advantages when it comes to data transmission. For example, BLE connections offer lower power consumption, while Wi-Fi P2P connections support high-speed data transmission.

[0004] However, in some scenarios, the currently established data connection type may not support the data transmission requirements between devices. For example, BLE cannot support the transmission requirements of high speed and large data volumes.

[0005] Summary of the Invention

[0006] The present invention provides a connection negotiation method, apparatus, device, and storage medium. The technical solution is as follows:

[0007] According to one aspect of an embodiment of the present application, a connection negotiation method is provided. The method is performed by a first device, where a first communication connection based on a first communication protocol has been established between the first device and a second device. The method includes:

[0008] Sending a first message to the second device based on the first communication connection, where the first message is used to negotiate a data connection type;

[0009] A second message is received, which is sent by the second device based on the first communication connection, where the second message is used to indicate the data connection type.

[0010] According to one aspect of an embodiment of the present application, a connection negotiation method is provided. The method is performed by a second device, where a first communication connection based on a first communication protocol has been established between the second device and a first device. The method includes:

[0011] receiving a first message sent by the first device based on the first communication connection, where the first message is used to negotiate a data connection type;

[0012] Based on the first communication connection, a second message is sent to the first device, where the second message is used to indicate the data connection type.

[0013] According to one aspect of an embodiment of the present application, a connection negotiation apparatus is provided. The apparatus is configured in a first device. A first communication connection based on a first communication protocol has been established between the first device and a second device. The apparatus includes:

[0014] a transceiver module, configured to send a first message to the second device based on the first communication connection, where the first message is used to negotiate a data connection type;

[0015] The transceiver module is further configured to receive a second message sent by the second device based on the first communication connection, where the second message is used to indicate the data connection type.

[0016] According to one aspect of an embodiment of the present application, a connection negotiation apparatus is provided. The apparatus is configured in a second device, and a first communication connection based on a first communication protocol has been established between the second device and a first device. The apparatus includes:

[0017] a transceiver module, configured to receive a first message sent by the first device based on the first communication connection, where the first message is used to negotiate a data connection type;

[0018] The transceiver module is further configured to send a second message to the first device based on the first communication connection, where the second message is configured to indicate the data connection type.

[0019] According to one aspect of an embodiment of the present application, a communication device is provided, comprising a processor and a memory, wherein a computer program is stored in the memory, and the processor executes the computer program to implement the above-mentioned connection negotiation method.

[0020] According to one aspect of an embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored. The computer program is configured to be executed by a processor to implement the above-mentioned connection negotiation method.

[0021] According to one aspect of an embodiment of the present application, a chip is provided, which includes a programmable logic circuit and / or program instructions. When the chip is running, it is used to implement the above-mentioned connection negotiation method.

[0022] According to one aspect of an embodiment of the present application, a computer program product is provided, which includes a computer program stored in a computer-readable storage medium. A processor reads and executes the computer program from the computer-readable storage medium to implement the above-mentioned connection negotiation method.

[0023] The technical solutions provided by the embodiments of the present application may have the following beneficial effects:

[0024] By sending the first message and receiving the second message by the first device, a data connection type is negotiated when the first device has established a first communication connection with the second device, so that the data connection type between the first device and the second device can be adapted to different data transmission scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] FIG1 is a schematic diagram of an implementation environment of a solution provided by an embodiment of the present application;

[0026] FIG2 is a schematic diagram of a Wi-Fi P2P group provided by one embodiment of the present application;

[0027] FIG3 is a schematic diagram of a Wi-Fi P2P connection establishment process provided by one embodiment of the present application;

[0028] FIG4 is a flow chart of a connection negotiation method provided by an embodiment of the present application;

[0029] FIG5 is a flowchart of a connection negotiation method provided by another embodiment of the present application;

[0030] FIG6 is a schematic diagram of a solution for initiating a Wi-Fi P2P connection based on a BLE connection according to an embodiment of the present application;

[0031] FIG7 is a schematic diagram of a processing solution for establishing a Wi-Fi P2P connection provided by one embodiment of the present application;

[0032] FIG8 is a schematic diagram of a complete solution for application layer data interaction provided by one embodiment of the present application;

[0033] FIG9 is a block diagram of a connection negotiation device provided by an embodiment of the present application;

[0034] FIG10 is a block diagram of a connection negotiation device provided by another embodiment of the present application;

[0035] FIG11 is a schematic structural diagram of a communication device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0036] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.

[0037] The network architecture and business scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. A person skilled in the art will appreciate that, with the evolution of the network architecture and the emergence of new business scenarios, the technical solutions provided by the embodiments of the present application are equally applicable to similar technical problems.

[0038] Please refer to FIG1 , which shows a schematic diagram of an implementation environment of a solution provided by an embodiment of the present application. The implementation environment of the solution may include: a first device 10 and a second device 20 .

[0039] The first device 10 and the second device 20 can be communication devices such as mobile phones, tablet computers, PCs (Personal Computers), vehicle-mounted terminals, smart home appliances, multimedia playback devices, etc. The first device 10 and the second device 20 can establish a wireless communication connection, for example, the first device 10 and the second device 20 can establish a BLE connection.

[0040] Please refer to FIG2 , which shows a schematic diagram of a Wi-Fi P2P group provided by an embodiment of the present application.

[0041] In a P2P group, there can only be one GO (Group Owner), which can support one or more GCs (Group Clients). Before forming a P2P group, each P2P device negotiates to determine the GO. The GO device must support the Wi-Fi P2P protocol. Because the GO functions similarly to an AP (Access Point) in a P2P group, even legacy Wi-Fi devices that can't handle the Wi-Fi P2P protocol can search for the GO and establish a connection with it as a GC.

[0042] Please refer to FIG3 , which shows a schematic diagram of a Wi-Fi P2P connection establishment process provided by an embodiment of the present application.

[0043] The connection establishment process, also known as the P2P group formation process, includes Phase 1 and Phase 2. Phase 1 is primarily used by the GO to distribute the P2P group credentials to the GC, while Phase 2 is primarily used by the GO to establish a Wi-Fi P2P connection after verifying the GC's credentials.

[0044] After establishing a Wi-Fi P2P connection, high-speed data transmission is possible between the GO and GC. Therefore, Wi-Fi P2P connections offer significant advantages in scenarios with high data volumes (such as video data transmission). The following examples will describe specific solutions for establishing Wi-Fi P2P connections between devices based on other types of data connections (such as BLE connections).

[0045] Please refer to Figure 4, which shows a flow chart of a connection negotiation method provided by an embodiment of the present application. The execution subject of each step of the method is the first device. The method may include at least one step of steps 410-420.

[0046] Step 410: The first device sends a first message to the second device based on the first communication connection, where the first message is used to negotiate a data connection type.

[0047] A first communication connection based on a first communication protocol has been established between the first device and the second device.

[0048] The first communication protocol can be any communication protocol for communication between devices. In some embodiments, the first communication protocol is the BLE protocol, and the first communication connection is a BLE connection. Currently, BLE connections are all based on GATT (Generic Attribute Profile). Therefore, sending and receiving messages based on a BLE connection can also be referred to as sending and receiving messages based on a GATT connection or in a GATT channel. Negotiating the data connection type based on a BLE connection can reduce device power consumption.

[0049] In some embodiments, after the first device and the second device establish a first communication connection, the sending of the first message is triggered. For example, after the first device and the second device establish a BLE connection, the first device is triggered to send the first message to the second device via the BLE connection.

[0050] In some embodiments, after the first device and the second device establish a first communication connection, when a condition is met, the sending of the first message is triggered. For example, after the first device and the second device establish a BLE connection, when the amount of data to be transmitted is large, the sending of the first message is triggered.

[0051] In some embodiments, the first message includes: data connection types supported by the first device. The data connection types supported by the first device can also be understood as communication protocol types that the first device can process. Exemplarily, the data connection types supported by the first device may include: BLE connection, BT (Bluetooth, classic Bluetooth) connection, traditional Wi-Fi (Wireless Fidelity) connection, and Wi-Fi P2P connection.

[0052] In some embodiments, the first message also includes at least one of the following information: the protocol version of the data connection type supported by the first device, for example, the BLE protocol version, the Wi-Fi P2P protocol version; the device name of the first device, for example, the ID (Identifier) ​​of the first device, or a user-defined device name.

[0053] In some embodiments, when the data connection type supported or expected by the first device is a Wi-Fi P2P connection, the first message includes relevant information about the Wi-Fi P2P connection.

[0054] In some embodiments, the Wi-Fi P2P connection related information includes at least one of the following information:

[0055] The P2P radio frequency band, ie, the P2P radio frequency band supported by the first device, may include 2.4 GHz and 5 GHz in some embodiments.

[0056] The P2P device address of the first device, in some embodiments, is a MAC (Media Access Control) address of the first device.

[0057] The P2P device password type, i.e., the password type supported by the first device for establishing a Wi-Fi P2P connection, includes, in some embodiments, Out of Band Password, PIN (Personal Identification Number), and PBC (push button configuration). Out of Band Password refers to configuring a Wi-Fi P2P connection using methods other than Wi-Fi P2P, such as fingerprint authentication, Bluetooth, or NFC (Near Field Communication).

[0058] The P2P invitation process support flag corresponding to the first device is used to indicate whether the first device supports the P2P invitation process, that is, to indicate whether the first device has relevant functions of the P2P invitation process (including inviting and being invited).

[0059] Please refer to Table 1 below, which exemplarily shows part of the information content included in the first message.

[0060] Table 1

[0061] The 8-bit unsigned integer includes Bit 0 to Bit 7, and these bits can be used to describe the corresponding information content. For example, referring to Table 1, for the data field corresponding to the data connection type supported by the first device, if Bit 2 is 0, it can indicate that the first device does not support Wi-Fi P2P connection; if Bit 2 is 1, it can indicate that the first device supports Wi-Fi P2P connection; further, if Bit 0 and Bit 2 are both 1, it can indicate that the first device supports both BT / BLE connection and Wi-Fi P2P connection.

[0062] Step 420: The first device receives a second message sent by the second device based on the first communication connection, where the second message is used to indicate a data connection type.

[0063] The data connection type indicated by the second message refers to the data connection type determined by the second device.

[0064] In some embodiments, the second message includes: a data connection type determined by the second device, i.e., a data connection type to be used, obtained through negotiation with the first device. For example, the data connection type determined by the second device may be a BLE connection or a Wi-Fi P2P connection.

[0065] In some embodiments, the second message further includes: a device name of the second device.

[0066] In some embodiments, when the data connection type determined by the second device is a Wi-Fi P2P connection, the second message further includes at least one of the following information:

[0067] The P2P operating frequency band, i.e., the radio frequency band determined by the second device for data transmission after establishing a Wi-Fi P2P connection with the first device, can be selected from the P2P radio frequency bands supported by the first device. For example, 2.4 GHz or 5 GHz can be selected as the P2P operating frequency band.

[0068] The P2P operating channel is the channel determined by the second device to be used in the aforementioned P2P operating frequency band for data transmission after establishing a Wi-Fi P2P connection with the first device. In some embodiments, the P2P operating frequency band (2.4 GHz / 5 GHz) has 31 channels, and the P2P operating channel can be selected from these 31 channels.

[0069] A P2P channel list includes alternative channels that may be used on the aforementioned P2P operating frequency band when data is transmitted after the second device establishes a Wi-Fi P2P connection with the first device. In some embodiments, when the first device and the second device establish a Wi-Fi P2P connection and use the aforementioned P2P operating channel for data transmission, if a communication problem occurs (signal quality decreases or communication is interrupted), a new P2P operating channel can be selected from the P2P channel list. By setting the P2P channel list, it is possible to quickly switch channels during Wi-Fi P2P communication without having to poll all channels on the frequency band every time a channel switch is required.

[0070] The P2P device address of the second device, in some embodiments, is the MAC address of the second device.

[0071] The P2P configuration method, i.e., the configuration method for establishing a Wi-Fi P2P connection between the first device and the second device, can be selected from the password types supported by the first device for establishing a Wi-Fi P2P connection. For example, the P2P configuration method can be selected from out-of-band password, PIN, and PBC.

[0072] The P2P password is the password corresponding to the P2P configuration method, such as a PIN code. It should be noted that some P2P configuration methods do not have corresponding passwords, such as out-of-band configuration methods such as NFC and PBC.

[0073] The P2P network identifier is used to indicate the network name of the Wi-Fi P2P network to be established. In some embodiments, it is an SSID (Service Set Identifier).

[0074] The P2P group type identifier is used to indicate whether the P2P group generated or activated by the second device is a temporary P2P group or a permanent P2P group (Persistent Group). Referring to Figure 3, for a temporary P2P group, when the first device joins, all steps in Phase 1 and Phase 2 need to be executed (with the first device acting as the GC and the second device acting as the GO). For a permanent P2P group, since the first device saves the credentials for the permanent P2P group, only the steps in Phase 2 need to be executed when the first device is not joining for the first time.

[0075] Please refer to Table 2 below, which exemplarily shows part of the information content included in the second message.

[0076] Table 2

[0077] Exemplarily, referring to Table 2, for the data field corresponding to the data connection type determined by the second device, if Bit1 is 1 and Bit0 is 0, it may indicate that the data connection type determined by the second device is a Wi-Fi P2P field.

[0078] In some embodiments, after the first device receives the second message, the data connection type may be switched by following the steps below:

[0079] 1. End the first communication connection.

[0080] In some embodiments, the first device requests the second device to end the first communication connection, and the second device disconnects the first communication connection in response to the request.

[0081] 2. Establish a second communication connection based on a second communication protocol with the second device, where the second communication protocol is a communication protocol corresponding to the data connection type indicated by the second message.

[0082] In some embodiments, the second communication protocol is a Wi-Fi P2P protocol. If the second device has already created a P2P permanent group, the first device receives and stores credentials for the P2P permanent group. Alternatively, if the second device has already created a P2P temporary group, the first device receives credentials for the P2P temporary group.

[0083] In some embodiments, when the second communication protocol is a Wi-Fi P2P protocol, the Wi-Fi P2P connection may be established by:

[0084] If the second device has already joined a P2P group, it joins the P2P group through an invitation process. This means the second device has already established a Wi-Fi P2P connection with a device other than the first device. In other words, the P2P group already has a GO and at least one GC. For example, the first device sends a Wi-Fi P2P connection request to the second device, and the second device, acting as the GO or GC, invites the first device to join the P2P group. Alternatively, if the second device has activated a P2P permanent group, it directly joins the P2P permanent group.

[0085] It should be noted that if the second device supports establishing a P2P permanent group, the second device will only create a P2P permanent group when the first and second devices establish a Wi-Fi P2P connection for the first time (when the first and second devices have never established a Wi-Fi P2P connection). Otherwise, the second device will only activate the P2P permanent group established with the first device. In addition, because the first device saves the credentials of the P2P permanent group, the first device can directly join the P2P permanent group activated by the second device as a GC.

[0086] In some embodiments, when the second device has generated a P2P permanent group or a P2P temporary group, the second message includes a P2P password; when the second device has activated a P2P permanent group, the second message does not include a P2P password.

[0087] The technical solution provided in the embodiments of the present application implements negotiation of a data connection type when a first communication connection has already been established between the first device and the second device, by having the first device send a first message and receive a second message. This allows the data connection type between the first device and the second device to be adapted to different data transmission scenarios.

[0088] In addition, when the first communication protocol is the BLE protocol and the second communication protocol is the Wi-Fi P2P protocol, the present application also realizes the establishment of a high-transmission-rate Wi-Fi P2P connection through a low-power BLE connection, which saves device power consumption compared to the method of establishing a Wi-Fi P2P connection based on an in-band manner (directly through a Wi-Fi P2P channel).

[0089] Please refer to Figure 5, which shows a flow chart of a connection negotiation method provided by one embodiment of the present application. The execution entity of each step of the method is the second device. A first communication connection based on a first communication protocol has been established between the second device and the first device. The method may include at least one of steps 510-520.

[0090] Step 510: The second device receives a first message sent by the first device based on the first communication connection, where the first message is used to negotiate a data connection type.

[0091] In some embodiments, the first communication protocol is the BLE protocol.

[0092] In some embodiments, the first message includes: a data connection type supported by the first device.

[0093] In some embodiments, the first message further includes at least one of the following information: a protocol version of a data connection type supported by the first device, and a device name of the first device.

[0094] In some embodiments, when the data connection type supported or expected by the first device is a Wi-Fi P2P connection, the first message includes relevant information about the Wi-Fi P2P connection.

[0095] In some embodiments, the Wi-Fi P2P connection-related information includes at least one of the following information: a P2P radio frequency band, a P2P device address of the first device, a P2P device password type, and a P2P invitation process support flag corresponding to the first device.

[0096] Step 520: The second device sends a second message to the first device based on the first communication connection, where the second message is used to indicate the data connection type.

[0097] In some embodiments, the second message includes: a data connection type determined by the second device.

[0098] In some embodiments, when the data connection type determined by the second device is a Wi-Fi P2P connection, the second message further includes at least one of the following information: a P2P operating frequency band, a P2P operating channel, a P2P channel list, a P2P device address of the second device, a P2P configuration method, a P2P password, a P2P network identifier, a P2P group type identifier, and a P2P invitation process support identifier corresponding to the second device.

[0099] In some embodiments, after receiving the first message, the second device determines the data connection type to be used based on the data connection types supported by the first device. For example, when the first device supports BLE connection, traditional Wi-Fi connection, and Wi-Fi P2P connection, the second device can determine Wi-Fi P2P connection as the data connection type to be used. In addition, it should be noted that when the first device only supports traditional Wi-Fi connection, the second device can still determine Wi-Fi P2P connection as the data connection type to be used because the first device can search for the second device as the GO in a manner similar to searching for an AP.

[0100] In some embodiments, the second device determines that the type of data connection to be used is a Wi-Fi P2P connection.

[0101] In some embodiments, when the second device has joined the P2P group, the second device establishes a Wi-Fi P2P connection with the first device through an invitation process. For example, the second device, as a GO or GC of the P2P group, invites the first device to join the P2P group.

[0102] In some embodiments, if the first device and the second device have not established a P2P permanent group, the second device generates a P2P permanent group. Alternatively, if the first device and the second device have established a P2P permanent group, the second device activates the P2P permanent group.

[0103] In some embodiments, if the second device supports establishing a P2P persistent group, when the first device and the second device have not established a Wi-Fi P2P connection, the second device generates a P2P persistent group; when the first device and the second device have established a Wi-Fi P2P connection, the second device activates the established P2P persistent group.

[0104] In some embodiments, if the second device does not support establishing a P2P permanent group, a P2P temporary group is generated.

[0105] In some embodiments, when the second device generates a P2P group (including a P2P permanent group and a P2P temporary group), the second device is determined as a GO of the P2P group.

[0106] In some embodiments, the second device, as the GO of the P2P group, needs to support Wi-Fi P2P connection, that is, be able to process the Wi-Fi P2P protocol.

[0107] The above method enables negotiation of a data connection type when the second device has already established a first communication connection with the first device, by having the second device receive the first message and send the second message. This allows the data connection type between the second device and the first device to be adapted to different data transmission scenarios.

[0108] Please refer to Figure 6, which shows a schematic diagram of a solution for establishing a Wi-Fi P2P connection based on a BLE connection provided by an embodiment of the present application. The solution may include the following steps:

[0109] 1. The first device and the second device perform device discovery and establish a BLE connection.

[0110] 2. The first device sends a first message to the second device.

[0111] 3. The second device determines whether it has joined the P2P group.

[0112] 4. If the second device has not joined the P2P group, a P2P group (a P2P permanent group or a P2P temporary group) is generated or a P2P permanent group is activated.

[0113] 5. The second device sends a second message to the first device.

[0114] 6. The first device and the second device end the BLE connection.

[0115] 7. The first device joins the P2P group where the second device is located and establishes a Wi-Fi P2P connection.

[0116] Please refer to FIG. 7 , which shows a schematic diagram of a processing solution for establishing a Wi-Fi P2P connection provided by an embodiment of the present application.

[0117] In this solution, after the first and second devices negotiate and determine to establish a Wi-Fi P2P connection, different processing flows are executed based on the P2P group type and the historical connection status between the first and second devices (whether a Wi-Fi P2P connection has been established). The specific processing flows can be found in the above embodiments and will not be repeated here. Ultimately, the first and second devices establish an application-layer secure connection.

[0118] Please refer to Figure 8, which shows a schematic diagram of a complete solution for application layer data interaction between a first device and a second device provided by an embodiment of the present application. The solution may include the following steps:

[0119] 1. The second device performs BLE broadcasting, and the first device obtains the broadcast information of the second device by scanning and performs device discovery.

[0120] 2. The first device and the second device establish a BLE connection.

[0121] 3. The first device and the second device negotiate a data connection type.

[0122] 4. If the negotiated data connection type is a Wi-Fi P2P connection, the first device and the second device end the BLE connection and establish a Wi-Fi P2P connection; if the negotiated data connection type is a BLE connection, the BLE connection is maintained.

[0123] 5. The first device and the second device negotiate a session key on the data path (BLE channel or Wi-Fi P2P channel) corresponding to the negotiated data connection type and establish an application layer session. For example, a configuration channel and a control channel may be established.

[0124] 6. The first device and the second device perform encrypted application layer data exchange based on the session key.

[0125] It should be noted that in the above method embodiments, the steps performed by the first device can be independently implemented as a connection negotiation method on the first device side; and the steps performed by the second device can be independently implemented as a connection negotiation method on the second device side. For details not disclosed in either embodiment, please refer to the other embodiment.

[0126] The following are device embodiments of the present application, which can be used to implement the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.

[0127] Please refer to Figure 9, which shows a block diagram of a connection negotiation device provided by one embodiment of the present application. This device has the function of implementing the connection negotiation method on the first device side described above. This function can be implemented in hardware or by hardware executing corresponding software. This device can be the first device described above, or it can be provided in the first device. As shown in Figure 9, the device 900 may include: a transceiver module 910.

[0128] The transceiver module 910 is configured to send a first message to the second device based on the first communication connection, where the first message is used to negotiate a data connection type.

[0129] The transceiver module 910 is further configured to receive a second message sent by the second device based on the first communication connection, where the second message is used to indicate the data connection type.

[0130] In some embodiments, the first message includes: a data connection type supported by the first device.

[0131] In some embodiments, the first message further includes at least one of the following information: a protocol version of a data connection type supported by the first device; and a device name of the first device.

[0132] In some embodiments, when the data connection type supported or expected by the first device is a Wi-Fi P2P connection, the first message includes relevant information about the Wi-Fi P2P connection.

[0133] In some embodiments, the Wi-Fi P2P connection related information includes at least one of the following information: a P2P radio frequency band; a P2P device address of the first device; a P2P device password type; and a P2P invitation process support identifier corresponding to the first device.

[0134] In some embodiments, the second message includes: a data connection type determined by the second device.

[0135] In some embodiments, the second message also includes at least one of the following information: P2P operating frequency band; P2P operating channel; P2P channel list; P2P device address of the second device; P2P configuration method; P2P password; P2P network identifier; P2P group type identifier; P2P invitation process support identifier corresponding to the second device.

[0136] In some embodiments, the transceiver module 910 is further used to end the first communication connection; establish a second communication connection based on a second communication protocol with the second device, where the second communication protocol is a communication protocol corresponding to the data connection type indicated by the second message.

[0137] In some embodiments, when the second communication protocol is a Wi-Fi P2P protocol, the transceiver module 910 is further used to receive and save the credentials of the P2P permanent group when the second device has generated a P2P permanent group; or to receive the credentials of the P2P temporary group when the second device has generated a P2P temporary group.

[0138] In some embodiments, when the second communication protocol is a Wi-Fi P2P protocol, the transceiver module 910 is further configured to, if the second device has already joined a P2P group, join the P2P group through an invitation process; or, if the second device has already activated a P2P permanent group, directly join the P2P permanent group.

[0139] In some embodiments, the first communication protocol is a BLE protocol.

[0140] Please refer to Figure 10, which shows a block diagram of a connection negotiation device provided in another embodiment of the present application. This device has the function of implementing the connection negotiation method on the second device side described above. This function can be implemented in hardware or by hardware executing corresponding software. This device can be the second device described above, or it can be provided in the second device. As shown in Figure 10, the device 1000 may include: a transceiver module 1010.

[0141] The transceiver module 1010 is configured to receive a first message sent by the first device based on the first communication connection, where the first message is used to negotiate a data connection type.

[0142] The transceiver module 1010 is further configured to send a second message to the first device based on the first communication connection, where the second message is configured to indicate the data connection type.

[0143] In some embodiments, the first message includes: a data connection type supported by the first device.

[0144] In some embodiments, the first message further includes at least one of the following information: a protocol version of a data connection type supported by the first device; and a device name of the first device.

[0145] In some embodiments, when the data connection type supported or expected by the first device is a Wi-Fi P2P connection, the first message includes relevant information about the Wi-Fi P2P connection.

[0146] In some embodiments, the Wi-Fi P2P connection related information includes at least one of the following information: a P2P radio frequency band; a P2P device address of the first device; a P2P device password type; and a P2P invitation process support identifier corresponding to the first device.

[0147] In some embodiments, the second message includes: a data connection type determined by the second device.

[0148] In some embodiments, the second message also includes at least one of the following information: P2P operating frequency band; P2P operating channel; P2P channel list; P2P device address of the second device; P2P configuration method; P2P password; P2P network identifier; P2P group type identifier; P2P invitation process support identifier corresponding to the second device.

[0149] In some embodiments, the transceiver module 1010 is further configured to determine the data connection type to be used based on the data connection types supported by the first device.

[0150] In some embodiments, when the second device determines that the data connection type to be used is a Wi-Fi P2P connection, the transceiver module 1010 is further configured to establish the Wi-Fi P2P connection with the first device through an invitation process if the second device has joined a P2P group.

[0151] In some embodiments, when the second device determines that the data connection type to be used is a Wi-Fi P2P connection, the transceiver module 1010 is further used to generate the P2P permanent group if the first device and the second device have not established a P2P permanent group; or to activate the P2P permanent group if the first device and the second device have established a P2P permanent group.

[0152] In some embodiments, the transceiver module 1010 is further configured to generate a temporary P2P group when the second device does not support establishing the permanent P2P group.

[0153] In some embodiments, the first communication protocol is the BLE protocol.

[0154] Please refer to Figure 11, which shows a schematic diagram of the structure of a communication device provided by one embodiment of the present application. The communication device can be the first device described above or the second device described above. The communication device 1100 may include: a processor 1101, a transceiver 1102, and a memory 1103. The transceiver 1102 is used to implement the functions of the transceiver module described above, and the processor 1101 may be used to implement other processing functions or control transmission and / or reception.

[0155] The processor 1101 includes one or more processing cores, and the processor 1201 executes various functional applications and information processing by running software programs and modules.

[0156] The transceiver 1102 may include a receiver and a transmitter. For example, the receiver and the transmitter may be implemented as the same wireless communication component, which may include a wireless communication chip and a radio frequency antenna.

[0157] The memory 1103 may be connected to the processor 1101 and the transceiver 1102 .

[0158] The memory 1103 may be used to store a computer program executed by the processor, and the processor 1101 is used to execute the computer program to implement each step in the above method embodiment.

[0159] In an exemplary embodiment, when the communication device is a first device, the transceiver 1102 is used to send a first message to the second device based on the first communication connection, where the first message is used to negotiate a data connection type; and receive a second message sent by the second device based on the first communication connection, where the second message is used to indicate the data connection type.

[0160] In an exemplary embodiment, when the communication device is a second device, the transceiver 1102 is used to receive a first message sent by the first device based on the first communication connection, wherein the first message is used to negotiate a data connection type; and based on the first communication connection, send a second message to the first device, wherein the second message is used to indicate the data connection type.

[0161] For details not described in detail in this embodiment, please refer to the above embodiments and will not be described in detail here.

[0162] In addition, the memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, including but not limited to: magnetic or optical disks, electrically erasable programmable read-only memory, erasable programmable read-only memory, static access memory, read-only memory, magnetic memory, flash memory, and programmable read-only memory.

[0163] An embodiment of the present application also provides a computer-readable storage medium, in which a computer program is stored, and the computer program is used to be executed by a processor to implement the connection negotiation method on the first device side mentioned above, or to implement the connection negotiation method on the second device side mentioned above. In some embodiments, the computer-readable storage medium may include: ROM (Read-Only Memory), RAM (Random-Access Memory), SSD (Solid State Drives) or optical disks, etc. Among them, random access memory may include ReRAM (Resistance Random Access Memory) and DRAM (Dynamic Random Access Memory).

[0164] An embodiment of the present application also provides a chip, which includes a programmable logic circuit and / or program instructions. When the chip is running, it is used to implement the connection negotiation method on the first device side or the connection negotiation method on the second device side.

[0165] An embodiment of the present application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. A processor reads and executes the computer program from the computer-readable storage medium to implement the connection negotiation method on the first device side or the connection negotiation method on the second device side.

[0166] It should be understood that the "indication" mentioned in the embodiments of this application can be a direct indication, an indirect indication, or an indication of an association. For example, "A indicates B" can mean that A directly indicates B, for example, B can be obtained through A; it can also mean that A indirectly indicates B, for example, A indicates C, and B can be obtained through C; it can also mean that there is an association between A and B.

[0167] In the description of the embodiments of the present application, the term "corresponding" may indicate a direct or indirect correspondence between the two, or an association relationship between the two, or a relationship between indication and being indicated, configuration and being configured, etc.

[0168] In some embodiments of the present application, "predefined" may be implemented by pre-storing corresponding codes, tables, or other methods that can be used to indicate relevant information in a device (e.g., including a terminal device and a network device), and the present application does not limit the specific implementation method. For example, predefined may refer to information defined in a protocol.

[0169] In some embodiments of the present application, the "protocol" may refer to a standard protocol in the communication field, for example, it may include the BLE protocol, the Wi-Fi protocol and related protocols used in future communication systems, and the present application does not limit this.

[0170] In this document, "plurality" refers to two or more. "And / or" describes a relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can mean: A exists alone, A and B exist simultaneously, or B exists alone. The character " / " generally indicates an "or" relationship between the associated objects.

[0171] The term “greater than or equal to” mentioned herein may mean greater than or equal to, or greater than, and the term “less than or equal to” may mean less than or equal to, or less than.

[0172] In addition, the step numbers described in this document only illustrate a possible execution order between the steps. In some other embodiments, the above steps may not be executed in the order of the numbers, such as two steps with different numbers are executed at the same time, or two steps with different numbers are executed in the opposite order of the diagram. The embodiments of the present application are not limited to this.

[0173] Those skilled in the art will appreciate that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented using hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media include any media that facilitates the transmission of computer programs from one place to another. The storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer.

[0174] The above description is merely an exemplary embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A connection negotiation method, characterized in that: The method is performed by a first device, a first communication connection based on a first communication protocol has been established between the first device and a second device, and the method includes: Based on the first communication connection, sending a first message to the second device, where the first message is used to negotiate a data connection type; A second message is received, which is sent by the second device based on the first communication connection, where the second message is used to indicate the data connection type.

2. The method according to claim 1, characterized in that The first message includes: a data connection type supported by the first device.

3. The method according to claim 2, characterized in that The first message also includes at least one of the following information: a protocol version of a data connection type supported by the first device; The device name of the first device.

4. The method according to any one of claims 1 to 3, characterized in that: In a case where the data connection type supported or expected by the first device is a Wireless Fidelity Wi-Fi point-to-point P2P connection, the first message includes relevant information of the Wi-Fi P2P connection.

5. The method according to claim 4, characterized in that The relevant information of the Wi-Fi P2P connection includes at least one of the following information: P2P RF band; The P2P device address of the first device; P2P device password type; The P2P invitation process support identifier corresponding to the first device.

6. The method according to any one of claims 1 to 5, characterized in that: The second message includes: a data connection type determined by the second device.

7. The method according to claim 6, characterized in that In a case where the data connection type determined by the second device is a Wi-Fi P2P connection, the second message further includes at least one of the following information: P2P operating frequency band; P2P operation channel; P2P channel list; The P2P device address of the second device; P2P configuration method; P2P passwords; P2P network identification; P2P group type identifier; The P2P invitation process support identifier corresponding to the second device.

8. The method according to any one of claims 1 to 7, characterized in that: After receiving the second message sent by the second device based on the first communication connection, the method further includes: Ending the first communication connection; A second communication connection based on a second communication protocol is established with the second device, where the second communication protocol is a communication protocol corresponding to the data connection type indicated by the second message.

9. The method according to claim 8, characterized in that In the case where the second communication protocol is a Wi-Fi P2P protocol, before establishing a second communication connection based on the second communication protocol with the second device, the method further includes: In the case where the second device has generated a P2P permanent group, receiving and storing credentials of the P2P permanent group; or, In case the second device has generated a P2P temporary group, receiving a credential of the P2P temporary group.

10. The method according to claim 8, characterized in that In a case where the second communication protocol is a Wi-Fi P2P protocol, establishing a second communication connection based on the second communication protocol with the second device includes: If the second device has joined the P2P group, join the P2P group through an invitation process; or, In the case that the second device has activated the P2P permanent group, the second device directly joins the P2P permanent group.

11. The method according to any one of claims 1 to 10, characterized in that: The first communication protocol is the Bluetooth Low Energy (BLE) protocol.

12. A connection negotiation method, characterized in that: The method is performed by a second device, a first communication connection based on a first communication protocol has been established between the second device and the first device, and the method includes: receiving a first message sent by the first device based on the first communication connection, where the first message is used to negotiate a data connection type; Based on the first communication connection, a second message is sent to the first device, where the second message is used to indicate the data connection type.

13. The method according to claim 12, characterized in that The first message includes: a data connection type supported by the first device.

14. The method according to claim 13, characterized in that The first message also includes at least one of the following information: a protocol version of a data connection type supported by the first device; The device name of the first device.

15. The method according to any one of claims 12 to 14, characterized in that In a case where the data connection type supported or expected by the first device is a Wireless Fidelity Wi-Fi point-to-point P2P connection, the first message includes relevant information of the Wi-Fi P2P connection.

16. The method according to claim 15, characterized in that The relevant information of the Wi-Fi P2P connection includes at least one of the following information: P2P RF band; The P2P device address of the first device; P2P device password type; The P2P invitation process support identifier corresponding to the first device.

17. The method according to any one of claims 12 to 16, characterized in that: The second message includes: a data connection type determined by the second device.

18. The method according to claim 17, characterized in that In a case where the data connection type determined by the second device is a Wi-Fi P2P connection, the second message further includes at least one of the following information: P2P operating frequency band; P2P operation channel; P2P channel list; The P2P device address of the second device; P2P configuration method; P2P passwords; P2P network identification; P2P group type identifier; The P2P invitation process support identifier corresponding to the second device.

19. The method according to any one of claims 12 to 18, characterized in that After receiving the first message sent by the first device based on the first communication connection, the method includes: The data connection type to be used is determined according to the data connection types supported by the first device.

20. The method according to any one of claims 12 to 19, characterized in that In a case where the second device determines that the data connection type to be used is a Wi-Fi P2P connection, the method further includes: In a case where the second device has joined the P2P group, the Wi-Fi P2P connection is established with the first device through an invitation process.

21. The method according to any one of claims 12 to 20, characterized in that In a case where the second device determines that the data connection type to be used is a Wi-Fi P2P connection, the method further includes: In a case where the first device and the second device have not established a P2P permanent group, generating the P2P permanent group; or, In a case where the first device and the second device have established a P2P permanent group, the P2P permanent group is activated.

22. The method according to claim 21, characterized in that The method further comprises: In the case that the second device does not support establishing the P2P permanent group, a P2P temporary group is generated.

23. The method according to any one of claims 12 to 22, characterized in that The first communication protocol is the Bluetooth Low Energy (BLE) protocol.

24. A connection negotiation device, characterized in that: The apparatus is set in a first device, a first communication connection based on a first communication protocol has been established between the first device and a second device, and the apparatus includes: a transceiver module, configured to send a first message to the second device based on the first communication connection, wherein the first message is used to negotiate a data connection type; The transceiver module is further used to receive a second message sent by the second device based on the first communication connection, where the second message is used to indicate the data connection type.

25. A connection negotiation device, characterized in that: The apparatus is set in a second device, a first communication connection based on a first communication protocol has been established between the second device and the first device, and the apparatus includes: a transceiver module, configured to receive a first message sent by the first device based on the first communication connection, where the first message is used to negotiate a data connection type; The transceiver module is further used to send a second message to the first device based on the first communication connection, where the second message is used to indicate the data connection type.

26. A communication device, characterized in that: The communication device comprises a processor and a memory, wherein a computer program is stored in the memory, and the processor executes the computer program to implement the method according to any one of claims 1 to 11, or implements the method according to any one of claims 12 to 23.

27. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and the computer program is used to be executed by a processor to implement the method according to any one of claims 1 to 11, or to implement the method according to any one of claims 12 to 23.

28. A chip, characterized in that: The chip includes a programmable logic circuit and / or program instructions, and when the chip is running, it is used to implement the method according to any one of claims 1 to 11, or to implement the method according to any one of claims 12 to 23.

29. A computer program product, characterized in that The computer program product includes computer instructions, which are stored in a computer-readable storage medium. The processor reads and executes the computer instructions from the computer-readable storage medium to implement the method according to any one of claims 1 to 11, or to implement the method according to any one of claims 12 to 23.

Citation Information

Patent Citations

  • File transmission method and terminal

    CN110505712A

  • Method and device for establishing connection between multiple devices

    CN115278611A

  • Communication method and device, computer readable storage medium and chip

    CN115622974A

  • Data transmission method and apparatus and smart terminal

    WO2018161870A1

  • Data transmission method and apparatus, electronic device, and readable storage medium

    WO2021175300A1