CN111212156A - Network connection method and device - Google Patents

Network connection method and device Download PDF

Info

Publication number
CN111212156A
CN111212156A CN202010041404.0A CN202010041404A CN111212156A CN 111212156 A CN111212156 A CN 111212156A CN 202010041404 A CN202010041404 A CN 202010041404A CN 111212156 A CN111212156 A CN 111212156A
Authority
CN
China
Prior art keywords
address
addresses
alternative
connection
network
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.)
Granted
Application number
CN202010041404.0A
Other languages
Chinese (zh)
Other versions
CN111212156B (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.)
China Unionpay Co Ltd
Original Assignee
China Unionpay 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 China Unionpay Co Ltd filed Critical China Unionpay Co Ltd
Priority to CN202010041404.0A priority Critical patent/CN111212156B/en
Publication of CN111212156A publication Critical patent/CN111212156A/en
Application granted granted Critical
Publication of CN111212156B publication Critical patent/CN111212156B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4505Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
    • H04L61/4511Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses

Abstract

The embodiment of the invention relates to the technical field of communication, in particular to a network connection method and a network connection device, which are used for optimizing a selection result of network connection. The embodiment of the invention comprises the following steps: the terminal responds to the operation of a user and determines the domain name of the connection request; determining a plurality of alternative IP (Internet protocol) addresses corresponding to the domain name; determining a network state between the terminal and each alternative IP address according to each alternative IP address; selecting the IP address with the optimal network state from the multiple alternative IP addresses as a connection IP address according to the network state; and sending a connection request according to the connection IP address.

Description

Network connection method and device
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a network connection method and apparatus.
Background
The process of network communication between the terminal and the server can be roughly divided into two steps, the first step being the establishment of a connection. The terminal establishes connection with the server, and firstly performs Domain Name System (DNS) analysis on a Domain Name to obtain an IP address mapped by the Domain Name and then establishes connection. With the increase of website access amount, load balancing by a server side through a DNS also becomes a very common technology, a plurality of website domain names correspond to a plurality of IP addresses, and thus a client side returns a plurality of available IP addresses through one DNS analysis. Taking the domain name www.jianshu.com as an example, when the domain name is resolved, a plurality of IP addresses are obtained.
If the DNS resolves a plurality of IP addresses, only the success and failure of each IP address are recorded, and the IP addresses which have succeeded before are preferentially selected for connection construction. According to the scheme, only the IP addresses successfully connected before are sequenced according to time, and the IP address used most recently is preferentially selected, but the network state of the IP address at the current moment is not necessarily the best due to the fact that the network state is changeable, so that the selection result is unreliable, and the accuracy needs to be improved.
Disclosure of Invention
The application provides a network connection method and a network connection device, which are used for optimizing a selection result of network connection.
The network connection method provided by the embodiment of the invention comprises the following steps:
the terminal responds to the operation of a user and determines the domain name of the connection request;
determining a plurality of alternative IP (Internet protocol) addresses corresponding to the domain name;
determining a network state between the terminal and each alternative IP address according to each alternative IP address;
selecting the IP address with the optimal network state from the multiple alternative IP addresses as a connection IP address according to the network state;
and sending a connection request according to the connection IP address.
Optionally, the determining a network status between the terminal and the alternative IP address includes:
sending a PING (internet packet explorer) command to the alternative IP address;
determining a network performance parameter corresponding to the alternative IP address according to the received response message, wherein the network performance parameter is used for representing a network state between the terminal and the alternative IP address;
the selecting, according to the network state, a connection IP address with an optimal network state from the multiple candidate IP addresses includes:
calculating the priority of each alternative IP address according to the network performance parameters;
and determining the alternative IP address with the highest priority as the connection IP address.
Optionally, the network performance parameter includes a network delay parameter, a packet loss rate, and a delay jitter parameter.
Optionally, the determining a plurality of alternative IP addresses corresponding to the domain name includes:
analyzing the domain name, and determining all IP addresses corresponding to the domain name and stored local IP addresses;
and selecting a preset number of local IP addresses and IP addresses except the local IP address in all the IP addresses as the alternative IP addresses.
Optionally, after sending the connection request according to the connection IP address, the method further includes:
determining that the network state of the terminal meets a refresh policy;
selecting a refresh IP address with a set refresh number from the alternative IP addresses of the terminal;
for each refreshing IP address, determining a network state between the terminal and the refreshing IP address;
and updating the sequencing of the local IP addresses according to the network state of the refreshed IP addresses.
Optionally, after sending the connection request according to the connection IP address, the method further includes:
sending a data acquisition request to the connection IP address, wherein the data acquisition request comprises the network state parameter of the connection IP address;
and receiving content data of a feedback grade sent by a server, wherein the feedback grade is the data volume grade of the content data corresponding to the network state parameter grade of the connection IP address determined by the server.
A network connection device comprising:
a determination unit configured to determine a domain name of the connection request in response to an operation by a user;
a resolution unit, configured to determine a plurality of alternative IP (internet protocol) addresses corresponding to the domain name;
the computing unit is used for determining the network state between the terminal and each alternative IP address;
the selection unit is used for selecting the IP address with the optimal network state from the multiple alternative IP addresses as the connection IP address according to the network state;
and the receiving and sending unit is used for sending a connection request according to the connection IP address.
Optionally, the computing unit is specifically configured to:
sending a PING (internet packet explorer) command to the alternative IP address;
determining a network performance parameter corresponding to the alternative IP address according to the received response message, wherein the network performance parameter is used for representing a network state between the terminal and the alternative IP address;
the selection unit is specifically configured to:
calculating the priority of each alternative IP address according to the network performance parameters;
and determining the alternative IP address with the highest priority as the connection IP address.
Optionally, the network performance parameter includes a network delay parameter, a packet loss rate, and a delay jitter parameter.
Optionally, the parsing unit is configured to:
analyzing the domain name, and determining all IP addresses corresponding to the domain name and stored local IP addresses;
and selecting a preset number of local IP addresses and IP addresses except the local IP address in all the IP addresses as the alternative IP addresses.
Optionally, the computing unit is further configured to:
determining that the network state of the terminal meets a refresh policy;
selecting a refresh IP address with a set refresh number from the alternative IP addresses of the terminal;
for each refreshing IP address, determining a network state between the terminal and the refreshing IP address;
and updating the sequencing of the local IP addresses according to the network state of the refreshed IP addresses.
Optionally, the transceiver unit is further configured to:
sending a data acquisition request to the connection IP address, wherein the data acquisition request comprises the network state parameter of the connection IP address;
and receiving content data of a feedback grade sent by a server, wherein the feedback grade is the data volume grade of the content data corresponding to the network state parameter grade of the connection IP address determined by the server.
In the embodiment of the invention, when the terminal needs to establish connection with the server, a user inputs the domain name by operating the terminal. The terminal determines a domain name of the connection request in response to a user operation. The terminal analyzes the domain name and determines a plurality of alternative IP addresses corresponding to the domain name. And determining the network state between the terminal and each alternative IP address according to each alternative IP address, and selecting the IP address with the optimal network state from the alternative IP addresses as a connection IP address according to the network state. And the terminal sends a connection request according to the selected connection IP address, wherein the connection request comprises the connection IP address. In the embodiment of the invention, when the terminal performs routing selection in the process of establishing connection with the server, the network state of each alternative IP address is determined, and the alternative IP address with the optimal network state is selected as the connection IP address to establish connection. Therefore, calculation is carried out according to the network state of each IP address, the IP address with the best network state is preferentially selected to construct connection, the selection of network connection is optimized, the quality of network connection is guaranteed, and the current network state between the terminal and the server is better reflected.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
FIG. 1a is a diagram of a network connection system according to an embodiment of the present invention;
fig. 1b is a schematic diagram of a possible interface of a client according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating a network connection method according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a network connection device according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
As shown in fig. 1a, a system architecture to which the embodiment of the present invention is applicable includes a client and a server 101. The client is an Application program (APP). The server 101 is a server corresponding to the client.
The client is installed on the terminal 102. The terminal 102 may be an electronic device with a wireless communication function, such as a mobile phone, a tablet computer, or a dedicated handheld device, and may also be a device connected to the internet in a wired access manner, such as a Personal Computer (PC), a notebook computer, or a server. The server 101 may be a computer or other network device. The server 101 may be an independent device or a server cluster formed by a plurality of servers. Preferably, the server 101 may perform information processing using cloud computing technology.
The terminal 102 and the server 101 are connected by a wired or wireless network. Optionally, the wireless or wired networks described above use standard communication techniques and/or protocols. The Network is typically the Internet, but may be any Network including, but not limited to, a Local Area Network (LAN), a Metropolitan Area Network (MAN), a Wide Area Network (WAN), a mobile, wireline or wireless Network, a private Network, or any combination of virtual private networks. In some embodiments, data exchanged over a network is represented using techniques and/or formats including Hypertext Mark-up Language (HTML), Extensible Markup Language (XML), and the like. All or some of the links may also be encrypted using conventional encryption techniques such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Network (VPN), Internet Protocol Security (IPsec). In other embodiments, custom and/or dedicated data communication techniques may also be used in place of, or in addition to, the data communication techniques described above.
The embodiment of the invention provides a preferred implementation mode, and the terminal is taken as a mobile phone as an example for introduction. Fig. 1b illustrates a possible interface diagram of the first terminal and/or the second terminal, and as shown in fig. 1b, multiple APPs, such as video, clock, call record, information, secure mailbox, mobile phone, S memo, setup, etc., may be installed in the terminal. In the embodiment of the invention, the client 103 can be installed in the terminal in advance, and the user sends the connection request to the server by clicking the icon of the client 103 in the mobile phone, so that the connection between the terminal and the server is established.
In another optional embodiment, the terminal accesses the server through a browser, optionally, the user may input a web address in the browser, and the browser sends a connection request to the server according to the received web address.
It should be noted that the above-mentioned application scenarios are only presented for the convenience of understanding the spirit and principles of the present application, and the embodiments of the present application are not limited in this respect. Rather, the embodiments of the present application may be applied to any applicable scenario.
Based on the network connection system shown in fig. 1a, an embodiment of the present invention provides a network connection method, and as shown in fig. 2, the network connection method provided in the embodiment of the present invention includes the following steps:
step 201, the terminal responds to the operation of the user and determines the domain name of the connection request.
Step 202, the terminal determines a plurality of alternative IP addresses corresponding to the domain name.
Step 203, determining the network state between the terminal and each alternative IP address.
And 204, selecting the IP address with the optimal network state from the multiple candidate IP addresses according to the network state.
Step 205, sending a connection request according to the connection IP address.
In the embodiment of the invention, when the terminal needs to establish connection with the server, a user inputs the domain name by operating the terminal. The terminal determines a domain name of the connection request in response to a user operation. The terminal analyzes the domain name and determines a plurality of alternative IP addresses corresponding to the domain name. And determining the network state between the terminal and each alternative IP address according to each alternative IP address, and selecting the IP address with the optimal network state from the alternative IP addresses as a connection IP address according to the network state. And the terminal sends a connection request according to the selected connection IP address, wherein the connection request comprises the connection IP address. In the embodiment of the invention, when the terminal performs routing selection in the process of establishing connection with the server, the network state of each alternative IP address is determined, and the alternative IP address with the optimal network state is selected as the connection IP address to establish connection. Therefore, calculation is carried out according to the network state of each IP address, the IP address with the best network state is preferentially selected to construct connection, the selection of network connection is optimized, the quality of network connection is guaranteed, and the current network state between the terminal and the server is better reflected.
Further, the determining the network status between the terminal and the alternative IP address includes:
sending a PING (Packet Internet Groper) command to the alternative IP address;
determining a network performance parameter corresponding to the alternative IP address according to the received response message, wherein the network performance parameter is used for representing a network state between the terminal and the alternative IP address;
the selecting, according to the network state, a connection IP address with an optimal network state from the multiple candidate IP addresses includes:
calculating the priority of each alternative IP address according to the network performance parameters;
and determining the alternative IP address with the highest priority as the connection IP address.
In the specific implementation process, the terminal obtains corresponding network performance parameters through PING operation aiming at each alternative IP address. The PING command is used to determine whether the local host can successfully exchange (send and receive) data packets with another host, and then, based on the returned information, it can be inferred whether the network parameters are set correctly, whether the operation is normal, whether the network is unobstructed, etc. For each alternative IP address, the terminal in the embodiment of the present invention determines the network performance parameter according to the response message returned by the server by sending a PING command to the alternative IP address. And then calculating the priority of each alternative IP address according to the network performance parameters. And determines the alternative IP address with the highest priority as the connection IP address.
According to the principles of service-oriented performance, comprehensiveness, non-repeatability and testability, the network performance parameters in the embodiment of the invention comprise network delay parameters, packet loss rates, delay jitter parameters and the like.
In a specific implementation process, parameter values of Network performance parameters at different candidate IP addresses are obtained by a NS2(Network Simulator version 2) simulation method, then a CRITIC algorithm is used to calculate the weight of each Network performance parameter, for example, weighted values of Network delay, packet loss rate, and delay jitter are respectively determined, and the priority of each candidate IP address is determined by using weighted calculation.
Further, since the local database of the terminal generally stores the previously connected IP addresses, the determining a plurality of alternative IP addresses corresponding to the domain name includes:
analyzing the domain name, and determining all IP addresses corresponding to the domain name and stored local IP addresses;
and selecting a preset number of local IP addresses and IP addresses except the local IP address in all the IP addresses as the alternative IP addresses.
In a specific implementation process, the terminal stores the IP address for establishing the connection, so that a plurality of local IP addresses are stored in a local database of the terminal, and the local IP addresses are IP addresses for establishing the connection with the terminal in a historical time period. And for the IP address determined by analyzing the domain name at the current moment, the duplication with the local IP address exists, and for the duplicated local IP addresses, a preset number of local IP addresses are selected as alternative IP addresses. In addition, an IP address to which a connection with the terminal has not been established is also used as an alternative IP address. Thereby reducing a part of the amount of calculation.
For example, the domain name is analyzed to obtain a corresponding IP list a (the number of elements in the list a needs to be greater than 0), each IP address in the traversal list a is matched with a local database to obtain a hit list and a miss list c, and the IP with the first three priority levels in the hit list is selected to form a list b. And then combining the list b and the list c to obtain a list d, traversing each IP address in the list d, carrying out PING operation, and sequencing the IP addresses in the list d.
And (4) taking the IP address with the highest priority from the reordered list d to construct connection, setting the priority of the IP address to be the lowest if the construction fails, and updating the sequence of the IP addresses in the list d again until the connection is constructed successfully or all the IP addresses in the list d fail to be connected. And finally, updating the local database according to the arrangement condition of the IP addresses in the list d.
Further, since the network status is not always unchanged, after sending the connection request according to the connection IP address, the method further includes:
determining that the network state of the terminal meets a refresh policy;
selecting a refresh IP address with a set refresh number from the alternative IP addresses of the terminal;
for each refreshing IP address, determining a network state between the terminal and the refreshing IP address;
and updating the sequencing of the local IP addresses according to the network state of the refreshed IP addresses.
The refresh policy may be network state switching of the terminal, or reaching a threshold time, and the like. In a specific implementation process, when the terminal detects a network state switch (for example, a 4G network is switched to a 2G network), the terminal updates the local database. And taking out the IP addresses of the first three priority levels in the IP list, carrying out PING operation, and reordering the IP list after calculation.
In another specific embodiment, the terminal actively updates the local database every 10 minutes, and the updating mode is consistent with the updating process of the network state switching.
The refreshing strategy can ensure the timeliness of the local network state parameters and ensure the effectiveness of the relevant network state data received by the server.
Further, in order to ensure fluency of user usage in a weak network state and improve user experience, after sending a connection request according to the connection IP address, the method further includes:
sending a data acquisition request to the connection IP address, wherein the data acquisition request comprises the network state parameter of the connection IP address;
and receiving content data of a feedback grade sent by a server, wherein the feedback grade is the data volume grade of the content data corresponding to the network state parameter grade of the connection IP address determined by the server.
In the prior art, a server does not pay attention to the network state of a terminal, and when a server sends a high-quality resource file to the terminal in a weak network state, a page failure or network timeout occurs.
In the embodiment of the invention, in order to improve the user experience and increase the service flexibility, the server can configure data resources with different levels according to the needs. Different data resource levels correspond to different network state levels of the terminal, and for the condition that the network state of the terminal is good, the server can send content data with large data volume, such as pictures and videos with good quality, to the terminal, so that a user can obtain good experience; for the condition that the network state of the terminal is poor, the server sends content data with small data volume, such as compressed pictures and videos, or sends only text content without sending pictures to the terminal, so that the streaming degree of data transmission is ensured.
For example, two sets of feedback resources are configured, one corresponding to a normal network state and one corresponding to a weak network state. When the terminal and the server are connected, the terminal carries the network state parameters (packet loss rate, network delay, delay jitter, etc.) corresponding to the current IP address and the network type (2G, 3G, 4G, WIFI, etc.) of the current terminal in the request header sent to the server. After receiving the request, the server returns the content data of the corresponding grade according to the network state of the terminal. For example, in the weak network state of the terminal, the server sends the terminal a compressed picture, or sends only text content without sending the picture. Of course, the terminal may also configure more levels of feedback resources, which respectively correspond to different terminal network states.
The above-described flow charts are described in detail in specific examples for a more clear understanding of the present invention.
(1) The client analyzes to obtain an IP list a corresponding to the domain name (the number of elements in a needs to be more than 0), each element in the traversal list a is matched with a local IP database to obtain a hit list and a miss list c, and the IP with the first three priority levels in the hit list is selected to form a list b.
(2) And combining the list b and the list c to obtain a list d, traversing each IP in the list d, carrying out PING operation to obtain corresponding network performance parameters, and according to the principles of service-oriented performance, comprehensiveness, non-repeatability and testability, adopting network delay, packet loss rate and delay jitter as reference elements to calculate the priority of each IP and carrying out reordering. Here, network performance index values under different environments are obtained through an NS2 simulation method, objective weight values of network delay, packet loss rate and delay jitter are calculated by using a CRITIC algorithm, a priority is finally calculated, and the list d is reordered.
(3) And (4) taking the IP with the highest priority out of the reordered list d to construct the connection, setting the priority of the IP to be the lowest if the construction fails, and updating the sequence of the list d again. This step is performed in a loop until the connection construction is successful or all IP connections in list d fail. And finally, updating the local database according to the data in the list d.
(4) When the client detects the network state switching (such as switching from 4G to 2G), the client updates the local database. And taking out the first three IPs in the priority level in the IP list corresponding to each domain name, and reordering after PING and calculation.
(5) The client side can actively update the local database every 10 minutes, the updating mode is consistent with that of the local database in the steps (4) and (5), the timeliness of the local network state parameters can be guaranteed, and the validity of the client side related network state data received by the server side is guaranteed.
The server can configure two sets of resources for the request of the terminal, one set is used in a normal network environment, and the other set is used in a weak network environment.
(1) After the client and the server are connected, the client sends request data based on the connection, and the request header carries network state parameters (packet loss rate, network delay and delay jitter) corresponding to the current IP and the network type (2G, 3G and 4G, WIFI) of the current client.
(2) After receiving the request, the server takes out the network state description related field from the head information of the request, judges the network state of the client according to the network state, and returns the weak network resource if the network state is weak and the server is configured with the weak network resource aiming at the request; otherwise, returning normally.
An embodiment of the present invention further provides a network connection device, as shown in fig. 3, including:
a determination unit 301 configured to determine a domain name of the connection request in response to an operation by the user;
a resolving unit 302, configured to determine a plurality of alternative IP (internet protocol) addresses corresponding to the domain name;
a calculating unit 303, configured to determine, for each alternative IP address, a network state between the terminal and the alternative IP address;
a selecting unit 304, configured to select, according to the network state, a connection IP address with an optimal network state from the multiple candidate IP addresses;
a transceiving unit 305, configured to send a connection request according to the connection IP address.
In an optional embodiment, the computing unit is specifically configured to:
sending a PING (internet packet explorer) command to the alternative IP address;
determining a network performance parameter corresponding to the alternative IP address according to the received response message, wherein the network performance parameter is used for representing a network state between the terminal and the alternative IP address;
the selection unit is specifically configured to:
calculating the priority of each alternative IP address according to the network performance parameters;
and determining the alternative IP address with the highest priority as the connection IP address.
In an optional embodiment, the network performance parameter includes a network delay parameter, a packet loss rate, and a delay jitter parameter.
In an optional embodiment, the parsing unit is configured to:
analyzing the domain name, and determining all IP addresses corresponding to the domain name and stored local IP addresses;
and selecting a preset number of local IP addresses and IP addresses except the local IP address in all the IP addresses as the alternative IP addresses.
In an optional embodiment, the computing unit is further configured to:
determining that the network state of the terminal meets a refresh policy;
selecting a refresh IP address with a set refresh number from the alternative IP addresses of the terminal;
for each refreshing IP address, determining a network state between the terminal and the refreshing IP address;
and updating the sequencing of the local IP addresses according to the network state of the refreshed IP addresses.
In an optional embodiment, the transceiver unit is further configured to:
sending a data acquisition request to the connection IP address, wherein the data acquisition request comprises the network state parameter of the connection IP address;
and receiving content data of a feedback grade sent by a server, wherein the feedback grade is the data volume grade of the content data corresponding to the network state parameter grade of the connection IP address determined by the server.
Based on the same principle, the present invention also provides an electronic device, as shown in fig. 4, including:
the system comprises a processor 401, a memory 402, a transceiver 403 and a bus interface 404, wherein the processor 401, the memory 402 and the transceiver 403 are connected through the bus interface 404;
the processor 401 is configured to read the program in the memory 402, and execute the following method:
responding to the operation of a user, and determining a domain name of a connection request;
determining a plurality of alternative IP (Internet protocol) addresses corresponding to the domain name;
determining a network state between the terminal and each alternative IP address according to each alternative IP address;
selecting the IP address with the optimal network state from the multiple alternative IP addresses as a connection IP address according to the network state;
and sending a connection request according to the connection IP address.
The processor 401 is further configured to:
sending a PING (internet packet explorer) command to the alternative IP address;
determining a network performance parameter corresponding to the alternative IP address according to the received response message, wherein the network performance parameter is used for representing a network state between the terminal and the alternative IP address;
calculating the priority of each alternative IP address according to the network performance parameters;
and determining the alternative IP address with the highest priority as the connection IP address.
The network performance parameters comprise network time delay parameters, packet loss rates and time delay jitter parameters.
The processor 401 is further configured to:
analyzing the domain name, and determining all IP addresses corresponding to the domain name and stored local IP addresses;
and selecting a preset number of local IP addresses and IP addresses except the local IP address in all the IP addresses as the alternative IP addresses.
The processor 401 is further configured to:
determining that the network state of the terminal meets a refresh policy;
selecting a refresh IP address with a set refresh number from the alternative IP addresses of the terminal;
for each refreshing IP address, determining a network state between the terminal and the refreshing IP address;
and updating the sequencing of the local IP addresses according to the network state of the refreshed IP addresses.
The processor 401 is further configured to:
sending a data acquisition request to the connection IP address, wherein the data acquisition request comprises the network state parameter of the connection IP address;
and receiving content data of a feedback grade sent by a server, wherein the feedback grade is the data volume grade of the content data corresponding to the network state parameter grade of the connection IP address determined by the server.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable network connection device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable network connection device, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable network connection device to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable network connection device to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (14)

1. A network connection method, comprising:
the terminal responds to the operation of a user and determines the domain name of the connection request;
determining a plurality of alternative IP (Internet protocol) addresses corresponding to the domain name;
determining a network state between the terminal and each alternative IP address according to each alternative IP address;
selecting the IP address with the optimal network state from the multiple alternative IP addresses as a connection IP address according to the network state;
and sending a connection request according to the connection IP address.
2. The method of claim 1, wherein the determining the network status between the terminal and the alternative IP address comprises:
sending a PING (internet packet explorer) command to the alternative IP address;
determining a network performance parameter corresponding to the alternative IP address according to the received response message, wherein the network performance parameter is used for representing a network state between the terminal and the alternative IP address;
the selecting, according to the network state, a connection IP address with an optimal network state from the multiple candidate IP addresses includes:
calculating the priority of each alternative IP address according to the network performance parameters;
and determining the alternative IP address with the highest priority as the connection IP address.
3. The method of claim 2, wherein the network performance parameters include network delay parameters, packet loss rates, and delay jitter parameters.
4. The method of claim 1, wherein the determining the plurality of alternative IP addresses corresponding to the domain name comprises:
analyzing the domain name, and determining all IP addresses corresponding to the domain name and stored local IP addresses;
and selecting a preset number of local IP addresses and IP addresses except the local IP address in all the IP addresses as the alternative IP addresses.
5. The method of claim 4, wherein after sending the connection request based on the connection IP address, further comprising:
determining that the network state of the terminal meets a refresh policy;
selecting a refresh IP address with a set refresh number from the alternative IP addresses of the terminal;
for each refreshing IP address, determining a network state between the terminal and the refreshing IP address;
and updating the sequencing of the local IP addresses according to the network state of the refreshed IP addresses.
6. The method of any of claims 1 to 5, wherein after sending a connection request according to the connection IP address, further comprising:
sending a data acquisition request to the connection IP address, wherein the data acquisition request comprises the network state parameter of the connection IP address;
and receiving content data of a feedback grade sent by a server, wherein the feedback grade is the data volume grade of the content data corresponding to the network state parameter grade of the connection IP address determined by the server.
7. A network connection device, comprising:
a determination unit configured to determine a domain name of the connection request in response to an operation by a user;
a resolution unit, configured to determine a plurality of alternative IP (internet protocol) addresses corresponding to the domain name;
the computing unit is used for determining the network state between the terminal and each alternative IP address;
the selection unit is used for selecting the IP address with the optimal network state from the multiple alternative IP addresses as the connection IP address according to the network state;
and the receiving and sending unit is used for sending a connection request according to the connection IP address.
8. The apparatus of claim 7, wherein the computing unit is specifically configured to:
sending a PING (internet packet explorer) command to the alternative IP address;
determining a network performance parameter corresponding to the alternative IP address according to the received response message, wherein the network performance parameter is used for representing a network state between the terminal and the alternative IP address;
the selection unit is specifically configured to:
calculating the priority of each alternative IP address according to the network performance parameters;
and determining the alternative IP address with the highest priority as the connection IP address.
9. The apparatus of claim 8, wherein the network performance parameters comprise network delay parameters, packet loss rates, and delay jitter parameters.
10. The apparatus of claim 7, wherein the parsing unit is to:
analyzing the domain name, and determining all IP addresses corresponding to the domain name and stored local IP addresses;
and selecting a preset number of local IP addresses and IP addresses except the local IP address in all the IP addresses as the alternative IP addresses.
11. The apparatus of claim 10, wherein the computing unit is further to:
determining that the network state of the terminal meets a refresh policy;
selecting a refresh IP address with a set refresh number from the alternative IP addresses of the terminal;
for each refreshing IP address, determining a network state between the terminal and the refreshing IP address;
and updating the sequencing of the local IP addresses according to the network state of the refreshed IP addresses.
12. The apparatus according to any of claims 7 to 11, wherein the transceiver unit is further configured to:
sending a data acquisition request to the connection IP address, wherein the data acquisition request comprises the network state parameter of the connection IP address;
and receiving content data of a feedback grade sent by a server, wherein the feedback grade is the data volume grade of the content data corresponding to the network state parameter grade of the connection IP address determined by the server.
13. An electronic device, comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-6.
14. A non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the method of any one of claims 1 to 6.
CN202010041404.0A 2020-01-15 2020-01-15 Network connection method and device Active CN111212156B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010041404.0A CN111212156B (en) 2020-01-15 2020-01-15 Network connection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010041404.0A CN111212156B (en) 2020-01-15 2020-01-15 Network connection method and device

Publications (2)

Publication Number Publication Date
CN111212156A true CN111212156A (en) 2020-05-29
CN111212156B CN111212156B (en) 2022-11-11

Family

ID=70787597

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010041404.0A Active CN111212156B (en) 2020-01-15 2020-01-15 Network connection method and device

Country Status (1)

Country Link
CN (1) CN111212156B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112887429A (en) * 2021-03-08 2021-06-01 深圳市车宝信息科技有限公司 Data transmission method and device, electronic equipment and storage medium
CN114024936A (en) * 2020-07-17 2022-02-08 北京搜狗科技发展有限公司 DNS analysis method and device based on HTTPDNS
CN114143251A (en) * 2021-12-08 2022-03-04 北京天融信网络安全技术有限公司 Intelligent routing method and device, electronic equipment and computer readable storage medium
CN114745272A (en) * 2020-12-23 2022-07-12 武汉斗鱼网络科技有限公司 Method, server, medium, and apparatus for increasing application start speed
CN115473871A (en) * 2022-09-19 2022-12-13 广州市百果园网络科技有限公司 Domain name local resolution method and device, equipment, medium and product thereof

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030055979A1 (en) * 2001-09-19 2003-03-20 Cooley William Ray Internet domain name resolver
CN102340554A (en) * 2011-09-29 2012-02-01 奇智软件(北京)有限公司 Optimal application server selection method and device for domain name system (DNS)
CN102739811A (en) * 2011-04-07 2012-10-17 中国移动通信集团公司 Method and device of domain name resolution
CN103051717A (en) * 2012-12-25 2013-04-17 北京小米科技有限责任公司 Method, device and equipment for processing http request
CN103957283A (en) * 2011-09-29 2014-07-30 北京奇虎科技有限公司 Optimal-application-server selection method and device for domain name system
CN104065761A (en) * 2011-09-29 2014-09-24 北京奇虎科技有限公司 Application server selecting method and network connection method
CN104602227A (en) * 2015-02-02 2015-05-06 携程计算机技术(上海)有限公司 Network-adaptive mobile application data loading method
CN107040617A (en) * 2016-10-11 2017-08-11 阿里巴巴集团控股有限公司 The method and device of data processing
CN108696649A (en) * 2017-04-06 2018-10-23 百度在线网络技术(北京)有限公司 Image processing method, device, equipment and computer readable storage medium
CN109462668A (en) * 2018-10-25 2019-03-12 维沃移动通信有限公司 A kind of method and apparatus of processing domain name mapping request
CN110519401A (en) * 2019-07-05 2019-11-29 中国平安财产保险股份有限公司 Improve method, apparatus, equipment and the storage medium of network Access Success Rate

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030055979A1 (en) * 2001-09-19 2003-03-20 Cooley William Ray Internet domain name resolver
CN102739811A (en) * 2011-04-07 2012-10-17 中国移动通信集团公司 Method and device of domain name resolution
CN102340554A (en) * 2011-09-29 2012-02-01 奇智软件(北京)有限公司 Optimal application server selection method and device for domain name system (DNS)
CN103957283A (en) * 2011-09-29 2014-07-30 北京奇虎科技有限公司 Optimal-application-server selection method and device for domain name system
CN104065761A (en) * 2011-09-29 2014-09-24 北京奇虎科技有限公司 Application server selecting method and network connection method
CN103051717A (en) * 2012-12-25 2013-04-17 北京小米科技有限责任公司 Method, device and equipment for processing http request
CN104602227A (en) * 2015-02-02 2015-05-06 携程计算机技术(上海)有限公司 Network-adaptive mobile application data loading method
CN107040617A (en) * 2016-10-11 2017-08-11 阿里巴巴集团控股有限公司 The method and device of data processing
CN108696649A (en) * 2017-04-06 2018-10-23 百度在线网络技术(北京)有限公司 Image processing method, device, equipment and computer readable storage medium
CN109462668A (en) * 2018-10-25 2019-03-12 维沃移动通信有限公司 A kind of method and apparatus of processing domain name mapping request
CN110519401A (en) * 2019-07-05 2019-11-29 中国平安财产保险股份有限公司 Improve method, apparatus, equipment and the storage medium of network Access Success Rate

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114024936A (en) * 2020-07-17 2022-02-08 北京搜狗科技发展有限公司 DNS analysis method and device based on HTTPDNS
CN114745272A (en) * 2020-12-23 2022-07-12 武汉斗鱼网络科技有限公司 Method, server, medium, and apparatus for increasing application start speed
CN114745272B (en) * 2020-12-23 2023-09-15 武汉斗鱼网络科技有限公司 Method, server, medium and device for improving starting speed of application program
CN112887429A (en) * 2021-03-08 2021-06-01 深圳市车宝信息科技有限公司 Data transmission method and device, electronic equipment and storage medium
CN114143251A (en) * 2021-12-08 2022-03-04 北京天融信网络安全技术有限公司 Intelligent routing method and device, electronic equipment and computer readable storage medium
CN114143251B (en) * 2021-12-08 2023-10-13 北京天融信网络安全技术有限公司 Intelligent routing method, intelligent routing device, electronic equipment and computer readable storage medium
CN115473871A (en) * 2022-09-19 2022-12-13 广州市百果园网络科技有限公司 Domain name local resolution method and device, equipment, medium and product thereof
CN115473871B (en) * 2022-09-19 2023-08-04 广州市百果园网络科技有限公司 Domain name local resolution method and device, equipment, medium and product thereof

Also Published As

Publication number Publication date
CN111212156B (en) 2022-11-11

Similar Documents

Publication Publication Date Title
CN111212156B (en) Network connection method and device
EP3968594B1 (en) Method, apparatus and system for selecting mobile edge computing node
US11316786B2 (en) Systems and methods for directly responding to distributed network traffic
US10587544B2 (en) Message processing method, processing server, terminal, and storage medium
CN104137511B (en) Method, equipment and client device for the dynamic select of security protocol
CN108173938B (en) Server load distribution method and device
CN104580192B (en) The treating method and apparatus of the network access request of application program
CN104333567B (en) It is the web cachings serviced using safety
CN108200165B (en) Request Transmission system, method, apparatus and storage medium
US9313015B2 (en) HTTP-based synchronization method and apparatus
CN109831548B (en) Virtual content delivery network vCDN node establishment method and server
CN107613037B (en) Domain name redirection method and system
CN103312716B (en) A kind of method and system accessing internet information
US20190387565A1 (en) Method and apparatus for web browsing on multihomed mobile devices
CN108390955A (en) Domain Name acquisition method, Website access method and server
KR102208877B1 (en) System for multipath packet scheduling method therefor
CN105991518B (en) Network access verifying method and device
CN105635073A (en) Access control method and device and network access equipment
CN108418847A (en) A kind of network traffic cache system, method and device
US9729652B2 (en) Dynamically affinitizing users to a version of a website
CN110730189B (en) Communication authentication method, device, equipment and storage medium
US8706865B1 (en) Enhanced network communications using diagnostic information
CN107135091A (en) A kind of application quality index mapping method, server and client side
US20130226984A1 (en) Method and apparatus of providing optimized web browser communications
CN112600703A (en) Network equipment remote access fault positioning method and device

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