CN104967655A - Method used for information transmission and device used for information transmission - Google Patents

Method used for information transmission and device used for information transmission Download PDF

Info

Publication number
CN104967655A
CN104967655A CN201510218949.3A CN201510218949A CN104967655A CN 104967655 A CN104967655 A CN 104967655A CN 201510218949 A CN201510218949 A CN 201510218949A CN 104967655 A CN104967655 A CN 104967655A
Authority
CN
China
Prior art keywords
information
sent
connection
equipment
stand
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201510218949.3A
Other languages
Chinese (zh)
Other versions
CN104967655B (en
Inventor
邓宇龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Baidu Online Network Technology Beijing Co Ltd
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology 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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201510218949.3A priority Critical patent/CN104967655B/en
Publication of CN104967655A publication Critical patent/CN104967655A/en
Application granted granted Critical
Publication of CN104967655B publication Critical patent/CN104967655B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/101Server selection for load balancing based on network conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1044Group management mechanisms 
    • H04L67/1046Joining mechanisms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer And Data Communications (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The present invention provides a method used for information transmission and a device used for information transmission. The method comprises the following steps of based on the first connection to a first device, determining one or a plurality of second connection to the first device, wherein the one or the plurality of second connection is established on the basis of the first connection; based on a to-be-sent message, determining the standby second connection in the one or the plurality of second connection; sending the to-be-sent message to the first device by the standby second connection. Compared with the prior art, the second connection can be determined dynamically to send the message on the basis of the same first connection, thereby reducing the information jam possibility, and improving the communication efficiency.

Description

For the method and apparatus of information transmission
Technical field
The present invention relates to internet arena, particularly relate to a kind of method and apparatus for information transmission.
Background technology
In prior art, work as communicating pair, such as first need connect (such as HTTP is connected) with during connection-oriented mode messaging between browser with server, then carry out Message Transmission by this connection (such as HTTP connects).Such as, but work as communicating pair, when needing the message of transmission more between browser and server, because it is communicated by same HTTP connection, message easily gets clogged.Such as, when server needs to browser PUSH message, the message of this propelling movement may due to block by other message and browser cannot be arrived in time thus make content information updating not in time, Consumer's Experience is poor.Although can set up multiple HTTP between browser with server to be connected simultaneously, based on prior art, then need to set up multiple TCP simultaneously and connect, this will cause burden for system resource and Internet resources.Therefore, as why not caused large impact to system resource or Internet resources, reducing communication blocking and improving communication efficiency is a problem needing to solve.
Summary of the invention
The object of this invention is to provide a kind of method and apparatus of information transmission.
According to an aspect of the present invention, provide a kind of method for information transmission, wherein, the method comprises the following steps:
-connect based on to first of the first equipment, be determined to described first equipment one or more second connects, wherein, on described one or more second connection establishment connects described first;
-based on information to be sent, determine that stand-by second in described one or more second connection connects;
-connect by described stand-by second, described information to be sent is sent to described first equipment.
According to another aspect of the present invention, provide a kind of device for information transmission, wherein, this device comprises:
-for connecting based on to first of the first equipment, be determined to the one or more second device connected of described first equipment, wherein, on described one or more second connection establishment connects described first;
-for based on information to be sent, determine the stand-by second device connected in described one or more second connection;
-for connecting by described stand-by second, described information to be sent is sent to the device of described first equipment.
The present invention is based on information to be sent, determine that second on connecting based on first connects for sending this information, and by this second connection, this information to be sent is sent to receiver equipment.Compared with prior art, the present invention by dynamically determining that information transmission is carried out in the second connection, thus can reduce the possibility of information occlusion on connecting same first, improves communication efficiency.
Accompanying drawing explanation
By reading the detailed description done non-limiting example done with reference to the following drawings, other features, objects and advantages of the present invention will become more obvious:
Fig. 1 illustrates the flow chart of the method for information transmission of the embodiment according to one aspect of the invention;
Fig. 2 illustrates the schematic diagram of the device for information transmission of embodiment according to a further aspect of the present invention.
In accompanying drawing, same or analogous Reference numeral represents same or analogous parts.
Embodiment
Before in further detail exemplary embodiment being discussed, it should be mentioned that some exemplary embodiments are described as the process or method described as flow chart.Although operations is described as the process of order by flow chart, many operations wherein can be implemented concurrently, concomitantly or simultaneously.In addition, the order of operations can be rearranged.Described process can be terminated when its operations are completed, but can also have the additional step do not comprised in the accompanying drawings.Described process can correspond to method, function, code, subroutine, subprogram etc.
Within a context alleged " computer equipment ", also referred to as " computer ", refer to the intelligent electronic device that can be performed the predetermined process such as numerical computations and/or logical calculated process by operation preset program or instruction, it can comprise processor and memory, the survival instruction that prestores in memory is performed to perform predetermined process process by processor, or perform predetermined process process by the hardware such as ASIC, FPGA, DSP, or combined by said two devices and realize.Computer equipment includes but not limited to server, PC, notebook computer, panel computer, smart mobile phone etc.
Described computer equipment comprises subscriber equipment and the network equipment.Wherein, described subscriber equipment includes but not limited to computer, smart mobile phone, PDA etc.; The described network equipment includes but not limited to the server group that single network server, multiple webserver form or the cloud be made up of a large amount of computer or the webserver based on cloud computing (Cloud Computing), wherein, cloud computing is the one of Distributed Calculation, the super virtual machine be made up of a group loosely-coupled computer collection.Wherein, described computer equipment isolated operation can realize the present invention, also accessible network by realizing the present invention with the interactive operation of other computer equipments in network.Wherein, the network residing for described computer equipment includes but not limited to the Internet, wide area network, metropolitan area network, local area network (LAN), VPN etc.
It should be noted that; described subscriber equipment, the network equipment and network etc. are only citing; other computer equipments that are existing or that may occur from now on or network, as being applicable to the present invention, within also should being included in scope, and are contained in this with way of reference.
Method (some of them are illustrated by flow chart) discussed below can be implemented by hardware, software, firmware, middleware, microcode, hardware description language or its combination in any.When implementing by software, firmware, middleware or microcode, program code or code segment in order to implement necessary task can be stored in machine or computer-readable medium (such as storage medium).(one or more) processor can implement necessary task.
Concrete structure disclosed herein and function detail are only representational, and are the objects for describing exemplary embodiment of the present invention.But the present invention can carry out specific implementation by many replacement forms, and should not be construed as only being limited to the embodiments set forth herein.
Should be understood that, although may have been used term " first ", " second " etc. here to describe unit, these unit should not limit by these terms.These terms are used to be only used to a unit and another unit to distinguish.For example, when not deviating from the scope of exemplary embodiment, first module can be called as second unit, and second unit can be called as first module similarly.Here used term "and/or" comprise one of them or more any and all combinations of listed associated item.
Should be understood that, when a unit is called as " connection " or " coupling " to another unit, it can directly connect or be coupled to another unit described, or can there is temporary location.On the other hand, " when being directly connected " or " directly coupled " to another unit, then there is not temporary location when a unit is called as.Should explain in a comparable manner the relation be used between description unit other words (such as " and be in ... between " compared to " and be directly in ... between ", " with ... contiguous " compared to " and with ... be directly close to " etc.).
Here used term is only used to describe specific embodiment and be not intended to limit exemplary embodiment.Unless context refers else clearly, otherwise singulative used here " ", " one " are also intended to comprise plural number.It is to be further understood that, the existence of the feature that term used here " comprises " and/or " comprising " specifies to state, integer, step, operation, unit and/or assembly, and do not get rid of and there is or add other features one or more, integer, step, operation, unit, assembly and/or its combination.
Also it should be mentioned that and to replace in implementation at some, the function/action mentioned can according to being different from occurring in sequence of indicating in accompanying drawing.For example, depend on involved function/action, in fact the two width figure in succession illustrated can perform simultaneously or sometimes can perform according to contrary order substantially.
Below in conjunction with accompanying drawing, the present invention is described in further detail.
Fig. 1 is the flow chart for the method for information transmission of the embodiment according to one aspect of the invention.
Wherein, the method for the present embodiment both can be realized by subscriber equipment, also can be realized by the network equipment.Described subscriber equipment includes but not limited to PC, panel computer, smart mobile phone, PDA etc.The described network equipment includes but not limited to the server group that single network server, multiple webserver form or the cloud be made up of a large amount of computer or the webserver based on cloud computing (Cloud Computing), wherein, cloud computing is the one of Distributed Calculation, the super virtual machine be made up of a group loosely-coupled computer collection.
It should be noted that, the described network equipment and subscriber equipment are only citing, and other network equipments that are existing or that may occur from now on and subscriber equipment, as being applicable to the present invention, within also should being included in scope, and are contained in this with way of reference.
First, in step s 11, connect based on to first of the first equipment, be determined to described first equipment one or more second connects, wherein, on described one or more second connection establishment connects described first.
Herein, the first equipment means the equipment that can receive information.Such as, when sending information from browser end to server end, the first equipment is server-side devices; When sending information from server end to browser end, the first equipment is browser end equipment.It will be understood by those skilled in the art that herein, the associated description for the first equipment is only exemplary and indefiniteness describes, and there are other various first equipment and does not deviate from spirit of the present invention or category, and being contained in this by reference.It should be noted, the first equipment is except except reception information, also can sending information.
Herein, first connects for the connection to the first equipment.In one embodiment, first connects and can remain valid.Its validity can continue the regular hour, or the agreement can arranged according to communicating pair maintains its validity.Such as, communicating pair can send heartbeat message by folk prescription or both sides and maintain this first validity connected.
In one embodiment, first connects for TCP connects.
Second connects for being based upon the connection on the first connection.Such as, when the first connection connects for TCP, second connects the connection for being based upon on this TCP connection, and such as HTTP connects, or the connection that other any Transmission Control Protocol can be supported.
It will be understood by those skilled in the art that, herein, first connection and the second associated description connected are only exemplary and indefiniteness describes, there are other various first connections and second connect and do not deviate from spirit of the present invention or category, and be contained in this by reference.It should be noted, the first equipment is except except reception information, also can sending information.
Particularly, each is connected to first of the first equipment, one or more the second connection to the first equipment can be set up on this first connection, and safeguard this one or more second list connected.Such as, connect for TCP connects with first, second connects for HTTP connects for example.Can connect and safeguard the list of this one or more HTTP connection by one or more HTTP that set up to this first equipment on this TCP connect.Then when needs send message, this one or more second connection of this first equipment can be determined to based on the first connection and this list.
Then, in step s 12, based on message to be sent, determine that stand-by second in described one or more second connection connects.
Herein, stand-by second connection refers to that will be used for sending this information to be sent second connects.Particularly, determine that stand-by second connects can connecting from described one or more second according to the continuity between the priority of the type of such as information to be sent, information to be sent, multiple information to be sent etc.Such as, can pre-define each second connect send the type of information.Such as, the second connection 1 can be pre-defined for pushed from server end to client, the information also namely initiatively sent.Then for the information to be sent that server end initiatively sends to client, can determine that this second connection 1 is for stand-by second connection.Again such as, each the second priority connected can be pre-defined.For information to be sent, when its priority is higher, then can determines to have second of higher priority and connect for stand-by second connects.Such as, when needing to keep sequencing between multiple information to be sent, can determine that connecting order same second sends the plurality of information to be sent.It will be understood by those skilled in the art that, herein, for based on information to be sent, determine that the stand-by second associated description connected in described one or more second connection is only exemplary and indefiniteness description, there are other various implementations and do not deviate from spirit of the present invention or category, and being contained in this by reference.
In a preferred embodiment, each second state connected in can connecting based on information to be sent and described one or more second, determines that stand-by second in described one or more second connection connects.
Herein, second connect state refer to this second connect various state informations, such as loading information, whether get clogged.Such as, method mentioned above can be utilized, obtain one or more second of this information to be sent that sends based on information to be sent and connect.Then can determine that stand-by second connects based on these second states connected from these second connections.Such as can based on these the second loading information connected, select present load lower second connects as stand-by second connection.Or and for example, blocked state can be in based on current whether the response owing to waiting for the arrival of news of these second connections, select the second connection do not got clogged to connect as stand-by second.
Then, in step s 13, connect by described stand-by second, described information to be sent is sent to described first equipment.Particularly, by this stand-by second connection to this first equipment, this information to be sent is sent to this first equipment by network.Such as, when stand-by second connection connects for HTTP, by this stand-by second connection, information is sent to the first equipment by http protocol.
In a preferred embodiment, information to be sent can be divided into one or more item of information to be sent, and then connect by stand-by second, each item of information to be sent in this one or more item of information to be sent is sent to the first equipment respectively.
Particularly, information to be sent can be divided into a certain size item of information one or more to be sent.It should be noted, item of information to be sent size each other can be identical, also can be different.Further, can adjust the size of item of information to be sent according to actual needs.Then, can connect by stand-by second, respectively each item of information to be sent is sent to the first equipment.Herein, in sending each time, an item of information to be sent can only be sent.Or, in sending each time, also can send several item of information to be sent.Wherein, the quantity of the item of information to be sent that can send in once transmission can be arranged on according to real needs.In one embodiment, when dividing information to be sent, each item of information to be sent can be sorted.Then according to the order of sequence each item of information to be sent can be sent to the first equipment respectively.In another embodiment, the sequencing information of item of information to be sent can be recorded in item of information to be sent.Then each item of information to the first equipment to be sent can be sent according to random order.After the first equipment receives each item of information to be sent, can be resequenced according to wherein recorded sequencing information.
In one embodiment, for each item of information to be sent belonging to same information to be sent, can connect by same stand-by second and send.
In another embodiment, for each item of information to be sent above-mentioned, can connect by multiple stand-by second, it is sent to the first equipment respectively.Such as, can determine that respective stand-by second connects respectively based on each item of information to be sent, then in its stand-by second connecting and send this item of information to be sent respectively separately.Again such as, can determine to comprise one or more stand-by second stand-by second connection pool connected based on each item of information to be sent, then for each item of information to be sent, one stand-by second can be selected from this stand-by second connection pool to connect and send.
It will be understood by those skilled in the art that herein, the associated description sending item of information to be sent is only exemplary and indefiniteness describes, there are other various implementations and do not deviate from spirit of the present invention or category, and being contained in this by reference.
In one embodiment, by each second connection in one or more second connections of the first equipment, the information that described first equipment sends can also be received respectively.Particularly, the first equipment can send information by each second connection above-mentioned.Then correspondingly, second can connect and receive the information that this first equipment sends by each.Such as, when stand-by second connect connect for HTTP time, stand-by second connect the information sent by this first equipment of receives information by http protocol by this.In one embodiment, information according to mode mentioned above, can also be divided into one or more item of information by the first equipment, and according to mode mentioned above, sends each item of information by each second connection above-mentioned.Thus, correspondingly, by each second connection above-mentioned, each item of information that described first equipment sends can be received respectively.
In one embodiment, can by connecting to first of the first equipment, receive information that described first equipment sends to determine the described first validity connected.
Herein, the first validity connected refers to whether the first connection is still in connection status and receives and/or transmission information by this first connection.
Such as, when described first connection connects for TCP, this first equipment can be received by this TCP connection and be connected the information sent by this TCP, to determine the validity that this TCP connects.This information can be common information, or this information also can for such as, for determining the first customizing messages being connected with validity, heartbeat message.In one embodiment, the first equipment first can be connected by this, carrys out timed sending heartbeat message.Correspondingly, then the heartbeat message of this timed sending can be received by this first connection.After receiving this information, this first connection can be determined effectively.Otherwise, when not receiving this information or any other information when a threshold is exceeded, then can think that this first connection is invalid.
In another embodiment, each second connection in connecting to one or more second of the first equipment can also be passed through, receive the information that described first equipment sends, to determine each second connection in this one or more second connection and/or the first validity connected to this first equipment.
Herein, the second validity connected refers to whether the second connection is still in connection status and receives and/or transmission information by this second connection.
Such as, assuming that connect for TCP connects to first of the first equipment, and one or more second of first equipment that arrives connects for HTTP connects, and wherein each HTTP connection establishment is on this TCP connects.Then can receive this first equipment respectively by this one or more HTTP connection and be connected the information sent by this each HTTP, to determine the validity that this each HTTP connects respectively.This information can be common information, or this information also can for such as, for determining the second customizing messages being connected with validity, heartbeat message.In one embodiment, the first equipment second can be connected by each, carrys out timed sending heartbeat message.Correspondingly, then the heartbeat message of the first equipment institute timed sending can be received respectively by each second connection.After receiving this information, can determine to receive this second connection of this information effectively by it.Otherwise, when a threshold is exceeded not by certain second receive this information or any other information time, then can think this second connect invalid.Because the second connection establishment is on the first connection, therefore, when any one determining in this one or more second connection is effective, then this first connection can be determined effectively.
In one embodiment, by connecting to first of the first equipment, can also send information to this first equipment, described information is for determining this first validity connected.Particularly, can by method mentioned above, come to send information by this first connection to this first equipment, this information is for determining this first validity connected.Such as, when this first connection connects for TCP, this information can for the heartbeat message for determining this first validity connected.In one embodiment, periodically can also send information by this first connection to this first equipment, described information is for determining this first validity connected.When the first equipment by this first receive this information after, then can determine this first connect still be in effective status.Otherwise, when the first equipment exceed threshold time do not receive this information or any other information time, then can think this first connect invalid.
In another embodiment, each second connection in connecting to one or more second of the first equipment can also be passed through, send information respectively to this first equipment, this information is for determining each second connection and/or the first validity connected to this first equipment.Particularly, can by method mentioned above, come second to connect by this each and send information respectively to this first equipment, this information is for determining this each the second validity connected and/or the first validity connected to this first equipment.Such as, assuming that connect for TCP connects to first of the first equipment, and one or more second of first equipment that arrives connects for HTTP connects, and wherein each HTTP connection establishment is on this TCP connects.Then can connect to come by this one or more HTTP and send information, for determining the validity that this each HTTP connects respectively to this first equipment.This information can be common information, or this information also can for such as, for determining the second customizing messages being connected with validity, heartbeat message.In one embodiment, second can be connected by each, carry out timed sending heartbeat message.Correspondingly, the first equipment then can receive respectively by each second connection the heartbeat message being timed transmission.After receiving this information, the first equipment can be determined to receive this second connection of this information effectively by it.Otherwise, when a threshold is exceeded not by certain second receive this information or any other information time, then can think this second connect invalid.Because the second connection establishment is on the first connection, therefore, any one determining in this one or more second connection when the first equipment is effective, then the first equipment can determine this first connection effectively.
Fig. 2 is the schematic diagram of the device for information transmission of embodiment according to a further aspect of the present invention.Wherein, this device being used for information transmission comprises for connecting based on to first of the first equipment, is determined to the one or more second device 21 connected of described first equipment, wherein, on described one or more second connection establishment connects described first, hereinafter referred to as the first determining device 21; For based on information to be sent, determine the stand-by second device connected in described one or more second connection, hereinafter referred to as the second determining device 22; For connecting by described stand-by second, described information to be sent is sent to the device 23 of described first equipment, hereinafter referred to as the first dispensing device 23.
Wherein, the method for the present embodiment both can be realized by subscriber equipment, also can be realized by the network equipment.Described subscriber equipment includes but not limited to PC, panel computer, smart mobile phone, PDA etc.The described network equipment includes but not limited to the server group that single network server, multiple webserver form or the cloud be made up of a large amount of computer or the webserver based on cloud computing (Cloud Computing), wherein, cloud computing is the one of Distributed Calculation, the super virtual machine be made up of a group loosely-coupled computer collection.
It should be noted that, the described network equipment and subscriber equipment are only citing, and other network equipments that are existing or that may occur from now on and subscriber equipment, as being applicable to the present invention, within also should being included in scope, and are contained in this with way of reference.
First, the first determining device 21 connects based on to first of the first equipment, and be determined to described first equipment one or more second connects, wherein, on described one or more second connection establishment connects described first.
Herein, the first equipment means the equipment that can receive information.Such as, when sending information from browser end to server end, the first equipment is server-side devices; When sending information from server end to browser end, the first equipment is browser end equipment.It will be understood by those skilled in the art that herein, the associated description for the first equipment is only exemplary and indefiniteness describes, and there are other various first equipment and does not deviate from spirit of the present invention or category, and being contained in this by reference.It should be noted, the first equipment is except except reception information, also can sending information.
Herein, first connects for the connection to the first equipment.In one embodiment, first connects and can remain valid.Its validity can continue the regular hour, or the agreement can arranged according to communicating pair maintains its validity.Such as, communicating pair can send heartbeat message by folk prescription or both sides and maintain this first validity connected.
In one embodiment, first connects for TCP connects.
Second connects for being based upon the connection on the first connection.Such as, when the first connection connects for TCP, second connects the connection for being based upon on this TCP connection, and such as HTTP connects, or the connection that other any Transmission Control Protocol can be supported.
It will be understood by those skilled in the art that, herein, first connection and the second associated description connected are only exemplary and indefiniteness describes, there are other various first connections and second connect and do not deviate from spirit of the present invention or category, and be contained in this by reference.It should be noted, the first equipment is except except reception information, also can sending information.
Particularly, connect to first of the first equipment for each, the first determining device 21 can set up one or more the second connection to the first equipment on this first connection, and safeguards this one or more second list connected.Such as, connect for TCP connects with first, second connects for HTTP connects for example.First determining device 21 can connect and safeguard the list of this one or more HTTP connection by one or more HTTP that set up to this first equipment on this TCP connects.Then when needs send message, the first determining device 21 can be determined to this one or more second connection of this first equipment based on the first connection and this list.
Then, the second determining device 22, based on message to be sent, determines that stand-by second in described one or more second connection connects.
Herein, stand-by second connection refers to that will be used for sending this information to be sent second connects.Particularly, the second determining device 22 determines that stand-by second connects can connecting from described one or more second according to the continuity between the priority of the type of such as information to be sent, information to be sent, multiple information to be sent etc.Such as, the second determining device 22 can pre-define each second connect send the type of information.Such as, the second connection 1 can be pre-defined for pushed from server end to client, the information also namely initiatively sent.Then for the information to be sent that server end initiatively sends to client, the second determining device 22 can determine that this second connection 1 is for stand-by second connection.Again such as, each the second priority connected can be pre-defined.For information to be sent, when its priority is higher, then the second determining device 22 can determine to have the second connection of higher priority for stand-by second connection.Such as, when needing to keep sequencing between multiple information to be sent, the second determining device 22 can determine that connecting order same second sends the plurality of information to be sent.It will be understood by those skilled in the art that herein, the associated description for the second determining device 22 is only exemplary and indefiniteness describes, and there are other various implementations and does not deviate from spirit of the present invention or category, and being contained in this by reference.
In a preferred embodiment, second determining device 22 comprises for the state based on each the second connection in information to be sent and described one or more second connection, determine the stand-by second device connected in described one or more second connection, hereinafter referred to as the 3rd determining device 221 (not shown).
Each second state connected during 3rd determining device 221 can connect based on information to be sent and described one or more second, determines that stand-by second in described one or more second connection connects.
Herein, second connect state refer to this second connect various state informations, such as loading information, whether get clogged.Such as, the 3rd determining device 221 can utilize method mentioned above, obtains one or more second of this information to be sent that sends connect based on information to be sent.Then the 3rd determining device 221 can determine that stand-by second connects based on these second states connected from these second connections.Such as the 3rd determining device 221 can based on these the second loading information connected, and select present load lower second connects as stand-by second connection.Or and for example, the 3rd determining device 221 can be in blocked state based on current whether the response owing to waiting for the arrival of news of these second connections, selects the second connection do not got clogged to connect as stand-by second.
Then, the first dispensing device 23 connects by described stand-by second, and described information to be sent is sent to described first equipment.Particularly, this information to be sent, by this stand-by second connection to this first equipment, is sent to this first equipment by network by the first dispensing device 23.Such as, when stand-by second connection connects for HTTP, information is sent to the first equipment by http protocol by this stand-by second connection by the first dispensing device 23.
In a preferred embodiment, the first dispensing device 23 comprises the device for described information to be sent being divided into one or more item of information to be sent, hereinafter referred to as division device 231 (not shown); And for connecting by described stand-by second, each item of information to be sent in described one or more item of information to be sent is sent to respectively the device of described first equipment, hereinafter referred to as the second dispensing device 232 (not shown).
Divide device 231 and information to be sent can be divided into one or more item of information to be sent, then the second dispensing device 232 connects by stand-by second again, and each item of information to be sent in this one or more item of information to be sent is sent to the first equipment respectively.
Particularly, the item of information one or more to be sent that information to be sent can be divided into a certain size by device 231 is divided.It should be noted, item of information to be sent size each other can be identical, also can be different.Further, divide device 231 can adjust the size of item of information to be sent according to actual needs.Then, the second dispensing device 232 can connect by stand-by second, respectively each item of information to be sent is sent to the first equipment.Herein, in sending each time, the second dispensing device 232 only can send an item of information to be sent.Or in sending each time, the second dispensing device 232 also can send several item of information to be sent.Wherein, the second dispensing device 232 can be arranged on the quantity of the item of information to be sent that can send in once transmission according to real needs.In one embodiment, divide device 231 when dividing information to be sent, each item of information to be sent to be sorted.Then each item of information to be sent can be sent to the first equipment by the second dispensing device 232 according to the order of sequence respectively.In another embodiment, divide device 231 sequencing information of item of information to be sent to be recorded in item of information to be sent.Then the second dispensing device 232 can send each item of information to the first equipment to be sent according to random order.After the first equipment receives each item of information to be sent, can be resequenced according to wherein recorded sequencing information.
In one embodiment, for each item of information to be sent belonging to same information to be sent, the second dispensing device 232 can be sent by same stand-by second connection.
In another embodiment, second dispensing device 232 comprises for connecting by multiple described stand-by second, each item of information to be sent in described one or more item of information to be sent is sent to respectively the device of described first equipment, hereinafter referred to as the 3rd dispensing device 2321 (not shown).
For each item of information to be sent above-mentioned, the 3rd dispensing device 2321 can connect by multiple stand-by second, and it is sent to the first equipment respectively.Such as, based on each item of information to be sent, the second determining device 22 can determine that respective stand-by second connects respectively, and then the 3rd dispensing device 2321 is in its stand-by second connecting and send this item of information to be sent respectively separately.Again such as, second determining device 22 can be determined to comprise one or more stand-by second stand-by second connection pool connected based on each item of information to be sent, then for each item of information to be sent, the 3rd dispensing device 2321 can select stand-by second connection to send from this stand-by second connection pool.
It will be understood by those skilled in the art that herein, the associated description sending item of information to be sent is only exemplary and indefiniteness describes, there are other various implementations and do not deviate from spirit of the present invention or category, and being contained in this by reference.
In one embodiment, the described device for information transmission also comprise for by described one or more second connect in each second connect, receive the device of the information that described first equipment sends respectively, hereinafter referred to as first receiving device 24 (not shown).
First receiving device 24 by each second connection in one or more second connections of the first equipment, can receive the information that described first equipment sends respectively.Particularly, the first equipment can send information by each second connection above-mentioned.Then correspondingly, first receiving device 24 second can be connected and receives the information that the first equipment sends by above-mentioned each.Such as, when stand-by second connect connect for HTTP time, first receiving device 24 stand-by second connects the information sent by this first equipment of receives information by http protocol by this.In one embodiment, information according to mode mentioned above, can also be divided into one or more item of information by the first equipment, and according to mode mentioned above, sends each item of information by each second connection above-mentioned.Thus correspondingly, first receiving device 24 by each second connection above-mentioned, can receive each item of information that described first equipment sends respectively.
In one embodiment, this device being used for information transmission also comprises for connecting by described first, receive information that described first equipment sends to determine the device of the described first validity connected, hereinafter referred to as the second receiving system 25 (not shown).
Second receiving system 25 can by connecting to first of the first equipment, receives information that described first equipment sends to determine the described first validity connected.
Herein, the first validity connected refers to whether the first connection is still in connection status and receives and/or transmission information by this first connection.
Such as, when described first connection connects for TCP, the second receiving system 25 can be received this first equipment by this TCP connection and be connected the information sent by this TCP, to determine the validity that this TCP connects.This information can be common information, or this information also can for such as, for determining the first customizing messages being connected with validity, heartbeat message.In one embodiment, the first equipment first can be connected by this, carrys out timed sending heartbeat message.Correspondingly, then the second receiving system 25 can receive the heartbeat message of this timed sending by this first connection.After the second receiving system 25 receives this information, this first connection can be determined effectively.Otherwise when when a threshold is exceeded, the second receiving system 25 does not receive this information or any other information, then the second receiving system 25 can think that this first connection is invalid.
In another embodiment, this device being used for information transmission also comprise for by described one or more second connect in each second connect, receive information that described first equipment sends with determine described one or more second connect in each second to connect and/or the device of the described first validity connected, hereinafter referred to as the 3rd receiving system 26 (not shown).
3rd receiving system 26 can pass through to each second connection in one or more second connections of the first equipment, receive the information that described first equipment sends, to determine each second connection in this one or more second connection and/or the first validity connected to this first equipment.
Herein, the second validity connected refers to whether the second connection is still in connection status and receives and/or transmission information by this second connection.
Such as, assuming that connect for TCP connects to first of the first equipment, and one or more second of first equipment that arrives connects for HTTP connects, and wherein each HTTP connection establishment is on this TCP connects.Then the 3rd receiving system 26 can be connected by this one or more HTTP and receive this first equipment respectively and connected the information sent by this each HTTP, to determine the validity that this each HTTP connects respectively.This information can be common information, or this information also can for such as, for determining the second customizing messages being connected with validity, heartbeat message.In one embodiment, the first equipment second can be connected by each, carrys out timed sending heartbeat message.Correspondingly, then the 3rd receiving system 26 can receive the heartbeat message of the first equipment institute timed sending respectively by each second connection.After the 3rd receiving system 26 receives this information, the 3rd receiving system 26 can be determined to receive this second connection of this information effectively by it.Otherwise, when a threshold is exceeded the 3rd receiving system 26 not by certain second receive this information or any other information time, then the 3rd receiving system 26 can think this second connect invalid.Because the second connection establishment is on the first connection, therefore, any one determining in this one or more second connection when the 3rd receiving system 26 is effective, then the 3rd receiving system 26 can determine this first connection effectively.
In one embodiment, this device being used for information transmission also comprises for connecting by described first, send information to described first equipment, described information for determining the described first device of validity connected, hereinafter referred to as the 4th dispensing device 27 (not shown).
4th dispensing device 27 by connecting to first of the first equipment, can send information to this first equipment, and described information is for determining this first validity connected.Particularly, the 4th dispensing device 27 can by method mentioned above, and come to send information by this first connection to this first equipment, this information is for determining this first validity connected.Such as, when this first connection connects for TCP, this information can for the heartbeat message for determining this first validity connected.In one embodiment, the 4th dispensing device 27 periodically can also send information by this first connection to this first equipment, and described information is for determining this first validity connected.When the first equipment by this first receive this information after, then can determine this first connect still be in effective status.Otherwise, when the first equipment exceed threshold time do not receive this information or any other information time, then can think this first connect invalid.
In another embodiment, this device being used for information transmission also comprise for by described one or more second connect in each second connect, the device of information is sent respectively to described first equipment, described information for determine each second connect and/or described first connect validity, hereinafter referred to as the 5th dispensing device 28 (not shown).
5th dispensing device 28 by each second connection in one or more second connections of the first equipment, can send information respectively to this first equipment, and this information is for determining each second connection and/or the first validity connected to this first equipment.Particularly, 5th dispensing device 28 can by method mentioned above, come by this each second connect respectively to this first equipment send information, this information for determine this each second connect validity and/or to this first equipment first connect validity.Such as, assuming that connect for TCP connects to first of the first equipment, and one or more second of first equipment that arrives connects for HTTP connects, and wherein each HTTP connection establishment is on this TCP connects.Then the 5th dispensing device 28 can connect to come respectively to this first equipment transmission information, for determining the validity that this each HTTP connects by this one or more HTTP.This information can be common information, or this information also can for such as, for determining the second customizing messages being connected with validity, heartbeat message.In one embodiment, the 5th dispensing device 28 second can be connected by each, carrys out timed sending heartbeat message.Correspondingly, the first equipment then can receive this sent information respectively by each second connection.After receiving this information, the first equipment can be determined to receive this second connection of this information effectively by it.Otherwise, when a threshold is exceeded not by certain second receive this information or any other information time, then can think this second connect invalid.Because the second connection establishment is on the first connection, therefore, any one determining in this one or more second connection when the first equipment is effective, then the first equipment can determine this first connection effectively.
It should be noted that the present invention can be implemented in the assembly of software and/or software restraint, such as, each device of the present invention can adopt application-specific integrated circuit (ASIC) (ASIC) or any other similar hardware device to realize.In one embodiment, software program of the present invention can perform to realize step mentioned above or function by processor.Similarly, software program of the present invention (comprising relevant data structure) can be stored in computer readable recording medium storing program for performing, such as, and RAM memory, magnetic or CD-ROM driver or floppy disc and similar devices.In addition, steps more of the present invention or function can adopt hardware to realize, such as, as coordinating with processor thus performing the circuit of each step or function.
To those skilled in the art, obviously the invention is not restricted to the details of above-mentioned one exemplary embodiment, and when not deviating from spirit of the present invention or essential characteristic, the present invention can be realized in other specific forms.Therefore, no matter from which point, all should embodiment be regarded as exemplary, and be nonrestrictive, scope of the present invention is limited by claims instead of above-mentioned explanation, and all changes be therefore intended in the implication of the equivalency by dropping on claim and scope are included in the present invention.Any Reference numeral in claim should be considered as the claim involved by limiting.In addition, obviously " comprising " one word do not get rid of other unit or step, odd number does not get rid of plural number.Multiple unit of stating in system claims or device also can be realized by software or hardware by a unit or device.First, second word such as grade is used for representing title, and does not represent any specific order.

Claims (16)

1. for a method for information transmission, wherein, the method comprises:
-connect based on to first of the first equipment, be determined to described first equipment one or more second connects, wherein, on described one or more second connection establishment connects described first;
-based on information to be sent, determine that stand-by second in described one or more second connection connects;
-connect by described stand-by second, described information to be sent is sent to described first equipment.
2. method according to claim 1, wherein, described based on information to be sent, determine that the stand-by second step connected in described one or more second connection comprises:
-based on each second state connected in information to be sent and described one or more second connection, determine that stand-by second in described one or more second connection connects.
3. method according to claim 1 and 2, wherein, described by described stand-by second connection, the step that described information to be sent is sent to described first equipment is comprised:
-described information to be sent is divided into one or more item of information to be sent;
-connect by described stand-by second, each item of information to be sent in described one or more item of information to be sent is sent to described first equipment respectively.
4. method according to claim 3, wherein, described by described stand-by second connection, the step that each item of information to be sent in described one or more item of information to be sent is sent to described first equipment is respectively comprised:
-connect by multiple described stand-by second, each item of information to be sent in described one or more item of information to be sent is sent to described first equipment respectively.
5. method according to any one of claim 1 to 4, wherein, described method also comprises:
-by each second connection in described one or more second connection, receive the information that described first equipment sends respectively.
6. method according to any one of claim 1 to 5, wherein, described method also comprises:
-connect by described first, receive information that described first equipment sends to determine the described first validity connected; And/or
-connect by described one or more second in each second to connect, receive information that described first equipment sends with determine described one or more second connect in each second to connect and/or the described first validity connected.
7. method according to any one of claim 1 to 6, wherein, described method also comprises:
-connect by described first, send information to described first equipment, described information is for determining the described first validity connected; And/or
-by each second connection in described one or more second connection, send information respectively to described first equipment, described information is for determining each second connection and/or the described first validity connected.
8. method according to any one of claim 1 to 7, wherein, described first connects for TCP connects.
9. for a device for information transmission, wherein, this device comprises:
-for connecting based on to first of the first equipment, be determined to the one or more second device connected of described first equipment, wherein, on described one or more second connection establishment connects described first;
-for based on information to be sent, determine the stand-by second device connected in described one or more second connection;
-for connecting by described stand-by second, described information to be sent is sent to the device of described first equipment.
10. device according to claim 9, wherein, described for based on information to be sent, determine described one or more second connect in the stand-by second device connected comprise:
-for based on each second state connected in information to be sent and described one or more second connection, determine the stand-by second device connected in described one or more second connection.
11. devices according to claim 9 or 10, wherein, described for connecting by described stand-by second, the device that described information to be sent is sent to described first equipment is comprised:
-for described information to be sent being divided into the device of one or more item of information to be sent;
-for connecting by described stand-by second, each item of information to be sent in described one or more item of information to be sent is sent to respectively the device of described first equipment.
12. devices according to claim 11, wherein, described for connecting by described stand-by second, the device that each item of information to be sent in described one or more item of information to be sent is sent to described first equipment is respectively comprised:
-for connecting by multiple described stand-by second, each item of information to be sent in described one or more item of information to be sent is sent to respectively the device of described first equipment.
13. devices according to any one of claim 9 to 12, wherein, described device also comprises:
-for by each second connection in described one or more second connection, receive the device of the information that described first equipment sends respectively.
14. devices according to any one of claim 9 to 13, wherein, described device also comprises:
-for connecting by described first, receive information that described first equipment sends to determine the device of the described first validity connected; And/or
-second to connect for each in connecting by described one or more second, receive information that described first equipment sends with determine described one or more second connect in each second to connect and/or the device of the described first validity connected.
15. devices according to any one of claim 9 to 14, wherein, described device also comprises:
-for connecting by described first, send information to described first equipment, described information is for determining the device of the described first validity connected; And/or
-for by each second connection in described one or more second connection, send the device of information respectively to described first equipment, described information is for determining each second connection and/or the described first validity connected.
16. devices according to any one of claim 9 to 15, wherein, described first connects for TCP connection.
CN201510218949.3A 2015-04-30 2015-04-30 Method and apparatus for information transmission Active CN104967655B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510218949.3A CN104967655B (en) 2015-04-30 2015-04-30 Method and apparatus for information transmission

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510218949.3A CN104967655B (en) 2015-04-30 2015-04-30 Method and apparatus for information transmission

Publications (2)

Publication Number Publication Date
CN104967655A true CN104967655A (en) 2015-10-07
CN104967655B CN104967655B (en) 2019-05-07

Family

ID=54221596

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510218949.3A Active CN104967655B (en) 2015-04-30 2015-04-30 Method and apparatus for information transmission

Country Status (1)

Country Link
CN (1) CN104967655B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101079840A (en) * 2007-02-12 2007-11-28 腾讯科技(深圳)有限公司 A data transmission system and method
CN101510854A (en) * 2009-03-31 2009-08-19 杭州华三通信技术有限公司 Method, system and equipment for sharing business load
CN102244608A (en) * 2011-06-09 2011-11-16 杭州米加科技有限公司 Streaming media content priority-adaptation transmission method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101079840A (en) * 2007-02-12 2007-11-28 腾讯科技(深圳)有限公司 A data transmission system and method
CN101510854A (en) * 2009-03-31 2009-08-19 杭州华三通信技术有限公司 Method, system and equipment for sharing business load
CN102244608A (en) * 2011-06-09 2011-11-16 杭州米加科技有限公司 Streaming media content priority-adaptation transmission method

Also Published As

Publication number Publication date
CN104967655B (en) 2019-05-07

Similar Documents

Publication Publication Date Title
CN103561049A (en) Method for processing terminal scheduling request, system thereof and device thereof
CN102469033A (en) Message subscription system and message sending method
CN103516744A (en) A data processing method, an application server and an application server cluster
CN103795569A (en) Server connection method and device based on connection pool
CN103647870A (en) Terminal and terminal expression display method
JP7127996B2 (en) Data transmission/reception method and system
CN104935612A (en) Data processing method and server
CN103037000B (en) Publish-subscribe system and notification message processing method thereof
CN105245442A (en) Method, device and system for transmitting instant messaging IM message
CN110582998A (en) Group communication method and device, computer storage medium and computer equipment
CN107968848B (en) A kind of method, terminal device and storage medium obtaining IP address
CN102685209B (en) A kind of method of assisting users equipment transmitting/receiving instance message, device and equipment
CN104298565A (en) Method and device for initializing ports
CN107342929B (en) Method, device and system for sending new message notification
US10740161B2 (en) Broadcast message sending method and apparatus, and mobile terminal
CN105430028A (en) Service calling method, service providing method, and node
CN104580095A (en) API resource acquisition method and device
CN103299298A (en) Service processing method and system
CN102882906A (en) Method and device of data communication in constrained application protocol
KR101272077B1 (en) System and method for providing push service
CN109257806B (en) Carrier aggregation mode setting method for communication terminal, communication terminal and medium
CN109219070A (en) Supplementary service configuration method, device and electronic equipment
CN104967655A (en) Method used for information transmission and device used for information transmission
CN103746843A (en) Method and equipment for processing RPC (Remote Procedure Call Protocol) command
CN107888677B (en) Communication implementation method, control terminal, intelligent device 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
GR01 Patent grant
GR01 Patent grant