CN101068147A - Method for controlling establishment of terminal connection in network communication - Google Patents

Method for controlling establishment of terminal connection in network communication Download PDF

Info

Publication number
CN101068147A
CN101068147A CNA2007100050301A CN200710005030A CN101068147A CN 101068147 A CN101068147 A CN 101068147A CN A2007100050301 A CNA2007100050301 A CN A2007100050301A CN 200710005030 A CN200710005030 A CN 200710005030A CN 101068147 A CN101068147 A CN 101068147A
Authority
CN
China
Prior art keywords
connection
direct
udp
presetting
tcp
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
Application number
CNA2007100050301A
Other languages
Chinese (zh)
Inventor
黄建华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CNA2007100050301A priority Critical patent/CN101068147A/en
Publication of CN101068147A publication Critical patent/CN101068147A/en
Pending legal-status Critical Current

Links

Images

Abstract

A method for controlling to set up terminal connection in network communication includes starting up multiple connection as per preset sequence, stopping connection in sequence behind when any connection is successful and setting said connection to be the first candidate connection.

Description

The method that terminal connects is set up in control in a kind of network service
Technical field
The present invention relates to control in a kind of network service the method that terminal connects of setting up.
Background technology
Along with the network user's continuous growth, the transmission that utilizes network to carry out large-data operation has obtained using widely, for example usually utilizes network to carry out file transfer, audio frequency and video chat etc. between the personal user.
At present, usually connect in end-to-end mode when carrying out the transmission of large-data operation between the network user, concrete ways of connecting have direct-connected be connected by transit server, direct-connected transmission control protocol (the Transmission Control Protocol that comprises again, TCP) direct-connected, User Datagram Protoco (UDP) (User Datagram Protocol, UDP) direct-connected, point-to-point (point to point, P2P) connect etc., comprise the TCP transit server by the transit server connection, UDP transit server etc., the communication quality of various connections, applicable situation is different separately with transmission characteristic, how to utilize dissimilar connections between end-to-end, to set up high-quality stable interface channel, reduce communication pressure simultaneously as far as possible, become the key that can above big data quantity transport service the high-quality operation server.
In the prior art, when end is connected with end, attempt all possible connected mode usually simultaneously,, disconnect or service ending up to connecting if just use this connection to communicate after a certain successful connection always.
But this method of attachment of prior art has process that effective control connection sets up, and connects the shortcoming that can't dynamically switch connection after setting up, below specifies this two shortcomings respectively.
Prior art is the process of control connection foundation effectively, specifically comprises following two aspects:
1, can't select to meet the connection of demand according to business demand;
As previously mentioned, the communication quality of various connections, applicable situation and transmission characteristic are different separately, so should set method of attachment according to different business demands, allow the connection that is more suitable for can more early start and become first-selected the connection.But because existing can only the use carried out all connections simultaneously, successful the earliest connection then is final ways of connecting, shown in can't realize setting method of attachment according to business demand; For example, when carrying out the audio frequency and video chat service, use UDP to connect and be fit to this business, still, connect successful connection in advance, then can't select UDP to connect if TCP connects than UDP;
2, direct-connected or by server connect can situation under, do not have correct mechanism can guarantee that connected mode is more excellent direct-connected, has increased the communication pressure of server;
Be that successful the earliest connection will be final connected mode because all connections are carried out simultaneously equally; For example, at first successful if the TCP transit server connects, then can not carry out other again and connect, will increase the communication pressure of server like this.
The shortcoming that prior art can't dynamically be switched connection after connection specifically comprises following two aspects:
When 1, connecting unusual the disconnection, can't create new connection and continue to keep communication;
The new connection that can't create better quality when 2, quality of connection is relatively poor replaces existing the connection; For example, the direct-connected mode bandwidth of TCP is very low, and file transfer is very slow, uses that prior art can't transit server connects or other connect and improve transmission speed by attempting setting up this moment.
Summary of the invention
The technical problem to be solved in the present invention provides in a kind of network service control and sets up the method that terminal connects, by the effective process set up of control connection and can dynamically switching connection after connecting foundation of this method.
For solving the problems of the technologies described above, the objective of the invention is to be achieved through the following technical solutions:
The method that terminal connects is set up in control in a kind of network service, comprising:
According to a plurality of connections of the sequence starting of presetting;
After arbitrary successful connection, stop the connection after other orderings are leaned on, this is set is connected to first-selected the connection.
As can be seen from the above technical solutions, because the present invention can make various connections according to the sequence starting of presetting, and then the process of effectively control connection foundation also can dynamically be switched connection in the back that connects.
Description of drawings
Fig. 1 sets up the flow chart of method first embodiment of terminal connection for control in a kind of network service of the present invention;
Fig. 2 sets up the flow chart of method second embodiment of terminal connection for control in a kind of network service of the present invention;
Fig. 3 sets up the flow chart of method the 3rd embodiment of terminal connection for control in a kind of network service of the present invention.
Embodiment
For making the purpose, technical solutions and advantages of the present invention clearer, the present invention is described in further detail below in conjunction with accompanying drawing.
Method core concept of the present invention is: according to a plurality of connections of the sequence starting of presetting; After arbitrary successful connection, stop the connection after other orderings are leaned on, this is set is connected to first-selected the connection.
Based on core concept of the present invention, at several situations that often occur in the reality, the present invention has provided concrete scheme, below describes in detail respectively.
At first, the first embodiment of the present invention is described, first embodiment of the invention is understood the method for attachment when the computer in the network begins to be connected to each other for example specifically.
The present invention has at first preset the start-up time and the priority of various connections, during connection according to described start-up time of presetting with priority management each startup that is connected and fallback relationship.First embodiment of the invention presets the priority of various connections and start-up time as shown in Table 1.
Table one
Connection name Connect start-up time (second) Connection priority
UDP is direct-connected 0 4
The UDP transit server 4 3
TCP is direct-connected 0 2
The TCP transit server 0xFFFFFFF 1
Following his-and-hers watches one are elaborated:
UDP is direct-connected: be 0 start-up time, and expression starts immediately; Connection priority is 4, and is all higher than the priority of other connections, in case represent this connection success then it be set to connect for first-selected, and to stop the connection of other low priorities; If the successful connection of low priority has been arranged during its successful connection, then stop the connection of this low priority, this is set is connected to first-selected the connection;
The UDP transit server: be 4 start-up time, represented just to start after 4 seconds; Connection priority is 3, and is direct-connected lower than UDP, all higher than the priority of other connections, in case represent the direct-connected not success of this connection success and UDP then connect for first-selected, and to stop the connection of other low priorities; If the successful connection of low priority has been arranged during its successful connection, then stop the connection of this low priority, this is set is connected to first-selected the connection;
TCP is direct-connected: be 0 start-up time, and expression starts immediately; Connection priority is 2, direct-connected lower than UDP with the UDP transit server, than the priority height of TCP transit server, in case represent this connection success and UDP direct-connected with UDP transit server all during success then be connected for first-selected, and to stop the connection of other low priorities; If the successful connection of low priority has been arranged during its successful connection, then stop the connection of this low priority, this is set is connected to first-selected the connection;
The TCP transit server: be 0xFFFFFFF start-up time, and expression is not connected startup synchronously with other, but just starts this connection after all are all failed than the connection of its high priority; Connection priority is 1, is lowest priority.
Be illustrated in figure 1 as the flow chart of first embodiment of the invention, comprise:
101, it is direct-connected and TCP is direct-connected to start UDP;
In order to obtain to connect rapidly, present embodiment adopts and all are connected the mode that flow process starts at the very start connect after the start-up time of presetting separately, because UDP is direct-connected and TCP direct-connected start-up time all is 0, so they start immediately;
102, when the direct-connected success of UDP, UDP then being set direct-connected is first-selected the connection, and it is direct-connected to stop TCP, and flow process finishes; When direct-connected success of TCP and the direct-connected failure of UDP, TCP then being set direct-connected is first-selected the connection;
103, the direct-connected and direct-connected startup of TCP of UDP starts the UDP transit server and connects after 4 seconds and the direct-connected success of UDP;
104, direct-connected as UDP, TCP is direct-connected with arbitrary successful and not than after the high successful connection of this success connection priority during the UDP transit server is connected, and this is set is connected to first-selected the connection, stops the connection lower than this connection priority;
Be specially: when the direct-connected success of UDP, be provided with then that UDP is direct-connected to be connected for first-selected, stop that TCP is direct-connected to be connected with the UDP transit server, the flow process end; When successful connection of UDP transit server and the direct-connected not success of UDP, the UDP transit server then is set is connected to first-selected the connection, it is direct-connected to stop TCP, and flow process finishes; Be connected all success with the UDP transit server when the direct-connected success of TCP and UDP are direct-connected, be provided with then that TCP is direct-connected to be connected for first-selected, flow process finishes;
105, direct-connected as UDP, TCP is direct-connected with after the UDP transit server all fails, start the TCP transit server and connect;
Usually, specifically be direct-connected as UDP, TCP is direct-connected with all overtime failure of UDP transit server after, start the TCP transit server and connect;
106, when the successful connection of TCP transit server, the TCP transit server then is set is connected to first-selected the connection, flow process finishes.
First embodiment of the invention has proposed a kind of method of attachment, and this method is that the setting according to table one connects, and is applicable to the demand of audio frequency and video chat between the network user in the practical application.
During practical application, can preset different start-up times and priority according to different demands.As shown in Table 2 at the webserver load when big to the table that is provided with of start-up time and priority, it reduces priority of UDP transit server and is provided with certain start-up time, can allow the direct-connected probability of success much larger than probability, and then obviously reduce the communication pressure of server by the transit server successful connection.Use the principle of the invention, can use different priority and the setting of start-up time, can select to meet the connection of demand according to business demand at different applicable cases.
Table two
Connection name Connect start-up time (second) Connection priority
UDP is direct-connected 0 4
TCP is direct-connected 0 3
The UDP transit server 4 2
The TCP transit server 0xFFFFFFF 1
Above-mentioned is the first embodiment of the present invention, and its situation when just having begun to connect between the user has proposed solution.After connection is set up successfully, need to rebulid when connecting, also can use method of the present invention, below be elaborated.
Usually, after having connected between the user,, utilize method of the present invention can rebulid connection when connecting unusual the disconnection or quality of connection when undesirable.
At this moment, should can make startup and the successful connection more early of suitable connected mode according to the boot sequence of each connection of sequential control of each connection of presetting.
For example:
When current connection disconnects unusually, according to sequence starting of presetting and the identical connection of this connection ordering, after not having such connection or such connection all to fail, according to the connection after this connection of the sequence starting of presetting, the connection after after the identical connection of arbitrary ordering is all failed, then leaning on according to the sequence starting ordering of presetting; When current quality of connection is undesirable, can be connected the connection of comparing after ordering is leaned on this according to the sequence starting of presetting, the connection after after the identical connection of arbitrary ordering is all failed, then leaning on according to the sequence starting ordering of presetting.
Describe in detail below in conjunction with specific embodiment.
Particularly, the unlock code of each connection that the embodiment of the invention sets in advance according to actual needs with the user embodies order, and unlock code is less, and to be ordering forward, and unlock code is bigger is ordering after leaning on.After connecting unusual the disconnection, at first should find the unlock code of the connection that will disconnect, start other connections identical then or start the connection bigger, if connect unsuccessful than this connection unlock code with this connection unlock code, then start the connection of next unlock code, up to successful connection.Below illustrate.
Table three is for showing the unlock code and the start-up time of each connection that the present invention presets at this kind situation.
Table three
Connection name Connect start-up time (second) Unlock code
UDP is direct-connected 0 1
TCP is direct-connected 2 1
The UDP transit server 0 ?2
The TCP transit server 0 ?3
Be illustrated in figure 2 as the flow chart of second embodiment of the invention, this embodiment understands that for example according to unlock code and start-up time that table three presets, the method that reconnects comprises after the direct-connected unusual disconnection of TCP:
201, search the unlock code of the connection of disconnection;
Search by table three, finding the direct-connected unlock code of TCP is 1;
202, start all connections identical with the connection unlock code of this disconnection;
In the table three unlock code be 1 have the direct-connected and TCP of UDP direct-connected, so that start UDP this moment earlier is direct-connected, then according to the start-up time that is provided with in the table three, it is direct-connected to start TCP after 2 seconds;
203, as UDP direct-connected or TCP direct-connected any is at first successful, this then is set is connected to first-selected the connection, stop other connections, flow process finishes; When UDP direct-connected with TCP direct-connected be connected success, then start the UDP transit server and connect;
204, when the successful connection of UDP transit server, this then is set is connected to first-selected the connection, flow process finishes; When the UDP transit server connects not success, then start the TCP transit server and connect;
205, when the successful connection of TCP transit server, this then is set is connected to first-selected the connection, flow process finishes; When the TCP transit server connects not success, then finish.
More than understand the method that reconnects after unusual the disconnection when connecting for example specifically, illustrate the method that when quality of connection is undesirable, reconnects below.
When quality of connection is undesirable, at first should find the unlock code of this connection, start whole connections then than the big one-level of this unlock code, successfully be connected to first-selected the connection if there is successful connection that this then is set, if neither one successful connection, then start the bigger whole connections of next unlock code again, up to successful connection is arranged.Below illustrate.
Table four is for showing the unlock code and the start-up time of each connection that the present invention presets at this kind situation.
Table four
Connection name Connect start-up time (second) Unlock code
UDP is direct-connected 0 1
TCP is direct-connected 2 1
The UDP transit server 0 2
The TCP transit server 0 3
Be illustrated in figure 3 as the flow chart of third embodiment of the invention, this embodiment understands that for example according to unlock code and start-up time that table four presets, the method that reconnects comprises after the direct-connected quality of connection of TCP is undesirable:
301, search the unlock code of the connection of disconnection;
Search by table four, finding the direct-connected unlock code of TCP is 1;
302, start all connections that connect the big one-level of unlock code than this;
In the table four unlock code be 2 be that the UDP transit server connects, start the UDP transit server and connect;
303, when the successful connection of UDP transit server, this then is set is connected to first-selected the connection, flow process finishes; When the UDP transit server connects not success, then start the TCP transit server and connect;
304, when the successful connection of TCP transit server, this then is set is connected to first-selected the connection, flow process finishes; When the TCP transit server connects not success, then return.
More than the method that terminal connects set up in control in a kind of network service provided by the present invention be described in detail, used specific case herein principle of the present invention and execution mode are set forth, the explanation of above embodiment just is used for helping to understand method of the present invention and core concept thereof; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, the part that all can change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.

Claims (5)

1, the method that terminal connects is set up in control in a kind of network service, it is characterized in that, comprising:
According to a plurality of connections of the sequence starting of presetting;
After arbitrary successful connection, stop the connection after other orderings are leaned on, this is set is connected to first-selected the connection.
2, the method that terminal connects is set up in control in the network service as claimed in claim 1, it is characterized in that:
Describedly comprise according to a plurality of step of connecting of the sequence starting of presetting:
All start after being connected the time of delay of presetting separately;
Connection after described ordering is leaned on is specially:
The connection lower than the priority of this connection according to the priority orders that presets.
3, the method that terminal connects is set up in control in the network service as claimed in claim 1, it is characterized in that:
Describedly comprise according to a plurality of step of connecting of the sequence starting of presetting:
When current connection disconnects unusually, according to sequence starting of presetting and the identical connection of this connection ordering, after not having such connection or such connection all to fail, according to the connection after this connection of the sequence starting of presetting, the connection after after the identical connection of arbitrary ordering is all failed, then leaning on according to the sequence starting ordering of presetting.
4, the method that terminal connects is set up in control in the network service as claimed in claim 1, it is characterized in that:
Describedly comprise according to a plurality of step of connecting of the sequence starting of presetting:
When current quality of connection is undesirable, be connected the connection of comparing after ordering is leaned on this according to the sequence starting of presetting, the connection after after the identical connection of arbitrary ordering is all failed, then leaning on according to the sequence starting ordering of presetting.
5, the method that terminal connects is set up in control in the network service as claimed in claim 1, it is characterized in that:
The order of each connection that the described order that presets is provided with according to the needs of different business for the user.
CNA2007100050301A 2007-02-09 2007-02-09 Method for controlling establishment of terminal connection in network communication Pending CN101068147A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNA2007100050301A CN101068147A (en) 2007-02-09 2007-02-09 Method for controlling establishment of terminal connection in network communication

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNA2007100050301A CN101068147A (en) 2007-02-09 2007-02-09 Method for controlling establishment of terminal connection in network communication

Publications (1)

Publication Number Publication Date
CN101068147A true CN101068147A (en) 2007-11-07

Family

ID=38880591

Family Applications (1)

Application Number Title Priority Date Filing Date
CNA2007100050301A Pending CN101068147A (en) 2007-02-09 2007-02-09 Method for controlling establishment of terminal connection in network communication

Country Status (1)

Country Link
CN (1) CN101068147A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102571625A (en) * 2010-12-29 2012-07-11 北京神州泰岳软件股份有限公司 Device and method for establishing connection during file transmission
CN107426205A (en) * 2017-07-17 2017-12-01 北方信息控制研究院集团有限公司 The efficient broadcasting method of differential data product accessed towards high concurrent user
CN107707594A (en) * 2017-02-21 2018-02-16 贵州白山云科技有限公司 It is a kind of to realize the document transmission method and device accelerated on demand
CN110505272A (en) * 2019-07-12 2019-11-26 杭州海康威视数字技术股份有限公司 A kind of internetwork connection establishing method, device, receiver equipment and send method, apparatus
CN110602448A (en) * 2019-08-30 2019-12-20 湖南正申科技有限公司 Real-time multi-view audio and video transmission method
CN111600883A (en) * 2020-05-15 2020-08-28 深圳市元征科技股份有限公司 Vehicle diagnosis method and system, electronic equipment and storage medium

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102571625A (en) * 2010-12-29 2012-07-11 北京神州泰岳软件股份有限公司 Device and method for establishing connection during file transmission
CN107707594A (en) * 2017-02-21 2018-02-16 贵州白山云科技有限公司 It is a kind of to realize the document transmission method and device accelerated on demand
CN107707594B (en) * 2017-02-21 2018-11-27 贵州白山云科技有限公司 It is a kind of to realize the document transmission method and device accelerated on demand
CN107426205A (en) * 2017-07-17 2017-12-01 北方信息控制研究院集团有限公司 The efficient broadcasting method of differential data product accessed towards high concurrent user
CN110505272A (en) * 2019-07-12 2019-11-26 杭州海康威视数字技术股份有限公司 A kind of internetwork connection establishing method, device, receiver equipment and send method, apparatus
CN110602448A (en) * 2019-08-30 2019-12-20 湖南正申科技有限公司 Real-time multi-view audio and video transmission method
CN110602448B (en) * 2019-08-30 2021-10-22 湖南正申科技有限公司 Real-time multi-view audio and video transmission method
CN111600883A (en) * 2020-05-15 2020-08-28 深圳市元征科技股份有限公司 Vehicle diagnosis method and system, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN101079840A (en) A data transmission system and method
CN101068147A (en) Method for controlling establishment of terminal connection in network communication
CN101068236A (en) Streaming media bit rate control method, system and equipment
CN101030843A (en) Method for converting multi-medium conference controlling mode
CN101064869A (en) Mobile communication terminal, and method for transmission of image in mobile messenger service
CN101056320A (en) A file transfer method and its system in the data meeting
CN101056275A (en) A setting method for group message receiving mode in the instant communication system
CN101079869A (en) A data synchronization method and system based on distribution
CN1933398A (en) Method and system for automatic right-discriminating plusing good friend in immediate communication
CN101043345A (en) Point-to-point technique based picture sharing system and method
CN101075954A (en) Point-to-point fluid-medium telecommunication system and method for allocating supernode resources
CN1968119A (en) Method for resource sharing among MCUs in videoconference system
CN1561043A (en) Multi-user concurrent insertion device and its method
CN101068187A (en) Method of establishing a communication session and communication network
CN101047580A (en) Method for setting point-to-point data channel
CN101039203A (en) Access equipment, conference access method and conference service system
CN101030878A (en) Method for grouping visual-information network, DHCP server and visual information terminal
CN101030937A (en) Multilevel random accessing method based on packet
CN1842080A (en) Method for adjusting transmission control protocol receive window
CN1592250A (en) Flow medium data multi-point transmission method
CN1946164A (en) System and method for meeting information backup in multipoint meeting
CN1859623A (en) Method for realizing stream media service
CN1859375A (en) Method for avoiding redundant Flood
CN101047828A (en) Distribution conference system
CN1960525A (en) Dialogue control method and system in service of multiparty communication

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication