Data transmission method, earphone and terminal

By selecting Bluetooth or WIFI for transmission based on the audio data transmission rate between the headset and the terminal, the problem of Bluetooth headset not being able to achieve lossless transmission and excessive power consumption during high-speed transmission is solved, and seamless switching and power consumption management are achieved.

CN119012411APending Publication Date: 2024-11-22ANKER INNOVATIONS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310558789.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-17
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

Bluetooth headsets cannot achieve lossless transmission when transmitting high-speed audio data, and only transmitting through WIFI leads to excessive power consumption.

Method used

By establishing Bluetooth and WIFI connections between the headset and the terminal, it is determined to use Bluetooth or WIFI for transmission based on the transmission rate of the audio data. If the rate is greater than a certain threshold, use WIFI, otherwise use Bluetooth to achieve seamless switching.

Benefits of technology

Lossless audio transmission is realized and the problem of excessive power consumption of headphones is avoided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119012411A_ABST
    Figure CN119012411A_ABST
Patent Text Reader

Abstract

The invention discloses a data transmission method, an earphone and a terminal. The data transmission method is executed by an earphone and specifically comprises the following steps: establishing Bluetooth connection and WIFI connection with a terminal so as to send first audio data to the terminal; determining a transmission rate required by the first audio data; if the transmission rate is greater than a first threshold value, determining to send first audio data to the terminal through WIFI; and if the transmission rate is smaller than or equal to the first threshold value, determining to send the first audio data to the terminal through Bluetooth. According to the technical scheme provided by the invention, real lossless audio transmission is facilitated, and excessive power consumption of the earphone can be avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of data transmission, and in particular to a data transmission method, a headset, and a terminal. Background Art

[0002] Bluetooth headsets do not require headphone cables and are widely popular among users. In the related art, audio data is usually transmitted between Bluetooth headsets and terminals only via Bluetooth, or only via wireless LAN (WIFI, Wireless Fidelity). However, transmission only via WIFI has the problem of excessive power consumption, and when the transmission rate required for audio data is too high, true lossless audio transmission cannot be achieved only via Bluetooth. Summary of the invention

[0003] A first aspect of the present application provides a data transmission method, which is executed by a headset, and the data transmission method includes: establishing a Bluetooth connection and a wireless local area network (WIFI, Wireless Fidelity) connection with a terminal to send first audio data to the terminal; determining the transmission rate required for the first audio data; if the transmission rate is greater than a first threshold, determining to send the first audio data to the terminal via WIFI; if the transmission rate is less than or equal to the first threshold, determining to send the first audio data to the terminal via Bluetooth.

[0004] The present application determines the transmission rate required for the first audio data, and determines whether to send the first audio data to the terminal via Bluetooth or WIFI according to the transmission rate, thereby achieving seamless switching between Bluetooth transmission and WIFI transmission, which is conducive to true lossless audio transmission and avoids excessive power consumption of the headset.

[0005] A second aspect of the present application provides another data transmission method, which is executed by a terminal. The data transmission method includes: establishing a Bluetooth connection and a WIFI connection with the headset to send second audio data to the headset; determining the transmission rate required for the second audio data; if the transmission rate is greater than a sixth threshold, determining to send the second audio data via the WIFI headset; if the transmission rate is less than or equal to the sixth threshold, determining to send the second audio data to the headset via Bluetooth.

[0006] The present application determines the transmission rate required for the second audio data, and determines whether to send the second audio data to the headset via Bluetooth or WIFI according to the transmission rate, thereby achieving seamless switching between Bluetooth transmission and WIFI transmission, which is conducive to true lossless audio transmission and avoids excessive power consumption of the headset.

[0007] A third aspect of the present application provides a headset, including a processor and a memory, wherein a computer program is stored in the memory, and the processor is used to execute the computer program to implement the data transmission method described in the first aspect above.

[0008] A fourth aspect of the present application provides a terminal, including a processor and a memory, wherein a computer program is stored in the memory, and the processor is used to execute the computer program to implement the data transmission method described in the second aspect above. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work, among which:

[0010] Figure 1 This is a flow chart of an embodiment of a data transmission method of the present application;

[0011] Figure 2 yes Figure 1 A schematic diagram of a flow chart of an embodiment of S110;

[0012] Figure 3 yes Figure 1 A schematic diagram of a flow chart of another embodiment of S110;

[0013] Figure 4 yes Figure 1 A schematic diagram of a flow chart of an embodiment of S131;

[0014] Figure 5 yes Figure 1 A schematic diagram of a flow chart of another embodiment of S131;

[0015] Figure 6 yes Figure 1 A schematic diagram of a flow chart of another embodiment of S131;

[0016] Figure 7 yes Figure 1 A schematic diagram of a flow chart of an embodiment of S132;

[0017] Figure 8 is a schematic structural diagram of an embodiment of the earphone of the present application;

[0018] Fig. 9 It is a flowchart of another embodiment of the data transmission method of the present application;

[0019] Fig.10 yes Fig. 9 A schematic diagram of a flow chart of an embodiment of S210;

[0020] Fig.11 yes Fig. 9 A schematic diagram of a flow chart of another embodiment of S210;

[0021] Fig.12 yes Fig. 9 A schematic diagram of a flow chart of an embodiment of S231;

[0022] Fig.13 yes Fig. 9 A schematic diagram of a flow chart of another embodiment of S231;

[0023] Fig.14 yes Fig. 9 A schematic diagram of a flow chart of another embodiment of S231;

[0024] Fig.15 yes Fig. 9 A schematic diagram of a flow chart of an embodiment of S232;

[0025] Fig.16 It is a structural diagram of an embodiment of a terminal of the present application. DETAILED DESCRIPTION

[0026] The present application is further described in detail below in conjunction with the accompanying drawings and examples. It is particularly noted that the following examples are only used to illustrate the present application, but are not intended to limit the scope of the present application. Similarly, the following examples are only some embodiments of the present application rather than all embodiments, and all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.

[0027] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0028] The terms "first", "second", "third" in this application are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, the features defined as "first", "second", "third" can expressly or implicitly include at least one of the features. In the description of this application, the meaning of "multiple" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined. In the embodiments of this application, all directional indications (such as up, down, left, right, front, back...) are only used to explain the relative position relationship, movement, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication also changes accordingly. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the steps or units listed, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or devices.

[0029] The first aspect of the present application provides a data transmission method. Figure 1 As shown, Figure 1 The present invention is a flowchart of an embodiment of a data transmission method of the present invention, wherein the data transmission method is performed by a headset, wherein the headset includes a Bluetooth module and a wireless local area network (WIFI, Wireless Fidelity) module. The headset may be in-ear, earplug, head-mounted, ear-hook, neck-mounted, etc., and the present invention does not limit this. Specifically, the data transmission method in the present embodiment includes the following steps:

[0030] S110: Establishing a Bluetooth connection and a WIFI connection with the terminal to send first audio data to the terminal.

[0031] like Figure 2 As shown, Figure 2 yes Figure 1 The flowchart of an embodiment of S110 is shown in FIG. 1 , and S110 can be implemented by the following steps:

[0032] S111: Establishing a Bluetooth connection with the terminal.

[0033] The terminal may refer to a mobile phone, a tablet or a smart wearable device, etc., and this application does not limit this. Those skilled in the art can choose according to actual needs. As for how the headset establishes a Bluetooth connection with the terminal, the Bluetooth connection solutions in the related art can be applied to this application and will not be repeated here.

[0034] S112: receiving network configuration data of a network device sent by the terminal via Bluetooth, wherein the network device is connected to the terminal to send out a WIFI signal.

[0035] For example, the network device may be a router, which sends out a WIFI signal to form a WIFI network; in this case, the network configuration data may include the name and password of the router. The terminal may first access the WIFI network, then obtain the network configuration data of the router, and send the network configuration data to the headset via Bluetooth.

[0036] S113: Connecting to the network device according to the network configuration data.

[0037] After the headset receives the network configuration data, it can parse the name and password of the router from the network configuration data, and then access the WIFI network, thereby realizing the WIFI connection between the headset and the terminal.

[0038] like Figure 3 As shown, Figure 3 yes Figure 1 In the flowchart of another embodiment of S110, the headset may further include a frequency modulation module, and S110 may be implemented by the following steps included therein:

[0039] S114: receiving broadcast data sent by the terminal via the frequency modulation module, the broadcast data including Bluetooth pairing data and network configuration data of the network device, wherein the network device is connected to the terminal for sending a WIFI signal.

[0040] The Bluetooth pairing data may include the name and password of the terminal. The network device may be a router, and the network configuration data may include the name and password of the router. Specifically, the terminal also includes a frequency modulation module. The terminal may first access the WIFI network, then obtain the network configuration data of the router, and send the network configuration data of the router and the Bluetooth pairing data to the headset via the frequency modulation module of the terminal itself.

[0041] S115: Establishing a Bluetooth connection with the terminal according to the Bluetooth pairing data, and connecting to the network device according to the network configuration data.

[0042] After the headset receives the Bluetooth pairing data, it can parse the name and password of the terminal from the Bluetooth pairing data, and then establish a Bluetooth connection with the terminal. After the headset receives the network configuration data, it can parse the name and password of the router from the network configuration data, and then access the WIFI network, thereby realizing the WIFI connection between the headset and the terminal.

[0043] S120: Determine a transmission rate required for the first audio data.

[0044] When the headset sends audio data to the terminal, the transmission rate is generally 120-660 kilobits per second (Kbps). The inventor of the present application has found through long-term research that when the transmission rate required by the first audio data is less than or equal to 300 Kbps, the first audio data can be stably transmitted via Bluetooth, and when the transmission rate required by the first audio data is greater than 300 Kbps, Bluetooth transmission is usually unstable, resulting in poor quality of audio data received by the terminal.

[0045] S131: If the transmission rate is greater than the first threshold, determine to send the first audio data to the terminal via WIFI.

[0046] Among them, the first threshold can be 300kps, or around 300Kbps. For example, the first threshold can take any value between 250-350Kbps. For example, the first threshold can be 250KKbps, 280Kbps, 300Kbps, 320Kbps, and 350Kbps. Technical personnel in this field can choose according to actual needs.

[0047] When the transmission rate required by the first audio data is greater than the first threshold, sending the first audio data to the terminal via WIFI is beneficial to improving the quality of audio transmission and realizing true lossless audio transmission. Figure 4 As shown, Figure 4 yes Figure 1 The flowchart of S131 in the embodiment is shown in FIG. 1 , and S131 can be implemented by the following steps:

[0048] S1311: Determine the power level of the earphone.

[0049] When the headset is fully charged, the power is generally between 4.2V and 4.4V. When the headset power is too low, for example, when the power reaches 3.3V, the headset will enter the shutdown state.

[0050] S1312: If the power level is greater than the second threshold, determine to send the first audio data to the terminal via WIFI.

[0051] The inventor of the present application has found through long-term research that when the power of the earphone is between 3.4-3.8V, if audio data is transmitted via WIFI, the power of the earphone will drop rapidly and the earphone will quickly enter the shutdown state. Therefore, the second threshold value may be between 3.4-3.8V, for example, it may be 3.4V, 3.5V, 3.6V, 3.7V and 3.8V. When the power of the earphone is greater than the second threshold value, it can be considered that the power of the earphone is relatively sufficient to support the transmission of audio data via WIFI. At this time, sending the first audio data to the terminal via WIFI is conducive to ensuring the quality of audio transmission.

[0052] When the power of the headset is less than or equal to the second threshold, it means that the power of the headset is relatively insufficient. At this time, if the first audio data is sent to the terminal via WIFI, the power of the headset will be quickly consumed, and the headset will quickly enter the shutdown state and cannot be used normally. Therefore, when the power of the headset is less than or equal to the second threshold, the first audio data can be sent to the terminal via Bluetooth to avoid the above situation.

[0053] like Figure 5 As shown, Figure 5 yes Figure 1 The flowchart of another embodiment of S131 is shown in FIG. 1 , where S131 can be implemented by the following steps:

[0054] S1314: Determine the rate at which the battery level of the headset decreases.

[0055] In some embodiments, the amount of change in the power of the headset within a preset time can be determined, thereby determining the rate at which the power of the headset decreases. In some embodiments, the time required for the power of the headset to change to a preset value can also be determined, thereby determining the rate at which the power of the headset decreases, which is within the scope that can be easily understood by those skilled in the art, and those skilled in the art can make a choice according to actual needs.

[0056] S1316: If the battery power decrease speed is less than the third threshold, choose to send the first audio data to the terminal via WIFI.

[0057] If the rate of power reduction is greater than or equal to the third threshold, the power reduction is too fast, which may cause the earphone to run out of power quickly and then enter the shutdown state. Therefore, when the rate of power reduction is greater than or equal to the third threshold, the first audio data can be sent to the terminal via Bluetooth to ensure that the earphone runs out of power. The specific value of the third threshold is not limited in this application, and those skilled in the art can select it according to actual needs.

[0058] If the battery level of the earphone decreases at a speed less than the third threshold, it means that the battery level decreases relatively slowly. At this time, the first audio data can be sent to the terminal via WIFI to ensure the quality of audio transmission.

[0059] like Figure 6 As shown, Figure 6 yes Figure 1 The flowchart of another embodiment of S131 is shown in FIG. 1 , where S131 can be implemented by the following steps:

[0060] S1317: Determine the signal strength (RSSI, Received Signal Strength Indication) value of WIFI.

[0061] In some embodiments, the terminal calculates the RSSI value of the WIFI and then sends it to the headset, that is, S1317 can be implemented by receiving the RSSI value sent by the terminal. In some embodiments, the RSSI value of the WIFI can also be directly calculated by the headset, and this application does not limit this, and those skilled in the art can make a choice according to actual needs.

[0062] S1318: If the RSSI value is greater than the fourth threshold, determine to send the first audio data to the terminal via WIFI.

[0063] If the RSSI value is greater than the fourth threshold, the WIFI signal is relatively strong and stable audio data transmission can be achieved. In this case, the first audio data can be sent to the terminal via WIFI. In this embodiment, the absolute value of the fourth threshold can be between 60-80dBm, for example, -60dBm, -65dBm, -70dBm, -75dBm and -80dBm, and those skilled in the art can select according to actual needs.

[0064] If the RSSI value is less than or equal to the fourth threshold, the WIFI signal is relatively weak and stable audio data transmission cannot be achieved. In this case, the first audio data can be sent to the terminal via Bluetooth.

[0065] S132: If the transmission rate is less than or equal to the first threshold, determine to send the first audio data to the terminal via Bluetooth.

[0066] When the transmission rate required by the first audio data is less than or equal to the first threshold, sending the first audio data to the terminal via Bluetooth is beneficial to reducing the power consumption of the headset. Figure 7 As shown, Figure 7 yes Figure 1 The flowchart of S132 in the embodiment is shown in FIG. 1 , and S132 can be implemented by the following steps:

[0067] S1321: Determine the RSSI value of Bluetooth.

[0068] In some embodiments, the terminal calculates the RSSI value of Bluetooth and then sends it to the headset, that is, S1321 can be implemented by receiving the RSSI value sent by the terminal. In some embodiments, the RSSI value of Bluetooth can also be directly calculated by the headset, and this application does not limit this, and those skilled in the art can make a choice according to actual needs.

[0069] S1322: If the RSSI value is greater than the fifth threshold, determine to send the first audio data to the terminal via Bluetooth.

[0070] If the RSSI value is greater than the fifth threshold, the Bluetooth signal is relatively strong and stable audio data transmission can be achieved. In this case, the first audio data can be sent to the terminal via Bluetooth. In this embodiment, the absolute value of the fifth threshold can be between 60-80dBm, for example, -60dBm, -65dBm, -70dBm, -75dBm and -80dBm, and those skilled in the art can select according to actual needs.

[0071] If the RSSI value is less than or equal to the fifth threshold, the Bluetooth signal is relatively weak and stable audio data transmission cannot be achieved. In this case, the first audio data can be sent to the terminal via WIFI.

[0072] This embodiment determines the transmission rate required for the first audio data, and determines whether to send the first audio data to the terminal via Bluetooth or WIFI according to the transmission rate, thereby achieving seamless switching between Bluetooth transmission and WIFI transmission, which is beneficial to true lossless audio transmission and avoids excessive power consumption of the headset.

[0073] A second aspect of the present application provides an earphone 100. Figure 8 , Figure 8 1 is a schematic diagram of the structure of an embodiment of the headset of the present application. The headset 100 includes a memory 110, a processor 120, and a computer program stored in the memory 110 and executable on the processor 120. When the processor 120 executes the computer program, Figure 1 Described data transfer method.

[0074] The processor 120 may also be referred to as a CPU (Central Processing Unit). The processor 120 may be an integrated circuit chip having signal processing capabilities. The processor 120 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. A general-purpose processor may be a microprocessor or the processor 120 may also be any conventional processor, etc.

[0075] The memory 110 may include a random access memory (RAM), a read-only memory (ROM), a flash memory, an erasable programmable read-only memory 110 (EPROM), an electrically erasable programmable read-only memory (EEPROM), a register, a hard disk, a removable disk, a CD-ROM, and the like. The memory 110 may store program data, which may include, for example, a single instruction or many instructions, and may be distributed over several different code segments, distributed between different programs, and distributed across multiple memories. The memory 110 may be coupled to the processor 120 so that the processor 120 can read and write information from / to the memory 110. Of course, the memory 110 may be integrated into the processor 120, which is not limited in the present application, and those skilled in the art may make a selection according to actual needs.

[0076] The third aspect of the present application provides a data transmission method. Fig. 9 As shown, Fig. 9 1 is a flow chart of another embodiment of the data transmission method of the present application, and the data transmission method is executed by a terminal, wherein the terminal includes a Bluetooth module and a WIFI module. Specifically, the data transmission method in this embodiment includes the following steps:

[0077] S210: Establishing a Bluetooth connection and a WIFI connection with the headset to send second audio data to the headset.

[0078] like Fig.10 As shown, Fig.10 yes Fig. 9 The flowchart of an embodiment of S210 is shown in FIG. 1 , and S210 can be implemented by the following steps:

[0079] S211: Establish a Bluetooth connection with the headset.

[0080] Regarding how the terminal establishes a Bluetooth connection with the headset, the Bluetooth connection solutions in the related art can be applied to this application and will not be repeated here.

[0081] S212: Sending network configuration data of the network device to the headset via Bluetooth so that the headset can be connected to the network device, wherein the network device is connected to the terminal for sending a WIFI signal.

[0082] For example, the network device may be a router, which sends out a WIFI signal to form a WIFI network; in this case, the network configuration data may include the name and password of the router. The terminal may first access the WIFI network, then obtain the network configuration data of the router, and send the network configuration data to the headset via Bluetooth. After the headset receives the network configuration data, it may parse the name and password of the router from the network configuration data, and then access the WIFI network, thereby realizing the WIFI connection between the terminal and the headset.

[0083] like Fig.11 As shown, Fig.11 yes Fig. 9 In the flowchart of another embodiment of S210, the terminal may further include a frequency modulation module, and S210 may be implemented by the following steps included therein:

[0084] S213: Sending Bluetooth pairing data and network configuration data of the network device to the headset via the FM module, so that the headset can establish a Bluetooth connection with the terminal based on the Bluetooth pairing data, and connect to the network device based on the network configuration data, wherein the network device is connected to the terminal to send a WIFI signal.

[0085] The Bluetooth pairing data may include the name and password of the terminal. The network device may be a router, and the network configuration data may include the name and password of the router. The terminal may first access the WIFI network, then obtain the network configuration data of the router, and send the network configuration data of the router and the Bluetooth pairing data to the headset via the FM module.

[0086] Correspondingly, the headset also includes a frequency modulation module. After the headset receives the Bluetooth pairing data, it can parse the name and password of the terminal from the Bluetooth pairing data, and then establish a Bluetooth connection with the terminal. After the headset receives the network configuration data, it can parse the name and password of the router from the network configuration data, and then access the WIFI network, thereby realizing the WIFI connection between the terminal and the headset.

[0087] S220: Determine the transmission rate required for the second audio data.

[0088] After long-term research, the inventor of the present application found that when the transmission rate required by the second audio data is less than or equal to 1000Kbps, stable transmission of the second audio data can be achieved via Bluetooth, while when the transmission rate required by the second audio data is greater than 1000Kbps, Bluetooth transmission is usually unstable, resulting in poor quality of audio data received by the headset.

[0089] S231: If the transmission rate is greater than a sixth threshold, determine to send the second audio data to the headset via WIFI.

[0090] Among them, the sixth threshold can be 1000kps, or around 1000Kbps. For example, the sixth threshold can take any value between 900-1000Kbps. For example, the sixth threshold can be 900KKbps, 920Kbps, 940Kbps, 960Kbps, 980Kbps, 990Kbps, and 1000Kbps. Technical personnel in this field can choose according to actual needs.

[0091] When the transmission rate required by the second audio data is greater than the sixth threshold, sending the second audio data to the headset via WIFI is beneficial to improving the quality of audio transmission and achieving true lossless audio transmission. Fig.12 As shown, Fig.12 yes Fig. 9 The flowchart of S231 in the embodiment is shown in FIG. 1 , and S231 can be implemented by the following steps:

[0092] S2311: Determine the charge level of the headset.

[0093] Specifically, the headset detects its own power level and then sends the detected data to the terminal. That is, S2311 is implemented by receiving data sent by the headset. When the headset is fully charged, the power level is generally between 4.2V and 4.4V. When the power level of the headset is too low, for example, when the power level reaches 3.3V, the headset will enter the shutdown state.

[0094] S2312: If the power level is greater than the second threshold, determine to send the second audio data to the headset via WIFI.

[0095] The inventor of the present application has found through long-term research that when the power of the earphone is between 3.4-3.8V, if audio data is transmitted via WIFI, the power of the earphone will drop rapidly and the earphone will quickly enter the shutdown state. Therefore, the second threshold value may be between 3.4-3.8V, for example, it may be 3.4V, 3.5V, 3.6V, 3.7V and 3.8V. When the power of the earphone is greater than the second threshold value, it can be considered that the power of the earphone is relatively sufficient to support the transmission of audio data via WIFI. At this time, sending the second audio data to the earphone via WIFI is conducive to ensuring the quality of audio transmission.

[0096] When the power of the headset is less than or equal to the second threshold, it means that the power of the headset is relatively insufficient. At this time, if the second audio data is sent to the headset via WIFI, the power of the headset will be quickly consumed, and the headset will quickly enter the shutdown state and cannot be used normally. Therefore, when the power of the headset is less than or equal to the second threshold, the second audio data can be sent to the headset via Bluetooth to avoid the above situation.

[0097] like Fig.13 As shown, Fig.13 yes Fig. 9 The flowchart of another embodiment of S231 is shown in FIG. 1 , and S231 can be implemented by the following steps:

[0098] S2314: Determine the rate at which the battery level of the headset decreases.

[0099] Specifically, the headset detects its own battery power reduction speed, and then sends the detected data to the terminal. That is, S2314 is achieved by receiving the data sent by the headset.

[0100] S2316: If the battery power decrease speed is less than the third threshold, determine to send the second audio data to the headset via WIFI.

[0101] If the rate of power reduction is greater than or equal to the third threshold, the power reduction is too fast, which may cause the earphone to run out of power quickly and then enter the shutdown state. Therefore, when the rate of power reduction is greater than or equal to the third threshold, the second audio data may be sent to the earphone via Bluetooth to prevent the earphone from running out of power. The specific value of the third threshold is not limited in this application, and those skilled in the art may select it according to actual needs.

[0102] If the battery level of the headset decreases at a speed less than the third threshold, it means that the battery level decreases relatively slowly. At this time, the second audio data can be sent to the headset via WIFI to ensure the quality of audio transmission.

[0103] like Fig.14 As shown, Fig.14 yes Fig. 9 The flowchart of another embodiment of S231 is shown in FIG. 1 , and S231 can be implemented by the following steps:

[0104] S2317: Determine the RSSI value of WIFI.

[0105] Specifically, the terminal may calculate the RSSI value of the WIFI through its own calculation unit.

[0106] S2318: If the RSSI value is greater than the fourth threshold, determine to send the second audio data to the headset via WIFI.

[0107] If the RSSI value is greater than the fourth threshold, the WIFI signal is relatively strong and stable audio data transmission can be achieved. In this case, the second audio data can be sent to the headset via WIFI. In this embodiment, the absolute value of the fourth threshold can be between 60-80dBm, for example, -60dBm, -65dBm, -70dBm, -75dBm and -80dBm, and those skilled in the art can select according to actual needs.

[0108] If the RSSI value is less than or equal to the fourth threshold, the WIFI signal is relatively weak and stable audio data transmission cannot be achieved. In this case, the second audio data can be sent to the headset via Bluetooth.

[0109] S232: If the transmission rate is less than or equal to the sixth threshold, determine to send the second audio data to the headset via Bluetooth.

[0110] When the transmission rate required by the second audio data is less than or equal to the sixth threshold, sending the second audio data to the headset via Bluetooth is beneficial to reducing the power consumption of the headset. Fig.15 As shown, Fig.15 yes Fig. 9 The flowchart of S232 in the embodiment is shown in FIG. 1 , and S232 can be implemented by the following steps:

[0111] S2321: Determine the RSSI value of Bluetooth.

[0112] Specifically, the terminal may calculate the RSSI value of Bluetooth by using its own calculation unit.

[0113] S2322: If the RSSI value is greater than the fifth threshold, determine to send the second audio data to the headset via Bluetooth.

[0114] If the RSSI value is greater than the fifth threshold, the Bluetooth signal is relatively strong and stable audio data transmission can be achieved. In this case, the second audio data can be sent to the headset via Bluetooth. In this embodiment, the absolute value of the fifth threshold can be between 60-80dBm, for example, -60dBm, -65dBm, -70dBm, -75dBm and -80dBm, and those skilled in the art can select according to actual needs.

[0115] If the RSSI value is less than or equal to the fifth threshold, the Bluetooth signal is relatively weak and stable audio data transmission cannot be achieved. In this case, the second audio data can be sent to the headset via WIFI.

[0116] This embodiment determines the transmission rate required for the second audio data, and determines whether to send the second audio data to the headset via Bluetooth or WIFI according to the transmission rate, thereby achieving seamless switching between Bluetooth transmission and WIFI transmission, which is beneficial to true lossless audio transmission and avoids excessive power consumption of the headset.

[0117] A fourth aspect of the present application provides a terminal 200. Fig.16 , Fig.16 is a schematic diagram of the structure of an embodiment of a terminal of the present application, wherein the terminal 200 includes a memory 210, a processor 220, and a computer program stored in the memory 210 and executable on the processor 220. When the processor 220 executes the computer program, Fig. 9 Described data transfer method.

[0118] The processor 220 may also be referred to as a CPU (Central Processing Unit). The processor 220 may be an integrated circuit chip having signal processing capabilities. The processor 220 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. A general-purpose processor may be a microprocessor or the processor 220 may also be any conventional processor, etc.

[0119] The memory 210 may include a random access memory (RAM), a read-only memory (ROM), a flash memory, an erasable programmable read-only memory 210 (EPROM), an electrically erasable programmable read-only memory (EEPROM), a register, a hard disk, a removable disk, a CD-ROM, and the like. The memory 210 may store program data, which may include, for example, a single instruction or many instructions, and may be distributed over several different code segments, distributed between different programs, and distributed across multiple memories. The memory 210 may be coupled to the processor 220 so that the processor 220 can read and write information from / to the memory 210. Of course, the memory 210 may be integrated into the processor 220, which is not limited in the present application, and those skilled in the art may make a selection according to actual needs.

[0120] In the several embodiments provided in the present application, it should be understood that the disclosed data transmission method can be implemented in other ways. For example, the headset embodiments and terminals described above are only schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0121] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0122] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0123] The above are only some embodiments of the present application, and the protection scope of the present application is not limited thereto. Any equivalent device or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly used in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A data transmission method, performed by a headset, characterized in that: The data transmission method comprises: Establishing a Bluetooth connection and a WIFI connection with a terminal to send first audio data to the terminal; determining a transmission rate required for the first audio data; If the transmission rate is greater than a first threshold, determining to send the first audio data to the terminal via the WIFI; If the transmission rate is less than or equal to the first threshold, it is determined to send the first audio data to the terminal via the Bluetooth.

2. The data transmission method according to claim 1, characterized in that: If the transmission rate is greater than a first threshold, determining to send the first audio data to the terminal via the WIFI includes: Determining the charge level of the earphone; If the power level is greater than a second threshold, it is determined to send the first audio data to the terminal via the WIFI.

3. The data transmission method according to claim 1, characterized in that: If the transmission rate is greater than a first threshold, determining to send the first audio data to the terminal via the WIFI includes: Determine the rate at which the battery level of the headset decreases; If the battery power decrease speed is less than the third threshold, it is determined to send the first audio data to the terminal via the WIFI.

4. The data transmission method according to claim 1, characterized in that: If the transmission rate is greater than a first threshold, determining to send the first audio data to the terminal via the WIFI includes: Determine the signal strength value of the WIFI; If the signal strength value is greater than a fourth threshold, it is determined to send the first audio data to the terminal via the WIFI.

5. The data transmission method according to claim 1, characterized in that: If the transmission rate is less than or equal to the first threshold, determining to send the first audio data to the terminal via the Bluetooth comprises: Determine the signal strength value of the Bluetooth; If the signal strength value is greater than a fifth threshold, it is determined to send the first audio data to the terminal via the Bluetooth.

6. The data transmission method according to claim 1, characterized in that: The establishing of a Bluetooth connection and a WIFI connection with the terminal includes: Establishing the Bluetooth connection with the terminal; Receiving network configuration data of a network device sent by the terminal via the Bluetooth, wherein the network device is connected to the terminal and is used to send a WIFI signal; Connect to the network device according to the network configuration data.

7. The data transmission method according to claim 1, characterized in that: The headset includes a frequency modulation module, and the Bluetooth connection and WIFI connection with the terminal are established, including: Receiving broadcast data sent by the terminal via the frequency modulation module, the broadcast data including Bluetooth pairing data and network configuration data of a network device, wherein the network device is connected to the terminal and is used to send a WIFI signal; The Bluetooth connection is established with the terminal according to the Bluetooth pairing data, and the connection is made to the network device according to the network configuration data.

8. A data transmission method, executed by a terminal, characterized in that: The data transmission method comprises: Establishing a Bluetooth connection and a WIFI connection with the headset to send second audio data to the headset; determining a transmission rate required for the second audio data; If the transmission rate is greater than a sixth threshold, determining to send the second audio data to the headset via the WIFI; If the transmission rate is less than or equal to the sixth threshold, it is determined to send the second audio data to the headset via the Bluetooth.

9. A headset, characterized in that: The method comprises a processor and a memory, wherein the memory stores a computer program, and the processor is used to execute the computer program to implement the data transmission method according to any one of claims 1 to 7.

10. A terminal, characterized in that: It comprises a processor and a memory, wherein the memory stores a computer program, and the processor is used to execute the computer program to implement the data transmission method as claimed in claim 8.