CN104967655B - Method and apparatus for information transmission - Google Patents
Method and apparatus for information transmission Download PDFInfo
- Publication number
- CN104967655B CN104967655B CN201510218949.3A CN201510218949A CN104967655B CN 104967655 B CN104967655 B CN 104967655B CN 201510218949 A CN201510218949 A CN 201510218949A CN 104967655 B CN104967655 B CN 104967655B
- Authority
- CN
- China
- Prior art keywords
- connection
- information
- sent
- 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.)
- Active
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
- H04L67/1004—Server selection for load balancing
- H04L67/101—Server selection for load balancing based on network conditions
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/104—Peer-to-peer [P2P] networks
- H04L67/1044—Group management mechanisms
- H04L67/1046—Joining mechanisms
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols 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 kind of method and apparatus for information transmission.Wherein, method includes the following steps: based on the first connection to the first equipment, determine that the one or more second to first equipment connects, wherein one or more of second connections are established on first connection;Based on information to be sent, stand-by second connection in one or more of second connections is determined;By stand-by second connection, the information to be sent is sent to first equipment.Compared with prior art, the present invention can carry out information transmission by being dynamically determined the second connection on same first connection, so that a possibility that reducing information occlusion, improves communication efficiency.
Description
Technical field
The present invention relates to internet area more particularly to a kind of method and apparatus for information transmission.
Background technique
In the prior art, work as between communicating pair, such as browser and server the messaging in a manner of connection-oriented
When firstly the need of connection (such as HTTP connection) is established, then by the connection (such as HTTP connection) progress message transmission.So
And work as communicating pair, such as when the message that needs to transmit between browser and server is more, since it passes through the same HTTP
To be communicated, message is easy to be blocked for connection.For example, the push disappears when server is needed to browser PUSH message
Breath may can not reach browser in time by being blocked by other message so that content information updating not in time, user
It experiences poor.Although multiple HTTP connections can be established between browser and server simultaneously, it is based on the prior art, then is needed
Multiple TCP connections are established simultaneously, this will cause to bear for system resource and Internet resources.Therefore, as why not to system resource
Or Internet resources cause big influence, reducing communication blocking and improving communication efficiency is a problem to be solved.
Summary of the invention
The object of the present invention is to provide a kind of method and apparatus of information transmission.
According to an aspect of the present invention, a kind of method for information transmission is provided, wherein this method includes following step
It is rapid:
Based on the first connection to the first equipment, determine that the one or more second to first equipment connects,
In, one or more of second connections are established on first connection;
It is based on information to be sent, determines stand-by second connection in one or more of second connections;
By stand-by second connection, the information to be sent is sent to first equipment.
According to another aspect of the present invention, a kind of device for information transmission is provided, wherein the device includes:
For determining that the one or more second to first equipment is connected based on the first connection to the first equipment
Device, wherein it is one or more of second connection establish it is described first connection on;
For being based on information to be sent, the device of stand-by second connection in one or more of second connections is determined;
For by stand-by second connection, the information to be sent to be sent to the device of first equipment.
The present invention is based on information to be sent, to determine based on the second connection on the first connection for sending the information,
And the information to be sent is sent to by receiver equipment by second connection.Compared with prior art, the present invention is same
Information transmission can be carried out by being dynamically determined the second connection on a first connection, to reduce the possibility of information occlusion
Property, improve communication efficiency.
Detailed description of the invention
By reading a detailed description of non-restrictive embodiments in the light of the attached drawings below, of the invention other
Feature, objects and advantages will become more apparent upon:
Fig. 1 shows the flow chart of the method for information transmission of the embodiment of one aspect according to the present invention;
Fig. 2 shows the schematic diagrames of the device for information transmission of embodiment according to a further aspect of the present invention.
The same or similar appended drawing reference represents the same or similar component in attached drawing.
Specific embodiment
It should be mentioned that some exemplary embodiments are described as before exemplary embodiment is discussed in greater detail
The processing or method described as flow chart.Although operations are described as the processing of sequence by flow chart, therein to be permitted
Multioperation can be implemented concurrently, concomitantly or simultaneously.In addition, the sequence of operations can be rearranged.When it
The processing can be terminated when operation completion, it is also possible to have the additional step being not included in attached drawing.The processing
It can correspond to method, function, regulation, subroutine, subprogram etc..
Alleged " computer equipment " within a context, also referred to as " computer ", referring to can be by running preset program or referring to
Enable to execute numerical value and calculate and/or the intelligent electronic device of the predetermined process process such as logic calculation, may include processor with
Memory executes the survival prestored in memory instruction by processor to execute predetermined process process, or by ASIC,
The hardware such as FPGA, DSP execute predetermined process process, or are realized by said two devices combination.Computer equipment includes but unlimited
In server, PC, laptop, tablet computer, smart phone etc..
The computer equipment includes user equipment and the network equipment.Wherein, the user equipment includes but is not limited to electricity
Brain, smart phone, PDA etc.;The network equipment includes but is not limited to that single network server, multiple network servers form
Server group or the cloud consisting of a large number of computers or network servers for being based on cloud computing (Cloud Computing), wherein
Cloud computing is one kind of distributed computing, a super virtual computer consisting of a loosely coupled set of computers.Its
In, the computer equipment can isolated operation realize the present invention, also can access network and by with other calculating in network
The present invention is realized in the interactive operation of machine equipment.Wherein, network locating for the computer equipment include but is not limited to internet,
Wide area network, Metropolitan Area Network (MAN), local area network, VPN network etc..
It should be noted that the user equipment, the network equipment and network etc. are only for example, other are existing or from now on may be used
The computer equipment or network that can occur such as are applicable to the present invention, should also be included within the scope of protection of the present invention, and to draw
It is incorporated herein with mode.
Method (some of them are illustrated by process) discussed hereafter can be by hardware, software, firmware, centre
Part, microcode, hardware description language or any combination thereof are implemented.Implement when with software, firmware, middleware or microcode
When, program code or code segment to implement necessary task can be stored in machine or computer-readable medium and (for example deposit
Storage media) in.Necessary task can be implemented in (one or more) processor.
Specific structure and function details disclosed herein are only representative, and are for describing the present invention show
The purpose of example property embodiment.But the present invention can be implemented by many alternative forms, and be not interpreted as
It is limited only by the embodiments set forth herein.
Although it should be understood that may have been used term " first ", " second " etc. herein to describe each unit,
But these units should not be limited by these terms.The use of these items is only for by a unit and another unit
It distinguishes.For example, without departing substantially from the range of exemplary embodiment, it is single that first unit can be referred to as second
Member, and similarly second unit can be referred to as first unit.Term "and/or" used herein above include one of them or
Any and all combinations of more listed associated items.
It should be understood that when a unit referred to as " connects " or when " coupled " to another unit, can directly connect
Another unit is connect or be coupled to, or may exist temporary location.In contrast, " directly connect when a unit is referred to as
Connect " or " direct-coupling " to another unit when, then temporary location is not present.It should explain in a comparable manner and be used to retouch
State the relationship between unit other words (such as " between being in ... " compared to " between being directly in ... ", " and with ... it is adjacent
Closely " compared to " with ... be directly adjacent to " etc.).
Term used herein above is not intended to limit exemplary embodiment just for the sake of description specific embodiment.Unless
Context clearly refers else, otherwise singular used herein above "one", " one " also attempt to include plural number.Also answer
When understanding, term " includes " and/or "comprising" used herein above provide stated feature, integer, step, operation,
The presence of unit and/or component, and do not preclude the presence or addition of other one or more features, integer, step, operation, unit,
Component and/or combination thereof.
It should further be mentioned that the function action being previously mentioned can be attached according to being different from some replace implementations
The sequence indicated in figure occurs.For example, related function action is depended on, the two width figures shown in succession actually may be used
Substantially simultaneously to execute or can execute in a reverse order sometimes.
Present invention is further described in detail with reference to the accompanying drawing.
Fig. 1 is the flow chart for the method for information transmission according to the embodiment of one aspect of the invention.
Wherein, the method for the present embodiment can both be realized by user equipment, can also be realized by the network equipment.
The user equipment includes but is not limited to PC machine, tablet computer, smart phone, PDA etc..The network equipment includes but is not limited to
Single network server, the server group of multiple network servers composition or based on cloud computing (Cloud Computing) by
The cloud that a large number of computers or network servers is constituted, wherein cloud computing is one kind of distributed computing, by a group loose couplings
One super virtual computer of computer set composition.
It should be noted that the network equipment and user equipment are only for example, other are existing or are likely to occur from now on
The network equipment and user equipment be such as applicable to the present invention, should also be included within the scope of protection of the present invention, and with reference side
Formula is incorporated herein.
Firstly, in step s 11, based on the first connection to the first equipment, determine to one of first equipment or
Multiple second connections, wherein one or more of second connections are established on first connection.
Herein, the first equipment means to can receive the equipment of information.For example, believing when being sent from browser end to server end
When breath, the first equipment is server-side devices;When sending information to browser end from server end, the first equipment is browser
End equipment.It will be understood by those skilled in the art that herein, the associated description of the first equipment is merely illustrative and non-limiting is retouched
It states, there are other various first equipment to be incorporated herein without departing from spirit or scope of the invention, and by reference.It should infuse
Meaning, the first equipment can also send information in addition to it can receive information.
Herein, it first is connected as to the connection of the first equipment.In one embodiment, the first connection can keep effective.
Its validity can continue the regular hour, or its validity can be maintained according to the agreement that communicating pair is arranged.For example,
Communicating pair can send heartbeat message by folk prescription or both sides to maintain the validity of first connection.
In one embodiment, first it is connected as TCP connection.
Second is connected as establishing the connection on the first connection.For example, second connects when first is connected as TCP connection
It is connected in the connection established on the TCP connection, such as the connection that HTTP connection or other any Transmission Control Protocol can be supported.
It will be understood by those skilled in the art that herein, it is merely illustrative for the associated description of the first connection and the second connection
Property and non-limiting description, there are other various first connections and the second connection without departing from spirit or scope of the invention,
And it is incorporated herein by reference.It should be noted that the first equipment in addition to it can receive information, can also send information.
Specifically, for each the first connection to the first equipment, one or more can be established on first connection
A the second connection to the first equipment, and safeguard the list of the one or more second connection.For example, being connected as TCP with first
Connection, second is connected as HTTP connection.It can be established on the TCP connection to the one or more of first equipment
HTTP is connected and is safeguarded the list of one or more HTTP connection.It, can be based on the first connection then when needing to send message
And the list determines that the one or more second to first equipment connects.
Then, in step s 12, it is based on message to be sent, determines stand-by the in one or more of second connections
Two connections.
Herein, stand-by second connection, which refers to, will be used to send the second connection of the information to be sent.It specifically, can be according to example
The type of information such as to be sent, the priority of information to be sent, the continuity between multiple information to be sent are come from described one
Stand-by second connection is determined in a or multiple second connections.For example, can pre-define each second connects transmitted information
Type.For example, the second connection 1 can be pre-defined for being pushed from server end to client namely the letter of active transmission
Breath.Then for server end actively to information to be sent transmitted by client, it may be determined that second connection 1 connects for stand-by second
It connects.In another example the priority of each second connection can be pre-defined.For information to be sent, when its priority is higher, then
It can determine that second with higher priority is connected as stand-by second connection.For example, needing to protect when between multiple information to be sent
When holding sequencing, it can determine and sequentially send multiple information to be sent in same second connection.Those skilled in the art
Member is it should be understood that herein, for being based on information to be sent, determine stand-by second connection in one or more of second connections
Associated description is merely illustrative and non-limiting description, and there are other various implementations without departing from spirit or model of the invention
Farmland, and be incorporated herein by reference.
It in a preferred embodiment, can be based on each in information to be sent and one or more of second connections
The state of a second connection determines stand-by second connection in one or more of second connections.
Herein, whether the state of the second connection refers to the various status informations of second connection, such as loading information, hindered
Plug etc..For example, can use method as discussed above, one or more is obtained based on information to be sent, and that this can be transmitted is to be sent
Second connection of information.Then it can determine that stand-by second connects in the second connection based on the state that the grade second connects to wait from this
It connects.Such as the loading information that can be connected based on this etc. second, to select present load lower second to be connected to stand-by the
Two connections.Or for another example, whether due to waiting for the arrival of news response blocked state can be in based on grade second connection is current, to select
Second not be blocked is connected to stand-by second connection.
Then, in step s 13, the information to be sent can be sent to described the by stand-by second connection
One equipment.Specifically, the information to be sent can be sent to by network by stand-by second connection to first equipment
First equipment.For example, when stand-by second is connected as HTTP connection stand-by second connection can be passed through by http protocol
Send information to the first equipment.
In a preferred embodiment, information to be sent can be divided into one or more items of information to be sent, then
It connects again by stand-by second, each item of information to be sent in one or more item of information to be sent is respectively sent to the
One equipment.
Specifically, information to be sent can be divided into a certain size one or more item of information to be sent.It should be noted that
, the size between item of information to be sent may be the same or different.And it is possible to treat according to actual needs
Information item size is sent to be adjusted.Then, it can connect by stand-by second, respectively send each item of information to be sent
To the first equipment.Herein, in sending each time, an item of information to be sent can only be sent.Alternatively, being sent each time
In, several items of information to be sent can also be sent.Wherein it is possible to be arranged according to specific requirements transmissible in primary send
The quantity of item of information to be sent.In one embodiment, it pending can deliver letters when being divided to information to be sent by each
Cease item sequence.Then each item of information to be sent sequentially can be respectively sent to the first equipment.In another embodiment, may be used
The sequencing information of item of information to be sent to be recorded in item of information to be sent.Can then proceed in random order send it is each to
Item of information is sent to the first equipment.It, can be according to the row recorded in it after the first equipment receives each item of information to be sent
Sequence information is resequenced.
It in one embodiment, can be by same for belonging to each item of information to be sent of the same information to be sent
One stand-by second connection is sent.
In another embodiment, for above-mentioned each item of information to be sent, can be come by multiple stand-by second connections
It is respectively sent to the first equipment.For example, can determine respective stand-by second respectively based on each item of information to be sent
Then connection sends the item of information to be sent in its respective stand-by second connection respectively.In another example can based on it is each to
Item of information is sent to determine stand-by second connection pool including one or more stand-by second connections, then for each to be sent
Item of information can select stand-by second connection to be sent from stand-by second connection pool.
It will be understood by those skilled in the art that herein, the associated description for sending item of information to be sent be merely illustrative and
Non-limiting description, there are other various implementations to wrap without departing from spirit or scope of the invention, and by reference
Contained in this.
In one embodiment, can also be connected by each second in the connection of one or more second to the first equipment
It connects, receives information transmitted by first equipment respectively.Specifically, the first equipment can by it is above-mentioned it is each second connection come
Send information.Then correspondingly, information transmitted by first equipment can be received by each second connection.For example, when to
When being connected as HTTP connection with second, information can be received by first equipment by stand-by second connection by http protocol
Transmitted information.In one embodiment, information can also be divided into one in above-described manner by the first equipment
Or multiple items of information, and in above-described manner, each item of information is sent by above-mentioned each second connection.To,
Correspondingly, each item of information transmitted by first equipment can be received by above-mentioned each second connection respectively.
In one embodiment, it can be received transmitted by first equipment by the first connection to the first equipment
Information is with the validity of determination first connection.
Herein, first connection validity refer to the first connection whether still in connection status and can by this first connect come
Receive and/or send information.
For example, can receive first equipment by the TCP connection when described first is connected as TCP connection and pass through
Information transmitted by the TCP connection, to determine the validity of the TCP connection.The information can be common information or the letter
Breath may be the specific information for determining the first connection validity, such as heartbeat message.In one embodiment, it first sets
It is standby first to be connected by this, to regularly send heartbeat message.It correspondingly, then can be fixed to receive this by first connection
When the heartbeat message that sends.After receiving the information, it can determine that first connection is effective.Conversely, between when a threshold is exceeded
When not receiving the information or any other information, it may be considered that first connection is invalid.
In another embodiment, each second in the connection of one or more second to the first equipment can also be passed through
Connection receives information transmitted by first equipment, to determine each second connection in the one or more second connection
And/or the validity of the first connection to first equipment.
Herein, second connection validity refer to the second connection whether still in connection status and can by this second connect come
Receive and/or send information.
For example it is assumed that TCP connection is connected as to the first of the first equipment, and the one or more second for first equipment that arrives connects
It is connected in HTTP connection, wherein each HTTP connection is established on the TCP connection.It can then be connected by one or more HTTP
It fetches and receives first equipment information transmitted by each HTTP connection respectively, to determine each HTTP connection respectively
Validity.The information can may be the spy for determining the second connection validity for common information or the information
Determine information, such as heartbeat message.In one embodiment, the first equipment can be connected by each second, to regularly send the heart
Hop-information.Correspondingly, then the heartbeat message that the first equipment is regularly sent can be received by each second connection respectively.When
After receiving the information, it can determine that second connection for receiving the information by it is effective.Conversely, between when a threshold is exceeded
By some second receive the information or any other information when, it may be considered that this second connection in vain.Due to
Second connection is built on the first connection, therefore, when determined in one or more second connection any one is effective,
It can then determine that first connection is effective.
In one embodiment, information, institute can also be sent to first equipment by the first connection to the first equipment
Information is stated for determining the validity of first connection.It specifically, can be by method as discussed above, first to be connected by this
It connects to first equipment and sends information, which is used to determine the validity of first connection.For example, when this first is connected as
When TCP connection, which can be the heartbeat message for determining the validity of first connection.In one embodiment, also
Can periodically by this first connect to first equipment send information, the information be used for determine this first connection it is effective
Property.When the first equipment by this first receive the information after, then can determine this first connect still in effective status.
Conversely, when the first equipment is more than that threshold time does not receive the information or any other information, it may be considered that first company
It is invalid to connect.
In another embodiment, each second in the connection of one or more second to the first equipment can also be passed through
Connection sends information to first equipment respectively, which is used to determine each second connection and/or to the of first equipment
The validity of one connection.Specifically, can by method as discussed above, by each second connection respectively to this first
Equipment sends information, which is used to determine the validity of each second connection and/or the first connection to first equipment
Validity.For example it is assumed that TCP connection is connected as to the first of the first equipment, and the one or more second for first equipment that arrives
It is connected as HTTP connection, wherein each HTTP connection is established on the TCP connection.One or more HTTP can then be passed through
Connection to send information to first equipment respectively, for determining the validity of each HTTP connection.The information can be
Common information or the information may be the specific information for determining the second connection validity, such as heartbeat message.?
In one embodiment, it can be connected by each second, to regularly send heartbeat message.Correspondingly, the first equipment can then divide
The heartbeat message for being timed transmission is not received by each second connection.After receiving the information, the first equipment can be true
Surely second connection for receiving the information by it is effective.Conversely, second not connect by some between when a threshold is exceeded
When receiving the information or any other information, it may be considered that second connection is invalid.Since the second connection builds on the first company
On connecing, therefore, when the first equipment determined the one or more second connection in any one effectively, then the first equipment can
To determine that first connection is effective.
Fig. 2 is the schematic diagram according to the device for information transmission of the embodiment of another aspect of the invention.Wherein, should
Device for information transmission include for determining to one of first equipment based on the first connection to the first equipment or
The device 21 of multiple second connections, wherein one or more of second connections are established on first connection, simple below
Claim the first determining device 21;For being based on information to be sent, determine that stand-by second in one or more of second connections connects
The device connect, hereinafter referred to as the second determining device 22;For by stand-by second connection, the information to be sent to be sent
To the device 23 of first equipment, hereinafter referred to as the first sending device 23.
Wherein, the method for the present embodiment can both be realized by user equipment, can also be realized by the network equipment.
The user equipment includes but is not limited to PC machine, tablet computer, smart phone, PDA etc..The network equipment includes but is not limited to
Single network server, the server group of multiple network servers composition or based on cloud computing (Cloud Computing) by
The cloud that a large number of computers or network servers is constituted, wherein cloud computing is one kind of distributed computing, by a group loose couplings
One super virtual computer of computer set composition.
It should be noted that the network equipment and user equipment are only for example, other are existing or are likely to occur from now on
The network equipment and user equipment be such as applicable to the present invention, should also be included within the scope of protection of the present invention, and with reference side
Formula is incorporated herein.
Firstly, the first determining device 21 is determined based on the first connection to the first equipment to one of first equipment
Or multiple second connections, wherein one or more of second connections are established on first connection.
Herein, the first equipment means to can receive the equipment of information.For example, believing when being sent from browser end to server end
When breath, the first equipment is server-side devices;When sending information to browser end from server end, the first equipment is browser
End equipment.It will be understood by those skilled in the art that herein, the associated description of the first equipment is merely illustrative and non-limiting is retouched
It states, there are other various first equipment to be incorporated herein without departing from spirit or scope of the invention, and by reference.It should infuse
Meaning, the first equipment can also send information in addition to it can receive information.
Herein, it first is connected as to the connection of the first equipment.In one embodiment, the first connection can keep effective.
Its validity can continue the regular hour, or its validity can be maintained according to the agreement that communicating pair is arranged.For example,
Communicating pair can send heartbeat message by folk prescription or both sides to maintain the validity of first connection.
In one embodiment, first it is connected as TCP connection.
Second is connected as establishing the connection on the first connection.For example, second connects when first is connected as TCP connection
It is connected in the connection established on the TCP connection, such as the connection that HTTP connection or other any Transmission Control Protocol can be supported.
It will be understood by those skilled in the art that herein, it is merely illustrative for the associated description of the first connection and the second connection
Property and non-limiting description, there are other various first connections and the second connection without departing from spirit or scope of the invention,
And it is incorporated herein by reference.It should be noted that the first equipment in addition to it can receive information, can also send information.
Specifically, for each the first connection to the first equipment, the first determining device 21 can be in first connection
It is upper to establish one or more the second connections to the first equipment, and safeguard the list of the one or more second connection.For example, with
First is connected as TCP connection, and second is connected as HTTP connection.First determining device 21 can be built on the TCP connection
It stands to one or more HTTP of first equipment and connects and safeguard the list of one or more HTTP connection.Then when needing to send out
When sending message, the first determining device 21 can be determined based on the first connection and the list to this or more of first equipment
A second connection.
Then, the second determining device 22 is based on message to be sent, determines stand-by in one or more of second connections
Second connection.
Herein, stand-by second connection, which refers to, will be used to send the second connection of the information to be sent.Specifically, second dress is determined
Setting 22 can be according to continuous between the type, the priority of information to be sent, multiple information to be sent of information for example to be sent
Property etc. come from it is one or more of second connection in determine it is stand-by second connection.For example, the second determining device 22 can be preparatory
Define each second type for connecting transmitted information.For example, the second connection 1 can be pre-defined for from server end to visitor
Family end is pushed namely the information of active transmission.Then for server end actively to information to be sent transmitted by client, the
Two determining devices 22 can determine second connection 1 for stand-by second connection.In another example each second connection can be pre-defined
Priority.For information to be sent, when its priority is higher, then the second determining device 22 be can determine with higher priority
Second is connected as stand-by second connection.For example, second determines dress when needing to keep sequencing between multiple information to be sent
Set 22 can determine it is same second connection on sequentially send multiple information to be sent.It will be understood by those skilled in the art that
Herein, the associated description of the second determining device 22 is merely illustrative and non-limiting description, there are other various realization sides
Formula is incorporated herein without departing from spirit or scope of the invention, and by reference.
It in a preferred embodiment, include for based on information to be sent and one in the second determining device 22
Or the state of each second connection in multiple second connections, determine that stand-by second in one or more of second connections connects
The device connect, hereinafter referred to as 221 (not shown) of third determining device.
Third determining device 221 can be based on each the in information to be sent and one or more of second connections
The state of two connections determines stand-by second connection in one or more of second connections.
Herein, whether the state of the second connection refers to the various status informations of second connection, such as loading information, hindered
Plug etc..For example, third determining device 221 can use method as discussed above, one or more is obtained based on information to be sent
A the second connection that the information to be sent can be transmitted.Then third determining device 221 can state based on equal second connection come
Stand-by second connection is determined from equal second connection.Such as the load that third determining device 221 can be connected based on this etc. second
Information is measured, to select present load lower second to be connected to stand-by second connection.Or for another example, third determining device 221 can
It is current whether due to waiting for the arrival of news response and in blocked state based on the grade second connection, to select second not be blocked to connect
It connects as stand-by second connection.
Then, the information to be sent can be sent to described by the first sending device 23 by stand-by second connection
First equipment.Specifically, the first sending device 23 pending can be delivered letters this by stand-by second connection to first equipment
Breath is sent to first equipment by network.For example, the first sending device 23 can lead to when stand-by second is connected as HTTP connection
Http protocol is crossed to send information to the first equipment by stand-by second connection.
It in a preferred embodiment, include for the information to be sent to be divided into one in the first sending device 23
Or the device of multiple items of information to be sent, hereinafter referred to as 231 (not shown) of dividing device;And for passing through described stand-by second
Connection, is respectively sent to first equipment for each item of information to be sent in one or more of items of information to be sent
Device, 232 (not shown) of hereinafter referred to as the second sending device.
Information to be sent can be divided into one or more items of information to be sent by dividing device 231, then second be sent
Device 232 is connected by stand-by second again, and each item of information to be sent in one or more item of information to be sent is distinguished
It is sent to the first equipment.
Specifically, the one or more that information to be sent can be divided into a certain size by dividing device 231 pending is delivered letters
Cease item.It should be noted that the size between item of information to be sent may be the same or different.Also, dividing device
231 can the size according to actual needs to item of information to be sent be adjusted.Then, the second sending device 232 can pass through
Stand-by second connection, is sent to the first equipment for each item of information to be sent respectively.Herein, in sending each time, the second hair
Send device 232 that can only send an item of information to be sent.Alternatively, the second sending device 232 can also be in sending each time
Send several items of information to be sent.Wherein, can be arranged according to specific requirements can in primary send for the second sending device 232
The quantity of the item of information to be sent sent.In one embodiment, dividing device 231 can be divided to information to be sent
When, each item of information to be sent is sorted.Then the second sending device 232 can sequentially send out each item of information to be sent respectively
It send to the first equipment.In another embodiment, dividing device 231 sequencing information of item of information to be sent can be recorded in
It sends in item of information.Then the second sending device 232 can send each item of information to be sent in any order and set to first
It is standby.After the first equipment receives each item of information to be sent, it can be resequenced according to the sequencing information recorded in it.
In one embodiment, for belonging to each item of information to be sent of the same information to be sent, second sends dress
Setting 232 can be sent by same stand-by second connection.
It in another embodiment, include being connected for passing through multiple described stand-by second in the second sending device 232, it will
Each item of information to be sent in one or more of items of information to be sent is respectively sent to the device of first equipment, with
Lower 2321 (not shown) of abbreviation third sending device.
For above-mentioned each item of information to be sent, third sending device 2321 can be come by multiple stand-by second connections
It is respectively sent to the first equipment.For example, the second determining device 22 can be determined respectively based on each item of information to be sent
Respective stand-by second connection, then it is pending to send this in its respective stand-by second connection respectively for third sending device 2321
Send item of information.In another example the second determining device 22 can be determined based on each item of information to be sent including one or more to
With stand-by second connection pool of the second connection, then for each item of information to be sent, third sending device 2321 can be waited for from this
It is sent with stand-by second connection is selected in the second connection pool.
It will be understood by those skilled in the art that herein, the associated description for sending item of information to be sent be merely illustrative and
Non-limiting description, there are other various implementations to wrap without departing from spirit or scope of the invention, and by reference
Contained in this.
In one embodiment, the device for information transmission further includes for by one or more of second
Each second connection in connection, receives the device of information transmitted by first equipment, hereinafter referred to as first receives respectively
24 (not shown) of device.
First receiving device 24 can be connected by each second in the connection of one or more second to the first equipment,
Information transmitted by first equipment is received respectively.Specifically, the first equipment can be sent out by above-mentioned each second connection
It delivers letters breath.Then correspondingly, first receiving device 24 can be received transmitted by the first equipment by above-mentioned each second connection
Information.For example, first receiving device 24 can be by http protocol come stand-by by this when stand-by second is connected as HTTP connection
Information is received information transmitted by first equipment by the second connection.In one embodiment, the first equipment can also be according to upper
Information is divided into one or more items of information by mode described in text, and in above-described manner, passes through above-mentioned each
Two connections are to send each item of information.To which correspondingly, first receiving device 24 can be divided by above-mentioned each second connection
Each item of information transmitted by first equipment is not received.
In one embodiment, which further includes receiving institute for connecting by described first
Information transmitted by the first equipment is stated with the device of the validity of determination first connection, hereinafter referred to as the second reception device 25
(not shown).
Second reception device 25 can receive letter transmitted by first equipment by the first connection to the first equipment
Breath is with the validity of determination first connection.
Herein, first connection validity refer to the first connection whether still in connection status and can by this first connect come
Receive and/or send information.
For example, the second reception device 25 can be received by the TCP connection when described first is connected as TCP connection
First equipment is by information transmitted by the TCP connection, to determine the validity of the TCP connection.The information can be common
Information or the information may be specific information for determining the first connection validity, such as heartbeat message.At one
In embodiment, the first equipment first can be connected by this, to regularly send heartbeat message.Correspondingly, then the second reception device
25 can receive the heartbeat message regularly sent by first connection.When the second reception device 25 receives the information
Afterwards, it can determine that first connection is effective.Conversely, the second reception device 25 does not receive the information or appoints between when a threshold is exceeded
When what other information, then the second reception device 25 is it is considered that first connection is invalid.
In another embodiment, which further includes for by one or more of second
Each second connection in connection receives information transmitted by first equipment with one or more of second connections of determination
In each second connection and/or first connection validity device, hereinafter referred to as third reception device 26 (do not show
Out).
Third reception device 26 can be connected by each second in the connection of one or more second to the first equipment,
Receive information transmitted by first equipment, with determine one or more second connection in it is each second connect and/or
To the validity of the first connection of first equipment.
Herein, second connection validity refer to the second connection whether still in connection status and can by this second connect come
Receive and/or send information.
For example it is assumed that TCP connection is connected as to the first of the first equipment, and the one or more second for first equipment that arrives connects
It is connected in HTTP connection, wherein each HTTP connection is established on the TCP connection.Then third reception device 26 can by this one
A or multiple HTTP connections pass through the transmitted information of each HTTP connection to receive first equipment respectively, to determine respectively
The validity of each HTTP connection.The information can may be for determining second for common information or the information
Connect the specific information of validity, such as heartbeat message.In one embodiment, the first equipment can connect by each second
It connects, to regularly send heartbeat message.Correspondingly, then third reception device 26 can receive the by each second connection respectively
The heartbeat message that one equipment is regularly sent.After third reception device 26 receives the information, third reception device 26 can be with
Determine that second connection for receiving the information by it is effective.Conversely, third reception device 26 is not led between when a threshold is exceeded
Some is crossed second when receiving the information or any other information, then third reception device 26 is it is considered that second connection
In vain.Since the second connection is built on the first connection, when third reception device 26 has determined the one or more the
Any one in two connections is effective, then third reception device 26 can determine that first connection is effective.
In one embodiment, which further includes the Xiang Suoshu for connecting by described first
First equipment sends information, and the information is used to determine the device of the validity of first connection, and the hereinafter referred to as the 4th sends
27 (not shown) of device.
4th sending device 27 can send information to first equipment by the first connection to the first equipment, described
Information is used to determine the validity of first connection.Specifically, the 4th sending device 27 can be come by method as discussed above
By this first connect to first equipment send information, the information be used for determine this first connection validity.For example, when should
First when being connected as TCP connection, which can be the heartbeat message for determining the validity of first connection.In a reality
Apply in example, the 4th sending device 27 can also periodically by this first connect to first equipment send information, the information
For determining the validity of first connection.When the first equipment by this first receive the information after, then can determine
First connection is still in effective status.Conversely, when the first equipment be more than threshold time do not receive the information or any other
When information, it may be considered that first connection is invalid.
In another embodiment, which further includes for by one or more of second
Each second connection in connection, sends the device of information, the information is for determining each the to first equipment respectively
The validity of two connections and/or first connection, 28 (not shown) of hereinafter referred to as the 5th sending device.
5th sending device 28 can be connected by each second in the connection of one or more second to the first equipment,
Information is sent to first equipment respectively, which is used to determine each second connection and/or the first company to first equipment
The validity connect.Specifically, the 5th sending device 28 can pass through each second connection point by method as discussed above
Information is not sent to first equipment, which is used to determine validity of each second connection and/or to first equipment
First connection validity.For example it is assumed that TCP connection is connected as to the first of the first equipment, and one of first equipment that arrives
Or multiple second be connected as HTTP connection, wherein each HTTP connection is established on the TCP connection.Then the 5th sending device 28
Information can be sent to first equipment respectively by one or more HTTP connection, for determining that each HTTP connects
The validity connect.The information can may be for determining the second connection validity for common information or the information
Specific information, such as heartbeat message.In one embodiment, the 5th sending device 28 can be connected by each second, to determine
When send heartbeat message.Correspondingly, the first equipment then can receive the transmitted information by each second connection respectively.
After receiving the information, the first equipment can determine that second connection for receiving the information by it is effective.Conversely, when super
It crosses threshold time and does not pass through some second when receiving the information or any other information, it may be considered that second connection
In vain.Since the second connection is built on the first connection, when the first equipment has determined that the one or more second connects
In any one effectively, then the first equipment can determine that first connection is effective.
It should be noted that the present invention can be carried out in the assembly of software and/or software and hardware, for example, this hair
Specific integrated circuit (ASIC) can be used in bright each device or any other is realized similar to hardware device.In one embodiment
In, software program of the invention can be executed to implement the above steps or functions by processor.Similarly, of the invention
Software program (including relevant data structure) can be stored in computer readable recording medium, for example, RAM memory,
Magnetic or optical driver or floppy disc and similar devices.In addition, some of the steps or functions of the present invention may be implemented in hardware, example
Such as, as the circuit cooperated with processor thereby executing each step or function.
It is obvious to a person skilled in the art that invention is not limited to the details of the above exemplary embodiments, Er Qie
In the case where without departing substantially from spirit or essential attributes of the invention, the present invention can be realized in other specific forms.Therefore, no matter
From the point of view of which point, the present embodiments are to be considered as illustrative and not restrictive, and the scope of the present invention is by appended power
Benefit requires rather than above description limits, it is intended that all by what is fallen within the meaning and scope of the equivalent elements of the claims
Variation is included in the present invention.Any reference signs in the claims should not be construed as limiting the involved claims.This
Outside, it is clear that one word of " comprising " does not exclude other units or steps, and odd number is not excluded for plural number.That states in system claims is multiple
Unit or device can also be implemented through software or hardware by a unit or device.The first, the second equal words are used to table
Show title, and does not indicate any particular order.
Claims (14)
1. a kind of method for information transmission, wherein this method comprises:
Based on the first connection to the first equipment, determine that the one or more second to first equipment connects, wherein institute
The second connection of one or more is stated to establish on first connection and supported by first connection;
Be based on information to be sent, determine it is one or more of second connection in it is stand-by second connection, including based on to
The state for sending each second connection in information and one or more of second connections, determines one or more of the
Stand-by second connection in two connections;
By stand-by second connection, the information to be sent is sent to first equipment.
2. it is described by stand-by second connection according to the method described in claim 1, wherein, by the information to be sent
The step of being sent to first equipment include:
The information to be sent is divided into one or more items of information to be sent;
By stand-by second connection, by each item of information to be sent in one or more of items of information to be sent point
It is not sent to first equipment.
3. it is described by stand-by second connection according to the method described in claim 2, wherein, it will be one or more of
The step of each item of information to be sent in item of information to be sent is respectively sent to first equipment include:
By multiple stand-by second connections, by each information to be sent in one or more of items of information to be sent
Item is respectively sent to first equipment.
4. according to the method described in claim 1, wherein, the method also includes:
By each second connection in one or more of second connections, received transmitted by first equipment respectively
Information.
5. method according to claim 1 to 4, wherein the method also includes:
It is connected by described first, receives information transmitted by first equipment with the validity of determination first connection;
And/or
By each second connection in one or more of second connections, information transmitted by first equipment is received
With the validity of each second connection and/or first connection in one or more of second connections of determination.
6. method according to claim 1 to 4, wherein the method also includes:
It is connected by described first, the first equipment of Xiang Suoshu sends information, and the information is used to determine having for first connection
Effect property;And/or
By each second connection in one or more of second connections, information, institute are sent to first equipment respectively
Information is stated for determining the validity of each second connection and/or first connection.
7. method according to claim 1 to 4, wherein described first is connected as TCP connection.
8. a kind of device for information transmission, wherein the device includes:
For determining the dress that the one or more second to first equipment connects based on the first connection to the first equipment
It sets, wherein one or more of second connections are established on first connection and supported by first connection;
For determining the device of stand-by second connection in one or more of second connections based on information to be sent, wherein
Including determining institute for the state based on each second connection in information to be sent and one or more of second connections
State the device of stand-by second connection in the second connection of one or more;
For by stand-by second connection, the information to be sent to be sent to the device of first equipment.
9. device according to claim 8, wherein it is described for being connected by described stand-by second, it will be described to be sent
The device that information is sent to first equipment includes:
For the information to be sent to be divided into the device of one or more items of information to be sent;
For being connected by described stand-by second, by each information to be sent in one or more of items of information to be sent
Item is respectively sent to the device of first equipment.
10. device according to claim 9, wherein it is described for by stand-by second connection, by one or
The device that each item of information to be sent in multiple items of information to be sent is respectively sent to first equipment includes:
It, will be each to be sent in one or more of items of information to be sent for being connected by multiple described stand-by second
Item of information is respectively sent to the device of first equipment.
11. device according to claim 8, wherein described device further include:
For receiving first equipment respectively and being sent out by each second connection in one or more of second connections
The device for the information sent.
12. the device according to any one of claim 8 to 11, wherein described device further include:
For connecting by described first, the having with determination first connection of information transmitted by first equipment is received
The device of effect property;And/or
For receiving transmitted by first equipment by each second connection in one or more of second connections
Information is with the dress of the validity of each second connection and/or first connection in one or more of second connections of determination
It sets.
13. the device according to any one of claim 8 to 11, wherein described device further include:
For connecting by described first, the first equipment of Xiang Suoshu sends information, and the information is for determining first connection
Validity device;And/or
For sending believe to first equipment respectively by each second connection in one or more of second connections
The device of breath, the information are used to determine the validity of each second connection and/or first connection.
14. the device according to any one of claim 8 to 11, wherein described first is connected as TCP connection.
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 CN104967655A (en) | 2015-10-07 |
CN104967655B true 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)
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 |
-
2015
- 2015-04-30 CN CN201510218949.3A patent/CN104967655B/en active Active
Patent Citations (3)
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 |
---|---|
CN104967655A (en) | 2015-10-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103208077B (en) | A kind of collaborative booking method and equipment, system | |
US20160335684A1 (en) | Methods, devices, and systems for sending and receiving virtual goods | |
CN107197015A (en) | A kind of message treatment method and device based on Message Queuing system | |
CN103404181B (en) | Cancel method, system, gateway and the server redirected | |
CN109218341B (en) | Load balancing method and device for monitoring server and server | |
US20190068728A1 (en) | Systems, apparatuses, and methods for intelligent network communication and engagement | |
CN104283765B (en) | A kind of message display method, device and terminal device | |
CN105303410B (en) | Virtual article sharing method and device | |
US20210185002A1 (en) | Watermark-based message queue | |
CN107247629A (en) | Cloud computing system and cloud computing method and device for controlling server | |
CN107968848B (en) | A kind of method, terminal device and storage medium obtaining IP address | |
CN105978938A (en) | Service processing equipment service status determining method and scheduling equipment | |
CN103425504A (en) | Method and device for loading video files | |
CN102932791A (en) | Method for collaboratively processing information through WIFI wireless network between smart phone and computer | |
CN104376056B (en) | A kind of method and apparatus of data processing | |
CN109818710A (en) | A kind of data transmission method and corresponding intrument | |
CN104967655B (en) | Method and apparatus for information transmission | |
CN104184762B (en) | A kind of server failure information feedback method and system | |
CN110290139B (en) | Message transmission method and device | |
CN104753938B (en) | A kind of information processing method and electronic equipment | |
CN107580033B (en) | Load information processing method and device, message processing method and device, and server | |
CN109298956A (en) | Document transmission method, device and terminal device | |
US20140351134A1 (en) | Registration process | |
US8751564B2 (en) | Reducing latency for served applications by anticipatory preprocessing | |
WO2019005189A1 (en) | System, method, and computer program for securely transmitting and presenting payment card data in a web client |
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 |