Data transmission method, device and storage medium
By detecting the wireless network standard and MCS, and dynamically selecting the data transmission interface protocol, the flexibility and transmission efficiency issues between the wireless communication module and the processor are resolved. This enables efficient data transmission under different WiFi networks, balancing EMI performance and transmission rate, and improving the user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HONOR DEVICE CO LTD
- Filing Date
- 2022-10-20
- Publication Date
- 2026-06-16
AI Technical Summary
In existing technologies, wireless communication modules and processors use a fixed data transmission interface protocol for data transmission, which has low flexibility and cannot meet data transmission requirements. Especially when facing different WiFi network standards, it may lead to radio frequency interference and reduced throughput, affecting user experience.
The wireless communication module detects the wireless network standard and modulation and coding scheme (MCS) of the terminal device and feeds back the detection results to the processor. The processor selects the matching data transmission interface protocol for data transmission based on the detection results. For example, it selects the PCIe 1.0 protocol under 2.4G WiFi network and the PCIe 2.0 or PCIe 3.0 protocol under 5G WiFi network to balance EMI performance and transmission rate.
It improves the flexibility of data transmission between the wireless communication module and the processor, balances EMI performance and transmission rate, reduces radio frequency interference, and enhances the user experience.
Smart Images

Figure CN117956548B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of terminal technology, and in particular to a data transmission method, device and storage medium. Background Technology
[0002] Terminal devices typically include a wireless communication module and a processor. After the terminal device connects to a wireless network via the wireless communication module, data transmission is required between the module and the processor. For example, the wireless communication module may send data received from the wireless network to the processor, or send data from the processor to other devices via the wireless network. Typically, the wireless communication module and the processor use a data transmission interface protocol for data transmission. This protocol refers to the communication methods and requirements that interfaces undergoing data transmission must adhere to. For instance, the wireless communication module and the processor often use the Peripheral Component Interconnect Express (PCIe) protocol for data transmission. PCIe is a high-speed serial computer expansion bus standard.
[0003] In related technologies, terminal devices can access 2.4G Wireless Fidelity (WiFi) networks or 5G WiFi networks via wireless communication modules. After the terminal device accesses the wireless network, the wireless communication module typically communicates with the processor using a pre-negotiated fixed data transmission interface protocol, such as a pre-negotiated fixed first-generation PCIe protocol or second-generation PCIe protocol. This technical solution, which uses a fixed data transmission interface protocol between the wireless communication module and the processor, has certain limitations, low flexibility, and may not meet data transmission requirements. Summary of the Invention
[0004] This application provides a data transmission method, device, and storage medium, which can improve the flexibility of data transmission between a wireless communication module and a processor, and meet data transmission requirements. For example, it can solve the radio frequency interference problem introduced during data transmission between the wireless communication module and the processor. The technical solution is as follows:
[0005] Firstly, a data transmission method is provided, applied in a terminal device. The terminal device includes a wireless communication module and a processor. The method includes: the wireless communication module detecting the network standard of the wireless network accessed by the terminal device; the wireless communication module sending the detection result to the processor; and the processor selecting a data transmission interface protocol matching the network standard to transmit data with the terminal device based on the detection result. The network standard includes at least a first network standard and a second network standard. The data transmission interface protocol matching the first network standard is a first data transmission interface protocol, and the data transmission interface protocol matching the second network standard is a second data transmission interface protocol. The first network standard and the second network standard are different, and the first data transmission interface protocol and the second data transmission interface protocol are different.
[0006] This improves the flexibility of data transmission between the wireless communication module and the processor, ensuring that the data transmission interface protocol used between the wireless communication module and the processor matches the network standard of the wireless network accessed by the terminal device. This allows the adopted data transmission interface protocol to meet the data transmission requirements of the accessed network standard, such as ensuring that the adopted data transmission interface protocol can balance EMI performance and transmission rate.
[0007] As an example, the first network standard is a first WiFi network, and the first data transmission interface protocol is a first PCIe protocol; the second network standard is a second WiFi network, and the second data transmission interface protocol is a second PCIe protocol. The second WiFi network and the first WiFi network operate on different frequency bands, and the data transmission rates corresponding to the first PCIe protocol and the second PCIe protocol are different.
[0008] In this way, when the terminal device is connected to a WiFi network, the PCIe protocol used for data transmission between the wireless communication module and the processor can be matched with the network standard of the WiFi network to which the terminal device is connected. This ensures that the PCIe protocol can meet the data transmission requirements of the connected network standard, such as ensuring that the PCIe protocol can balance EMI performance and transmission rate.
[0009] As an example, the first WiFi network is a 2.4G WiFi network, and the first PCIe protocol is the first-generation PCIe protocol; the second WiFi network is a 5G WiFi network, and the second PCIe protocol is either the second-generation PCIe protocol or the third-generation PCIe protocol. That is, if the detected wireless network type is a 2.4G WiFi network, the processor negotiates with the processor to select the PCIe 1.0 protocol for data transmission. If the detected wireless network type is a 5G WiFi network, the processor negotiates with the processor to select either the PCIe 2.0 protocol or the PCIe 3.0 protocol for data transmission.
[0010] By negotiating with the processor to select the PCIe 1.0 protocol when the connected wireless network is detected as a 2.4G WiFi network, radio frequency interference problems caused by the same-frequency noise generated by PCIe data signals under PCIe 2.0 and PCIe 3.0 protocols can be avoided, thus improving the throughput rate of the 2.4G WiFi network and improving the user experience. Conversely, by negotiating with the processor to select either the PCIe 2.0 or PCIe 3.0 protocol when the connected wireless network is detected as a 5G WiFi network, a high data transmission rate can be guaranteed while minimizing the impact of data signal noise generated under PCIe 2.0 or PCIe 3.0 protocols on the 5G WiFi network. This PCIe protocol switching scheme based on network standard balances EMI performance and transmission rate.
[0011] As an example, the wireless communication module detects the network standard of the wireless network accessed by the terminal device, including: the wireless communication module acquiring network standard information of the wireless network, the network standard information being used to indicate the network standard of the wireless network; and the wireless communication module determining the network standard of the wireless network based on the network standard information.
[0012] As an example, before the wireless communication module sends the detection result to the processor, it also includes: if the wireless communication module detects that the terminal device has accessed the wireless network through the wireless communication module, it performs a handshake with the processor; during the handshake process with the processor, the wireless communication module performs the step of sending the detection result to the processor.
[0013] In this way, the wireless communication module can detect the network standard of the wireless network accessed by the terminal device before establishing a connection with the processor. During the connection establishment process, it feeds back the detected network standard to the processor so that after the processor establishes a connection with the wireless communication module, it can directly use the data transmission interface protocol that matches the network standard to transmit data with the wireless communication module, which can improve data transmission efficiency.
[0014] Secondly, a data transmission method is provided, applied in a terminal device. The terminal device includes a wireless communication module and a processor. The method includes: the wireless communication module detecting a modulation and coding scheme (MCS) negotiated between the terminal device and an access point, where the access point is the access point of the wireless network to which the terminal device is connected; the wireless communication module sending the detection result to the processor; and the processor selecting a data transmission interface protocol matching the MCS and transmitting data with the wireless communication module based on the detection result. Specifically, if the MCS belongs to a first set of MCSs, the data transmission interface protocol matching the MCS is the first data transmission interface protocol; if the MCS belongs to a second set of MCSs, the data transmission interface protocol matching the MCS is the second data transmission interface protocol. The intersection of the first and second MCS sets is empty, and the first and second data transmission interface protocols are different.
[0015] Since the MCS negotiated between the terminal device and the access point of the wireless network is related to the network standard of the wireless network and can determine the network transmission rate to a certain extent, the wireless communication module detects the MCS negotiated between the terminal device and the access point of the wireless network and feeds the negotiated MCS back to the processor. This allows the processor to select a data transmission interface protocol that matches the MCS negotiated by the terminal device and transmit data with the wireless communication module. This ensures that the selected data transmission interface protocol is compatible with the MCS and the corresponding network standard, realizing a dynamic correlation between the network transmission rate, MCS, and data transmission interface protocol of the wireless network. This improves the flexibility of data transmission between the wireless communication module and the processor and can balance EMI performance and transmission rate.
[0016] As an example, the first data transmission interface protocol is the first PCIe protocol, and the second data transmission interface protocol is the second PCIe protocol. The data transmission rates corresponding to the first PCIe protocol and the second PCIe protocol are different.
[0017] In this way, when the terminal device is connected to a WiFi network, the PCIe protocol used for data transmission between the wireless communication module and the processor can be matched with the MCS negotiated by the terminal device, so that the PCIe protocol can meet the data transmission requirements of the negotiated MCS. For example, it can ensure that the PCIe protocol can take into account both EMI performance and transmission rate.
[0018] As an example, the wireless communication module detects the MCS negotiated between the terminal device and the access point, including: the wireless communication module obtaining the index value of the MCS negotiated between the terminal device and the access point; if the index value belongs to the first MCS index value set, then the MCS is determined to belong to the first MCS set; if the index value belongs to the second MCS index value set, then the MCS is determined to belong to the second MCS set.
[0019] As an example, the first data transmission interface protocol is the first-generation PCIe protocol, and the second data transmission interface protocol is the second-generation PCIe protocol or the third-generation PCIe protocol.
[0020] As an example, the first set of MCS index values is MCS0-MCS7, and the second set of MCS index values is MCS8-MCS11. That is, if the negotiated MCS index values belong to MCS0-MCS7, the processor selects the PCIe 1.0 protocol for data transmission with the wireless communication module. If the negotiated MCS index values belong to MCS8-MCS11, the processor selects either the PCIe 2.0 protocol or PCIe 3.0 for data transmission with the wireless communication module.
[0021] When the negotiated MCS index value belongs to MCS0 to MCS7, the processor selects the PCIe 1.0 protocol for data transmission with the wireless communication module. This avoids radio frequency interference caused by the co-frequency noise of the 2.4G WiFi network when the connected network is a 2.4G WiFi network. This improves the throughput rate of the 2.4G WiFi network and thus enhances the user experience. When the negotiated MCS index value belongs to MCS8 to MCS11, the processor selects either the PCIe 2.0 or PCIe 3.0 protocol for data transmission with the wireless communication module. This not only ensures a high data transmission rate when the data signal noise generated by the PCIe 2.0 or PCIe 3.0 protocols has little impact on the 5G WiFi network, but also allows for data transmission with a PCIe protocol adapted to the higher network transmission rate when the 5G WiFi network has a higher transmission rate. In summary, when terminal devices communicate via wireless networks, the dynamic correlation between the network transmission rate, MCS, and data transmission interface protocol can be achieved, balancing EMI performance and network transmission speed.
[0022] As an example, the wireless communication module detects the modulation and coding scheme (MCS) negotiated between the terminal device and the access point, including: if the wireless communication module detects that the terminal device and the access point are negotiating the MCS for the first time or renegotiation of the MCS, then the wireless communication module detects the MCS negotiated between the terminal device and the access point.
[0023] Thirdly, a data transmission apparatus is provided, which has the function of implementing the data transmission method behavior described in the first aspect above. The data transmission apparatus includes at least one module, which is used to implement the data transmission method provided in the first or second aspect above.
[0024] Fourthly, a data transmission apparatus is provided, comprising a processor and a memory. The memory stores a program that supports the data transmission apparatus in executing the data transmission method provided in the first aspect, and stores data related to implementing the data transmission method described in the first or second aspect. The processor is configured to execute the program stored in the memory. The data transmission apparatus may further include a communication bus for establishing a connection between the processor and the memory.
[0025] Fifthly, a computer-readable storage medium is provided, wherein instructions are stored therein, which, when executed on a computer, cause the computer to perform the data transmission method described in the first or second aspect above.
[0026] In a sixth aspect, a computer program product containing instructions is provided, which, when run on a computer, causes the computer to perform the data transmission method described in the first or second aspect above.
[0027] The technical effects achieved by the third, fourth, fifth and sixth aspects mentioned above are similar to the technical effects achieved by the corresponding technical means in the first or second aspects mentioned above, and will not be repeated here. Attached Figure Description
[0028] Figure 1 This is a structural block diagram of a terminal device provided in an embodiment of this application;
[0029] Figure 2 This is a spectrum diagram of data noise generated during data transmission between a wireless communication module and a processor under different PCIe protocols in the same test environment, provided by an embodiment of this application.
[0030] Figure 3 This is a structural block diagram of another terminal device provided in an embodiment of this application;
[0031] Figure 4 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application;
[0032] Figure 5 This is a block diagram of a software system for a terminal device provided in an embodiment of this application;
[0033] Figure 6 This is a flowchart of a data transmission method provided in an embodiment of this application;
[0034] Figure 7 This is a flowchart of another data transmission method provided in an embodiment of this application;
[0035] Figure 8This is a flowchart of yet another data transmission method provided in the embodiments of this application;
[0036] Figure 9 This is a flowchart of another data transmission method provided in the embodiments of this application. Detailed Implementation
[0037] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0038] It should be understood that "multiple" as mentioned in this application refers to two or more. In the description of this application, unless otherwise stated, " / " indicates "or," for example, A / B can mean A or B; "and / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist, for example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, to facilitate a clear description of the technical solutions of this application, the terms "first," "second," etc., are used to distinguish identical or similar items with essentially the same function and effect. Those skilled in the art will understand that the terms "first," "second," etc., do not limit the quantity or execution order, and that "first," "second," etc., do not necessarily imply differences.
[0039] Before providing a detailed explanation of the data transmission method provided in the embodiments of this application, the terms used in the embodiments of this application will be explained.
[0040] Data transmission interface protocol: The communication methods and requirements that interfaces that need to transmit data must follow, such as the PCIe protocol.
[0041] PCIe: A high-speed serial computer expansion bus standard, also known as PCI-E. PCIe is a high-speed serial point-to-point dual-channel high-bandwidth transmission standard. Each connected device is allocated its own dedicated channel bandwidth and does not share the bus bandwidth. PCIe's predecessors were PCI and PCI-X. Compared to traditional parallel bus architectures, PCIe uses multiple pairs of high-speed serial buses for point-to-point connections, thus providing very high bus bandwidth. Furthermore, due to its compatibility with upper layers and mature technology, it has become the standard interface in desktop, laptop, and server applications. PCIe is also becoming increasingly popular in many embedded applications that require high-speed data exchange.
[0042] The PCIe protocol includes various specifications to meet the needs of both low-speed and high-speed devices that will emerge in the future. For example, the PCIe protocol includes different generations such as PCIe 1.0, PCIe 2.0, and PCIe 3.0. The transmission rates of these different generations of PCIe protocols differ. For instance, PCIe 1.0 has a transmission rate of 2.5 Gb / s, supporting the transmission of 2.5 gigabits per second; PCIe 2.0 has a transmission rate of 5 Gb / s; and PCIe 3.0 has a transmission rate of 8 Gb / s.
[0043] Wireless Fidelity (WiFi) networks are communication networks that utilize wireless technology. Every industry has its own standards, typically developed by leading companies in the industry through associations or alliances. The WiFi network field also has its own standards, namely wireless technology standards. For example, 2.4G WiFi networks use the 2.4G standard, and 5G WiFi networks use the 5G standard.
[0044] 2.4G WiFi network: Generally refers to WiFi networks operating in the frequency band between 2.400GHz and 2.4835GHz. Commonly found in home routers, these are manufactured based on the IEEE 802.11b standard. This standard allows for bidirectional transmission, and the coverage distance is affected by the device's power, typically covering a range of approximately 10 to 50 meters in diameter (depending on interference, obstructions, and the device's installation environment).
[0045] 5G WiFi network: Generally refers to WiFi networks operating on the 5GHz frequency band. The biggest difference between 5G WiFi networks and 2.4G WiFi networks is that 5G WiFi networks use a completely new frequency band and standard, operating on the 5GHz band and based on the IEEE 802.11ac technical standard, resulting in a significant improvement in bidirectional speed.
[0046] Modulation and coding scheme (MCS): Terminal devices can configure the network transmission rate of a wireless network by negotiating the MCS with the access point of the wireless network they are accessing. The MCS negotiated between the terminal device and the access point of the wireless network determines the network transmission rate; in other words, the network transmission rate of the wireless network accessed by the terminal device can depend on the MCS negotiated with the access point.
[0047] Currently, terminal devices can configure the network transmission rate of a wireless network using MCS index values. The MCS modulation and coding table is the foundation for configuring the network transmission rate of a wireless network. The MCS table includes multiple MCS index values and the corresponding network transmission rate for each MCS index value. For example, the multiple MCS index values in the MCS table can include MCS0 to MCS11. Furthermore, under different network standards, the range of MCS values that a terminal device and the access point of the connected wireless network can negotiate differ. For example, in a 2.4G WiFi network, the terminal device and the access point of the connected wireless network can negotiate MCS index values from MCS0 to MCS7; in a 5G WiFi network, the terminal device and the access point of the connected wireless network can negotiate MCS index values from MCS0 to MCS11. Generally, the larger the MCS index value, the higher the corresponding network transmission rate.
[0048] Next, the application scenarios involved in the data transmission method provided in the embodiments of this application will be described.
[0049] Please refer to Figure 1 , Figure 1 This is a structural block diagram of a terminal device provided in an embodiment of this application. For example... Figure 1 As shown, a terminal device typically includes an antenna 1, a wireless communication module 10, and a processor 20. The wireless communication module 10 is coupled to the antenna 1, enabling the terminal device to communicate with networks and other devices via wireless communication technology. For example, the terminal device can connect to a wireless network via the wireless communication module 10 and the antenna 1, establishing a network connection to receive or send information through the wireless network. After the terminal device connects to the wireless network via the wireless communication module 10 and the antenna 1, the wireless communication module 10 can transmit data with the processor 20 using a data transmission interface protocol, such as... Figure 1 The data transmission is performed using the PCIe protocol.
[0050] For example, the wireless communication module 10 receives electromagnetic waves via antenna 1, performs frequency modulation and filtering of the electromagnetic wave signal, and sends the processed signal to the processor 20 using data transmission interface protocols such as PCIe. The wireless communication module 10 can also receive signals to be transmitted from the processor 20 using data transmission interface protocols such as PCIe, perform frequency modulation and amplification, and then convert them into electromagnetic waves for radiation via antenna 1. For example, the wireless communication module 10 can be a wireless local area network (WLAN) module.
[0051] As described in the background section, currently, after a terminal device accesses a wireless network via the wireless communication module 10, regardless of the network standard of the wireless network, the wireless communication module 10 and the processor 20 use a pre-set fixed data transmission interface protocol for data transmission, such as a fixed PCIe 1.0 protocol or PCIe 2.0 protocol. This technical solution of using a fixed data transmission interface protocol between the wireless communication module 10 and the processor 20 has certain limitations, low flexibility, and may not meet data transmission requirements, such as failing to balance data transmission rate and electromagnetic interference (EMI) performance.
[0052] For example, data signals transmitted using a fixed data transmission interface protocol may generate strong interference noise in the operating frequency band of the connected wireless network. The interference noise will affect the receiving sensitivity of the wireless network module, and thus affect the throughput rate of the wireless network, resulting in a decrease in the throughput rate of the wireless network. This manifests as network stuttering such as video playback stuttering, slow loading, and slow file download, which seriously affects the user's online experience.
[0053] Combination Figure 1 Taking a terminal device accessing a 2.4G WiFi network via wireless communication module 10 and antenna 1 as an example, after the terminal device accesses the 2.4G WiFi network, if the wireless communication module 10 and processor 20 transmit data using the PCIe 2.0 or PCIe 3.0 protocol, the transmitted data signal will generate strong interference noise in the operating frequency band of the 2.4G WiFi network (2.400GHz~2.4835GHz). If antenna 1 receives the PCIe noise signal generated during data transmission between the wireless communication module 10 and processor 20, it will cause a decrease in the throughput rate of the 2.4G WiFi network, which will manifest as network lag and affect the user's internet experience. This problem is particularly noticeable in scenarios with weak WiFi signals.
[0054] Please refer to Figure 2 , Figure 2 This is a spectrum diagram of data noise generated during data transmission between a wireless communication module and a processor under different PCIe protocols in the same test environment, as provided in an embodiment of this application. Figure 2 The horizontal axis of the coordinate system represents the frequency of the generated data signal noise, and the vertical axis represents the power of the generated data signal noise. The power of the data signal noise indicates its intensity. Figure 2As shown, when data transmission between the wireless communication module and the processor uses the PCIe 2.0 or PCIe 3.0 protocol, the transmitted data signal generates strong interference noise in the 2.4GHz–2.5GHz frequency band. This results in significant interference noise in the operating frequency band of the 2.4GHz WiFi network, leading to a decrease in its throughput. Conversely, when data transmission between the wireless communication module and the processor uses the PCIe 1.0 protocol, the transmitted data signal generates weaker interference noise in the 2.4GHz–2.5GHz frequency band, thus avoiding significant interference noise in the operating frequency band of the 2.4GHz WiFi network and its impact on its throughput.
[0055] Therefore, when a terminal device accesses a 2.4G WiFi network, if the wireless communication module and the processor use a fixed-configuration PCIe 2.0 or PCIe 3.0 protocol for data transmission, the transmitted data signal will generate strong interference noise in the operating frequency band of the 2.4G WiFi network. This will interfere with the receiving sensitivity of the wireless network module, thereby causing a decrease in the throughput rate of the 2.4G WiFi network, resulting in network lag and affecting the user experience.
[0056] In related technologies, interference noise generated by data signals transmitted between the wireless communication module and the processor can be reduced by configuring common-mode inductors or capacitors, or by using shielding materials such as conductive foam or absorbing materials, in the data signal routing network of the terminal device. However, this approach increases the technical and material costs of the terminal device.
[0057] To improve the flexibility of data transmission between the wireless communication module and the processor, this application provides a method in which, after a terminal device accesses a wireless network, the wireless communication module first detects the network standard of the wireless network accessed by the terminal device, feeds back the detection result to the processor, and then the processor selects a data transmission interface protocol that matches the network standard to transmit data with the wireless communication module based on the detection result of the wireless communication module.
[0058] This method ensures that the data transmission interface protocol used between the wireless communication module and the processor matches the network standard of the wireless network accessed by the terminal device. This guarantees that the adopted data transmission interface protocol meets the data transmission requirements of the access network standard, such as ensuring both EMI performance and transmission rate. Furthermore, this method can save on the technical and material costs of the terminal device.
[0059] For example, after a terminal device connects to a wireless network, if the wireless communication module detects that the network standard is 2.4G WiFi, the processor selects the PCIe 1.0 protocol for data transmission based on the detection result. If the wireless communication module detects that the network standard is 5G WiFi, the processor selects another PCIe protocol, such as PCIe 2.0 or PCIe 3.0, for data transmission. This avoids the problem of data signal noise generated by PCIe 2.0 or PCIe 3.0 protocols interfering with the 2.4G WiFi network, improving the throughput of the 2.4G WiFi network and thus enhancing the user experience. Furthermore, when the data signal noise generated by PCIe 2.0 or PCIe 3.0 protocols has little impact on the 5G WiFi network, negotiating the selection of PCIe 2.0 or PCIe 3.0 protocols for data transmission ensures a high data transmission rate. This technical solution, which negotiates and selects a matching PCIe protocol based on the network standard for data transmission, balances network transmission speed and EMI performance.
[0060] Furthermore, to improve the flexibility of data transmission between the wireless communication module and the processor, this application embodiment provides a method where, after the terminal device accesses the wireless network, the wireless communication module first detects the MCS negotiated between the terminal device and the access point of the wireless network, and then feeds back the detection result to the processor. The processor then selects a data transmission interface protocol that matches the detected MCS and transmits data with the processor based on the detection result. Since the MCS negotiated between the terminal device and the access point of the wireless network is usually different depending on the network standard of the connected wireless network, by selecting a data transmission interface protocol that matches the detected MCS and transmitting data with the wireless communication module, it can be ensured that the selected data transmission interface protocol matches the network standard corresponding to the detected MCS. This ensures that the adopted data transmission interface protocol can meet the data transmission requirements of the connected network standard, such as balancing EMI performance and transmission rate.
[0061] The network transmission rate (throughput rate) of a wireless network depends on both the MCS negotiated by the terminal device and the data transmission rate between the wireless communication module and the processor. In this embodiment, the processor selects a data transmission interface protocol that matches the MCS negotiated with the terminal device to transmit data with the wireless communication module. This enables dynamic correlation between the network transmission rate, MCS, and data transmission interface protocol of the wireless network when the terminal device is communicating with the wireless network, thus balancing EMI performance and transmission rate.
[0062] It should be noted that the data transmission method provided in this application embodiment can be applied to, in addition to, [other applications]. Figure 1 The terminal device shown can be used not only with a single antenna but also with multiple antennas. A terminal device with a single antenna only supports single-input single-output (SISO) functionality, while a terminal device with multiple antennas supports both SISO and multiple-input multiple-output (MIMO) functionality. Please refer to [reference needed]. Figure 3 , Figure 3 This is a schematic diagram of the structure of another terminal device provided in an embodiment of this application. For example... Figure 3 As shown, the terminal device typically includes antenna 1, antenna 2, wireless communication module 10, and processor 20. Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna can be used to cover one or more communication frequency bands. Different antennas can also be reused to improve antenna utilization.
[0063] Next, the terminal devices involved in the embodiments of this application will be described.
[0064] Figure 4 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application. See also... Figure 4 The terminal 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, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0065] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the terminal device 100. In other embodiments of this application, the terminal device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0066] Processor 110 may include one or more processing units, such as: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0067] The controller can serve as the central nervous system and command center of the terminal device 100. The controller can generate operation control signals based on the instruction opcode and timing signals to control the fetching and execution of instructions.
[0068] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from this memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0069] In some embodiments, the processor 110 may include one or more interfaces, such as an inter-integrated circuit (I2C) interface, a PCIe interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0070] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple I2C interfaces. The processor 110 can couple to the touch sensor 180K, charger, flash, camera 193, etc., through different I2C interfaces. For example, the processor 110 can couple to the touch sensor 180K through the I2C interface, enabling the processor 110 and the touch sensor 180K to communicate via the I2C interface, thereby realizing the touch function of the terminal device 100.
[0071] The PCIe interface is a high-speed serial computer expansion bus. In some embodiments, the processor 110 can couple the wireless communication module 160 through the PCIe interface, enabling the processor 110 and the wireless communication module 160 to communicate through the PCIe interface, allowing the terminal device 100 to communicate with the network and other devices through wireless communication technology.
[0072] The I2S interface can be used for audio communication. In some embodiments, the processor 110 may include multiple I2S interfaces. The processor 110 can be coupled to the audio module 170 through the I2S interface to realize communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 through the I2S interface to realize the function of answering phone calls through a Bluetooth headset.
[0073] The PCM interface can also be used for audio communication, sampling, quantizing, and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via the PCM interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface, enabling the function of answering phone calls through a Bluetooth headset.
[0074] The UART interface is a universal serial data bus used for asynchronous communication. The UART interface can be a bidirectional communication bus. It can convert data between serial and parallel communication. In some embodiments, the UART interface is typically used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 via the UART interface to implement Bluetooth functionality. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the UART interface to enable music playback through Bluetooth headphones.
[0075] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI) and a display serial interface (DSI). In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to enable the shooting function of the terminal device 100. The processor 110 and the display screen 194 communicate via the DSI interface to enable the display function of the terminal device 100.
[0076] The GPIO interface can be configured via software. It can be configured as a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 to a camera 193, a display screen 194, a wireless communication module 160, an audio module 170, a sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
[0077] It is understood that the interface connection relationships between the modules illustrated in the embodiments of this application are merely illustrative and do not constitute a structural limitation on the terminal device 100. In other embodiments of this application, the terminal device 100 may also adopt different interface connection methods or a combination of multiple interface connection methods as described in the above embodiments.
[0078] The wireless communication function of the terminal device 100 can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.
[0079] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in terminal device 100 can be used to cover one or more 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 some other embodiments, the antennas can be used in conjunction with tuning switches.
[0080] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the terminal device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 150 may be housed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be housed in the same device.
[0081] The modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates 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 processing by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs sound signals through an audio device (not limited to speaker 170A, receiver 170B, etc.) or displays images or videos through the display screen 194. In some embodiments, the modem processor may be a separate device. In other embodiments, the modem processor may be independent of the processor 110 and may be housed in the same device as the mobile communication module 150 or other functional modules.
[0082] The wireless communication module 160 can provide solutions for wireless communication applications on the terminal device 100, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. 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 antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification on them, and convert them into electromagnetic waves for radiation via antenna 2. Furthermore, in this embodiment, the wireless communication module 160 also has the function of detecting the network standard of the wireless network accessed by the terminal device 100, and / or the function of detecting the MCS negotiated between the terminal device 100 and the access point of the accessed wireless network.
[0083] In some embodiments, antenna 1 of terminal device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, enabling terminal device 100 to communicate with networks and other devices via wireless communication technology. Wireless communication technologies 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 technologies, etc. GNSS can include the Global Positioning System (GPS), the Global Navigation Satellite System (GLONASS), the BeiDou Navigation Satellite System (BDS), the Quasi-Zenith Satellite System (QZSS), and / or satellite-based augmentation systems (SBAS).
[0084] Terminal device 100 implements display functions through a GPU, display screen 194, and application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0085] The external storage interface 120 can be used to connect an external storage card, such as a Micro SD card, to expand the storage capacity of the terminal device 100. The external storage card communicates with the processor 110 through the external storage interface 120 to perform data storage functions, such as saving music, video, and other files on the external storage card.
[0086] Internal memory 121 can be used to store computer-executable program code, which includes instructions. Processor 110 executes various functional applications and data processing of terminal device 100 by running the instructions stored in internal memory 121. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback, image playback, etc.), etc. The data storage area may store data created by terminal device 100 during use (such as audio data, phonebook, etc.). Furthermore, internal memory 121 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.
[0087] Terminal device 100 can implement audio functions, such as music playback and recording, through audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D and application processor.
[0088] The software system of terminal device 100 will be described next.
[0089] The software system of terminal device 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This application embodiment uses a layered Android system as an example to illustrate the software system of terminal device 100.
[0090] Figure 5 This is a block diagram of a software system for a terminal device 100 provided in an embodiment of this application. See also... Figure 2 A layered architecture divides software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime, the system layer, and the kernel layer.
[0091] The application layer can include a series of application packages. For example... Figure 2 As shown, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and SMS.
[0092] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions. For example... Figure 2 As shown, the application framework layer can include a window manager, content providers, a view system, a phone manager, a resource manager, and a notification manager. The window manager manages window programs. It can obtain the screen size, determine if a status bar is present, lock the screen, and capture the screen. The content provider stores and retrieves data, making this data accessible to the application. This data can include videos, images, audio, made and received phone calls, browsing history and bookmarks, and phone books. The view system includes visual controls, such as controls for displaying text and controls for displaying images. The view system can be used to build the application's display interface, which can consist of one or more views, such as a view displaying SMS notification icons, a view displaying text, and a view displaying images. The phone manager provides communication functions for the terminal device 100, such as managing call status (including connection and disconnection). The resource manager provides the application with various resources, such as localized strings, icons, images, layout files, and video files. The notification manager allows the application to display notification information in the status bar, which can be used to convey informational messages and can disappear automatically after a short pause without user interaction. For example, the notification manager is used to notify users of download completions and message alerts. The notification manager can also display notifications as icons or scrolling text in the system's top status bar, such as notifications from background applications. Furthermore, the notification manager can appear as dialog boxes on the screen, such as displaying text messages in the status bar, emitting sounds, causing electronic devices to vibrate, or flashing indicator lights.
[0093] The Android Runtime consists of the core libraries and the virtual machine. The Android runtime is responsible for scheduling and managing the Android system. The core libraries consist of two parts: one part contains the functionalities that Java needs to call, and the other part is the core Android library itself. The application layer and application framework layer run in the virtual machine. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.
[0094] The system library can include multiple functional modules, such as a surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), and 2D graphics engines (e.g., SGL). The surface manager manages the display subsystem and provides fusion of 2D and 3D layers for multiple applications. The media libraries support playback and recording of various common audio and video formats, as well as still image files. The media libraries support various audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG. The 3D graphics processing libraries are used for 3D graphics drawing, image rendering, compositing, and layer processing. The 2D graphics engine is the drawing engine for 2D graphics.
[0095] The kernel layer is the layer between hardware and software. At a minimum, the kernel layer includes processor drivers, wireless communication module drivers, display drivers, and audio drivers. The hardware layer includes at a minimum processor, wireless communication module, display, and audio devices.
[0096] Next, combined Figure 6 The data transmission method provided in the embodiments of this application will be described in detail.
[0097] Figure 6 This is a flowchart illustrating a data transmission method provided in an embodiment of this application. The method is applied to a terminal device, which includes a wireless communication module and a processor, such as... Figure 6 As shown, the method includes the following steps:
[0098] Step 601: The wireless communication module detects that the terminal device has accessed the wireless network.
[0099] Terminal devices can establish a wireless network connection through a wireless communication module, thereby connecting to the wireless network, or accessing the wireless network. For example, a terminal device can send a connection request to the access point (AP) of the wireless network through the wireless communication module, and then access the wireless network through the access point.
[0100] Furthermore, terminal devices can establish connections with wireless networks of different network standards, thereby accessing wireless networks of varying standards. For example, a terminal device can choose to prioritize accessing one of the multiple wireless networks available, based on their network quality. Here, "network standard" refers to the type of wireless network; that is, the terminal device can connect to different types of wireless networks through its wireless communication module.
[0101] As an example, the wireless network can be a WiFi network, such as a 2.4G WiFi network or a 5G WiFi network, or of course, other WiFi network standards. This application embodiment does not limit this.
[0102] As an example, if the wireless communication module detects that a terminal device has accessed the wireless network, it will handshake with the processor to establish a connection so that data can be transmitted subsequently through the established connection.
[0103] The handshake process between the wireless communication module and the processor can be referred to as a heartbeat. In one possible implementation, the wireless communication module can initiate a handshake after detecting that the terminal device has connected to the wireless network through the module, and then refrain from further handshakes as long as the connection between the wireless communication module and the processor remains normal. In another possible implementation, to ensure the correct execution of business logic, the wireless communication module and the processor can also perform timed handshakes, i.e., a handshake occurs at preset intervals.
[0104] As an example, the handshake process includes: the wireless communication module sending a heartbeat message to the processor; the processor, upon receiving the heartbeat message, immediately returns a corresponding message packet; and the wireless communication module, upon receiving the corresponding message packet, completes a full handshake. Alternatively, the processor sends a heartbeat message to the wireless communication module; the wireless communication module, upon receiving the heartbeat message, immediately returns a corresponding message packet; and the processor, upon receiving the corresponding message packet, completes a full handshake.
[0105] In addition, the terminal device can determine whether the heartbeat of the wireless communication module is normal based on whether the handshake is successful and the number of successful handshakes, thereby performing relevant business logic and error handling.
[0106] Step 602: The wireless communication module detects the network standard of the wireless network.
[0107] The network standards of a wireless network include at least a first network standard and a second network standard, which are different from each other. Of course, the network standards of a wireless network can also include more different network standards, such as a third network standard, a fourth network standard, etc., which are different from the aforementioned network standards.
[0108] As an example, the first network standard is the first WiFi network, and the second network standard is the second WiFi network. The first WiFi network and the second WiFi network operate on different frequency bands.
[0109] For example, the first WiFi network is a 2.4G WiFi network, and the second WiFi network is a 5G WiFi network. A 2.4G WiFi network generally refers to a WiFi network with a frequency band between 2.400GHz and 2.4835GHz. A 5G WiFi network generally refers to a WiFi network with a frequency band of 5GHz. Of course, the first and second WiFi networks can also be WiFi networks operating in other frequency bands; this application embodiment does not limit this.
[0110] As an example, the wireless communication module can obtain the network standard information of the wireless network accessed by the terminal device, and determine the network standard of the wireless network based on the network standard information. The network standard information of the wireless network is used to indicate the network standard of the wireless network.
[0111] In one possible implementation, the wireless communication module can use a wireless network packet capture program to capture data packets from the accessed wireless network, parse the captured data packets, and obtain the network standard information of the wireless network from the captured data packets. Of course, other methods can also be used to obtain the network standard information of the wireless network, and this application embodiment does not limit this.
[0112] It should be noted that the wireless communication module can be pre-configured to detect the network type of the wireless network accessed by the terminal device. This allows it to proactively detect the network type after detecting that the terminal device is connected to the wireless network and then feed the detection result back to the processor. Alternatively, the wireless communication module can also detect the network type of the wireless network accessed by the terminal device under the control of the processor; that is, the processor controls the wireless communication module to detect the network type of the wireless network accessed by the terminal device and then obtains the detection result from the wireless communication module.
[0113] Step 603: The wireless communication module sends the detection results to the processor.
[0114] The test results include information about the network standard of the wireless network accessed by the terminal device.
[0115] In other words, after detecting the network type of the wireless network accessed by the terminal device, the wireless communication module can feed back the detected network type to the processor.
[0116] As an example, the wireless communication module can send the detection results to the processor during the handshake process. In this way, the wireless communication module can detect the network type of the wireless network the terminal device is accessing before establishing a connection with the processor. During the connection establishment process, it feeds back the detected network type to the processor, so that after establishing a connection with the wireless communication module, the processor can directly use a data transmission interface protocol that matches the network type to transmit data with the wireless communication module, thus improving data transmission efficiency.
[0117] It should be noted that the wireless communication module can handshake with the processor before step 603. For example, it can handshake with the processor after step 601 or step 602.
[0118] Step 604: The processor receives the detection result and, based on the detection result, selects a data transmission interface protocol that matches the network standard to transmit data with the wireless communication module.
[0119] In this context, a data transmission interface protocol that matches the network standard refers to a data transmission interface protocol that is compatible with the network standard of the accessed wireless network, meaning it can meet the data transmission requirements under the network standard of the accessed wireless network. For example, a data transmission interface protocol that matches the network standard could be one that can balance the EMI performance and data transmission rate of the accessed wireless network.
[0120] As an example, the processor can negotiate with the wireless communication module to select a data transmission interface protocol that matches the network standard for data transmission. For instance, compared to related technologies that use a fixed data transmission interface protocol for data transmission with the processor, in this embodiment, a target negotiation mechanism can be pre-configured for the processor and the wireless communication module. This target negotiation mechanism is a mechanism used to negotiate and select a data transmission interface protocol between the processor and the wireless communication module. After receiving the network standard of the wireless network from the wireless communication module, the processor can use this target negotiation mechanism to negotiate and select a data transmission interface protocol that matches the network standard for data transmission.
[0121] The wireless network standard includes at least a first network standard and a second network standard. The data transmission interface protocol matching the first network standard is the first data transmission interface protocol, and the data transmission interface protocol matching the second network standard is the second data transmission interface protocol. The first data transmission interface protocol and the second data transmission interface protocol are different.
[0122] For example, based on the test results, selecting a data transmission interface protocol that matches the network standard and the wireless communication module for data transmission may include: if the network standard of the wireless network is a first network standard, then selecting a first data transmission interface protocol that matches the first network standard and the wireless communication module for data transmission; if the network standard of the wireless network is a second network standard, then selecting a second data transmission interface protocol that matches the second network standard and the wireless communication module for data transmission.
[0123] The wireless network can be a WiFi network or other wireless networks. The first data transmission interface protocol and the second data transmission interface protocol can be the PCIe protocol, an upgraded version of the PCIe protocol, or other data transmission interface protocols, etc., and this application embodiment does not limit them.
[0124] As an example, the first network standard is a first WiFi network, and the first data transmission interface protocol is a first PCIe protocol; the second network standard is a second WiFi network, and the second data transmission interface protocol is a second PCIe protocol. The data transmission rates corresponding to the first PCIe protocol and the second PCIe protocol are different.
[0125] For example, the first WiFi network is a 2.4G WiFi network, and the first PCIe protocol is the first generation PCIe protocol; the second WiFi network is a 5G WiFi network, and the second PCIe protocol is the second generation PCIe protocol or the third generation PCIe protocol.
[0126] As an example, if the wireless network standard is 2.4G WiFi, then the PCIe 1.0 protocol is selected for data transmission with the wireless communication module. If the wireless network standard is 5G WiFi, then the PCIe 2.0 or PCIe 3.0 protocol is selected for data transmission with the wireless communication module.
[0127] In this embodiment, after the terminal device connects to the wireless network, the wireless communication module first detects the network standard of the wireless network accessed by the terminal device, and then feeds back the detection result to the processor. The processor then selects a data transmission interface protocol that matches the network standard and transmits data with the wireless communication module based on the detection result. This improves the flexibility of data transmission between the wireless communication module and the processor, ensuring that the data transmission interface protocol used for data transmission between the wireless communication module and the processor matches the network standard of the wireless network accessed by the terminal device. This allows the adopted data transmission interface protocol to meet the data transmission requirements of the accessed network standard; for example, it ensures that the adopted data transmission interface protocol can balance EMI performance and data transmission rate under wireless network conditions.
[0128] Next, combine Figure 6 The technical solution described herein uses a 2.4G WiFi network as the first WiFi network, a PCIe 1.0 protocol as the first PCIe protocol, a 5G WiFi network as the second WiFi network, and a PCIe 2.0 or PCIe 3.0 protocol as the second PCIe protocol to illustrate the data transmission method provided in this application embodiment.
[0129] Figure 7 This is a flowchart of another data transmission method provided in an embodiment of this application. The method is applied to a terminal device, which includes a wireless communication module and a processor, such as... Figure 1 As shown, the method includes the following steps:
[0130] Step 701: The wireless communication module detects that the terminal device has accessed the wireless network.
[0131] Step 702: The wireless communication module detects the network standard of the wireless network.
[0132] Step 703: The wireless communication module and the processor perform a handshake.
[0133] After detecting that a terminal device has accessed the wireless network, in order to send data received from the wireless network to the processor, or send data from the processor to the wireless network, the wireless communication module can handshake with the processor to establish a connection.
[0134] The handshake between the wireless communication module and the processor can be referred to the above. Figure 6 The relevant descriptions of step 601 in the embodiments will not be repeated here.
[0135] Step 704: During the handshake process with the processor, the wireless communication module sends the detection results to the processor.
[0136] In this embodiment, the wireless communication module can detect the network standard of the wireless network during the handshake process with the processor, and negotiate with the processor to select a data transmission interface protocol that matches the network standard to transmit data with the processor.
[0137] In this way, the wireless communication module can negotiate and select a suitable data transmission interface protocol with the processor before successfully establishing a connection with the processor. After the connection is successfully established, the selected data transmission interface protocol can be used directly for data transmission, which can improve data transmission efficiency.
[0138] For example, the wireless communication module can obtain the network standard information of the wireless network during the handshake process with the processor, and determine the network standard of the wireless network based on the network standard information.
[0139] In one possible implementation, the wireless communication module can use a wireless network packet capture program to capture data packets from the wireless network, parse the captured data packets, and obtain the network standard information of the wireless network from the captured data packets. Of course, other methods can also be used to obtain the network standard information of the wireless network, and this application embodiment does not limit this.
[0140] Step 705: The processor receives the detection result and determines whether the wireless network is a 2.4G WiFi network.
[0141] Step 706: If the wireless network standard is 2.4G WiFi, the processor and the wireless communication module negotiate to select the PCIe 1.0 protocol for data transmission.
[0142] Step 707: If the wireless network standard is not 2.4G WiFi, the processor determines whether the wireless network standard is 5G WiFi.
[0143] Step 708: If the wireless network standard is 5G WiFi, the processor and the wireless communication module negotiate to select either the PCIe 2.0 protocol or the PCIe 3.0 protocol for data transmission with the wireless communication module.
[0144] As an example, considering that the data transfer rate of the PCIe 3.0 protocol is greater than that of the PCIe 2.0 protocol, if the wireless network standard is a 5G WiFi network, then the PCIe 3.0 protocol can be selected for data transfer.
[0145] As another example, considering that the network standard of the wireless network is 5G WiFi, the intensity of the interference noise generated by data transmission using the PCIe 2.0 protocol is lower than that generated by data transmission using the PCIe 3.0 protocol. Therefore, if the network standard of the wireless network is 5G WiFi, the PCIe 2.0 protocol can be selected for data transmission.
[0146] As another example, in order to balance data transmission rate and EMI performance, if the wireless network standard is 5G WiFi, the PCIe 3.0 protocol can be selected for data transmission first. Then, the intensity of the interference noise generated by the PCIe 3.0 protocol for data transmission can be detected. If the intensity of the interference noise is greater than the intensity threshold, the PCIe 2.0 protocol can be selected for data transmission.
[0147] It should be understood that the processor can also first determine whether the wireless network standard is a 5G WiFi network. If so, it selects the PCIe 2.0 or PCIe 3.0 protocol to transmit data with the wireless communication module. If not, it then determines whether it is a 2.4G WiFi network. If so, it selects the PCIe 1.0 protocol to transmit data with the wireless communication module. This application embodiment does not limit the order of steps 705 and 707.
[0148] In this embodiment, after the terminal device connects to the wireless network, the wireless communication module first detects the network standard of the connected wireless network and feeds back the detection result to the processor. If the processor determines that the wireless network connected to the terminal device is a 2.4G WiFi network based on the detection result, it selects the PCIe 1.0 protocol for data transmission with the wireless communication module. This avoids the problem of data signal noise generated under the PCIe 2.0 and PCIe 3.0 protocols interfering with the 2.4G WiFi network, improves the throughput rate of the 2.4G WiFi network, and thus improves the user experience. If it determines that the wireless network connected to the terminal device is a 5G WiFi network, it selects the PCIe 2.0 or PCIe 3.0 protocol for data transmission with the wireless communication module. This ensures a high data transmission rate while minimizing the impact of data signal noise generated under the PCIe 2.0 or PCIe 3.0 protocols on the 5G WiFi network. This technical solution of selecting the matching PCIe protocol for data transmission based on the network standard can balance EMI performance and data transmission rate.
[0149] Figure 8 This is a flowchart of another data transmission method provided in an embodiment of this application. The method is applied in a terminal device, which includes a wireless communication module and a processor, such as... Figure 8 As shown, the method includes the following steps:
[0150] Step 801: The wireless communication module detects that the terminal device has accessed the wireless network.
[0151] It should be noted that the specific implementation of step 801 can refer to step 601 above, and will not be repeated here in the embodiments of this application.
[0152] Step 802: The wireless communication module detects the MCS negotiated between the terminal device and the access point of the wireless network.
[0153] As an example, the wireless communication module can detect the index value of the MCS negotiated between the terminal device and the access point of the wireless network, and determine the MCS negotiated between the terminal device and the access point of the wireless network based on the index value.
[0154] In one possible implementation, the wireless communication module can use a wireless network packet capture program to capture data packets from the wireless network, parse the captured data packets, and obtain the MCS index value negotiated between the terminal device and the access point of the wireless network from the captured data packets. Of course, other methods can also be used to obtain the MCS index value negotiated between the terminal device and the access point of the wireless network, and this application embodiment does not limit this.
[0155] It should be noted that the wireless communication module can be pre-configured to detect the MCS negotiated between the terminal device and the access point. This allows it to proactively detect the negotiated MCS after detecting that the terminal device has accessed the wireless network, and then feed the detection result back to the processor. Alternatively, the wireless communication module can also detect the negotiated MCS under the control of the processor; that is, the processor controls the wireless communication module to detect the negotiated MCS and then obtain the detection result from the wireless communication module.
[0156] Step 803: The wireless communication module sends the detection results to the processor.
[0157] The detection results include MCS information negotiated between the terminal device and the access point, such as the MCS index value.
[0158] In other words, after the wireless communication module detects the MCS negotiated between the terminal device and the access point, it can feed back the detected MCS to the processor.
[0159] As an example, the wireless communication module can send the detection results to the processor during the handshake process. In this way, the wireless communication module can detect the MCS negotiated between the terminal device and the access point before establishing a connection with the processor, and feed the detection results back to the processor during the connection establishment process. This allows the processor to directly use the data transmission interface protocol matching the MCS negotiated with the terminal device to transmit data with the wireless communication module after establishing a connection, thus improving data transmission efficiency.
[0160] It should be noted that the wireless communication module can handshake with the processor before step 803. For example, it can handshake with the processor after step 801 or step 802.
[0161] Step 804: The processor receives the detection result and, based on the detection result, selects a data transmission interface protocol that matches the MCS to transmit data with the wireless communication module.
[0162] The data transmission interface protocol matched with the MCS refers to a data transmission interface protocol that is compatible with the negotiated MCS and can meet the data transmission requirements under the negotiated MCS. For example, the data transmission interface protocol matched with the MCS can be a data transmission interface protocol that can take into account both EMI performance and data transmission rate under the accessed wireless network.
[0163] In addition, since the MCS range negotiated between the terminal device and the access point of the wireless network usually varies depending on the network standard of the wireless network being accessed, by selecting a data transmission interface protocol that matches the negotiated MCS and transmitting data with the wireless communication module, it is also possible to ensure that the selected data transmission interface protocol matches the network standard corresponding to the negotiated MCS, so that the adopted data transmission interface protocol can meet the data transmission requirements under the accessed network standard.
[0164] As an example, the processor can negotiate with the wireless communication module to select a data transmission interface protocol that matches the MCS for data transmission. For instance, a target negotiation mechanism can be pre-configured for the processor and the wireless communication module. This target negotiation mechanism is used to negotiate and select a data transmission interface protocol between the processor and the wireless communication module. After receiving the MCS negotiated between the terminal device and the access point from the wireless communication module, the processor can use this target negotiation mechanism to negotiate and select a data transmission interface protocol that matches the MCS for data transmission.
[0165] As an example, multiple MCS sets can be pre-configured. When the terminal device negotiates with the access point of the wireless network and the MCS is located in different MCS sets, the data transmission interface protocol matched with them will be different.
[0166] For example, multiple MCS sets include a first MCS set and a second MCS set, where the intersection of the first and second MCS sets is empty. If an MCS belongs to the first MCS set, the data transmission interface protocol matched with that MCS is the first data transmission interface protocol; if an MCS belongs to the second MCS set, the data transmission interface protocol matched with that MCS is the second data transmission interface protocol. The first and second data transmission interface protocols are different.
[0167] As an example, if the negotiated MCS belongs to the first MCS set, the processor selects the first data transmission interface protocol to transmit data with the wireless communication module. If the negotiated MCS belongs to the second MCS set, the processor selects the second data transmission interface protocol to transmit data with the wireless communication module.
[0168] As an example, the wireless communication module can obtain the index value of the MCS negotiated between the terminal device and the access point of the wireless network; if the index value belongs to the first MCS index value set, then the MCS belongs to the first MCS set; if the index value belongs to the second MCS index value set, then the MCS belongs to the second MCS set.
[0169] For example, the first MCS index value set is MCS0-MCS7, and the second MCS index value set is MCS8-MCS11. Of course, the first and second MCS index value sets can also be other index value sets, and this application embodiment does not limit this.
[0170] For example, the first data transmission interface protocol is PCIe 1.0, and the second data transmission interface protocol is PCIe 2.0 or PCIe 3.0. Of course, the first and second data transmission interface protocols can also be other PCIe protocols, and this application embodiment does not limit this.
[0171] In a 2.4G WiFi network, the terminal device and the access point of the connected wireless network can negotiate MCS indices from MCS0 to MCS7. In a 5G WiFi network, the terminal device and the access point of the connected wireless network can negotiate MCS indices from MCS0 to MCS11. Therefore, if the negotiated MCS index value is between MCS0 and MCS7, it indicates that the connected wireless network is either a 2.4G WiFi network or a 5G WiFi network. If the negotiated MCS index value is between MCS8 and MCS11, it indicates that the connected wireless network is a 5G WiFi network.
[0172] In this embodiment, after the terminal device accesses the wireless network, the wireless communication module can detect the MCS negotiated between the terminal device and the access point of the wireless network, and feed the detection result back to the processor. The processor then selects a data transmission interface protocol that matches the MCS based on the detection result and transmits data with the processor. Since the MCS negotiated between the terminal device and the access point of the wireless network is related to the network standard of the wireless network and can determine the network transmission rate to a certain extent, the processor, by detecting the MCS negotiated between the terminal device and the access point of the wireless network through the wireless communication module and then selecting a data transmission interface protocol that matches the negotiated MCS, can ensure that the selected data transmission interface protocol is compatible with the MCS and the corresponding network standard. This achieves a dynamic correlation between the network transmission rate, MCS, and data transmission interface protocol of the wireless network, improving the flexibility of data transmission between the wireless communication module and the processor, and balancing network transmission rate and EMI performance.
[0173] Next, combine Figure 8 The technical solution described herein uses MCS0 to MCS7 as the first MCS index value set, PCIe 1.0 as the first PCIe protocol, MCS8 to MCS11 as the second MCS index value set, and PCIe 2.0 or PCIe 3.0 as the second PCIe protocol to illustrate the data transmission method provided in the embodiments of this application.
[0174] Figure 9 This is a flowchart of another data transmission method provided in an embodiment of this application. The method is applied in a terminal device, which includes a wireless communication module and a processor, such as... Figure 9 As shown, the method includes the following steps:
[0175] Step 901: The wireless communication module detects that the terminal device has accessed the wireless network.
[0176] Step 902: The wireless communication module detects the index value of the MCS negotiated between the terminal device and the access point of the wireless network.
[0177] Step 903: The wireless communication module sends the detection results to the processor.
[0178] Step 904: Process the received detection result and determine whether the negotiated MCS index value belongs to MCS0 to MCS7.
[0179] In this embodiment, two sets of MCS index values can be pre-set, namely MCS0 to MCS7 and MCS8 to MCS11. Then, after detecting the index value of the MCS negotiated between the terminal device and the access point of the wireless network, it is determined whether the index value of the negotiated MCS is located in these two sets of MCS index values.
[0180] It should be noted that the embodiments of this application only illustrate the example of first determining whether the index value of the negotiated MCS belongs to MCS0 to MCS7, and if not, then determining whether the index value of the negotiated MCS belongs to MCS8 to MCS11. It should be understood that it is also possible to first determine whether the index value of the negotiated MCS belongs to MCS8 to MCS11, and if not, then determine whether the index value of the negotiated MCS belongs to MCS0 to MCS7. The embodiments of this application do not limit the order of steps 903 and 905.
[0181] Step 905: If the negotiated MCS index value belongs to MCS0 to MCS7, the processor and the wireless communication module negotiate to select the PCIe 1.0 protocol for data transmission with the wireless communication module.
[0182] In a 2.4G WiFi network, the terminal device and the access point of the connected wireless network can negotiate MCS indices from MCS0 to MCS7. In a 5G WiFi network, the terminal device and the access point of the connected wireless network can negotiate MCS indices from MCS0 to MCS11. Therefore, if the negotiated MCS index value is between MCS0 and MCS7, it indicates that the connected wireless network is either a 2.4G WiFi network or a 5G WiFi network.
[0183] By negotiating with the processor to select the PCIe 1.0 protocol for data transmission when the negotiated MCS index value belongs to MCS0 to MCS7, the problem of data signal noise interference from the PCIe 2.0 and PCIe 3.0 protocols can be avoided when the connected network is a 2.4G WiFi network. This improves the throughput rate of the 2.4G WiFi network and thus enhances the user experience.
[0184] Step 906: If the negotiated index value of the MCS does not belong to MCS0 to MCS7, the processor determines whether the negotiated index value of the MCS belongs to MCS8 to MCS11.
[0185] Step 907: If the negotiated MCS index value belongs to MCS8 to MCS11, the processor and the wireless communication module negotiate to select either PCIe 2.0 protocol or PCIe 3.0 for data transmission with the wireless communication module.
[0186] If the negotiated MCS index value belongs to MCS8 to MCS11, it indicates that the connected wireless network is a 5G WiFi network. By negotiating with the processor to select either the PCIe 2.0 protocol or PCIe 3.0 for data transmission when the negotiated MCS index value belongs to MCS8 to MCS11, a high data transmission rate can be guaranteed without significantly affecting the 5G WiFi network due to the data signal noise generated under the PCIe 2.0 or PCIe 3.0 protocols. Furthermore, when the network transmission rate is high under the 5G WiFi network, a PCIe protocol adapted to the higher network transmission rate can be used for data transmission with the processor.
[0187] Step 908: If the wireless communication module detects that the terminal device and the access point are renegotiating the MCS, it will jump to step 902 and feed back the index value of the renegotiated MCS to the processor so that the processor and the wireless communication module can negotiate and select a data transmission interface protocol that matches the renegotiated MCS for data transmission.
[0188] In other words, if the wireless network undergoes speed readjustment, the processor can detect the index value of the MCS renegotiated between the terminal device and the access point of the wireless network through the wireless communication module, and negotiate with the wireless communication module to select a data transmission interface protocol that matches the renegotiated MCS for data transmission.
[0189] In this embodiment, after the terminal device accesses the wireless network, the wireless communication module can detect the index value of the MCS negotiated between the terminal device and the access point of the wireless network, and send the detection result to the processor. If the negotiated MCS index value belongs to MCS0 to MCS7, the processor and the wireless communication module negotiate to select the PCIe 1.0 protocol for data transmission. In this way, when the accessed wireless network is a 2.4G WiFi network, the problem of data signal noise interference from the PCIe 2.0 and PCIe 3.0 protocols can be avoided, improving the throughput rate of the 2.4G WiFi network and thus improving the user experience. If the negotiated MCS index value belongs to MCS8 to MCS11, the processor and the wireless communication module negotiate to select either the PCIe 2.0 or PCIe 3.0 protocol for data transmission. In this way, not only can a high data transmission rate be guaranteed when the data signal noise generated by the PCIe 2.0 or PCIe 3.0 protocols has little impact on the 5G WiFi network, but also when the network transmission rate is high under the 5G WiFi network, a PCIe protocol adapted to the higher network transmission rate can be used for data transmission. In summary, when terminal devices communicate via wireless networks, the network transmission rate, MCS, and data transmission interface protocol of the wireless network can be dynamically correlated, taking into account both EMI performance and transmission rate.
[0190] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line, DSL) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer, or a data storage device such as a server or data center that integrates one or more available media. The available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., Digital Versatile Discs (DVDs)), or semiconductor media (e.g., Solid State Disks (SSDs)).
[0191] The above descriptions are optional embodiments provided by this application and are not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the technical scope disclosed in this application should be included within the protection scope of this application.
Claims
1. A data transmission method, characterized in that, Applied in a terminal device, the terminal device including a wireless communication module and a processor, the method includes: If the wireless communication module detects that the terminal device has accessed a wireless network, it then detects the network standard of the wireless network. Detecting the network standard includes: detecting the modulation and coding scheme (MCS) negotiated between the terminal device and the access point, where the access point is the access point of the wireless network accessed by the terminal device; if the index value of the MCS belongs to MCS0-MCS7, then the network standard of the wireless network is determined to be a 2.4G Wi-Fi network; if the index value of the MCS belongs to MCS8-MCS11, then the network standard of the wireless network is determined to be a 5G Wi-Fi network. The wireless communication module performs a handshake with the processor and sends the detection results to the processor during the handshake process. When the detection result is a 2.4G WiFi network, the processor transmits data with the wireless communication module based on the PCIe protocol, the first-generation peripheral component interconnect standard. When the detection result is a 5G WiFi network, the processor transmits data with the wireless communication module based on the third-generation PCIe protocol. During transmission, the processor detects the intensity of interference noise generated during data transmission with the wireless communication module based on the third-generation PCIe protocol. If the intensity of the interference noise is greater than an intensity threshold, the processor transmits data with the wireless communication module based on the second-generation PCIe protocol. If the intensity of the interference noise is less than or equal to the intensity threshold, the processor continues to transmit data with the wireless communication module based on the third-generation PCIe protocol. The interference noise refers to the interference noise generated by the data signal transmitted between the wireless communication module and the processor on the operating frequency band of the wireless network accessed by the terminal device.
2. The method as described in claim 1, characterized in that, The processor, in the case that the detection result is a 5G WiFi network, also includes: If the intensity of the interference noise generated by data transmission based on the second-generation PCIe protocol is lower than the intensity of the interference noise generated by data transmission based on the third-generation PCIe protocol, then data transmission is performed with the wireless communication module based on the second-generation PCIe protocol.
3. The method as described in claim 1 or 2, characterized in that, The detection of the MCS negotiated between the terminal device and the access point includes: If it is detected that the terminal device and the access point are negotiating the MCS for the first time or renegotiating the MCS, then the MCS negotiated by the terminal device and the access point is detected.
4. A terminal device, characterized in that, The terminal device includes a wireless communication module, a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the method as described in any one of claims 1 to 3.
5. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed on a computer, cause the computer to perform the method as described in any one of claims 1 to 3.