Data transmission methods, apparatus, devices, storage media and programs

By acquiring and adjusting the latency requirements of WiFi devices, and dynamically adjusting the operating frequency, processing core type, and kernel strategy of the WiFi chip, the problem of high latency in WiFi communication is solved, and low-latency data transmission is achieved.

CN115996370BActive Publication Date: 2026-04-03HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-20
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

Existing WiFi-based wireless network communication has high latency, which cannot meet the low latency requirements of various application scenarios.

Method used

By obtaining latency requirement information for the first connection through the first device, the operating frequency of the WiFi chip, the binding processing core type, and the optimization of DMA response latency and kernel processing strategy are dynamically adjusted to meet low latency requirements.

Benefits of technology

It reduces data transmission latency, meets low latency requirements, and improves data processing speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115996370B_ABST
    Figure CN115996370B_ABST
Patent Text Reader

Abstract

This application provides a data transmission method, apparatus, device, storage medium, and program. The method includes: a first device determining target data to be transmitted to a second device through a first connection, wherein the first connection is a connection between the first device and the second device; the first device acquiring first latency requirement information corresponding to the first connection, and transmitting the target data to the second device through the first connection according to the first latency requirement information. In this process, by transmitting the target data to the second device according to the first latency requirement information corresponding to the first connection, the first device can reduce the transmission latency of the target data and meet the low latency requirement.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to a data transmission method, apparatus, device, storage medium, and program. Background Technology

[0002] Data can be transmitted between different electronic devices using a wireless fidelity (WiFi) wireless network. For example, a first device and a second device can transmit data peer-to-peer (P2P) over a WiFi wireless network, and data can also be transmitted across access point (AP) devices.

[0003] In WiFi-based wireless network communication systems, communication latency is a crucial performance indicator. Low latency is a requirement in many application scenarios. Currently, WiFi-based wireless network communication has relatively high latency, failing to meet the low latency demands of various application scenarios. Summary of the Invention

[0004] This application provides a data transmission method, apparatus, device, storage medium, and program to improve communication latency.

[0005] Firstly, this application provides a data transmission method. Taking the transmission of data from a first device to a second device as an example, the execution subject of this method can be the first device, or a processor or processor chip in the first device. The following description uses the first device as the execution subject. The method includes: the first device determining target data to be transmitted to the second device through a first connection, where the first connection is a connection between the first device and the second device; the first device acquiring first latency requirement information corresponding to the first connection, and transmitting the target data to the second device through the first connection according to the first latency requirement information.

[0006] For example, the first device and the second device are connected to the same WiFi network. The first device and the second device can perform point-to-point data transmission based on the WiFi wireless network, and the first device and the second device can perform cross-AP data transmission based on the WiFi wireless network.

[0007] The first latency requirement information refers to information describing the latency requirements needed for data transmission through the first connection. Optionally, the first latency requirement information is related to the application corresponding to the first connection. Different applications have different first latency requirement information. The first latency requirement information for each application can be preset. In this way, the first device can determine the first latency requirement information based on the application corresponding to the first connection. Optionally, the first latency requirement information is related to the network status of the first connection. When the network status of the first connection is different, its corresponding first latency requirement information may also be different. That is to say, the first device can dynamically determine the first latency requirement information in real time based on the network status of the first connection.

[0008] In this application, the first device transmits target data to the second device according to the first latency requirement information corresponding to the first connection, which can reduce the transmission latency of the first device to the target data and meet the low latency requirement.

[0009] In one possible implementation, the first device transmits the target data to the second device through the first connection based on the first latency requirement information. This can be achieved as follows: the first device determines transmission parameters based on the first latency requirement information, and the transmission parameters include at least one of the following: the operating frequency of the communication chip of the first device, the type of processing core of the driver module corresponding to the communication chip, the direct memory access (DMA) response latency in the first device, and the processing strategy of the kernel of the first device; the first device transmits the target data to the second device through the first connection based on the transmission parameters.

[0010] In this device, the communication chip can be a WiFi chip. As the underlying hardware module for data transmission and reception, the operating frequency of the WiFi chip significantly affects its data processing rate. A higher operating frequency results in a higher data processing rate, while a lower operating frequency results in a lower data processing rate. Therefore, the operating frequency of the WiFi chip can be determined based on the first latency requirement information. For example, when the first connection has a low latency requirement, the operating frequency of the WiFi chip is set to a higher preset frequency. For instance, the preset frequency is higher than a reference frequency. The reference frequency can be an empirical value, or it can be an operating frequency determined based on the current transmission bandwidth. By setting the operating frequency of the WiFi chip to a higher frequency, the data processing speed of the WiFi chip can be improved, thereby reducing data transmission latency and meeting the low latency requirement.

[0011] "The driver module corresponding to the communication chip of the first device" can be a WiFi driver module. "The processing core of the driver module corresponding to the communication chip" can be the processing core to which a thread (e.g., a sending thread, a receiving thread, etc.) of the WiFi driver module is bound. The type of processing core can include: large cores, medium cores, and small cores. Large cores have better processing performance than medium cores, and medium cores have better processing performance than small cores. Therefore, when the first connection has low latency requirements, it is determined that the threads of the WiFi driver module be bound to the processing core with better processing performance, such as a medium or large core. By binding the threads in the WiFi driver module to medium or large cores, the data processing speed of the WiFi driver module can be improved, thereby reducing data transmission latency and meeting the low latency requirements.

[0012] When the first connection has low latency requirements, the DMA response latency can be set to a lower preset latency. The preset latency is less than the default value of the DMA response latency. This improves the response speed of the DMA controller. By performing data transfer processing according to a lower DMA response latency, the transfer response speed of the DMA controller can be improved, the time required for the data transfer process can be reduced, thereby reducing data transfer latency and meeting the low latency requirements.

[0013] The processing strategy of the first device's kernel refers to the processing strategy adopted by the first device's kernel during data transmission. The processing strategy can include a power-priority strategy (or power-priority strategy enabled) and a non-power-priority strategy (or power-priority strategy disabled). When the first connection has low latency requirements, a non-power-priority strategy can be used. By adopting a non-power-priority strategy, the data processing speed of the WiFi chip can be improved, thereby reducing data transmission latency and meeting low latency requirements.

[0014] In one possible implementation, the first latency requirement information indicates at least one of the following: the latency type corresponding to the first connection is a low latency type or a high latency type; the low latency level value of the first connection; at least one latency reduction strategy enabled by the first connection, wherein the at least one latency reduction strategy includes at least one of the following: a first latency reduction strategy, a second latency reduction strategy, a third latency reduction strategy, and a fourth latency reduction strategy.

[0015] The statement "The first latency requirement information is used to indicate whether the latency type corresponding to the first connection is high latency or low latency" can also be expressed as "The first latency requirement information is used to indicate whether the first connection has a low latency requirement." If the latency type corresponding to the first connection is high latency, then the first connection does not have a low latency requirement. If the latency type corresponding to the first connection is low latency, then the first connection has a low latency requirement. The low latency level value of the first connection indicates the degree of demand for low latency.

[0016] In this application, the four transmission strategies and the four transmission parameters described above correspond to each other. Specifically, "the operating frequency of the communication chip of the first device" is the transmission parameter corresponding to the first latency reduction strategy. "The type of processing core of the driver module of the communication chip" is the transmission parameter corresponding to the second latency reduction strategy. "The DMA response latency of the first device" is the transmission parameter corresponding to the third latency reduction strategy. "The processing strategy of the kernel of the first device" is the transmission parameter corresponding to the fourth latency reduction strategy.

[0017] In one possible implementation, the first latency requirement information indicates that the latency type corresponding to the first connection is a low latency type. In this case, the first device determines the transmission parameters based on the first latency requirement information, which can be achieved as follows: the first device performs at least one of the following parameter settings based on the first latency requirement information: setting the operating frequency of the communication chip of the first device to a preset frequency; setting the type of the processing core of the driver module of the communication chip to a preset type; setting the DMA response latency in the first device to a preset latency; and setting the processing strategy of the core of the first device to a non-power-priority strategy.

[0018] In other words, when the first connection has low latency requirements, data transmission can be performed according to one or more of the above-mentioned latency reduction strategies: the first, second, third, and fourth. This can reduce data transmission latency.

[0019] In one possible implementation, the first latency requirement information indicates that the latency type corresponding to the first connection is a low latency type, and the low latency level value of the first connection. Thus, the first device determines the transmission parameters based on the first latency requirement information, which can be achieved as follows: the first device performs at least one of the following parameter settings based on the first latency requirement information: setting the operating frequency of the communication chip of the first device to a preset frequency corresponding to the low latency level value; setting the type of the processing core of the driver module of the communication chip to a preset type corresponding to the low latency level value; setting the DMA response latency in the first device to a preset latency corresponding to the low latency level value; and setting the processing strategy of the core of the first device to a non-power-priority strategy.

[0020] In this implementation, when setting the transmission parameters of the first device, the parameters are dynamically set according to the low latency level of the first connection, so that the set transmission parameters can more accurately meet the low latency requirements of the first connection.

[0021] In one possible implementation, the first latency requirement information indicates at least one latency reduction strategy for enabling the first connection. Thus, the first device determines the transmission parameters based on the first latency requirement information, which can be implemented using one or more of the following methods:

[0022] If the latency reduction strategy for enabling the first connection includes the first latency reduction strategy, then the operating frequency of the communication chip of the first device is set to the preset frequency.

[0023] If the latency reduction strategy for enabling the first connection includes a second latency reduction strategy, then the type of the processing core of the driver module of the communication chip is set to a preset type.

[0024] If the latency reduction strategy for enabling the first connection includes a third latency reduction strategy, then the DMA response latency in the first device is set to a preset latency.

[0025] If the latency reduction strategy for enabling the first connection includes a fourth latency reduction strategy, then the kernel processing strategy of the first device will be set to a non-power-priority strategy.

[0026] In this implementation, the first device can select one or more of the above-mentioned first, second, third, and fourth latency reduction strategies as needed according to the low latency requirements of different scenarios, thereby achieving different levels of latency adjustment and ultimately achieving a balance between latency and power consumption.

[0027] In one possible implementation, the first latency requirement information indicates at least one latency reduction strategy enabled by the first connection, and the low latency level value of the first connection. Thus, the first device determines the transmission parameters based on the first latency requirement information, which can be implemented using one or more of the following methods:

[0028] If the latency reduction strategy for enabling the first connection includes the first latency reduction strategy, then the operating frequency of the communication chip of the first device is set to a preset frequency corresponding to the low latency level value.

[0029] If the latency reduction strategy for enabling the first connection includes a second latency reduction strategy, then the type of the processing core of the driver module of the communication chip is set to a preset type corresponding to the low latency level value.

[0030] If the latency reduction strategy for enabling the first connection includes a third latency reduction strategy, then the DMA response latency in the first device is set to a preset latency corresponding to the low latency level value.

[0031] If the latency reduction strategy for enabling the first connection includes a fourth latency reduction strategy, then the kernel processing strategy of the first device will be set to a non-power-priority strategy.

[0032] In this implementation, the first device can select one or more of the aforementioned first, second, third, and fourth latency reduction strategies as needed, based on the low latency requirements of different scenarios. This allows for different levels of latency adjustment, ultimately achieving a balance between latency and power consumption. Furthermore, when setting the transmission parameters for various latency reduction strategies, the parameters are dynamically set according to the low latency level of the first connection, ensuring that the set transmission parameters more accurately meet the low latency requirements of the first connection.

[0033] In one possible implementation, the first device transmits the target data to the second device through the first connection based on the first latency requirement information. This can be achieved as follows: the first device determines the target latency requirement information based on the first latency requirement information and the second latency requirement information corresponding to the second connection; the second connection is either a connection between the first device and the second device, or a connection between the first device and the third device; the first device transmits the target data to the second device through the first connection based on the target latency requirement information.

[0034] This implementation enables latency requirement conflict management between the first and second connections. When the first and second latency requirement information differ, the first device determines the target latency requirement information based on both. This target latency requirement information is the latency requirement information after conflict management. Thus, the first device transmits the target data to the second device through the first connection based on the target latency requirement information. If the first device also needs to transmit target data to other devices through the second connection, it also transmits the target data to those devices through the second connection based on the target latency requirement information. Therefore, the first device transmits data based on the same target latency requirement information for different connections, avoiding conflicts between different connections.

[0035] The following describes several implementation methods for latency conflict management.

[0036] In a first possible implementation, first latency requirement information is used to indicate whether a first connection has a low latency requirement, and second latency requirement information is used to indicate whether a second connection has a low latency requirement. If the first latency requirement information indicates that the first connection does not have a low latency requirement, and the second latency requirement information indicates that the second connection does not have a low latency requirement, then the target latency requirement information is determined to indicate that there is no low latency requirement. If the first latency requirement information indicates that the first connection has a low latency requirement, and / or the second latency requirement information indicates that the second connection has a low latency requirement, then the target latency requirement information is determined to indicate that there is a low latency requirement.

[0037] Optionally, the first device can implement low-latency conflict management by maintaining a counter. When a connection enables low-latency requirements, the counter value is incremented by 1; when a connection disables low-latency requirements, the counter value is decremented by 1. Thus, when the counter value is non-zero, it indicates that a connection with low-latency requirements exists, and in this case, the conflict management result is to enable low-latency requirements. When the counter value is zero, it indicates that no connection with low-latency requirements exists, and in this case, the conflict management result is to disable low-latency requirements.

[0038] In the second possible implementation, the first latency requirement information indicates that the first connection has a low latency requirement, and the corresponding low latency level value for the first connection. The second latency requirement information indicates that the second connection has a low latency requirement, and the corresponding low latency level value for the second connection. During conflict management, conflict management needs to be performed on the low latency level values ​​corresponding to each connection, which can be achieved by taking the extreme value. That is, the connection with the highest demand for low latency is determined as the low latency level value after latency conflict management.

[0039] In the third possible implementation, the first latency requirement information is used to indicate at least one latency reduction strategy enabled by the first connection, and the second latency requirement information is used to indicate at least one latency reduction strategy enabled by the second connection. Conflict management is performed on the first and second latency requirement information to obtain target latency requirement information, which indicates at least one latency reduction strategy that ultimately needs to be enabled. During conflict management, for a certain latency reduction strategy, if at least one connection enables it, the conflict management result of that latency reduction strategy is enabled; if all connections do not enable it, the conflict management result of that latency reduction strategy is disabled.

[0040] Optionally, the first device can maintain a separate counter for each latency reduction strategy to implement latency conflict management. Taking the first latency reduction strategy as an example, when a connection enables the first latency reduction strategy, the value of the counter corresponding to the first latency reduction strategy is incremented by 1; when a connection disables the first latency reduction strategy, the value of the counter corresponding to the first latency reduction strategy is decremented by 1. Thus, when the value of the counter corresponding to the first latency reduction strategy is non-zero, it indicates that there is a connection that enables the first latency reduction strategy; in this case, the conflict management result is to enable the first latency reduction strategy. When the value of the counter corresponding to the first latency reduction strategy is zero, it indicates that there is no connection that enables the first latency reduction strategy; in this case, the conflict management result is to disable the first latency reduction strategy.

[0041] In the fourth possible implementation, the first latency requirement information is used to indicate at least one latency reduction strategy enabled by the first connection, and the corresponding low latency level for the first connection. The second latency requirement information is used to indicate at least one latency reduction strategy enabled by the second connection, and the corresponding low latency level for the second connection. When performing conflict management, conflict management needs to be performed for the latency reduction strategies enabled by each connection, and also for the corresponding low latency levels for each connection. The conflict management method for the latency reduction strategies enabled by each connection is similar to that in the third possible implementation, and will not be elaborated here. The conflict management method for the low latency levels corresponding to each connection is similar to that in the second possible implementation, and will not be elaborated here.

[0042] Secondly, this application provides a data transmission method. Taking the transmission of data from a first device to a second device as an example, the execution subject of this method can be the second device, or a processor or processor chip in the second device. The method includes: the second device receiving target data from the first device through a first connection, wherein the first connection is a connection between the first device and the second device; the second device obtaining first latency requirement information corresponding to the first connection, and processing the target data according to the first latency requirement information.

[0043] In this application, the second device receives target data from the first device through the first connection. By processing the target data according to the first latency requirement information corresponding to the first connection, the latency of the second device in receiving and processing the target data can be reduced, thus meeting the low latency requirement.

[0044] In one possible implementation, the second device processes the target data according to the first latency requirement information, which can be achieved as follows: the second device determines transmission parameters according to the first latency requirement information, the transmission parameters including at least one of the following: the operating frequency of the communication chip of the second device, the type of processing core of the driver module corresponding to the communication chip, the direct memory access (DMA) response latency in the second device, and the processing strategy of the kernel of the second device; the second device processes the target data according to the transmission parameters.

[0045] In one possible implementation, the first latency requirement information indicates at least one of the following: the latency type corresponding to the first connection is a low latency type or a high latency type; the low latency level value of the first connection; at least one latency reduction strategy enabled by the first connection, wherein the at least one latency reduction strategy includes at least one of the following: a first latency reduction strategy, a second latency reduction strategy, a third latency reduction strategy, and a fourth latency reduction strategy.

[0046] In one possible implementation, the first latency requirement information indicates that the latency type corresponding to the first connection is a low latency type. Thus, the second device determines the transmission parameters based on the first latency requirement information, which can be achieved by the second device performing at least one of the following parameter settings based on the first latency requirement information:

[0047] Set the operating frequency of the communication chip of the second device to a preset frequency.

[0048] Set the type of the processing core of the driver module of the communication chip to a preset type;

[0049] Set the DMA response latency in the second device to a preset latency;

[0050] Set the kernel processing strategy of the second device to a non-power-priority strategy.

[0051] In one possible implementation, the first latency requirement information indicates that the latency type corresponding to the first connection is low latency, and the low latency level value of the first connection. Thus, the second device determines the transmission parameters based on the first latency requirement information, which can be achieved by the second device performing at least one of the following parameter settings based on the first latency requirement information:

[0052] Set the operating frequency of the communication chip of the second device to a preset frequency corresponding to the low latency level value;

[0053] Set the type of the processing core of the driver module of the communication chip to a preset type corresponding to the low latency level value;

[0054] The DMA response latency in the second device is set to a preset latency corresponding to the low latency level value;

[0055] The kernel processing strategy of the second device is set to a non-power-priority strategy.

[0056] In one possible implementation, the first latency requirement information indicates at least one latency reduction strategy for enabling the first connection; the second device determines transmission parameters based on the first latency requirement information, including at least one of the following:

[0057] If the latency reduction strategy for enabling the first connection includes the first latency reduction strategy, then the operating frequency of the communication chip of the second device is set to the preset frequency.

[0058] If the latency reduction strategy for enabling the first connection includes a second latency reduction strategy, then the type of the processing core of the driver module of the communication chip is set to a preset type.

[0059] If the latency reduction strategy for enabling the first connection includes a third latency reduction strategy, then the DMA response latency in the second device is set to a preset latency.

[0060] If the latency reduction strategy for enabling the first connection includes a fourth latency reduction strategy, then the kernel processing strategy of the second device will be set to a non-power-priority strategy.

[0061] In one possible implementation, the first latency requirement information indicates at least one latency reduction strategy for enabling the first connection, and a low latency level value for the first connection; the second device determines transmission parameters based on the first latency requirement information, including at least one of the following:

[0062] If the latency reduction strategy for enabling the first connection includes the first latency reduction strategy, then the operating frequency of the communication chip of the second device is set to a preset frequency corresponding to the low latency level value.

[0063] If the latency reduction strategy for enabling the first connection includes a second latency reduction strategy, then the type of the processing core of the driver module of the communication chip is set to a preset type corresponding to the low latency level value.

[0064] If the latency reduction strategy for enabling the first connection includes a third latency reduction strategy, then the DMA response latency in the second device is set to a preset latency corresponding to the low latency level value.

[0065] If the latency reduction strategy for enabling the first connection includes a fourth latency reduction strategy, then the kernel processing strategy of the second device will be set to a non-power-priority strategy.

[0066] In one possible implementation, the second device processes the target data based on the first latency requirement information, which can be achieved as follows: the second device determines the target latency requirement information based on the first latency requirement information and the second latency requirement information corresponding to the second connection; the second connection is a connection between the second device and the first device, or a connection between the second device and a third device; the second device processes the target data based on the target latency requirement information.

[0067] Thirdly, this application provides a data transmission apparatus, which can be in the form of software and / or hardware. For example, the data transmission apparatus can be a first device or a chip, module, or unit within the first device. The data transmission apparatus includes: a processing module and a transmitting module. Wherein,

[0068] The processing module is used to determine the target data to be transmitted to the second device through the first connection, wherein the first connection is the connection between the first device and the second device;

[0069] The processing module is also used to obtain the first latency requirement information corresponding to the first connection;

[0070] The sending module is used to transmit the target data to the second device through the first connection according to the first latency requirement information.

[0071] In one possible implementation, the sending module is specifically configured to: determine transmission parameters based on the first latency requirement information, the transmission parameters including at least one of the following: the operating frequency of the communication chip of the first device, the type of processing core of the driver module corresponding to the communication chip, the direct memory access (DMA) response latency in the first device, and the processing strategy of the kernel of the first device; and transmit the target data to the second device through the first connection based on the transmission parameters.

[0072] In one possible implementation, the first delay requirement information indicates at least one of the following:

[0073] The latency type corresponding to the first connection is either low latency or high latency;

[0074] The low latency setting value of the first connection;

[0075] The first connection enables at least one latency reduction strategy, which includes at least one of the following: a first latency reduction strategy, a second latency reduction strategy, a third latency reduction strategy, and a fourth latency reduction strategy.

[0076] In one possible implementation, the first latency requirement information indicates that the latency type corresponding to the first connection is a low latency type; the sending module is specifically used to perform at least one of the following parameter settings according to the first latency requirement information:

[0077] Set the operating frequency of the communication chip of the first device to a preset frequency.

[0078] Set the type of the processing core of the driver module of the communication chip to a preset type;

[0079] Set the DMA response latency in the first device to a preset latency;

[0080] Set the kernel processing strategy of the first device to a non-power-priority strategy.

[0081] In one possible implementation, the first latency requirement information indicates that the latency type corresponding to the first connection is a low latency type, and the low latency level value of the first connection; the sending module is specifically used to perform at least one of the following parameter settings according to the first latency requirement information:

[0082] Set the operating frequency of the communication chip of the first device to a preset frequency corresponding to the low latency level value;

[0083] Set the type of the processing core of the driver module of the communication chip to a preset type corresponding to the low latency level value;

[0084] In the first device, the DMA response latency is set to a preset latency corresponding to the low latency level value;

[0085] The kernel processing strategy of the first device is set to a non-power-priority strategy.

[0086] In one possible implementation, the first latency requirement information indicates at least one latency reduction strategy for enabling the first connection; the sending module is specifically configured to perform at least one of the following:

[0087] If the latency reduction strategy for enabling the first connection includes the first latency reduction strategy, then the operating frequency of the communication chip of the first device is set to the preset frequency.

[0088] If the latency reduction strategy for enabling the first connection includes a second latency reduction strategy, then the type of the processing core of the driver module of the communication chip is set to a preset type.

[0089] If the latency reduction strategy for enabling the first connection includes a third latency reduction strategy, then the DMA response latency in the first device is set to a preset latency.

[0090] If the latency reduction strategy for enabling the first connection includes a fourth latency reduction strategy, then the kernel processing strategy of the first device will be set to a non-power-priority strategy.

[0091] In one possible implementation, the first latency requirement information indicates at least one latency reduction strategy for enabling the first connection, and a low latency level value for the first connection; the sending module is specifically configured to perform at least one of the following:

[0092] If the latency reduction strategy for enabling the first connection includes the first latency reduction strategy, then the operating frequency of the communication chip of the first device is set to a preset frequency corresponding to the low latency level value.

[0093] If the latency reduction strategy for enabling the first connection includes a second latency reduction strategy, then the type of the processing core of the driver module of the communication chip is set to a preset type corresponding to the low latency level value.

[0094] If the latency reduction strategy for enabling the first connection includes a third latency reduction strategy, then the DMA response latency in the first device is set to a preset latency corresponding to the low latency level value.

[0095] If the latency reduction strategy for enabling the first connection includes a fourth latency reduction strategy, then the kernel processing strategy of the first device will be set to a non-power-priority strategy.

[0096] In one possible implementation, the sending module is specifically used to: determine target latency requirement information based on the first latency requirement information and the second latency requirement information corresponding to the second connection; the second connection is a connection between the first device and the second device, or a connection between the first device and the third device; and transmit the target data to the second device through the first connection based on the target latency requirement information.

[0097] Fourthly, this application provides a data transmission device, which can be in the form of software and / or hardware. For example, the data transmission device can be a first device or a chip, module, or unit within the first device. The data transmission device includes: a receiving module and a processing module. Wherein,

[0098] The receiving module is used to receive target data from a first device through a first connection, wherein the first connection is a connection between the first device and a second device;

[0099] The processing module is used to obtain the first latency requirement information corresponding to the first connection;

[0100] The processing module is also used to process the target data according to the first delay requirement information.

[0101] In this application, the second device receives target data from the first device through the first connection. By processing the target data according to the first latency requirement information corresponding to the first connection, the latency of the second device in receiving and processing the target data can be reduced, thus meeting the low latency requirement.

[0102] In one possible implementation, the processing module is specifically used to: determine transmission parameters based on the first latency requirement information, the transmission parameters including at least one of the following: the operating frequency of the communication chip of the second device, the type of processing core of the driver module corresponding to the communication chip, the direct memory access (DMA) response latency in the second device, and the processing strategy of the kernel of the second device; and process the target data based on the transmission parameters.

[0103] In one possible implementation, the first delay requirement information indicates at least one of the following:

[0104] The latency type corresponding to the first connection is either low latency or high latency;

[0105] The low latency setting value of the first connection;

[0106] The first connection enables at least one latency reduction strategy, which includes at least one of the following: a first latency reduction strategy, a second latency reduction strategy, a third latency reduction strategy, and a fourth latency reduction strategy.

[0107] In one possible implementation, the first latency requirement information indicates that the latency type corresponding to the first connection is a low latency type; the processing module is specifically used to perform at least one of the following parameter settings based on the first latency requirement information:

[0108] Set the operating frequency of the communication chip of the second device to a preset frequency.

[0109] Set the type of the processing core of the driver module of the communication chip to a preset type;

[0110] Set the DMA response latency in the second device to a preset latency;

[0111] Set the kernel processing strategy of the second device to a non-power-priority strategy.

[0112] In one possible implementation, the first latency requirement information indicates that the latency type corresponding to the first connection is low latency, and the low latency level value of the first connection; the processing module is specifically used to perform at least one of the following parameter settings based on the first latency requirement information:

[0113] Set the operating frequency of the communication chip of the second device to a preset frequency corresponding to the low latency level value;

[0114] Set the type of the processing core of the driver module of the communication chip to a preset type corresponding to the low latency level value;

[0115] The DMA response latency in the second device is set to a preset latency corresponding to the low latency level value;

[0116] The kernel processing strategy of the second device is set to a non-power-priority strategy.

[0117] In one possible implementation, the first latency requirement information indicates at least one latency reduction strategy for enabling the first connection; the processing module is specifically configured to execute at least one of the following:

[0118] If the latency reduction strategy for enabling the first connection includes the first latency reduction strategy, then the operating frequency of the communication chip of the second device is set to the preset frequency.

[0119] If the latency reduction strategy for enabling the first connection includes a second latency reduction strategy, then the type of the processing core of the driver module of the communication chip is set to a preset type.

[0120] If the latency reduction strategy for enabling the first connection includes a third latency reduction strategy, then the DMA response latency in the second device is set to a preset latency.

[0121] If the latency reduction strategy for enabling the first connection includes a fourth latency reduction strategy, then the kernel processing strategy of the second device will be set to a non-power-priority strategy.

[0122] In one possible implementation, the first latency requirement information indicates at least one latency reduction strategy for enabling the first connection, and a low latency level value for the first connection; the processing module is specifically configured to perform at least one of the following:

[0123] If the latency reduction strategy for enabling the first connection includes the first latency reduction strategy, then the operating frequency of the communication chip of the second device is set to a preset frequency corresponding to the low latency level value.

[0124] If the latency reduction strategy for enabling the first connection includes a second latency reduction strategy, then the type of the processing core of the driver module of the communication chip is set to a preset type corresponding to the low latency level value.

[0125] If the latency reduction strategy for enabling the first connection includes a third latency reduction strategy, then the DMA response latency in the second device is set to a preset latency corresponding to the low latency level value.

[0126] If the latency reduction strategy for enabling the first connection includes a fourth latency reduction strategy, then the kernel processing strategy of the second device will be set to a non-power-priority strategy.

[0127] In one possible implementation, the processing module is specifically used to: determine target latency requirement information based on the first latency requirement information and the second latency requirement information corresponding to the second connection; the second connection is a connection between the second device and the first device, or a connection between the second device and the third device; and process the target data based on the target latency requirement information.

[0128] Fifthly, this application provides an electronic device, including: a memory and a processor; the processor is configured to be coupled to the memory, read and execute instructions in the memory to implement the method described in the first aspect or any possible implementation of the first aspect.

[0129] In a sixth aspect, this application provides an electronic device, comprising: a memory and a processor; the processor is configured to be coupled to the memory, read and execute instructions in the memory to implement the method described in the second aspect or any possible implementation thereof.

[0130] In a seventh aspect, this application provides a computer-readable storage medium storing computer instructions that, when executed, implement the method described in the first aspect or any possible implementation thereof.

[0131] Eighthly, this application provides a computer-readable storage medium storing computer instructions that, when executed, implement the method described in the second aspect or any possible implementation thereof.

[0132] Ninthly, this application provides a computer program product, the computer program product comprising a computer program, which, when executed, implements the method described in the first aspect or any possible implementation of the first aspect.

[0133] In a tenth aspect, this application provides a computer program product comprising a computer program that, when executed, implements the method described in the second aspect or any possible implementation thereof.

[0134] The beneficial effects of the various possible implementations of the second to tenth aspects mentioned above can be found in the beneficial effects of the first aspect mentioned above, and will not be repeated here.

[0135] This application provides a data transmission method, apparatus, device, storage medium, and program. The method includes: a first device determining target data to be transmitted to a second device through a first connection, wherein the first connection is a connection between the first device and the second device; the first device acquiring first latency requirement information corresponding to the first connection; and transmitting the target data to the second device through the first connection according to the first latency requirement information. In this process, by transmitting the target data to the second device according to the first latency requirement information corresponding to the first connection, the first device can reduce the transmission latency of the target data and meet low latency requirements. Attached Figure Description

[0136] Figure 1A A schematic diagram of a communication system provided in an embodiment of this application;

[0137] Figure 1B A schematic diagram of another communication system provided in the embodiments of this application;

[0138] Figure 2A A schematic diagram of a set of user interfaces provided for embodiments of this application;

[0139] Figure 2B A schematic diagram of another set of user interfaces provided for embodiments of this application;

[0140] Figure 2C A schematic diagram of yet another set of user interfaces provided for embodiments of this application;

[0141] Figure 3 This is a schematic diagram of the system architecture of the electronic device involved in the embodiments of this application;

[0142] Figure 4 A schematic diagram illustrating the data transmission process provided in an embodiment of this application;

[0143] Figure 5 A schematic diagram of dot analysis provided for an embodiment of this application;

[0144] Figure 6 A schematic diagram illustrating a data transmission method provided in an embodiment of this application;

[0145] Figure 7AA schematic diagram of multiple connections provided in an embodiment of this application;

[0146] Figure 7B This is a schematic diagram of another multi-connection provided in an embodiment of this application;

[0147] Figure 8 A schematic diagram illustrating another data transmission method provided in an embodiment of this application;

[0148] Figure 9 A schematic diagram illustrating the multi-connection low-latency conflict management process provided in an embodiment of this application;

[0149] Figure 10 A schematic diagram illustrating a conflict management process provided in an embodiment of this application;

[0150] Figure 11 A schematic diagram illustrating yet another data transmission method provided in an embodiment of this application;

[0151] Figure 12 A schematic diagram illustrating another data transmission method provided in an embodiment of this application;

[0152] Figure 13 This is a schematic diagram of the structure of a data transmission device provided in an embodiment of this application;

[0153] Figure 14 This is a schematic diagram of another data transmission device provided in an embodiment of this application;

[0154] Figure 15 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0155] First, the terms and concepts used in this application will be explained.

[0156] A distributed file system (DFS) is a file system that manages physical storage resources that are not necessarily directly connected to the local node, but are connected to other nodes through a computer network. It is a complete, hierarchical file system formed by combining several different logical disk partitions or volume labels. DFS provides a logical tree-like file system structure for resources distributed anywhere on the network, making it easier for users to access shared files distributed across the network. A separate DFS shared folder serves as an access point relative to other shared folders on the network.

[0157] Kernel mode and user mode: User mode provides the space for applications to run, and the execution of applications relies on resources provided by the kernel. Kernel mode controls the computer's hardware resources, such as coordinating processor resources and allocating memory resources, and provides a stable environment for applications to run. In order for applications to access resources managed by the kernel (such as processor resources, memory resources, input / output (I / O) resources, the kernel must provide a set of common access interfaces, which are called system calls. System calls allow users to enter kernel mode from user mode.

[0158] Kernel mode and user mode correspond to two run levels in an operating system. When a task (process) executes a system call and enters kernel code, the process is said to be in kernel mode. At this time, the processor executes within the kernel code, which has the highest privilege level. When a process is in kernel mode, the executed kernel code uses the current process's kernel stack. Each process has its own kernel stack. When a process is executing its own user code, it is said to be in user mode. In this case, the processor runs within the user code, which has the lowest privilege level. When a user program is executed and suddenly interrupted by an interrupt handler, the user program can also be symbolically considered to be in kernel mode, because the interrupt handler uses the current process's kernel stack. This is somewhat similar to the state of a process in kernel mode.

[0159] Direct memory access (DMA): As the name suggests, it means accessing memory directly, bypassing the central processing unit (CPU). In computers, memory and peripherals are much slower than the CPU. Therefore, transferring data between memory locations (or between memory and devices) is very time-consuming for the CPU, causing it to be unable to process real-time events promptly. Therefore, a dedicated device for data transfer—the DMA controller—was proposed to assist the CPU in data movement. The DMA controller copies data from one address space to another. High-speed data transfer between memory locations (or between memory and devices) can be achieved using the DMA controller.

[0160] DMA (Distributed Memory Access) migration is initiated by the CPU, while the data transfer is executed by the DMA controller. During DMA transfer, the DMA controller directly manages the bus; therefore, there is a bus control transfer issue. That is, before the DMA transfer, the CPU must hand over bus control to the DMA controller, and after the DMA transfer is completed, the DMA controller should immediately hand bus control back to the CPU.

[0161] A complete DMA transfer process must go through four steps: DMA request, DMA response, DMA transfer, and DMA termination. Specifically: (1) In the DMA request step, the CPU sends a transfer request to the DMA controller, that is, the CPU tells the DMA controller to help move the data from the first memory space to the second memory space. (2) In the DMA response step, the DMA controller determines the priority and masks the DMA request, and submits a bus request to the bus arbitration logic. When the CPU finishes executing the current bus cycle, it can release bus control. At this time, the bus arbitration logic outputs a bus response, indicating that the DMA controller has responded, and the DMA controller begins DMA transfer. (3) In the DMA transfer step, after the DMA controller obtains bus control, the CPU immediately suspends or only performs internal operations. The DMA controller outputs read and write commands, and data is directly transferred between memory locations without the CPU's involvement. (4) In the DMA termination step, after the specified data transfer is completed, the DMA controller releases bus control. The CPU resumes using the bus and checks the correctness of this DMA transfer operation. Finally, the CPU continues to execute the original program with the results and status of this operation. Therefore, it can be seen that DMA transfer does not require direct CPU control of the transfer, nor does it involve saving and restoring the context like interrupt handling. By opening a direct data transfer path through the DMA controller, the efficiency of the CPU is greatly improved.

[0162] DMA Response Latency: During the DMA transfer process described above, there is a certain delay between the DMA controller receiving the transfer request initiated by the CPU and the DMA controller responding to the transfer request. In this embodiment, this delay is referred to as DMA response latency. In related implementations, the DMA response latency is controlled by a DMA response timer, the duration of which is a preset default duration T1. After the DMA controller receives a transfer request, it starts the DMA response timer, the duration of which is T1. During the execution of the DMA response timer, the DMA controller may receive other transfer requests. When the DMA response timer expires, the DMA controller begins to respond to these transfer requests.

[0163] For ease of understanding, the communication system and application scenarios involved in this application are described below.

[0164] Currently, different electronic devices can transmit data based on wireless fidelity (WiFi) wireless networks.

[0165] For example, Figure 1A This is a schematic diagram of a communication system provided in an embodiment of this application. Figure 1AAs shown, the communication system includes a first device 10 and a second device 20. Both devices are connected to the same WiFi network. The first device 10 and the second device 20 can directly transmit data peer-to-peer (P2P) data via the WiFi wireless network. For example, the first device 10 can directly send data to the second device 20 via the WiFi network. In this scenario, the communication mode between the first device 10 and the second device 20 can be referred to as P2P communication mode.

[0166] For example, Figure 1B This is a schematic diagram of another communication system provided in an embodiment of this application. For example... Figure 1B As shown, the communication system includes a first device 10, a second device 20, and a relay device 30. The first device 10, the second device 20, and the relay device 30 are all connected to the same WiFi network. Data transmission between the first device 10 and the second device 20 can also be performed via the WiFi network. Figure 1A The difference in the communication system shown is that data transmission between the first device 10 and the second device 20 requires forwarding through a relay device 30. For example, the first device 10 sends the data to be sent to the relay device 30 via a WiFi network, and the relay device 30 forwards the received data to the second device 20. The relay device 30 can be various access point (AP) devices, such as routers or switches. In this scenario, the communication mode between the first device 10 and the second device 20 can be called cross-AP communication mode.

[0167] The above Figure 1A and Figure 1B The communication system shown is based on WiFi wireless network for data transmission, featuring high transmission speed and no data bandwidth consumption, and can be applied to various application scenarios. Several possible application scenarios are illustrated below.

[0168] For example, in one possible application scenario, the first device can share data such as images, audio, video, files, and applications with the second device. Taking images as an example... Figure 2A This is a schematic diagram of a set of user interfaces provided for embodiments of this application. For example... Figure 2AAs shown, after the user selects the image to be shared on interface 201 of device A and clicks the "Share" button, device A redirects to interface 202. On interface 202, after the user clicks on the target device (device B) to which the image is to be shared, device A displays interface 203, which shows the message "Waiting to receive". At this point, as shown on interface 205, device B displays the message "Device A wants to share 3 images with you, do you want to receive?". When the user clicks the "Receive" button, device A begins transmitting data to device B. Once the data transmission is complete, device B displays the message "Received successfully", as shown on interface 206. Meanwhile, device A displays the message "Sent successfully", as shown on interface 204.

[0169] For example, in another possible application scenario, the first device can project its display interface onto the screen of a second device. For instance, the first device could be a mobile phone, tablet, etc., and the second device could be a smart screen, television, etc. Figure 2B This is a schematic diagram of another set of user interfaces provided for embodiments of this application. (See diagram below.) Figure 2B As shown, the phone's display is projected onto the smart screen. During the projection process, the phone sends the interface data to be projected to the smart screen, which then displays the received data.

[0170] In another possible application scenario, for example, the first and second devices employ a distributed file system. The first device can search, browse, download, or share files on the second device. Taking the distributed gallery function as an example, assuming device A and device B support the distributed gallery function, after device A and device B log in to the same account, device A and device B can share the gallery.

[0171] For example, Figure 2C This is a schematic diagram of another set of user interfaces provided for embodiments of this application. Figure 2C The example illustrates three possible user interfaces for device A. See also Figure 2C As shown in interface 207, users can browse images stored on their local machine (i.e., device A) via device A. See also... Figure 2C As shown in interface 208, users can also browse photos stored on device B through device A. In this scenario, when the user swipes to browse on the screen of device A, device A sends an image retrieval request to device B based on the user's browsing action, requesting the image to be displayed. After receiving the image retrieval request, device B sends the image to be displayed to device A. See also... Figure 2CAs shown in interface 209, users can also search for images stored on device B through device A. For example, if a user enters the search keyword "food" in the image search interface, device A can display images found on its own device (i.e., device A) as well as images found on device B in the search results.

[0172] It should be noted that the above Figure 2A , Figure 2B and Figure 2C These examples illustrate several possible application scenarios and do not limit the application scenarios of the embodiments in this application. In practical applications, many other application scenarios may exist, such as a scenario where a first device controls a second device. Taking a mobile phone controlling a vehicle's infotainment system as an example, the mobile phone sends control commands to the vehicle's infotainment system, the vehicle's system executes the corresponding actions according to the control commands, and returns the execution results to the mobile phone. Another example is a mobile phone cloning scenario, that is, migrating data from an old mobile phone to a new mobile phone, and so on.

[0173] In WiFi-based wireless network communication systems, communication latency is a crucial performance indicator. In this embodiment, communication latency can be represented by round-trip time (RTT). RTT refers to the total time elapsed from the moment the sender begins transmitting data until the sender receives an acknowledgment from the receiver (the receiver sends the acknowledgment immediately upon receiving the data).

[0174] The aforementioned application scenarios based on WiFi communication, such as data sharing, screen mirroring, distributed image libraries, and cross-device control, all have high requirements for communication latency. However, current communication latency is too high to meet the needs of these application scenarios.

[0175] For example, in Figure 2A In the data sharing scenario shown, the high communication latency between device A and device B results in a long data transmission time, impacting user experience. Figure 2B In the screen mirroring scenario shown, high communication latency causes stuttering in the mirrored image displayed on the smart screen. Figure 2C In the distributed image library scenario shown, when a user browses images stored on device B via device A, the high communication latency between device A and device B results in slow cross-device data requests and transmissions. This may cause large white patches to appear on device A's screen when the user performs a swipe, negatively impacting the user experience. Similarly, in the cross-device control scenario, when a user uses device A to control device B, the high communication latency between device A and device B leads to slow response times, further affecting the user experience.

[0176] In addition, in a distributed file system, communication latency is related to the random read rate of the distributed file system and the rate of file processing across devices (such as creating files, deleting files, searching for files, etc.).

[0177] For example, taking a distributed file system as an example, as shown in Table 1, when communicating in P2P mode, the communication latency of the distributed file system is approximately 10ms. Based on this latency, the random read rate of the distributed file system is approximately 5.4Mbps. The time required to create 10,000 files across devices is approximately 145s, and the time required to delete 10,000 files across devices is approximately 124s. When communicating in cross-AP mode, the communication latency of the distributed file system is approximately 18ms. Based on this latency, the random read rate of the distributed file system is approximately 3.2Mbps. The time required to create 10,000 files across devices is approximately 207s, and the time required to delete 10,000 files across devices is approximately 203s.

[0178] Table 1

[0179] P2P mode Cross-AP mode Communication delay 10ms 18ms Random read rate 5.4Mbps 3.2Mbps Create 10,000 files across devices 145s 207s Delete 10,000 files across devices 124s 203s

[0180] When the communication latency of a distributed file system is high, it will also result in a lower random read rate and a lower cross-device file processing rate.

[0181] In summary, reducing communication latency is a pressing technical problem that needs to be solved in WiFi-based communication systems.

[0182] This application provides a data transmission method to reduce end-to-end communication transmission latency and meet low-latency transmission requirements.

[0183] In this embodiment, the entity executing the data transmission method can be an electronic device or a device within the electronic device. For example, the electronic device can be a mobile phone, tablet computer, laptop computer, smart screen, smart wearable device, smart vehicle device, smart home device, smart speaker, etc., and the device within the electronic device can be a processor, chip system, circuit, or module, etc., without limitation in this application.

[0184] Figure 3 This is a schematic diagram of the system architecture of the electronic device involved in the embodiments of this application. Figure 3 As shown, an electronic device may include a hardware resource layer, a driver layer running on top of the hardware resource layer, a kernel mode running on top of the driver layer, and a user mode running on top of the kernel mode.

[0185] See Figure 3 The hardware resource layer can include hardware such as processors, memory, and WiFi chips.

[0186] The processor may include one or more processing units, such as an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, a display processing unit (DPU), and / or a neural network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors. In some embodiments, the electronic device may also include one or more processors. The controller may be the nerve center and command center of the electronic device. The controller can generate operation control signals based on instruction opcodes and timing signals to control instruction fetching and execution. The processor may also include memory for storing instructions and data. In some embodiments, the memory in the processor is a cache memory. This memory can store instructions or data that the processor has just used or that is used repeatedly. If the processor needs to reuse the instruction or data, it can directly retrieve it from the memory. This avoids repeated access, reduces processor waiting time, and thus improves the efficiency of the electronic device.

[0187] The memory may include external memory and / or internal memory.

[0188] External storage can be external memory cards, such as Micro SD cards, to expand the storage capacity of electronic devices. External memory cards communicate with the processor through an external storage interface to perform data storage functions. For example, data files such as music, photos, and videos can be stored on an external memory card.

[0189] Internal memory can be used to store one or more computer programs, which include instructions. The processor can execute these instructions stored in the internal memory, thereby enabling the electronic device to perform various functional applications and data processing. Internal memory may include a program storage area and a data storage area. The program storage area may store the operating system; it may also store one or more application programs (such as a gallery, contacts, etc.). The data storage area may store data created during the use of the electronic device (such as photos, contacts, etc.). Furthermore, internal memory may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory, universal flash storage (UFS), etc. In some embodiments, the processor can execute instructions stored in the internal memory and / or instructions stored in memory located within the processor to enable the electronic device to perform various functional applications and data processing.

[0190] In some examples, the processor and memory can be independent of each other. In other examples, the processor and memory can be integrated into a single chip system.

[0191] WiFi chips are used to implement WiFi communication functions in electronic devices. In this embodiment, the WiFi chip can be a hardware module integrated into a processor / processor chip, or it can be a separate chip independent of the processor / processor chip.

[0192] See also Figure 3 The driver layer provides hardware resource operation interfaces for upper-layer programs, allowing them to operate without needing to understand the internal implementation of the hardware resources and simply call the interfaces. Kernel mode can include the data link layer, IP layer, and TCP layer. The data link layer, IP layer, and TCP layer are used to implement the encapsulation and parsing functions of communication protocols.

[0193] Depending on the operating system running on the electronic device, the kernel mode of the electronic device can correspond to the kernel of different operating systems. For example, if the electronic device runs Linux, its kernel mode is the Linux kernel. If the electronic device runs Android, its kernel mode is the Android kernel. If the electronic device runs iOS, its kernel mode is the iOS kernel. If the electronic device runs Windows, its kernel mode is the Windows kernel.

[0194] See also Figure 3User space includes the application layer, such as browsers, address books, word processing software, instant messaging software, photo galleries, sharing tools, screen mirroring tools, and other applications.

[0195] The following is combined Figure 4 This describes the data transmission process between electronic devices.

[0196] Figure 4 This is a schematic diagram of the data transmission process provided in an embodiment of this application. Figure 4 The following example illustrates the transmission of target data from the first device to the second device.

[0197] like Figure 4 As shown, the memory is divided into user-mode storage space and kernel-mode storage space. User-mode storage space is used to store data involved in application execution in user mode. Kernel-mode storage space is used to store data involved in application execution in kernel mode.

[0198] The kernel state of the first device includes a kernel scheduling module and a sending module. The kernel state of the second device includes a kernel scheduling module and a receiving module.

[0199] When data is transmitted between the first device and the second device, the process involves user mode, kernel mode, WiFi driver module, and WiFi chip from the upper layer to the lower layer. The process of the first device sending target data and the process of the second device receiving target data are described below.

[0200] The process of the first device sending target data to the second device is as follows:

[0201] (1) The user mode sends a first indication information to the kernel mode, the first indication information being used to indicate the target data to be sent to the second device.

[0202] For example, the first indication information includes the storage location of the target data in the user-mode storage space.

[0203] (2) The kernel scheduling module in kernel mode sends a transfer request to the DMA controller according to the first instruction information.

[0204] (3) The DMA controller moves the target data from the user space to the kernel space according to the move request.

[0205] (4) The sending module in kernel mode obtains the target data from the kernel storage space and sends the target data to the WiFi driver module.

[0206] (5) The WiFi driver module sends target data to the WiFi chip.

[0207] (6) After receiving the target data, the WiFi chip sends the target data to the second device.

[0208] The process by which the second device receives the target data is as follows:

[0209] (1) The WiFi chip receives target data from the first device.

[0210] (2) The WiFi chip sends target data to the WiFi driver module.

[0211] (3) The WiFi driver module sends the target data to the receiving module in kernel mode.

[0212] (4) The receiving module in kernel mode receives the target data and stores the target data in the kernel mode storage space.

[0213] (5) The kernel scheduling module in kernel mode sends a transfer request to the DMA controller.

[0214] (6) The DMA controller moves the target data from the kernel-mode storage space to the user-mode storage space according to the move request.

[0215] (7) The user mode retrieves the target data from the user mode storage space and performs display processing or other processing on the target data.

[0216] In order to solve the problem of high latency in WiFi communication, the inventors analyzed the latency distribution in the above data transmission process. Figure 5 This is a schematic diagram of dot analysis provided in an embodiment of this application. For example... Figure 5 As shown, the interfaces in user space, kernel space, and WiFi chip were marked, and the latency was statistically analyzed. It was found that the latency consumption is mainly distributed in the kernel scheduling module, WiFi driver module, and WiFi chip, while the latency in the upper-layer user space application is relatively low.

[0217] For example, consider a scenario where the first device randomly reads 4KB of data from the second device. The data transmission process can be divided into the following stages:

[0218] A. The file system of the first device reads the 4KB of data to be sent from the disk into memory.

[0219] B. The application process of the first device processes 4KB of data.

[0220] C. The first device transfers 4KB of data to the second device (i.e., from the memory of the first device to the memory of the second device).

[0221] D. The application process of the second device processes the received 4KB of data.

[0222] E. The file system of the second device writes 4KB of data from memory to disk.

[0223] The latency consumption of each stage is shown in Table 2.

[0224] Table 2

[0225]

[0226] As shown in Table 2, in the scenario where the first device randomly reads 4KB of data from the second device, the total latency is 4805μs, with the main latency consumption occurring during the transmission phase (accounting for 93.9%).

[0227] Therefore, in the embodiments of this application, combined with Figure 4 The data transmission process shown provides various latency reduction strategies to reduce end-to-end communication latency. These strategies are described below.

[0228] The first latency reduction strategy:

[0229] As the underlying hardware module for data transmission and reception, the operating frequency of a WiFi chip significantly affects its data processing rate. A higher operating frequency results in a higher data processing rate, while a lower operating frequency leads to a lower data processing rate.

[0230] Typically, during data transmission, WiFi chips employ a frequency adjustment strategy based on transmission bandwidth. Specifically, the operating frequency of the WiFi chip is automatically adjusted according to the current transmission bandwidth. When the transmission bandwidth is large, the operating frequency of the WiFi chip is adjusted to a higher level; when the transmission bandwidth is small, the operating frequency of the WiFi chip is adjusted to a lower level.

[0231] In real-world applications, when data transmission requires low latency, the corresponding transmission bandwidth is usually small. Therefore, according to the frequency adjustment strategy based on transmission bandwidth mentioned above, WiFi chips are usually made to operate at a lower operating frequency.

[0232] In this embodiment, when data transmission requires low latency, the frequency adjustment strategy based on transmission bandwidth is no longer used. Instead, the operating frequency of the WiFi chip is set to a higher frequency. For example, when it is determined that data transmission requires low latency, the operating frequency of the WiFi chip can be set to a preset frequency, which is greater than a reference frequency. The reference frequency can be an empirical value, or it can be the operating frequency corresponding to the current transmission bandwidth in the frequency adjustment strategy based on transmission bandwidth.

[0233] By setting the operating frequency of the WiFi chip to a higher frequency, the data processing speed of the WiFi chip can be improved, thereby reducing end-to-end data transmission latency and meeting the low latency requirement.

[0234] Optionally, when low latency is required for data transmission, the operating frequency of the WiFi chip can be dynamically adjusted based on the specific low latency level. The low latency level indicates the degree of low latency requirement. Different low latency levels correspond to different operating frequencies of the WiFi chip. For example, a predefined correspondence, as shown in Table 3, can be defined, specifying the operating frequencies corresponding to different low latency levels. This allows the target operating frequency of the WiFi chip to be determined and adjusted by querying this correspondence based on the low latency level.

[0235] Table 3

[0236] Low latency level Operating frequency Gear 1 Operating frequency 1 Gear 2 Operating frequency 2 Gear 3 Operating frequency 3 Gear 4 Operating frequency 4 … …

[0237] By dynamically determining the operating frequency of the WiFi chip based on the low latency level, the data processing speed of the WiFi chip can meet the low latency requirements of different levels.

[0238] The second latency reduction strategy:

[0239] Combination Figure 4 The data transmission process shown includes at least one thread in the WiFi driver module of the electronic device, such as a sending thread and a receiving thread. The sending thread is used to send target data to the WiFi chip. The receiving thread is used to receive target data from the WiFi chip. In this embodiment, when the data processing speed of the WiFi chip is improved, the data processing speed of the sending / receiving threads in the WiFi driver module can also be increased to match the data processing speed of the WiFi chip.

[0240] Typically, when electronic devices use multi-core CPUs, thread binding is required. Core binding refers to establishing a binding relationship between a thread and a CPU core, allowing the thread to run on its bound core. When an electronic device's CPU includes multiple cores, these cores can be a combination of different types. In this embodiment, the core types can include: large cores, small cores, and medium cores. Large cores have better processing performance than medium cores, and medium cores have better processing performance than small cores. For example, a certain model of mobile phone CPU may include: 1 large core, 3 medium cores, and 4 small cores.

[0241] In related technologies, when binding the transmit / receive threads in a WiFi driver module to cores, a core binding strategy based on throughput and PPS thresholds is used by default. Specifically, the core to which the transmit / receive threads in the WiFi driver module are bound is determined based on the throughput and PPS thresholds. For example, when the throughput and PPS thresholds are high, the transmit / receive threads in the WiFi driver module are bound to the medium core; when the throughput and PPS thresholds are low, the transmit / receive threads in the WiFi driver module are bound to the small core.

[0242] In real-world applications, when data transmission requires low latency, the corresponding throughput and PPS thresholds are usually low. Therefore, according to the core binding strategy based on throughput and PPS thresholds, the sending / receiving threads in the WiFi driver module will be bound to the small core.

[0243] In this embodiment, when data transmission requires low latency, the core-binding strategy based on throughput and PPS threshold is no longer used. Instead, the sending / receiving threads in the WiFi driver module are bound to cores with higher processing performance. Optionally, the sending / receiving threads in the WiFi driver module can be bound to medium or large cores.

[0244] By binding the sending / receiving threads in the WiFi driver module to the medium or large core, the data processing speed of the WiFi driver module can be improved, thereby reducing end-to-end data transmission latency and meeting low latency requirements.

[0245] The third latency reduction strategy:

[0246] Combination Figure 4 The data transfer process shown involves the kernel scheduling module of the first device moving the target data from the user-mode storage space to the kernel-mode storage space via the DMA controller, and the kernel scheduling module of the second device moving the target data from the kernel-mode storage space to the user-mode storage space via the DMA controller.

[0247] In related technologies, when the DMA controller responds to a data transfer request from the kernel scheduling module, it performs data transfer processing according to the default DMA response latency. In this embodiment, when data transmission has low latency requirements, data transfer processing can be performed according to a first DMA response latency, which is less than the aforementioned default DMA response latency. This can improve the response speed of the DMA controller. For example, the duration of the DMA response timer can be reduced.

[0248] By performing data transfer processing with lower DMA response latency, the transfer response speed of the DMA controller can be improved, the time required for the data transfer process can be reduced, thereby reducing end-to-end data transfer latency and meeting low latency requirements.

[0249] Optionally, when data transmission requires low latency, the DMA response latency can be dynamically adjusted based on the low latency level value. The low latency level value indicates the degree of low latency requirement. Different low latency levels correspond to different DMA response latencies. When the low latency level value indicates a higher degree of low latency requirement, the corresponding DMA response latency is lower; conversely, when the low latency level value indicates a lower degree of low latency requirement, the corresponding DMA response latency is higher. For example, a predefined correspondence, as shown in Table 4, can be defined, representing the DMA response latency corresponding to different low latency levels. This allows for querying the correspondence based on the low latency level value to determine and adjust the DMA response latency.

[0250] Table 4

[0251] Low latency level DMA response latency Gear 1 DMA response latency 1 Gear 2 DMA response latency 2 Gear 3 DMA response latency 3 Gear 4 DMA response latency 4 … …

[0252] By dynamically adjusting the DMA response latency based on the low latency level, the DMA transfer speed can meet the low latency requirements of different levels.

[0253] The fourth latency reduction strategy:

[0254] Combination Figure 4 In the data transmission process shown, the kernel scheduling module is also responsible for the power consumption management of the WiFi chip. In related technologies, the kernel scheduling module implements the data packet processing logic according to a power-priority strategy. For example, in scenarios involving the transmission of small data packets, a certain delay can be set between different processing stages. This avoids processing each data packet in real time; instead, multiple data packets are accumulated and processed uniformly, thereby reducing power consumption.

[0255] In this embodiment of the application, when data transmission has a low latency requirement, the kernel scheduling module disables the power-priority strategy, that is, it no longer implements the data packet processing logic according to the power-priority strategy.

[0256] By disabling the power-priority strategy, the data processing speed of the WiFi chip can be improved, thereby reducing end-to-end data transmission latency and meeting low-latency requirements.

[0257] It should be noted that electronic devices can choose to use one or more of the above four latency reduction strategies during data transmission, and this application embodiment does not limit this. It is understood that using each of these latency reduction strategies can reduce data transmission latency to a certain extent. When multiple methods are used in combination, the latency reduction effect can be improved.

[0258] Figure 6 This is a schematic diagram illustrating a data transmission method provided in an embodiment of this application. The method in this embodiment can be executed by a first device. Figure 6 As shown, the method in this embodiment includes:

[0259] S601: The first device determines the target data to be transmitted to the second device through the first connection, wherein the first connection is the connection between the first device and the second device.

[0260] The method of this embodiment is executed when the first device needs to send target data to the second device through the first connection. Before executing this embodiment, the target data to be sent may be located in user-space storage space.

[0261] S602: The first device obtains the first latency requirement information corresponding to the first connection.

[0262] Among them, the first latency requirement information refers to the relevant information used to describe the latency requirements required for the first connection to transmit data.

[0263] Optionally, the first latency requirement information is related to the application corresponding to the first connection. Different applications have different first latency requirement information. The first latency requirement information for each application can be preset. In this way, the first device can determine the first latency requirement information based on the application corresponding to the first connection.

[0264] Optionally, the first latency requirement information is related to the network status of the first connection. When the network status of the first connection is different, the corresponding first latency requirement information may also be different. That is to say, the first device can dynamically determine the first latency requirement information in real time based on the network status of the first connection.

[0265] The method in this embodiment can be executed by the kernel mode of the first device. For example, when the first device needs to send target data to the second device via the first connection, the user mode of the first device generates first indication information based on the target data to be sent. The first indication information indicates the storage location of the target data in the user mode storage space. The user mode then transmits the first indication information to the kernel mode. Furthermore, the user mode determines the first latency requirement information corresponding to the first connection and transmits the first latency requirement information to the kernel mode. Thus, the kernel mode obtains the first indication information and the first latency requirement information corresponding to the first connection.

[0266] S603: The first device transmits the target data to the second device through the first connection based on the first latency requirement information.

[0267] In this embodiment, the process of the first device transmitting target data to the second device includes: the kernel scheduling module in kernel mode sending a transfer request to the DMA controller; the DMA controller transferring the target data from the user-mode storage space to the kernel-mode storage space according to the transfer request; the sending module in kernel mode obtaining the target data from the kernel storage space and sending the target data to the WiFi driver module; the WiFi driver module sending the target data to the WiFi chip; and the WiFi chip sending the target data to the second device after receiving the target data.

[0268] Optionally, the first device determines transmission parameters based on the first latency requirement information. The transmission parameters include at least one of the following: the operating frequency of the WiFi chip of the first device, the type of processing core of the WiFi driver module in the first device, the DMA response latency of the first device, and the processing strategy of the kernel of the first device.

[0269] Each of the above transmission parameters corresponds to a latency reduction strategy. Specifically, "the operating frequency of the WiFi chip in the first device" is the transmission parameter corresponding to the first latency reduction strategy. "the type of processing core of the WiFi driver module in the first device" is the transmission parameter corresponding to the second latency reduction strategy. "the DMA response latency of the first device" is the transmission parameter corresponding to the third latency reduction strategy. "the processing strategy of the kernel of the first device" is the transmission parameter corresponding to the fourth latency reduction strategy.

[0270] Then, the first device transmits the target data to the second device through the first connection according to the transmission parameters.

[0271] The following describes several possible implementation methods.

[0272] In the first possible implementation, the first latency requirement information is used to indicate whether the first connection has a low latency requirement.

[0273] In this embodiment of the application, another way to express "the first latency requirement information is used to indicate whether the first connection has a low latency requirement" is "the first latency requirement information is used to indicate whether the latency type corresponding to the first connection is a high latency type or a low latency type." When the latency type corresponding to the first connection is a high latency type, the first connection does not have a low latency requirement. When the latency type corresponding to the first connection is a low latency type, the first connection has a low latency requirement. This understanding should be applied to "whether it has a low latency requirement" in subsequent descriptions, and will not be elaborated further.

[0274] If the first latency requirement information indicates that the first connection does not have a low latency requirement, the target data can be transmitted to the second device through the first connection in accordance with the existing data transmission method.

[0275] If the first latency requirement information indicates that the first connection has a low latency requirement, then the target data is transmitted to the second device in accordance with one or more of the first, second, third, and fourth latency reduction strategies described above.

[0276] Optionally, the first device transmits the target data to the second device according to the first latency reduction strategy described above.

[0277] In other words, the first device sets the operating frequency of its WiFi chip to a preset frequency, which is higher than a reference frequency. Optionally, the reference frequency can be the operating frequency corresponding to the current transmission bandwidth in a frequency adjustment strategy based on transmission bandwidth.

[0278] Optionally, the first device transmits the target data to the second device according to the second latency reduction strategy described above.

[0279] In other words, the processing core type of the WiFi driver module of the first device is set to a preset type. For example, at least one thread in the WiFi driver module of the first device is bound to a medium or large core of the processor. For example, the at least one thread includes a sending thread and / or a receiving thread.

[0280] Optionally, the first device transmits the target data to the second device according to the third latency reduction strategy described above.

[0281] In other words, when the DMA response latency in the first device is set to a preset latency, after the kernel scheduling module of the first device initiates a transfer request to the DMA controller, the response latency of the DMA controller in the first device to the transfer request is less than the default DMA response latency.

[0282] Optionally, the first device transmits the target data to the second device according to the fourth latency reduction strategy described above.

[0283] In other words, the kernel processing strategy of the first device is set to a non-power-priority strategy, that is, the power-priority strategy of kernel scheduling is turned off in the first device.

[0284] Optionally, the first device transmits the target data to the second device according to any two of the first, second, third, and fourth latency reduction strategies described above.

[0285] Optionally, the first device transmits the target data to the second device according to any three of the above-mentioned first, second, third, and fourth latency reduction strategies.

[0286] Optionally, the first device transmits the target data to the second device according to all of the first, second, third, and fourth latency reduction strategies described above.

[0287] In the above implementation, when data transmission has a low latency requirement, data transmission can be performed according to one or more of the first, second, third, and fourth latency reduction strategies mentioned above, thereby reducing end-to-end transmission latency and meeting the low latency requirement.

[0288] In the second possible implementation, the first latency requirement information indicates that the first connection has a low latency requirement, and the low latency level value of the first connection.

[0289] This implementation is similar to the first implementation mentioned above, except that the transmission parameters are determined based on the low latency threshold value of the first connection.

[0290] For example, when setting the operating frequency of the WiFi chip, the operating frequency of the WiFi chip is set to a preset frequency corresponding to the low latency level value. For example, the operating frequency of the WiFi chip can be set by referring to the correspondence shown in Table 3 based on the low latency level value. When setting the type of the processing core of the WiFi driver module, the type of the processing core of the WiFi driver module is set to a preset type corresponding to the low latency level value. When setting the DMA response latency, the DMA response latency is set to a preset latency corresponding to the low latency level position. For example, the DMA response latency can be set by referring to the correspondence shown in Table 4 based on the low latency level value.

[0291] In this implementation, when setting the transmission parameters of the first device, the parameters are dynamically set according to the low latency level of the first connection, so that the set transmission parameters can more accurately meet the low latency requirements of the first connection.

[0292] Considering that lower latency leads to higher power consumption in practical applications, this embodiment can also select one or more of the first, second, third, and fourth latency reduction strategies as needed, depending on the low latency requirements of different scenarios, thereby achieving different levels of latency adjustment and ultimately achieving a balance between latency and power consumption. The third and fourth possible implementations will be described below.

[0293] In the third possible implementation, the first latency requirement information is used to indicate at least one latency reduction strategy for enabling the first connection.

[0294] Optionally, the first latency requirement information may include identifiers for at least one latency reduction strategy. For example, the identifier for the first latency reduction strategy is A, the identifier for the second latency reduction strategy is B, the identifier for the third latency reduction strategy is C, and the identifier for the fourth latency reduction strategy is D. If the first latency requirement information includes identifier A, it indicates that the first latency reduction strategy needs to be enabled. If the first latency requirement information includes identifiers A and B, it indicates that both the first and second latency reduction strategies need to be enabled. If the first latency requirement information includes identifiers A, B, C, and D, it indicates that all of the first, second, third, and fourth latency reduction strategies need to be enabled.

[0295] Optionally, the first latency requirement information may include: an identifier for each latency reduction strategy and the corresponding enable state of that strategy; for example, 0 indicates disabled, and 1 indicates enabled. For instance, suppose the first latency requirement information includes:<A,0> ,<B,1> ,<C,0> ,<D,1> This indicates that the second and fourth latency reduction strategies need to be enabled. Assume the first latency requirement information includes...<A,1> ,<B,1> ,<C,1> ,<D,1> This means that all of the first, second, third, and fourth latency reduction strategies need to be enabled.

[0296] It should be noted that the first delay requirement information can also be indicated in other ways, and this embodiment does not limit this.

[0297] In this way, the first device can determine the transmission parameters based on at least one latency reduction strategy enabled by the first connection.

[0298] For example, if the latency reduction strategy for enabling the first connection includes a first latency reduction strategy, then the operating frequency of the WiFi chip of the first device is set to a preset frequency.

[0299] If the latency reduction strategy for enabling the first connection includes a second latency reduction strategy, then the type of the processing core of the WiFi driver module is set to a preset type.

[0300] If the latency reduction strategy for enabling the first connection includes a third latency reduction strategy, then the DMA response latency in the first device is set to a preset latency.

[0301] If the latency reduction strategy for enabling the first connection includes a fourth latency reduction strategy, then the kernel processing strategy of the first device will be set to a non-power-priority strategy.

[0302] In the above implementation method, when data transmission has a low latency requirement, one or more of the first, second, third, and fourth latency reduction strategies can be selected as needed to transmit data, thereby reducing end-to-end transmission latency and meeting the low latency requirements of different scenarios.

[0303] In the fourth possible implementation, the first latency requirement information is used to indicate at least one latency reduction strategy enabled by the first connection, and the low latency level value corresponding to the first connection. The low latency level value is used to indicate the degree of low latency requirement of the first connection. For example, in order of decreasing low latency requirement, the low latency level values ​​may include level 1, level 2, level 3, level 4, etc.

[0304] In this way, the first device can adopt at least one latency reduction strategy enabled by the first connection, and transmit target data to the second device according to the degree of low latency requirement of the first connection.

[0305] For example, if the first latency reduction strategy is included in at least one latency reduction strategy for enabling the first connection, the operating frequency of the WiFi chip can be dynamically adjusted by querying the corresponding relationship shown in Table 3 based on the low latency level value.

[0306] For example, if at least one latency reduction strategy for enabling the first connection includes a second latency reduction strategy, the type of the processing core of the WiFi driver module can be determined based on the low latency level value.

[0307] For example, if the first connection enabling latency reduction strategy includes a third latency reduction strategy, the DMA response latency can be dynamically adjusted by querying the corresponding relationship shown in Table 4 based on the low latency level value.

[0308] In the above implementation, when the first connection has a low latency requirement, one or more of the first, second, third, and fourth latency reduction strategies can be selected as needed according to actual requirements. Furthermore, the relevant parameters in the latency reduction strategy can be adjusted as needed according to the low latency level of the first connection, thereby reducing end-to-end transmission latency and meeting the low latency requirements of different scenarios.

[0309] In this embodiment, the first device transmits target data to the second device according to the first latency requirement information corresponding to the first connection, which can reduce the transmission latency of the first device to the target data and meet the low latency requirement.

[0310] In some application scenarios, the first device may have multiple connections with other devices.

[0311] In one example, Figure 7A This is a schematic diagram illustrating a multi-connection scheme provided in an embodiment of this application. For example... Figure 7A As shown, multiple connections can be established between the first device and the second device. For example, the first device and the second device can establish connection 1 through application 1, connection 2 through application 2, and connection 3 through application 3.

[0312] In another example, Figure 7B This is a schematic diagram illustrating another type of multi-connection provided in an embodiment of this application. For example... Figure 7B As shown, a connection 1 is established between the first device and the second device, a connection 2 is established between the first device and the third device, and a connection 3 is established between the first device and the fourth device.

[0313] Considering that various latency reduction strategies involve the use of system resources, when multiple connections exist between the first device and other devices, conflicts may arise in the low-latency requirements of different connections. For example, taking two connections as an example, connection 1 has a low-latency requirement, while connection 2 does not. Or, for example, connection 1 requests to enable the first latency reduction strategy, while connection 2 requests to enable the second latency reduction strategy. To address these conflicts, embodiments of this application also provide a data transmission method for multiple connections, which can avoid conflicts in data transmission between multiple connections.

[0314] Figure 8 This is a schematic diagram illustrating another data transmission method provided in an embodiment of this application. For example... Figure 8 As shown, the method in this embodiment includes:

[0315] S801: The first device determines the target data to be transmitted to the second device through the first connection.

[0316] S802: The first device obtains the first latency requirement information corresponding to the first connection and the second latency requirement information corresponding to the second connection.

[0317] It should be understood that, in this embodiment, the implementation method of the first device determining the target data to be transmitted and the first device obtaining the first latency requirement information corresponding to the first connection is the same as... Figure 6 The embodiments shown are similar and will not be described in detail here.

[0318] In this embodiment, the second connection refers to any connection established between the first device and other devices (including the second device and other devices besides the second device), other than the first connection. When there are multiple second connections, the second latency requirement information corresponding to each second connection can be obtained separately.

[0319] Prior to executing this embodiment, the first device also transmitted data to other devices via the second connection (and...). Figure 6 The data transmission process provided in the illustrated embodiment is similar. Furthermore, during the process of the first device transmitting data to other devices through the second connection, the second latency requirement information corresponding to the second connection has already been obtained.

[0320] S803: The first device determines the target latency requirement information based on the first latency requirement information and the second latency requirement information.

[0321] S804: The first device transmits the target data to the second device through the first connection based on the target latency requirement information.

[0322] In this embodiment, S803 implements latency requirement conflict management for different connections. When the first latency requirement information and the second latency requirement information are different, the first device determines the target latency requirement information based on the first and second latency requirement information. The target latency requirement information is the latency requirement information after conflict management. Thus, the first device transmits target data to the second device through the first connection based on the target latency requirement information. If the first device also needs to transmit target data to other devices through the second connection, then the first device also transmits target data to other devices through the second connection based on the target latency requirement information. Therefore, the first device transmits data based on the same target latency requirement information for different connections, avoiding conflicts between different connections.

[0323] The following section introduces several possible implementation methods for S803.

[0324] In the first possible implementation, the first latency requirement information is used to indicate whether the first connection has a low latency requirement, and the second latency requirement information is used to indicate whether the second connection has a low latency requirement. Conflict management is performed on the first and second latency requirement information to obtain the target latency requirement information.

[0325] If the first latency requirement information indicates that the first connection does not have a low latency requirement, and the second latency requirement information indicates that the second connection does not have a low latency requirement, then the target latency requirement information indicates that there is no low latency requirement.

[0326] If the first latency requirement information indicates that the first connection has a low latency requirement, and / or the second latency requirement information indicates that the second connection has a low latency requirement, then the target latency requirement information is determined to indicate a low latency requirement.

[0327] Optionally, the first device can implement low-latency conflict management by maintaining a counter. When a connection enables low-latency requirements, the counter value is incremented by 1; when a connection disables low-latency requirements, the counter value is decremented by 1. Thus, when the counter value is non-zero, it indicates that a connection with low-latency requirements exists, and in this case, the conflict management result is to enable low-latency requirements. When the counter value is zero, it indicates that no connection with low-latency requirements exists, and in this case, the conflict management result is to disable low-latency requirements.

[0328] For example, suppose the first device has three connections with other devices: connection 1, connection 2, and connection 3. First, the counter is reset to zero.

[0329] When the first device sends target data to other devices through connection 1, connection 1 enables low latency requirements (assuming that connections 2, 3, and 4 do not enable low latency requirements at this time). In this case, the counter is incremented by 1, and the counter value is now 1. The result of the first device's conflict management is that low latency requirements are enabled. The first device then uses the aforementioned latency reduction strategy to send the target data through connection 1.

[0330] When the first device sends target data to other devices via connection 2, low latency requirements are not enabled on connection 2. In this case, the counter is not updated; that is, the counter value is 1, and the conflict management result is that low latency requirements are enabled. The first device then uses the aforementioned latency reduction strategy to send the target data via connection 2.

[0331] When the first device sends target data to other devices via connection 3, connection 3 enables low latency requirements. In this case, the counter is incremented by 1, and the counter value is now 2. The result of conflict management is that low latency requirements are enabled. The first device uses the aforementioned latency reduction strategy to send the target data via connection 3.

[0332] When the first device sends target data to other devices through connection 1, connection 1 disables the low-latency requirement. In this case, the counter is decremented by 1, and the counter value is now 1. The result of conflict management is that the low-latency requirement is enabled. The first device uses the latency reduction strategy described above to send the target data through connection 1.

[0333] When the first device sends target data to other devices via connection 3, connection 3 disables the low-latency requirement. In this case, the counter is decremented by 1, and the counter value is now 0. The result of conflict management is that the low-latency requirement is not enabled. The first device no longer uses the aforementioned latency reduction strategy, but instead uses related technologies to send the target data via connection 3.

[0334] In the second possible implementation, the first latency requirement information is used to indicate that the first connection has a low latency requirement and the corresponding low latency level value of the first connection, and the second latency requirement information is used to indicate that the second connection has a low latency requirement and the corresponding low latency level value of the second connection.

[0335] When performing conflict management, it is necessary to manage conflicts based on the low latency threshold value corresponding to each connection. When managing conflicts based on the low latency threshold value corresponding to each connection, an extreme value approach can be used.

[0336] For example, suppose the low latency level values ​​can include level 1, level 2, level 3, and level 4. Among them, level 1 indicates a higher level of demand for low latency than level 2, level 2 indicates a higher level of demand for low latency than level 3, and level 3 indicates a higher level of demand for low latency than level 4.

[0337] If the low latency level corresponding to connection 1 is level 1, the low latency level corresponding to connection 2 is level 2, and the low latency level corresponding to connection 3 is level 3, then the low latency level indicated by the target latency requirement information in the conflict management result is level 1.

[0338] If the low latency level corresponding to connection 1 is level 2, the low latency level corresponding to connection 2 is level 2, and the low latency level corresponding to connection 3 is level 3, then in the conflict management result, the low latency level indicated by the target latency requirement information is level 2.

[0339] If the low latency level corresponding to connection 1 is level 3, the low latency level corresponding to connection 2 is level 3, and the low latency level corresponding to connection 3 is level 3, then the low latency level indicated by the target latency requirement information in the conflict management result is level 3.

[0340] In the third possible implementation, the first latency requirement information is used to indicate at least one latency reduction strategy for enabling the first connection, and the second latency requirement information is used to indicate at least one latency reduction strategy for enabling the second connection. Conflict management is performed on the first and second latency requirement information to obtain target latency requirement information, which indicates at least one latency reduction strategy that ultimately needs to be enabled.

[0341] When performing conflict management, for a certain latency reduction strategy, if at least one connection enables it, the conflict management result of that latency reduction strategy is enabled; if all connections do not enable it, the conflict management result of that latency reduction strategy is disabled.

[0342] In one example, suppose the first latency requirement information indicates that the latency reduction strategies enabled by the first connection include: A and B, and the second latency requirement information indicates that the latency reduction strategies enabled by the second connection include: A and B. Then, in the conflict management result, the target latency requirement information indicates that the latency reduction strategies that need to be enabled are: A and B.

[0343] In another example, suppose the first latency requirement information indicates that the latency reduction strategies enabling the first connection include: A and B, and the second latency requirement information indicates that the latency reduction strategies enabling the second connection include: A and C. Then, in the conflict management result, the target latency requirement information indicates that the latency reduction strategies that need to be enabled are: A, B, and C.

[0344] In another example, suppose the first latency requirement information indicates that the latency reduction strategies enabling the first connection include: A and B, and the second latency requirement information indicates that the latency reduction strategies enabling the second connection include: C and D. Then, in the conflict management result, the target latency requirement information indicates that the latency reduction strategies that need to be enabled are: A, B, C, and D.

[0345] Optionally, the first device can maintain a separate counter for each latency reduction strategy to implement latency conflict management. Taking the first latency reduction strategy as an example, when a connection enables the first latency reduction strategy, the value of the counter corresponding to the first latency reduction strategy is incremented by 1; when a connection disables the first latency reduction strategy, the value of the counter corresponding to the first latency reduction strategy is decremented by 1. Thus, when the value of the counter corresponding to the first latency reduction strategy is non-zero, it indicates that there is a connection that enables the first latency reduction strategy; in this case, the conflict management result is to enable the first latency reduction strategy. When the value of the counter corresponding to the first latency reduction strategy is zero, it indicates that there is no connection that enables the first latency reduction strategy; in this case, the conflict management result is to disable the first latency reduction strategy.

[0346] It should be understood that the conflict management process for the second, third, and fourth latency reduction strategies is similar to that for the first latency reduction strategy, and will not be elaborated here.

[0347] In the fourth possible implementation, the first latency requirement information is used to indicate at least one latency reduction strategy enabled by the first connection and the low latency level corresponding to the first connection, and the second latency requirement information is used to indicate at least one latency reduction strategy enabled by the second connection and the low latency level corresponding to the second connection.

[0348] When performing conflict management, it is necessary to manage conflicts based on the latency reduction strategies enabled for each connection, and also based on the low latency levels corresponding to each connection. The conflict management method for the latency reduction strategies enabled for each connection is similar to the third possible implementation method mentioned above, and will not be elaborated here. The conflict management method for the low latency levels corresponding to each connection is similar to the second possible implementation method mentioned above, and will not be elaborated here.

[0349] The data transmission method provided in this embodiment manages conflicts in the low-latency requirement information corresponding to multiple connections, thereby reducing end-to-end transmission latency and avoiding conflicts between data transmissions of multiple connections.

[0350] The above Figure 8 In the illustrated embodiment, low-latency conflict management for multiple connections can be implemented in the kernel mode of the electronic device. For example, the kernel mode of the electronic device may include: a kernel scheduling module, a conflict management module, and a latency management module. The following section discusses... Figure 9 Explain the interaction process between the modules.

[0351] Figure 9 This is a schematic diagram illustrating a multi-connection low-latency conflict management process provided in an embodiment of this application. For example... Figure 9 As shown, it includes:

[0352] S901: The kernel scheduling module obtains the first latency requirement information corresponding to the first connection.

[0353] For example, the application layer reports the first latency requirement information to the kernel scheduling module.

[0354] S902: The kernel scheduling module sends the first latency requirement information to the conflict management module.

[0355] S903: The conflict management module obtains the second latency requirement information corresponding to the second connection.

[0356] S904: The conflict management module determines the target latency requirement information based on the first latency requirement information corresponding to the first connection and the second latency requirement information corresponding to the second connection.

[0357] S905: The conflict management module sends the target latency requirement information to the latency management module.

[0358] S906: The latency management module enables one or more of the following latency reduction strategies based on the target latency requirement information: the first latency reduction strategy, the second latency reduction strategy, the third latency reduction strategy, and the fourth latency reduction strategy.

[0359] When the application layer does not have a low-latency transmission requirement, the first latency requirement information reported by the application layer to the kernel scheduling module indicates that the latency reduction strategy is enabled. When the application layer does not have a low-latency transmission requirement, the first latency requirement information reported by the application layer to the kernel scheduling module indicates that the latency reduction strategy is not enabled.

[0360] pass Figure 9 The low-latency conflict management process shown in the diagram takes into account the first latency requirement information corresponding to the first connection when the latency management module enables the latency reduction strategy. Therefore, the first device can meet the low latency requirement when transmitting target data through the first connection.

[0361] After enabling the low-latency requirement in the first connection, the low-latency requirement can be deenabled in the following feasible ways.

[0362] In one possible implementation, when the application corresponding to the first connection no longer has a low-latency requirement, the application reports the first latency requirement information to the kernel scheduling module. At this time, the first latency requirement information indicates that the first connection no longer has a low-latency requirement. The kernel scheduling module then reports the first latency requirement information to the conflict management module.

[0363] In another possible implementation, if the kernel scheduling module detects that no data has been transmitted through the first connection within a preset time period, the kernel scheduling module determines that the first connection does not have a low-latency requirement. The kernel scheduling module then notifies the conflict management module that the first connection does not have a low-latency requirement through the first latency requirement information.

[0364] In another possible implementation, if the kernel scheduling module detects a failure in the target data transmission, it determines that the first connection does not have a low-latency requirement. The kernel scheduling module then notifies the conflict management module of this first latency requirement information.

[0365] In this embodiment, the conflict management module can be implemented using the existing (Power Management Quality of Service, PM-QOS) mechanism in the kernel.

[0366] In the above Figure 8 and Figure 9 Based on the embodiments shown, the conflict management process will be illustrated below with a specific example.

[0367] Figure 10 This is a schematic diagram of a conflict management process provided in an embodiment of this application. In this embodiment, taking the establishment of two connections between a first device and a second device as an example, for example, the first device establishes connection 1 with the second device through application 1, and the first device establishes connection 2 with the second device through application 2.

[0368] like Figure 10 As shown, it is assumed that the latency reduction strategy in the conflict management module is disabled in the initial state.

[0369] (1) Application 1 reports a first enable request to the conflict management module, requesting that the latency reduction strategy be enabled for connection 1. After receiving the first enable request, the conflict management module determines that the latency reduction strategy is enabled. Therefore, the conflict management module sends an enable command to the latency management module. After receiving the enable command, the latency management module enables the latency reduction strategy.

[0370] (2) Application 2 reports a second enable request to the conflict management module, requesting that the latency reduction strategy be enabled for connection 2. After receiving the second enable request, the conflict management module determines that the latency reduction strategy is enabled. In this case, since the latency management module has already enabled the latency reduction strategy, the conflict management module does not need to send an enable command to the latency management module.

[0371] (3) The user turns off the WiFi function.

[0372] (4) Application 1 discovers that the WiFi function is off. Application 1 sends a first disable request to the conflict management module to request the disable of the latency reduction strategy for connection 1. After receiving the first disable request, the conflict management module determines that the latency reduction strategy is enabled because connection 2 still has the latency reduction strategy enabled at this time.

[0373] (5) Application 2 detects that the WiFi function is off and sends a second disable request to the conflict management module to request that the latency reduction strategy be disabled for connection 2. After receiving the second disable request, the conflict management module determines that the latency reduction strategy is disabled. Therefore, the conflict management module sends a disable instruction to the latency management module to disable the latency reduction strategy.

[0374] (6) The user turns on the WiFi function.

[0375] (7) Application 1 discovers that the WiFi function is enabled and reports a first enable request to the conflict management module to request the enable of the latency reduction strategy for connection 1. After receiving the first enable request, the conflict management module determines that the latency reduction strategy is enabled. Therefore, the conflict management module sends an enable command to the latency management module to enable the latency reduction strategy.

[0376] (8) Application 2 discovers that the WiFi function is enabled and reports a second enable request to the conflict management module to request the enabling of the latency reduction strategy for connection 2. After receiving the first enable request, the conflict management module determines that the latency reduction strategy is enabled. In this case, since the latency management module has already enabled the latency reduction strategy, the conflict management module does not need to send an enable command to the latency management module.

[0377] It should be understood that the latency reduction strategy in this embodiment can be one or more of the four latency reduction strategies described above.

[0378] In this embodiment, when multiple applications simultaneously request to enable latency reduction strategies, the conflict management module performs conflict management based on the low-latency requirements of multiple applications, ensuring that the conflict management result meets the low-latency requirements of multiple applications, thereby reducing end-to-end transmission latency while avoiding conflicts. Furthermore, Figure 10 In the example shown, when the WiFi function is turned off and then turned back on, it can restore the low latency state before the WiFi function was turned off, ensuring that the data transmission process meets the low latency requirements.

[0379] The above embodiments are illustrated using a scenario where a first device transmits data to a second device. When sending target data, the first device can reduce the transmission latency of the target data based on low-latency requirement information. In this embodiment, the second device can also reduce the reception latency of the target data based on low-latency requirement information when receiving the target data. The following will combine... Figure 11 and Figure 12 The embodiments shown are described below.

[0380] Figure 11 This is a schematic diagram illustrating yet another data transmission method provided in an embodiment of this application. The method of this embodiment can be executed by a second device. Figure 11 As shown, the method in this embodiment includes:

[0381] S1101: The second device receives target data from the first device through the first connection.

[0382] For example, the WiFi chip of the second device receives target data from the WiFi chip of the first device through the first connection.

[0383] S1102: The second device obtains the first latency requirement information corresponding to the first connection.

[0384] Optionally, the initial latency requirement information can be included in the target data. For example, see [link to example]. Figure 6In the illustrated embodiment, after the first device obtains the first latency requirement information corresponding to the first connection in S602, in S603, the first device carries the first latency requirement information in the target data and sends the target data to the second device. Alternatively, see [link to example]. Figure 8 In the embodiment shown, in S803, after the first device determines the target latency requirement information based on the first latency requirement information and the second latency requirement information, in S804, the first device carries the target latency requirement information in the target data and sends the target data to the second device.

[0385] In this way, the second device can parse the target data and obtain the first latency requirement information.

[0386] Optionally, the first latency requirement information is related to the network status of the first connection. When the network status of the first connection is different, the corresponding first latency requirement information may also be different. The second device can dynamically determine the first latency requirement information in real time based on the network status of the first connection.

[0387] S1103: The second device processes the target data according to the first delay requirement information.

[0388] In this embodiment, the process of the second device processing the target data may include: the WiFi chip sending the target data to the WiFi driver module; the WiFi driver module sending the target data to the receiving module in the kernel mode; the receiving module in the kernel mode receiving the target data and storing the target data in the kernel mode storage space; the kernel scheduling module in the kernel mode sending a transfer request to the DMA controller; the DMA controller transferring the target data from the kernel mode storage space to the user mode storage space according to the transfer request; and the user mode retrieving the target data from the user mode storage space and performing display processing or other processing on the target data.

[0389] In this embodiment, the second device can determine transmission parameters based on the first latency requirement information. The transmission parameters include at least one of the following: the operating frequency of the communication chip of the second device, the type of processing core of the driver module corresponding to the communication chip, the direct memory access (DMA) response latency in the second device, and the processing strategy of the kernel of the second device. Then, the second device processes the target data according to the transmission parameters. The process by which the second device determines the transmission parameters can employ methods such as... Figure 6 The various possible implementations in the illustrated embodiments are not elaborated here.

[0390] In this embodiment, the second device processes the target data received from the first connection according to the first latency requirement corresponding to the first connection, thereby meeting the low latency requirement.

[0391] Figure 12 This is a schematic diagram illustrating another data transmission method provided in an embodiment of this application. For example... Figure 12 As shown, the method in this embodiment includes:

[0392] S1201: The second device receives target data from the first device through the first connection.

[0393] S1202: The second device obtains the first latency requirement information corresponding to the first connection and the second latency requirement information corresponding to the second connection.

[0394] In this embodiment, the second connection refers to a connection established between the second device and other devices (including the first device and other devices besides the first device), other than the first connection. When there are multiple second connections, the second latency requirement information corresponding to each second connection can be obtained separately.

[0395] The second device may obtain the first latency requirement information corresponding to the first connection using the following optional methods:

[0396] (1) The second device parses the target data to obtain the first delay requirement information corresponding to the first connection.

[0397] (2) The second device determines the first latency requirement information corresponding to the first connection based on the network status of the first connection.

[0398] The second device can obtain the second latency requirement information corresponding to the second connection using the following optional methods:

[0399] (1) The second device parses the second delay requirement information from the data received through the second connection.

[0400] (2) The second device determines the second latency requirement information corresponding to the second connection based on the network status of the second connection.

[0401] S1203: The second device determines the target latency requirement information based on the first latency requirement information and the second latency requirement information.

[0402] S1204: The second device processes the target data according to the target latency requirement information.

[0403] In this embodiment, S1203 implements conflict management for the latency requirements of different connections. For details on the conflict management method, please refer to [link / reference needed]. Figure 8 Various possible implementations are shown in the embodiments. These will not be elaborated upon here.

[0404] The data transmission method provided in this embodiment manages conflicts in the low-latency requirement information corresponding to multiple connections, thereby reducing end-to-end transmission latency and avoiding conflicts between data transmissions of multiple connections.

[0405] The latency reduction effect of the embodiments of this application is explained below with reference to Tables 5 and 6.

[0406] Table 5

[0407]

[0408] Table 6

[0409]

[0410] Table 5 illustrates the latency reduction effects in a P2P communication system after employing the four latency reduction strategies provided in this application's embodiments. As shown in Table 5, the communication latency of the distributed file system is reduced from 10ms to less than 1ms. Based on this reduced communication latency, the rate of random reading of 4KB data by the distributed file system increases from approximately 5.4Mbps to approximately 24.0Mbps, the rate of transmitting 4BK files by the distributed file system increases from approximately 6.1Mbps to approximately 35.0Mbps, and the rate of transmitting 24BK files by the distributed file system increases from approximately 16.1Mbps to approximately 63.0Mbps.

[0411] Table 6 illustrates the latency reduction effects of the four latency reduction strategies provided in this application embodiment in a cross-AP communication system. As shown in Table 6, the communication latency of the distributed file system is reduced from 18ms to approximately 2ms. Based on this reduced communication latency, the rate of random reading of 4KB data by the distributed file system increases from approximately 3.2Mbps to approximately 16.0Mbps, the rate of transmitting 4BK files by the distributed file system increases from approximately 3.4Mbps to approximately 21.0Mbps, and the rate of transmitting 24BK files by the distributed file system increases from approximately 10.1Mbps to approximately 42.0Mbps.

[0412] Therefore, it can be seen that the four latency reduction strategies provided in this application can significantly reduce communication latency and improve the transmission performance of distributed services.

[0413] Figure 13 This is a schematic diagram of a data transmission device provided in an embodiment of this application. The data transmission device can be in the form of software and / or hardware. For example, the data transmission device can be a first device or a chip, module, or unit within the first device. Figure 13 As shown, the data transmission device 1300 provided in this embodiment includes: a processing module 1301 and a sending module 1302. Wherein,

[0414] The processing module 1301 is used to support the data transmission device in performing the operations in S601 and S602 in the above method embodiments, or the operations in S801 and S802 in the above method embodiments.

[0415] The sending module 1302 is used to support the data transmission device in performing the operation in S603 of the above method embodiment, or the operation in S803 and S804 of the above method embodiment.

[0416] All relevant content of each step involved in the above method embodiments can be referenced from the functional description of the corresponding functional module, and will not be repeated here.

[0417] Figure 14 This is a schematic diagram illustrating the structure of another data transmission device provided in an embodiment of this application. The data transmission device can be in the form of software and / or hardware. For example, the data transmission device can be a second device or a chip, module, or unit within a second device. Figure 14 As shown, the data transmission device 1400 provided in this embodiment includes: a receiving module 1401 and a processing module 1402. Wherein,

[0418] The receiving module 1401 is used to support the data transmission device in performing the operation in S1101 of the above method embodiment, or the operation in S1201 of the above method embodiment.

[0419] The processing module 1402 is used to support the data transmission device in performing the operations in S1102 and S1103 in the above method embodiments, or the operations in S1202, S1203 and S1204 in the above method embodiments.

[0420] certainly, Figure 13 and Figure 14 The data transmission device shown includes, but is not limited to, the unit modules listed above. Furthermore, the specific functions that the aforementioned functional units can achieve include, but are not limited to, the functions corresponding to the method steps described in the above examples. For detailed descriptions of other units of the electronic device, please refer to the detailed descriptions of their corresponding method steps; these will not be repeated here in the embodiments of this application.

[0421] Figure 15 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 15 As shown, the electronic device 1500 may include one or more processors 1501, memory 1502, and transceiver 1503; the above devices may communicate through one or more communication buses 1504.

[0422] One or more computer programs are stored in memory 1502 and configured to be executed by one or more processors 1501; the one or more computer programs include instructions for performing any of the steps described above. Transceiver 1503 is used to send data to or receive data from other electronic devices.

[0423] The electronic device provided in this embodiment can execute the data transmission method executed by the first device or the second device in any of the above method embodiments. Its implementation principle and technical effect are similar, and will not be described in detail here.

[0424] This application also provides a computer-readable storage medium storing computer instructions. When the computer instructions are executed, they implement the data transmission method executed by the first device or the second device in any of the above method embodiments. The implementation principle and technical effect are similar, and will not be described in detail here.

[0425] This application also provides a computer program product, which includes a computer program. When the computer program is executed, it implements the data transmission method executed by the first device or the second device in any of the above method embodiments. The implementation principle and technical effect are similar, and will not be described in detail here.

[0426] It should be noted that the modules in the embodiments of this application can be one or more integrated circuits configured to implement the above methods, such as one or more application-specific integrated circuits (ASICs), one or more digital signal processors (DSPs), or one or more field-programmable gate arrays (FPGAs), etc. Furthermore, when one of the above modules is implemented in the form of processing element scheduler code, the processing element can be a general-purpose processor, such as a central processing unit (CPU) or other processor capable of calling program code. Moreover, these modules can be integrated together and implemented as a system-on-a-chip (SOC).

[0427] 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. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is 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, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center 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 that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., a solid-state disk (SSD)).

[0428] The term "multiple" in this article refers to two or more. The term "and / or" in this article 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 alone, A and B simultaneously, or B alone. Furthermore, the character " / " in this article generally indicates an "or" relationship between the preceding and following related objects; in formulas, the character " / " indicates a "division" relationship between the preceding and following related objects.

[0429] In addition, it should be understood that in the description of this application, the words "first" and "second" are used only for the purpose of distinguishing descriptions and should not be construed as indicating or implying relative importance or order.

[0430] It is understood that the various numerical designations used in the embodiments of this application are merely for descriptive convenience and are not intended to limit the scope of the embodiments of this application. In the embodiments of this application, the order of the above-mentioned process numbers does not imply the order of execution; the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

Claims

1. A data transmission method, characterized in that, include: The first device determines the target data to be transmitted to the second device through the first connection, where the first connection is the connection between the first device and the second device. The first device obtains the first latency requirement information corresponding to the first connection; The first device determines transmission parameters based on the first latency requirement information. The transmission parameters include at least one of the following: the operating frequency of the communication chip of the first device, the type of processing core of the driver module corresponding to the communication chip, the direct memory access (DMA) response latency in the first device, and the processing strategy of the kernel of the first device. The first device transmits the target data to the second device through the first connection according to the transmission parameters.

2. The method according to claim 1, characterized in that, The first latency requirement information indicates at least one of the following: The latency type corresponding to the first connection is either low latency or high latency; The low latency setting value of the first connection; The first connection enables at least one latency reduction strategy, which includes at least one of the following: a first latency reduction strategy, a second latency reduction strategy, a third latency reduction strategy, and a fourth latency reduction strategy.

3. The method according to claim 1 or 2, characterized in that, The first latency requirement information indicates that the latency type corresponding to the first connection is low latency; the first device determines transmission parameters based on the first latency requirement information, including: The first device performs at least one of the following parameter settings based on the first latency requirement information: Set the operating frequency of the communication chip of the first device to a preset frequency. Set the type of the processing core of the driver module of the communication chip to a preset type; Set the DMA response latency in the first device to a preset latency; Set the kernel processing strategy of the first device to a non-power-priority strategy.

4. The method according to claim 1 or 2, characterized in that, The first latency requirement information indicates that the latency type corresponding to the first connection is low latency type, and the low latency level value of the first connection; The first device determines transmission parameters based on the first latency requirement information, including: The first device performs at least one of the following parameter settings based on the first latency requirement information: Set the operating frequency of the communication chip of the first device to a preset frequency corresponding to the low latency level value; Set the type of the processing core of the driver module of the communication chip to a preset type corresponding to the low latency level value; In the first device, the DMA response latency is set to a preset latency corresponding to the low latency level value; The kernel processing strategy of the first device is set to a non-power-priority strategy.

5. The method according to claim 1 or 2, characterized in that, The first latency requirement information indicates at least one latency reduction strategy for enabling the first connection; the first device determines transmission parameters based on the first latency requirement information, including at least one of the following: If the latency reduction strategy for enabling the first connection includes the first latency reduction strategy, then the operating frequency of the communication chip of the first device is set to the preset frequency. If the latency reduction strategy for enabling the first connection includes a second latency reduction strategy, then the type of the processing core of the driver module of the communication chip is set to a preset type. If the latency reduction strategy for enabling the first connection includes a third latency reduction strategy, then the DMA response latency in the first device is set to a preset latency. If the latency reduction strategy for enabling the first connection includes a fourth latency reduction strategy, then the kernel processing strategy of the first device will be set to a non-power-priority strategy.

6. The method according to claim 1 or 2, characterized in that, The first latency requirement information indicates at least one latency reduction strategy for enabling the first connection, and the low latency level value of the first connection; the first device determines transmission parameters based on the first latency requirement information, including at least one of the following: If the latency reduction strategy for enabling the first connection includes the first latency reduction strategy, then the operating frequency of the communication chip of the first device is set to a preset frequency corresponding to the low latency level value. If the latency reduction strategy for enabling the first connection includes a second latency reduction strategy, then the type of the processing core of the driver module of the communication chip is set to a preset type corresponding to the low latency level value. If the latency reduction strategy for enabling the first connection includes a third latency reduction strategy, then the DMA response latency in the first device is set to a preset latency corresponding to the low latency level value. If the latency reduction strategy for enabling the first connection includes a fourth latency reduction strategy, then the kernel processing strategy of the first device will be set to a non-power-priority strategy.

7. The method according to claim 1 or 2, characterized in that, The first device transmits the target data to the second device through the first connection based on the first latency requirement information, including: The first device determines the target latency requirement information based on the first latency requirement information and the second latency requirement information corresponding to the second connection; the second connection is either a connection between the first device and the second device, or a connection between the first device and the third device. The first device transmits the target data to the second device through the first connection based on the target latency requirement information.

8. A data transmission method, characterized in that, include: The second device receives target data from the first device through a first connection, wherein the first connection is a connection between the first device and the second device. The second device obtains the first latency requirement information corresponding to the first connection; The second device determines the transmission parameters based on the first latency requirement information. The transmission parameters include at least one of the following: the operating frequency of the communication chip of the second device, the type of the processing core of the driver module corresponding to the communication chip, the direct memory access (DMA) response latency in the second device, and the processing strategy of the kernel of the second device. The second device processes the target data according to the transmission parameters.

9. The method according to claim 8, characterized in that, The first latency requirement information indicates at least one of the following: The latency type corresponding to the first connection is either low latency or high latency; The low latency setting value of the first connection; The first connection enables at least one latency reduction strategy, which includes at least one of the following: a first latency reduction strategy, a second latency reduction strategy, a third latency reduction strategy, and a fourth latency reduction strategy.

10. The method according to claim 8 or 9, characterized in that, The first latency requirement information indicates that the latency type corresponding to the first connection is low latency; the second device determines the transmission parameters based on the first latency requirement information, including: The second device performs at least one of the following parameter settings based on the first latency requirement information: Set the operating frequency of the communication chip of the second device to a preset frequency. Set the type of the processing core of the driver module of the communication chip to a preset type; Set the DMA response latency in the second device to a preset latency; Set the kernel processing strategy of the second device to a non-power-priority strategy.

11. The method according to claim 8 or 9, characterized in that, The first latency requirement information indicates that the latency type corresponding to the first connection is low latency, and the low latency level value of the first connection; the second device determines the transmission parameters based on the first latency requirement information, including: The second device performs at least one of the following parameter settings based on the first latency requirement information: Set the operating frequency of the communication chip of the second device to a preset frequency corresponding to the low latency level value; Set the type of the processing core of the driver module of the communication chip to a preset type corresponding to the low latency level value; The DMA response latency in the second device is set to a preset latency corresponding to the low latency level value; The kernel processing strategy of the second device is set to a non-power-priority strategy.

12. The method according to claim 8 or 9, characterized in that, The first latency requirement information indicates at least one latency reduction strategy for enabling the first connection; the second device determines transmission parameters based on the first latency requirement information, including at least one of the following: If the latency reduction strategy for enabling the first connection includes the first latency reduction strategy, then the operating frequency of the communication chip of the second device is set to the preset frequency. If the latency reduction strategy for enabling the first connection includes a second latency reduction strategy, then the type of the processing core of the driver module of the communication chip is set to a preset type. If the latency reduction strategy for enabling the first connection includes a third latency reduction strategy, then the DMA response latency in the second device is set to a preset latency. If the latency reduction strategy for enabling the first connection includes a fourth latency reduction strategy, then the kernel processing strategy of the second device will be set to a non-power-priority strategy.

13. The method according to claim 8 or 9, characterized in that, The first latency requirement information indicates at least one latency reduction strategy for enabling the first connection, and the low latency level value of the first connection; the second device determines transmission parameters based on the first latency requirement information, including at least one of the following: If the latency reduction strategy for enabling the first connection includes the first latency reduction strategy, then the operating frequency of the communication chip of the second device is set to a preset frequency corresponding to the low latency level value. If the latency reduction strategy for enabling the first connection includes a second latency reduction strategy, then the type of the processing core of the driver module of the communication chip is set to a preset type corresponding to the low latency level value. If the latency reduction strategy for enabling the first connection includes a third latency reduction strategy, then the DMA response latency in the second device is set to a preset latency corresponding to the low latency level value. If the latency reduction strategy for enabling the first connection includes a fourth latency reduction strategy, then the kernel processing strategy of the second device will be set to a non-power-priority strategy.

14. The method according to claim 8 or 9, characterized in that, The second device processes the target data according to the first latency requirement information, including: The second device determines the target latency requirement information based on the first latency requirement information and the second latency requirement information corresponding to the second connection; the second connection is either a connection between the second device and the first device, or a connection between the second device and the third device. The second device processes the target data based on the target latency requirement information.

15. A data transmission device, characterized in that, Applied to a first device, the device includes: a processing module and a transmitting module; The processing module is used to determine the target data to be transmitted to the second device through the first connection, wherein the first connection is the connection between the first device and the second device. The processing module is further configured to obtain the first latency requirement information corresponding to the first connection; The sending module is used to determine transmission parameters based on the first latency requirement information. The transmission parameters include at least one of the following: the operating frequency of the communication chip of the first device, the type of the processing core of the driver module corresponding to the communication chip, the direct memory access (DMA) response latency in the first device, and the processing strategy of the kernel of the first device. Based on the transmission parameters, the module transmits the target data to the second device through the first connection.

16. A data transmission device, characterized in that, Applied to a second device, the apparatus includes: a receiving module and a processing module; The receiving module is used to receive target data from a first device through a first connection, wherein the first connection is a connection between the first device and the second device. The processing module is used to obtain the first latency requirement information corresponding to the first connection; The processing module is further configured to determine transmission parameters based on the first latency requirement information, wherein the transmission parameters include at least one of the following: the operating frequency of the communication chip of the second device, the type of processing core of the driver module corresponding to the communication chip, the direct memory access (DMA) response latency in the second device, and the processing strategy of the kernel of the second device; and process the target data based on the transmission parameters.

17. An electronic device, characterized in that, include: Memory and processor; The processor is configured to be coupled to the memory, read and execute instructions in the memory to implement the method of any one of claims 1 to 7, or to implement the method of any one of claims 8 to 14.

18. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed, implement the method of any one of claims 1 to 7, or implement the method of any one of claims 8 to 14.

19. A computer program product, characterized in that, The computer program product includes a computer program that, when executed, implements the method according to any one of claims 1 to 7, or implements the method according to any one of claims 8 to 14.

Citation Information

Patent Citations

  • Network equipment and method for reducing transmission delay

    CN111163018A

  • Server network delay tuning test method and system

    CN111355636A