Network connection configuration method, electronic device, storage medium and program product

CN122802371APending Publication Date: 2026-09-22ALIBABA CLOUD COMPUTING CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510345567.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-21
Publication Date
2026-09-22

AI Technical Summary

Technical Problem

然而目前,对网络连接的管理只是检测通与不通,而忽略了连接质量,当重要连接的连接质量不佳时,会降低重要数据的传输效率

Benefits of technology

[0010]本申请实施例提供的网络连接的配置方法中,通过划分网络连接的优先级,并在高优先级的第一网络连接所对应的多个网络性能指标数据中,存在异常指标数据的情况下,即在第一连接的连接质量不佳的情况下,根据异常指标数据调节低优先级的第二网络连接的配置参数和网络系统配置参数中的至少一个。不仅实现了网络配置参数的动态调整,而且可使第一网络连接的传输参数满足指定参数范围。由于传输参数能够表征传输性能,并且传输参数满足指定参数范围时,表征传输性能提升了,因而可提升第一网络连接所对应的数据传输效率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122802371A_ABST
    Figure CN122802371A_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a network connection configuration method, electronic equipment, storage medium and program product, relating to the technical field of network, the method comprises: obtaining a plurality of network performance index data corresponding to a first network connection, the first network connection is a network connection with a preset priority in a plurality of network connections; in the case where there is abnormal index data in the plurality of network performance index data, adjusting network configuration parameters according to the abnormal index data, so that the transmission parameters of the first network connection meet the specified parameter range, the network configuration parameters include at least one of the configuration parameters of a second network connection and the network system configuration parameters, and the priority of the second network connection is less than the preset priority. In the technical scheme of the embodiments of the present application, the connection quality of the network connection with high priority can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of network technology, and in particular to a network connection configuration method, electronic device, storage medium, and program product. Background Technology

[0002] Terminal devices typically run multiple applications, each establishing at least one network connection. Different network connections transmit different data. Among this different data, there may be important data that needs to be prioritized; the corresponding network connections are called critical connections. However, currently, network connection management only detects whether a connection is active or not, ignoring connection quality. When the connection quality of critical connections is poor, it reduces the transmission efficiency of important data. Summary of the Invention

[0003] This application provides a network connection configuration method, electronic device, storage medium, and program product to alleviate or solve one or more technical problems existing in the prior art.

[0004] In a first aspect, embodiments of this application provide a method for configuring a network connection, the method comprising:

[0005] Obtain multiple network performance metrics data corresponding to the first network connection, where the first network connection is a network connection with a preset priority among the multiple network connections;

[0006] If abnormal indicator data exists among the multiple network performance indicator data, the network configuration parameters are adjusted according to the abnormal indicator data so that the transmission parameters of the first network connection meet the specified parameter range. The network configuration parameters include at least one of the configuration parameters of the second network connection and the network system configuration parameters, and the priority of the second network connection is lower than the preset priority.

[0007] Secondly, embodiments of this application provide an electronic device, including a memory, a processor, and a computer program stored in the memory, wherein the processor implements any of the methods of embodiments of this application when executing the computer program.

[0008] Thirdly, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the method of any one of the embodiments of this application.

[0009] Fourthly, embodiments of this application provide a computer program product, including a computer program, which, when executed by a processor, implements any of the methods described in the embodiments of this application.

[0010] The network connection configuration method provided in this application prioritizes network connections. When abnormal performance metrics exist among multiple network performance metrics corresponding to a high-priority first network connection (i.e., when the connection quality of the first connection is poor), at least one of the configuration parameters of a low-priority second network connection and network system configuration parameters is adjusted based on the abnormal metrics. This not only achieves dynamic adjustment of network configuration parameters but also ensures that the transmission parameters of the first network connection meet a specified parameter range. Since transmission parameters characterize transmission performance, and meeting the specified parameter range indicates improved transmission performance, the data transmission efficiency corresponding to the first network connection can be improved.

[0011] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application, it can be implemented according to the contents of the specification. In order to make the above and other objects, features and advantages of this application more obvious and understandable, specific embodiments of this application are given below. Attached Figure Description

[0012] In the accompanying drawings, unless otherwise specified, the same reference numerals throughout the various drawings denote the same or similar parts or elements. These drawings are not necessarily drawn to scale. It should be understood that these drawings depict only some embodiments according to this application and should not be construed as limiting the scope of this application.

[0013] Figure 1 This illustration shows an application scenario diagram of the network connection configuration method according to an embodiment of this application;

[0014] Figure 2 A flowchart illustrating a network connection configuration method according to an embodiment of this application is shown;

[0015] Figure 3 A first schematic diagram of a network connection configuration method according to an embodiment of this application is shown;

[0016] Figure 4 A second schematic diagram of a network connection configuration method according to an embodiment of this application is shown;

[0017] Figure 5 A block diagram of an electronic device provided in an embodiment of this application is shown. Detailed Implementation

[0018] In the following description, only certain exemplary embodiments are briefly described. As those skilled in the art will recognize, the described embodiments can be modified in various ways without departing from the concept or scope of this application. Therefore, the drawings and description are considered to be exemplary in nature and not restrictive.

[0019] To facilitate understanding of the technical solutions of the embodiments of this application, the relevant technologies of the embodiments of this application are described below. The following relevant technologies are optional solutions and can be combined with the technical solutions of the embodiments of this application in any way, and all of them fall within the protection scope of the embodiments of this application.

[0020] The following terms will be used in the following text:

[0021] EBPF (Extended Berkeley Packet Filter): A network programming technique that enables the execution of user-space code within the system kernel, applicable to scenarios such as network traffic monitoring and network attack detection.

[0022] TCP (Transmission Control Protocol): One of the most commonly used transport protocols on the Internet, used to transmit data between entities that have established a TCP connection.

[0023] RTT (Round-Trip Time): This reflects the time it takes for a data packet to travel from being sent to being acknowledged upon receipt.

[0024] CWND (Congestion Window): This is a dynamic variable used to limit the amount of data that the sender can send before waiting for the receiver's acknowledgment number (ACK). It reflects the flow control status of the TCP connection. When the congestion window decreases, it indicates that network congestion may have occurred.

[0025] Packet loss rate: The percentage of data packets lost per unit of time. A higher packet loss rate indicates a lower quality network connection.

[0026] Retransmission: In network communication, when data transmission is lost, erroneous, or unacknowledged, the sender retransmits the same data. The retransmission mechanism is an important mechanism in many network protocols (such as TCP) used to ensure reliable data transmission.

[0027] Fast retransmit: After receiving multiple consecutive (usually three, i.e., the fast retransmit threshold is three) duplicate ACKs, the sender will assume that a data packet may have been lost, instead of waiting for the timeout timer to expire.

[0028] Bandwidth: Describes the amount of data a network link or channel can transmit per unit of time. It is usually measured in bits per second (bit / s or bps) or bytes per second (Byte / s). The higher the bandwidth, the faster the network transmission speed.

[0029] Cloud PC: A virtualized desktop service based on cloud computing technology. It migrates traditional computer hardware and software resources to cloud servers, allowing users to remotely connect to the virtual computer in the cloud through terminal devices (such as PCs, tablets, or mobile phones) and enjoy a similar user experience to a local computer.

[0030] With the continuous development of cloud computing technology, cloud computing has become a popular way to access computing resources. Because cloud computing resources are efficient and convenient, more and more users are starting to use them for work and study. Due to the characteristics of cloud computing, users need to establish a communication connection with a cloud server when using a cloud computer installed on their terminal device. However, other tasks may be running on the user's terminal device simultaneously, such as downloading updates from the server, which often degrades the connection quality of the cloud computer and may even cause problems such as lag.

[0031] Based on this, embodiments of this application provide a network connection configuration method to achieve dynamic and flexible configuration of network configuration parameters and improve the transmission performance of high-priority network connections. Figure 1 This is a schematic diagram illustrating an application scenario of a network connection configuration method provided in an embodiment of this application, such as... Figure 1 As shown, this scenario includes: a terminal device and at least one other device that has established a network connection with the terminal device. The terminal device can establish at least one network connection with any other device. The terminal device can be a mobile phone, tablet computer, desktop computer, laptop computer, smart wearable device, in-vehicle terminal, smart home device, etc. Figure 1 The example shown is a desktop computer. Other devices can be terminal devices or servers. Servers can be physical servers or cloud servers.

[0032] The terminal device maintains a strategy for acquiring indicator data and a strategy for configuring parameters. The indicator data acquisition strategy instructs the acquisition of multiple network performance indicator data corresponding to a first network connection, which is a network connection with a preset priority among the multiple network connections. The parameter configuration strategy instructs the adjustment of network configuration parameters based on abnormal indicator data found among the acquired multiple network performance indicator data, so that the transmission parameters of the first network connection meet a specified parameter range. The network configuration parameters include at least one of the configuration parameters of a second network connection and network system configuration parameters, with the second network connection having a lower priority than the preset priority.

[0033] Therefore, by prioritizing network connections, and considering the presence of abnormal performance metrics among multiple network performance indicators corresponding to a high-priority first network connection (i.e., when the connection quality of the first connection is poor), at least one of the configuration parameters of a low-priority second network connection and the network system configuration parameters is adjusted based on the abnormal metric data. This not only achieves dynamic adjustment of network configuration parameters but also ensures that the transmission parameters of the first network connection meet a specified parameter range. Since transmission parameters characterize transmission performance, and meeting the specified parameter range indicates improved transmission performance, the data transmission efficiency corresponding to the first network connection can be improved.

[0034] It should be noted that the application scenarios or examples provided in the embodiments of this application are for ease of understanding, and the embodiments of this application do not specifically limit the application of the technical solutions. In addition, the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.

[0035] The technical solution of this application and how it solves the aforementioned technical problems are described in detail below with specific embodiments. The listed specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will be described in detail below with reference to the accompanying drawings.

[0036] Figure 2 A flowchart illustrating a network connection configuration method according to an embodiment of this application is shown. Figure 2 The method shown can be used by Figure 1 The terminal device shown executes, such as Figure 2 As shown, the method may include steps S201 and S202.

[0037] Step S201: Obtain multiple network performance index data corresponding to the first network connection, where the first network connection is a network connection with a preset priority among the multiple network connections.

[0038] Step S202: If there are abnormal index data in multiple network performance index data, adjust the network configuration parameters according to the abnormal index data so that the transmission parameters of the first network connection meet the specified parameter range. The network configuration parameters include at least one of the configuration parameters of the second network connection and the network system configuration parameters. The priority of the second network connection is lower than the preset priority.

[0039] To ensure efficient transmission of critical data, in some implementations, the priorities of multiple network connections established by the terminal device can be pre-configured, and a network connection with a preset priority can be designated as the first network connection. That is, the first network connection can be a critical network connection used for transmitting important data. Furthermore, multiple network performance indicator data corresponding to the first network connection are acquired. For any network performance indicator data, it is determined whether the data meets a corresponding preset condition. If it does, the data is determined to be abnormal. At least one of the configuration parameters of the second network connection and the network system configuration parameters is adjusted based on at least one determined abnormal indicator data. For example, if the terminal device has a cloud computer and other applications installed, the ASP (Adaptive Streaming Protocol) connection between the cloud computer and the cloud server can be pre-configured as a high-priority first network connection, and the network connections corresponding to other applications on the terminal device can be set as low-priority second network connections.

[0040] The network performance metrics can include at least two of the following: round-trip time (RTT), packet loss rate, and congestion window. RTT reflects the latency characteristics of the network connection; a higher RTT indicates potential congestion. Packet loss rate reflects the reliability and congestion level of the network connection; a higher packet loss rate indicates greater congestion. The congestion window limits the number of unacknowledged data entries to prevent network congestion; a larger congestion window indicates lower congestion. In other words, these multiple network performance metrics for the first network connection characterize its connection quality, i.e., its health status.

[0041] When multiple network performance metrics include round-trip time (RTT), the preset condition for RRT can be that if the RRT exceeds a RRT threshold, the RRT is determined to be an abnormal metric. Similarly, when multiple network performance metrics include packet loss rate (PFR), the preset condition for PFR can be that if the PFR exceeds a PFR threshold, the PFR is determined to be an abnormal metric. Likewise, when multiple network performance metrics include congestion window (CFF), the preset condition for CFF can be that if the CFF is smaller than a CFF threshold, the CFF is determined to be an abnormal metric.

[0042] There can be at least one first network connection, and the transmission parameters of the first network connection can include at least one of the bandwidth and transmission rate of the first network connection. When the transmission parameters of the first network connection include bandwidth, the specified parameter range can include a value greater than the current bandwidth of the first network connection, or a value greater than a preset bandwidth threshold, where the bandwidth threshold is greater than the current bandwidth. When the transmission parameters of the first network connection include transmission rate, the specified parameter range can include a value greater than the current transmission rate of the first network connection, or a value greater than a preset transmission rate threshold, where the transmission rate threshold is greater than the current transmission rate. In other words, adjusting the network configuration parameters can increase at least one of the bandwidth and transmission rate of the first network connection (i.e., improve the transmission performance of the first network connection). Since the bandwidth of the first network connection increases, the data transmission rate of the first network connection increases, and the increased data transmission rate improves the transmission performance of the first network connection. Furthermore, the increased data transmission rate reduces the amount of data in a waiting state, thus reducing the risk of network congestion and lag. Therefore, the connection quality of the first network connection is improved, or in other words, the health status of the first network connection is better than its health status before adjusting the network configuration parameters. In other words, the transmission parameters of the first network connection can characterize the transmission performance and connection quality of the first network connection. When the transmission parameters meet the specified parameter range, the transmission performance and connection quality are improved, thus improving the data transmission efficiency corresponding to the first network connection.

[0043] There can be at least one second network connection. Configuration parameters for the second network connection can include at least one of the following: bandwidth, queue length, etc. Bandwidth refers to the data transmission speed of the second network connection, and the queue is used to temporarily store data packets to prevent packet loss due to processing delays. Network system configuration parameters can include at least one of the following: retransmission parameters, buffer size, etc. Retransmission parameters can include at least one of the following: retransmission timeout and fast retransmission threshold. The retransmission timeout refers to how long the sender waits before retransmitting data if it has not received an acknowledgment (ACK); the length of the retransmission timeout reflects the tolerance for network latency and packet loss. The fast retransmission threshold refers to the maximum number of consecutively repeated ACKs received when the sender believes that some data may have been lost. In other words, network configuration parameters can characterize the network's transmission performance, and adjusting these parameters can improve the transmission performance of the first network connection.

[0044] As can be seen, the network connection configuration method provided in this application prioritizes network connections. When abnormal data exists among multiple network performance metrics corresponding to a high-priority first network connection (i.e., when the connection quality of the first connection is poor), at least one of the configuration parameters of a low-priority second network connection and network system configuration parameters is adjusted based on the abnormal data. This not only achieves dynamic adjustment of network configuration parameters but also ensures that the transmission parameters of the first network connection meet a specified parameter range. Since transmission parameters characterize transmission performance, and meeting the specified parameter range indicates improved transmission performance, the data transmission efficiency corresponding to the first network connection can be improved.

[0045] To ensure the effectiveness of network configuration parameter adjustment, in some implementations, step S202, adjusting the network configuration parameters based on abnormal indicator data, may include: determining at least one adjustable parameter among the configuration parameters of the second network connection and the network system configuration parameters; for any adjustable parameter, determining the target value to be adjusted for the adjustable parameter; and if the current value of the adjustable parameter is greater than the target value, adjusting the current value of the adjustable parameter to the target value.

[0046] In some implementations, at least one adjustable parameter among the configuration parameters of the second network connection and the network system configuration parameters can be determined based on the type of abnormal indicator data. Specifically, when the abnormal indicator data includes at least one of round-trip time and congestion window, the configuration parameter of the second network connection is determined as an adjustable parameter, and a target value to be adjusted for the configuration parameter (i.e., the adjustable parameter) of the second network connection is determined. For any second network connection, if the current value of the configuration parameter of the second network connection is greater than the target value, the current value is adjusted to the target value. If the current value of the configuration parameter of each second network connection is greater than the target value, the network system configuration parameter is determined as an adjustable parameter, and a target value to be adjusted for the network system configuration parameter (i.e., the adjustable parameter) is determined, and the current value of the network system configuration parameter is adjusted to the target value. When the abnormal indicator data includes packet loss rate, both the configuration parameter of the second network connection and the network system configuration parameter are determined as adjustable parameters, and a target value to be adjusted for any adjustable parameter is determined. When the adjustable parameter is the configuration parameter of the second network connection, if the current value of the configuration parameter of the second network connection is greater than the target value, the current value is adjusted to the target value. When the adjustable parameter is the network system configuration parameter, adjust the current value of the network system configuration parameter to the target value.

[0047] In some implementations, both the configuration parameters of the second network connection and the network system configuration parameters can be defined as adjustable parameters, and a target value to be adjusted for each adjustable parameter can be determined. If the adjustable parameter is a configuration parameter of the second network connection, and the current value of the configuration parameter is greater than the target value, then the current value is adjusted to the target value. If the adjustable parameter is a network system configuration parameter, then the current value of the network system configuration parameter is adjusted to the target value.

[0048] In other words, the aforementioned adjustment of the current value of the adjustable parameter to the target value may include: when the adjustable parameter is a configuration parameter of the second network connection, adjusting the current value to the target value if it is determined that the current value of the adjustable parameter is greater than the target value; and when the adjustable parameter is a network system configuration parameter, adjusting the current value of the adjustable parameter to the target value.

[0049] The method for determining the adjustable parameter is not limited to the above-mentioned method; it can be set according to needs in practical applications, and this application does not impose specific limitations on it. Therefore, by first determining the adjustable parameter and then adjusting its current value to the determined target value, the rationality and accuracy of the adjustment are ensured.

[0050] Furthermore, the above-mentioned determination of the target value of the adjustable parameter to be adjusted may include: for any abnormal indicator data, determining a target indicator data range that includes the abnormal indicator data from among multiple indicator data ranges corresponding to the abnormal indicator data; determining the value of the adjustable parameter corresponding to the target indicator data range as a candidate value; and determining the target value based on the candidate value corresponding to at least one abnormal indicator data.

[0051] Specifically, for each network performance metric, it can be pre-divided into multiple metric data ranges, and for any given metric data range, a correspondence can be established between the metric data range and various network configuration parameters. Correspondingly, after identifying abnormal metric data, for any abnormal metric data, it can be matched with its corresponding multiple metric data ranges to obtain a target metric data range containing that abnormal metric data. Furthermore, the values ​​of adjustable parameters corresponding to the target metric data range are obtained from this correspondence and determined as candidate values. Based on the candidate values ​​corresponding to at least one abnormal metric data, the target value is determined.

[0052] For example, multiple indicator data ranges for round-trip latency are defined as (5 ms, 10 ms], (10 ms, 15 ms], and (15 ms, 20 ms]. If the obtained round-trip latency is 13 ms and is identified as abnormal indicator data, then the target indicator data range is determined to be (10 ms, 15 ms). Furthermore, the bandwidth, retransmission interval, and fast retransmission threshold for the target indicator data range (10 ms, 15 ms) are pre-set to be 150 bit / s, 2 ms, and 2. If the adjustable parameter is bandwidth, then the bandwidth value obtained from the correspondence is 150 bit / s, and 150 bit / s is determined as a candidate value. Based on this, if the current bandwidth value of a certain second network connection is 180 bit / s, then 180 bit / s is adjusted to 150 bit / s.

[0053] Therefore, by setting multiple indicator data ranges, a smooth transition in adjustment levels can be ensured. By establishing the correspondence between indicator data ranges and various network configuration parameters, target values ​​can be determined quickly and accurately, improving the accuracy and speed of adjustment.

[0054] Furthermore, in order to ensure the accuracy of the target value, in some embodiments, the above-mentioned determination of the target value based on the candidate value corresponding to at least one abnormal indicator data may include: when there is only one abnormal indicator data, determining the candidate value as the target value; when there are multiple abnormal indicator data, performing preset processing on multiple candidate values ​​to obtain the target value.

[0055] Specifically, if there is only one abnormal indicator data point, a candidate value can be obtained and designated as the target value. If there are multiple abnormal indicator data points, a candidate value is obtained for each abnormal indicator data point, resulting in multiple candidate values. When there are multiple candidate parameters, in order to comprehensively consider each abnormal indicator data point and improve the accuracy of the target value, in some implementations, the average value of the multiple candidate values ​​can be determined as the target value; alternatively, the multiple candidate values ​​can be weighted and summed according to their respective weights, and the result of the weighted summation can be determined as the target value; or the largest candidate value among all candidate values ​​can be determined as the target value. The specific process of the preset processing is not specifically limited in this application, and it can be set as needed in practical applications.

[0056] Therefore, using different methods to determine target values ​​for different numbers of abnormal indicator data can ensure the accuracy of the target values.

[0057] Considering that bandwidth and retransmission parameters have a significant impact on connection quality in practical applications, in some implementations, the configuration parameters of the second network connection include the bandwidth of the second network connection, and the network system configuration parameters include retransmission parameters. Accordingly, adjusting the network configuration parameters based on abnormal indicator data in step S202 may include:

[0058] In cases where at least one adjustable parameter includes the bandwidth of the second network connection, the bandwidth of the second network connection is adjusted based on abnormal indicator data. Adjusting the bandwidth of the second network connection is used to reduce the bandwidth of the second network connection and increase the available bandwidth of the first network connection.

[0059] In cases where at least one adjustable parameter includes a retransmission parameter, the retransmission parameter is adjusted based on abnormal indicator data. The adjusted retransmission parameter is used to transform the current first transmission rate of the first network connection into a second transmission rate, where the first transmission rate is less than the second transmission rate.

[0060] Specifically, when at least one adjustable parameter includes the bandwidth of the second network connection, for any abnormal indicator data, a target indicator data range containing the abnormal indicator data is determined from among multiple indicator data ranges corresponding to the abnormal indicator data, and the bandwidth corresponding to the target indicator data range is determined as a candidate bandwidth. If there is only one abnormal indicator data point, the candidate bandwidth is determined as the target bandwidth. If there are multiple abnormal indicator data points, the average bandwidth of the multiple candidate bandwidths or the bandwidth obtained by weighted summation of the multiple candidate bandwidths is determined as the target bandwidth. Furthermore, for any second network connection, if it is determined that the current bandwidth of the second network connection is greater than the target bandwidth, the current bandwidth of the second network connection is adjusted to the target bandwidth. That is, as... Figure 3 As shown, when at least one adjustable parameter includes the bandwidth of the second network connection, the connection quality of the first network connection is improved by dynamically limiting the rate of the second network connection while leaving the rate of the first network connection unlimited.

[0061] In some implementations, the bandwidth range (including the lower and upper limits of bandwidth) corresponding to each priority network connection can be pre-configured using a traffic control (TC) tool. Accordingly, the above-mentioned adjustment of the current bandwidth of the second network connection to the target bandwidth when it is determined that the current bandwidth of the second network connection is greater than the target bandwidth can further include: adjusting the current bandwidth of the second network connection to the target bandwidth when it is determined that the current bandwidth of the second network connection is greater than the target bandwidth and the target bandwidth is not less than the lower limit of the bandwidth of the second network connection.

[0062] When at least one adjustable parameter includes a retransmission parameter, for any abnormal indicator data, a target indicator data range containing the abnormal indicator data is determined from among multiple indicator data ranges corresponding to the abnormal indicator data, and the retransmission parameter corresponding to the target indicator data range is determined as a candidate retransmission parameter. When there is only one abnormal indicator data, the candidate retransmission parameter is determined as the target transmission parameter. When there are multiple abnormal indicator data, the average retransmission parameter of the multiple candidate retransmission parameters or the retransmission parameter obtained by weighted summation of the multiple candidate transmission parameters is determined as the target retransmission parameter. Furthermore, the current retransmission parameter is adjusted to the target retransmission parameter. The retransmission parameter may include at least one of a retransmission interval and a fast retransmission threshold. It can be understood that when the retransmission parameter is a retransmission interval, the candidate retransmission parameter is the candidate retransmission interval, the average retransmission parameter is the average retransmission interval, and the target retransmission parameter is the target retransmission interval, and the current retransmission interval is greater than the target retransmission interval. The same principle applies when the retransmission parameter is a fast retransmission parameter, which will not be elaborated here.

[0063] Adjusting the bandwidth of the second network connection releases a portion of its bandwidth, thus increasing the available bandwidth of the first network connection. This improves the data transmission efficiency of the first network connection, meaning adjusting the bandwidth directly enhances its connection quality. When adjusting network system configuration parameters, specifically retransmission parameters, a smaller retransmission interval reduces the time the sender spends waiting for acknowledgments, increasing network throughput and thus improving the data transmission rate of each network connection. A smaller fast retransmission threshold allows the sender to detect packet loss and retransmit faster, reducing transmission delays caused by timeouts and improving overall transmission efficiency. Therefore, adjusting retransmission parameters increases the data transmission rate of each network connection, reduces data waiting in a waiting state, avoids network congestion, and improves overall network quality. Consequently, it improves the transmission performance and connection quality of the first network connection, meaning adjusting retransmission parameters indirectly improves its connection quality.

[0064] Furthermore, in order to enable the first network connection to have a larger bandwidth when adjusting the bandwidth of the second network connection, in some embodiments, after adjusting the bandwidth of the second network connection based on the abnormal indicator data, the method further includes: determining the available bandwidth of the first network connection; adjusting the current bandwidth of the first network connection to the available bandwidth, wherein the available bandwidth is greater than the current bandwidth.

[0065] Specifically, the sum of the current bandwidth of the first network connection and the bandwidth in the device that is in an unallocated state is determined as the available bandwidth of the first network connection, and the current bandwidth of the first network connection is adjusted to the available bandwidth. The bandwidth in an unallocated state includes the bandwidth released by the second connection, and may also include the bandwidth that was not allocated in the device before the bandwidth of the second network connection was adjusted.

[0066] By adjusting the current bandwidth of the first network connection to the available bandwidth, the bandwidth of the first network connection can be increased, thereby improving the quality and data transmission efficiency of the first network connection.

[0067] Furthermore, when multiple network performance indicators include packet loss rate, obtaining multiple network performance indicator data corresponding to the first network connection in step S201 may include: determining a first number of data packets sent by the first network connection within the detection period and a second number of data packets lost by the first network connection; and determining the packet loss rate of the first network connection within the detection period based on the first number and the second number.

[0068] Specifically, the first network connection can transmit data based on the TCP protocol. The terminal device can have an EBPF program pre-mounted onto the `tcp_retransmit_skb` function. This `tcp_retransmit_skb` function handles packet retransmissions, and is triggered by a timeout mechanism when a packet is lost or fails to receive an acknowledgment (ACK) during transmission. Each time `tcp_retransmit_skb` is triggered, the EBPF program obtains the corresponding connection information, such as the source address, destination address, and port number. When it is determined that the retransmission is for the first network connection based on the obtained connection information (e.g., the port number), the recorded retransmission count for the first network connection is incremented. Furthermore, in response to the arrival of a detection period, the first number of packets sent by the first network connection within the detection period is counted, and the recorded retransmission count for the first network connection is determined as the second number of packets lost by the first network connection. The second number is then divided by the first number to obtain the packet loss rate of the first network connection within the detection period. The first number of data packets sent refers to the original number of data packets, excluding retransmitted packets. The second number of lost data packets also excludes retransmitted packets. For example, if a first network connection has 5 data packets to be sent within a detection period and has completed sending them, and during the sending process, only the second data packet is retransmitted twice, then the first number is 5, not 5+2=7, and the second number is 1, not 1+2=3.

[0069] By statistically analyzing the first and second quantities, the packet loss rate of the first network connection within the detection period can be accurately determined based on the first and second quantities, thereby accurately adjusting the network configuration parameters to improve the connection quality of the first network connection.

[0070] Furthermore, when multiple network performance metrics include round-trip time, obtaining multiple network performance metric data corresponding to the first network connection in step S201 may include: for any data packet transmitted by the first network connection, when the data packet is successfully received, obtaining the round-trip time corresponding to the data packet.

[0071] Specifically, the first network connection can transmit data based on the TCP protocol. The terminal device can have an EBPF program pre-configured and attached to the `tcp_ack` function. The `tcp_ack` function handles acknowledgment (ACK) messages for data packets, and is triggered when the sender receives an ACK from the receiver. When `tcp_ack` is triggered, the EBPF program accesses the TCP protocol stack and retrieves the round-trip time (RTT) corresponding to the first network connection, determining this RTT as the RTT for the corresponding data packet.

[0072] When multiple network performance metrics include a congestion window, obtaining multiple network performance metric data corresponding to the first network connection in step S201 may include: obtaining the congestion window corresponding to the first network connection.

[0073] Specifically, the first network connection can transmit data based on the TCP protocol. The terminal device can be equipped with an EBPF program, which is pre-mounted onto the aforementioned tcp_ack function. When the tcp_ack function is triggered, the EBPF program accesses the TCP protocol stack and retrieves the value of the variable snd_cwnd (used to record the congestion window) corresponding to the first network connection from the protocol stack, thus obtaining the congestion window corresponding to the first network connection.

[0074] In other words, for any data packet transmitted through the first network connection, when the sender of the data packet receives an acknowledgment (ACK) from the receiver of the data packet, the terminal device can obtain the round-trip time and congestion window of the first network connection through the EBPF procedure, and then execute step S202. If the terminal device obtains the round-trip time and congestion window of the first network connection just as the detection period arrives, it can also obtain the packet loss rate of the first network connection, and then execute step S202. In some embodiments, when the round-trip time and congestion window of the first network connection are obtained, the round-trip time and congestion window of the first network connection can be saved, and when the detection period is determined to have arrived, the packet loss rate of the first network connection can be obtained, and step S202 can be executed based on the round-trip times, congestion windows, and obtained packet loss rates saved within the detection period.

[0075] By pre-loading the EBPF program onto the aforementioned functions, network performance metrics data for the first network connection can be accurately obtained. This allows for dynamic adjustment of network configuration parameters to improve the connection quality and, consequently, the data transmission efficiency of the first network connection. The method for loading the EBPF program onto these functions can be found in relevant technical documents and will not be detailed here.

[0076] To facilitate the determination of the first network connection, in some embodiments, step S201 may further include: obtaining the port number corresponding to each network connection among multiple network connections; determining the network connection corresponding to the preset port number as the first network connection, and determining the network connection corresponding to the port number other than the preset port number among the obtained port numbers as the second network connection.

[0077] Specifically, the system obtains the port numbers corresponding to each network connection established by the device, and determines whether the obtained port numbers include a preset port number. If so, the network connection corresponding to the preset port number is identified as the first network connection, and the network connections corresponding to the port numbers other than the preset port number are identified as the second network connections. If not, all the network connections currently established by the device are identified as the second network connections.

[0078] There can be at least one preset port number. If there are multiple preset port numbers, the priority of each port number can be further preset to distinguish the priorities of the corresponding multiple first network connections. Correspondingly, the bandwidth limit for each first network connection can be preset, and when determining the available bandwidth of a first network connection, the available bandwidth of each first network connection can be determined sequentially according to its priority from highest to lowest, based on its corresponding bandwidth limit. For example, there are two first network connections: first network connection 1 has a higher priority than first network connection 2, and the bandwidth limit for first network connection 1 is 500 bit / s, while its current bandwidth is 400 bit / s; the bandwidth limit for first network connection 2 is 400 bit / s, and the current bandwidth of first network connection 1 is 350 bit / s. For the first network connection 1, its available bandwidth is determined to be 530, so the bandwidth of the first network connection 1 is adjusted from 400 bit / s to 500 bit / s; then for the first network connection 2, its available bandwidth is determined to be 350 + (530 - 500) = 380 bit / s, so the bandwidth of the first network connection 2 is adjusted from 350 bit / s to 380 bit / s.

[0079] It should be noted that when there are multiple preset port numbers and the corresponding multiple first network connections have different priorities, the method of allocating bandwidth to each first network connection is not limited to the above method. The bandwidth in the unallocated state can also be evenly allocated to each first network connection.

[0080] Therefore, by presetting the port number, the first and second network connections can be quickly and accurately determined, thus providing strong support for the configuration of network connections.

[0081] In order to maximize the utilization of network resources, in some embodiments, the method may also include: if it is determined that there are no abnormal index data among the multiple network performance index data corresponding to the first network connection, and the difference between each network performance index data and the corresponding threshold is within the corresponding preset difference range, then adjust at least one of the configuration parameters of the first network connection and the network system configuration parameters so that the transmission parameters of the second network connection meet the specified parameter range.

[0082] The configuration parameters of the first network connection may include at least one of bandwidth, queue length, etc., and the network system configuration parameters may include at least one of retransmission parameters, buffer size, etc. When the configuration parameters of the first network connection include bandwidth and the network system configuration parameters may include retransmission parameters, the process of adjusting the configuration parameters of the first network connection and the network system configuration parameters is similar to the process of adjusting the configuration parameters of the second network connection and the network system configuration parameters described above, as can be found in the relevant descriptions above. Figure 4 As shown, the difference is that the bandwidth of the first network connection is reduced, the bandwidth of the second network connection is increased, and the retransmission parameters are expanded.

[0083] Therefore, when abnormal data exists in the network performance metrics corresponding to the first network connection, reducing the bandwidth of the second network connection and increasing the bandwidth of the first network connection, as well as lowering the retransmission parameter, can improve the quality of the first network connection. Conversely, when no abnormal data exists in the network performance metrics corresponding to the first network connection, and the difference between each network performance metric and its corresponding threshold is within the corresponding preset difference range, reducing the bandwidth of the first network connection and increasing the bandwidth of the second network connection, as well as increasing the retransmission parameter, can improve the connection quality of the second network connection while ensuring the connection quality of the first network connection. This cycle continues, enabling flexible configuration of network parameters and maximizing the utilization of network resources.

[0084] Corresponding to the application scenarios and methods provided in the embodiments of this application, the embodiments of this application also provide a network connection configuration device, which can be applied to... Figure 1 The terminal device shown includes:

[0085] The acquisition module is used to acquire multiple network performance index data corresponding to the first network connection, wherein the first network connection is a network connection with a preset priority among the multiple network connections.

[0086] The configuration module is used to adjust network configuration parameters according to the abnormal indicator data when there is abnormal indicator data among the multiple network performance indicator data, so that the transmission parameters of the first network connection meet a specified parameter range. The transmission parameters include at least one of the bandwidth and transmission rate of the first network connection. The network configuration parameters include at least one of the configuration parameters of the second network connection and the network system configuration parameters. The priority of the second network connection is lower than the preset priority.

[0087] In some implementations, the configuration module is specifically used to: determine at least one adjustable parameter among the configuration parameters of the second network connection and the network system configuration parameters; for any adjustable parameter, determine a target value to be adjusted for the adjustable parameter; and adjust the current value of the adjustable parameter to the target value.

[0088] In some implementations, the number of abnormal indicator data is at least one, and the configuration module is specifically used to: for any abnormal indicator data, determine a target indicator data range that includes the abnormal indicator data from among multiple indicator data ranges corresponding to the abnormal indicator data; determine the value of the adjustable parameter corresponding to the target indicator data range as a candidate value; and determine the target value based on the candidate value corresponding to at least one abnormal indicator data.

[0089] In some implementations, the configuration module is further specifically used to: determine the candidate value as the target value when there is only one abnormal indicator data; and to perform preset processing on the multiple candidate values ​​to obtain the target value when there are multiple abnormal indicator data.

[0090] In some implementations, the configuration parameters of the second network connection include the bandwidth of the second network connection, and the network system configuration parameters include retransmission parameters. Accordingly, the configuration module is specifically used for:

[0091] When at least one adjustable parameter includes the bandwidth, the bandwidth of the second network connection is adjusted according to the abnormal indicator data. The adjusted bandwidth is used to reduce the bandwidth of the second network connection and increase the available bandwidth of the first network connection.

[0092] When the at least one adjustable parameter includes the retransmission parameter, the retransmission parameter is adjusted according to the abnormal indicator data. The adjustment of the retransmission parameter is used to transform the current first transmission rate of the first network connection into a second transmission rate, where the first transmission rate is less than the second transmission rate.

[0093] In some implementations, the configuration module is further configured to determine the available bandwidth of the first network connection after adjusting the bandwidth of the second network connection based on the abnormal indicator data; and adjust the current bandwidth of the first network connection to the available bandwidth, wherein the available bandwidth is greater than the current bandwidth.

[0094] In some implementations, the plurality of network performance metrics includes at least two of round-trip time, packet loss rate, and congestion window. When the plurality of network performance metrics includes the packet loss rate, the acquisition module is specifically used for:

[0095] Determine a first number of data packets sent by the first network connection and a second number of data packets lost by the first network connection within the detection period; determine the packet loss rate of the first network connection within the detection period based on the first number and the second number.

[0096] In some embodiments, the apparatus further includes:

[0097] The determining module is used to obtain the port number corresponding to each of the multiple network connections before the obtaining module obtains the multiple network performance index data corresponding to the first network connection; determine the network connection corresponding to the preset port number as the first network connection, and determine the network connection corresponding to the port number other than the preset port number as the second network connection.

[0098] The functions of each module in the devices of this application embodiment can be found in the corresponding descriptions of the methods described above, and they have corresponding beneficial effects, which will not be repeated here. Furthermore, the device embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separate. The components illustrated as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this application solution according to actual needs.

[0099] Figure 5 This is a block diagram of an electronic device used to implement embodiments of this application. For example... Figure 5 As shown, the electronic device includes a memory 501 and a processor 502. The memory 501 stores a computer program that can run on the processor 502. When the processor 502 executes the computer program, it implements the method described in the above embodiments. The number of memories 501 and processors 502 can be one or more. In a specific implementation, the electronic device may also include a communication interface 503 for communicating with external devices and exchanging data.

[0100] In practical implementation, if the memory 501, processor 502, and communication interface 503 are implemented independently, they can be interconnected via a bus to communicate with each other. This bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. This bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 5 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0101] Optionally, in a specific implementation, if the memory 501, processor 502 and communication interface 503 are integrated on a single chip, the memory 501, processor 502 and communication interface 503 can communicate with each other through an internal interface.

[0102] This application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method provided in this application.

[0103] This application provides a computer program product, including a computer program that, when executed by a processor, implements the method provided in this application.

[0104] This application also provides a chip, which includes a processor for calling and executing instructions stored in a memory, causing a communication device with the chip installed to perform the method provided in this application.

[0105] This application also provides a chip, including: an input interface, an output interface, a processor, and a memory. The input interface, output interface, processor, and memory are connected through an internal connection path. The processor is used to execute code in the memory. When the code is executed, the processor is used to execute the method provided in the application embodiment.

[0106] It should be understood that the aforementioned processor can be a Central Processing Unit (CPU), or other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate Arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. General-purpose processors can be microprocessors or any conventional processor. It is worth noting that the processor can be a processor supporting Advanced Reduced Instruction Set Machines (ARM) architecture.

[0107] Further, optionally, the aforementioned memory may include read-only memory and random access memory. The memory may be volatile memory or non-volatile memory, or may include both. Non-volatile memory may include read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory may include random access memory (RAM), which serves as an external cache. By way of example, but not limitation, many forms of RAM are available. Examples include Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DR RAM).

[0108] 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 processes or functions according to this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another.

[0109] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of those different embodiments or examples.

[0110] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "a plurality of" means two or more, unless otherwise explicitly specified.

[0111] Any process or method described in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or process. Furthermore, the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functionality involved.

[0112] The logic and / or steps described in the flowchart or otherwise herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus or device (such as a computer-based system, a processor-included system or other system that can fetch and execute instructions from, an instruction execution system, apparatus or device).

[0113] It should be understood that various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. All or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware, the program being stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiments.

[0114] Furthermore, the functional units in the various embodiments of this application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. This storage medium can be a read-only memory, a disk, or an optical disk, etc.

[0115] The above description is merely an exemplary embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various variations or substitutions within the technical scope described in this application, and these should all be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for configuring a network connection, characterized in that, The method includes: Obtain multiple network performance metrics data corresponding to the first network connection, where the first network connection is a network connection with a preset priority among the multiple network connections; If abnormal indicator data exists among the multiple network performance indicator data, the network configuration parameters are adjusted according to the abnormal indicator data so that the transmission parameters of the first network connection meet the specified parameter range. The network configuration parameters include at least one of the configuration parameters of the second network connection and the network system configuration parameters, and the priority of the second network connection is lower than the preset priority.

2. The method according to claim 1, characterized in that, The step of adjusting network configuration parameters based on the abnormal indicator data includes: Determine at least one adjustable parameter among the configuration parameters of the second network connection and the configuration parameters of the network system; For any adjustable parameter, determine the target value to be adjusted for the adjustable parameter; Adjust the current value of the adjustable parameter to the target value.

3. The method according to claim 2, characterized in that, The number of abnormal indicator data is at least one, and determining the target value to be adjusted for the adjustable parameter includes: For any abnormal indicator data, determine the target indicator data range that includes the abnormal indicator data from among the multiple indicator data ranges corresponding to the abnormal indicator data. The value of the adjustable parameter corresponding to the target indicator data range is determined as a candidate value; The target value is determined based on candidate values ​​corresponding to at least one abnormal indicator data.

4. The method according to claim 3, characterized in that, Determining the target value based on candidate values ​​corresponding to at least one abnormal indicator data includes: If there is only one abnormal indicator data point, the candidate value will be determined as the target value. When there are multiple abnormal indicator data, the target value is obtained by performing preset processing on the multiple candidate values.

5. The method according to any one of claims 2-4, characterized in that, The configuration parameters of the second network connection include the bandwidth of the second network connection, and the network system configuration parameters include retransmission parameters. Adjusting the network configuration parameters based on the abnormal indicator data includes: When the at least one adjustable parameter includes the bandwidth, the bandwidth of the second network connection is adjusted according to the abnormal indicator data. The bandwidth adjustment is used to reduce the bandwidth of the second network connection and increase the available bandwidth of the first network connection. When the at least one adjustable parameter includes the retransmission parameter, the retransmission parameter is adjusted according to the abnormal indicator data. The adjustment of the retransmission parameter is used to transform the current first transmission rate of the first network connection into a second transmission rate, where the first transmission rate is less than the second transmission rate.

6. The method according to claim 5, characterized in that, After adjusting the bandwidth of the second network connection based on the abnormal indicator data, the method further includes: Determine the available bandwidth of the first network connection; The current bandwidth of the first network connection is adjusted to the available bandwidth, where the available bandwidth is greater than the current bandwidth.

7. The method according to claim 1, characterized in that, The plurality of network performance metrics includes at least two of round-trip time, packet loss rate, and congestion window. When the plurality of network performance metrics includes the packet loss rate, the step of obtaining the plurality of network performance metric data corresponding to the first network connection includes: Determine the first number of data packets sent by the first network connection within the detection period, and the second number of data packets lost by the first network connection; The packet loss rate of the first network connection during the detection period is determined based on the first quantity and the second quantity.

8. The method according to claim 1, characterized in that, Before obtaining the multiple network performance metric data corresponding to the first network connection, the method further includes: Obtain the port number corresponding to each of the multiple network connections; The network connection corresponding to the preset port number is determined as the first network connection, and the network connection corresponding to the port number other than the preset port number is determined as the second network connection.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory, wherein the processor, when executing the computer program, implements the method of any one of claims 1 to 8.

10. A computer-readable storage medium storing a computer program that, when executed by a processor, implements the method of any one of claims 1 to 8.

11. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1 to 8.