CN106713454B - A kind of method for connecting network and device - Google Patents
A kind of method for connecting network and device Download PDFInfo
- Publication number
- CN106713454B CN106713454B CN201611198389.0A CN201611198389A CN106713454B CN 106713454 B CN106713454 B CN 106713454B CN 201611198389 A CN201611198389 A CN 201611198389A CN 106713454 B CN106713454 B CN 106713454B
- 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.)
- Active
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/141—Setup of application sessions
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/142—Managing session states for stateless protocols; Signalling session states; State transitions; Keeping-state mechanisms
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/148—Migration 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 kind of method for connecting network, comprising: user terminal sends the first connection request to the first server for providing Internet resources, and starts timing at the time point for sending first connection request;The user terminal sends the second connection request when the first connection response for not receiving the first server return within preset first interval time and the working condition in waiting first connection response, to the second server for providing the Internet resources.The invention also discloses a kind of network connection devices.Using the embodiment of the present invention, resource consumption is not only reduced, and improves network connection rate.
Description
Technical field
The present invention relates to electronic technology field more particularly to a kind of method for connecting network and device.
Background technique
Due to the complex characteristics of mobile network, cell phone client often enters weak net in a variety of different geographical environments
Under network state, and the network communication success rate of mobile phone is very low under vulnerable network state.Mobile Internet application is assisted using TCP mostly
View, Transmission Control Protocol are the transport layer protocol for wired networks design, Transmission Control Protocol and the feature for being not suitable with mobile network, are usually moved
Dynamic application and development selects 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
It is important.During connecting foundation, due to the unreliable characteristic of network itself, retransmission mechanism is inevitably needed to protect
Hinder reliability services.In most of BSD (Berkeley Software Distribution, socket) realization, if actively connecting
The side of connecing does not receive the response of SYN (synchronous, handshake), then is retried in the 2nd SYN of transmission in the 6th second, then
Interval sends the 3rd SYN and is retried, received response not yet at the 75th second after 24 seconds, then connect, which is called, returns
ETIMEOUT, therefore in the case where that cannot confirm failure at once, need 75 seconds time that could obtain result.If not being
User network is unavailable, but the factors such as certain server breaks down, interface disabling, unstable networks, that 75 seconds time can only
1 IP&Port is attempted to being unacceptable.For example, for the connect Retransmission timeout of Android, it can be by timeout interval
It sets gradually as (1,2,4,8,16), 32 seconds return ETIMEOUT after the 5th retries need 63 seconds in total;For iOS's
Timeout interval can be set gradually as (1,1,1,1,1,2,4,8,16,32), need 67s in total by connect Retransmission timeout.
In the prior art scheme, there are two kinds of Retransmission timeout internetwork connection modes: (1) being connected in series, for each money
Source sequentially be attached trial.When there are multiple (IP, Port) resources, the efficiency of the strategy traversal of serial connection is relatively low,
Again since mobile Internet has unstable feature, time-out time setting is too short, will lead in the case where vulnerable network,
Connect always fails, cause it is unavailable, therefore be connected in series mode connection speed it is slow.(2) it concurrently connects, while initiating to N
The call connected of a (IP, Port) not only can most find available connection fastly, but also have also been found that connect is most fast
(IP, Port) configuration.But it is N times of serial connection that server, which needs concatenation ability to be offered, under the strategy concurrently connected,
It is greatly to waste to server connection resource.Meanwhile concurrently connection can cause the competition of connection resource, to influence network just
Normal user experience.
Summary of the invention
The embodiment of the present invention provides a kind of method for connecting network and device.It can solve resource consumption in prior art
Greatly, the low technical problem of network connection rate.
First aspect present invention provides a kind of method for connecting network, comprising:
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 is worked as does not receive the first server returns first within preset first interval time
Connection response and when in the working condition for waiting first connection response, to providing the second server of the Internet resources
Send the second connection request.
Wherein, after second server second connection request of transmission to the offer Internet resources, further includes:
Start timing at the time point for sending second connection request;
When the second connection response and place for not receiving the second server return within preset second interval time
When waiting the working condition of second connection response, third connection is sent to the third server for providing the Internet resources
Request.
Wherein, it before the user terminal sends the first connection request to the first server for providing Internet resources, also wraps
It includes:
It is arranged respectively for the first connection of first connection request setting timeout interval, for second connection request
Second connection timeout interval, wherein the first connection timeout interval is greater than first interval time, and second connection is super
When interval be greater than second interval time.
Wherein, after second server second connection request of transmission to the offer Internet resources, further includes:
When first connection response for receiving the first server transmission and receive the second server hair
When 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 corresponding first server of the optimal network service quality or the second server is selected to carry out net
Network connection.
Wherein, after second server second connection request of transmission to the offer Internet resources, further includes:
When receive for first connection request return connection time-out response and receive the second server
When the second connection response returned, the network connection with the second server is established.
Wherein, 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 change network address, wherein
The network address includes IP address and port numbers.
Correspondingly, second aspect of the present invention provides a kind of network connection device, comprising:
First sending module for sending the first connection request to the first server for providing Internet resources, and is being sent
The time point of first connection request starts timing;
Second sending module does not receive what the first server returned for working as within preset first interval time
First connection response and when in the working condition for waiting first connection response, to providing the second clothes of the Internet resources
Business device sends the second connection request.
Wherein, described device further include:
Third sending module, for starting timing at the time point for sending second connection request;When preset
The second connection response that the second server returns is not received in two interval times and is rung in waiting described second to connect
When the working condition answered, third connection request is sent to the third server for providing the Internet resources.
Wherein, described device further include:
Time setup module, for respectively for the first connection of first connection request setting timeout interval, for institute
State the second connection request setting the second connection timeout interval, wherein the first connection timeout interval is greater than first interval
Time, second interval time are greater than second interval time.
Wherein, described device further include:
Network selection module, for that ought receive first connection response of the first server transmission and receive
When the second connection response that the second server is sent, 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 corresponding first server of the optimal network service quality or the second server is selected to carry out net
Network connection.
Wherein, described device further include:
Network establishes module, receives the connection time-out response returned for first connection request and reception for working as
When the second connection response returned to the second server, establish and the network connection of the second server.
Wherein, second sending module is specifically used for:
The second connection request is sent to the second server is provided by change network address, wherein the network
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
Manage device, wherein batch processing code is stored in the memory, and the processor is used to call to store in the memory
Program code, for performing the following operations:
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 for not receiving the first server return within preset first interval time
When waiting the working condition of first connection response, the second connection is sent to the second server for providing the Internet resources
Request.
Implement the embodiment of the present invention, first to first server the first connection request of transmission of offer Internet resources, and
The time point for sending first connection request starts timing, then described when not receiving within preset first interval time
The first connection response that first server returns and when in the working condition for waiting first connection response, to described in offer
The second server of Internet resources sends the second connection request, to not only reduce resource consumption, and improves network company
Connect rate.
Detailed description of the invention
In order to illustrate the technical solution of the embodiments of the present invention more clearly, required use in being described below to embodiment
Attached drawing be briefly described, it should be apparent that, drawings in the following description are some embodiments of the invention, for this field
For those of ordinary skill, without creative efforts, it is also possible to obtain other drawings based on these drawings.
Fig. 1 is a kind of flow diagram 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 flow diagram of the second embodiment of method for connecting network proposed by the present invention;
Fig. 4 is a kind of structural schematic diagram of network connection device provided in an embodiment of the present invention;
Fig. 5 is the structural schematic diagram of another network connection device provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are some of the embodiments of the present invention, instead of all the embodiments.Based on this hair
Embodiment in bright, every other implementation obtained by those of ordinary skill in the art without making creative efforts
Example, shall fall within the protection scope of the present invention.
Referring to FIG. 1, Fig. 1 is a kind of flow diagram of the first embodiment of method for connecting network proposed by the present invention.
As shown, the method in the embodiment of the present invention includes:
S101, user terminal send the first connection request to the first server for providing Internet resources, and described in the transmission
The time point of first connection request starts timing.
Optionally, before user terminal sends the first connection request to the first server for providing Internet resources, respectively
For the first connection of first connection request setting timeout interval, for second connection request setting the second connection time-out
Interval, wherein the first connection timeout interval is greater than first interval time, and the second connection timeout interval is greater than institute
Stated for the second interval time.
In the specific implementation, can be received according to different system features, connected applications in actual connection time-out setting
User experience range, different values can be set by the calling of connect time-out, may be set to be identical value.Example
Such as, in IOS system, 10s can be set by the connect connection timeout interval called, IOS can carry out 6 automatically in 10s
Secondary repeating transmission.And in android system, system initiated the 2nd repeating transmission at the 9th second, retransmitted using 12 seconds the 3rd time.
S102, the user terminal is worked as does not receive what the first server returned within preset first interval time
First connection response and when in the working condition for waiting first connection response, to providing the second clothes of the Internet resources
Business device sends the second connection request.
In the specific implementation, second can be sent to the second server for providing the Internet resources by change network address
Connection request, wherein the network address includes IP address and port numbers.
Optionally, start timing at the time point for sending second connection request;When in preset second interval time
The second connection response that the second server returns is not received inside and in the work shape for waiting second connection response
When state, third connection request is sent to the third server for providing the Internet resources.
For example, as shown in Fig. 2, user terminal sends connection to the server 1 for providing Internet resources by (ip1, port1)
Request, and the connection timeout interval being arranged is 12 seconds, after connection request sends out 4 seconds, user terminal is still in the company of waiting
The working condition for connecing 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, and so on, until having initiated the call connected of 5 groups of IP&Port.This
When be equivalent to the pseudo- concurrent fashion for having used composite joint, successively to server 1, server 2, server 3,4 kimonos of server
Business device 5 is requested to establish and is connected to the network.
In inventive embodiments, the first connection request is sent to the first server for providing Internet resources first, and sending out
The time point of first connection request is sent to start timing, then when not receiving described within preset first interval time
The first connection response that one server returns and when in the working condition for waiting first connection response, to providing the net
The second server of network resource sends the second connection request, to not only reduce resource consumption, and improves network connection
Rate.
Referring to FIG. 3, Fig. 3 is a kind of flow diagram of the second embodiment of method for connecting network proposed by the present invention.
As shown, the method in the embodiment of the present invention includes:
S301, user terminal send the first connection request to the first server for providing Internet resources, and described in the transmission
The time point of first connection request starts timing.
Optionally, before user terminal sends the first connection request to the first server for providing Internet resources, respectively
For the first connection of first connection request setting timeout interval, for second connection request setting the second connection time-out
Interval, wherein the first connection timeout interval is greater than first interval time, and the second connection timeout interval is greater than institute
Stated for the second interval time.
In the specific implementation, can be received according to different system features, connected applications in actual connection time-out setting
User experience range, different values can be set by the calling of connect time-out, may be set to be identical value.Example
Such as, in IOS system, 10s can be set by the connect connection timeout interval called, IOS can carry out 6 automatically in 10s
Secondary repeating transmission.And in android system, system initiated the 2nd repeating transmission at the 9th second, retransmitted using 12 seconds the 3rd time.
S302, the user terminal is worked as does not receive what the first server returned within preset first interval time
First connection response and when in the working condition for waiting first connection response, to providing the second clothes of the Internet resources
Business device sends the second connection request.
In the specific implementation, second can be sent to the second server for providing the Internet resources by change network address
Connection request, wherein the network address includes IP address and port numbers.
Optionally, start timing at the time point for sending second connection request;When in preset second interval time
The second connection response that the second server returns is not received inside and in the work shape for waiting second connection response
When state, third connection request is sent to the third server for providing the Internet resources.
For example, as shown in Fig. 2, user terminal sends connection to the server 1 for providing Internet resources by (ip1, port1)
Request, and the connection timeout interval being arranged is 12 seconds, after connection request sends out 4 seconds, user terminal is still in the company of waiting
The working condition for connecing 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, and so on, until having initiated the call connected of 5 groups of IP&Port.This
When be equivalent to the pseudo- concurrent fashion for having used composite joint, successively to server 1, server 2, server 3,4 kimonos of server
Business device 5 is requested to establish and is connected to the network.
S303 when first connection response for receiving the first server transmission and receives the second service
When the second connection response that device is sent, 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, select the corresponding first server of the optimal network service quality or the second server into
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 establish network connection, the net of user terminal Yu server 1 can be determined respectively
Network service quality, the network service quality of user terminal and server 2, user terminal and server 3 network service quality, choosing
It selects the corresponding server 3 of optimal network service quality and establishes network connection.
Optionally, when receive for first connection request return connection time-out response and receive described second
When the second connection response that server returns, the network connection with the second server is established.
For example, as shown in Fig. 2, being connected after user terminal sends connection request to server 4 and server 5 respectively
The connection response that server 4 and server 5 return is not received in timeout interval 12 seconds, but receives server 1, server before
2 or server 3 return connection response, then only need from server 1, server 2 or server 3 choose server establish network
Connection.
In inventive embodiments, the first connection request is sent to the first server for providing Internet resources first, and sending out
The time point of first connection request is sent to start timing, then when not receiving described within preset first interval time
The first connection response that one server returns and when in the working condition for waiting first connection response, to providing the net
The second server of network resource sends the second connection request, to not only reduce resource consumption, and improves network connection
Rate.
Referring to FIG. 4, Fig. 4 is a kind of structural schematic diagram of network connection device proposed by the present invention.As shown, 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 is being sent out
The time point of first connection request is sent to start timing.
Second sending module 402 is returned for ought not receive the first server within preset first interval time
The first connection response for returning and when in the working condition for waiting first connection response, to providing the of the Internet resources
Two servers send the second connection request.
In the specific implementation, second can be sent to the second server for providing the Internet resources by change network address
Connection request, wherein the network address includes IP address and port numbers.
Optionally, as shown in figure 4, device in the embodiment of the present invention further include:
Third sending module 403, for starting timing at the time point for sending second connection request;When preset
The second connection response that the second server returns is not received in second interval time and in waiting second connection
When the working condition of response, third connection request is sent to the third server for providing the Internet resources.
For example, as shown in Fig. 2, user terminal sends connection to the server 1 for providing Internet resources by (ip1, port1)
Request, and the connection timeout interval being arranged is 12 seconds, after connection request sends out 4 seconds, user terminal is still in the company of waiting
The working condition for connecing 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, and so on, until having initiated the call connected of 5 groups of IP&Port.This
When be equivalent to the pseudo- concurrent fashion for having used composite joint, successively to server 1, server 2, server 3,4 kimonos of server
Business device 5 is requested to establish and is connected to the network.
Optionally, as shown in figure 4, device in the embodiment of the present invention further include:
Time setup module 404, for being directed to the first connection of first connection request setting timeout interval respectively, being directed to
The second connection of second connection request setting timeout interval, wherein the first connection timeout interval is greater than between described first
Every the time, second interval time is greater than second interval time.
In the specific implementation, can be received according to different system features, connected applications in actual connection time-out setting
User experience range, different values can be set by the calling of connect time-out, may be set to be identical value.Example
Such as, in IOS system, 10s can be set by the connect connection timeout interval called, IOS can carry out 6 automatically in 10s
Secondary repeating transmission.And in android system, system initiated the 2nd repeating transmission at the 9th second, retransmitted using 12 seconds the 3rd time.
Optionally, as shown in figure 4, device in the embodiment of the present invention further include:
Network selection module 405, for that ought receive first connection response of the first server transmission and connect
When receiving the second connection response that the second server is sent, determine between the user terminal and the first server
Network service quality between network service quality and the user terminal and the second server;Select optimal institute
It states the corresponding first server of network service quality or the second server is connected to the network.
For example, as shown in Fig. 2, user terminal sends connection to the server 1 for providing Internet resources by (ip1, port1)
Request, and the connection timeout interval being arranged is 12 seconds, after connection request sends out 4 seconds, user terminal is still in the company of waiting
The working condition for connecing 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, and so on, until having initiated the call connected of 5 groups of IP&Port.This
When be equivalent to the pseudo- concurrent fashion for having used composite joint, successively to server 1, server 2, server 3,4 kimonos of server
Business device 5 is requested to establish and is connected to the network.
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 establish network connection, the net of user terminal Yu server 1 can be determined respectively
Network service quality, the network service quality of user terminal and server 2, user terminal and server 3 network service quality, choosing
It selects the corresponding server 3 of optimal network service quality and establishes network connection.
Optionally, as shown in figure 4, device in the embodiment of the present invention further include:
Network establishes 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 returns, the network connection with the second server is established.
For example, as shown in Fig. 2, being connected after user terminal sends connection request to server 4 and server 5 respectively
The connection response that server 4 and server 5 return is not received in timeout interval 12 seconds, but receives server 1, server before
2 or server 3 return connection response, then only need from server 1, server 2 or server 3 choose server establish network
Connection.
In inventive embodiments, the first connection request is sent to the first server for providing Internet resources first, and sending out
The time point of first connection request is sent to start timing, then when not receiving described within preset first interval time
The first connection response that one server returns and when in the working condition for waiting first connection response, to providing the net
The second server of network resource sends the second connection request, to not only reduce resource consumption, and improves network connection
Rate.
Referring to FIG. 5, Fig. 5 is the structural schematic diagram for another network connection device that the embodiment of the present invention proposes.Such as figure
It is shown, the apparatus may include: at least one processor 501, such as CPU, at least one communication interface 502, at least one is deposited
Reservoir 503, at least one bus 505.Wherein, bus 505 is for realizing 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, for example including antenna assembly,
For carrying out the communication of signaling or data with other node devices.Memory 503 can be high speed RAM memory, be also possible to
Non-labile memory (non-volatile memory), for example, at least a magnetic disk storage.Memory 503 is optional
It can also be that at least one is located remotely from the storage device of 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 the following operations:
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 for not receiving the first server return within preset first interval time
When waiting the working condition of first connection response, the second connection is sent to the second server for providing the Internet resources
Request.
Wherein, processor 501 is also used to perform the following operations step:
Start timing at the time point for sending second connection request;
When the second connection response and place for not receiving the second server return within preset second interval time
When waiting the working condition of second connection response, third connection is sent to the third server for providing the Internet resources
Request.
Wherein, processor 501 is also used to perform the following operations step:
It is arranged respectively for the first connection of first connection request setting timeout interval, for second connection request
Second connection timeout interval, wherein the first connection timeout interval is greater than first interval time, and second connection is super
When interval be greater than second interval time.
Wherein, processor 501 is also used to perform the following operations step:
When first connection response for receiving the first server transmission and receive the second server hair
When 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 corresponding first server of the optimal network service quality or the second server is selected to carry out net
Network connection.
Wherein, processor 501 is also used to perform the following operations step:
When receive for first connection request return connection time-out response and receive the second server
When the second connection response returned, the network connection with the second server is established.
Wherein, processor 501 is also used to perform the following operations step:
The second connection request is sent to the second server for providing the Internet resources by change network address, wherein
The network address includes IP address and port numbers.
It should be noted that for simple description, therefore, it is stated as a systems for each embodiment of the method above-mentioned
The combination of actions of column, but those skilled in the art should understand that, the present invention is not limited by the sequence of acts described, because
For according to the present invention, certain some step can be performed in other orders or simultaneously.Secondly, those skilled in the art also should
Know, the embodiments described in the specification are all preferred embodiments, related actions and modules not necessarily this hair
Necessary to bright.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, is not described in some embodiment
Part, reference can be made to the related descriptions of other embodiments.
Those of ordinary skill in the art will appreciate that all or part of the steps in the various methods of above-described embodiment is can
It is completed with instructing relevant hardware by program, which can be stored in a computer readable storage medium, storage
Medium may include: flash disk, read-only memory (English: Read-Only Memory, abbreviation: ROM), random access device (English
Text: Random Access Memory, referred to as: RAM), disk or CD etc..
It is provided for the embodiments of the invention content download method above and relevant device, system are described in detail,
Used herein a specific example illustrates the principle and implementation of the invention, and the explanation of above embodiments is only used
In facilitating the understanding of the method and its core concept of the invention;At the same time, for those skilled in the art, according to the present invention
Thought, there will be changes in the specific implementation manner and application range, in conclusion the content of the present specification should not be construed as
Limitation of the present invention.
Claims (13)
1. a kind of method for connecting network, which is characterized in that the described method includes:
User terminal sends the first connection request to the first server for providing Internet resources, and asks sending first connection
The time point asked starts timing;
The user terminal is when the first connection for not receiving the first server return within preset first interval time
When responding and being in the working condition for waiting first connection response, sent to the second server for providing the Internet resources
Second connection request.
2. the method as described in claim 1, which is characterized in that described to be sent to the second server for providing the Internet resources
After second connection request, further includes:
Start timing at the time point for sending second connection request;
When do not received within preset second interval time the second connection response that the second server returns and in etc.
When the working condition of second connection response, third connection is sent to the third server for providing the Internet resources and is asked
It asks.
3. method according to claim 2, which is characterized in that first server of the user terminal to offer Internet resources
Before sending the first connection request, further includes:
Respectively for the first connection of first connection request setting timeout interval, for second connection request setting second
Connect timeout interval, wherein the first connection timeout interval is greater than first interval time, between second connection is overtime
Every greater than second interval time.
4. the method as described in claim 1, which is characterized in that described to be sent to the second server for providing the Internet resources
After second connection request, further includes:
When first connection response for receiving the first server transmission and receive what the second server was sent
When the second connection response, the network service quality between the user terminal and the first server and the use are determined
Network service quality between family terminal and the second server;
The corresponding first server of the optimal network service quality or the second server is selected to carry out network company
It connects.
5. the method as described in claim 1, which is characterized in that described to be sent to the second server for providing the Internet resources
After second connection request, further includes:
It is returned when receiving the connection time-out response for first connection request return and receiving the second server
The second connection response when, establish and the network connection of the second server.
6. the method as described in claim 1-5 any one, which is characterized in that described to the second of the offer Internet resources
Server sends the second connection request
The second connection request is sent to the second server for providing the Internet resources by change network address, wherein described
Network address includes IP address and port numbers.
7. a kind of network connection device, which is characterized in that described device includes:
First sending module, for sending the first connection request to the first server for providing Internet resources, and described in the transmission
The time point of first connection request starts timing;
Second sending module does not receive the first of the first server return for working as within preset first interval time
Connection response and when in the working condition for waiting first connection response, to providing the second server of the Internet resources
Send the second connection request.
8. device as claimed in claim 7, which is characterized in that described device further include:
Third sending module, for starting timing at the time point for sending second connection request;When between preset second
Every the second connection response for not receiving the second server return in the time and in waiting second connection response
When working condition, third connection request is sent to the third server for providing the Internet resources.
9. device as claimed in claim 8, which is characterized in that described device further include:
Time setup module, for respectively for the first connection of first connection request setting timeout interval, for described the
Two connection requests setting the second connection timeout interval, wherein the first connection timeout interval is greater than first interval time,
Second interval time is greater than second interval time.
10. device as claimed in claim 7, which is characterized in that described device further include:
Network selection module, for that ought receive first connection response of the first server transmission and receive described
When the second connection response that second server is sent, the network Service Quality between user terminal and the first server is determined
Amount and the network service quality between the user terminal and the second server;
The corresponding first server of the optimal network service quality or the second server is selected to carry out network company
It connects.
11. device as claimed in claim 7, which is characterized in that described device further include:
Network establishes module, for that ought receive the connection time-out response for first connection request return and receive institute
When stating the second connection response of second server return, the network connection with the second server is established.
12. the device as described in claim 7-11 any one, which is characterized in that second sending module is specifically used for:
The second connection request is sent to the second server is provided by change network address, wherein the network address packet
Include IP address and port numbers.
13. a kind of network connection device, which is characterized in that described device includes interface circuit, memory and processor,
In, batch processing code is stored in the memory, and the processor is for calling the program generation stored in the memory
Code, for performing the following operations:
The first connection request is sent to the first server for providing Internet resources, and in the time for sending first connection request
Point starts timing;
When do not received within preset first interval time the first connection response that the first server returns and in etc.
When the working condition of first connection response, the second connection is sent to the second server for providing the Internet resources and is asked
It asks.
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 CN106713454A (en) | 2017-05-24 |
CN106713454B true 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) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2019079950A1 (en) * | 2017-10-23 | 2019-05-02 | 深圳市云中飞网络科技有限公司 | Network connection detection method, device, terminal, and computer storage medium |
CN109347933B (en) * | 2018-09-29 | 2021-07-20 | 卓米私人有限公司 | Method and device for establishing 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 |
CN111314465B (en) * | 2020-02-17 | 2023-04-07 | 天津卓朗科技发展有限公司 | Weak network environment communication method and device and electronic equipment |
CN111263470A (en) * | 2020-03-04 | 2020-06-09 | 郑州智利信信息技术有限公司 | Mobile terminal network connection method |
CN113596068B (en) * | 2020-04-30 | 2022-06-14 | 北京金山云网络技术有限公司 | Method, device and server for establishing TCP connection |
Family Cites Families (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8973098B2 (en) * | 2007-01-11 | 2015-03-03 | International Business Machines Corporation | System and method for virtualized resource configuration |
CN101932122B (en) * | 2009-06-26 | 2013-05-08 | 鸿富锦精密工业(深圳)有限公司 | User terminal equipment, base station and method for establishing business flow |
US8392585B1 (en) * | 2011-09-26 | 2013-03-05 | Theranos, Inc. | Methods and systems for facilitating network connectivity |
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 |
JP2014535228A (en) * | 2012-10-08 | 2014-12-25 | ▲華▼▲為▼▲終▼端有限公司 | 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 |
-
2016
- 2016-12-22 CN CN201611198389.0A patent/CN106713454B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN106713454A (en) | 2017-05-24 |
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 | |
CN107770269B (en) | A kind of service response method and its terminal | |
CN108200165B (en) | Request Transmission system, method, apparatus and storage medium | |
CN107360177B (en) | A kind of message transmitting method and device based on UDP | |
CN104038845A (en) | Method and device for transmitting message | |
JP2005322107A (en) | Load distribution device and program | |
CN115118524B (en) | Interface equipment and free intercommunication data transparent transmission method, system and device of Internet of things | |
CN108200218A (en) | A kind of method, apparatus and electronic equipment for realizing load balancing | |
TWI581588B (en) | Controlling method, network system and service platform for mobile-edge computing | |
CN109194716A (en) | A kind of method, system, server and the storage device of processing request | |
CN110312140B (en) | Live broadcast data processing method, device and system and computer readable storage medium | |
EP2445171B1 (en) | File transfer protocol client and implementing method thereof | |
CN103595702A (en) | Selection method and apparatus for content providing device | |
CN112291180A (en) | Message load balancing method | |
CN107770847A (en) | Method for network access, access device and terminal device | |
CN109120578B (en) | Method and device for realizing link connection processing | |
CN104065519A (en) | Method for improving conversation interactive performance and automatic configuration server | |
CN114710496A (en) | Multi-node load balancing method and device | |
CN107113311B (en) | Method and apparatus for communication in a unified machine-to-machine system | |
CN113891419A (en) | Policy routing establishing method and related device | |
CN104065692B (en) | The method, apparatus and system that web game is mutual | |
US20050088989A1 (en) | Methods of transmitting data in mobile communication system | |
CN110098981A (en) | TCP connection method, network delay determine method, apparatus and server | |
CN110166506A (en) | The connection method of hypertext transfer protocol Http and node 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 |