# US 12,120,759 B2 · Data transmission method, data transmission apparatus, and electronic device

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 12,120,759 B2
- Document ID: US12120759B2
- Status: Granted
- Kind: B2
- Application number: 17/866,004
- Filed: 2022-07-15
- Published: 2022-11-03
- Granted: 2024-10-15
- Earliest claimed: 2020-02-25
- Assignees: Guangdong Oppo Mobile Telecommunications Corp., Ltd.
- Applicants: Guangdong Oppo Mobile Telecommunications Corp., Ltd.
- Inventors: Jinquan Lin
- Web page: https://patentgrep.com/patent/US12120759B2

## CPC

- H04W 76/10: Connection setup
- H04W 76/14: Direct-mode setup
- H04W 4/80: Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
- H04W 76/25: Maintenance of established connections
- H04W 84/18: Self-organising networks, e.g. ad-hoc networks or sensor networks
- Y02D 30/70: in wireless communication networks
- H04W: WIRELESS COMMUNICATION NETWORKS (broadcast communication H04H; communication systems using wireless links for non-selective communication, e.g. wireless extensions H04M1/72)
- Y02D: CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE

## Abstract

Disclosed in the present application are a data transmission method, a data transmission apparatus, an electronic device, and a computer-readable storage medium, wherein the method includes: establishing a BLUETOOTH connection with a BLUETOOTH device; creating and initializing a first rate parameter, a second rate parameter, a first connection interval parameter, and a second connection interval parameter; based on the second connection interval parameter, performing data transmission with the BLUETOOTH device within a preset time length and updating the second rate parameter through an average transmission rate within the time length; comparing the first rate parameter with the second rate parameter; if the first rate parameter is less than the second rate parameter, updating each parameter and returning to a step relating to the data transmission and following steps; or else, maintaining the BLUETOOTH connection with the BLUETOOTH device based on the first connection interval parameter.

## Claims

### Claim 1

A data transmission method, characterized in that the data transmission method is applied to an electronic device with a BLUETOOTH function, the data transmission method comprising:
establishing a BLUETOOTH connection with a BLUETOOTH device;
creating and initializing a first rate parameter, a second rate parameter, a first connection interval parameter, and a second connection interval parameter, wherein the first rate parameter is used to record a maximum transmission rate, and the second rate parameter is used to indicate an average transmission rate in a data transmission process; the first connection interval parameter is used to record a connection interval relating to the first rate parameter, and the second connection interval parameter is used to dynamically adjust a connection interval used in the data transmission process;
based on the second connection interval parameter, performing data transmission with the BLUETOOTH device within a preset time length, and updating the second rate parameter through the average transmission rate within the time length;
comparing the first rate parameter with the second rate parameter;
if the first rate parameter is less than the second rate parameter, updating the first rate parameter, the first connection interval parameter, and the second connection interval parameter, and returning to execute the step of performing the data transmission with the BLUETOOTH device within the preset time length, and updating the second rate parameter through the average transmission rate within the time length based on the second connection interval parameter, and following steps; and
if the first rate parameter is greater than or equal to the second rate parameter, maintaining the BLUETOOTH connection with the BLUETOOTH device based on the first connection interval parameter.

### Claim 2 (depends on 1)

The data transmission method as claimed in claim 1, characterized in that after the establishing the BLUETOOTH connection with the BLUETOOTH device, the data transmission method further comprises:
detecting whether it is a first time for the electronic device to establish the BLUETOOTH connection with the BLUETOOTH device;
correspondingly, the creating and initializing the first rate parameter, the second rate parameter, the first connection interval parameter, and the second connection interval parameter comprising:
if it is the first time for the electronic device to establish the BLUETOOTH connection with the BLUETOOTH device, creating and initializing the first rate parameter, the second rate parameter, the first connection interval parameter, and the second connection interval parameter; and
if it is not the first time for the electronic device to establish the BLUETOOTH connection with the BLUETOOTH device, obtaining a device identification code of the BLUETOOTH device, and searching for the first connection interval parameter relating to the device identification code in local of the electronic device based on the device identification code to realize the data transmission with the BLUETOOTH device based on the first connection interval parameter.

### Claim 3 (depends on 2)

The data transmission method as claimed in claim 2, characterized in that after the maintaining the BLUETOOTH connection with the BLUETOOTH device based on the first connection interval parameter, the data transmission method further comprises:
obtaining the device identification code of the BLUETOOTH device;
establishing an association relationship between the first connection interval parameter and the device identification code; and
storing the association relationship.

### Claim 4 (depends on 1)

The data transmission method as claimed in claim 1, characterized in that after the establishing the BLUETOOTH connection with the BLUETOOTH device, the data transmission method further comprises:
detecting whether the electronic device and the BLUETOOTH device support a preset first BLUETOOTH version; and
if both the electronic device and the BLUETOOTH device support the preset first BLUETOOTH version, activating a high-speed encoding function by setting a preset first flag bit to enable high-speed encoding of a physical layer, and activating a data length extension function by setting a preset second flag bit.

### Claim 5 (depends on 4)

The data transmission method as claimed in claim 4, characterized in that after the detecting whether the electronic device and the BLUETOOTH device support the preset first BLUETOOTH version, the data transmission method further comprises:
if the electronic device and/or the BLUETOOTH device do not support the preset first BLUETOOTH version, detecting whether the electronic device and the BLUETOOTH device support a preset second BLUETOOTH version, wherein the second BLUETOOTH version is lower than the first BLUETOOTH version; and
if both the electronic device and the BLUETOOTH device support the preset second BLUETOOTH version, activating the data length extension function by setting the second flag bit.

### Claim 6 (depends on 1)

The data transmission method as claimed in claim 1, characterized in that after the establishing the BLUETOOTH connection with the BLUETOOTH device, the data transmission method further comprises:
obtaining a maximum transmission unit size supported by the BLUETOOTH device as a target size, the target size used for indicating a size of a data package transmitted by the electronic device to the BLUETOOTH device.

### Claim 7 (depends on 1)

The data transmission method as claimed in claim 1, characterized in that the first rate parameter, the second rate parameter, and the first connection interval parameter are all initialized to 0, and the second connection interval parameter is initialized to a preset minimum value of a connection interval parameter.

### Claim 8 (depends on 1)

The data transmission method as claimed in claim 1, characterized in that the updating the first rate parameter, the first connection interval parameter, and the second connection interval parameter comprises:
based on the second rate parameter, updating the first rate parameter;
based on the second connection interval parameter, updating the first connection interval parameter; and
based on a preset connection interval unit value, updating the second connection interval parameter.

### Claim 9 (depends on 8)

The data transmission method as claimed in claim 8, characterized in that the based on the second rate parameter, updating the first rate parameter comprises:
assigning a value of the second rate parameter to the first rate parameter, so as to make a value of an updated first rate parameter equal to the value of the second rate parameter;
the based on the second connection interval parameter, updating the first connection interval parameter comprises:
assigning a value of the second connection interval parameter to the first connection interval parameter, so as to make a value of an updated first connection interval parameter equal to the value of the second connection interval parameter; and
the based on the preset connection interval unit value, updating the second connection interval parameter comprises:
adding the value of the second connection interval parameter and the connection interval unit value to obtain an updated second connection interval parameter.

### Claim 10

An electronic device, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, and characterized in that the processor implements following operations when executing the computer program:
establishing a BLUETOOTH connection with a BLUETOOTH device;
creating and initializing a first rate parameter, a second rate parameter, a first connection interval parameter, and a second connection interval parameter, wherein the first rate parameter is used to record a maximum transmission rate, and the second rate parameter is used to indicate an average transmission rate in a data transmission process; the first connection interval parameter is used to record a connection interval relating to the first rate parameter, and the second connection interval parameter is used to dynamically adjust a connection interval used in the data transmission process;
based on the second connection interval parameter, performing data transmission with the BLUETOOTH device within a preset time length, and updating the second rate parameter through the average transmission rate within the time length;
comparing the first rate parameter with the second rate parameter;
if the first rate parameter is less than the second rate parameter, updating the first rate parameter, the first connection interval parameter, and the second connection interval parameter, and returning to execute the step of performing the data transmission with the BLUETOOTH device within the preset time length, and updating the second rate parameter through an average transmission rate within the time length based on the second connection interval parameter, and following steps; and
if the first rate parameter is greater than or equal to the second rate parameter, maintaining the BLUETOOTH connection with the BLUETOOTH device based on the first connection interval parameter.

### Claim 11 (depends on 10)

The electronic device as claimed in claim 10, characterized in that after the establishing the BLUETOOTH connection with the BLUETOOTH device, the processor further implements the following operations when executing the computer program:
detecting whether it is a first time for the electronic device to establish the BLUETOOTH connection with the BLUETOOTH device;
correspondingly, the creating and initializing the first rate parameter, the second rate parameter, the first connection interval parameter, and the second connection interval parameter comprising:
if it is the first time for the electronic device to establish the BLUETOOTH connection with the BLUETOOTH device, creating and initializing the first rate parameter, the second rate parameter, the first connection interval parameter, and the second connection interval parameter; and
if it is not the first time for the electronic device to establish the BLUETOOTH connection with the BLUETOOTH device, obtaining a device identification code of the BLUETOOTH device, and searching for the first connection interval parameter relating to the device identification code in local of the electronic device based on the device identification code, to realize the data transmission with the BLUETOOTH device based on the first connection interval parameter.

### Claim 12 (depends on 11)

The electronic device as claimed in claim 11, characterized in that after the maintaining the BLUETOOTH connection with the BLUETOOTH device based on the first connection interval parameter, the processor further implements the following operations when executing the computer program:
obtaining the device identification code of the BLUETOOTH device;
establishing an association relationship between the first connection interval parameter and the device identification code; and
storing the association relationship.

### Claim 13 (depends on 10)

The electronic device as claimed in claim 10, characterized in that after the establishing the BLUETOOTH connection with the BLUETOOTH device, the processor further implements the following operations when executing the computer program:
detecting whether the electronic device and the BLUETOOTH device support a preset first BLUETOOTH version; and
if both the electronic device and the BLUETOOTH device support the preset first BLUETOOTH version, activating a high-speed encoding function by setting a preset first flag bit to enable high-speed encoding of a physical layer, and activating a data length extension function by setting a preset second flag bit.

### Claim 14 (depends on 13)

The electronic device as claimed in claim 13, characterized in that after the detecting whether the electronic device and the BLUETOOTH device support the preset first BLUETOOTH version, the processor further implements the following operations when executing the computer program:
if the electronic device and/or the BLUETOOTH device do not support the preset first BLUETOOTH version, detecting whether the electronic device and the BLUETOOTH device support a preset second BLUETOOTH version, wherein the second BLUETOOTH version is lower than the first BLUETOOTH version; and
if both the electronic device and the BLUETOOTH device support the preset second BLUETOOTH version, activating the data length extension function by setting the second flag bit.

### Claim 15 (depends on 10)

The electronic device as claimed in claim 10, characterized in that after the establishing the BLUETOOTH connection with the BLUETOOTH device, the processor further implements the following operations when executing the computer program:
obtaining a maximum transmission unit size supported by the BLUETOOTH device as a target size, the target size used for indicating a size of a data package transmitted by the electronic device to the BLUETOOTH device.

### Claim 16 (depends on 10)

The electronic device as claimed in claim 10, characterized in that when the processor executes the computer program, the first rate parameter, the second rate parameter, and the first connection interval parameter are all initialized to 0, and the second connection interval parameter is initialized to a preset minimum value of a connection interval parameter.

### Claim 17 (depends on 10)

The electronic device as claimed in claim 10, characterized in that when the processor executes the computer program, the updating the first rate parameter, the first connection interval parameter, and the second connection interval parameter comprises:
based on the second rate parameter, updating the first rate parameter;
based on the second connection interval parameter, updating the first connection interval parameter; and
based on a preset connection interval unit value, updating the second connection interval parameter.

### Claim 18 (depends on 17)

The electronic device as claimed in claim 17, characterized in that when the processor executes the computer program, the based on the second rate parameter, updating the first rate parameter comprises:
assigning a value of the second rate parameter to the first rate parameter, so as to make a value of an updated first rate parameter equal to the value of the second rate parameter;
the based on the second connection interval parameter, updating the first connection interval parameter comprises:
assigning a value of the second connection interval parameter to the first connection interval parameter, so as to make a value of an updated first connection interval parameter equal to the value of the second connection interval parameter; and
the based on the preset connection interval unit value, updating the second connection interval parameter comprises:
adding the value of the second connection interval parameter and the connection interval unit value to obtain an updated second connection interval parameter.

### Claim 19

A computer-readable storage medium, the computer-readable storage medium storing a computer program characterized in that when executed by a processor, the computer program implements a data transmission method, the data transmission method comprising:
establishing a BLUETOOTH connection with a BLUETOOTH device;
creating and initializing a first rate parameter, a second rate parameter, a first connection interval parameter, and a second connection interval parameter, wherein the first rate parameter is used to record a maximum transmission rate, and the second rate parameter is used to indicate an average transmission rate in a data transmission process; the first connection interval parameter is used to record a connection interval relating to the first rate parameter, and the second connection interval parameter is used to dynamically adjust a connection interval used in the data transmission process;
based on the second connection interval parameter, performing data transmission with the BLUETOOTH device within a preset time length, and updating the second rate parameter through the average transmission rate within the time length;
comparing the first rate parameter with the second rate parameter;
if the first rate parameter is less than the second rate parameter, updating the first rate parameter, the first connection interval parameter, and the second connection interval parameter, and returning to execute the step of performing the data transmission with the BLUETOOTH device within the preset time length, and updating the second rate parameter through the average transmission rate within the time length based on the second connection interval parameter, and following steps; and
if the first rate parameter is greater than or equal to the second rate parameter, maintaining the BLUETOOTH connection with the BLUETOOTH device based on the first connection interval parameter.

### Claim 20 (depends on 19)

The computer-readable storage medium as claimed in claim 19, characterized in that after the establishing the BLUETOOTH connection with the BLUETOOTH device, the data transmission method further comprises:
detecting whether it is a first time for the electronic device to establish the BLUETOOTH connection with the BLUETOOTH device;
correspondingly, the creating and initializing the first rate parameter, the second rate parameter, the first connection interval parameter, and the second connection interval parameter comprising:
if it is the first time for the electronic device to establish the BLUETOOTH connection with the BLUETOOTH device, creating and initializing the first rate parameter, the second rate parameter, the first connection interval parameter, and the second connection interval parameter; and
if it is not the first time for the electronic device to establish the BLUETOOTH connection with the BLUETOOTH device, obtaining a device identification code of the BLUETOOTH device, and searching for the first connection interval parameter relating to the device identification code in local of the electronic device based on the device identification code to realize the data transmission with the BLUETOOTH device based on the first connection interval parameter.
