CN105871977A - Long connection establishment method and system, and devices - Google Patents
Long connection establishment method and system, and devices Download PDFInfo
- Publication number
- CN105871977A CN105871977A CN201510849496.4A CN201510849496A CN105871977A CN 105871977 A CN105871977 A CN 105871977A CN 201510849496 A CN201510849496 A CN 201510849496A CN 105871977 A CN105871977 A CN 105871977A
- Authority
- CN
- China
- Prior art keywords
- server
- client
- acquisition
- list
- conditioned
- 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.)
- Pending
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/50—Network services
- H04L67/60—Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Transfer Between Computers (AREA)
- Computer And Data Communications (AREA)
Abstract
The embodiment of the invention provides a long connection establishment method and system, and devices, relates to the technical field of communication, and mainly aims at ensuring connection quality of a client and a server when long connection is carried out on the client and the server, and moreover improving the connection efficiency of the long connection. The technical scheme used by the embodiment of the invention comprise that the client sends an obtaining request for obtaining client accessible servers to a server side, wherein parameter information of the client is carried in the obtaining request; the server side receives the obtaining request for obtaining the client accessible servers sent by the client, obtains the client accessible servers of which access states satisfy a preset condition according to the parameter information, generates a server list according to the servers of which access states satisfy the preset condition and sends the server list to the client; and the client receives the server list sent by the server side and is connected with the server in the server list, so that the long connection between the client and the server is established. The method, the devices and the system are applied to establishment of the long connection.
Description
Technical field
The present embodiments relate to communication technical field, particularly relate to a kind of long connection establishment method, device
And system.
Background technology
In server push technology, client needs to set up long connection with server, and then can accept
The message sent by server variable interval, wherein, long connection is able to ensure that task is passed by server timely
Transport to client, carry out data-pushing the most again.
Prior art is before setting up long connection, and client grows connection firstly the need of obtaining all carrying out
The ip address of server, is prefabricated into this all of ip address a ip address set and is positioned over client
In, the server that then client is corresponding with this ip address set carries out growing connection one by one, until success
Till foundation is connected with the length of server.
Above-mentioned client is set up with server in the long mode being connected, and finally sets up long connection due to client
Server, be that client can carry out growing the server being connected one by one and carries out attempting connecting pilot scale out with this
, before carrying out growing with server and being connected, server communication quality of connection is not carried out any sieve
Choosing.Therefore when the communication connection quality of server most of in this ip address set is poor, it is impossible to ensure and visitor
During the long connection establishment success of family end, client attempt the most one by one with it cannot be guaranteed that be successfully established long connection
Server carry out growing connection, this is by low for the efficiency causing long successful connection.
Summary of the invention
The embodiment of the present invention provides a kind of long connection establishment method, Apparatus and system, in client and service
When device carries out growing connection, it is possible to ensure the quality of connection of client and server, improve long connection simultaneously
Joint efficiency.
According to one aspect of the present invention, it is provided that a kind of long connection establishment method, including:
Sending acquisition client to service end and can be accessed by the acquisition request of server, described acquisition in request is taken
Parameter information with client, in order to described service end obtains described client according to described parameter information
Accessible and access state meets pre-conditioned server;
Receiving the acquisition request response that described service end sends, described acquisition in request response comprises described visitor
Family end is accessible and access state meets pre-conditioned server list;
And the length that the server in server list is attached setting up between client and server connects
Connect.
According to another aspect of the present invention, it is provided that a kind of long connection establishment method, including:
The acquisition client receiving client transmission can be accessed by the acquisition request of server, and described acquisition is asked
In carry the parameter information of client;
According to the described parameter information described client of acquisition is accessible and access state meets pre-conditioned
Server;
Access state is met pre-conditioned server and generates server list;
Described server list is sent to client, in order to described client and the clothes in server list
Business device is attached being connected with the length between server to set up.
According to another aspect of the invention, it is provided that a kind of client, including:
Transmitting element, can be accessed by the acquisition request of server, institute for sending acquisition client to service end
State the parameter information carrying client in the request of acquisition, in order to described service end is according to described parameter information
Obtain that described client is accessible and access state meets pre-conditioned server;
Receiving unit, be used for receiving the acquisition request response that described service end sends, described acquisition asks to ring
Comprise in Ying that described client is accessible and access state meets pre-conditioned server list;
Set up unit, for being attached setting up client and service with the server in server list
Long connection between device.
According to further aspect of the present invention, it is provided that a kind of service end, including:
Receiving unit, the acquisition client sent for receiving client can be accessed by the acquisition request of server,
Described acquisition request carries the parameter information of client;
Acquiring unit, can be accessed by and access state for obtaining described client according to described parameter information
Meet pre-conditioned server;
Signal generating unit, generates server list for access state meets pre-conditioned server;
Transmitting element, for sending described server list to client, in order to described client and clothes
Server in business device list is attached being connected with the length between server to set up.
According to present invention also offers a kind of long connection establishment system, including: client and service end;
Described client, can be accessed by the acquisition request of server for sending acquisition client to service end,
Described acquisition request carries the parameter information of client;
Described service end, the acquisition client sent for receiving client can be accessed by the acquisition of server
Request, carries the parameter information of client in described acquisition request;
Described service end, is additionally operable to obtain described client according to described parameter information and can be accessed by and connect
Enter state and meet pre-conditioned server, and access state is met pre-conditioned server generation
Server list sends to described client;
Described client, is additionally operable to receive the server list that described service end sends, by with service
The length that server in device list is attached setting up between client with server is connected.
The embodiment of the present invention provide one long connection establishment method, Apparatus and system, first client to
Service end sends acquisition client and can be accessed by the acquisition request of server, and described acquisition in request carries visitor
The parameter information of family end;The acquisition client that server reception client sends can be accessed by the acquisition of server
Request, then accessible according to the described parameter information described client of acquisition and access state meets to be preset
The server of condition, and access state is met pre-conditioned server generation server list transmission extremely
Described client;Further client receives the server list that described service end sends, by with service
The length that server in device list is attached setting up between client with server is connected.The method exists
Client carries out growing when being connected with server, by generating server list in service end, for client
Good server is attached can to select access state easily, it is to avoid randomly chooses to choose and connects
Enter the situation of state inferior service device, thus ensure that the quality of connection of client and server, improve long
The joint efficiency connected.
Accompanying drawing explanation
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below will be to reality
Execute the required accompanying drawing used in example or description of the prior art to make to introduce simply, it should be apparent that under,
Accompanying drawing during face describes is some embodiments of the present invention, for those of ordinary skill in the art,
On the premise of not paying creative work, it is also possible to obtain other accompanying drawing according to these accompanying drawings.
The one long connection establishment method flow diagram that Fig. 1 provides for the embodiment of the present invention;
The another kind long connection establishment method flow diagram that Fig. 2 provides for the embodiment of the present invention;
A kind of client that Fig. 3 provides for the embodiment of the present invention;
The another kind of client that Fig. 4 provides for the embodiment of the present invention;
A kind of service end that Fig. 5 provides for the embodiment of the present invention;
The another kind of service end that Fig. 6 provides for the embodiment of the present invention;
The one long connection establishment system construction drawing that Fig. 7 provides for the embodiment of the present invention;
The apparatus structure schematic diagram of a kind of service end that Fig. 8 provides for the embodiment of the present invention.
Detailed description of the invention
For making the purpose of the embodiment of the present invention, technical scheme and advantage clearer, below in conjunction with this
Accompanying drawing in bright embodiment, is clearly and completely described the technical scheme in the embodiment of the present invention,
Obviously, described embodiment is a part of embodiment of the present invention rather than whole embodiments.Based on
Embodiment in the present invention, those of ordinary skill in the art are obtained under not making creative work premise
The every other embodiment obtained, broadly falls into the scope of protection of the invention.
In service end carries out the scene pushed, client needs first to set up long connection with server, this
Invent carry out client and server long be connected before, can dynamic programming and client by increase by
The service end that end connects, filters out that client is accessible and access state meets pre-conditioned server,
Generating server list and send to client, client is by carrying out even with the server of server list
Connect to set up client to be connected with the long of server, thus ensure the quality of connection of client and server.
Specifically, embodiments provide a kind of long connection establishment method, can apply to client
End, as it is shown in figure 1, described method includes:
101, sending acquisition client to service end and can be accessed by the acquisition request of server, described acquisition is asked
In carry the parameter information of client.
Wherein, service end is the node increased between clients and servers, and it obtains with it even
The attribute information of the server connect, this attribute information include the load information of server, regional information and
Supplier information etc.;And provide the inquiry that can set up long Connection Service device to operate for client.When it provides
During inquiry operation, being specially the parameter information according to client and the attribute information of server, screening is gone to a party
Family end is accessible and access state meets pre-conditioned multiple servers, and the plurality of server is raw
A server list is become to send to client, in order to client is set up and service according to this server list
The long connection of device.
This access state is to examine in terms of the stability and connection speed being connected with this server from client
Consider, can determine according to the loading condition of server, connection client terminal quantity, regional information etc..Here
Access state meet pre-conditioned server refer to client and this server connective stability and
Connection speed meets pre-conditioned, described pre-conditioned can be set according to client practical situation, example
Server as selected connection speed to meet predetermined threshold value in service end generates server list, thus ensures
Client connects into power and connection speed with this server.Such as, access state meets pre-conditioned
Multiple servers can be server load less than multiple servers of predetermined threshold value;Or access state
Meeting pre-conditioned multiple servers can be to belong to the server of same supplier, example with client
If client belongs to UNICOM's client, then access state meets pre-conditioned multiple servers for belonging to
Multiple servers of UNICOM.Concrete, formulate different pre-conditioned according to user's request, the present invention is real
Here is omitted to execute example.
In this step, carrying the parameter information of client in described acquisition request, this parameter information is concrete
Can be but be not limited to: the ip address of client and network parameter.
102, receiving the acquisition request response that described service end sends, described acquisition in request response comprises institute
State that client is accessible and access state meets pre-conditioned server list.
Specifically, after service end receives the acquisition request that client sends, request is obtained according to described
In the loading condition of server cluster of the parameter information that carries and acquisition, generate server list, should
List includes and can be connected with client and access state meets pre-conditioned multiple servers,
Facilitate client to set up according to server list to be connected with the long of server.
103 and server list in server be attached the length of setting up between client and server
Connect.
Specifically, after client receives the server list that service end sends, due in this list
The access state of each server meets pre-conditioned, when client is connected, under certain condition
All may successful connection, therefore set up with server grow be connected time, client can be at random or according to one
Definite sequence is attached one by one with the server in described server list respectively, until building after successful connection
Vertical client is connected with the long of this server;The long success rate connected is set up of course for being further ensured that,
Server in this server list can be ranked up according to access state order from high to low, and
And start to carry out one by one growing connection, until client is set up in successful connection from the server that access state is the highest
Long with server is connected.This is not limited by the concrete embodiment of the present invention, but the present invention implements
Preferably it is ranked up, is attached the most again.
If being connected all it should be noted that client is set up with the Servers-all in described server list
Unsuccessful, then the acquisition that client needs can be accessed by server to service end transmission acquisition client again is asked
Ask.
The one long connection establishment method that the embodiment of the present invention provides, first client send to service end and obtain
Take client and can be accessed by the acquisition request of server, then according to the described client obtaining and carrying in request
The parameter information described client of acquisition is accessible and access state meets pre-conditioned server, and will
Access state meets pre-conditioned server and generates server list transmission to described client;Further
Client is attached setting up between client and server by the server in server list
Long connection.Compared with the long connection establishment method of prior art, the method is carried out with server in client
During long connection, by generating server list in service end, can select easily to access for client
The server that state is good is attached, it is to avoid randomly chooses and can choose access state inferior service device
Situation, thus ensure that the quality of connection of client and server, improve the long joint efficiency connected.
Embodiments provide another kind of long connection establishment method, may be used for service end, such as figure
Shown in 2, described method includes:
201, the acquisition client receiving client transmission can be accessed by the acquisition request of server.
Wherein, described acquisition request carries the parameter information of client, including: the ip ground of client
Location and network parameter.
Such as: client can be the mobile phone of user, the network of mobile phone is China's 4G network, works as client
When initiating server acquisition request, this acquisition request carries the parameter information of mobile phone, specifically includes
The ip address of mobile phone and the network parameter of mobile phone, owing to network now is China Mobile's 4G network, then
The network parameter of active client is CMNET, can access China's shifting by CMNET access point
Dynamic network.
202, obtain described client according to described parameter information to can be accessed by and the satisfied default bar of access state
The server of part.
The concrete operations of this step have: first service end obtains described visitor according to the parameter information receiving client
The multiple servers that family end is accessible, according further to described client ip address and network parameter, knot
The loading condition of hop server, obtains the access state of the accessible server of described client, then root
Choose connection status according to the connection status of server and meet the server of pre-conditioned predetermined quantity as institute
State that client is accessible and access state meets pre-conditioned server.
Wherein, described access state is the stability and connection speed side being connected with this server from client
Face accounts for, can according to the loading condition of server, connection client terminal quantity, regional information etc. really
Fixed.Above-mentioned access state meets pre-conditioned server for by meeting existing customer after screening
End requirement, and the server mated can be comparatively fast attached with it.Described pre-conditioned can be according to visitor
Family end practical situation is set.Concrete, formulate different pre-conditioned according to user's request, this
Here is omitted for bright embodiment.
It should be noted that above-mentioned predetermined quantity user can according to client demand sets itself, if
Having only to select the server that a connection status is optimum, then this quantity can be set to 1, the present invention is real
Execute example this predetermined quantity is not limited, specifically can choose according to practical situation, preferably 3-4,
Generally choose 3 preferable servers of connection status and be sent to client to be attached.
203, access state is met pre-conditioned server and generate server list.
Specifically, the preferable server of several connection status chosen in step 202 is generated server
List, such as, active client ip address is: client_ip=220.181.155.192, can be somebody's turn to do
Ip operator is Beijing Telecom, selects three services in the present embodiment from Beijing Telecom's service list
Device meets pre-conditioned server as access state, and their ip address is respectively as follows:
220.181.155.193,220.181.155.194,220.181.155.195, and then generate server list,
I.e. [220.181.155.193,220.181.155.194,220.181.155.195], the order of this list is permissible
Being ranked up from high to low order according to the access state of server, it is also possible to randomly ordered, this law is real
Execute example clooating sequence is not limited.
204, described server list is sent to client, in order in described client and server list
Server be attached being connected with long between server to set up.
Server list that further, above-mentioned steps 203 is generated by service end [220.181.155.193,
220.181.155.194,220.181.155.195] send to after client, client is according to the clothes received
After business device list, client can be set up long connection, directly with the server in described server list at random
To setting up long successful connection, it addition, set up the long success rate connected, client to be further ensured that
End can also carry out growing connection according to server access state in this list from high to low order one by one, first
First attempt the server that ip address is 220.181.155.193 setting up long connection, if setting up long successful connection,
The most do not resettle the connection with other servers, if long connection establishment is unsuccessful, with to ip address be then
220.181.155.194 server attempt setting up long connection, by that analogy, until setting up long successful connection
Till.If client is all connected with unsuccessful with the server in server list, client is again to service
End sends and obtains server request, and described server regenerates server list, retransmits to client
Attachable server is selected to set up long connection for client.
The another kind long connection establishment method that the present embodiment provides, by long with server in client
Arranging a service end node between connection, carry out the screening operation of a server in advance, generation can
With the list of client access state preferably multiple servers, then client by with the clothes in list
Business device is attached, it is to avoid randomly choose the situation that can choose access state inferior service device, greatly
Improve the joint efficiency of client and server..
Further, as implementing of method described in Fig. 1, the embodiment of the present invention provides a kind of visitor
Family end, as it is shown on figure 3, described client includes: transmitting element 31, reception unit 32, foundation
Unit 33.
Described transmitting element 31, please for can be accessed by the acquisition of server to service end transmission acquisition client
Ask, described acquisition request carries the parameter information of client, in order to described service end is according to described ginseng
Client described in number acquisition of information is accessible and access state meets pre-conditioned server, described visitor
The parameter information of family end includes: the ip address of client and network parameter.
Described reception unit 32, for receiving the acquisition request response that described service end sends, described acquisition
Request response comprises described client is accessible and access state meets pre-conditioned server row
Table, wherein, described access state meets pre-conditioned server and refers to client and this server
Connective stability and connection speed meet pre-conditioned, described pre-conditioned can be according to client practical situation
It is set.
Described set up unit 33, for being attached setting up client with the server in server list
Be connected with long between server, described client can at random or according to a definite sequence respectively with described clothes
Server in business device list is attached one by one, until setting up client and this server after successful connection
Long connection.
Further, as shown in Figure 4, described unit 33 is set up, including:
Link block, for being attached with the server in described server list successively, described service
Device list generates in service end;
Setting up module, if being used for and the server successful connection in described server list, then setting up with right
Answer the long connection of server, do not resettle and be connected with the long of other servers in described server list;
Delivery module, if for being connected the most unsuccessful with the Servers-all in described server list,
The most again send acquisition client to service end and can be accessed by the acquisition request of server.
It should be noted that each functional unit involved by a kind of client of embodiment of the present invention offer
Other describe accordingly, the corresponding description being referred in Fig. 1, do not repeat them here.
The client that the present embodiment provides, first sends acquisition client to service end and can be accessed by server
Obtain request, then obtain described client according to the described client parameter information carried in request that obtains
End is accessible and access state meets pre-conditioned server, and is met by access state pre-conditioned
Server generate server list and send to described client;In further client and server list
Long being connected of being attached setting up between client with server of server.Long with prior art connects
Connect method for building up to compare, the method by service end generate server list, the method client with
When server carries out growing connection, by generating server list in service end, can be convenient for client
The good server of access state that selects be attached, it is to avoid randomly choose and can choose access state relatively
The situation of difference server, thus ensure that the quality of connection of client and server, improve long connection simultaneously
Joint efficiency.
Further, as implementing of method described in Fig. 2, embodiments provide a kind of clothes
Business end, as it is shown in figure 5, described service end includes: receive unit 41, acquiring unit 42, signal generating unit
43, transmitting element 44.
Described reception unit 41, the acquisition client sent for receiving client can be accessed by obtaining of server
Take request, described acquisition request carries the parameter information of client, described acquisition request carries
The parameter information of client, including: the ip address of client and network parameter.
Described acquiring unit 42, can be accessed by for obtaining described client according to described parameter information and connect
Entering state and meet pre-conditioned server, wherein, described access state meets pre-conditioned server
Refer to client and meet pre-conditioned with the connective stability of this server and connection speed, described default
Condition can be set according to client practical situation.
Described signal generating unit 43, generates server row for access state meets pre-conditioned server
Table, the order of this server list can be arranged from high to low order according to the access state of server
Sequence, it is also possible to randomly ordered.
Described transmitting element 44, for sending described server list to client, in order to described client
Hold and be connected with long between server to set up by being attached with the server in server list.
Further, as shown in Figure 6, described acquiring unit 42, including:
First acquisition module, for obtaining the server that described client is accessible;
Second acquisition module, negative for according to described client ip address and network parameter and server
Load situation, obtains the connection status of the accessible server of described client;
Choose module, meet pre-conditioned server as institute for choosing the connection status of predetermined quantity
State that client is accessible and access state meets pre-conditioned server.
It should be noted that each functional unit involved by the another kind of service end of embodiment of the present invention offer
Other describe accordingly, the corresponding description being referred in Fig. 2, do not repeat them here.
A kind of service end that the present embodiment provides, by setting between carrying out growing with server be connected in client
Putting a service end node, carry out the screening operation of a server in advance, generation can terminate with client
Entering the list of state preferably multiple servers, then client is by carrying out even with the server in list
Connect, it is to avoid randomly choose the situation that can choose access state inferior service device, drastically increase visitor
Family end and the joint efficiency of server so that client connection failure rate reduces 60%..
Further, embodiments provide a kind of long connection establishment system, as it is shown in fig. 7,
Described system includes: client 51, service end 52.
Described client 51, please for can be accessed by the acquisition of server to service end transmission acquisition client
Ask, described acquisition request carries the parameter information of client;
Described service end 52, the acquisition client sent for receiving client can be accessed by obtaining of server
Take request, described acquisition request carries the parameter information of client;
Described service end 52, be additionally operable to according to described parameter information obtain described client accessible and
Access state meets pre-conditioned server, and it is raw that access state meets pre-conditioned server
Server list is become to send to described client;
Described client 51, is additionally operable to receive the server list that described service end sends, by with clothes
The length that server in business device list is attached setting up between client with server is connected.
In sum, the present embodiment provide one long connection establishment method, Apparatus and system, first to
Service end sends acquisition client and can be accessed by the acquisition request of server, and described acquisition in request carries visitor
The parameter information of family end;The acquisition client that server reception client sends can be accessed by the acquisition of server
Request, then accessible according to the described parameter information described client of acquisition and access state meets to be preset
The server of condition, and access state is met pre-conditioned server generation server list transmission extremely
Described client;Client receives the server list that described service end sends further, passes through server
Server in list is attached being connected with the long of server to set up.With build long connection of prior art
Cube method is compared, and the method is when client carries out growing with server and is connected, by generating clothes in service end
Business device list, good server is attached can to select access state easily for client, it is to avoid
Randomly choose the situation that can choose access state inferior service device, thus ensure that client and service
The quality of connection of device, improves the long joint efficiency connected.
It should be noted that for above-mentioned service end, each used in every embodiment of the present invention is single
The function of element module can be passed through hardware processor (hardwareprocessor) and realize.
Exemplary, as shown in Figure 8, Fig. 8 shows a kind of service end that the embodiment of the present invention provides
Apparatus structure schematic diagram, this service end may include that processor (processor) 61, communication interface
(CommunicationsInterface) 62, memorizer (memory) 63 and bus 64, wherein, processor
61, communication interface 62, memorizer 63 complete mutual communication by bus 64.Communication interface 62
May be used for the information transmission between server and client.Processor 61 can call in memorizer 63
Logical order, to perform following method: service end receive client send acquisition client can be accessed by
The acquisition request of server, carries the parameter information of client in described acquisition request;According to described ginseng
Client described in number acquisition of information is accessible and access state meets pre-conditioned server;To access
State meets pre-conditioned server and generates server list;Described server list is sent to client
End, in order to the server in described client and server list is attached setting up between server
Long connection.
Additionally, the logical order in above-mentioned memorizer 63 can be realized by the form of SFU software functional unit
And during as independent production marketing or use, can be stored in a computer read/write memory medium.
Based on such understanding, the portion that prior art is contributed by technical scheme the most in other words
Dividing or the part of this technical scheme can embody with the form of software product, this computer software produces
Product are stored in a storage medium, including some instructions with so that a computer equipment (can be
Personal computer, server, or the network equipment etc.) perform method described in each embodiment of the present invention
All or part of step.And aforesaid storage medium includes: USB flash disk, portable hard drive, read only memory (ROM,
Read-Only Memory), random access memory (RAM, Random Access Memory),
The various medium that can store program code such as magnetic disc or CD.
Device embodiment described above is only schematically, wherein said illustrates as separating component
Unit can be or may not be physically separate, the parts shown as unit can be or
Person may not be physical location, i.e. may be located at a place, or can also be distributed to multiple network
On unit.Some or all of module therein can be selected according to the actual needs to realize the present embodiment
The purpose of scheme.Those of ordinary skill in the art are not in the case of paying performing creative labour, the most permissible
Understand and implement.
Through the above description of the embodiments, those skilled in the art is it can be understood that arrive each reality
The mode of executing can add the mode of required general hardware platform by software and realize, naturally it is also possible to by firmly
Part.Based on such understanding, the portion that prior art is contributed by technique scheme the most in other words
Dividing and can embody with the form of software product, this computer software product can be stored in computer can
Read in storage medium, such as ROM/RAM, magnetic disc, CD etc., including some instructions with so that one
Computer equipment (can be personal computer, server, or the network equipment etc.) performs each to be implemented
The method described in some part of example or embodiment.
Last it is noted that above example is only in order to illustrate technical scheme, rather than to it
Limit;Although the present invention being described in detail with reference to previous embodiment, the ordinary skill of this area
Personnel it is understood that the technical scheme described in foregoing embodiments still can be modified by it, or
Person carries out equivalent to wherein portion of techniques feature;And these amendments or replacement, do not make corresponding skill
The essence of art scheme departs from the spirit and scope of various embodiments of the present invention technical scheme.
Claims (13)
1. one kind long connection establishment method, it is characterised in that including:
Sending acquisition client to service end and can be accessed by the acquisition request of server, described acquisition in request is taken
Parameter information with client, in order to described service end obtains described client according to described parameter information
Accessible and access state meets pre-conditioned server;
Receiving the acquisition request response that described service end sends, described acquisition in request response comprises described visitor
Family end is accessible and access state meets pre-conditioned server list;
And the length that the server in server list is attached setting up between client and server connects
Connect.
Method the most according to claim 1, it is characterised in that the parameter information bag of described client
Include: the ip address of client and network parameter.
Method the most according to claim 1 and 2, it is characterised in that described with server list in
Long being connected of being attached setting up between client with server of server, including:
It is attached with the server in described server list successively;
If with the server successful connection in described server list, then setting up and connect with the long of corresponding server
Connect, do not resettle and be connected with the long of other servers in described server list;
If being connected the most unsuccessful with the Servers-all in described server list, the most again send out to service end
Send the acquisition request that acquisition client can be accessed by server.
4. one kind long connection establishment method, it is characterised in that including:
The acquisition client receiving client transmission can be accessed by the acquisition request of server, and described acquisition is asked
In carry the parameter information of client;
According to the described parameter information described client of acquisition is accessible and access state meets pre-conditioned
Server;
Access state is met pre-conditioned server and generates server list;
By described server list send to client, in order to described client by with in server list
Server be attached being connected with long between server to set up.
Method the most according to claim 4, it is characterised in that the parameter information bag of described client
Include: the ip address of client and network parameter.
Method the most according to claim 5, it is characterised in that described obtain according to described parameter information
Take that described client is accessible and access state meets pre-conditioned server, including:
Obtain the server that described client is accessible;
According to described client ip address and network parameter and the loading condition of server, obtain described visitor
The connection status of the server that family end is accessible;
Choose the connection status of predetermined quantity to meet pre-conditioned server and can be accessed by as described client
And access state meets pre-conditioned server.
7. a client, it is characterised in that including:
Transmitting element, can be accessed by the acquisition request of server, institute for sending acquisition client to service end
State the parameter information carrying client in the request of acquisition, in order to described service end is according to described parameter information
Obtain that described client is accessible and access state meets pre-conditioned server;
Receiving unit, be used for receiving the acquisition request response that described service end sends, described acquisition asks to ring
Comprise in Ying that described client is accessible and access state meets pre-conditioned server list;
Set up unit, for being attached setting up client and service with the server in server list
Long connection between device.
Client the most according to claim 7, it is characterised in that the parameter information of described client
Including: the ip address of client and network parameter.
9. according to the client described in claim 7 or 8, it is characterised in that described unit of setting up, bag
Include:
Link block, for being attached with the server in described server list successively;
Setting up module, if being used for and the server successful connection in described server list, then setting up with right
Answer the long connection of server, do not resettle and be connected with the long of other servers in described server list;
Delivery module, if for being connected the most unsuccessful with the Servers-all in described server list,
The most again send acquisition client to service end and can be accessed by the acquisition request of server.
10. a service end, it is characterised in that including:
Receiving unit, the acquisition client sent for receiving client can be accessed by the acquisition request of server,
Described acquisition request carries the parameter information of client;
Acquiring unit, can be accessed by and access state for obtaining described client according to described parameter information
Meet pre-conditioned server;
Signal generating unit, generates server list for access state meets pre-conditioned server;
Transmitting element, for sending described server list to client, in order to described client is passed through
It is attached with the server in server list being connected with the length between server to set up.
11. clients according to claim 10, it is characterised in that the parameter letter of described client
Breath includes: the ip address of client and network parameter.
12. clients according to claim 11, it is characterised in that described acquiring unit, including:
First acquisition module, for obtaining the server that described client is accessible;
Second acquisition module, negative for according to described client ip address and network parameter and server
Load situation, obtains the connection status of the accessible server of described client;
Choose module, meet pre-conditioned server as institute for choosing the connection status of predetermined quantity
State that client is accessible and access state meets pre-conditioned server.
13. 1 kinds long connection establishment systems, it is characterised in that include that claim 7 is to claim 9
According to any one of client, service end according to any one of claim 10 to claim 12,
Described client, can be accessed by the acquisition request of server for sending acquisition client to service end,
Described acquisition request carries the parameter information of client;
Described service end, the acquisition client sent for receiving client can be accessed by the acquisition of server
Request, carries the parameter information of client in described acquisition request;
Described service end, is additionally operable to obtain described client according to described parameter information and can be accessed by and connect
Enter state and meet pre-conditioned server, and access state is met pre-conditioned server generation
Server list sends to described client;
Described client, is additionally operable to receive the server list that described service end sends, by with service
The length that server in device list is attached setting up between client with server is connected.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510849496.4A CN105871977A (en) | 2015-11-27 | 2015-11-27 | Long connection establishment method and system, and devices |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510849496.4A CN105871977A (en) | 2015-11-27 | 2015-11-27 | Long connection establishment method and system, and devices |
Publications (1)
Publication Number | Publication Date |
---|---|
CN105871977A true CN105871977A (en) | 2016-08-17 |
Family
ID=56623684
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510849496.4A Pending CN105871977A (en) | 2015-11-27 | 2015-11-27 | Long connection establishment method and system, and devices |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105871977A (en) |
Cited By (18)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107659473A (en) * | 2017-09-28 | 2018-02-02 | 努比亚技术有限公司 | Connection control method, system, routing server and computer-readable recording medium |
WO2018040066A1 (en) * | 2016-09-02 | 2018-03-08 | 深圳中兴力维技术有限公司 | Method, device and system enabling apparatus to automatically access server |
CN108366277A (en) * | 2018-03-30 | 2018-08-03 | 武汉斗鱼网络科技有限公司 | A kind of barrage server connection method, client and readable storage medium storing program for executing |
CN108430116A (en) * | 2018-03-02 | 2018-08-21 | 杭州朗和科技有限公司 | Suspension reconnection method, medium, device and computing device |
CN108965492A (en) * | 2018-06-28 | 2018-12-07 | 武汉斗鱼网络科技有限公司 | Method, storage medium, electronic equipment and the system of barrage link quality statistics |
CN109274584A (en) * | 2018-09-28 | 2019-01-25 | 乐蜜有限公司 | Cut-in method, device, client device and the storage medium of access server |
CN110324642A (en) * | 2018-03-30 | 2019-10-11 | 武汉斗鱼网络科技有限公司 | A kind of barrage server connection method, client and readable storage medium storing program for executing |
CN110324229A (en) * | 2018-03-30 | 2019-10-11 | 武汉斗鱼网络科技有限公司 | A kind of barrage server connection method, client and readable storage medium storing program for executing |
CN110324391A (en) * | 2018-03-30 | 2019-10-11 | 武汉斗鱼网络科技有限公司 | A kind of barrage server connection method, client and readable storage medium storing program for executing |
CN110324677A (en) * | 2018-03-30 | 2019-10-11 | 武汉斗鱼网络科技有限公司 | A kind of barrage server connection method, client and readable storage medium storing program for executing |
CN111262779A (en) * | 2020-01-21 | 2020-06-09 | 香港乐蜜有限公司 | Method, device, server and system for acquiring data in instant messaging |
CN111314465A (en) * | 2020-02-17 | 2020-06-19 | 天津卓朗科技发展有限公司 | Weak network environment communication method and device and electronic equipment |
CN111737029A (en) * | 2020-06-23 | 2020-10-02 | 中国建设银行股份有限公司 | Server, data pushing method and data pushing system |
CN111800466A (en) * | 2020-06-03 | 2020-10-20 | 香港乐蜜有限公司 | Method and device for establishing long connection service, electronic equipment and storage medium |
CN111935296A (en) * | 2020-08-18 | 2020-11-13 | 成都长虹网络科技有限责任公司 | System for high-availability infinite MQTT message service capacity expansion |
CN112019650A (en) * | 2020-08-20 | 2020-12-01 | 北京达佳互联信息技术有限公司 | IP address recommendation method and device and server |
CN112202918A (en) * | 2020-10-16 | 2021-01-08 | 深圳乐播科技有限公司 | Load scheduling method, device, equipment and storage medium for long connection communication |
CN115665225A (en) * | 2022-10-31 | 2023-01-31 | 维沃移动通信有限公司 | Long connection establishing method and device, target device and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103618738A (en) * | 2013-12-09 | 2014-03-05 | 惠州华阳通用电子有限公司 | Intelligent load distribution system and method for achieving TCP long connection and communication |
CN103795569A (en) * | 2014-01-22 | 2014-05-14 | 亿赞普(北京)科技有限公司 | Server connection method and device based on connection pool |
CN104092682A (en) * | 2014-07-04 | 2014-10-08 | 深圳深讯和科技有限公司 | Data interaction method and system |
CN104796387A (en) * | 2014-01-21 | 2015-07-22 | 腾讯科技(深圳)有限公司 | Communication method and device of long connection of network |
CN104852934A (en) * | 2014-02-13 | 2015-08-19 | 阿里巴巴集团控股有限公司 | Method for realizing flow distribution based on front-end scheduling, device and system thereof |
-
2015
- 2015-11-27 CN CN201510849496.4A patent/CN105871977A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103618738A (en) * | 2013-12-09 | 2014-03-05 | 惠州华阳通用电子有限公司 | Intelligent load distribution system and method for achieving TCP long connection and communication |
CN104796387A (en) * | 2014-01-21 | 2015-07-22 | 腾讯科技(深圳)有限公司 | Communication method and device of long connection of network |
CN103795569A (en) * | 2014-01-22 | 2014-05-14 | 亿赞普(北京)科技有限公司 | Server connection method and device based on connection pool |
CN104852934A (en) * | 2014-02-13 | 2015-08-19 | 阿里巴巴集团控股有限公司 | Method for realizing flow distribution based on front-end scheduling, device and system thereof |
CN104092682A (en) * | 2014-07-04 | 2014-10-08 | 深圳深讯和科技有限公司 | Data interaction method and system |
Cited By (26)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2018040066A1 (en) * | 2016-09-02 | 2018-03-08 | 深圳中兴力维技术有限公司 | Method, device and system enabling apparatus to automatically access server |
CN107659473A (en) * | 2017-09-28 | 2018-02-02 | 努比亚技术有限公司 | Connection control method, system, routing server and computer-readable recording medium |
CN108430116A (en) * | 2018-03-02 | 2018-08-21 | 杭州朗和科技有限公司 | Suspension reconnection method, medium, device and computing device |
CN110324642B (en) * | 2018-03-30 | 2021-07-23 | 武汉斗鱼网络科技有限公司 | Bullet screen server connection method, client and readable storage medium |
CN110324677B (en) * | 2018-03-30 | 2021-09-07 | 武汉斗鱼网络科技有限公司 | Bullet screen server connection method, client and readable storage medium |
CN110324229B (en) * | 2018-03-30 | 2022-04-12 | 武汉斗鱼网络科技有限公司 | Bullet screen server connection method, client and readable storage medium |
CN110324642A (en) * | 2018-03-30 | 2019-10-11 | 武汉斗鱼网络科技有限公司 | A kind of barrage server connection method, client and readable storage medium storing program for executing |
CN110324229A (en) * | 2018-03-30 | 2019-10-11 | 武汉斗鱼网络科技有限公司 | A kind of barrage server connection method, client and readable storage medium storing program for executing |
CN110324391A (en) * | 2018-03-30 | 2019-10-11 | 武汉斗鱼网络科技有限公司 | A kind of barrage server connection method, client and readable storage medium storing program for executing |
CN110324677A (en) * | 2018-03-30 | 2019-10-11 | 武汉斗鱼网络科技有限公司 | A kind of barrage server connection method, client and readable storage medium storing program for executing |
CN108366277A (en) * | 2018-03-30 | 2018-08-03 | 武汉斗鱼网络科技有限公司 | A kind of barrage server connection method, client and readable storage medium storing program for executing |
CN108366277B (en) * | 2018-03-30 | 2021-06-15 | 武汉斗鱼网络科技有限公司 | Bullet screen server connection method, client and readable storage medium |
CN108965492A (en) * | 2018-06-28 | 2018-12-07 | 武汉斗鱼网络科技有限公司 | Method, storage medium, electronic equipment and the system of barrage link quality statistics |
CN108965492B (en) * | 2018-06-28 | 2021-11-26 | 武汉斗鱼网络科技有限公司 | Bullet screen link quality statistical method, storage medium, electronic equipment and system |
CN109274584A (en) * | 2018-09-28 | 2019-01-25 | 乐蜜有限公司 | Cut-in method, device, client device and the storage medium of access server |
CN109274584B (en) * | 2018-09-28 | 2021-10-15 | 卓米私人有限公司 | Access method and device for access server, client device and storage medium |
CN111262779A (en) * | 2020-01-21 | 2020-06-09 | 香港乐蜜有限公司 | Method, device, server and system for acquiring data in instant messaging |
CN111314465A (en) * | 2020-02-17 | 2020-06-19 | 天津卓朗科技发展有限公司 | Weak network environment communication method and device and electronic equipment |
CN111800466A (en) * | 2020-06-03 | 2020-10-20 | 香港乐蜜有限公司 | Method and device for establishing long connection service, electronic equipment and storage medium |
CN111737029A (en) * | 2020-06-23 | 2020-10-02 | 中国建设银行股份有限公司 | Server, data pushing method and data pushing system |
CN111935296A (en) * | 2020-08-18 | 2020-11-13 | 成都长虹网络科技有限责任公司 | System for high-availability infinite MQTT message service capacity expansion |
CN112019650A (en) * | 2020-08-20 | 2020-12-01 | 北京达佳互联信息技术有限公司 | IP address recommendation method and device and server |
CN112019650B (en) * | 2020-08-20 | 2023-06-30 | 北京达佳互联信息技术有限公司 | IP address recommendation method, device and server |
CN112202918A (en) * | 2020-10-16 | 2021-01-08 | 深圳乐播科技有限公司 | Load scheduling method, device, equipment and storage medium for long connection communication |
CN112202918B (en) * | 2020-10-16 | 2023-08-08 | 深圳乐播科技有限公司 | Load scheduling method, device, equipment and storage medium for long connection communication |
CN115665225A (en) * | 2022-10-31 | 2023-01-31 | 维沃移动通信有限公司 | Long connection establishing method and device, target device and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105871977A (en) | Long connection establishment method and system, and devices | |
WO2020220535A1 (en) | Data storage method, and related device | |
CN104144098A (en) | Information pushing method and system and pushing server equipment | |
CN102185856B (en) | Team organizing video method, device and system used in team organizing game | |
CN106533845A (en) | Long-connection state monitoring method and device | |
CN102130839B (en) | Data transmission method and device | |
CN103795569A (en) | Server connection method and device based on connection pool | |
CN108702486A (en) | A kind of low delay audio/video transmission method, device and computer readable storage medium | |
CN107846457A (en) | Load-balancing method, device, storage medium and the system of server cluster | |
WO2019079971A1 (en) | Method for group communication, and apparatus, computer storage medium, and computer device | |
CN104618162B (en) | A kind of management method of system docking, device and system | |
CN106982158A (en) | The sharing method and device of movement locus | |
CN104320272A (en) | Device information transmission method and network device | |
CN107087032A (en) | Realize the method and apparatus that cluster is set up | |
CN102088458B (en) | Method, terminal and system for holding cascade conference | |
CN103299298B (en) | The method and system of process business | |
CN106254935A (en) | A kind of method of resource-sharing and terminal | |
CN109150981A (en) | Block chain network network-building method, device, equipment and computer readable storage medium | |
CN103117959A (en) | Resource redistribution method and information collection device and resource management device | |
CN108337537B (en) | Cloud platform video playing and scheduling method | |
CN106201520B (en) | System restoring method and device | |
CN105871750A (en) | Resource scheduling method and server | |
CN109842647A (en) | A kind of method, apparatus, system and medium maintaining long connection | |
CN109104472A (en) | Block chain network network-building method, device, equipment and computer readable storage medium | |
CN104735097A (en) | Information collecting method and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20160817 |