CN106713454A - Network connection method and device - Google Patents

Network connection method and device Download PDF

Info

Publication number
CN106713454A
CN106713454A CN201611198389.0A CN201611198389A CN106713454A CN 106713454 A CN106713454 A CN 106713454A CN 201611198389 A CN201611198389 A CN 201611198389A CN 106713454 A CN106713454 A CN 106713454A
Authority
CN
China
Prior art keywords
server
connection
connection request
network
internet resources
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
CN201611198389.0A
Other languages
Chinese (zh)
Other versions
CN106713454B (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201611198389.0A priority Critical patent/CN106713454B/en
Publication of CN106713454A publication Critical patent/CN106713454A/en
Application granted granted Critical
Publication of CN106713454B publication Critical patent/CN106713454B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/142Managing session states for stateless protocols; Signalling session states; State transitions; Keeping-state mechanisms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/148Migration or transfer of sessions

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a network connection method. The method comprises the steps that a user terminal sends a first connection request to a first server which provides network resources and starts timing at a time point of sending the first connection request; and the user terminal sends a second connection request to a second server which provides the network resources when first connection response returned by the first server is not received in preset first interval time and the user terminal is in a working state of waiting for the first connection response. The invention also discloses a network connection device. Through adoption of the embodiment of the invention, resource consumption is reduced, and the network connection rate is improved.

Description

A kind of method for connecting network and device
Technical field
The present invention relates to electronic technology field, more particularly to a kind of method for connecting network and device.
Background technology
Due to the complex characteristics of mobile network, cell-phone customer terminal often enters weak net in a variety of geographical environments Under network state, and the network service success rate of mobile phone is very low under vulnerable network state.Mobile Internet application is used mostly TCP associations View, Transmission Control Protocol is directed to the transport layer protocol of wired networks design, and Transmission Control Protocol is simultaneously not suitable with the feature of mobile network, generally moves Dynamic application and development selection Transmission Control Protocol.
Time-out is the most crucial part of Transmission Control Protocol with re-transmission, and in unstable mobile network, the design of Retransmission timeout is outstanding For important.During connect and set up, due to network unreliable characteristic in itself, it is inevitable the need for retransmission mechanism protect Barrier reliability services.In most of BSD (Berkeley Software Distribution, socket) realizations, if actively connecting The side of connecing does not receive the response of SYN (synchronous, handshake), then sending the 2nd SYN at the 6th second is retried, then Interval sends the 3rd SYN and is retried after 24 seconds, and response was not received also at the 75th second, then connect calls return ETIMEOUT, therefore in the case where failure can not be confirmed at once, it is necessary to the time of 75 seconds could obtain result.If not being User network is unavailable, but certain server break down, interface disabling, the factor such as unstable networks, that 75 seconds time can only 1 IP&Port is attempted to being unacceptable.For example, the connect Retransmission timeouts for Android, can be by timeout interval It is (1,2,4,8,16) to set gradually, and returns to ETIMEOUT within 32 seconds after the 5th is retried, and 63 seconds are needed altogether;For iOS's Connect Retransmission timeouts, it is (1,1,1,1,1,2,4,8,16,32) that can set gradually timeout interval, and 67s is needed altogether.
In the prior art scheme, there are two kinds of Retransmission timeout internetwork connection modes:(1) it is connected in series, for each money Source sequentially be attached trial.When there is multiple (IP, Port) resources, the efficiency of the strategy traversal of serial connection is relatively low, Again because mobile Internet has unstable feature, time-out time sets too short, can cause in the case of vulnerable network, Connect always fails, cause it is unavailable, therefore serial connection mode connection speed it is slow.(2) concurrently connect, while initiating to N The call connected of individual (IP, Port), not only most can soon find available connection, and have also been found that connect is most fast (IP, Port) is configured.But, server needs N times that the concatenation ability for providing is serial connection under the strategy for concurrently connecting, It is greatly to waste to server connection resource.Meanwhile, concurrently connection can cause the competition of connection resource, so as to influence network just Normal Consumer's Experience.
The content of the invention
The embodiment of the present invention provides a kind of method for connecting network and device.Resource consumption in prior art can be solved Greatly, the low technical problem of network connection speed.
First aspect present invention provides a kind of method for connecting network, including:
User terminal sends the first connection request to the first server for providing Internet resources, and connects sending described first The time point for connecing request starts timing;
The user terminal ought not receive first that the first server is returned within default first interval time When connection response and the working condition in wait first connection response, to the second server for providing the Internet resources Send the second connection request.
Wherein, it is described to after second server the second connection request of transmission for providing the Internet resources, also include:
Start timing at the time point for sending second connection request;
When the second connection response and place that the second server return is not received within default second interval time When the working condition of second connection response is waited, send the 3rd to the 3rd server for providing the Internet resources and connect Request.
Wherein, before the user terminal sends the first connection request to the first server for providing Internet resources, also wrap Include:
The first connection timeout interval is set for first connection request respectively, is set for second connection request Second connection timeout interval, wherein, the first connection timeout interval is more than first interval time, and second connection is super When interval be more than second interval time.
Wherein, it is described to after second server the second connection request of transmission for providing the Internet resources, also include:
When receiving first connection response that the first server sends and receive the second server hair During the second connection response sent, network service quality, the Yi Jisuo between the user terminal and the first server are determined State the network service quality between user terminal and the second server;
The optimal corresponding first server of the network service quality of selection or the second server carry out net Network is connected.
Wherein, it is described to after second server the second connection request of transmission for providing the Internet resources, also include:
Respond and receive the second server when the connection time-out for first connection request return is received During the second connection response for returning, the network connection with the second server is set up.
Wherein, it is described to include to second server the second connection request of transmission for providing the Internet resources:
The second connection request is sent to the second server for providing the Internet resources by changing the network address, wherein, The network address includes IP address and port numbers.
Correspondingly, second aspect present invention provides a kind of network connection device, including:
First sending module, for sending the first connection request to the first server for providing Internet resources, and is sending The time point of first connection request starts timing;
Second sending module, does not receive what the first server was returned for working as within default first interval time When the first connection response and the working condition in wait first connection response, to the second clothes for providing the Internet resources Business device sends the second connection request.
Wherein, described device also includes:
3rd sending module, for starting timing at the time point for sending second connection request;When default The second connection response of the second server return is not received in two interval times and is rung in waiting described second to connect During the working condition answered, the 3rd connection request is sent to the 3rd server for providing the Internet resources.
Wherein, described device also includes:
Set of time module, for being directed to the first connection of first connection request setting timeout interval respectively, for institute State the second connection request and the second connection timeout interval is set, wherein, the first connection timeout interval is more than the described first interval Time, second interval time is more than second interval time.
Wherein, described device also includes:
Network selection module, first connection response of the first server transmission is received for working as and is received During the second connection response that the second server sends, the network between the user terminal and the first server is determined Network service quality between service quality and the user terminal and the second server;
The optimal corresponding first server of the network service quality of selection or the second server carry out net Network is connected.
Wherein, described device also includes:
Network sets up module, and the response of connection time-out and reception that are returned for first connection request are received for working as During the second connection response returned to the second server, set up and the network connection of the second server.
Wherein, second sending module specifically for:
The second connection request is sent to the second server is provided by changing the network address, wherein, the network ground Location includes IP address and port numbers.
Correspondingly, third aspect present invention provides a kind of network connection device, including interface circuit, memory and place Reason device, wherein, batch processing code is stored in the memory, and the processor is used to call what is stored in the memory Program code, for performing following operation:
The first connection request is sent to the first server for providing Internet resources, and is sending first connection request Time point starts timing;
When the first connection response and place that the first server return is not received within default first interval time When the working condition of first connection response is waited, send second to the second server for providing the Internet resources and connect Request.
Implement the embodiment of the present invention, first to first server the first connection request of transmission for providing Internet resources, and The time point for sending first connection request starts timing, then described when not received within default first interval time It is described to providing when the first connection response of first server return and the working condition in wait first connection response The second server of Internet resources sends the second connection request, so as to not only reduce resource consumption, and improves network company Connect speed.
Brief description of the drawings
Technical scheme in order to illustrate more clearly the embodiments of the present invention, below will be to that will use needed for embodiment description Accompanying drawing be briefly described, it should be apparent that, drawings in the following description are some embodiments of the present invention, for this area For those of ordinary skill, on the premise of not paying creative work, other accompanying drawings can also be obtained according to these accompanying drawings.
Fig. 1 is a kind of schematic flow sheet of the first embodiment of method for connecting network proposed by the present invention;
Fig. 2 is a kind of schematic diagram of composite network connection provided in an embodiment of the present invention;
Fig. 3 is a kind of schematic flow sheet of the second embodiment of method for connecting network proposed by the present invention;
Fig. 4 is a kind of structural representation of network connection device provided in an embodiment of the present invention;
Fig. 5 is the structural representation of another network connection device provided in an embodiment of the present invention.
Specific embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation is described, it is clear that described embodiment is a part of embodiment of the invention, rather than whole embodiments.Based on this hair Embodiment in bright, the every other implementation that those of ordinary skill in the art are obtained under the premise of creative work is not made Example, belongs to the scope of protection of the invention.
Fig. 1 is refer to, Fig. 1 is a kind of schematic flow sheet of the first embodiment of method for connecting network proposed by the present invention. As illustrated, the method in the embodiment of the present invention includes:
S101, user terminal sends the first connection request to the first server for providing Internet resources, and described sending The time point of the first connection request starts timing.
Optionally, before user terminal sends the first connection request to the first server for providing Internet resources, respectively The first connection timeout interval is set for first connection request, the second connection time-out is set for second connection request Interval, wherein, the first connection timeout interval is more than first interval time, and the second connection timeout interval is more than institute Stated for the second interval time.
In implementing, set in actual connection time-out, can be received according to different system features, connected applications Consumer's Experience scope, can by connect call time-out be set to different values, it is also possible to be set to identical value.Example Such as, in IOS systems, the connection timeout interval that can be called connect is set to 10s, and IOS can automatically carry out 6 in 10s Secondary repeating transmission.And in android system, system initiated the 2nd repeating transmission at the 9th second, then by 12 seconds the 3rd time repeating transmission.
S102, the user terminal ought not receive what the first server was returned within default first interval time When the first connection response and the working condition in wait first connection response, to the second clothes for providing the Internet resources Business device sends the second connection request.
In implementing, second can be sent to the second server for providing the Internet resources by changing the network address Connection request, wherein, the network address includes IP address and port numbers.
Optionally, timing is started at the time point for sending second connection request;When in default second interval time The second connection response and the work shape in second connection response is waited that the second server is returned are not received inside During state, the 3rd connection request is sent to the 3rd server for providing the Internet resources.
For example, as shown in Fig. 2 user terminal sends connection by (ip1, port1) to the server 1 for providing Internet resources Request, and the connection timeout interval for setting is 12 seconds, after connection request sends out 4 seconds, user terminal is still in the company of wait Connect the working condition of response, due to do not receive server 1 return connection response, user terminal by (ip2, port2) to The server 2 for providing Internet resources sends connection request, the like, until having initiated 5 groups of call connecteds of IP&Port.This When equivalent to the pseudo- concurrent fashion for having used composite joint, successively to server 1, server 2, server 3, the kimonos of server 4 Network connection is set up in the business request of device 5.
In inventive embodiments, the first connection request is sent to the first server for providing Internet resources first, and in hair The time point of first connection request is sent to start timing, then when not receiving described within default first interval time When the first connection response of one server return and the working condition in wait first connection response, to the offer net The second server of network resource sends the second connection request, so as to not only reduce resource consumption, and improves network connection Speed.
Fig. 3 is refer to, Fig. 3 is a kind of schematic flow sheet of the second embodiment of method for connecting network proposed by the present invention. As illustrated, the method in the embodiment of the present invention includes:
S301, user terminal sends the first connection request to the first server for providing Internet resources, and described sending The time point of the first connection request starts timing.
Optionally, before user terminal sends the first connection request to the first server for providing Internet resources, respectively The first connection timeout interval is set for first connection request, the second connection time-out is set for second connection request Interval, wherein, the first connection timeout interval is more than first interval time, and the second connection timeout interval is more than institute Stated for the second interval time.
In implementing, set in actual connection time-out, can be received according to different system features, connected applications Consumer's Experience scope, can by connect call time-out be set to different values, it is also possible to be set to identical value.Example Such as, in IOS systems, the connection timeout interval that can be called connect is set to 10s, and IOS can automatically carry out 6 in 10s Secondary repeating transmission.And in android system, system initiated the 2nd repeating transmission at the 9th second, then by 12 seconds the 3rd time repeating transmission.
S302, the user terminal ought not receive what the first server was returned within default first interval time When the first connection response and the working condition in wait first connection response, to the second clothes for providing the Internet resources Business device sends the second connection request.
In implementing, second can be sent to the second server for providing the Internet resources by changing the network address Connection request, wherein, the network address includes IP address and port numbers.
Optionally, timing is started at the time point for sending second connection request;When in default second interval time The second connection response and the work shape in second connection response is waited that the second server is returned are not received inside During state, the 3rd connection request is sent to the 3rd server for providing the Internet resources.
For example, as shown in Fig. 2 user terminal sends connection by (ip1, port1) to the server 1 for providing Internet resources Request, and the connection timeout interval for setting is 12 seconds, after connection request sends out 4 seconds, user terminal is still in the company of wait Connect the working condition of response, due to do not receive server 1 return connection response, user terminal by (ip2, port2) to The server 2 for providing Internet resources sends connection request, the like, until having initiated 5 groups of call connecteds of IP&Port.This When equivalent to the pseudo- concurrent fashion for having used composite joint, successively to server 1, server 2, server 3, the kimonos of server 4 Network connection is set up in the business request of device 5.
S303, when receiving first connection response that the first server sends and receive the second service During the second connection response that device sends, determine network service quality between the user terminal and the first server, with And the network service quality between the user terminal and the second server.
S304, the optimal corresponding first server of the network service quality of selection or the second server enter Row network connection.
For example, as shown in Fig. 2 server 1, server 2, server 3 return to connection response respectively, therefore user terminal can To select server 1, server 2 or server 3 to set up network connection, the net of user terminal and server 1 can be respectively determined The network service quality of network service quality, the network service quality of user terminal and server 2, user terminal and server 3, choosing Select the corresponding server 3 of optimal network service quality and set up network connection.
Optionally, when receiving the connection time-out response that is returned for first connection request and receive described second During the second connection response that server is returned, the network connection with the second server is set up.
For example, as shown in Fig. 2 after user terminal sends connection request to server 4 and server 5 respectively, in connection Timeout interval does not receive the connection response that server 4 and server 5 are returned in 12 seconds, but receives server 1, server before 2 or server 3 return connection response, then only need to from server 1, server 2 or server 3 choose server set up network Connection.
In inventive embodiments, the first connection request is sent to the first server for providing Internet resources first, and in hair The time point of first connection request is sent to start timing, then when not receiving described within default first interval time When the first connection response of one server return and the working condition in wait first connection response, to the offer net The second server of network resource sends the second connection request, so as to not only reduce resource consumption, and improves network connection Speed.
Fig. 4 is refer to, Fig. 4 is a kind of structural representation of network connection device proposed by the present invention.As illustrated, this hair Device in bright embodiment includes:
First sending module 401, for sending the first connection request to the first server for providing Internet resources, and in hair The time point of first connection request is sent to start timing.
Second sending module 402, returns for that ought not receive the first server within default first interval time The first connection response for returning and during in the working condition for waiting first connection response, to providing the of the Internet resources Two servers send the second connection request.
In implementing, second can be sent to the second server for providing the Internet resources by changing the network address Connection request, wherein, the network address includes IP address and port numbers.
Optionally, as shown in figure 4, the device in the embodiment of the present invention also includes:
3rd sending module 403, for starting timing at the time point for sending second connection request;When default The second connection response of the second server return is not received in second interval time and in wait second connection During the working condition of response, the 3rd connection request is sent to the 3rd server for providing the Internet resources.
For example, as shown in Fig. 2 user terminal sends connection by (ip1, port1) to the server 1 for providing Internet resources Request, and the connection timeout interval for setting is 12 seconds, after connection request sends out 4 seconds, user terminal is still in the company of wait Connect the working condition of response, due to do not receive server 1 return connection response, user terminal by (ip2, port2) to The server 2 for providing Internet resources sends connection request, the like, until having initiated 5 groups of call connecteds of IP&Port.This When equivalent to the pseudo- concurrent fashion for having used composite joint, successively to server 1, server 2, server 3, the kimonos of server 4 Network connection is set up in the business request of device 5.
Optionally, as shown in figure 4, the device in the embodiment of the present invention also includes:
Set of time module 404, sets the first connection timeout interval, is directed to for being directed to first connection request respectively Second connection request sets second and connects timeout interval, wherein, between the first connection timeout interval is more than described first Every the time, second interval time is more than second interval time.
In implementing, set in actual connection time-out, can be received according to different system features, connected applications Consumer's Experience scope, can by connect call time-out be set to different values, it is also possible to be set to identical value.Example Such as, in IOS systems, the connection timeout interval that can be called connect is set to 10s, and IOS can automatically carry out 6 in 10s Secondary repeating transmission.And in android system, system initiated the 2nd repeating transmission at the 9th second, then by 12 seconds the 3rd time repeating transmission.
Optionally, as shown in figure 4, the device in the embodiment of the present invention also includes:
Network selection module 405, first connection response of the first server transmission is received for working as and is connect When receiving the second connection response that the second server sends, determine between the user terminal and the first server Network service quality between network service quality and the user terminal and the second server;The optimal institute of selection Stating the corresponding first server of network service quality or the second server carries out network connection.
For example, as shown in Fig. 2 user terminal sends connection by (ip1, port1) to the server 1 for providing Internet resources Request, and the connection timeout interval for setting is 12 seconds, after connection request sends out 4 seconds, user terminal is still in the company of wait Connect the working condition of response, due to do not receive server 1 return connection response, user terminal by (ip2, port2) to The server 2 for providing Internet resources sends connection request, the like, until having initiated 5 groups of call connecteds of IP&Port.This When equivalent to the pseudo- concurrent fashion for having used composite joint, successively to server 1, server 2, server 3, the kimonos of server 4 Network connection is set up in the business request of device 5.
For example, as shown in Fig. 2 server 1, server 2, server 3 return to connection response respectively, therefore user terminal can To select server 1, server 2 or server 3 to set up network connection, the net of user terminal and server 1 can be respectively determined The network service quality of network service quality, the network service quality of user terminal and server 2, user terminal and server 3, choosing Select the corresponding server 3 of optimal network service quality and set up network connection.
Optionally, as shown in figure 4, the device in the embodiment of the present invention also includes:
Network sets up module 406, for when receive for first connection request return connection time-out response and When receiving the second connection response that the second server is returned, the network connection with the second server is set up.
For example, as shown in Fig. 2 after user terminal sends connection request to server 4 and server 5 respectively, in connection Timeout interval does not receive the connection response that server 4 and server 5 are returned in 12 seconds, but receives server 1, server before 2 or server 3 return connection response, then only need to from server 1, server 2 or server 3 choose server set up network Connection.
In inventive embodiments, the first connection request is sent to the first server for providing Internet resources first, and in hair The time point of first connection request is sent to start timing, then when not receiving described within default first interval time When the first connection response of one server return and the working condition in wait first connection response, to the offer net The second server of network resource sends the second connection request, so as to not only reduce resource consumption, and improves network connection Speed.
Fig. 5 is refer to, Fig. 5 is the structural representation of another network connection device that the embodiment of the present invention is proposed.As schemed Shown, the device can include:At least one processor 501, such as CPU, at least one communication interface 502, at least one deposits Reservoir 503, at least one bus 505.Wherein, bus 505 is used to realize the connection communication between these components.Wherein, this hair The communication interface 502 of device is wired sending port in bright embodiment, or wireless device, such as including antenna assembly, Communication for carrying out signaling or data with other node devices.Memory 503 can be high-speed RAM memory, or Non-labile memory (non-volatile memory), for example, at least one magnetic disk storage.Memory 503 is optional Can also be at least one storage device for being located remotely from aforementioned processor 501.Batch processing code is stored in memory 503, And processor 501 is used to call the program code stored in memory, for performing following operation:
The first connection request is sent to the first server for providing Internet resources, and is sending first connection request Time point starts timing;
When the first connection response and place that the first server return is not received within default first interval time When the working condition of first connection response is waited, send second to the second server for providing the Internet resources and connect Request.
Wherein, processor 501 is additionally operable to perform following operating procedure:
Start timing at the time point for sending second connection request;
When the second connection response and place that the second server return is not received within default second interval time When the working condition of second connection response is waited, send the 3rd to the 3rd server for providing the Internet resources and connect Request.
Wherein, processor 501 is additionally operable to perform following operating procedure:
The first connection timeout interval is set for first connection request respectively, is set for second connection request Second connection timeout interval, wherein, the first connection timeout interval is more than first interval time, and second connection is super When interval be more than second interval time.
Wherein, processor 501 is additionally operable to perform following operating procedure:
When receiving first connection response that the first server sends and receive the second server hair During the second connection response sent, network service quality, the Yi Jisuo between the user terminal and the first server are determined State the network service quality between user terminal and the second server;
The optimal corresponding first server of the network service quality of selection or the second server carry out net Network is connected.
Wherein, processor 501 is additionally operable to perform following operating procedure:
Respond and receive the second server when the connection time-out for first connection request return is received During the second connection response for returning, the network connection with the second server is set up.
Wherein, processor 501 is additionally operable to perform following operating procedure:
The second connection request is sent to the second server for providing the Internet resources by changing the network address, wherein, The network address includes IP address and port numbers.
It should be noted that for each foregoing embodiment of the method, in order to be briefly described, therefore it is all expressed as one it is The combination of actions of row, but those skilled in the art should know, and the present invention is not limited by described sequence of movement, because It is that, according to the present invention, certain some step can sequentially or simultaneously be carried out using other.Secondly, those skilled in the art also should Know, embodiment described in this description belongs to preferred embodiment, involved action and module not necessarily this hair Necessary to bright.
In the above-described embodiments, the description to each embodiment all emphasizes particularly on different fields, and is not described in certain embodiment Part, may refer to the associated description of other embodiment.
One of ordinary skill in the art will appreciate that all or part of step in the various methods of above-described embodiment is can Completed with instructing the hardware of correlation by program, the program can be stored in a computer-readable recording medium, storage Medium can include:Flash disk, read-only storage (English:Read-Only Memory, referred to as:ROM), random access device (English Text:Random Access Memory, referred to as:RAM), disk or CD etc..
The content download method and relevant device that are there is provided the embodiment of the present invention above, system are described in detail, Specific case used herein is set forth to principle of the invention and implementation method, and the explanation of above example is use Understand the method for the present invention and its core concept in help;Simultaneously for those of ordinary skill in the art, according to of the invention Thought, will change in specific embodiments and applications, and in sum, this specification content should not be construed as Limitation of the present invention.

Claims (13)

1. a kind of method for connecting network, it is characterised in that methods described includes:
User terminal sends the first connection request to the first server for providing Internet resources, and please first connection is sent The time point asked starts timing;
The user terminal is when the first connection that the first server return is not received within default first interval time When response and the working condition in wait first connection response, sent to the second server for providing the Internet resources Second connection request.
2. the method for claim 1, it is characterised in that described to be sent to the second server for providing the Internet resources After second connection request, also include:
Start timing at the time point for sending second connection request;
When do not received within default second interval time the second connection response that the second server returns and in etc. When the working condition of second connection response, sending the 3rd connection to the 3rd server for providing the Internet resources please Ask.
3. method as claimed in claim 2, it is characterised in that the user terminal is to the first server for providing Internet resources Before sending the first connection request, also include:
The first connection timeout interval is set for first connection request respectively, second is set for second connection request Connection timeout interval, wherein, the first connection timeout interval is more than between first interval time, the second connection time-out Every more than second interval time.
4. the method for claim 1, it is characterised in that described to be sent to the second server for providing the Internet resources After second connection request, also include:
When receiving first connection response that the first server sends and receive what the second server sent During the second connection response, the network service quality and the use between the user terminal and the first server are determined Network service quality between family terminal and the second server;
The optimal corresponding first server of the network service quality of selection or the second server carry out network company Connect.
5. the method for claim 1, it is characterised in that described to be sent to the second server for providing the Internet resources After second connection request, also include:
Respond and receive the second server return when the connection time-out for first connection request return is received The second connection response when, set up and the network connection of the second server.
6. the method as described in claim 1-5 any one, it is characterised in that described to providing the second of the Internet resources Server sends the second connection request to be included:
The second connection request is sent to the second server for providing the Internet resources by changing the network address, wherein, it is described The network address includes IP address and port numbers.
7. a kind of network connection device, it is characterised in that described device includes:
First sending module is for sending the first connection request to the first server for providing Internet resources and described sending The time point of the first connection request starts timing;
Second sending module, the first server is returned first is not received for working as within default first interval time When connection response and the working condition in wait first connection response, to the second server for providing the Internet resources Send the second connection request.
8. device as claimed in claim 7, it is characterised in that described device also includes:
3rd sending module, for starting timing at the time point for sending second connection request;Between default second Every the second connection response that the second server return is not received in the time and in wait second connection response During working condition, the 3rd connection request is sent to the 3rd server for providing the Internet resources.
9. device as claimed in claim 8, it is characterised in that described device also includes:
Set of time module, for be directed to respectively first connection request set first connect timeout interval, for described the Two connection requests set second and connect timeout interval, wherein, the first connection timeout interval is more than first interval time, Second interval time is more than second interval time.
10. device as claimed in claim 7, it is characterised in that described device also includes:
Network selection module, first connection response of the first server transmission is received for working as and is received described During the second connection response that second server sends, the network service between the user terminal and the first server is determined Network service quality between quality and the user terminal and the second server;
The optimal corresponding first server of the network service quality of selection or the second server carry out network company Connect.
11. devices as claimed in claim 7, it is characterised in that described device also includes:
Network sets up module, responds and receives institute for that ought receive the connection time-out returned for first connection request When stating the second connection response of second server return, the network connection with the second server is set up.
12. device as described in claim 7-11 any one, it is characterised in that second sending module specifically for:
The second connection request is sent to the second server is provided by changing the network address, wherein, the network address bag Include IP address and port numbers.
13. a kind of network connection devices, it is characterised in that described device includes interface circuit, memory and processor, its In, batch processing code is stored in the memory, and the processor is used to call the program generation stored in the memory Code, for performing following operation:
The first connection request is sent to the first server for providing Internet resources, and is sending the time of first connection request Point starts timing;
When do not received within default first interval time the first connection response that the first server returns and in etc. When the working condition of first connection response, sending the second connection to the second server for providing the Internet resources please Ask.
CN201611198389.0A 2016-12-22 2016-12-22 A kind of method for connecting network and device Active CN106713454B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611198389.0A CN106713454B (en) 2016-12-22 2016-12-22 A kind of method for connecting network and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611198389.0A CN106713454B (en) 2016-12-22 2016-12-22 A kind of method for connecting network and device

Publications (2)

Publication Number Publication Date
CN106713454A true CN106713454A (en) 2017-05-24
CN106713454B CN106713454B (en) 2019-09-13

Family

ID=58939582

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611198389.0A Active CN106713454B (en) 2016-12-22 2016-12-22 A kind of method for connecting network and device

Country Status (1)

Country Link
CN (1) CN106713454B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109347933A (en) * 2018-09-29 2019-02-15 乐蜜有限公司 A kind of method and apparatus for establishing connection
CN109964493A (en) * 2017-10-23 2019-07-02 深圳市云中飞网络科技有限公司 It is connected to the network detection method, device, terminal and computer storage medium
CN110213320A (en) * 2019-01-02 2019-09-06 腾讯科技(深圳)有限公司 Method, apparatus, electronic equipment and the computer readable storage medium of communication connection
CN111106994A (en) * 2019-11-25 2020-05-05 福建天泉教育科技有限公司 Method and storage medium for improving push efficiency
CN111263470A (en) * 2020-03-04 2020-06-09 郑州智利信信息技术有限公司 Mobile terminal network connection method
CN111314465A (en) * 2020-02-17 2020-06-19 天津卓朗科技发展有限公司 Weak network environment communication method and device and electronic equipment
CN113596068A (en) * 2020-04-30 2021-11-02 北京金山云网络技术有限公司 Method, device and server for establishing TCP connection

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101222497A (en) * 2007-01-11 2008-07-16 国际商业机器公司 System and method for virtualized resource configuration
CN101932122A (en) * 2009-06-26 2010-12-29 鸿富锦精密工业(深圳)有限公司 User terminal equipment, base station and method for establishing business flow
CN102573111A (en) * 2012-01-10 2012-07-11 中兴通讯股份有限公司 Method and device for releasing transfer control protocol resources
CN103959272A (en) * 2011-09-26 2014-07-30 赛拉诺斯股份有限公司 Network connectivity methods and systems
EP2779546A1 (en) * 2012-10-08 2014-09-17 Huawei Device Co., Ltd. Port setting method, routing device, and computer program product
CN104065761A (en) * 2011-09-29 2014-09-24 北京奇虎科技有限公司 Application server selecting method and network connection method
CN105897849A (en) * 2015-12-22 2016-08-24 乐视云计算有限公司 Cross-process service method and system and proxy server
CN106254427A (en) * 2016-07-22 2016-12-21 广东美的暖通设备有限公司 The air conditioning unit means of communication and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101222497A (en) * 2007-01-11 2008-07-16 国际商业机器公司 System and method for virtualized resource configuration
CN101932122A (en) * 2009-06-26 2010-12-29 鸿富锦精密工业(深圳)有限公司 User terminal equipment, base station and method for establishing business flow
CN103959272A (en) * 2011-09-26 2014-07-30 赛拉诺斯股份有限公司 Network connectivity methods and systems
CN104065761A (en) * 2011-09-29 2014-09-24 北京奇虎科技有限公司 Application server selecting method and network connection method
CN102573111A (en) * 2012-01-10 2012-07-11 中兴通讯股份有限公司 Method and device for releasing transfer control protocol resources
EP2779546A1 (en) * 2012-10-08 2014-09-17 Huawei Device Co., Ltd. Port setting method, routing device, and computer program product
CN105897849A (en) * 2015-12-22 2016-08-24 乐视云计算有限公司 Cross-process service method and system and proxy server
CN106254427A (en) * 2016-07-22 2016-12-21 广东美的暖通设备有限公司 The air conditioning unit means of communication and device

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109964493A (en) * 2017-10-23 2019-07-02 深圳市云中飞网络科技有限公司 It is connected to the network detection method, device, terminal and computer storage medium
CN109347933A (en) * 2018-09-29 2019-02-15 乐蜜有限公司 A kind of method and apparatus for establishing connection
CN109347933B (en) * 2018-09-29 2021-07-20 卓米私人有限公司 Method and device for establishing connection
CN110213320A (en) * 2019-01-02 2019-09-06 腾讯科技(深圳)有限公司 Method, apparatus, electronic equipment and the computer readable storage medium of communication connection
CN110213320B (en) * 2019-01-02 2021-11-02 腾讯科技(深圳)有限公司 Communication connection method and device, electronic equipment and computer readable storage medium
CN111106994A (en) * 2019-11-25 2020-05-05 福建天泉教育科技有限公司 Method and storage medium for improving push efficiency
CN111314465A (en) * 2020-02-17 2020-06-19 天津卓朗科技发展有限公司 Weak network environment communication method and device and electronic equipment
CN111263470A (en) * 2020-03-04 2020-06-09 郑州智利信信息技术有限公司 Mobile terminal network connection method
CN113596068A (en) * 2020-04-30 2021-11-02 北京金山云网络技术有限公司 Method, device and server for establishing TCP connection

Also Published As

Publication number Publication date
CN106713454B (en) 2019-09-13

Similar Documents

Publication Publication Date Title
CN106713454B (en) A kind of method for connecting network and device
EP3585095B1 (en) Method and device for controlling qos, smf, upf, ue, pcf and an
CN108200165B (en) Request Transmission system, method, apparatus and storage medium
CN107770269B (en) A kind of service response method and its terminal
US11323502B2 (en) Transport method selection for delivery of server notifications
CN102771164B (en) Methods and apparatus providing intelligent radio selection for legacy and non-legacy applications
CN107360177A (en) A kind of message transmitting method and device based on UDP
CN104144185A (en) Data communication method, device and terminal
EP2445171B1 (en) File transfer protocol client and implementing method thereof
CN114500528A (en) Data transmission method and device based on cloud platform
CN107431965B (en) Method and device for realizing Transmission Control Protocol (TCP) transmission
CN107454659A (en) A kind of terminal identification method, system, terminal device and base station
CN103415086A (en) Method for achieving file transmission application based on mobile terminal private network
CN107548121A (en) It is determined that the method and device of access network
CN112291180A (en) Message load balancing method
CN109120578B (en) Method and device for realizing link connection processing
CN102045771B (en) Method for realizing data service dialing and related equipment
CN113261249A (en) Data transmission method, related equipment and computer storage medium
CN104065519A (en) Method for improving conversation interactive performance and automatic configuration server
CN113891419A (en) Policy routing establishing method and related device
JP3823055B2 (en) Effective multilink flow handling
CN104065692B (en) The method, apparatus and system that web game is mutual
CN108886705A (en) A kind of signal transmission method and equipment
CN101808080A (en) Data transmitting method and associated device
WO2021057616A1 (en) Rrc connection management method and device, storage medium, and electronic device

Legal Events

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