TCP proxy method, base station and device
By implementing the intelligent dynamic TCP proxy method in the base station, triggering and exiting the TCP proxy based on the base station memory occupancy rate and the threshold conditions of TCP stream RTT, the problem of insufficient efficiency and stability of large packet data services in the existing technology is solved, and the problem of implementation is realized Lower latency and higher rates while protecting base station load.
Patent Information
- Application Number
- CN202310991305.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-08
- Publication Date
- 2025-02-18
AI Technical Summary
The existing TCP proxy solution lacks efficiency and stability when processing large packet data services, especially in terms of base station memory usage and processing operation load, resulting in limited improvement effects on large packet data services such as streaming media and high-definition pictures.
By implementing an intelligent dynamic TCP proxy method in the base station, we judge the base station memory occupancy rate and TCP stream RTT, and trigger the TCP proxy only when the specific threshold conditions are met, and exit the proxy when the data volume reaches the preset threshold, avoiding the base station load from overload Heavy.
It effectively reduces the delay in transmission data, improves the transmission rate, and while protecting the base station load, it improves the efficiency and stability of the TCP proxy, which is suitable for intelligent protection of high-delay users.
Smart Images

Figure CN119484423A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to a TCP proxy method, a base station and a device. Background Art
[0002] The Transmission Control Protocol (TCP) is a connection-oriented, reliable, byte-stream-based transport layer communication protocol defined by RFC (Request For Comments) 793 [1] of the Internet Engineering Task Force (IETF). In order to achieve the reliability of TCP network communication, complex mechanisms such as checksum, sequence number identification, sliding window, confirmation response, and congestion control are added, and a cumbersome handshake process is established, which increases TCP's consumption of system resources. At the same time, TCP's retransmission mechanism and sequence control mechanism have a certain delay effect on data transmission, reducing transmission efficiency. Therefore, TCP proxy is suitable for application scenarios with low transmission efficiency requirements but high accuracy requirements, such as HyperText Transfer Protocol (HTTP), File Transfer Protocol (FTP), Simple Mail Transfer Protocol (SMTP), etc.
[0003] The current TCP proxy solution is implemented by triggering the establishment of a TCP link. This solution has a significant effect on improving the RTT (Round-Trip Time) of three-way handshakes and small packet services. However, due to the limited amount of proxy data, such as the need to consider factors such as the memory usage of the base station and the processing load, the proxy is generally only effective for 200 to 300k of data, and then it will no longer be effective. For large-packet data services, such as streaming media, high-definition images, and other data packets such as file transfers and APP (Application) installation packages, the improvement effect is very limited. Summary of the invention
[0004] The purpose of the embodiments of the present invention is to provide a TCP proxy method, base station and device to improve the efficiency and stability of the TCP proxy while protecting the base station load. The specific technical solution is as follows:
[0005] In a first aspect of the implementation of the present invention, a TCP proxy method is first provided, the method comprising:
[0006] For the target user, determine whether the memory occupancy rate of the base station is greater than the transmission control protocol TCP proxy memory threshold; if not, detect whether the TCP flow round-trip time RTT of the target user is greater than the RTT threshold; if it is detected that the number of times the TCP flow RTT of the target user is greater than the RTT threshold reaches a preset number threshold, enter the TCP proxy for the target user;
[0007] When the TCP proxy data volume for the target user reaches a first preset data volume threshold, the TCP proxy for the target user is exited.
[0008] Optionally, after exiting the TCP proxy for the target user, the method further includes:
[0009] Determine whether the TCP session of the target user is ended;
[0010] If the TCP session of the target user is not ended, the TCP proxy for the target user enters a cooling-down state;
[0011] When the cooling time reaches the preset time threshold and / or the cooling data volume reaches the second preset data volume threshold, return to execute the step of determining whether the memory occupancy rate of the base station is greater than the TCP proxy memory threshold for the target user; wherein the cooling data volume is the TCP service data volume of the target user when the TCP proxy of the target user enters the cooling period.
[0012] Optionally, the method further includes:
[0013] If it is determined that the memory occupancy rate of the target user is greater than the TCP proxy memory threshold, the memory judgment cooling time is entered for the target user. When the memory judgment cooling time reaches the preset cooling time threshold, the process returns to the step of determining whether the memory occupancy rate of the base station is greater than the TCP proxy memory threshold for the target user.
[0014] Optionally, the method further includes:
[0015] After the target user establishes a TCP link, performing initial TCP proxy for the target user;
[0016] Exit the initial TCP proxy and execute the step of determining, for the target user, whether the memory occupancy rate of the base station is greater than the TCP proxy memory threshold.
[0017] In a second aspect of an embodiment of the present invention, a base station is further provided, including a memory, a transceiver, and a processor:
[0018] A memory for storing a computer program; a transceiver for transmitting and receiving data under the control of the processor; and a processor for reading the computer program in the memory and performing the following operations:
[0019] For the target user, determine whether the memory occupancy rate of the base station is greater than the transmission control protocol TCP proxy memory threshold; if not, detect whether the TCP flow round-trip time RTT of the target user is greater than the RTT threshold; if it is detected that the number of times the TCP flow RTT of the target user is greater than the RTT threshold reaches a preset number threshold, enter the TCP proxy for the target user;
[0020] When the TCP proxy data volume for the target user reaches a first preset data volume threshold, the TCP proxy for the target user is exited.
[0021] Optionally, the processor is further configured to read a computer program in the memory and perform the following operations:
[0022] After exiting the TCP proxy for the target user, determining whether the TCP session of the target user is ended;
[0023] If the TCP session of the target user is not ended, the TCP proxy for the target user enters a cooling-down state;
[0024] When the cooling time reaches the preset time threshold and / or the cooling data volume reaches the second preset data volume threshold, return to execute the step of determining whether the memory occupancy rate of the base station is greater than the TCP proxy memory threshold for the target user; wherein the cooling data volume is the TCP service data volume of the target user when the TCP proxy of the target user enters the cooling period.
[0025] Optionally, the processor is further configured to read a computer program in the memory and perform the following operations:
[0026] If it is determined that the memory occupancy rate of the target user is greater than the TCP proxy memory threshold, the memory judgment cooling time is entered for the target user. When the memory judgment cooling time reaches the preset cooling time threshold, the process returns to the step of determining whether the memory occupancy rate of the base station is greater than the TCP proxy memory threshold for the target user.
[0027] Optionally, the processor is further configured to read a computer program in the memory and perform the following operations:
[0028] After the target user establishes a TCP link, performing initial TCP proxy for the target user;
[0029] Exit the initial TCP proxy and execute the step of determining, for the target user, whether the memory occupancy rate of the base station is greater than the TCP proxy memory threshold.
[0030] In a third aspect of an embodiment of the present invention, a TCP proxy device is further provided, the device comprising:
[0031] The first entry module is used to determine whether the memory occupancy rate of the base station is greater than the transmission control protocol TCP proxy memory threshold for the target user; if not, detect whether the TCP flow RTT of the target user is greater than the RTT threshold; if it is detected that the number of times the TCP flow round-trip time RTT of the target user is greater than the RTT threshold reaches a preset number threshold, enter the TCP proxy for the target user;
[0032] The first exit module is configured to exit the TCP proxy for the target user when the TCP proxy data volume for the target user reaches a first preset data volume threshold.
[0033] Optionally, the device further comprises:
[0034] A first judgment module, used for judging whether the TCP session of the target user is ended after the TCP proxy for the target user is exited;
[0035] A second entry module, configured to cause the TCP proxy for the target user to enter a cooling state if the TCP session of the target user has not ended;
[0036] The first cooling module triggers the first entry module when the cooling time reaches a preset time threshold and / or the cooling data volume reaches a second preset data volume threshold; wherein the cooling data volume is the TCP business data volume of the target user during the cooling period of the TCP proxy of the target user.
[0037] Optionally, the device further comprises:
[0038] The second cooling module is used to determine the cooling time of the memory for the target user if the memory occupancy rate is greater than the TCP proxy memory threshold for the target user, and trigger the first entry module when the memory judgment cooling time reaches the preset cooling time threshold.
[0039] Optionally, the device further comprises:
[0040] A proxy module, used for performing initial TCP proxy for the target user after the target user establishes a TCP link;
[0041] The second exit module is used to exit the initial TCP proxy and trigger the first entry module.
[0042] In a fourth aspect of the implementation of the present invention, a computer-readable storage medium is further provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the computer program implements any of the above-mentioned TCP proxy methods.
[0043] In a fifth aspect of the embodiments of the present invention, a computer program product comprising instructions is also provided, which, when executed on a computer, enables the computer to execute any one of the above-described TCP proxy methods.
[0044] Beneficial effects of the embodiments of the present invention:
[0045] A TCP proxy method, base station and device provided by an embodiment of the present invention can determine whether the memory occupancy rate of the base station is greater than the TCP proxy memory threshold for a target user. If not, detect whether the TCP stream RTT of the target user is greater than the RTT threshold. If it is detected that the number of times the TCP stream RTT of the target user is greater than the RTT threshold reaches a preset number threshold, enter the TCP proxy for the target user. When the TCP proxy data volume for the target user reaches a first preset data volume threshold, exit the TCP proxy for the target user. Compared with the prior art, the present scheme controls the triggering and exiting judgments of the TCP proxy through parameter thresholds, and can trigger the TCP proxy again when it is detected that the number of times the TCP stream RTT of the target user is greater than the RTT threshold reaches a preset number threshold, which can effectively reduce the transmission data delay and improve the rate. At the same time, because the present scheme enters the TCP proxy when the memory occupancy rate of the base station does not exceed the TCP proxy memory threshold, and exits the TCP proxy for the target user when the TCP proxy data volume for the target user reaches the first preset data volume threshold, the base station load can be protected and the stability of the TCP proxy process can be ensured. Under the premise of intelligently protecting the base station load, targeted protection is provided for users with high latency, effectively reducing the latency of data transmission and improving the overall rate. At present, the improvement of latency perception and rate perception of 5G users is also the focus of mobile communication work. The implementation of this solution can effectively improve product competitiveness.
[0046] Of course, it is not necessary to achieve all of the advantages described above at the same time to implement any product or method of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other embodiments can also be obtained based on these drawings.
[0048] Figure 1A schematic diagram of base station packet capture log analysis based on Wireshark software;
[0049] Figure 2 A schematic diagram of a flow chart of a TCP proxy method provided by an embodiment of the present invention;
[0050] Figure 3 A schematic diagram of a TCP proxy principle;
[0051] Figure 4 A schematic diagram of a flow chart of another TCP proxy method provided by an embodiment of the present invention;
[0052] Figure 5 A schematic diagram of the structure of a base station provided in an embodiment of the present invention;
[0053] Figure 6 A schematic diagram of the structure of a TCP proxy device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0054] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field based on this application belong to the scope of protection of the present invention.
[0055] In the prior art, TCP proxy is used as a strategy to improve end-to-end latency. The current implementation schemes are all triggered to take effect from the time the base station establishes a TCP link with the target user. This scheme has a very obvious improvement effect on the transmission of small packet services, such as instant messaging and page opening. However, considering factors such as the memory usage and processing load of the base station, the amount of proxy data is limited, and the proxy is generally only effective for 200 to 300kb (Kbytes, kilobytes) of data, and then it is no longer effective. Therefore, this implementation scheme has a very limited effect on the transmission of large packet data services, such as streaming media, high-definition images and other data packets, as well as file transfers, APP installation packages, etc. As shown in Table 1, Table 1 is a schematic table of the transmission rate of large packet services transmitted using the TCP proxy solution of the prior art. In Table 1, taking Address A: 10.79.67.247 as the client, Address B: 120.204.17.104 as the server, and the client Port A as 39498 as an example, Bytes B→A represents the amount of downlink data, which is 10M, and Bits / s B represents the downlink rate, which is less than 3951Bits / s, and the rate is relatively low.
[0056] Table 1
[0057] Address A Port A Address B Bytes B→A Bits / s B→A 10.79.67.247 39498 120.204.17.104 10M 3951k
[0058] In order to more intuitively reflect the limitations of the existing TCP proxy solution for proxying large packet data services, see Figure 1 , Figure 1 This is a schematic diagram of base station packet capture log analysis based on Wireshark software. Figure 1 In the figure, the horizontal axis represents time in seconds. The vertical axis represents the round trip time in milliseconds. Figure 1 As shown in the figure, during the effective stage of TCP proxy, RTT is very low, but after this stage, the overall rate is low due to the large delay on the wireless side. It can be seen that the existing TCP proxy solution only performs TCP proxy at the beginning, which has no obvious effect on the overall RTT and overall rate improvement of large packet data services.
[0059] In order to solve the above technical problems, the present application embodiment provides a TCP proxy method, such as Figure 2 As shown, Figure 2 A flow chart of a TCP proxy method provided by an embodiment of the present invention is provided. The method is applied to a base station and comprises the following steps:
[0060] Step S201, for the target user, determine whether the memory occupancy rate of the base station is greater than the TCP proxy memory threshold. If not, detect whether the TCP stream RTT of the target user is greater than the RTT threshold. If it is detected that the number of times the TCP stream RTT of the target user is greater than the RTT threshold reaches a preset number threshold, enter the TCP proxy for the target user.
[0061] For further explanation of the TCP proxy principle, see Figure 3 , Figure 3 This is a schematic diagram of the TCP proxy principle, taking the transmission of data from a server to a user terminal as an example. Taking the base station as eNB (Evolved Node B, the name of the base station in LTE) as an example, the base station caches the data after receiving the TCP DATA (TCP data packet) sent by the server, and performs a local base station response (ACK, Acknowledgment) on behalf of the user terminal (UE). After receiving the local response from the base station, the server will continue to send data to the user terminal, and the base station will continue to cache on behalf of the user terminal until the amount of proxy data reaches the threshold and stops.
[0062] At the same time, the base station will send data according to the user terminal response (UE ACK), send the data cached in the base station to the user terminal, and discard the user terminal response, that is, the base station does not send the user terminal response to the server. After the base station has sent all the proxy data to the user terminal and received the user terminal response, the base station can delete the data and start transparent transmission of the UE response and request. Among them, transparent transmission means that the base station is only responsible for transferring the services that need to be transmitted, and does not process the transmitted services.
[0063] During TCP proxy, for the server, the base station replaces the user terminal, and the server only needs to transmit data to the base station and receive the response from the base station. For the user terminal, the base station replaces the server, and the user terminal only needs to receive the data transmitted by the base station and send a response to the base station. In this way, the delay between the server and the terminal can be reduced, achieving the purpose of improving the data transmission rate.
[0064] As can be seen from the above, the TCP proxy needs to cache service data in the base station. When the memory usage of the base station is too high, it may cause the base station memory to be overloaded and abnormalities may occur.
[0065] Based on this, in the embodiment of the present application, for the target user (the base station can identify the target user through the UE ID (Identity)), the memory occupancy rate of the base station is judged before entering the TCP proxy. The target user can be any user terminal that has established a TCP link. In this solution, each user terminal is judged separately.
[0066] Specifically, a TCP proxy memory threshold is pre-set, and the TCP proxy memory threshold is used to determine whether the current memory usage of the base station supports TCP proxy for users. Because when the current memory usage is greater than the TCP proxy threshold, if a new TCP proxy is still performed, the base station's memory will be over-occupied, affecting its stability. Therefore, TCP proxy is allowed only when the current memory usage of the base station is not greater than the TCP proxy memory threshold.
[0067] In this embodiment, the TCP stream RTT of the target user refers to the time it takes for service data to be sent from the sender to the receiver and back.
[0068] During network transmission, due to network fluctuations, the TCP stream RTT of the target user may suddenly increase, but it will recover in a short time. If the TCP proxy is entered only once when the TCP stream RTT of the target user is greater than the RTT threshold, multiple users may frequently trigger the TCP proxy step, which will put a lot of pressure on the memory usage of the base station and easily affect the normal operation of the base station. That is, the memory usage rate of the base station will easily exceed the TCP proxy memory threshold, which will in turn affect other services of the base station. Therefore, in order to avoid the accidental increase in RTT caused by such network fluctuations, a preset number threshold can be set. The preset number threshold is used to judge the number of times the TCP stream RTT of the target user is greater than the RTT threshold to determine that the user is indeed in a high-latency network environment.
[0069] For example, the RTT threshold is set to 100ms (millisecond), and the preset number threshold is 3 times. For user 1, it is detected that the RTT of the TCP stream of user 1 is 95ms, which is not greater than the RTT threshold. Therefore, the TCP proxy for user 1 is not entered at this time. If it is subsequently detected that the RTT of the TCP stream of user 1 exceeds 100ms twice, the number of times that the RTT of the TCP stream of user 1 exceeds the RTT threshold does not reach the preset number threshold. Therefore, in this case, it can be considered that a temporary network fluctuation has occurred, and the TCP proxy for user 2 will not be entered. Until it is detected that the RTT of the TCP stream of user 1 is greater than the RTT threshold for 3 times, the TCP proxy for user 1 is entered.
[0070] Step S202: when the TCP proxy data volume for the target user reaches a first preset data volume threshold, exit the TCP proxy for the target user.
[0071] For base stations with limited memory, it is often necessary to perform TCP proxy for multiple users. Therefore, in order to avoid the situation where the base station always performs TCP proxy for a certain user, resulting in excessive memory usage of the base station, in the embodiment of the present application, a first preset data volume threshold is set. When the TCP proxy data volume for the target user reaches the first preset data volume threshold, the TCP proxy for the target user is exited to prevent the user from occupying more base station resources. Among them, the first preset data volume can be reasonably set according to the business data size of the target user, the memory size of the base station, and the number of users covered by the base station.
[0072] For example, the first preset data volume threshold is set to 200 kb. When the proxy data volume for user 1 reaches 200 kb, the TCP proxy for user 1 will be exited to prevent user 1 from occupying too much base station memory and resources.
[0073] In this embodiment, it is possible to determine whether the memory occupancy rate of the base station is greater than the TCP proxy memory threshold for the target user. If not, detect whether the TCP stream RTT of the target user is greater than the RTT threshold. If it is detected that the number of times the TCP stream RTT of the target user is greater than the RTT threshold reaches a preset number threshold, enter the TCP proxy for the target user. When the TCP proxy data volume for the target user reaches the first preset data volume threshold, exit the TCP proxy for the target user. Compared with the prior art, this solution realizes a truly intelligent dynamic TCP proxy. The triggering and exit judgment of the TCP proxy are controlled by parameter thresholds, and the function of multiple precise acceleration is realized. When it is detected that the TCP stream RTT of the target user is greater than the RTT threshold and reaches a preset number threshold, the TCP proxy can be triggered again, which can protect high-latency points in a targeted manner, effectively improve the use efficiency and effect of the TCP proxy, reduce the transmission data delay, and increase the transmission rate.
[0074] At the same time, because this solution enters the TCP proxy when the memory occupancy rate of the base station does not exceed the TCP proxy memory threshold, and exits the TCP proxy for the target user when the TCP proxy data volume for the target user reaches the first preset data volume threshold, it can avoid base station overload and ensure the stability of the TCP proxy process. Under the premise of intelligent protection of base station load, targeted protection is provided for high-latency users, effectively reducing the transmission data delay and improving the overall rate. In addition, the current work on improving the latency perception and rate perception of 5G users is also the focus of mobile communications work. Implementing this solution can effectively enhance product competitiveness.
[0075] For the target user, after passing through a TCP proxy, the data that the target user needs to transmit may not have been transmitted, and the target user may still be in a high-latency network environment. Therefore, after exiting the TCP proxy for the target user, it is also necessary to determine whether the TCP session of the target user has ended. If the TCP session of the target user has ended, the entire TCP proxy process for the target user can be ended. If the TCP session of the target user has not ended, in order to avoid the target user frequently triggering the step of re-entering the TCP proxy, which occupies too much memory of the base station and causes the target user to occupy too many base station resources, the TCP proxy for the target user can be put into cooling mode.
[0076] In an embodiment of the present invention, there are three ways to judge when to return to the aforementioned step of judging whether the memory occupancy rate of the base station is greater than the TCP proxy memory threshold for the target user after the target user enters the cooling-down state. After the TCP proxy for the target user enters the cooling-down state, when the cooling-down time reaches the preset time threshold and / or the cooling data volume reaches the second preset data volume threshold, the aforementioned step of judging whether the memory occupancy rate of the base station is greater than the TCP proxy memory threshold for the target user can be returned to. Among them, the cooling data volume is the TCP service data volume (non-TCP proxy data volume) of the target user during the cooling-down period of the TCP proxy of the target user. The details are as follows:
[0077] Method 1: Determine whether the cooling time after the target user enters cooling mode reaches a preset time threshold.
[0078] When the cooling time of the target user reaches the preset time threshold, the process returns to the above step of determining whether the memory occupancy rate of the base station is greater than the TCP proxy memory threshold for the target user.
[0079] For example, for user 1, the preset duration threshold is set to 3s. When the cooling time of user 1 is 2s, the cooling time does not reach the preset threshold duration, so the step of determining whether the memory occupancy rate of the base station is greater than the TCP proxy memory threshold for user 1 will not be triggered. Only when the cooling time of user 1 reaches 3s can the step of determining whether the memory occupancy rate of the base station is greater than the TCP proxy memory threshold for user 1 be returned to.
[0080] Method 2: determining whether the cooling data volume of the target user after entering cooling reaches a second preset data volume threshold.
[0081] When the cooling data volume of the target user reaches the second preset data volume threshold, the process returns to the above step of determining whether the memory occupancy rate of the base station is greater than the TCP proxy memory threshold for the target user.
[0082] For example, the second preset data volume threshold is set to 1MB (Megabyte) for user 2. When the cooling data volume of user 2 after entering cooling accumulates to 1MB, the step of determining whether the memory occupancy rate of the base station is greater than the TCP proxy memory threshold for user 2 is returned to execution.
[0083] Mode 3, determining whether the cooling time after the target user enters cooling has reached a preset time threshold and whether the cooling data volume has reached a second preset data volume threshold.
[0084] For example, for user 3, the preset duration threshold is set to 5s, and the second preset data volume threshold is set to 1MB. After user 3 enters cooling, if the cooling duration is 2ms and the cooling data volume is 1MB, since the cooling duration does not reach 3ms, the step of determining whether the memory occupancy rate of the base station is greater than the TCP proxy memory threshold for user 3 is not entered.
[0085] Similarly, after user 3 enters cooling, if the cooling time is 3ms and the cooling data volume is 0.8MB, since the cooling data volume does not reach 1MB, the step of determining whether the memory occupancy rate of the base station is greater than the TCP proxy memory threshold for user 3 is not entered.
[0086] Until user 3 enters the cooling stage, the cooling time reaches 5s and the cooling data volume reaches 1MB. At this time, the cooling time after the target user enters the cooling stage reaches the preset time threshold, and the cooling data volume reaches the second preset data volume threshold. Therefore, the step of determining whether the memory occupancy rate of the base station is greater than the TCP proxy memory threshold is entered for user 3.
[0087] In this embodiment, by determining for the target user whether the cooling time reaches a preset time threshold and / or whether the cooling data volume reaches a second preset data volume threshold, the interval for the target user to trigger the TCP proxy again is controlled. This can avoid frequent triggering of high-latency TCP proxy due to factors such as poor air interface (interface between the terminal and the base station) quality and poor user terminal performance, thereby further ensuring the stability of the TCP proxy process.
[0088] In the embodiment of the present invention, if the memory occupancy rate is greater than the TCP proxy memory threshold for the target user, it means that the memory occupancy rate of the base station is too high, the base station is overloaded, and the TCP proxy cannot be entered for the target user. However, because the memory occupancy rate of the base station changes in real time, the user can repeatedly perform the step of determining whether the memory occupancy rate of the base station is greater than the TCP proxy memory threshold, so as to enter the TCP proxy immediately when the base station load is low.
[0089] It is understandable that the memory occupancy rate of the base station does not change significantly in a very short period of time. At the same time, frequently triggering the step of judging the memory occupancy rate of the base station will affect the stability of the base station. Therefore, this situation can be avoided by setting a preset cooling time threshold. If the memory occupancy rate of the target user is judged to be greater than the TCP proxy memory threshold, the memory judgment cooling time is entered for the target user. When the memory judgment cooling time reaches the preset cooling time threshold, it returns to the step of judging whether the memory occupancy rate of the base station is greater than the TCP proxy memory threshold for the target user. In this way, the TCP proxy function can be performed on the basis of ensuring the stable operation of the base station to reduce the end-to-end delay.
[0090] This solution is not mutually exclusive with the existing TCP proxy solution. The TCP proxy method provided by the embodiment of the present invention can take effect after the user's initial TCP proxy ends. After the target user establishes a TCP link, the initial TCP proxy is performed for the target user. After entering the initial TCP proxy for the target user, the initial TCP proxy can be exited when the initial TCP proxy data volume for the target user reaches a preset initial data volume threshold. Or, the initial TCP proxy can be exited when the initial TCP proxy duration for the target user reaches a preset initial duration threshold. Based on this, after determining that the target user exits the initial proxy, the TCP proxy steps provided by the embodiment of the present invention are executed. The initial TCP proxy is the TCP proxy solution in the prior art, and the initial TCP proxy is only triggered to take effect when the base station and the target user establish a TCP link.
[0091] For further explanation of the TCP proxy method, see Figure 4 , Figure 4 This is a flow chart of another TCP proxy method provided by an embodiment of the present invention. The method is applied to a base station. The parameter thresholds shown in Table 2 can be set on the base station software.
[0092] Table 2
[0093]
[0094] The following will be combined Figure 4 Each step in the specific flow chart further explains the parameters in Table 2.
[0095] Step S401, user service data starts.
[0096] Whether the user's data service has started can be determined based on the SYN (Synchronize Sequence Numbers) of the three-way handshake as an identifier.
[0097] The steps of the three-way handshake are briefly as follows:
[0098] First handshake: The user terminal sends a connection request packet with a SYN flag to the server and waits for the server to confirm;
[0099] Second handshake: After receiving the SYN packet, the server will send a connection request and response data packet with a SYN+ACK flag to the user terminal;
[0100] The third handshake: After receiving the connection request and response data packet with the SYN+ACK flag, the user terminal will respond with a data packet with the ACK flag to the server.
[0101] The purpose of the TCP three-way handshake is to establish a connection between the user terminal and the server, synchronize the sending and receiving of data, and facilitate subsequent data exchange transmission.
[0102] Step S402: The user enters the traditional TCP proxy process.
[0103] The user can choose whether to enter the traditional proxy mode (ie the aforementioned initial TCP proxy), and the TCP proxy method provided by the embodiment of the present invention must take effect after the traditional TCP proxy ends. Step S402 can be retained or omitted according to actual conditions.
[0104] Step S403, judging whether the user can trigger the high-latency TCP proxy through parameter 1.
[0105] The TCP proxy needs to cache data in the base station. When the base station memory usage is high, the base station load may be too high and unstable, leading to other abnormalities. Therefore, it is necessary to use parameter 1 (base station TCP proxy memory usage threshold) to determine whether the base station memory usage is greater than this value. If it is greater than this value, the target user will not enter the high-latency TCP proxy process. The unit of the base station TCP proxy memory usage threshold is kb.
[0106] Step S404: whether the thresholds corresponding to parameter 2 and parameter 3 are reached respectively.
[0107] When the memory occupancy rate of the base station does not reach the base station TCP proxy occupied memory threshold, the step of determining whether high delay occurs in the TCP session of the target user is entered. In order to avoid the accidental increase of RTT caused by network fluctuations and other situations, the parameter 2 (triggering high-delay TCP proxy RTT threshold) and parameter 3 (triggering high-delay TCP proxy RTT threshold number) can be used to determine whether the target user is indeed in a high-delay network environment. Specifically, if in a user's TCP session, it is detected that the RTT of the user's TCP stream reaches the triggering high-delay TCP proxy RTT threshold, and the number of times the user's TCP stream RTT reaches the triggering high-delay TCP proxy RTT threshold reaches the triggering high-delay TCP proxy RTT threshold number, it means that the TCP session of the target user has high delay, and step S405 is executed to enter the high-delay TCP proxy.
[0108] For example, set parameter 2 (RTT threshold for triggering high-latency TCP proxy) to 100ms, and set parameter 3 (RTT threshold number for triggering high-latency TCP proxy) to 3 times. If the RTT of user 1's TCP session exceeds 100ms three times, the high-latency TCP proxy is triggered for user 1. If both parameters do not meet the conditions, the high-latency TCP proxy process will not be entered.
[0109] Step S405, entering the high-latency TCP proxy.
[0110] When it is determined that the target user is in a high-latency network environment, the target user enters a high-latency TCP proxy, and the high-latency points are protected in a targeted manner to reduce the delay in transmitting data.
[0111] Step S406: When the threshold corresponding to parameter 4 is reached, the high-latency TCP proxy is exited.
[0112] Because a base station needs to perform TCP proxy for multiple users, considering the occupancy rate of the base station memory and the stability of the base station, it is necessary to set the threshold corresponding to parameter 4 (high-latency TCP proxy proxy data volume). The high-latency TCP proxy proxy data volume refers to the TCP data volume that can be proxied by a single user when the high-latency TCP proxy is triggered. For a single user, each time the high-latency TCP proxy takes effect, only the data volume set by this parameter is proxied. When the set value is reached, the feature becomes invalid, that is, the high-latency TCP proxy for the user is stopped so that the base station can perform TCP proxy for other users.
[0113] Step S407, determining whether the user TCP session is ended.
[0114] After exiting the high-latency TCP proxy for the target user, it is necessary to determine whether the TCP session of the user has ended, that is, it is necessary to determine whether the TCP service of the target user has completely ended. If so, no subsequent judgment is made and the high-latency TCP proxy process ends. If not, step S408 is executed to trigger and determine the thresholds corresponding to parameters 5 and 6.
[0115] Step S408, triggering and determining the thresholds corresponding to parameter 5 and parameter 6 respectively.
[0116] If the TCP session of the target user has not ended, in order to avoid the frequent triggering of the high-latency TCP proxy due to factors such as poor air interface quality and poor terminal performance, it is necessary to control the interval at which the target user triggers the high-latency TCP proxy again through the threshold corresponding to parameter 5 (the amount of data in the high-latency TCP proxy interval) and the threshold corresponding to parameter 6 (the duration of the high-latency TCP proxy interval). When the amount of data in the interval and the duration of the interval reach the set value, the judgment process of triggering step S403 will be entered again. If the amount of cooling data after exiting the high-latency TCP proxy does not reach the amount of data in the high-latency TCP proxy interval, or the cooling duration after exiting the high-latency TCP proxy does not reach the duration of the high-latency TCP proxy interval, step S403 will not be entered to re-judge the triggering of the high-latency TCP proxy process.
[0117] Step S409, enter the high-latency TCP proxy to determine the cooling time, and set the cooling time based on parameter 7.
[0118] When the memory occupancy rate of the base station is greater than the memory occupancy threshold of the base station TCP proxy in step S403, the high-latency TCP proxy will not be triggered. At this time, the cooling state can be entered through the setting value of parameter 7 (judgment interval duration for triggering the high-latency TCP proxy memory occupancy). When the judgment interval duration for triggering the high-latency TCP proxy memory occupancy fails, that is, the user fails to trigger the high-latency TCP proxy due to the memory occupancy threshold of the base station TCP proxy, and the cooling time reaches parameter 7, the base station memory judgment process is entered again to re-judge the base station memory occupancy rate through parameter 1 (base station TCP proxy memory occupancy threshold).
[0119] Step S410, the process ends.
[0120] After determining that the target user's TCP service is finished, the high-latency TCP proxy process ends.
[0121] In this embodiment, the TCP proxy process is controlled by presetting multiple parameter thresholds. Compared with the prior art, the high-latency TCP proxy can be entered after the detection user reaches the triggering high-latency TCP proxy RTT threshold and reaches the triggering high-latency TCP proxy RTT threshold number. At the same time, the time when the target user enters the high-latency TCP proxy again is controlled by the high-latency TCP proxy interval data volume, the high-latency TCP proxy interval length, and the judgment interval length of the triggering high-latency TCP proxy memory occupancy, so as to realize intelligent identification of high-latency users and accurately accelerate the high-latency points of the user, effectively improve the use efficiency and effect of the TCP proxy, and improve the user's latency and rate perception. And after the memory occupancy rate of the base station reaches the base station TCP proxy memory occupancy threshold, the subsequent steps are executed, and at the same time, when the proxy data volume for a single user reaches the high-latency TCP proxy proxy data volume, the high-latency TCP proxy is exited, ensuring the stability of the TCP proxy.
[0122] Based on the same inventive concept, the present application accordingly provides a base station, such as Figure 5 As shown, Figure 5 A schematic diagram of the structure of a base station provided in an embodiment of the present invention, the base station includes a memory 501, a transceiver 502, and a processor 503:
[0123] Memory 501, used for storing computer programs;
[0124] A transceiver 502, configured to send and receive data under the control of the processor 503;
[0125] The processor 503 is configured to read the computer program in the memory 501 and perform the following operations:
[0126] For the target user, determine whether the memory usage of the base station is greater than the TCP proxy memory threshold; if not, detect whether the TCP flow RTT of the target user is greater than the RTT threshold; if it is detected that the number of times the TCP flow RTT of the target user is greater than the RTT threshold reaches a preset number threshold, enter the TCP proxy for the target user;
[0127] When the TCP proxy data volume for the target user reaches a first preset data volume threshold, the TCP proxy for the target user is exited.
[0128] Among them, Figure 5 In the embodiment, the bus architecture may include any number of interconnected buses and bridges, specifically one or more processors represented by processor 503 and various circuits of memory represented by memory 501 are linked together. The bus architecture may also link together various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface. The transceiver 502 may be a plurality of components, namely, a transmitter and a receiver, providing a unit for communicating with various other devices on a transmission medium, which may include a wireless channel, a wired channel, an optical cable, and other transmission media. The processor 503 is responsible for managing the bus architecture and general processing, and the memory 501 may store data used by the processor 503 when performing operations.
[0129] The memory 501 may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0130] The processor 503 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or a complex programmable logic device (CPLD). The processor may also adopt a multi-core architecture.
[0131] Using the base station provided by the embodiment of the present invention, for a target user, it is determined whether the memory occupancy rate of the base station is greater than the TCP proxy memory threshold. If not, it is detected whether the TCP stream RTT of the target user is greater than the RTT threshold. If it is detected that the number of times the TCP stream RTT of the target user is greater than the RTT threshold reaches a preset number threshold, the TCP proxy for the target user is entered. When the TCP proxy data volume for the target user reaches a first preset data volume threshold, the TCP proxy for the target user is exited.
[0132] Compared with the prior art, this solution can trigger the TCP proxy when it detects that the number of times the TCP stream RTT of the target user exceeds the RTT threshold reaches the preset number threshold, which can protect the high latency points in a targeted manner, effectively improve the efficiency and effect of the TCP proxy, reduce the transmission data delay, and increase the transmission rate. At the same time, because this solution enters the TCP proxy when the memory occupancy rate of the base station does not exceed the TCP proxy memory threshold, and exits the TCP proxy for the target user when the TCP proxy data volume for the target user reaches the first preset data volume threshold, it can avoid overloading the base station and ensure the stability of the TCP proxy process.
[0133] In a possible embodiment, the processor is further configured to read a computer program in the memory and perform the following operations:
[0134] After exiting the TCP proxy for the target user, determine whether the TCP session of the target user is ended;
[0135] If the target user's TCP session is not ended, the TCP proxy for the target user enters a cooldown;
[0136] When the cooling time reaches the preset time threshold and / or the cooling data volume reaches the second preset data volume threshold, return to execute the step of determining whether the memory occupancy rate of the base station is greater than the TCP proxy memory threshold for the target user; wherein the cooling data volume is the TCP service data volume of the target user when the TCP proxy of the target user enters the cooling period.
[0137] In a possible embodiment, the processor is further configured to read a computer program in the memory and perform the following operations:
[0138] If the memory occupancy rate for the target user is greater than the TCP proxy memory threshold, the memory judgment cooling time is entered for the target user. When the memory judgment cooling time reaches the preset cooling time threshold, the process returns to the step of judging whether the memory occupancy rate of the base station is greater than the TCP proxy memory threshold for the target user.
[0139] In a possible embodiment, the processor is further configured to read a computer program in the memory and perform the following operations:
[0140] After the target user establishes a TCP link, an initial TCP proxy is performed for the target user;
[0141] Exit the initial TCP proxy and execute the step of determining, for the target user, whether the memory usage of the base station is greater than the TCP proxy memory threshold.
[0142] Based on the same inventive concept, the present application correspondingly provides a TCP proxy device, such as Figure 6 As shown, Figure 6 A schematic diagram of the structure of a TCP proxy device provided by an embodiment of the present invention includes:
[0143] The first entry module 601 is used to determine whether the memory occupancy rate of the base station is greater than the TCP proxy memory threshold for the target user; if not, detect whether the TCP stream RTT of the target user is greater than the RTT threshold; if it is detected that the number of times the TCP stream RTT of the target user is greater than the RTT threshold reaches a preset number threshold, enter the TCP proxy for the target user;
[0144] The first exit module 602 exits the TCP proxy for the target user when the TCP proxy data volume for the target user reaches a first preset data volume threshold.
[0145] A TCP proxy device provided by an embodiment of the present invention is applied. The first entry module 601 determines whether the memory occupancy rate of the base station is greater than the TCP proxy memory threshold for the target user. If not, detect whether the TCP stream RTT of the target user is greater than the RTT threshold. If it is detected that the number of times the TCP stream RTT of the target user is greater than the RTT threshold reaches a preset number threshold, enter the TCP proxy for the target user. When the TCP proxy data volume for the target user reaches the first preset data volume threshold, the TCP proxy for the target user is exited by the first exit module 602.
[0146] Compared with the prior art, this solution can trigger the TCP proxy when it detects that the number of times the TCP stream RTT of the target user exceeds the RTT threshold reaches the preset number threshold, which can protect the high latency points in a targeted manner, effectively improve the efficiency and effect of the TCP proxy, reduce the transmission data delay, and increase the transmission rate. At the same time, because this solution enters the TCP proxy when the memory occupancy rate of the base station does not exceed the TCP proxy memory threshold, and exits the TCP proxy for the target user when the TCP proxy data volume for the target user reaches the first preset data volume threshold, it can avoid overloading the base station and ensure the stability of the TCP proxy process.
[0147] In a possible embodiment, the device further includes:
[0148] A first judgment module is used to judge whether the TCP session of the target user is ended after exiting the TCP proxy for the target user;
[0149] A second entry module is used for causing the TCP proxy for the target user to enter a cooling state if the TCP session of the target user has not ended;
[0150] The first cooling module triggers the first entry module when the cooling time reaches a preset time threshold and / or the cooling data volume reaches a second preset data volume threshold; wherein the cooling data volume is the TCP business data volume of the target user during the cooling period of the target user's TCP proxy.
[0151] In a possible embodiment, the device further includes:
[0152] The second cooling module is used to determine the memory cooling time for the target user if the memory occupancy rate for the target user is greater than the TCP proxy memory threshold. When the memory cooling time reaches the preset cooling time threshold, the first entry module is triggered.
[0153] In a possible embodiment, the device further includes:
[0154] The proxy module is used to perform initial TCP proxy for the target user after the target user establishes a TCP link;
[0155] The second exit module is used to exit the initial TCP proxy and trigger the first entry module.
[0156] In another embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the steps of any one of the above-mentioned TCP proxy methods are implemented.
[0157] In another embodiment of the present invention, a computer program product including instructions is provided. When the computer program product is run on a computer, the computer executes any one of the TCP proxy methods in the above embodiments.
[0158] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. 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 computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). 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 includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.
[0159] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0160] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the base station, device, computer-readable storage medium, and computer program product embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0161] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.
Claims
1. A TCP proxy method, characterized in that: The method comprises: For the target user, determine whether the memory occupancy rate of the base station is greater than the transmission control protocol TCP proxy memory threshold; if not, detect whether the TCP flow round-trip time RTT of the target user is greater than the RTT threshold; if it is detected that the number of times the TCP flow RTT of the target user is greater than the RTT threshold reaches a preset number threshold, enter the TCP proxy for the target user; When the TCP proxy data volume for the target user reaches a first preset data volume threshold, the TCP proxy for the target user is exited.
2. The method according to claim 1, characterized in that After exiting the TCP proxy for the target user, the method further includes: Determine whether the TCP session of the target user is ended; If the TCP session of the target user is not ended, the TCP proxy for the target user enters a cooling-down state; When the cooling time reaches the preset time threshold and / or the cooling data volume reaches the second preset data volume threshold, return to execute the step of determining whether the memory occupancy rate of the base station is greater than the TCP proxy memory threshold for the target user; wherein the cooling data volume is the TCP service data volume of the target user when the TCP proxy of the target user enters the cooling period.
3. The method according to claim 1 or 2, characterized in that: The method further comprises: If it is determined that the memory occupancy rate of the target user is greater than the TCP proxy memory threshold, the memory judgment cooling time is entered for the target user. When the memory judgment cooling time reaches the preset cooling time threshold, the process returns to the step of determining whether the memory occupancy rate of the base station is greater than the TCP proxy memory threshold for the target user.
4. The method according to claim 3, characterized in that The method further comprises: After the target user establishes a TCP link, performing initial TCP proxy for the target user; Exit the initial TCP proxy and execute the step of determining, for the target user, whether the memory occupancy rate of the base station is greater than the TCP proxy memory threshold.
5. A base station, characterized in that: Including memory, transceiver, processor: A memory for storing a computer program; a transceiver for transmitting and receiving data under the control of the processor; and a processor for reading the computer program in the memory and performing the following operations: For the target user, determine whether the memory occupancy rate of the base station is greater than the transmission control protocol TCP proxy memory threshold; if not, detect whether the TCP flow round-trip time RTT of the target user is greater than the RTT threshold; If it is detected that the number of times that the TCP flow RTT of the target user is greater than the RTT threshold reaches a preset number threshold, enter the TCP proxy for the target user; When the TCP proxy data volume for the target user reaches a first preset data volume threshold, the TCP proxy for the target user is exited.
6. The base station according to claim 5, characterized in that The processor is further configured to read the computer program in the memory and perform the following operations: After exiting the TCP proxy for the target user, determining whether the TCP session of the target user is ended; If the TCP session of the target user is not ended, the TCP proxy for the target user enters a cooling-down state; When the cooling time reaches the preset time threshold and / or the cooling data volume reaches the second preset data volume threshold, return to execute the step of determining whether the memory occupancy rate of the base station is greater than the TCP proxy memory threshold for the target user; wherein the cooling data volume is the TCP service data volume of the target user when the TCP proxy of the target user enters the cooling period.
7. The base station according to claim 5 or 6, characterized in that: The processor is further configured to read the computer program in the memory and perform the following operations: If it is determined that the memory occupancy rate of the target user is greater than the TCP proxy memory threshold, the memory judgment cooling time is entered for the target user. When the memory judgment cooling time reaches the preset cooling time threshold, the process returns to the step of determining whether the memory occupancy rate of the base station is greater than the TCP proxy memory threshold for the target user.
8. The base station according to claim 7, characterized in that: The processor is further configured to read the computer program in the memory and perform the following operations: After the target user establishes a TCP link, performing initial TCP proxy for the target user; Exit the initial TCP proxy and execute the step of determining, for the target user, whether the memory occupancy rate of the base station is greater than the TCP proxy memory threshold.
9. A TCP proxy device, characterized in that: The device comprises: The first entry module is used to determine whether the memory occupancy rate of the base station is greater than the transmission control protocol TCP proxy memory threshold for the target user; if not, detect whether the TCP flow RTT of the target user is greater than the RTT threshold; if it is detected that the number of times the TCP flow round-trip time RTT of the target user is greater than the RTT threshold reaches a preset number threshold, enter the TCP proxy for the target user; The first exit module is configured to exit the TCP proxy for the target user when the TCP proxy data volume for the target user reaches a first preset data volume threshold.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.