CN117240823B - Generalized network intelligent optimization method and generalized network intelligent optimization terminal - Google Patents

Generalized network intelligent optimization method and generalized network intelligent optimization terminal Download PDF

Info

Publication number
CN117240823B
CN117240823B CN202311489314.8A CN202311489314A CN117240823B CN 117240823 B CN117240823 B CN 117240823B CN 202311489314 A CN202311489314 A CN 202311489314A CN 117240823 B CN117240823 B CN 117240823B
Authority
CN
China
Prior art keywords
server
network
nat
nat server
dns
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311489314.8A
Other languages
Chinese (zh)
Other versions
CN117240823A (en
Inventor
范宏杰
郑长水
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fast Cloud Shanghai Network Technology Co ltd
Original Assignee
Fast Cloud Shanghai Network Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fast Cloud Shanghai Network Technology Co ltd filed Critical Fast Cloud Shanghai Network Technology Co ltd
Priority to CN202311489314.8A priority Critical patent/CN117240823B/en
Publication of CN117240823A publication Critical patent/CN117240823A/en
Application granted granted Critical
Publication of CN117240823B publication Critical patent/CN117240823B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a generalized network intelligent optimization method and a generalized network intelligent optimization terminal, which belong to the field of computer networks, wherein the generalized network intelligent optimization method comprises the following steps: acquiring a domain name access request and a Web request initiated by user network equipment; determining an optimal DNS server according to the target domain name, the custom upstream host and the pre-established DNS set, and resolving the target domain name through the optimal DNS server to obtain a target IP address; acquiring performance parameters of each NAT server in the NAT server cluster; determining an optimal NAT server according to the performance parameters of each NAT server, and responding to the Web request by adopting a full cone network address conversion technology according to the target IP address through the optimal NAT server; and controlling the sending rate of the user network equipment by adopting a BBR algorithm. The domain name resolution method and the domain name resolution device improve domain name resolution speed and network transmission efficiency.

Description

Generalized network intelligent optimization method and generalized network intelligent optimization terminal
Technical Field
The invention relates to the field of computer networks, in particular to a generalized network intelligent optimization method and a generalized network intelligent optimization terminal.
Background
At present, when most users use the network, various network problems often occur due to the difference of network levels, and the problems possibly existing in the current basic user network are as follows.
1) The Domain name system (Domain NAME SYSTEM, DNS) protocol defines a set of automated services that match resource names with desired digital network addresses, which cover query formats, response formats, and data formats, but currently there is severe DNS contamination-when a user accesses an address, the non-DNS server monitors that the user accesses an address that has been marked, and the non-DNS server masquerades as a DNS server sending back to the user the wrong address. And most of the user DNS is basically obtained locally and automatically, so that the resolution server cannot achieve the optimal performance, and the problem that some domain names and services cannot respond is caused. The flow of the main DNS resolution is shown in fig. 1, which does not have the function of substantially preferentially preventing DNS pollution.
2) Network address translation (Network Address Translation, NAT) is limited in type, NAT is used to implement mutual access between private and public networks, NAT is used to translate intranet address and port number into legal public network address and port number, establish a session, and communicate with public network host. Most NAT types are port limited conical NAT in campus or educational scenes, port number limitation is increased by the port limited conical NAT, and if and only if the intranet host has sent data packets to the public network host before, the public network host can communicate with the intranet host. As shown in fig. 2, NAT maps and binds the intranet address { a: b } to the public network address { C: d }, and since the intranet host has previously communicated with the public network host with address E, port f and the public network host with address G and port q, respectively, only packets from these two public network addresses and ports can reach the intranet host, whereas in fig. 2, the public network host with address G, port r and the public network host with address H cannot communicate with the intranet host. NAT limitations can greatly impact P2P performance, increase switching delay, more commonly IP and port limitations can lead to access errors, and when users make user datagram protocol (User Datagram Protocol, UDP) transmissions, they have no connection properties and lack reliability guarantees, UDP transmissions can also impact their transmissions when faced with NAT limitations.
3) Currently, there is a lack of effective network congestion control mechanisms in mainstream network environments. The mainstream TCP congestion control algorithm is designed based on the packet loss condition, as shown in fig. 3, which is a traditional congestion control algorithm based on packet loss, and this method has two problems: first, TCP assumes that all packet loss is due to congestion, but there may be packet loss caused by transmission errors in the network in practice, and thus, congestion control algorithms based on packet loss cannot distinguish between congestion packet loss and erroneous packet loss. Second, there is a buffer capacity in the network for absorbing traffic fluctuations in the network, since standard TCP estimates the transmission window by means of a full link, the buffer capacity will be prone to be full during the connection start phase, and the occupancy of the subsequent buffer capacity will gradually decrease, but not completely disappear. This approach, therefore, increases network delay and creates packet loss when the buffer capacity is filled. In response to these problems, there is a need to employ efficient network congestion control mechanisms to prevent excessive data from being injected into the network so that links in the network are not overloaded.
Disclosure of Invention
The invention aims to provide a generalized network intelligent optimization method and a generalized network intelligent optimization terminal, which can improve the analysis speed of DNS and improve the network transmission efficiency.
In order to achieve the above purpose, the invention provides a generalized network intelligent optimization method, which comprises the following steps.
Acquiring a domain name access request and a Web request initiated by user network equipment; the domain name access request comprises a target domain name.
And determining an optimal DNS server according to the target domain name, the custom upstream host and the pre-established DNS set, and resolving the target domain name through the optimal DNS server to obtain a target IP address.
And acquiring performance parameters of each NAT server in the NAT server cluster.
And determining an optimal NAT server according to the performance parameters of each NAT server, and responding to the Web request by adopting a full cone network address conversion technology according to the target IP address through the optimal NAT server.
And controlling the sending rate of the user network equipment by adopting a BBR algorithm.
In order to achieve the above purpose, the invention also provides a generalized network intelligent optimization terminal, which comprises the following three modules.
The domain name resolution module is used for acquiring a domain name access request and a Web request initiated by user network equipment; determining an optimal DNS server according to a target domain name, a custom upstream host and a pre-established DNS set, and resolving the target domain name through the optimal DNS server to obtain a target IP address; the domain name access request comprises a target domain name.
The address conversion module is used for obtaining the performance parameters of each NAT server in the NAT server cluster; and determining an optimal NAT server according to the performance parameters of each NAT server, and responding to the Web request by adopting a full cone network address conversion technology according to the target IP address through the optimal NAT server.
And the congestion control module is used for controlling the sending rate of the user network equipment by adopting a BBR algorithm.
According to the specific embodiment provided by the invention, the invention discloses the following technical effects: according to the method and the device, the optimal DNS server is determined according to the target domain name, the custom upstream host and the pre-established DNS set, the target domain name is resolved through the optimal DNS server, and domain name resolution is performed in two modes of the custom upstream host and the DNS set, so that the resolution speed of the DNS is improved. The full cone network address conversion technology is adopted to effectively improve the transmission efficiency of the network and reduce the limitation of the network. And the BBR algorithm is adopted to control the sending rate of the user network equipment, so that the congestion packet loss and the error packet loss can be effectively distinguished, and the transmission efficiency of the network is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions of the prior art, the drawings that are needed in the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a conventional DNS resolution flow.
Fig. 2 is a schematic diagram of a port-limited cone NAT.
Fig. 3 is a schematic diagram of a conventional congestion control algorithm based on packet loss.
Fig. 4 is a flowchart of a generalized network intelligent optimization method provided by the invention.
Fig. 5 is a schematic diagram of full cone network address translation.
Fig. 6 is a schematic diagram of a connection relationship of the generalized network intelligent optimization terminal provided by the invention.
Fig. 7 is a schematic diagram of a generalized network intelligent optimization terminal provided by the invention.
Fig. 8 is a workflow diagram of each module of the generalized network intelligent optimization terminal provided by the invention.
Fig. 9 is a schematic diagram of hardware components of the generalized network intelligent optimization terminal provided by the invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The invention aims to provide a generalized network intelligent optimization method and a generalized network intelligent optimization terminal, which are used for carrying out local optimization of a network under various conditions and optimizing the network use environment of a user as much as possible.
In order that the above-recited objects, features and advantages of the present invention will become more readily apparent, a more particular description of the invention will be rendered by reference to the appended drawings and appended detailed description.
Embodiment one: as shown in fig. 4, the present embodiment provides a generalized network intelligent optimization method, which includes steps 100 to 500.
Step 100: and acquiring a domain name access request and a Web request initiated by the user network equipment. The domain name access request comprises a target domain name.
Step 200: and determining an optimal DNS server according to the target domain name, the custom upstream host and the pre-established DNS set, and resolving the target domain name through the optimal DNS server to obtain a target IP address.
Specifically, the DNS collection is based on a DNS management website, and a plurality of DNS servers are included in the DNS collection. In step 200, an optimal DNS server is determined according to the target domain name, the custom upstream host, and the pre-established DNS set, and specifically includes steps (21) to (27).
(21) And judging whether the target domain name is positioned in a custom upstream host.
(22) And if the target domain name is positioned in the custom upstream host, performing remote domain name resolution.
In this embodiment, the upstream host is set at NAMESERVER. When the user network device sends a domain name resolution instruction, the domain name can be preprocessed according to the upstream host which is manually set, and when the target domain name is positioned in the upstream host, forced remote preprocessing is performed.
(23) And if the target domain name is not located in the custom upstream host, sending a ping command to each DNS server in the DNS set through the user network equipment.
(24) And determining the network connection condition and the communication time delay between the user network equipment and each DNS server according to the detection result returned by each DNS server.
(25) And determining the priority of each DNS server according to the network connection condition and the communication time delay between the user network equipment and each DNS server, wherein the DNS server with the highest priority is the optimal DNS server. And storing the optimal DNS server and the priority sequence of each DNS server in a cache, so as to ensure the detection sequence when the optimal DNS server fails.
(26) The priority use duration of the DNS server is monitored based on a preset timer.
(27) And when the service time reaches a preset management period, the network connection condition and the communication time delay between the user network equipment and each DNS server are redetermined so as to redetermine the priority of each DNS server.
Because in the common network environment, the optimal DNS server cannot be allocated according to the accessed website, so that the DNS analysis speed is influenced, the invention adopts a DNS optimization mode of integrating the two forms of custom upstream DNS and subscription DNSquerey. The custom upstream DNS mode may be provided for professional users to use, and may be regarded as custom local host to perform remote domain name resolution, so as to increase DNS resolution speed. The subscription DNSquery aggregation mode is updated by operation and maintenance personnel, different types of DNS and general query websites in each region are recorded, when a domain name is accessed for the first time, analysis delay is checked in hardware, analysis delay records of all public DNS are recorded, and an optimal DNS server is selected and written into a hardware cache. Meanwhile, ping value detection is carried out every 24 hours to update DNS analysis of a common domain name, so that the DNS analysis speed can be effectively improved, but factors such as update frequency and network load need to be paid attention to ensure that the DNS analysis speed can exert the maximum optimization effect.
Step 300: and acquiring performance parameters of each NAT server in the NAT server cluster. Specifically, the performance parameters of the NAT server include the central processing unit (Central Processing Unit, CPU) frequency, memory size, disk I/O rate, network bandwidth, CPU usage, memory usage, disk I/O read rate, and network bandwidth occupancy of the NAT server.
Specifically, each server node in the NAT server cluster in LVS/NAT mode feeds back the performance parameters of the current server to the DDNS server at every other time period.
Step 400: and determining an optimal NAT server according to the performance parameters of each NAT server, and responding to the Web request by adopting a full cone network address conversion technology according to the target IP address through the optimal NAT server. The full cone network address translation technique is shown in fig. 5.
Specifically, in step 400, determining an optimal NAT server according to the performance parameters of each NAT server specifically includes: and aiming at any NAT server, calculating the overall load rate of the NAT server according to the performance parameters of the NAT server. And taking the NAT server with the lowest overall load rate as the optimal NAT server.
The invention integrates the dynamic DNS, the dynamic DNS provides a fixed name server for the dynamic network domain, and the external user can access the Web site of the dynamic user through instant update. The DDNS server collects performance parameters of each NAT server at regular time, calculates the overall load rate of each NAT server, namely the proportion of NAT server responding to the diversion service, realizes the dispatch related to the NAT service, ensures that the NAT server with the lowest load rate in the NAT server cluster responds to a large number of Web access requests of the client preferentially, and distributes query flow to the physical Web server evenly, thereby improving the performance and efficiency of the whole network. When the DDNS server collects the performance parameters of the NAT server, the NAT server incapable of obtaining the performance parameters is regarded as a fault, and the IP address of the fault NAT server is deleted from the configuration file of domain name resolution on the DDNS server, so that the interruption of service caused by the client access to the invalid NAT server is effectively avoided.
The DDNS server can also ensure that all the internet surfing devices under the optimized hardware can access the network, and the legal external network ips are fewer under the condition of campus network or public network, namely, a port multiplexing address method is adopted for the network, so that a single external ip is converted into a multiphase internal ip for each device to use. In most cases, DDNS can optimize NAT.
Further, the CPU frequency, the memory size, the disk I/O rate and the network bandwidth of the NAT server are weighted and summed to obtain the static resource performance of the NAT server. And then, carrying out weighted summation on the CPU utilization rate, the memory utilization rate, the disk I/O reading rate and the network bandwidth occupancy rate of the NAT server to obtain the dynamic resource performance of the NAT server. And finally, determining the overall load rate of the NAT server according to the static resource performance and the dynamic resource performance of the NAT server.
In this embodiment, the formula xi= Xcpui + Xmemi + Xdiski + Xbandwidthi is used to determine the maximum available resource value of one NAT server i. Where Xi is the maximum available resource value of NAT server I, xcpui is the CPU frequency of NAT server I, xmemi is the memory size of NAT server I, xdiski is the disk I/O rate of NAT server I, and Xbandwidthi is the bandwidth of the network where NAT server I is located.
The utilization value of a NAT server i for resources in a unit time is determined by adopting the formula yi= Ycpui + Ymemi + Ydiski + Ybandwidthi. Where Yi is the occupancy value of NAT server I for resources in a unit time, ycpui is the CPU utilization of NAT server I, ymemi is the memory utilization of NAT server I, ydiski is the disk I/O read rate of NAT server I, and Ybandwidthi is the bandwidth occupancy of the network where NAT server I is located.
The static resource performance of NAT server i is calculated using the formula mi= Mcpui + Mmemi + Mdiski + Mbandwidthi. Wherein Mi is the static resource performance of NAT server i, mcpui is the CPU node static performance of NAT server i, mmemi is the memory node static performance of NAT server i, mdiski is the disk node static performance of NAT server i, mbandwidthi is the network node static performance of NAT server i. Mcpui = Xcpui ×w1, mmemi = Xmemi ×w2, mdiski = Xdiski ×w3, mbandwidthi = Xbandwidthi ×w4, w1 is the weight of the CPU, w2 is the weight of the memory, w3 is the weight of the disk, and w4 is the weight of the network.
The static and dynamic resource performance of NAT server i is calculated using the formula ni= Ncpui + Nmemi + Ndiski + Nbandwidthi. Wherein Ni is the static and dynamic resource performance of NAT server i, ncpui is the CPU node dynamic performance of NAT server i, nmemi is the memory node dynamic performance of NAT server i, ndiski is the disk node dynamic performance of NAT server i, nbandwidthi is the network node dynamic performance of NAT server i. Ncpui = Ycpui ×w1, nmemi = Ymemi ×w2, ndiski = Ydiski ×w3, nbandwidthi = Ybandwidthi ×w4.
The overall load factor of NAT server i is calculated using the formula zi= NiMi. Where Zi is the overall load factor of NAT server i.
Let the number of physical Web servers that a NAT server can load be N, when the number of actual physical Web servers is N and the number of actual physical NAT servers is m, the following rules apply.
The WEB server device set may be defined as web= { WEB1, WEB2, …, WEBn }.
The NAT server device set may be defined as nat= { NAT1, NAT2, …, NATm }.
In this embodiment, after the DDNS server calculates the overall load rate of each NAT server, the record of the corresponding NAT server in the domain name system is deleted according to the load rate, and then the domain name accessed by the client is dynamically resolved to the IP address of the NAT server with lighter load according to the real-time load condition, so that the request of the client is preferentially responded in a time period, and the request of the client is evenly distributed to one Web server in the Web server cluster according to the corresponding load balancing algorithm.
In the NAT technology, when the data of the external network reaches the router, the port-limited NAT needs to provide the IP address and the port number of the host corresponding to the internal network, so that the data can be effectively forwarded. In comparison, the full-cone NAT can realize full-pass even if the router records the mapping rule of the host and the port of the intranet, and the external network data is directly forwarded when reaching the router without providing the IP address and the port number of the host corresponding to the intranet, i.e., the external network data can actively enter the intranet as long as the mapping rule is met. When the intranet host establishes a UDP socket and uses the socket to send data to the external host for the first time, the NAT allocates a public network IP address to the UDP socket, and then uses the socket to send data to any external host to use the pair of public network IPs. At this time, the full cone NAT can effectively improve network transmission efficiency, reduce network restrictions, and particularly greatly improve network environment in the p2p use environment.
Step 500: and controlling the sending rate of the user network equipment by adopting a BBR algorithm.
Specifically, the invention detects the maximum value of bandwidth and the minimum value of round trip delay by measuring the instant flow data rate, further calculates the maximum capacity of the TCP pipeline, calculates the congestion window by using the maximum capacity, and thus adjusts the interval of sending window data in unit time. Step 500 includes steps (51) through step 55.
(51) The BBR algorithm is used to estimate the link bandwidth.
(52) For any data packet sent by the user network device, calculating the time delay of the data packet according to the sending time and the confirmation time of the data packet: rtt=t1-T2; wherein, RTT is the delay of the data packet, T1 is the sending time of the data packet, and T2 is the time of receiving the acknowledgement of the data packet.
(53) And determining the current congestion window control parameter according to the time delay of each data packet in the network.
Specifically, when packet loss is detected, calculating the ratio of the buffer area to the bandwidth delay product according to the delay RTT of the data packet: k= (RTT-RTP)/RTP, where K is the ratio of the buffer area to the bandwidth delay product, RTP is the physical delay, and the value is the minimum delay value of each data packet in the network. Calculating a current congestion window control parameter according to the ratio of the buffer area to the bandwidth delay product: ; wherein cwnd is the current congestion window control parameter, h is the proportion of the data flow occupying the buffer zone, and M is the preset congestion window maximum threshold.
(54) And adjusting a congestion window according to the current congestion window control parameter and the link bandwidth, and controlling the total data transmitted by the network to be smaller than or equal to the congestion window so as to control the sending rate of the network user equipment.
In this embodiment, the formula is adoptedDetermining a congestion window; wherein cwnd_n is a congestion window, cwnd is a current congestion window control parameter, RTP is a minimum time delay value of data packets in a network, BTW is a link bandwidth, and the value is a maximum time delay RTT of each data packet in the network.
(55) And when the network user equipment receives the data packet acknowledgement within one round trip time after the congestion window is adjusted, adjusting the current congestion window control parameter according to the current congestion window control parameter, the size of the data packet, the time delay of each data packet in the network and the link bandwidth so as to readjust the congestion window.
Specifically, when no packet loss is detected within a round trip time after the congestion window is adjusted, that is, when a packet acknowledgement is received, the congestion window control parameter is adjusted, and then the adjusted congestion window control parameter is used as the current congestion control parameter to calculate a new congestion window.; Wherein cwnd' is an adjusted congestion window control parameter, a is a parameter for controlling the congestion window to grow too fast, and S is the size of the data packet.
Based on the step 500, the generalized network intelligent optimization method further comprises the following steps.
And acquiring the data volume sent by the user network equipment and the received data volume in the set period, and calculating the benefit score before adjusting the link bandwidth according to the data volume sent by the user network equipment and the received data volume in the set period.
For any data packet sent by the user network device, calculating the receiving rate of the data packet according to the time delay of the data packet, the confirmed data total amount of the user network device when the user network device sends the data packet and the confirmed data total amount of the network user device when the network user device receives the data packet confirmation: rate= (N1-N2)/RTT; wherein, RATE is the receiving RATE of the data packet, N1 is the confirmed data amount of the user network device when the user network device sends the data packet, N2 is the confirmed data amount of the network user device when the network user device receives the data packet confirmation, and RTT is the time delay of the data packet.
In particular, for the delay and the receiving rate of the data packet, the requirement of
And adjusting the link bandwidth according to the receiving rate of each data packet sent by the user network equipment.
Specifically, after obtaining 100 data packet sample sizes, adjusting the link bandwidth by adopting a formula BTWn =max { RATE' }; wherein BTWn is the adjusted link bandwidth, RATE' includes the reception RATE of 100 data packet samples.
And acquiring the data volume sent by the user network equipment and the received data volume in a set period after the link bandwidth is adjusted, and calculating the benefit score after the link bandwidth is adjusted according to the data volume sent by the user network equipment and the received data volume in the set period after the link bandwidth is adjusted.
Specifically, the time of data transmission is divided into a plurality of time periods, and the data amount in each time period is calculated: delivered=d (DeltaT), which is the amount of data received during a DeltaT period, deltaT being any period, and d (DeltaT) being the amount of data that can be transmitted at the start and end times.
The amount of unacknowledged data is then calculated: unlocked = Δs (Δt) -Delivered; wherein Unlocked is the unacknowledged data amount in the Δt period, and s (Δt) is the sum of data transmitted in the differential time at a certain moment.
For the adjusted sending rate, the benefit fraction after link bandwidth adjustment is calculated by combining the packet loss rate and the throughput: ; wherein P is the benefit fraction after adjusting the link bandwidth.
And if the benefit score after the link bandwidth is adjusted is smaller than the benefit score before the link bandwidth is adjusted, the adjustment of the link bandwidth is canceled.
Specifically, the benefit scores are calculated for two time periods before and after the link bandwidth is adjusted, average values are respectively obtained, the efficiency of the adjusted data transmission is compared, and if the benefit score is reduced after the link bandwidth is adjusted, the adjustment of the link bandwidth is cancelled.
In order to solve the problem that TCP assumes that all packet loss is caused by congestion, the invention adopts a congestion control algorithm based on delay, such as BBR, etc., so as to effectively distinguish congestion packet loss and error packet loss and improve network performance. BBR is a congestion control algorithm for calculating the real transmission rate by using RTT information and the number of bytes sent in the response packet, so as to regulate the next transmission rate of the client, thereby maintaining reasonable inflight data quantity, maximizing the transmission bandwidth and reducing the transmission delay. Compared with the traditional TCP, the BBR can be completely operated at the sending end, the code is realized simply and conveniently by several times, the landing and the maintenance are easy, the protocol, the receiving end or the network are not required to be changed, the transmission efficiency of the network can be effectively improved by adopting the BBR algorithm, and the BBR method is particularly outstanding in a network environment with high delay and high bandwidth. It should be noted that the BBR algorithm needs to be deployed simultaneously on both the server and the client.
Meanwhile, in the network, the buffer capacity needs to be reasonably utilized to prevent packet loss and network delay increase caused by the buffer capacity being full. Flow control based methods, such as random early detection (Random Early Detection, RED) and the like, can be employed to adjust the buffer size to accommodate fluctuations in network traffic. In addition, the performance of the network can be optimized by increasing the processing capacity of the nodes, improving the link quality and other measures.
Embodiment two: the embodiment provides a generalized network intelligent optimization terminal, as shown in fig. 6, the generalized network intelligent optimization terminal 2 is connected with the internet 1 and the user network device 3 respectively.
As shown in fig. 7 and 8, the generalized network intelligent optimization terminal 2 provided in this embodiment includes: a domain name resolution module 21, an address translation module 22 and a congestion control module 23. The domain name resolution module 21, the address conversion module 22 and the congestion control module 23 are all disposed in a Linux system. And the three modules work in parallel.
The domain name resolution module 21 is configured to obtain a domain name access request and a Web request initiated by a user network device. And determining an optimal DNS server according to the target domain name, the custom upstream host and the pre-established DNS set, and resolving the target domain name through the optimal DNS server to obtain a target IP address. The domain name access request comprises a target domain name.
Specifically, the user initiates a domain name access request from the front end, the front end initiates a WEB request with a UUID (user identifier) packaged to the WEB server, and a unique identifier, namely the UUID, is dynamically generated after loading. At this time, a WEB request with a UUID encapsulated therein is initiated to a WEB server by a browser. The domain name resolution module sends a recursive query request to a preset DNS server to resolve the URL with the encapsulated UUID. The WEB server stores the front end IP and UUID corresponding to the HTTP request in a first cache form to the storage medium, and the DNS server stores the IP address and UUID of a Local Domain Name Server (LDNS) in a second cache form to the storage medium. The domain name resolution module analyzes the IP and LDNS distribution in the first cache and the second cache, performs standardized processing, and merges the data sets. And obtaining client ip address standard deviation data formed in the web request process initiated by the response front end for the LDNS through the data set, optimizing the LDNS scheduling strategy and recording the LDNS scheduling strategy into a domain name resolution module. The optimized LDNS dispatching strategy is matched with the edge node server closest to the region to which the user belongs for the user. The standardized data tool may be pandas, mapReduce or spark, etc. The combined data set uses the IP address of LDNS as the public key value to make grouping operation so as to calculate the standard deviation of each LDNS.
The standard deviation can accurately reflect the source discrete condition of the LDNS. When the discrete value is higher, if the geographical position of the LDNS is inconsistent with the geographical position of the centralized source comparison, it is indicated that the edge node servers matched with the front end are not in the same geographical position or are far away from each other by the content delivery network (Content Delivery Network, CDN) server, so that delay and network congestion can occur in response of the LDNS to the front end, reliable reference is provided for the CDN server to reasonably schedule the edge node servers matched with the front end to the most reasonable, and accuracy and rationality for scheduling the LDNS are improved. In this embodiment, the threshold value of the standard deviation data is set to 0.3.
The address translation module 22 is configured to obtain performance parameters of each NAT server in the NAT server cluster; and determining an optimal NAT server according to the performance parameters of each NAT server, and responding to the Web request by adopting a full cone network address conversion technology according to the target IP address through the optimal NAT server.
The address translation module 22 uses the Netfilter framework to modify the network packets. After running the preset script, performing NAT optimization by using the iptables rule, namely modifying a NAT table in Linux, wherein three chains are arranged in the NAT table.
(1) Pre routing is used to route rules executed prior to judgment, such as DNAT for received packets.
(2) POSTROUTING, for example, to make SNAT or MASQUERADE on the transmitted or forwarded data packet.
(3) OUTPUT, similar to PREROUTING, processes only packets sent out from the host.
The invention realizes the optimization of NAT by means of Netfilter framework and performs the following operations in hardware.
① SNAT (source address translation) needs to be configured in POSTROUTING chain of nat table, i.e. unified configuration SNAT for one subnet, and Linux selects default egress IP.
② DNAT (destination address translation) needs to be configured in the pre or OUTPUT chain of the nat table.
③ Bi-directional address translation, i.e., adding SNAT and DNAT rules simultaneously.
④ And starting the IP forwarding function of Linux.
The congestion control module 23 is configured to control the sending rate of the user network device by using the BBR algorithm.
For a better understanding of the solution of the present invention, the workflow of the congestion control module 23 is specifically described below.
(1) Window adjustment.
The congestion control module 23 sets the congestion window size to a small value, and whenever an acknowledgement segment is received, the congestion window doubles the initial window size, and the congestion control module 23 gradually increases the amount of data sent to test the available bandwidth of the network.
When the congestion window size reaches the congestion window threshold, the congestion control module 23 enters a congestion avoidance phase, after which the rate at which the congestion window size increases decreases, one segment size increases per round trip time, each time an acknowledgement segment is received.
If a missing segment is detected (i.e., no acknowledgement is received), congestion occurs in the network. The congestion control module 23 then halves the size of the congestion window and sets the congestion window threshold to half the current congestion window, and in addition enters a fast recovery phase in which the size of the congestion window is increased by one segment each time an acknowledgement segment is received.
(2) Bandwidth updating and reevaluation.
After adjusting the congestion window, the congestion control module 23 calculates the estimated bandwidth in time according to the time delay and the rate sample of the collected data packet, and adjusts the sending rate. The transmission rate is calculated using the following formula: DELIVERYRATE = (delivered-packet. Extended)/(non-packet. Extended_time), where DELIVERYRATE is the sending rate, delivered is the number of successfully received data packets, if the received ack is an acknowledgement for one data packet, delivered is increased by 1, when packet. Extended is the data packet, the sending end receives the number of receipt packets of the latest ack acknowledgement, now is the current time, and packet. Extended_time is the timestamp of the latest ack received.
For a better understanding of the solution of the present invention, the following specifically describes the hardware composition of the generalized network intelligent optimization terminal 2. As shown in fig. 9, the chip, flash memory and physical design structure of the generalized network intelligent optimization terminal mainly comprises the following parts.
① The invention is realized based on the IPQ8071A SoC main processor of the high-pass company, the IPQ8071A is provided with the dual-core 1.7GHz network acceleration engine, and the unique design is specially used for processing network traffic, so that the CPU can be focused on other upper-layer applications, the operation efficiency is higher, the traffic forwarding is faster, and the long-time work is more stable.
② The data flow is received through RJ45 network ports and VT6528, VT6528 is an L2+ Ethernet switch control single chip, has a core switching bandwidth of 8.8Gbps and a data transmission speed of 6.6Mbps, and can provide non-blocking data filtering and switching between 24 10/100BaseX Ethernet ports and 2 10/100/1000BaseX Ethernet ports. The RJ45 network port and the VT6528 perform data transmission through an isolation transformer H82407S.
③ A REALTEK RTL8153B-VB-CG 10/100/1000M Ethernet control chip is adopted to combine a three-speed IEEE 802.3 compatible media access controller with a three-speed Ethernet transceiver, a USB 3.0 bus controller and an embedded memory. RTL8153B-VB adopts the most advanced DSP technology and mixed mode signal technology, and can carry out high-speed transmission through CAT 5 UTP cable or CAT 3 UTP (only 10 Mbps) cable. RTL8153B-VB-CG communicates with RJ45 network ports through single-ended transformer H82405 SP.
④ The invention configures 256MB flash memory and 1G running memory, ensures the running of the Linux microsystem and ensures the running of the logic function module program.
⑤ The invention is provided with a plurality of RJ45 network ports, thereby ensuring the expansibility of the intelligent optimized terminal of the generalized network.
When the generalized network intelligent optimization terminal provided by the invention is actually applied, a virtual network card eth1 can be newly added in the architecture, 8-16 Local IP network segment addresses are bound on the network card, the IP addresses are non-user using network segments (reserved address segments in a VPC network), a user does not perceive the existence of the addresses, and the network segments can be communicated with the user network segments in three layers. In an EVPN network of the data center, networking configuration information is issued through SDN control configuration, and a logical router and a switch of OVN are used for interconnecting networks of the same tenant. The newly added virtual network card is linked to a logic exchange chip VT6528, and then is accessed to REALTEK RTL8153B-VB-CG through the exchange chip. At this time, the virtual network card eth1 may be accessed by other nodes in the VPC network.
After network traffic reaches a load balancing node through a VT6528 chip, FULL NAT conversion is carried out, and the source IP address and the destination address of the message are modified into Local IP and real IP addresses of non-user network segments. The modified message is sent from a certain input logic network port, and a back-end server is selected through a logic exchange chip according to a load balancing strategy. The destination IP of the response message from the back-end server is the Local IP of the non-user network segment, and the response message reaches the Ethernet control chip REALTEK RTL B-VB-CG through the logic switching chip and reaches the switching control chip VT6528 through the virtual network card eth1, namely the three-layer switching flow of the non-same network segment. VT6528 converts the source IP address of the message into virtual IP, and the destination IP is converted into Client IP to be sent from a certain input logic network port. The EIP network node converts the virtual IP into EIP and sends the EIP to the Client.
The hardware support custom configuration and expansion of the invention enables users to flexibly set and manage the network according to the needs, meets the requirements of different networks and is easy to maintain. The generalized network intelligent optimization terminal adopts ARM architecture design with low cost, simple structure and easy maintenance, and the replaceable general software and hardware accessories realize product upgrading iteration, so that stronger network performance, CPU performance and storage performance are obtained. The P2P performance and the UDP stability can be obviously improved, and particularly under the condition of multi-user network utilization, the network stability can be improved, so that the network requirements of users can be better met.
In the present specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, and identical and similar parts between the embodiments are all enough to refer to each other.
The principles and embodiments of the present invention have been described herein with reference to specific examples, the description of which is intended only to assist in understanding the methods of the present invention and the core ideas thereof; also, it is within the scope of the present invention to be modified by those of ordinary skill in the art in light of the present teachings. In view of the foregoing, this description should not be construed as limiting the invention.

Claims (7)

1. The generalized network intelligent optimization method is characterized by comprising the following steps of:
acquiring a domain name access request and a Web request initiated by user network equipment; the domain name access request comprises a target domain name;
Determining an optimal DNS server according to the target domain name, the custom upstream host and a pre-established DNS set, and resolving the target domain name through the optimal DNS server to obtain a target IP address; the DNS set comprises a plurality of DNS servers; determining an optimal DNS server according to the target domain name, the custom upstream host and the pre-established DNS set, wherein the method specifically comprises the following steps of: judging whether the target domain name is positioned in a custom upstream host; if the target domain name is located in the custom upstream host, performing remote domain name resolution; if the target domain name is not located in the custom upstream host, sending a ping command to each DNS server in the DNS set through the user network equipment; determining the network communication condition and communication time delay between the user network equipment and each DNS server according to the detection result returned by each DNS server; determining the priority of each DNS server according to the network communication condition and communication delay between the user network equipment and each DNS server, wherein the DNS server with the highest priority is the optimal DNS server, and storing the optimal DNS server and the priority sequence of each DNS server in a cache;
Acquiring performance parameters of each NAT server in the NAT server cluster; the performance parameters of the NAT server comprise CPU frequency, memory size, disk I/O rate, network bandwidth, CPU utilization, memory utilization, disk I/O reading rate and network bandwidth occupancy of the NAT server;
Determining an optimal NAT server according to performance parameters of each NAT server, and responding to the Web request by adopting a full cone network address conversion technology according to the target IP address through the optimal NAT server; determining an optimal NAT server according to performance parameters of each NAT server specifically comprises: aiming at any NAT server, calculating the overall load rate of the NAT server according to the performance parameters of the NAT server; taking the NAT server with the lowest overall load rate as an optimal NAT server; specifically, the DDNS server collects performance parameters of each NAT server at regular time, calculates the overall load rate of each NAT server, namely the ratio of NAT server response streaming service, realizes the dispatch related to NAT service, ensures that the NAT server with the lowest load rate in the NAT server cluster responds to a large number of Web access requests of the client preferentially, and distributes query traffic to the physical Web servers evenly; according to the performance parameters of the NAT server, calculating the overall load rate of the NAT server specifically comprises: the CPU frequency, the memory size, the disk I/O rate and the network bandwidth of the NAT server are weighted and summed to obtain the static resource performance of the NAT server; the CPU utilization rate, the memory utilization rate, the disk I/O reading rate and the network bandwidth occupancy rate of the NAT server are weighted and summed to obtain the dynamic resource performance of the NAT server; determining the overall load rate of the NAT server according to the static resource performance and the dynamic resource performance of the NAT server;
And controlling the sending rate of the user network equipment by adopting a BBR algorithm.
2. The generalized network intelligent optimization method according to claim 1, wherein determining an optimal DNS server according to the target domain name, the custom upstream host, and a pre-established DNS set, further comprises:
Monitoring the using time of the priority of the DNS server based on a preset timer;
And when the service time reaches a preset management period, the network connection condition and the communication time delay between the user network equipment and each DNS server are redetermined so as to redetermine the priority of each DNS server.
3. The generalized network intelligent optimization method according to claim 1, wherein the BBR algorithm is adopted to control the sending rate of the user network device, and specifically comprises:
Estimating the link bandwidth by adopting a BBR algorithm;
for any data packet sent by the user network device, calculating the time delay of the data packet according to the sending time and the confirmation time of the data packet;
Determining a current congestion window control parameter according to the time delay of each data packet in the network;
according to the current congestion window control parameter and the link bandwidth, adjusting a congestion window, and controlling the total data transmitted by a network to be smaller than or equal to the congestion window so as to control the sending rate of network user equipment;
and when the network user equipment receives the data packet acknowledgement within one round trip time after the congestion window is adjusted, adjusting the current congestion window control parameter according to the current congestion window control parameter, the size of the data packet, the time delay of each data packet in the network and the link bandwidth so as to readjust the congestion window.
4. A generalized network intelligent optimization method according to claim 3, characterized in that the congestion window is determined using the formula cwnd_n=cwnd RTP BTW; wherein cwnd_n is a congestion window, cwnd is a current congestion window control parameter, RTP is a delay minimum value of a data packet in a network, and BTW is a link bandwidth.
5. The generalized network intelligent optimization method according to claim 3, further comprising:
Acquiring the data volume sent by the user network equipment and the received data volume in a set period, and calculating benefit scores before adjusting link bandwidths according to the data volume sent by the user network equipment and the received data volume in the set period;
For any data packet sent by the user network device, calculating the receiving rate of the data packet according to the time delay of the data packet, the confirmed data total amount of the user network device when the user network device sends the data packet and the confirmed data total amount of the network user device when the network user device receives the data packet confirmation;
According to the receiving rate of each data packet sent by the user network equipment, adjusting the link bandwidth;
Acquiring the data volume sent by the user network equipment and the received data volume in a set period after the link bandwidth is adjusted, and calculating the benefit score after the link bandwidth is adjusted according to the data volume sent by the user network equipment and the received data volume in the set period after the link bandwidth is adjusted;
And if the benefit score after the link bandwidth is adjusted is smaller than the benefit score before the link bandwidth is adjusted, the adjustment of the link bandwidth is canceled.
6. The generalized network intelligent optimization terminal is characterized by comprising:
The domain name resolution module is used for acquiring a domain name access request and a Web request initiated by user network equipment; determining an optimal DNS server according to a target domain name, a custom upstream host and a pre-established DNS set, and resolving the target domain name through the optimal DNS server to obtain a target IP address; the domain name access request comprises a target domain name; the DNS set comprises a plurality of DNS servers; determining an optimal DNS server according to the target domain name, the custom upstream host and the pre-established DNS set, wherein the method specifically comprises the following steps of: judging whether the target domain name is positioned in a custom upstream host; if the target domain name is located in the custom upstream host, performing remote domain name resolution; if the target domain name is not located in the custom upstream host, sending a ping command to each DNS server in the DNS set through the user network equipment; determining the network communication condition and communication time delay between the user network equipment and each DNS server according to the detection result returned by each DNS server; determining the priority of each DNS server according to the network communication condition and communication delay between the user network equipment and each DNS server, wherein the DNS server with the highest priority is the optimal DNS server, and storing the optimal DNS server and the priority sequence of each DNS server in a cache;
The address conversion module is used for obtaining the performance parameters of each NAT server in the NAT server cluster; the performance parameters of the NAT server comprise CPU frequency, memory size, disk I/O rate, network bandwidth, CPU utilization, memory utilization, disk I/O reading rate and network bandwidth occupancy of the NAT server; determining an optimal NAT server according to performance parameters of each NAT server, and responding to the Web request by adopting a full cone network address conversion technology according to the target IP address through the optimal NAT server; determining an optimal NAT server according to performance parameters of each NAT server specifically comprises: aiming at any NAT server, calculating the overall load rate of the NAT server according to the performance parameters of the NAT server; taking the NAT server with the lowest overall load rate as an optimal NAT server; specifically, the DDNS server collects performance parameters of each NAT server at regular time, calculates the overall load rate of each NAT server, namely the ratio of NAT server response streaming service, realizes the dispatch related to NAT service, ensures that the NAT server with the lowest load rate in the NAT server cluster responds to a large number of Web access requests of the client preferentially, and distributes query traffic to the physical Web servers evenly; according to the performance parameters of the NAT server, calculating the overall load rate of the NAT server specifically comprises: the CPU frequency, the memory size, the disk I/O rate and the network bandwidth of the NAT server are weighted and summed to obtain the static resource performance of the NAT server; the CPU utilization rate, the memory utilization rate, the disk I/O reading rate and the network bandwidth occupancy rate of the NAT server are weighted and summed to obtain the dynamic resource performance of the NAT server; determining the overall load rate of the NAT server according to the static resource performance and the dynamic resource performance of the NAT server;
And the congestion control module is used for controlling the sending rate of the user network equipment by adopting a BBR algorithm.
7. The generalized network intelligent optimization terminal according to claim 6, wherein the domain name resolution module, the address translation module, and the congestion control module are all deployed in a Linux system.
CN202311489314.8A 2023-11-10 2023-11-10 Generalized network intelligent optimization method and generalized network intelligent optimization terminal Active CN117240823B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311489314.8A CN117240823B (en) 2023-11-10 2023-11-10 Generalized network intelligent optimization method and generalized network intelligent optimization terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311489314.8A CN117240823B (en) 2023-11-10 2023-11-10 Generalized network intelligent optimization method and generalized network intelligent optimization terminal

Publications (2)

Publication Number Publication Date
CN117240823A CN117240823A (en) 2023-12-15
CN117240823B true CN117240823B (en) 2024-07-30

Family

ID=89095069

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311489314.8A Active CN117240823B (en) 2023-11-10 2023-11-10 Generalized network intelligent optimization method and generalized network intelligent optimization terminal

Country Status (1)

Country Link
CN (1) CN117240823B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007189540A (en) * 2006-01-13 2007-07-26 Nippon Telegr & Teleph Corp <Ntt> Device, method, and program for dns server selection, and name resolution system
WO2020181734A1 (en) * 2019-03-08 2020-09-17 平安科技(深圳)有限公司 Method for managing network address translation nat gateway and server
CN116155825A (en) * 2023-04-04 2023-05-23 山东大学 Optimization method for BBR congestion control algorithm data retransmission

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2328011A1 (en) * 2000-01-18 2001-07-18 Lucent Technologies Inc. Method and apparatus for load balancing of network services
JP3417374B2 (en) * 2000-02-04 2003-06-16 日本電気株式会社 Server, client, client server system, load distribution method, recording medium
US20090292824A1 (en) * 2005-01-21 2009-11-26 Internap Network Services Corporation System And Method For Application Acceleration On A Distributed Computer Network
CN101820382B (en) * 2009-02-28 2013-02-27 华为技术有限公司 Method, device and system for announcing information of network address translation equipment
JP5589866B2 (en) * 2011-01-24 2014-09-17 富士通株式会社 Address translation method, address translation proxy response method, address translation device, and address translation proxy response device
CN102301682B (en) * 2011-04-29 2014-02-19 华为技术有限公司 Method and system for network caching, domain name system redirection sub-system thereof
CN111416883B (en) * 2020-03-11 2023-03-03 Oppo广东移动通信有限公司 Address query method, device, terminal and computer readable storage medium
CN113347286A (en) * 2021-06-17 2021-09-03 深圳前海微众银行股份有限公司 Method, device and equipment for determining domain name server and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007189540A (en) * 2006-01-13 2007-07-26 Nippon Telegr & Teleph Corp <Ntt> Device, method, and program for dns server selection, and name resolution system
WO2020181734A1 (en) * 2019-03-08 2020-09-17 平安科技(深圳)有限公司 Method for managing network address translation nat gateway and server
CN116155825A (en) * 2023-04-04 2023-05-23 山东大学 Optimization method for BBR congestion control algorithm data retransmission

Also Published As

Publication number Publication date
CN117240823A (en) 2023-12-15

Similar Documents

Publication Publication Date Title
US11522734B2 (en) Method for controlling a remote service access path and relevant device
CN101410819B (en) Reliable, high-throughput, high-performance transport and routing mechanism for arbitrary data flows
US20140173018A1 (en) Content Based Traffic Engineering in Software Defined Information Centric Networks
US6687758B2 (en) Port aggregation for network connections that are offloaded to network interface devices
US7962631B2 (en) Method for determining network proximity for global traffic load balancing using passive TCP performance instrumentation
EP3154224B1 (en) Systems and methods for maintaining network service levels
US8917607B2 (en) Optimized layer-2 network switching systems and methods
CN105516391A (en) CNAME-based DNS (domain name system) domain name resolution method
JP2000092052A (en) Network server load detector and allocation device and method
CN112087382B (en) Service routing method and device
Gopalan et al. TCP/IP ILLUSTRATED
US20090276530A1 (en) Devices, Systems, Methods and Software for Computer Networking
WO2021244450A1 (en) Communication method and apparatus
CN108200199B (en) Load balancing system and method in IPV4over IPV6 tunnel scene
WO2012049363A1 (en) Method, system and element for multipurpose data traffic engineering and routing
CN117240823B (en) Generalized network intelligent optimization method and generalized network intelligent optimization terminal
Potys et al. NetInf TP: A receiver-driven protocol for ICN data transport
JP2004005669A (en) Network server allocation system
Hua et al. A DTN congestion mechanism based on Distributed Storage
Tomic et al. Implementation and efficiency analysis of composite DNS-metric for dynamic server selection
Nikitinskiy et al. Analyzing the possibility of applying asymmetric transport protocols in terms of software defined networks
JP2003244251A (en) Packet communication method for reconfiguring tunnel path
WO2024065424A1 (en) Link optimization method and system
Poryev Multi-tier locality awareness in distributed networks
CN118524086A (en) Domain name resolution system based on TCP connection assessment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant