Data transmission method and electronic device

By using the first chip to judge the transmission status of the second chip and delay or directly seize the antenna to transmit data, the problem of low throughput when multiple short-range communication chips work together is solved, and the transmission efficiency is improved.

CN119276289BActive Publication Date: 2025-09-12HONOR DEVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410302115.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-13
Publication Date
2025-09-12
Estimated Expiration
2044-03-13

AI Technical Summary

Technical Problem

When multiple short-range communication chips work together, the second chip fails to receive an acknowledgment frame, causing data retransmission and resulting in low throughput.

Method used

The first chip determines the transmission status of the second chip, delays or directly seizes the antenna to transmit data, ensures that the second chip can receive the confirmation frame, avoids data retransmission, and improves throughput.

Benefits of technology

The collaborative work between multiple short-range communication chips is achieved, the throughput and transmission rate of the second chip are improved, and unnecessary delay preemption and data retransmission are avoided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119276289B_ABST
    Figure CN119276289B_ABST
Patent Text Reader

Abstract

The present application provides a data transmission method and electronic device, which relate to the field of communication technology. The electronic device includes a first chip, a second chip and an AP, wherein the first chip and the second chip are both short-range communication chips, and the first chip and the second chip reuse a first antenna. After the first chip receives the first data sent by the AP, it indicates that the first chip has a transmission demand. Since the second chip needs to receive a confirmation frame after sending a data frame, if the current transmission state of the second chip is a sending state, the first chip can wait for a certain period of time after the sending state of the second chip ends before seizing the first antenna. Therefore, when the second chip sends a data frame in the sending state, the second chip can successfully receive the corresponding confirmation frame by delaying the seizure, thereby improving the success rate of the second chip receiving the confirmation frame, thereby avoiding the need for the second chip to resend the data frame due to failure to receive the confirmation frame, thereby ensuring the throughput of the second chip.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of communication technology, and in particular to a data transmission method and electronic device. Background Art

[0002] With the development of technology, electronic devices are generally equipped with short-range communication chips (such as WI-FI (wireless fidelity) chips). Electronic devices can use short-range communication chips to communicate with other electronic devices to transmit business data corresponding to the business with other electronic devices.

[0003] When there are multiple (eg, two) short-range communication chips on an electronic device, the multiple short-range communication chips need to work together to transmit corresponding service data. Therefore, how to coordinate the multiple short-range communication chips becomes an urgent problem to be solved. Summary of the Invention

[0004] The embodiments of the present application provide a data transmission method and an electronic device for realizing collaborative work among multiple short-range communication chips, thereby avoiding the retransmission of data by the second chip due to failure to receive an acknowledgment frame, thereby causing a low throughput of the second chip.

[0005] To achieve the above objectives, the embodiments of the present application adopt the following technical solutions:

[0006] In a first aspect, a data transmission method is provided for use in an electronic device. The electronic device includes a first chip, a second chip, and an application processor (AP). The first chip and the second chip are short-range communication chips. The AP is connected to the first chip and the second chip, respectively. A first antenna is an antenna multiplexed by the first chip and the second chip. When the first chip receives first data sent by the AP, the first chip can determine whether the second chip is in a transmitting state.

[0007] The first chip determines that the transmission state of the second chip is a sending state. When the transmission state of the second chip switches from the sending state to the first state, it indicates that the sending state of the second chip ends. After a first target time, the first chip can control the first antenna to connect to the first chip. When the first antenna is connected to the first chip, the first antenna is disconnected from the second chip, and the first state is an idle state or a receiving state.

[0008] Afterwards, the first chip may transmit the first data based on the first antenna.

[0009] In the present application, when the first chip receives the first data sent by the AP, it indicates that the first chip has a transmission demand, and the first chip can determine whether the second chip is in a sending state. When the second chip is in a sending state, the second chip may be sending business data, that is, a data frame, and the first chip needs to wait for the second chip's sending state to end. In the case that the sending state of the second chip ends, the first chip delays and preempts the first antenna so as to use the first antenna to transmit the first data, thereby realizing the collaborative work between the first chip and the second chip. And when the second chip is in a sending state and sends a data frame, the delayed preemption allows the second chip to receive the confirmation frame corresponding to the data frame, thereby preventing the need to resend the data frame due to failure to receive the confirmation frame, thereby avoiding too low a throughput of the second chip.

[0010] In one possible design, the first chip determines that the transmission scenario of the second chip is an uplink transmission scenario, indicating that the second chip has a higher probability of sending data frames when in the sending state. Therefore, when the sending state of the second chip ends, that is, when the transmission state of the second chip switches from the sending state to the first state, after the first target time, the first chip controls the first antenna to be connected to the first chip, so that the second chip can still use the first antenna within the second target time, thereby improving the success rate of the second chip receiving the confirmation frame in time, thereby ensuring the throughput of the second chip.

[0011] In one possible design, the first chip determines that the transmission scenario of the second chip is a downlink transmission scenario. If the transmission state of the second chip switches from the sending state to the first state, the first chip can directly control the first antenna to connect with the first chip to transmit the first data via the first antenna. Based on this, when the second chip is in the downlink transmission scenario, the probability of the second chip being in the sending state and sending data frames is low. Therefore, when the second chip ends its sending state, the first chip can directly seize the first antenna to transmit the first data using the first antenna, thereby achieving timely seizure of the first antenna and avoiding unnecessary delayed seizure, thereby achieving timely transmission of the first data and ensuring the transmission rate of the first data.

[0012] In one possible design, the process of determining the transmission scenario may include:

[0013] The first chip can determine the transmission scenario of the second chip based on one or more of information including information about the service corresponding to the second data transmitted by the second chip, the transmission time of the second chip, and the number of transmissions by the second chip. The transmission scenario indicates whether the second chip is in an uplink transmission scenario or a downlink transmission scenario. Based on this, the first chip can determine the transmission scenario of the second chip based on the actual transmission status of the second chip, thereby accurately determining the transmission scenario.

[0014] The transmission time of the second chip includes the sending time and receiving time of the second chip. The sending time of the second chip indicates the duration of time the second chip is in the sending state, and the receiving time indicates the duration of time the second chip is in the receiving state.

[0015] The transmission quantity of the second chip includes the sending quantity and receiving quantity of the second chip. The sending quantity of the second chip indicates the quantity of second data successfully sent by the second chip, and the receiving quantity indicates the quantity of second data successfully received by the second chip.

[0016] In one embodiment, the first chip may determine the transmission scenario of the second chip based on the transmission time of the second chip. The first chip determines a first difference value based on the transmission time and reception time of the second chip. The first difference value represents the difference between the duration the second chip is in a transmission state and the duration it is in a reception state. The larger the first difference value, the higher the probability that the transmission scenario of the second chip is an uplink transmission scenario.

[0017] The first chip determines whether the first difference value is greater than or equal to the first preset difference value to determine whether the second chip is mainly in the sending state, thereby determining whether the probability of the second chip being in the uplink transmission scenario is high.

[0018] The first chip determines that the first difference value is greater than or equal to the first preset difference value, indicating that the second chip is mainly in a transmitting state. In other words, the probability that the second chip is in an uplink transmission scenario is high, and the first chip can determine that the transmission scenario of the second chip is an uplink transmission scenario. The first chip determines that the first difference value is less than the first preset difference value, indicating that the second chip is not mainly in a transmitting state. In other words, the probability that the second chip is in a downlink transmission scenario is low, and the first chip can determine that the transmission scenario of the second chip is a downlink transmission scenario.

[0019] Based on this, the first chip uses the transmission time of the second chip to determine the transmission scenario of the second chip, thereby achieving rapid determination of the transmission scenario.

[0020] Optionally, the first difference value may be a difference or a ratio between the sending time and the receiving time.

[0021] In another embodiment, the first chip may determine the transmission scenario of the second chip based on the transmission quantity of the second chip. The first chip determines a second difference value based on the transmission quantity and reception quantity of the second chip. The second difference value represents the difference between the number of second data sent and the number of second data received by the second chip. The larger the second difference value, the higher the probability that the transmission scenario of the second chip is an uplink transmission scenario.

[0022] The first chip determines whether the second difference value is greater than or equal to the second preset difference value to determine whether the second chip mainly sends second service data, thereby determining whether the probability of the second chip being in the uplink transmission scenario is high.

[0023] If the first chip determines that the second difference value is greater than or equal to the second preset difference value, it indicates that the second chip is primarily in a transmitting state. That is, the probability that the second chip is in an uplink transmission scenario is high, and the first chip can determine that the transmission scenario of the second chip is an uplink transmission scenario. If the first chip determines that the second difference value is less than the second preset difference value, it indicates that the second chip is not primarily in a transmitting state. That is, the probability that the second chip is in a downlink transmission scenario is low, and the first chip can determine that the transmission scenario of the second chip is a downlink transmission scenario.

[0024] Based on this, the first chip uses the transmission quantity of the second chip to determine the transmission scenario of the second chip, thereby achieving rapid determination of the transmission scenario.

[0025] In another scenario, the first chip can determine the transmission scenario of the second chip based on the transmission time and the number of transmissions of the second chip. The first chip determines the first difference value and the second difference value respectively. Then, the first chip can determine the second difference value based on the number of transmissions and the number of receptions of the second chip. The first chip determines the transmission scenario of the second chip based on the first difference value and the second difference value. Based on this, the first chip uses the transmission time and the number of transmissions of the second chip to comprehensively determine the transmission scenario of the second chip, ensuring the accuracy of the transmission scenario determination.

[0026] In another case, the first chip can determine the transmission scenario of the second chip based on the service corresponding to the second data transmitted by the second chip, the transmission time of the second chip, and the number of transmissions by the second chip. The first chip determines the first difference value and the second difference value respectively. The first chip also determines the transmission type corresponding to the service based on information about the service corresponding to the second data. The transmission type is either an uplink transmission type or a downlink transmission type. The first chip can then determine the transmission scenario of the second chip based on the transmission type, the first difference value, and the second difference value, thereby accurately determining the transmission scenario.

[0027] In one possible design, the first chip determines that the second chip is in a downlink transmission scenario. If the transmission state of the second chip is idle or receiving, the first chip can directly control the first antenna to connect with the first chip, thereby directly preempting the first antenna, thereby ensuring the transmission performance of the first chip and avoiding affecting the throughput of the second chip.

[0028] In one possible design, the first chip determines that the transmission state of the second chip is a receiving state, indicating that the second chip may be currently receiving a confirmation frame. If the transmission state of the second chip switches from a receiving state to an idle state, or after a second target time, the first chip controls the first antenna to connect with the first chip, thereby realizing delayed preemption of the first antenna, so that the second chip can receive the confirmation frame, thereby preventing the need to resend the data frame due to failure to receive the confirmation frame, thereby avoiding the throughput of the second chip being too low.

[0029] Optionally, if the second chip's transmission state switches from a receiving state to an idle state, or after a second target time has elapsed and before the first chip controls the first antenna to connect to the first chip, the first chip can determine that the second chip is in an uplink transmission scenario. Based on this, when the first chip is in an uplink transmission scenario, the second chip is more likely to be in a receiving state and receive an acknowledgment frame. Therefore, the first chip can delay preempting the first antenna to ensure a successful reception of the acknowledgment frame by the second chip.

[0030] In one possible design, the process of determining the first target time may include:

[0031] The first chip determines a scenario prediction value based on the second chip's transmission time and / or transmission volume. The scenario prediction value indicates the probability that the second chip is in an uplink transmission scenario. The first chip then determines a first target time based on the scenario prediction value. The larger the scenario prediction value, the longer the first target time. This enables adaptive determination of the first target time, ensuring high overall transmission performance of the electronic device when the first chip delays preemption based on the first target time.

[0032] In a second aspect, the present application provides a data transmission method, applied to an electronic device, the electronic device comprising a first chip, a second chip, and an access point (AP), wherein the first chip and the second chip are short-range communication chips, and the AP is connected to the first chip and the second chip, respectively; the first chip independently uses a first antenna. The first chip receives first data sent by the AP;

[0033] The first chip determines that the transmission state of the second chip is a sending state. If the transmission state of the second chip switches from the sending state to the first state, after a first target time, the first chip transmits the first data via the first antenna.

[0034] In an embodiment of the present application, when the first chip and the second chip use antennas independently, after the first chip determines that the second chip is in a sending state, the second chip may be sending business data, and the first chip needs to wait for the second chip's sending state to end. When the second chip's sending state ends, in order to avoid mutual interference between the first chip and the second chip, the first chip can delay using the first antenna to transmit data, thereby achieving collaborative work between the first chip and the second chip. And when the second chip is in a sending state and sends a data frame, the second chip can receive the confirmation frame corresponding to the data frame, preventing the need to resend the data frame due to failure to receive the confirmation frame, thereby avoiding too low a throughput of the second chip.

[0035] Optionally, the second chip independently uses the second antenna.

[0036] Optionally, the number of the first antenna and the second antenna is one or more.

[0037] In one possible design, the first chip determines that the transmission scenario of the second chip is an uplink transmission scenario. If the transmission state of the second chip switches from the sending state to the first state, after a first target time, the first chip uses the first antenna to transmit the first data.

[0038] In addition, the first chip determines that the transmission scenario of the second chip is a downlink transmission scenario. If the transmission state of the second chip switches from the sending state to the first state, the first chip uses the first antenna to transmit the first data.

[0039] Optionally, when the transmission scenario of the second chip is an uplink transmission scenario, if the second chip is in a receiving state, the first chip may use the first antenna to transmit the first data after a second target time has elapsed. Alternatively, the first chip may use the first antenna to transmit the first data when the second chip switches from a receiving state to an idle state.

[0040] In a third aspect, the present application provides a chip system, which includes a first chip and a second chip, and the first chip and the second chip are both short-range communication chips.

[0041] The first chip is used to determine whether the second chip is in a sending state when there is first data to be transmitted.

[0042] The first chip is further configured to control the first antenna to connect to the first chip after a first target time has elapsed when the transmission state of the second chip switches from a transmitting state to a first state. When the first antenna is connected to the first chip, the first antenna is disconnected from the second chip. The first state is an idle state or a receiving state.

[0043] The first antenna is located in the chip system, or is connected to the chip system. Specifically, the first antenna is connected to the first chip in the chip system.

[0044] Optionally, the second chip may transmit the second data using a second antenna. The second antenna is located within the chip system. Alternatively, the second antenna is connected to the chip system. Specifically, the second antenna is connected to the second chip within the chip system.

[0045] In a possible implementation of the third surface, the first chip and the second chip are connected.

[0046] In a possible implementation manner of the third aspect, the chip system further includes an AP, which is connected to the first chip and the second chip respectively.

[0047] In a possible implementation of the third aspect, the chip system is applied to an electronic device, and the electronic device executes the method described above.

[0048] In a fourth aspect, the present application provides an electronic device, comprising a display screen, a memory, a first chip, a second chip, and one or more processors; the display screen, the memory, the first chip, and the second chip are coupled to the processor; the processor comprises an application processor, the display screen is used to display an image generated by the processor, the memory is used to store computer program code, the first chip and the second chip are short-range communication chips, both used to transmit data, and the computer program code comprises computer instructions; when the processor executes the computer instructions, the electronic device executes the method described above.

[0049] In a fifth aspect, the present application provides a computer-readable storage medium comprising computer instructions, which, when executed on an electronic device, enables the electronic device to execute the method described above.

[0050] In a sixth aspect, the present application provides a computer program product, comprising a computer program, which enables the electronic device to execute the method described above when the computer program is run on the electronic device.

[0051] It can be understood that the beneficial effects that can be achieved by the data transmission method described in the second aspect, the chip system described in the third aspect, the electronic device described in the fourth aspect, the computer-readable storage medium described in the fifth aspect, and the computer program product described in the sixth aspect provided above can refer to the beneficial effects in the first aspect and any possible implementation method thereof, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;

[0053] Figure 2 A structural block diagram of an electronic device provided in an embodiment of the present application;

[0054] Figure 3A A communication process diagram provided in an embodiment of the present application Figure 1 ;

[0055] Figure 3B A communication process diagram provided in an embodiment of the present application Figure 2 ;

[0056] Figure 3C Schematic diagram 3 of a communication process provided in an embodiment of the present application;

[0057] Figure 4A A communication scenario provided in this embodiment of the present application Figure 1 ;

[0058] Figure 4B A communication scenario provided in this application embodiment Figure 2 ;

[0059] Figure 4C Schematic diagram 3 of a communication scenario provided in an embodiment of the present application;

[0060] Figure 5 A schematic diagram of a dual-chip structure provided in an embodiment of the present application Figure 1 ;

[0061] Figure 6A Schematic diagram of an antenna preemption process provided in an embodiment of the present application Figure 1 ;

[0062] Figure 6B Schematic diagram of an antenna preemption process provided in an embodiment of the present application Figure 2 ;

[0063] Figure 7A Schematic diagram 3 of an antenna preemption process provided in an embodiment of the present application;

[0064] Figure 7B Schematic diagram 4 of an antenna preemption process provided in an embodiment of the present application;

[0065] Figure 7C Schematic diagram of an antenna preemption process provided in an embodiment of the present application Figure 5 ;

[0066] Figure 7D Schematic diagram 6 of an antenna preemption process provided in an embodiment of the present application;

[0067] Figure 8 A schematic diagram of a data transmission method provided in an embodiment of the present application Figure 1 ;

[0068] Figure 9A A schematic diagram of a dual-chip structure provided in an embodiment of the present application Figure 2 ;

[0069] Figure 9B Schematic diagram 3 of a dual-chip structure provided in an embodiment of the present application;

[0070] Figure 9C Schematic diagram 4 of a dual-chip structure provided in an embodiment of the present application;

[0071] Figure 10A A switch schematic provided in an embodiment of the present application Figure 1 ;

[0072] Figure 10B A switch schematic provided in an embodiment of the present application Figure 2 ;

[0073] Figure 11A Schematic diagram 7 of an antenna preemption process provided in an embodiment of the present application;

[0074] Figure 11B Schematic diagram of an antenna preemption process provided in an embodiment of the present application Figure 8 ;

[0075] Figure 12 A schematic diagram of a data transmission method provided in an embodiment of the present application Figure 2 ;

[0076] Figure 13 A schematic diagram of a dual-chip structure provided in an embodiment of the present application Figure 5 . DETAILED DESCRIPTION

[0077] In order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described in the present application as "exemplary" or "for example" should not be interpreted as being more preferred or advantageous than other embodiments or design. To be precise, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way. In the embodiments of the present application, "at least one" refers to one or more, and "more" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the related objects before and after are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple. In the embodiments of the present application, "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, the features defined as "first" and "second" can explicitly or implicitly include one or more of the features. In the description of this embodiment, unless otherwise specified, the meaning of "multiple" is two or more.

[0078] Figure 1 A schematic structural diagram of the electronic device 100 is shown.

[0079] The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.

[0080] It should be understood that the structure illustrated in the embodiments of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0081] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors.

[0082] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

[0083] The processor 110 may also include a memory for storing instructions and data.

[0084] In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface.

[0085] It is understood that the interface connection relationship between the modules illustrated in the embodiment of the present invention is merely an illustrative illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods from the above embodiments, or a combination of multiple interface connection methods.

[0086] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

[0087] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antennas can be used in conjunction with a tuning switch.

[0088] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0089] The modem processor may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After being processed by the baseband processor, the low-frequency baseband signal is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.) or displays an image or video through the display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.

[0090] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as WI-FI networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc. applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0091] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology.

[0092] In some embodiments, the number of the above-mentioned antennas 2 may be one or more. The above-mentioned wireless communication module 160 may include a short-range communication module (or short-range communication chip). The short-range communication chip may include at least one of NFC, WI-FI, and BT chips. The number of short-range communication chips is multiple, and the short-range communication chips may include the same chips or different chips. For example, the number of short-range communication chips is two, namely a short-range main chip and a short-range sub-chip. The short-range main chip includes NFC, WI-FI, and BT chips, and the short-range sub-chip includes NFC, WI-FI, and BT chips. The short-range sub-chip and the short-range main chip include the same chip. The short-range main chip includes NFC, WI-FI, and BT chips, and the short-range sub-chip includes WI-FI and BT chips. The short-range sub-chip and the short-range main chip include different chips.

[0093] Among them, each short-range communication chip is connected to the above-mentioned AP, and is used to receive business data allocated by the AP, send the business data to an external device, or receive business data sent by an external device to realize the transmission of business data.

[0094] Optionally, the short-range communication chips may reuse antennas, may be directly connected to each other for communication, or may communicate through an AP without establishing a connection between the short-range communication chips.

[0095] Optionally, the short-range master chip supports a single input single output (SISO) mode and a multiple input multiple output (MIMO) mode. The short-range slave chip supports the SISO mode.

[0096] Exemplarily, the above-mentioned AP may also be referred to as an AP processor or an AP chip, etc.

[0097] In some embodiments, the short-range communication chip may include a radio frequency (RF) module for transmitting radio frequency signals to achieve the transmission of service data. In addition, the short-range communication chip may also include a baseband (such as the following Figure 2 shown).

[0098] The above-mentioned short-range communication chip may be an H2.0 chip, for example, the above-mentioned short-range slave chip may be an H2.0 chip.

[0099] In some embodiments, the AP chip can be integrated into a system-on-chip (SOC) chip of an electronic device, and the short-range main chip and the short-range slave chip may not be integrated into the SOC. The short-range main chip and the short-range slave chip are two independent communication chips. Of course, this is only an example, and the short-range main chip and / or the short-range slave chip can also be integrated into the SOC. This application is not limited to this. It only requires that the AP can be connected to the short-range main chip and the short-range slave chip respectively.

[0100] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area can store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0101] The sensor module 180 may include a pressure sensor, a gyroscope sensor, and the like.

[0102] The software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes a layered architecture system as an example to exemplify the software structure of the electronic device 100.

[0103] Figure 2 It is a structural block diagram of the electronic device 100 according to an embodiment of the present application.

[0104] A layered architecture divides software into several layers, each with distinct roles and responsibilities. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into five layers: from top to bottom: the application layer, the application framework layer, the Android runtime and system libraries, the hardware abstraction layer (HAL), and the kernel layer.

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

[0106] like Figure 2As shown, the application package can include camera, gallery, call, multi-screen collaboration, navigation, WLAN, Bluetooth, music, video, short message, smart home and other applications.

[0107] like Figure 2 As shown, the application framework layer may include applications such as a dual-chip coexistence service module, a quality of experience (QOE) information recognition module, and a scene recognition module.

[0108] The scene recognition module is used to identify the application running on the electronic device 100, that is, the running service, or to identify the service scenario in which the electronic device 100 is located, such as a file download scenario, an audio and video playback scenario, a video call scenario, a smart home scenario, etc. The scene recognition module can send service information (such as application identification, service scenario identification, etc.) to the dual-chip coexistence service module.

[0109] The QOE information identification module is used to count the transmission quantity of data frames of the short-distance main chip, such as the number of transmissions and receptions, and can send the transmission quantity to the dual-chip coexistence service module.

[0110] The dual-chip coexistence service module is configured to determine the transmission scenario, such as uplink transmission scenario or downlink transmission scenario, of the short-range master chip based on information such as the number of data frame transmissions and service information. This transmission scenario is then sent to the dual-chip coexistence strategy module of the short-range slave chip. Alternatively, the dual-chip coexistence service module is configured to send the number of data frame transmissions and service information to the dual-chip coexistence strategy module, so that the dual-chip coexistence strategy module can determine the transmission scenario of the short-range master chip based on information such as the number of data frame transmissions and service information.

[0111] Android Runtime includes core libraries and a virtual machine. Android Runtime is responsible for scheduling and management of the Android system.

[0112] The system library can include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.

[0113] The hardware abstraction layer (HAL) is the interface layer between the operating system kernel and the hardware circuit. Figure 2As shown, the hardware abstraction layer can include a HAL channel. Data can be transmitted between the software layer (e.g., the application framework layer) and the short-range communication chip via the HAL channel. For example, the HAL channel can transmit service data, service information, the number of data frames transmitted, and other data.

[0114] Optionally, the HAL channel may include HAL channel 1 and HAL channel 2. When data is transmitted between the application framework layer (such as the QOE information identification module) and the short-distance master chip, it can be transmitted through HAL channel 1. When data is transmitted between the application framework layer (such as the dual-chip coexistence service module) and the short-distance slave chip, it can be transmitted through HAL channel 2.

[0115] The kernel layer is the layer between hardware and software. The kernel layer contains at least the short-distance main chip driver and the short-distance slave chip driver.

[0116] It should be understood that the software system to which the above-mentioned software layer belongs may be a software system located on the AP chip, that is, a program code running on the AP chip.

[0117] In some embodiments, the dual-chip coexistence strategy module in the short-range slave chip can determine the policy information of the antenna preemption strategy to be executed based on the transmission scenario of the short-range master chip, and send it to the data transmission arbitration module. The data transmission arbitration module can determine the preemption timing based on different antenna preemption strategies, such as the preemption strategy corresponding to the strategy information, to timely preempt antenna a.

[0118] It should be understood that the above-mentioned short-range main chip and short-range secondary chip are only examples. The electronic device 100 can also include other numbers of short-range communication chips, and each short-range communication chip has a corresponding short-range communication chip driver, such as including three short-range communication chips and three short-range communication chip drivers, and the short-range communication chips and short-range communication chip drivers correspond one to one.

[0119] To facilitate understanding of the embodiments of the present application, some terms involved in the embodiments of the present application are explained below.

[0120] Short-range communication: refers to a communication method for transmitting data within a relatively close distance. When the distance between electronic devices is less than a certain distance, electronic devices can communicate with each other through short-range communication. Exemplary short-range communication methods may include Bluetooth, near field communication (NFC), WI-FI, and other communication methods. In this application, short-range communication can also be referred to as close range communication or short-range communication.

[0121] WI-FI connection mode: including WI-FI station (STA) mode and WI-FI peer-to-peer (P2P) mode. Among them, the WI-FI STA mode means that an electronic device can establish a WI-FI connection with other devices through a wireless access point (AP), that is, to conduct WI-FI communication, and the role of the electronic device can be a station. The WI-FI P2P mode refers to direct point-to-point communication between multiple devices using WI-FI technology to form a P2P network (also known as a P2P group), which includes a group owner (group owner, Go) and at least one group client (group client, Gc). It can be understood that the group owner is equivalent to the above-mentioned wireless access point (or described as a router), and the group client is equivalent to the above-mentioned site.

[0122] Antenna duty cycle for the short-range slave chip: The percentage of time within a unit time that the short-range slave chip can use the antenna (such as antenna a in the embodiment of this application). For example, if the unit time is 100 milliseconds (ms) and the antenna duty cycle is 70%, then within that 100ms, the short-range slave chip can use antenna a for 70ms.

[0123] Transmit (TX) time slot: indicates that the electronic device is in a transmitting state. The transmitting state may mean that the short-range communication chip of the electronic device uses the antenna to send a multimedia access control (MAC) frame to an external device.

[0124] Receive (RX) time slot: indicates that the electronic device is in a transmitting state. The receiving state may mean that the short-range communication chip of the electronic device uses the antenna to receive MAC frames sent by the external device.

[0125] Idle time slots indicate that the electronic device is neither in the transmitting nor receiving state. In other words, the short-range communication chip of the electronic device is neither using the antenna to send MAC frames to the external device nor using the antenna to receive MAC frames sent by the external device.

[0126] MAC frame: A frame format used to transmit data at the data link layer. For example, in Wi-Fi networks, electronic devices use MAC frames to transmit data. MAC frames can include control frames, data frames, and management frames.

[0127] The management frame may include an acknowledgment (ACK) frame. Figure 3AAs shown in the figure, after a STA sends a data frame X, it receives an acknowledgment frame from the AP after a short interframe space (SIFS). This confirms that data frame X was sent successfully and eliminates the need to resend data frame X. The STA then continues to send data frame X+1, and after another SIFS, it receives an acknowledgment frame from the AP. In other words, the AP must respond with an acknowledgment frame for each data frame sent by the STA.

[0128] In addition, the confirmation frame may also include a block ACK frame. Figure 3B As shown, after the sender sends a data frame (or data block), it sends a reception confirmation request to the receiver. After receiving the data frame, the receiver responds to the reception confirmation request by sending a block confirmation frame to the sender. When the sender receives the block confirmation frame, it can determine that the data frame has been successfully sent. The sender can then continue to send the next data frame. The data frame can be a combination of multiple sub-data frames (such as a QoSData frame).

[0129] The above control frames may include a request to send (RTS) frame and a clear to send (CTS) frame. The RTS frame is used to request control of the medium for a certain period of time, such as requesting to occupy a channel for a certain period of time. The CTS frame is an RTS response reply. When the sender receives the CTS frame, the medium will be reserved for the STA. Both the CTS frame and the RTS frame include a Duration field, which is used to indicate the duration of continuous occupation of the medium. Specifically, Figure 3C As shown in the figure, the STA sends an RTS frame to the AP, and nearby devices can also receive the RTS frame. In response to the RTS frame, if the AP can receive a data frame (such as an expected frame transmission frame) within the time indicated by the duration field, it can send a CTS frame to the STA, and nearby devices can also receive the CTS frame. After the STA receives the CTS frame, it indicates that the AP can receive the data frame and can then send the data frame. After a short inter-frame interval, the STA receives an acknowledgment frame sent by the AP, which determines that the data frame has been sent successfully and there is no need to resend the data frame. After that, the STA continues to send the next data frame. In addition, based on the RTS and CTS frames, nearby devices stop competing for the channel within the time indicated by the duration field to reserve bandwidth for the STA and avoid conflicts.

[0130] To improve the efficiency of electronic devices in processing services, they are equipped with two short-range communication chips: a short-range main chip and a short-range secondary chip. The short-range main chip and the short-range secondary chip can transmit service data for corresponding services respectively, enabling concurrent operation of services.

[0131] In some embodiments, there are more and more types of electronic devices, such as mobile phones, tablets, PCs, smart watches, Bluetooth headsets, smart screens, smart appliances, etc. In order to achieve interconnection between multiple electronic devices, the first electronic device can first perform device discovery through short-range communication. Then, the first electronic device transmits device authentication data (such as a key) to other discovered devices (second electronic devices) through short-range communication to match the devices and establish a first short-range communication connection. In some embodiments, after the first short-range communication connection is established, the first electronic device can also establish a second short-range communication connection with the second electronic device, so that business data can be transmitted between electronic devices through the first short-range communication connection or the second short-range communication connection. In a multi-screen collaboration scenario or a super notification scenario, different types of electronic devices may establish short-range communication connections through different types of short-range communication chips. For example, taking the first electronic device as a mobile phone as an example, in a multi-screen collaboration scenario, the mobile phone can respectively communicate with the second electronic device through a short-range communication chip (here or referred to as a short-range main chip). Figure 4A In addition, the mobile phone can also establish a Wi-Fi IP2P connection (or simply a P2P connection) with the tablet computer and personal computer (PC) in the short distance. Figure 4A The Bluetooth headset, smart watch, mouse and keyboard in the Bluetooth connection are established to transmit the corresponding business data. Figure 4A As shown, the mobile phone establishes Bluetooth low energy (BLE) connections with the mouse and keyboard respectively. The mobile phone also establishes Bluetooth connections with the Bluetooth headset and the short-range main chip in the smart watch.

[0132] However, during the operation of the multi-screen collaborative service (or called collaborative service) or the super notification service, the electronic device may also run other services at the same time, and the electronic device also needs to use the short-range communication chip to transmit the service data corresponding to other services. In other words, not only the multi-screen collaborative service and the super notification service need to use the short-range communication chip, but there are also other services that require the support of the short-range communication chip. Therefore, in order to ensure the smoothness of the concurrent operation of the services, a new short-range communication chip can be added inside the electronic device. In other words, there are two short-range communication chips in the electronic device. One of the two short-range communication chips can be called a short-range main chip, and the other can be called a short-range sub-chip. The short-range main chip and the short-range sub-chip can process different services at the same time. For example, the short-range main chip processes three-party services, such as smart home services, car-machine interconnection services, etc. The short-range sub-chip can handle private services, such as multi-screen collaborative services, super notification services, etc.

[0133] It should be understood that the services processed by the short-range primary chip listed above are only examples. The short-range primary chip can also handle other services, such as video calling, social networking, short video, news, file downloads, audio and video playback, and gaming. Similarly, the services processed by the short-range secondary chip listed above are only examples. The short-range secondary chip can also handle other services.

[0134] For example, the mobile phone can communicate with the Figure 4B Tablets and PCs (such as tablets and short-range secondary chips in PCs) transmit business data corresponding to multi-screen collaborative services, such as device authentication data, screen projection data, file transfer, notification messages, etc. In addition, Figure 4B As shown, the mobile phone can also communicate with the smart watch and Bluetooth headset (such as the short-range sub-chip in the smart watch and Bluetooth headset) through the short-range sub-chip to transmit business data. For example, the smart watch can send business data such as heartbeat data, step count, location, etc. detected by the smart watch to the short-range sub-chip in the mobile phone through the short-range sub-chip. The mobile phone can send business data such as audio data and command data (such as play, pause command data) to the short-range sub-chip in the Bluetooth headset through the short-range sub-chip. In addition, the mobile phone can communicate with the smart watch and Bluetooth headset respectively through the short-range sub-chip. Figure 4B The mouse and keyboard shown communicate to transmit service data, such as user operation data. Optionally, in the case where the mouse and keyboard include a short-range main chip and a short-range slave chip, the mobile phone can communicate with the short-range slave chip in the mouse and keyboard through the short-range slave chip.

[0135] Among them, the mobile phone can establish a communication connection with other devices based on the short-range secondary chip through the short-range communication protocol 1 to transmit business data. Figure 4B As shown, the mobile phone can establish P2P connections with the tablet computer and PC respectively through P2P communication protocol 1. The mobile phone can establish Bluetooth connections with the Bluetooth headset, smart watch, keyboard and mouse respectively through Bluetooth communication protocol 1. Figure 4B As shown, the mobile phone can establish BLE connections with the mouse and keyboard respectively.

[0136] Among them, optionally, the above-mentioned short-range communication protocol 1 can be a custom short-range communication protocol (ie, a private protocol), for example, the above-mentioned P2P communication protocol 1 can be a custom P2P communication protocol, and the above-mentioned Bluetooth communication protocol 1 can be a custom Bluetooth communication protocol.

[0137] In addition, the mobile phone can communicate with the main chip through the short distance Figure 4C Smart home appliances such as air conditioners, sweeping robots, refrigerators, and air purifiers transmit business data corresponding to smart home services, such as control data such as opening, closing, and mode adjustment. Figure 4CAs shown, the mobile phone can also transmit business data corresponding to the vehicle computer business, such as control commands, files, and other data, to the vehicle through the short-range main chip. Of course, the mobile phone can also transmit business data with other devices through the short-range main chip, such as transmitting control commands, files, and other data to a printer.

[0138] Among them, the mobile phone can establish a communication connection with other devices based on the short-range main chip through the short-range communication protocol 2 to transmit business data. For example, the mobile phone can establish a communication connection with the refrigerator, air conditioner, air purifier, and sweeping robot through the router based on the short-range communication protocol 2 to transmit business data (as mentioned above Figure 4C The mobile phone can establish a Bluetooth connection with the vehicle (such as the head unit in the vehicle) via Bluetooth communication protocol 2.

[0139] Optionally, since the short-range main chip is mainly used to process three-party services, the short-range communication protocol 2 can be a standard short-range communication protocol. For example, the above-mentioned Bluetooth communication protocol 2 can be a standard Bluetooth communication protocol.

[0140] It should be noted that the above Figure 4B The scenario shown can also be a super notification scenario. For example, after receiving an incoming call, the mobile phone can send the incoming call data to a tablet computer, PC, Bluetooth headset, smart watch and other devices through the short-range secondary chip, so that the device can prompt the incoming call. Among them, optionally, Figure 4B The dotted circle in the figure indicates that devices (i.e., tablet computer, PC, Bluetooth headset, smart watch, mobile phone, mouse and keyboard) can be networked and communicate with each other through the short-range secondary chip.

[0141] In addition, the above Figure 4B The tablet computer can also establish a short-range communication connection with other devices (such as smart watches and PCs) through the short-range main chip, so as to use the short-range main chip to transmit business data corresponding to other services. Similarly, the PC can also establish a short-range communication connection with other devices (such as Bluetooth headsets and tablets) through the short-range main chip, so as to use the short-range main chip to transmit business data corresponding to other services, thereby realizing concurrent operation of services.

[0142] Optionally, as described above Figure 4A or Figure 4B As shown above, tablet computers, mobile phones and PCs can be in the same network environment and use the Wi-Fi provided by the router. Figure 4C As shown in the figure, in a smart home scenario, a sweeping robot, an air purifier, a refrigerator, an air conditioner, and a mobile phone can be in the same network environment and use the Wi-Fi provided by the router.

[0143] The short-range main chip can include at least one of the following short-range communication chips: an NFC chip, a Bluetooth chip, and a Wi-Fi chip. Similarly, the short-range secondary chip can also include at least one of the following short-range communication chips: an NFC chip, a Bluetooth chip, and a Wi-Fi chip. The short-range secondary chip can contain the same or different types of short-range communication chips as the short-range main chip. Furthermore, due to the limited space available in the smartwatch and Bluetooth headset, the smartwatch and Bluetooth headset can also include only one short-range communication chip, rather than an additional one.

[0144] In some embodiments, for electronic devices with smaller spaces, such as mobile phones, the short-range main chip and the short-range secondary chip in the electronic device can time-share one antenna (or called antenna a) to reduce the number of antennas, thereby reducing the space occupied by the antennas. Time-shared multiplexing of antenna a by the short-range main chip and the short-range secondary chip means that while the short-range main chip uses antenna a to transmit business data, the short-range secondary chip cannot use antenna a to transmit business data. While the short-range secondary chip uses antenna a to transmit business data, the short-range main chip cannot use antenna a to transmit business data. In other words, the short-range main chip and the short-range secondary chip cannot use antenna a to transmit business data continuously, but transmit business data alternately. Figure 5 As shown, the short-range slave chip can realize the reuse of antenna a by switching the single-pole double-throw switch 1. Among them, the short-range slave chip can realize the reuse of antenna a according to antenna preemption strategies such as TX / RX time slot preemption strategy, RX time slot preemption strategy, and idle time slot preemption strategy.

[0145] Among them, the idle time slot preemption strategy means that when the short-range slave chip detects that the short-range main chip is not in the sending state or the receiving state, that is, when it is in the idle state, it indicates that the short-range main chip does not need to use antenna a to transmit business data (or alternatively described as data frames). The short-range slave chip can switch the single-pole double-throw switch 1 to the short-range slave chip side to realize the preemption of antenna a. However, the idle time slot preemption strategy may cause the short-range main chip to use antenna a for too long. When the business processed by the short-range slave chip has high real-time requirements (here or alternatively described as throughput, transmission rate), the inability to use antenna a to transmit business data in a timely manner may cause the smoothness of the business operation of the short-range slave chip to be greatly affected.

[0146] The TX / RX time slot preemption strategy means that when the short-distance slave chip needs to transmit service data, it can directly switch the single-pole double-throw switch 1 to the short-distance slave chip side to achieve the preemption of antenna a. For example, Figure 6AAs shown, first, the short-range secondary chip can seize antenna a when it needs to transmit the data frame corresponding to service a. After 100ms of seizure, service a ends and the short-range secondary chip does not need to transmit the data frame, then the short-range secondary chip switches antenna a so that the short-range main chip can use antenna a. Afterwards, after 1s, the short-range secondary chip needs to transmit the data frame corresponding to service b, then the short-range secondary chip re-seizes antenna a. After 120ms, the short-range secondary chip no longer has a transmission demand, then the short-range secondary chip stops seizing antenna a. Among them, as Figure 6A As shown, while the short-range slave chip preempts antenna a, the short-range master chip can be in an idle time slot, either an RX time slot or a TX time slot. In other words, the short-range slave chip can preempt antenna a as long as there's a transmission need. However, this TX / RX time slot preemption strategy causes the short-range slave chip to use antenna a for an extended period of time, significantly impacting the smooth operation of the short-range master chip.

[0147] It should be noted that while the short-range slave chip occupies antenna a, the short-range master chip can use antenna b to transmit data frames, ensuring that the services processed by the short-range master chip can continue to run.

[0148] The RX time slot preemption strategy means that the short-range slave chip can preempt antenna a when the short-range master chip is not in the TX time slot, so as to use antenna a to transmit data frames. When the short-range slave chip is in the TX time slot, the short-range slave chip stops preempting antenna a. For example, Figure 6B As shown, first, the short-range slave chip seizes antenna a when the short-range main chip is in an idle time slot, so as to use antenna a to transmit data frames. After 100ms of preemption, the short-range slave chip has no transmission demand, and switches antenna a so that the short-range main chip can use antenna a. Afterwards, after 1s, the short-range slave chip has a transmission demand and re-seizes antenna a. After 10ms, since the short-range main chip is in the TX time slot, the short-range slave chip needs to switch antenna a to the short-range main chip side. After 15ms, the short-range main chip is no longer in the TX time slot, and the short-range slave chip still has a transmission demand, so the short-range slave chip switches to use antenna a again. After 95ms, there is no transmission demand for the short-range slave chip, and the short-range slave chip stops occupying antenna a. Compared with the TX / RX time slot preemption strategy and the idle time slot preemption strategy, the RX time slot preemption strategy ensures the duration and timeliness of the short-range slave chip and the short-range main chip using antenna a. To a certain extent, it ensures the smoothness of the short-range main and slave chip business operations, reduces the impact on the business running by the short-range main and slave chips, and ensures the user experience.

[0149] However, considering that in the uplink transmission scenario, the short-distance main chip of the electronic device mainly acts as a client to send data frames to the server. After sending the data frame, the short-distance main chip needs to receive the confirmation frame sent by the server. If the confirmation frame is not received in time, the short-distance main chip may think that the data frame has not been sent successfully and needs to resend the data frame. After the TX time slot of the short-distance main chip ends, the short-distance secondary chip immediately switches to use antenna a, which may cause the short-distance main chip to fail to receive the confirmation frame in time (such as Figure 7A As shown), the short-range main chip mistakenly believes that the data frame has not been sent successfully and triggers retransmission, which reduces the throughput of the short-range main chip and further reduces the performance of the electronic device. It should be noted that, although the short-range main chip can also use antenna b to receive MAC frames during the period when the short-range slave chip uses antenna a. However, on the one hand, since only a single antenna is used, the transmission rate is affected, resulting in a high possibility that the short-range main chip fails to receive the confirmation frame or fails to receive the confirmation frame in time within a certain period of time. On the other hand, while the short-range main chip uses antenna b to receive the confirmation frame, the short-range slave chip uses antenna a to send the MAC frame, which will also interfere with the reception of the confirmation frame, which may cause the short-range main chip to fail to receive the confirmation frame in time.

[0150] In the downlink transmission scenario, the short-range main chip of the electronic device mainly acts as a server to receive data frames. After receiving the data frame, the short-range main chip sends a confirmation frame corresponding to the data frame. In other words, the short-range main chip mainly sends confirmation frames in the TX time slot. After the confirmation frame is sent, the short-range main chip does not need to receive the confirmation frame. Therefore, the short-range slave chip can directly switch to use antenna a (such as Figure 7B shown).

[0151] Therefore, the present application proposes a new RX time slot preemption strategy. The new RX time slot preemption strategy may include an RX time slot delay preemption strategy and an RX time slot preemption strategy. When the short-distance secondary chip of the electronic device needs to transmit a data frame, if the short-distance main chip of the electronic device is in an uplink transmission scenario, it indicates that the short-distance main chip is more likely to send data frame 1 corresponding to service 1, and after the data frame 1 is sent, it is necessary to receive the confirmation frame corresponding to data frame 1, then the short-distance secondary chip can execute the RX time slot delay preemption strategy, and at the end of the TX time slot of the short-distance main chip, delay preemption of antenna a (such as Figure 7CAs shown), the short-distance master chip can continue to use antenna a (or called the first antenna) to receive the confirmation frame, ensuring the timely and successful reception of the confirmation frame, and avoiding the short-distance master chip not receiving the confirmation frame and causing the retransmission of data frame 1. If the short-distance master chip is in the downlink transmission scenario, it means that the short-distance master chip mainly receives data frame 1, which means that the short-distance master chip is more likely to send the confirmation frame corresponding to data frame 1 within the TX time slot. Then the short-distance slave chip can execute the RX time slot preemption strategy. At the end of the TX time slot of the short-distance master chip, it directly preempts antenna a to achieve timely switching of antenna a, avoiding the short-distance slave chip failing to preempt antenna a in time (as shown). Figure 7D As shown in Figure 2, the antenna duty cycle of the short-range slave chip decreases, which in turn causes a decrease in the performance of the short-range slave chip. In the downlink transmission scenario, the delay of the short-range slave chip has little impact on the throughput of the short-range master chip.

[0152] For example, the electronic device in this application may be a mobile phone, a tablet computer, a laptop computer, a personal computer (PC), a smart TV (also known as a smart screen, a large screen, etc.), or wearable devices such as smart watches and smart bracelets, personal digital assistants (PDAs), vehicle-mounted terminals, Internet of Things devices, and other devices with short-range communication chips.

[0153] The following will take the above electronic device as an example to introduce the new RX time slot preemption strategy provided by the embodiment of the present application, that is, how the short-range secondary chip preempts antenna a. Specifically, Figure 8 As shown, the data transmission method may include S201-S213.

[0154] S201: The short-range main chip of device 1 transmits data frame 1 to device 2 using antenna a and antenna b. Data frame 1 includes service data 1.

[0155] S202: The short-range master chip sends transmission status information to the short-range slave chip.

[0156] The transmission status information may include sending status information, receiving status information and idle status information.

[0157] In some embodiments, the short-range master chip can send the latest transmission status information to the short-range slave chip when the transmission status changes. Optionally, the short-range master chip sends transmission status information to the short-range slave chip every time it uses the antenna to send a MAC frame or receives a MAC frame, so that the short-range slave chip can know the current time slot of the short-range master chip.

[0158] Optionally, in combination with the above Figure 3AFor example, the short-distance master chip sends status information when it starts sending data frame X, that is, at time 1. At time 2, the short-distance master chip ends its sending state and switches to the receiving state. The short-distance master chip can then send and receive status information to achieve timely sharing of transmission status.

[0159] In some embodiments, the short-range slave chip and the short-range master chip can communicate directly, thereby directly transmitting transmission status information between the short-range master and slave chips. Alternatively, the short-range slave chip and the short-range master chip can communicate via an AP chip, thereby transmitting transmission status information between the short-range master and slave chips via the AP chip. The following describes in detail the communication methods between the short-range master and slave chips.

[0160] In one possible design, the short-distance master chip is connected to the short-distance slave chip, so that the short-distance master chip and the short-distance slave chip can communicate directly. In one case, the short-distance master chip and the short-distance slave chip can be connected through pins. Specifically, Figure 9A As shown, pin 1 of the short-range master chip is connected to pin 2 of the short-range slave chip via a wire. When the short-range master chip uses an antenna (i.e., antenna a and / or antenna b) to send a MAC frame, the signal output by pin 1 becomes signal 1. The short-range slave chip detects that the signal on pin 2 has become signal 1 and determines that the short-range master chip is in the transmitting state. When the short-range master chip uses an antenna to receive a MAC frame, the signal output by pin 1 becomes signal 2. The short-range slave chip detects that the signal on pin 2 has become signal 2 and determines that the short-range master chip is in the receiving state. When the short-range master chip neither uses an antenna to receive a MAC frame nor uses an antenna to send a MAC frame, the signal output by pin 1 becomes signal 3. The short-range slave chip detects that the signal on pin 2 has become signal 3 and determines that the short-range master chip is in the idle state.

[0161] Among them, the above-mentioned signal 1, signal 2 and signal 3 are different electrical signals.

[0162] Among them, the number of pins 1 and pins 2 is the same, the number of pins 1 is multiple, the number of pins 2 is also multiple, and pins 1 and pins 2 are connected one-to-one. For example, as mentioned above Figure 9A As shown, the number of pins 1 is 2, namely high pin 1 and low pin 1. High pin 1 outputs a low level signal, low pin 1 outputs a high level signal, and signal 1 is 01, indicating that the short-distance main chip is in the sending state.

[0163] The high-level pin 1 outputs a high-level signal, the low-level pin 1 outputs a low-level signal, and signal 2 is 10, indicating that the short-distance main chip is in the receiving state.

[0164] The high pin 1 outputs a low level signal, the low pin 1 also outputs a low level signal, and the signal 3 is 00, indicating that the short-distance master chip is in an idle state. It should be understood that the number of pins 1 is 2, and the number of pins 2 is also 2, which are high pin 2 and low pin 2 respectively. The high pin 2 is connected to the high pin 1, and the low pin 2 is connected to the low pin 1 (as mentioned above). Figure 9A shown).

[0165] Of course, the above Figure 9A The number of pins 1 and 2 is only an example. The number of pins 1 and 2 can also be other numbers. For example, the number of pins 1 and 2 is 3. It only needs to be multiple. This application does not limit the number of pins 1 and 2.

[0166] Optionally, the pin 1 and pin 2 may be input / output pins, such as GPIO pins.

[0167] In some embodiments, when the short-distance master chip is in a sending state, if the currently sent MAC frame is completed, it will switch to other states, such as an idle state or a receiving state. That is, the signal output by pin 1 of the short-distance master chip will switch from signal 1 to other signals, such as signal 2 or signal 3. For example, after the currently sent data frame 1 is sent, the short-distance master chip enters a receiving state to receive the confirmation frame corresponding to the data frame 1, and the signal output by pin 1 switches from signal 1 to signal 2. In addition, the short-distance slave chip can count the time the short-distance master chip is in a sending state (briefly referred to as the sending time of the short-distance master chip) by switching the transmission state. Similarly, the short-distance slave chip can count the time the short-distance master chip is in a receiving state (briefly referred to as the receiving time of the short-distance master chip), and count the time the short-distance master chip is in an idle state (briefly referred to as the idle time of the short-distance master chip).

[0168] In another case, the short-distance master chip and the short-distance slave chip can be connected via a bus (eg Figure 9B As shown). The bus interface of the short-distance main chip is connected to the bus interface of the short-distance slave chip through a bus. The short-distance main chip can send transmission status information to the short-distance slave chip through the bus. Exemplarily, the short-distance main chip uses an antenna (including antenna a and / or antenna b) to send MAC frames, and the short-distance main chip can send the transmission status information to the short-distance slave chip through the bus. The short-distance main chip uses an antenna to receive MAC frames, and the short-distance main chip can send the reception status information to the short-distance slave chip so that the short-distance slave chip knows the specific transmission status of the short-distance main chip. When the short-distance main chip is currently neither using an antenna to send MAC frames nor using an antenna to receive MAC frames, the short-distance main chip can send idle state information to the short-distance slave chip.

[0169] In addition, similar to the transmission state switching of the above-mentioned short-distance main chip, the signal output by pin 1 will switch. When the transmission state of the short-distance main chip switches, the short-distance main chip will also send the transmission state information corresponding to the switched transmission state through the bus. For example, when the short-distance main chip starts to use the antenna to send data frame 1, the short-distance main chip sends the transmission status information to the short-distance slave chip. After the data frame 1 is sent, the short-distance main chip switches to the receiving state to receive the confirmation frame, and the short-distance main chip can send the receiving status information to the short-distance main chip. Accordingly, the short-distance slave chip can also count the sending time, receiving time and idle time of the short-distance main chip by switching the transmission state.

[0170] In another possible design, the short-range master chip and the short-range slave chip can communicate indirectly via an AP chip. Figure 9C As shown, the short-distance master chip can send transmission status information to the AP chip, and the AP chip sends the transmission status information to the short-distance slave chip. Optionally, in this design, the short-distance master chip and the short-distance slave chip can be connected or not connected.

[0171] In addition, when the transmission state of the short-range master chip switches, the short-range master chip will also send the transmission state information corresponding to the switched transmission state through the AP chip. The short-range slave chip can also count the short-range master chip's transmission time, reception time, and idle time based on the switching of the transmission state.

[0172] S203 : The AP chip of device 1 sends data frame 2 to the short-range slave chip.

[0173] Exemplarily, the AP chip can determine the short-range communication chip that processes data frame 2 (including business data 2 corresponding to business 2) according to the type of business. For example, the AP chip determines that business 2 corresponding to business data 2 (or alternatively described as first data) belongs to the first preset business, then the AP chip assigns business 2 to the short-range secondary chip. The AP chip determines that business 1 belongs to the second preset business, then the AP chip assigns it to the short-range main chip. Among them, the first preset business and the second preset business are preset, such as the first preset business is a private business (such as a multi-screen collaborative business), and the first preset business is all businesses except the second preset business, such as a three-party business. Of course, the AP chip can also determine the chip that processes the business according to other rules, for example, it can be randomly assigned, and this application is not limited to it.

[0174] S204: The short-range slave chip determines whether the short-range master chip is in an uplink transmission scenario.

[0175] In the embodiment of the present application, when it is determined that the short-range master chip is not in an uplink transmission scenario, it indicates that the short-range master chip is currently mainly engaged in downlink services, and the MAC frames sent by the short-range master chip are mainly confirmation frames. Since the short-range master chip does not need to receive confirmation frames after sending the confirmation frames, the short-range slave chip can execute the RX time slot preemption strategy without triggering the RX time slot preemption delay, and can immediately switch to using antenna a, and the short-range slave chip can execute S205.

[0176] When it is determined that the short-distance main chip is in the uplink transmission scenario, it indicates that the short-distance main chip is currently mainly used for uplink services, and the MAC frames sent by the short-distance main chip are mainly data frames. After the short-distance main chip uses the antenna to send service data 1 (that is, data frame 1), it needs to use the antenna to receive the confirmation frame. Therefore, the short-distance secondary chip can execute the RX time slot delay preemption strategy, and needs to trigger the RX time slot preemption delay, and can execute S209.

[0177] In some embodiments, the short-distance slave chip can determine whether the short-distance main chip is in an uplink transmission scenario based on at least one of the following information: information about the services processed by the short-distance main chip, the number of data frames 1 transmitted by the short-distance main chip (including the number of data frames 1 sent and the number of data frames 1 received), and the transmission time of the short-distance main chip (including the sending time and the receiving time).

[0178] The information of the above-mentioned service can be an identifier of the service, that is, an identifier of the application to which the service belongs. For example, if the service is a video playback service and the application to which the video playback service belongs is a video application, then the identifier of the service is the identifier of the video application. Alternatively, the information of the service can be an identifier of a service scenario. For example, if the service is a download service and the service scenario corresponding to the download service is a download scenario, then the identifier of the service can be an identifier of the download scenario. Of course, the information of the service can also be other information that can indicate the service, such as an identifier of the process corresponding to the service, which is not limited by this application.

[0179] The following specifically introduces several possible implementation methods for determining whether the short-distance master chip is in an uplink transmission scenario by using information about the services processed by the short-distance master chip, the number of data frames 1 transmitted by the short-distance master chip, and the transmission time of the short-distance master chip.

[0180] In one implementation, the short-range slave chip can determine whether the short-range master chip is in an uplink transmission scenario based on information about the service being processed by the short-range master chip. The short-range slave chip can search the preset table 1 for the transmission type corresponding to the service information, where the transmission type is either an uplink transmission type or a downlink transmission type. Subsequently, if the transmission type is an uplink transmission type, the short-range slave chip can determine that the short-range master chip is in an uplink transmission scenario. If the transmission type is a downlink transmission type, the short-range slave chip can determine that the short-range master chip is in a downlink transmission scenario.

[0181] In another implementation, the short-distance slave chip can determine whether the short-distance main chip is in an uplink transmission scenario based on the number of data frames 1 transmitted by the short-distance main chip. In one example, the short-distance slave chip can determine whether the number of data frames 1 sent by the short-distance main chip is greater than or equal to the number of data frames 1 received. When the number of data frames 1 sent is greater than or equal to the number of data frames 1 received, it indicates that the short-distance main chip mainly sends data frames, and the short-distance slave chip can determine that the short-distance main chip is in an uplink transmission scenario. When the number of data frames 1 sent is less than the number of data frames 1 received, it indicates that the short-distance main chip mainly receives data frames, and the short-distance slave chip can determine that the short-distance main chip is in a downlink transmission scenario. In addition, optionally, if the number of data frames 1 sent is equal to the number of data frames 1 received, the short-distance slave chip can also determine that the short-distance main chip is in a downlink transmission scenario, which is not limited by the present application.

[0182] In another example, if the difference between the number of data frames sent and the number of data frames received is greater than or equal to a preset number, it indicates that the short-range master chip is primarily sending data frames, and the short-range slave chip can determine that the short-range master chip is in an uplink transmission scenario. If the difference between the number of data frames sent and the number of data frames received is less than a preset number, the short-range slave chip can determine that the short-range master chip is in a downlink transmission scenario. The preset number can be 0 or a positive integer.

[0183] In another example, the short-range slave chip can calculate the ratio between the number of data frames 1 sent and the number of data frames 1 received. If the ratio is greater than or equal to a preset ratio, it indicates that the short-range master chip is primarily sending data frames, and the short-range slave chip can determine that the short-range master chip is in an uplink transmission scenario. If the ratio is less than a preset ratio, the short-range slave chip can determine that the short-range master chip is in a downlink transmission scenario. The preset ratio is greater than or equal to 1.

[0184] The number of data frames sent may be the number of data frames sent by the short-distance master chip within a preset time period 1 before the current time. The number of data frames received may be the number of data frames received by the short-distance master chip within a preset time period 1 before the current time. The preset time period 1 may be a unit of time. Optionally, the number of data frames sent may be the number of successfully sent data frames. The number of data frames received may be the number of successfully received data frames.

[0185] It should be noted that the difference or ratio between the number of messages sent and the number of messages received is merely an example of the difference between the number of messages sent and the number of messages received (i.e., the second difference), and this application does not limit the process for determining this difference. Accordingly, the preset ratio and preset number are merely examples of the second preset difference.

[0186] In another implementation, the short-distance slave chip can determine whether the short-distance main chip is in an uplink transmission scenario based on the transmission time of the short-distance main chip. Exemplarily, the short-distance slave chip can determine whether the short-distance main chip is in an uplink transmission scenario by judging whether the transmission time of the short-distance main chip is greater than or equal to the reception time. Alternatively, the short-distance slave chip can use the difference between the transmission time and the reception time of the short-distance main chip to determine whether the short-distance main chip is in an uplink transmission scenario. Alternatively, the short-distance slave chip can determine whether the short-distance main chip is in an uplink transmission scenario by the ratio between the transmission time and the reception time. Specifically, the process of the short-distance slave chip determining whether the short-distance main chip is in an uplink transmission scenario based on the transmission time and the reception time can refer to the above-mentioned process of determining whether the short-distance main chip is in an uplink transmission scenario based on the number of data frames 1 sent by the short-distance main chip and the number of data frames 1 received.

[0187] The sending time of the short-distance master chip may be the time when the short-distance master chip is in the sending state within the preset time 2 before the current time. The receiving time may be the time when the short-distance master chip is in the receiving state within the preset time 2 before the current time.

[0188] It should be noted that the above-mentioned difference or ratio between the sending time and the receiving time is only an example of the difference value between the sending time and the receiving time (ie, the first difference value), and this application does not limit the process of determining the difference value.

[0189] Optionally, the preset time 1 and the preset time 2 may be the same or different.

[0190] The above describes an implementation method for determining the transmission scenario of a short-distance master chip based on one of the following information: information about services processed by the short-distance master chip, the number of data frames 1 transmitted by the short-distance master chip, and the transmission time of the short-distance master chip. The following describes an implementation method for determining the transmission scenario of a short-distance master chip based on two of the following information: information about services processed by the short-distance master chip, the number of data frames transmitted by the short-distance master chip, and the transmission time of the short-distance master chip.

[0191] In another implementation, the short-range slave chip can determine whether the short-range master chip is in an uplink transmission scenario based on information about the services processed by the short-range master chip and the number of data frames transmitted by the short-range master chip. In one example, the short-range slave chip can determine that the short-range master chip is in an uplink transmission scenario if the transmission type corresponding to the service information indicates an uplink transmission type and the number of data frames 1 sent is greater than or equal to the number of data frames 1 received. Otherwise, the short-range slave chip can determine that the short-range master chip is in a downlink transmission scenario.

[0192] In another example, the short-distance slave chip can determine that the short-distance master chip is in an uplink transmission scenario when the transmission type corresponding to the service information indicates an uplink transmission type and the difference between the number of data frames 1 sent and the number of data frames 1 received is greater than or equal to a preset number. Otherwise, the short-distance slave chip can determine that the short-distance master chip is in a downlink transmission scenario. Or the short-distance slave chip can search the preset table 2 for the difference 1 corresponding to the service information. When the difference between the number of data frames 1 sent and the number of data frames 1 received is greater than or equal to the difference 1, it is determined that the short-distance master chip is in an uplink transmission scenario. Otherwise, it is determined that the short-distance master chip is in a downlink transmission scenario.

[0193] In another example, the short-distance slave chip can determine that the short-distance master chip is in an uplink transmission scenario when the transmission type corresponding to the service information indicates an uplink transmission type and the ratio between the number of data frames 1 sent and the number of data frames 1 received is greater than or equal to a preset ratio. Otherwise, the short-distance slave chip can determine that the short-distance master chip is in a downlink transmission scenario. Alternatively, the short-distance slave chip can search for the ratio 1 corresponding to the service information from the preset table 3. When the ratio between the sending time and the receiving time is greater than or equal to the ratio 1, it is determined that the short-distance master chip is in an uplink transmission scenario. Otherwise, it is determined that the short-distance master chip is in a downlink transmission scenario.

[0194] In another implementation, the short-range slave chip can determine whether the short-range master chip is in an uplink transmission scenario based on information about the services processed by the short-range master chip and the transmission time of the short-range master chip. This determination process is similar to the process of determining the transmission scenario based on information about the services processed by the short-range master chip and the number of data frames 1 transmitted by the short-range master chip, and is not further described here.

[0195] In another implementation, the short-range slave chip can determine the transmission scenario of the short-range master chip based on the transmission time of the short-range master chip and the number of data frames 1 transmitted by the short-range master chip. In one example, if the number of transmitted data frames 1 is greater than or equal to the number of received data frames 1, and the transmission time is greater than or equal to the reception time, the short-range slave chip determines that the short-range master chip is in the uplink transmission scenario. Otherwise, the short-range slave chip determines that the short-range master chip is in the downlink transmission scenario.

[0196] In another example, when the difference between the number of data frames 1 sent and the number of data frames 1 received (hereinafter referred to as the first difference) is greater than or equal to the preset difference 1, and the difference between the sending time and the receiving time (hereinafter referred to as the second difference) is greater than or equal to the preset difference 2, the short-range slave chip determines that the short-range master chip is in the uplink transmission scenario. Otherwise, the short-range slave chip determines that the short-range master chip is in the downlink transmission scenario.

[0197] In another example, when the ratio between the number of data frames 1 sent and the number of data frames 1 received (hereinafter referred to as the first ratio) is greater than or equal to the preset ratio 1, and the ratio between the sending time and the receiving time (hereinafter referred to as the second ratio) is greater than or equal to the preset ratio 2, the short-range slave chip can determine that the short-range master chip is in the uplink transmission scenario. Otherwise, the short-range slave chip determines that the short-range master chip is in the downlink transmission scenario.

[0198] In another example, the short-distance slave chip performs a weighted summation of the first difference and the second difference, that is, according to M1*S1+M2*S2, to obtain a value of 1. Here, M1 represents the first difference, S1 represents the preset weight 1 corresponding to the first difference, M2 represents the second difference, and S2 represents the preset weight 2 corresponding to the second difference. The larger the value 1, the higher the possibility that the short-distance master chip is in an uplink transmission scenario. When the value 1 is greater than or equal to the preset value 1, it is determined that the short-distance master chip is in an uplink transmission scenario. When the value 1 is less than the preset value 1, it is determined that the short-distance master chip is in a downlink transmission scenario.

[0199] In another example, the short-range slave chip can perform a weighted sum of the first ratio and the second ratio, that is, according to N1*S3+N2*S4, to obtain a value of 2. Here, N1 represents the first ratio, S1 represents the preset weight 3 corresponding to the first ratio, M2 represents the second ratio, and S2 represents the preset weight 4 corresponding to the second ratio. The larger the value 2, the higher the probability that the short-range master chip is in an uplink transmission scenario. When the value 2 is greater than or equal to the preset value 2, it is determined that the short-range master chip is in an uplink transmission scenario. When the value 2 is less than the preset value 2, it is determined that the short-range master chip is in a downlink transmission scenario.

[0200] The above describes an implementation method for determining the transmission scenario of a short-distance master chip based on two types of information: information about services processed by the short-distance master chip, the number of data frames 1 transmitted by the short-distance master chip, and the transmission time of the short-distance master chip. The following describes an implementation method for determining the transmission scenario of a short-distance master chip based on all of the information: information about services processed by the short-distance master chip, the number of data frames transmitted by the short-distance master chip, and the transmission time of the short-distance master chip.

[0201] In another implementation, the short-distance slave chip can determine whether the short-distance main chip is in an uplink transmission scenario based on the information of the service processed by the short-distance main chip, the number of data frames 1 sent by the short-distance main chip, the number of data frames 1 received, the sending time, and the receiving time. In one example, the short-distance main chip can determine the value 1 based on the number of data frames 1 sent by the short-distance main chip, the number of data frames 1 received, the sending time, and the receiving time. When the transmission type corresponding to the service information indicates an uplink transmission type, and the value 1 is greater than or equal to the preset value 1, the short-distance slave chip can determine that the short-distance main chip is in an uplink transmission scenario. When the transmission type corresponding to the service information indicates a downlink transmission type, or the value 1 is less than the preset value 1, it is determined that the short-distance main chip is in a downlink transmission scenario.

[0202] Alternatively, the short-range slave chip may search for a target value 1 corresponding to the service information in the preset table 4. If the value 1 is greater than or equal to the target value 1, it is determined that the short-range master chip is in an uplink transmission scenario. Otherwise, it is determined that the short-range master chip is in a downlink transmission scenario.

[0203] In another example, the short-range slave chip can determine the value 2 based on the number of data frames 1 sent by the short-range master chip, the number of data frames 1 received, the sending time, and the receiving time. If the transmission type corresponding to the service information indicates an uplink transmission type and the value 2 is greater than or equal to the preset value 2, the short-range slave chip can determine that the short-range master chip is in an uplink transmission scenario. Otherwise, the short-range slave chip determines that the short-range master chip is in an uplink transmission scenario.

[0204] Alternatively, the short-range slave chip may search for a target value 2 corresponding to the service information in the preset table 5. If the value 2 is greater than or equal to the target value 2, it is determined that the short-range master chip is in an uplink transmission scenario. Otherwise, it is determined that the short-range master chip is in a downlink transmission scenario.

[0205] Of course, the above introduction on how to determine the possible implementation method of the short-distance main chip based on one or more information including the information of the business processed by the short-distance main chip, the number of data frames 1 transmitted by the short-distance main chip and the transmission time of the short-distance main chip is only an example. The short-distance secondary chip can also determine the transmission scenario of the short-distance main chip according to other implementation methods, and this application does not limit it.

[0206] The above describes the process of determining the transmission scenario that the short-range master chip is in. The following describes how the short-range slave chip preempts antenna a after S204 when the transmission scenario is a downlink transmission scenario.

[0207] S205: When the transmission status information sent by the short-distance master chip switches from the transmission status information to other status information, the short-distance slave chip connects the first end and the second end of the single-pole double-throw switch 1. The first end is connected to the antenna a, and the second end is connected to the short-distance slave chip.

[0208] S206 , when the transmission status sent by the short-distance master chip is receiving status information or idle status information, the short-distance slave chip connects the first end and the second end of the single-pole double-throw switch 1 .

[0209] The other status information mentioned above may be receiving status information or idle status information.

[0210] In the embodiment of the present application, when the short-distance slave chip determines that the short-distance master chip is mainly in the downlink transmission scenario, if the current transmission status information of the short-distance master chip is the sending status information, it indicates that the MAC frame currently sent by the short-distance master chip may be a confirmation frame. There is no need to set a preemption delay. The short-distance slave chip waits until the sending state of the short-distance master chip ends, that is, after switching from the sending state to another state (or called the first state), the first end and the second end of the single-pole double-throw switch 1 can be directly connected (such as Figure 10A As shown), antenna a is switched to transmit service data 2 using antenna a.

[0211] When it is determined that the short-distance main chip is mainly for downlink transmission scenarios, if the current transmission state of the short-distance main chip is receiving state or idle state, the short-distance slave chip can directly connect the first end and the second end of the single-pole double-throw switch 1 to seize antenna a.

[0212] The SPDT switch 1 also has a third terminal, which is connected to the short-distance main chip. Figure 10B As shown), the short-range main chip can use antenna a.

[0213] In some embodiments, after the short-range slave chip has occupied antenna a for a certain period of time, if the short-range main chip switches to the sending state, the short-range slave chip needs to stop occupying antenna a. After the short-range main chip switches from the sending state to other states, if the short-range slave chip still has a transmission demand, it can re-occupy antenna a. For example, if Figure 11AAs shown, at time 3, the short-distance slave chip has a transmission demand, that is, there is a MAC frame to be transmitted (such as data frame 2). The short-distance slave chip determines that the short-distance main chip is in a downlink transmission scenario, and the short-distance main chip is in an idle state. The short-distance slave chip directly seizes antenna a. After seizing antenna a for 10ms, the short-distance main chip enters the sending state. When the sending state of the short-distance main chip ends, since the short-distance slave chip still has a transmission demand, the short-distance slave chip can re-seize antenna a. Optionally, when the sending state of the short-distance main chip ends, the short-distance slave chip can re-determine the transmission scenario in which the short-distance slave chip is located. In other words, as long as the short-distance slave chip has a transmission demand, it can determine the transmission scenario and transmission state of the short-distance slave chip, so as to use the transmission state and transmission state to determine whether antenna a can be seized, thereby ensuring the timeliness and accuracy of antenna a seizure.

[0214] After re-occupying antenna a, if the short-range slave chip has no MAC frames to transmit after 75ms, it can stop preempting antenna a. After 1s, the short-range slave chip needs to transmit again. It determines that the short-range master chip is in a downlink transmission scenario and is in the transmitting state. After 10ms, the short-range master chip's transmitting state ends. The short-range slave chip can switch to antenna a again.

[0215] In some embodiments, as described above, the short-range slave chip can determine the transmission scenario of the short-range master chip when there is a transmission demand, so as to utilize the transmission scenario and determine whether to preempt antenna a in combination with the transmission status of the short-range master chip. This ensures that the short-range master chip can use antenna a to transmit service data in a timely manner, and also ensures that the short-range slave chip can use antenna a in a timely manner. Of course, the short-range slave chip can determine whether to preempt antenna a based on the transmission scenario and transmission status of the short-range master chip when the short-range master chip is not in a transmitting state, without considering whether the short-range slave chip has a transmission demand, thereby allowing the short-range slave chip to use antenna a in a timely manner.

[0216] In some embodiments, the short-range slave chip can be connected to the GPIO pin (such as the above Figure 5 The Switch_sel pin shown is connected to the first end of the above-mentioned single-pole double-throw switch 1 to output a control signal through the GPIO pin to trigger the switching of the single-pole double-throw switch 1.

[0217] In some embodiments, the short-range slave chip can be connected to the second end of the single-pole double-throw switch 1 via an ANT pin to output a radio frequency signal via the ANT pin to achieve transmission of service data. Alternatively, the short-range master chip can be connected to the third end of the single-pole double-throw switch 1 via a core pin (such as ANT) to output a radio frequency signal via the core pin to achieve transmission of service data.

[0218] It should be noted that the above-mentioned switching of antenna a through the single-pole double-throw switch 1 is only an example. The switching of antenna a can also be achieved through other types of switches (such as other single-pole multi-throw switches, or single-pole single-throw switches). In other words, the short-range secondary chip can achieve the connection between the short-range secondary chip and antenna a, or the connection between the short-range main chip and antenna a through the switch. The type of the switch is not limited, as long as it can achieve the switching of antenna a.

[0219] Alternatively, the short-distance slave chip may not control the switching of the single-pole double-throw switch 1, but rather the short-distance master chip may control the single-pole double-throw switch 1. Accordingly, the first end of the single-pole double-throw switch 1 may be connected to the short-distance master chip instead of the short-distance slave chip. Furthermore, the operations performed by the short-distance master chip described above may be described as being performed by the short-distance slave chip. Accordingly, the short-distance slave chip may perform the operations performed by the short-distance master chip.

[0220] S207 : The short-range slave chip transmits data frame 2 to device 3 based on antenna a.

[0221] The data frame 2 includes service data 2 (or second data).

[0222] S208 . The short-range main chip transmits data frame 1 to device 2 based on antenna b.

[0223] It should be noted that, while the short-range slave chip is using antenna a, the short-range master chip can be in a transmitting state or a receiving state, or can also be in an idle state. In other words, the above S208 is an optional step.

[0224] The above describes the situation where the short-distance master chip is in a downlink transmission scenario and the short-distance slave chip does not need to set a preemption delay. Of course, after S204, the short-distance master chip may also be in an uplink transmission scenario. The following will continue to describe the process of setting a preemption delay when the short-distance master chip is in an uplink transmission scenario.

[0225] S209 , when the transmission status information sent by the short-distance master chip switches from the transmission status information to other status information, if the target delay time 1 has passed, the short-distance slave chip connects the first end and the second end of the single-pole double-throw switch 1 .

[0226] S210 , when the transmission state information sent by the short-distance master chip switches from receiving state information to idle state information, the short-distance slave chip connects the first end and the second end of the single-pole double-throw switch 1 .

[0227] S211 , when the transmission status information sent by the short-distance master chip is idle status information, the short-distance slave chip connects the first end and the second end of the single-pole double-throw switch 1 .

[0228] In an embodiment of the present application, when the short-distance slave chip determines that the short-distance main chip is mainly in the uplink transmission scenario, if the current transmission state of the short-distance main chip is the sending state, it indicates that the MAC frame currently sent by the short-distance main chip is a data frame with high performance, and the short-distance main chip also needs to receive the corresponding confirmation frame. In order to ensure that the short-distance main chip can successfully receive the confirmation frame in a timely manner, the short-distance slave chip waits until the sending state of the short-distance main chip ends and the target delay time 1 (or alternatively described as the first target time) passes before switching antenna a to achieve delayed preemption of antenna a, thereby improving the success rate of the short-distance main chip in receiving the confirmation frame, avoiding the repeated transmission of business data due to the short-distance main chip's failure to receive the confirmation frame in time, thereby causing the throughput of the short-distance main chip to decrease. In addition, it can be ensured that the short-distance slave chip can use antenna a in a timely manner.

[0229] In an uplink transmission scenario, if the short-range master chip's current transmission state is receiving, the short-range master chip may be currently receiving an acknowledgment frame. To ensure successful reception of the acknowledgment frame, the short-range slave chip may wait until the short-range master chip's transmission state switches from receiving to idle, i.e., until the receiving state ends, before preempting antenna a. Alternatively, if the short-range master chip's transmission state switches from receiving to transmitting, the short-range slave chip may preempt antenna a according to S209 above.

[0230] When the short-range main chip is in an uplink transmission scenario, if the current transmission state of the short-range main chip is idle, indicating that the short-range main chip does not currently need to use antenna a, the short-range main chip can directly seize antenna a.

[0231] For example, the target delay time 1 is 15ms. Figure 11BAs shown, at time 4, the short-range slave chip has a transmission request. The short-range slave chip determines that the short-range master chip is in an uplink transmission scenario and is idle. Therefore, the short-range slave chip can directly preempt antenna a. After 10 ms, the short-range master chip switches to the transmit state, and the short-range slave chip stops preempting antenna a. After 15 ms, the short-range master chip's transmit state ends. After waiting for 15 ms, the short-range slave chip determines that the short-range master chip has received the acknowledgment frame and can re-preempt antenna a. After 75 ms, the short-range slave chip finishes transmitting the MAC frame and no longer needs to transmit, so it can stop preempting antenna a. After 1 second, the short-range slave chip has a MAC frame to transmit. The short-range slave chip determines that the short-range master chip is in an uplink transmission scenario and is in the transmit state. After 15 ms, the short-range master chip's transmit state ends. After another 15 ms delay, the short-range slave chip re-preempts antenna a.

[0232] In some embodiments, the target delay time 1 is determined based on the transmission time of the SIFS and the ACK frame, and the target delay time 1 is greater than or equal to the sum of the transmission time of the SIFS and the ACK frame (as shown in the above Figure 3A The period starting from time 2 and ending at time 5).

[0233] Optionally, in the uplink transmission scenario, the short-distance slave chip can directly set the default value to the target delay time 1. Or the short-distance slave chip can determine the target delay time 1 according to the actual situation. In the uplink transmission scenario of the short-distance master chip, the target delay time 1 is positively correlated with the number of data frames sent and / or the sending time. If the number of data frames sent is larger and / or the sending time is longer, it means that the amount of data transmitted in the uplink is larger, and the interval between two data frames (as mentioned above) is larger. Figure 3A The shorter the target delay time 1 (the interval between data frame X and data frame X+1 in the transmission), the longer the target delay time 1 can be. This is because if the target delay time 1 is long, it can cover the interval between two data frames. At the end of the target delay time 1 or before it ends, the short-range main chip has already switched to the transmission state, and the short-range secondary chip does not need to switch antenna a, thus avoiding frequent switching of antenna a. From an overall perspective, the transmission performance of device 1 is guaranteed.

[0234] Moreover, if the amount of data transmitted uplink is smaller, the interval between the two data frames is longer. When the target delay time 1 is shorter, at the end of the target delay time 1, the short-range main chip has not yet switched to the sending state, and the short-range slave chip can switch to use antenna a, so that the short-range slave chip can use antenna a during the time slot between the two data frames, thereby ensuring the transmission efficiency of the short-range slave chip and, from an overall perspective, improving the transmission performance of device 1.

[0235] In one case, the transmission scenario value can be calculated based on the number of transmissions from the short-range master chip. For example, the value can be obtained by calculating the difference or ratio between the number of transmissions and the number of receptions. In another case, the transmission scenario value can be calculated based on the transmission time of the short-range master chip. For example, the value can be obtained by calculating the difference or ratio between the transmission time and the reception time.

[0236] In another case, the transmission scenario value can be determined based on the number of transmissions and the transmission time of the short-distance master chip. For example, the short-distance slave chip can perform a weighted summation of the number of transmissions and the transmission time to obtain a transmission scenario value, which can be the aforementioned value 1 or value 2. Alternatively, the transmission scenario value can include a value calculated based on the number of transmissions of the short-distance master chip and a value calculated based on the transmission time, in order to find the target delay time 1 corresponding to these two values.

[0237] It should be noted that in the uplink transmission scenario, although the short-range master chip is in the transmitting state, there is a possibility that the MAC frame sent by the short-range master chip is not a data frame. Accordingly, after the transmitting state ends, the short-range master chip may not switch to the receiving state for a certain period of time. For example, in the uplink transmission scenario, the short-range master chip sends a confirmation frame in the transmitting state. After the transmitting state ends, the short-range master chip can switch to the receiving state. Based on this, the short-range slave chip sets a target delay time of 1, rather than directly seizing antenna a after determining that the short-range master chip has ended its receiving state, that is, after assuming that the short-range master chip has received the confirmation frame.

[0238] In some embodiments, in an uplink transmission scenario, if the short-range primary chip is currently in the receiving state, the short-range secondary chip can not only wait to switch to the idle state before preempting as described above, but can also delay preemption. The short-range secondary chip can preempt antenna a after the target delay time 2 (or second target time) has passed.

[0239] Optionally, in the uplink transmission scenario, the short-distance slave chip can directly set the default value to target delay time 2. Alternatively, the short-distance slave chip can determine target delay time 2 based on actual conditions. Target delay time 2 is determined based on SIFS and the transmission time of the ACK frame, and is greater than or equal to the transmission time of the ACK frame. The determination process of target delay time 2 can refer to the reference process of target delay time 2 above, and will not be repeated here.

[0240] S212 : The short-range slave chip transmits data frame 2 to device 3 based on antenna a.

[0241] S213 : The short-range main chip transmits data frame 1 to device 2 based on antenna b.

[0242] Among them, S213 is similar to the above S208 and is also optional.

[0243] In the embodiment of the present application, when there is a transmission demand for the short-distance slave chip, the short-distance slave chip determines the transmission scenario of the short-distance main chip, so that when the short-distance main chip is in the uplink transmission scenario, if the short-distance main chip is in the sending state, the short-distance slave chip delays to seize antenna a, ensuring the success of the confirmation frame reception, thereby ensuring the throughput of the short-distance main chip. And ensure the length and timeliness of the use of antenna a by the short-distance main and slave chips, thereby ensuring the transmission efficiency of business data (or data frames, messages). When the short-distance slave chip is in the downlink transmission scenario, the short-distance slave chip does not need to delay to seize antenna a, avoiding negative benefits due to delays.

[0244] In some embodiments, the fixed program module (such as the dual-chip coexistence strategy module) on the short-range slave chip can determine whether to delay the preemption of antenna a based on the transmission scenario of the short-range master chip, thereby ensuring the use time of the short-range master and slave chips and avoiding reducing the throughput of the short-range master chip. Figure 2 The structure shown in the figure takes the above service 1 being a video call service, service 2 being a collaborative service, and the transmission scenario being determined based on the transmission quantity, transmission time, and transmission type of the short-distance main chip as an example to describe the process in detail. Figure 12 As shown, the process is as follows:

[0245] S1. The short-range main chip transmits data frames corresponding to the video call service with device 2 based on antenna a and antenna b.

[0246] S2. The QOE information identification module calls the short-distance master chip driver every preset time 1 to obtain the number of data frames transmitted by the short-distance master chip.

[0247] S3. The QOE information identification module sends the transmission quantity of the data frame to the dual-chip coexistence service module.

[0248] Optionally, after receiving a request from the short-distance slave chip via the dual-chip coexistence service module, the QOE information identification module may count the number of data frames transmitted by the short-distance master chip and send the transmission number to the dual-chip coexistence service module.

[0249] S1-S3 above introduced the process of determining the number of data frames transmitted by the short-distance main chip. The following will introduce the process of determining the transmission type in conjunction with S4-S6.

[0250] S4. The scene recognition module recognizes information about the video call service processed by the short-range main chip.

[0251] Exemplarily, the scene recognition module may also periodically identify services processed by the short-range main chip.

[0252] S5. The scene recognition module searches for the transmission type corresponding to the information of the video call service from the preset table 1.

[0253] The transmission type includes uplink transmission type and downlink transmission type. If the transmission type corresponding to the video call service is uplink transmission type, it indicates that the short-range main chip is more likely to be mainly used for uplink services. If the transmission type corresponding to the video call service is downlink transmission type, it indicates that the short-range main chip is more likely to be mainly used for downlink services.

[0254] S6. The scene recognition module sends the transmission type corresponding to the information of the video call service to the dual-chip coexistence service module.

[0255] S7. The dual-chip coexistence service module calls the secondary chip driver to send the transmission type and the number of data frames transmitted corresponding to the information of the video call service to the dual-chip coexistence strategy module.

[0256] It should be noted that the serial numbers of the steps in this application do not represent the order in which the steps are executed. For example, the above S1-S3 can be executed concurrently with the above S4-S6, or can be executed after or before S4-S6. This application does not limit this.

[0257] S8. The short-range master chip sends transmission status information to the dual-chip coexistence strategy module.

[0258] The above transmission status information is idle state, sending state or receiving state.

[0259] In the embodiment of the present application, the short-range master chip can send transmission status information to the short-range slave chip when the transmission status changes, thereby realizing timely sharing of the transmission status.

[0260] S9. The dual-chip coexistence strategy module determines the transmission time of the short-distance master chip based on the transmission status information.

[0261] The transmission time includes idle time, sending time, and receiving time. The idle time can be the total time the short-distance master chip is in an idle state within the preset time 2. The sending time can be the total time the short-distance master chip is in a sending state within the preset time 2. The receiving time can be the total time the short-distance master chip is in a receiving state within the preset time 2.

[0262] Optionally, the preset time 2 may be a unit time.

[0263] S8-S9 above describe the process for determining the transmission time of the short-range master chip. The dual-chip coexistence strategy module periodically obtains information about the number of data frames transmitted by the short-range master chip, the transmission time, and the services it provides. This information is then used to determine the transmission scenario for the short-range master chip. The following section describes the process for determining the transmission scenario.

[0264] S10. The dual-chip coexistence strategy module calculates a first ratio of the number of data frames sent by the short-range master chip to the number of data frames received by the short-range master chip.

[0265] S11 . The dual-chip coexistence strategy module calculates a second ratio of the sending time to the receiving time of the short-range master chip.

[0266] S12: The dual-chip coexistence strategy module calculates a value of 2 based on N1*S3+N2*S4, where N1 represents the first ratio, S3 represents the preset weight of 3, N2 represents the second ratio, and S3 represents the preset weight of 4.

[0267] In the embodiment of the present application, since the short-distance main chip will also share the transmission status with the short-distance slave chip when transmitting non-data frames, the sending time of the short-distance main chip counted by the short-distance slave chip may not only include the time of sending data frames, and the receiving time may not only include the time of receiving data frames. Therefore, the ratio of sending time to receiving time (i.e., the second wallpaper mentioned above) may not accurately reflect whether the short-distance main chip is mainly sending or receiving business data. Therefore, it is necessary to combine the ratio of the number of data frames sent / received by the short-distance main chip to determine whether the short-distance main chip is mainly sending business data, so as to ensure the accuracy of the transmission scenario determination.

[0268] In addition, because short-distance communication chip drivers (such as short-distance master chip drivers) cache data frames, they may cache some data frames that need to be sent, resulting in a decrease in the number of data frames sent. Similarly, short-distance communication chip drivers may cache some data frames that need to be received, resulting in a decrease in the number of data frames received. As a result, the ratio of the number of sent to the number of received may not accurately reflect whether the short-distance master chip is primarily sending or receiving business data. Therefore, it is necessary to combine the ratio of the short-distance master chip's sending time to the receiving time to determine whether the short-distance master chip is primarily sending business data.

[0269] S13. The dual-chip coexistence strategy module determines whether the transmission type is an uplink transmission type, and determines whether the value 2 is greater than or equal to the preset value 2.

[0270] When the transmission type is an uplink transmission type and the value 2 is greater than or equal to the preset value 2, the dual-chip coexistence strategy module determines that the short-range master chip is in an uplink transmission scenario and needs to set a preemption delay, and S14 can be executed.

[0271] When the transmission type is a downlink transmission type, or the value 2 is less than the preset value 2, the dual-chip coexistence strategy module determines that the short-distance master chip is in a downlink transmission scenario, and there is no need to set a preemption delay, and S21 can be executed.

[0272] S14 , the dual-chip coexistence strategy module sends strategy information 1 corresponding to the value 2 to the data transmission arbitration module.

[0273] The policy information 1 corresponding to the value 2 instructs the data transmission arbitration module to execute the RX time slot delay preemption policy corresponding to the value 2. The RX time slot delay preemption policy indicates that antenna a is delayed and preempted according to the delay time corresponding to the value 2, i.e., the target delay time 1, thereby implementing the set delay time. For example, the preemption process can be referred to the description of S16-S18 below.

[0274] S15. The dual-chip coexistence strategy module sends transmission status information to the data transmission arbitration module.

[0275] S16, when the transmission status information is the sending status information, if the short-distance master chip switches from the sending status information to other status information, after the target delay time 1 corresponding to the value 2, the data transmission arbitration module switches the single-pole double-throw switch 1.

[0276] S17 , when the transmission state information is the receiving state information, if the short-distance master chip switches from the receiving state information to the idle state information, the data transmission arbitration module switches the single-pole double-throw switch 1 .

[0277] S18 . When the transmission state information is idle state information, the data transmission arbitration module switches the single-pole double-throw switch 1 .

[0278] S19. The short-range secondary chip transmits data frames corresponding to the collaborative service based on antenna a.

[0279] S20. The short-range main chip transmits data frames corresponding to the video call service based on antenna b.

[0280] The above describes the process of the short-range slave chip implementing the RX time slot delay preemption strategy corresponding to the value 2 in the uplink transmission scenario. Of course, there are also cases where the short-range master chip is in the downlink transmission scenario. The following will continue to describe the process of the short-range slave chip implementing the RX time slot preemption strategy in the downlink transmission scenario.

[0281] S21 . The dual-chip coexistence strategy module sends strategy information 2 to the data transmission arbitration module.

[0282] Among them, the strategy information 2 instructs the data transmission arbitration module to execute the RX time slot preemption strategy, and the RX time slot preemption strategy indicates that there is no need to delay the preemption of antenna a. For example, the preemption process can refer to the content described in S23-S24 below.

[0283] S22 . The dual-chip coexistence strategy module sends transmission status information to the data transmission arbitration module.

[0284] S23 : When the transmission state information is receiving state information or idle state information, the data transmission arbitration module switches the single-pole double-throw switch 1 .

[0285] S24 , when the transmission state information is the sending state information, if the short-distance master chip switches from the sending state information to other state information, the data transmission arbitration module switches the single-pole double-throw switch 1 .

[0286] S25 . The short-range secondary chip uses antenna a to transmit data frames corresponding to the collaborative service with device 3 .

[0287] S26. The short-range main chip uses antenna b to transmit data frames corresponding to the video call service.

[0288] In an embodiment of the present application, when the short-distance main chip uses antenna a and the short-distance secondary chip has a transmission demand, it is determined whether the short-distance main chip is in an uplink transmission scenario. In the uplink transmission scenario, if the short-distance main chip is in a sending state, the short-distance secondary chip can set the delay time of antenna a based on the RX time slot delay preemption strategy, thereby realizing the delay preemption of antenna a. Afterwards, the short-distance secondary chip can use antenna a to transmit the service data corresponding to the collaborative service, and realize the timely preemption of antenna a on the basis of ensuring the throughput of the short-distance main chip, thereby ensuring the transmission rate of the short-distance secondary chip. Afterwards, after the service data corresponding to the collaborative service is transmitted, or when the short-distance main chip has service data to be transmitted with a higher priority, the short-distance secondary chip can switch antenna a to the short-distance main chip side for the short-distance main chip to use antenna a. Afterwards, by analogy, when the short-distance slave chip has a transmission demand and the short-distance main chip is in a downlink transmission scenario, the short-distance slave chip can directly preempt antenna a based on the RX time slot delay preemption strategy, which is equivalent to clearing the delay time of antenna a, so that the short-distance slave chip can use antenna a in time.

[0289] It should be noted that the above introduction to the process of business data transmission takes the example of 2 short-range communication chips in device 1. The number of short-range communication chips in device 1 can also be other values, as long as it is greater than 1, and this application does not limit it.

[0290] In addition, the operations performed by the above modules (such as the scene recognition module, QOE information recognition module, dual-chip coexistence service module, dual-chip coexistence strategy module, and data transmission arbitration module) are only examples. The operations can also be performed by other modules, and this application does not limit the modules that perform the operations. Furthermore, it is understood that the operations performed by the above modules are actually performed by electronic devices, such as short-range master and slave chips, and AP chips.

[0291] In some embodiments, the short-range sub-chips in different devices can be used to process private services, so that the short-range sub-chips between different devices can use custom short-range communication protocols to transmit business data. For example, the short-range sub-chip in the above-mentioned device 1 sends private business data (or called private data) to the short-range sub-chip in device 3, and device 3 can also send private business data to the short-range sub-chip in device 1, thereby improving the efficiency of short-range communication and thus improving the efficiency of business data transmission. Exemplarily, the private business data is used to trigger device discovery, establish short-range communication connections, and transmit business data (or data) between devices. If the private business is a collaborative business, the short-range communication connection corresponding to the collaborative business includes a WI-FI connection. The steps corresponding to the conventional WI-FI communication protocol (or called the standard WI-FI communication protocol) include scanning, authentication, association, first handshake, second handshake, third handshake, and fourth handshake. The custom short-range communication protocol includes a custom WI-FI communication protocol. The steps corresponding to the WI-FI protocol may include some steps in the conventional WI-FI communication protocol. That is, the connection establishment steps corresponding to the custom short-range communication protocol are fewer than the connection establishment steps corresponding to the standard short-range communication protocol, such as omitting the authentication step, thereby simplifying the WI-FI connection process and improving the efficiency of business data transmission.

[0292] For another example, devices use a custom Bluetooth communication protocol to perform device discovery, transmit password information, and complete the definition of Go and Gc roles. Afterwards, a P2P connection is established between devices based on the custom P2P communication protocol. The steps corresponding to the P2P communication protocol may include some steps in the conventional P2P communication protocol. In other words, the connection establishment steps corresponding to the custom short-range communication protocol are fewer than those corresponding to the standard short-range communication protocol, such as omitting the Go and Gc role negotiation steps, thereby improving the efficiency of establishing the P2P connection. It should be understood that the custom Bluetooth communication protocol also belongs to the custom short-range communication protocol.

[0293] For another example, business data can be transmitted between devices through a custom short-range communication protocol to simplify the business data transmission process and improve the efficiency of business data transmission. Optionally, after establishing a P2P connection between devices, business data can be transmitted through a custom network communication protocol (such as a custom TCP / IP protocol) based on a short-range secondary chip. For example, the conventional TCP / IP protocol corresponds to four layers (application layer, transport layer, internet layer, and network access layer), and the number of layers corresponding to the custom TCP / IP protocol is less than the number of layers corresponding to the conventional TCP / IP protocol, thereby simplifying the business data transmission process.

[0294] Among them, optionally, the transmission of business data (such as the above-mentioned private business data) between devices through the same short-range secondary chip can avoid the failure of business data transmission due to different model specifications of short-range communication chips between devices, thereby avoiding compatibility issues.

[0295] In the embodiment of the present application, in the full-scene device ecology, that is, in the interconnected ecology, the ecological devices communicate with each other within the local area network. The conventional TCP / IP protocol is to ensure that different devices in the Internet can communicate with each other. Therefore, the conventional TCP / IP protocol is generally designed as a five-layer protocol architecture, and each layer is independently responsible for different tasks and functions. However, the layered mechanism corresponding to the conventional TCP / IP protocol, that is, the communication process has duplication and redundancy to a certain extent, which affects the communication efficiency between devices. Therefore, in the interconnected scenario, a custom network communication protocol can be used to simplify the communication process and improve the communication efficiency between ecological devices. Similarly, in the interconnected scenario, a custom short-range communication protocol can also be used. Since custom communication protocols such as custom short-range communication protocols and custom network communication protocols need to cooperate with chips, the optimization of the communication process is achieved through the combination of software and hardware. Therefore, a short-range sub-chip can be added to electronic devices (such as the above-mentioned device 1, device 3, etc.) to improve the communication efficiency between ecological devices in the interconnected scenario.

[0296] In some embodiments, the above describes the process of the short-range slave chip preempting antenna a based on the new RX time slot preemption strategy by taking the short-range master and slave chips multiplexing antenna a as an example. In addition, the short-range master and slave chips in the electronic device can also use independent front-end RF antennas. Figure 13As shown, the short-range main chip can use antenna c, and the short-range secondary chip can use antenna d. Among them, antenna c and antenna d can be one or more. Due to the small space of the electronic device, the isolation between the antennas is limited. When the short-range main chip is in the receiving state and the short-range secondary chip is in the sending state, the transmission of the MAC frame of the short-range secondary chip may affect the reception of the MAC frame of the short-range main chip, which may cause the failure of the short-range main chip to receive the confirmation frame, and may cause the data frame of the short-range main chip to be repeatedly sent. Therefore, when the short-range main and secondary chips use independent front-end RF antennas respectively, the short-range secondary chip can also transmit data frames based on the new RX time slot preemption strategy. The process is similar to the process described above, except that the short-range secondary chip can switch the single-pole double-throw switch 1, but directly delay, so as to avoid interfering with the reception of the confirmation frame of the short-range main chip.

[0297] In some embodiments, the present application provides a computer-readable storage medium including computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the data transmission method described above.

[0298] In some embodiments, the present application provides a computer program product. When the computer program product is run on an electronic device, the electronic device executes the data transmission method described above.

[0299] In some embodiments, the short-distance slave chip can serve as the first chip, and the short-distance master chip can serve as the second chip. That is, the first chip can perform the operations performed by the short-distance slave chip, and the second chip can perform the operations performed by the short-distance master chip. Alternatively, the short-distance master chip can serve as the first chip, and the short-distance slave chip can serve as the second chip.

[0300] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0301] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the modules or units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another device, 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 through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0302] The units described as separate components may or may not be physically separate, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0303] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0304] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0305] The above content is only a specific embodiment of this application, but the scope of protection of this application is not limited to this. Any changes or replacements within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A data transmission method, characterized in that: Applicable to an electronic device, the electronic device including a first chip, a second chip, a first antenna, and an application processor AP, the first chip and the second chip being short-range communication chips, the AP being connected to the first chip and the second chip, respectively, and the first antenna being an antenna multiplexed by the first chip and the second chip; The data transmission method includes: The first chip receives first data sent by the AP; When the transmission state of the second chip is a sending state, if the transmission state of the second chip switches from the sending state to the first state, after a first target time, the first chip controls the first antenna to connect to the first chip; wherein, when the first antenna is connected to the first chip, the first antenna is disconnected from the second chip; the first state is an idle state or a receiving state; The first chip transmits the first data based on the first antenna.

2. The method according to claim 1, characterized in that In a case where the transmission scenario of the second chip is an uplink transmission scenario, if the transmission state of the second chip is switched from the sending state to the first state, after a first target time, the first chip controls the first antenna to connect to the first chip.

3. The method according to claim 1 or 2, characterized in that The method further comprises: In a case where the transmission state of the second chip is a receiving state, if the transmission state of the second chip is switched from the receiving state to an idle state, the first chip controls the first antenna to be connected to the first chip.

4. The method according to claim 1 or 2, characterized in that The method further comprises: When the transmission state of the second chip is the receiving state, after a second target time has passed, the first chip controls the first antenna to connect with the first chip.

5. The method according to claim 2, characterized in that The method further comprises: In a case where the transmission scenario of the second chip is a downlink transmission scenario, if the transmission state of the second chip is switched from the sending state to the first state, the first chip controls the first antenna to be connected to the first chip; The first chip transmits the first data based on the first antenna.

6. The method according to claim 2 or 5, characterized in that The method further comprises: The first chip determines, based on one or more of information of a service corresponding to second data transmitted by the second chip, a transmission time of the second chip, and a transmission quantity of the second chip; The transmission time of the second chip includes the sending time and receiving time of the second chip; the sending time of the second chip indicates the length of time the second chip is in the sending state, and the receiving time indicates the length of time the second chip is in the receiving state; The transmission quantity of the second chip includes the sending quantity and receiving quantity of the second chip; the sending quantity of the second chip represents the quantity of the second data successfully sent by the second chip, and the receiving quantity represents the quantity of the second data successfully received by the second chip.

7. The method according to claim 6, characterized in that The first chip determines, based on one or more of information of a service corresponding to second data transmitted by the second chip, a transmission time of the second chip, and a transmission quantity of the second chip, the transmission scenario of the second chip, including: The first chip determines a first difference value based on the sending time and receiving time of the second chip; wherein the first difference value represents the difference between the duration of time the second chip is in a sending state and the duration of time the second chip is in a receiving state; and a larger first difference value is, a higher probability that the transmission scenario of the second chip is an uplink transmission scenario; When the first difference value is greater than or equal to a first preset difference value, the first chip determines that the transmission scenario of the second chip is the uplink transmission scenario; When the first difference value is smaller than a first preset difference value, the first chip determines that the transmission scenario of the second chip is a downlink transmission scenario.

8. The method according to claim 6, characterized in that The first chip determines, based on one or more of information of a service corresponding to second data transmitted by the second chip, a transmission time of the second chip, and a transmission quantity of the second chip, the transmission scenario of the second chip, including: The first chip determines a first difference value based on a sending time and a receiving time of the second chip; The first chip determines a second difference value based on the number of transmissions and the number of receptions of the second chip; wherein the second difference value represents the difference between the number of second data transmitted and the number of second data received by the second chip; and a larger second difference value indicates a higher probability that the transmission scenario of the second chip is an uplink transmission scenario. The first chip determines a transmission scenario of the second chip based on the first difference value and the second difference value.

9. The method according to claim 8, characterized in that The method further comprises: The first chip determines, based on information about the service corresponding to the second data, a transmission type corresponding to the service; wherein the transmission type is an uplink transmission type or a downlink transmission type; The first chip determines a transmission scenario of the second chip based on the first difference value and the second difference value, including: The first chip determines a transmission scenario of the second chip based on the transmission type, the first difference value, and the second difference value.

10. The method according to any one of claims 1, 2, 5, 7, 8 or 9, characterized in that The method further comprises: The first chip determines a scenario prediction value based on the transmission time and / or transmission quantity of the second chip; wherein the scenario prediction value indicates the probability that the second chip is in an uplink transmission scenario; The first chip determines the first target time based on the scenario prediction value; wherein, the larger the scenario prediction value is, the longer the first target time is.

11. A data transmission method, characterized in that: Applicable to an electronic device, the electronic device including a first chip, a second chip, a first antenna, and an application processor AP, the first chip and the second chip being short-range communication chips, the AP being connected to the first chip and the second chip, respectively; the first chip independently using a first antenna; the data transmission method comprising: The first chip receives first data sent by the AP; When the transmission state of the second chip is a sending state, if the transmission state of the second chip is switched from the sending state to the first state, after a first target time, the first chip transmits the first data based on the first antenna; the first state is an idle state or a receiving state.

12. A chip system, characterized in that: The chip system includes a first chip and a second chip, wherein the first chip and the second chip are both short-range communication chips; the first chip and the second chip are connected; The chip system further includes an application processor AP, which is connected to the first chip and the second chip respectively; The chip system is applied to an electronic device, and the electronic device executes the method according to any one of claims 1 to 11.

13. An electronic device, characterized in that: The electronic device includes a display screen, a memory, a first chip, a second chip and one or more processors; the display screen, the memory, the first chip and the second chip are coupled to the processor; the processor includes an application processor, the display screen is used to display an image generated by the processor, the memory is used to store computer program code, the first chip and the second chip are short-range communication chips, both used to transmit data, and the computer program code includes computer instructions; when the processor executes the computer instructions, the electronic device executes the method as described in any one of claims 1 to 11.

14. A computer-readable storage medium, characterized in that The method comprises computer instructions, which, when executed on an electronic device, cause the electronic device to execute the method according to any one of claims 1 to 11.

15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 11 is implemented.

Citation Information

Patent Citations

  • Electronic devices having antenna diversity capabilities

    CN108512577A

  • Terminal equipment, multi-link communication method and chip

    CN114640972A