CN104104647B - Maintain bus connection method - Google Patents
Maintain bus connection method Download PDFInfo
- Publication number
- CN104104647B CN104104647B CN201310112126.3A CN201310112126A CN104104647B CN 104104647 B CN104104647 B CN 104104647B CN 201310112126 A CN201310112126 A CN 201310112126A CN 104104647 B CN104104647 B CN 104104647B
- Authority
- CN
- China
- Prior art keywords
- server
- test packets
- sent
- response
- time
- 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.)
- Expired - Fee Related
Links
- 238000000034 method Methods 0.000 title claims abstract description 38
- 238000012360 testing method Methods 0.000 claims abstract description 175
- 238000009434 installation Methods 0.000 claims abstract description 88
- 230000004044 response Effects 0.000 claims abstract description 64
- 238000012423 maintenance Methods 0.000 claims abstract description 32
- 230000005540 biological transmission Effects 0.000 claims description 12
- 230000005611 electricity Effects 0.000 claims description 3
- 238000013461 design Methods 0.000 abstract description 6
- 101000746134 Homo sapiens DNA endonuclease RBBP8 Proteins 0.000 description 8
- 101000969031 Homo sapiens Nuclear protein 1 Proteins 0.000 description 8
- 102100021133 Nuclear protein 1 Human genes 0.000 description 8
- 238000010586 diagram Methods 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 238000004891 communication Methods 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 230000005059 dormancy Effects 0.000 description 1
- 238000007667 floating Methods 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
Abstract
The present invention provides a kind of maintenance bus connection method, for maintaining the connection state between electronic installation and server.This method comprises the following steps:(a)N-th test packets are sent to server, n-th test packets require that server responds electronic installation again after N section interval times are waited;(b)Judge whether to receive the response that server sends n-th test packets;(c)If so, then repeat step(a);If it is not, it is cycle time then to calculate from 1 test packets of N to the reception server response institute's elapsed time is sent;And(d)After the electronic installation switches to a standby/park mode, sent according to cycle time and maintain package to server, the connection state between maintenance and server.By the design of the present invention, electronic installation is allowed to maintain the connection state between server in the case of reducing resource cost.
Description
Technical field
The present invention relates to one kind to maintain bus connection method, is applied to more particularly to a kind of between electronic installation and server
Maintain bus connection method.
Background technology
General user will be by carrying out line each other between computer and remote server, it is necessary to is set by network and correlation
It is standby(Such as router or Wireless Router etc.)Set up wiring path.Conventional computer is using fixed IP, even if computer and clothes
Line interrupts between business device, and server can find the computer of corresponding line by each independent fixed ip address;So
And in modern computer mostly using floating(Virtually)In the state of IP, once computer does not send package extremely more than certain time
Server, the router in wiring path may be shut down computer used COM1 so that server can not be sought
IP address used in computer must be corresponded to, will so cause line between computer and server to interrupt.Now must by with
Family end computer actively re-establishes line with server, could recover previous connection state.Therefore, it is in certain in computer
Under a little AD HOCs(Such as dormancy or standby mode)If thinking, line, computer must periodically send envelope between the two for maintenance
Wrap to server.
If it is excessively frequent that aforementioned computer sends package, the unnecessary consuming of computer resource can be caused;And if send
The packet interval time too long, can cause the line between server to interrupt again.In addition, the connecting lines between computer and server
Footpath generally requires to form by multiple router lines, and the setting time of each router communication close port simultaneously differs,
Therefore how to determine that computer sends the preferable interval time of package, actually the problem of a worth research.
The content of the invention
In view of this, the main object of the present invention is to provide a kind of maintenance being applied between electronic installation and server and connected
Line method, easily cause what the line between server interrupted to solve electronic installation existing for prior art because being idle for too long
Technical problem.
To reach above-mentioned purpose, maintenance bus connection method of the invention is used to maintain the company between electronic installation and server
Wire state.This method comprises the following steps:(a)Send n-th test packets to server, n-th test packets and require service
Device responds electronic installation again after N section interval times are waited, and wherein N is positive integer;(b)Judge whether to receive server to
The response that n times test packets are sent;(c)If so, then repeat step(a);The N-1 times test envelope is sent certainly if it is not, then calculating
Bag to the reception server response institute's elapsed time is cycle time;And(d)When electronic installation switches to standby/park mode
Afterwards, sent according to cycle time and maintain package to server, the connection state between maintenance and server.
In another embodiment of the invention, maintenance bus connection method of the invention comprises the following steps:(a)Send n-th
For test packets to server, n-th test packets require that server responds electronic installation again after N section interval times are waited, its
Middle N is positive integer;(b)Judge whether to receive the response that server sends n-th test packets;(c)If receive clothes
The response that n-th test packets are sent of business device, then repeat step(a);If server is not received to n-th test packets
The response sent, then the N-1 times test packets is sent repeatedly and judges whether that receiving server tests all the N-1 times
Package sends response;(d)If receiving response of the server to all the N-1 times test packets sent repeatedly, calculate
It it is cycle time from the N-1 times test packets to the reception server response institute's elapsed time is sent;If server pair is not received
The response of all the N-1 times test packets sent repeatedly, then calculate from the N-2 times test packets is sent to the reception server sound
It is cycle time to answer institute's elapsed time;And(e)After electronic installation switches to standby/park mode, sent out according to cycle time
Send and maintain package to server, the connection state between maintenance and server.
By the design of the present invention, electronic installation can be found out cycle, a side are sent to the more suitable package of server
Face can be maintained in the connection state between the electronic installation and server under standby/park mode, avoid line from interrupting;It is another
Aspect then elongates package and sends the cycle as far as possible in the state of being allowed to, to reduce the consuming of electronic installation own resources.
Brief description of the drawings
Fig. 1 is the schematic diagram that each electronic installation of the present invention and server pass through network connectivity;
Fig. 2 is the system block diagram of the electronic installation of the present invention;
Fig. 3 is the flow chart of the maintenance bus connection method first embodiment of the present invention;
Fig. 4 is the flow chart of the maintenance bus connection method second embodiment of the present invention.
Reference
10a:First electronic installation 10b:Second electronic device
11:System module 12:Transport module
13:Test module 20:Server
30:Network 31:Internet
32:LAN A, B, C, D, E, F:Router
P1、P2:Wiring path
Embodiment
To will appreciate that the technology contents of the present invention, it is described as follows especially exemplified by preferred embodiment is gone out.
In one embodiment of this invention, electronic installation can be computer installation, portable electronic devices or other possess
Electronic installation of network connectivity function etc., and server is then general server main frame or the similar dress that can provide server capability
Put, but the present invention is not limited.
Refer to Fig. 1 is the schematic diagram that each electronic installation of the present invention and server 20 pass through the line of network 30.Such as Fig. 1 institutes
Showing, the first electronic installation 10a and second electronic device 10b carry out line by network 30 and server 20, and in the ring of network 30
Border includes multiple routers(router)A~F so that the first electronic installation 10a and second electronic device 10b is according to where it
Position, the wiring path formed respectively by different routers between server 20.For example, the first electronic installation
10a can link to server 20 via router A, D, F in internet 31, and it forms wiring path P1;And the second electronics fills
Server 20 can be linked to via router B, C in LAN 32 and router E, F in internet 31 by putting 10b, its structure
Into different wiring path P2.
It refer to the system block diagram that Fig. 2 is the first electronic installation 10a or second electronic device 10b of the present invention.Such as Fig. 2
Shown, the first electronic installation 10a of the invention or second electronic device 10b may include system module 11, transport module 12 and survey
Die trial block 13.During system module 11 can be at least one or its combination of hardware, software and firmware, such as system module 11 can be
Central Processing Unit, or the integration etc. of CPU and device internal operating system, but the present invention is not limited.System mould
Block 11 can switch the first electronic installation 10a or second electronic device 10b and enter general operation mould according to the instruction or setting of user
Formula or standby/park mode etc., and perform operations instruction;And under standby/park mode, system module 11 can continue to produce
A raw maintenance package is simultaneously sent to server, the connection state between maintenance and server by transport module 12.Transmit mould
Block 12 is then to send the package that package responds to server or received from server, and transport module 12 can be single network herein
Process chip or its combination with transmission port.
Test module 13 is to produce different test packets, to be sent by transport module 12 to server;And test
Whether module 13 carries out judgement processing according to response of the server to each test packets, with dynamically determine it is foregoing maintenance package compared with
The good transmission cycle.In one embodiment of this invention, test module 13 can be an application program, but its can also combine hardware or
Firmware performs identical function, is not limited with the present embodiment.And foregoing test packets can be user's Apple talk Data Stream Protocol Apple Ta(user
datagram protocol,UDP)Package.
It is noted that for needing by network access device(Access Point, AP)Link to the electricity of router
For sub-device, electronic installation in addition to maintaining the connection state with those routers, electronic installation additionally need maintenance with
Connection state between network access device, to avoid network from interrupting.Network access device can irregularly send package and give it
The electronic installation of line, and electronic installation then relies on the network card of itself(Example transport module 12 as the aforementioned)Driver
And firmware carrys out alignment processing those packages, network access device is responded to, to maintain the company between electronic installation and network access device
Line.On the premise of electronic installation and network access device line, electronic installation could send foregoing test packets, through those routes
Device is to server.Due to maintaining the technology of line between electronic installation and network access device to belong to prior art, do not add herein
Repeat.
The flow chart that Fig. 3 is the maintenance bus connection method first embodiment of the present invention is refer to below.It is it is noted that following
Though coordinating the first electronic installation 10a shown in Fig. 1 and Fig. 2 and its with illustrating the present invention's exemplified by the wiring path P1 of server 20
Bus connection method is maintained, but it is of the invention not to be limited suitable for this, should be according to the structure composed of electronic installation or itself and server
20 wiring path is different and is varied from.As shown in figure 3, the maintenance bus connection method of the present invention includes step S301 to step
S304.It will be detailed below each step of this method.
Step S301:Send a n-th test packets to server 20, wherein n-th test packets and require server 20
Respond electronic installation again after N section interval times are waited, and N is positive integer.
When the first electronic installation 10a is still under general operation pattern, test module 13 can be sent by transport module 12
Multiple test packets are once arrived to server 20, wherein the 1st test packets may require that server 20 in wait 1 it is intersegmental every when
Between after, then transmit and the first electronic installation 10a responded to the 1st test packets;Interval time is test module 13 herein
Default value or the time value by user's sets itself, it can be several seconds to tens of seconds.When the first electronic installation 10a sends the
During 2 test packets, the 2nd test packets may require that server 20 in 2 sections of interval times of wait(That is interval time * 2)Afterwards, then
Transmit and the first electronic installation 10a is responded to the 2nd test packets;Afterwards to the n-th test packets that are sent then with this
Analogize, it is desirable to which server 20 responds the first electronic installation 10a again after N section interval times are waited, and N is positive integer herein.
As an example it is assumed that the interval time set is 5 second, then the 1st test that the first electronic installation 10a is sent is sealed
Bag may require that server 20 after package is connected to, and wait 5 seconds intervals to send the response package to the 1st test packets again;If the
The 2nd test packets that one electronic installation 10a is sent, then require server 20 after package is connected to, and waits 10 seconds(The 5 of i.e. 2 sections
Second is spaced)The response package to the 2nd test packets is sent again, by that analogy.
Step S302:Judge whether to receive the response that server 20 sends n-th test packets.
In theory in the state of the first electronic installation 10a and server 20 keep line, server 20 can be to the first electricity
Sub-device 10a package responds;If the first electronic installation 10a interrupts with the line of server 20, server 20 is sent
Response package will be unable to smoothly be sent to the first electronic installation 10a.Therefore, when the first electronic installation 10a test module 13
After sending n-th test packets to server 20, test module 13 can judge whether to receive service for this test packets
The response that device 20 is sent to this test packets, to determine that it continues executing with step.
In one embodiment of this invention, test module 13 is by judging whether the time that waiting for server 20 responds exceedes
One package turnaround time plus the N section interval times corresponding to this test packets summation, as judging whether to receive clothes
The standard for the response that business device 20 is sent to n-th test packets, but the present invention is not limited.Herein so-called package back and forth when
Between, after sending a package to server 20 from the first electronic installation 10a, what the reception server 20 responded to package immediately
Total time;Namely in the state of failing to give notice server 20 and waiting, the first electronic installation 10a is from package is sent to obtaining to the envelope
The total time back and forth of the response of bag.And this package turnaround time adds the total of the N section interval times corresponding to this test packets
Be this test packets in theory from sending afterwards to the total time for receiving the response to this test packets.
If test module 13 receives the response that server 20 is sent to this test packets, represent that server 20 is waiting
After the N section interval times corresponding to this test packets, line can be still maintained between the first electronic installation 10a and server 20
Path is not interrupted, therefore is contemplated that the interval time for being further added by waiting, and the cycle is sent to find out the package of optimal holding line.
Now test module 13 will be returned to step S301, carry out the transmission of test packets next time.
Step S303:It is one week to calculate from the N-1 times test packets to the response institute's elapsed time of the reception server 20 is sent
Time phase.
If test module 13 fails to receive the response that server 20 sends n-th test packets, server is represented
20 after the N section interval times corresponding to this test packets are waited, the line between the first electronic installation 10a and server 20
It may interrupt, therefore consider backtracking to a preceding test packets(That is the N-1 times test packets), calculate from the first electronic installation
10a sends the N-1 times test packets to the reception server 20 and responds institute's elapsed time, and as a cycle time.Wherein
In the state of N=1, if the response that server is sent to the 1st test packets is not received, with general state
The foregoing package turnaround time is cycle time.
Step S304:After electronic installation switches to standby/park mode, sent according to cycle time and maintain package to clothes
Business device 20, to maintain the connection state between server 20.
After cycle time is determined, test module 13 can notify system module 11;And when the first electronic installation 10a is switched to
After standby/park mode, system module 11 can continue and regularly send to maintain package to server 20 to come with this cycle time
Keep the connection state between server 20.
The first embodiment that an embodiment illustrates how the maintenance bus connection method using the present invention is enumerated below.The table of table 1
Each router A~F shown in Figure 1 closes the stand-by period assumption value of its COM1;Table 2 then represents the first electronic installation 10a
Bus connection method first embodiment and the result of the progress connection state test of server 20 are maintained using the present invention.
Table 1
Router | A | B | C | D | E | F |
Stand-by period(Second) | 50 | 60 | 90 | 32 | 40 | 70 |
Table 2(First electronic installation 10a)
As shown in table 1, each router A~F can set the stand-by period for closing its COM1.When router originally just
In the COM1 used, there is not package yet after more than the set stand-by period by the way that it is logical that router can close this automatically
Letter port obtains the COM1 so that other device lines use to terminate script use state.Due to each router A~
F label and specifications design difference so that each router A~F has the different stand-by period;And under actual state simultaneously
Can not definitely it learn each router A~F stand-by period, therefore those stand-by period are assumption value, not to be limited shown in table 1.
As shown in table 2, in this embodiment, the first electronic installation 10a is connected via wiring path P1 and server 20
Line, it is assumed that every section of interval time is 5 seconds, and because the foregoing package turnaround time it is generally very of short duration, in the present embodiment for
Convenient explanation, and assume that the package turnaround time is 0 second, therefore n-th test packets are sent to reception from the first electronic installation 10a
Server 20 responds package institute's elapsed time, is substantially equal to the N section interval times corresponding to n-th test packets, but this hair
It is bright to be not limited.
Please also refer to Fig. 1, Fig. 2, table 1 and table 2.When the maintenance bus connection method of the first electronic installation 10a application present invention
During first embodiment, the first electronic installation 10a first can send the 1st test packets to server 20, this 1st test packets
It is required that after server 20 waits 5 second interval time, response package is retransmited to the first electronic installation 10a;Due to its interval time
Less than the stand-by period of each router A, D, F in wiring path P1, namely represent that server 20 can smoothly send the 1st test envelope
The response package of bag is to the first electronic installation 10a so that the first electronic installation 10a is able to continue to send next test packets.And
Though the 2nd~6 test packets subsequently sent add up 5 second interval time one by one, until 6 corresponding to the 6th test packets
Section interval time(That is 30 second interval time)Again smaller than each router A, D, F stand-by period, represent that server 20 can smoothly be sent out
Each response packages of the 2nd~6 test packets is sent to the first electronic installation 10a.
Then, when the first electronic installation 10a sends the 7th test packets to server 20, the 7th test packets requirement
35 second interval time that server 20 waits has been more than 30 second stand-by period of router D in wiring path P1;So that server
20 send the response packages of the 7th test packets to during the first electronic installation 10a, because router D links to route
Device A COM1s, which have been closed, causes line to interrupt, and can not smoothly be sent to the first electronic installation 10a.First electronic installation
10a test module 13 learns this after judging not receiving server 20 for the response package transmitted by the 7th test packets
35 second interval time is long, therefore test module 13 understands backtracking to the state of previous 6th test packets, to send the 6th time certainly
Test packets to the reception server 20 responds institute's elapsed time(It is 30 seconds in the present embodiment)For cycle time.Afterwards when first
After electronic installation 10a switches to standby/park mode, system module 11 is to send in the cycle to maintain package to server i.e. with 30 seconds
20, so as to maintaining the connection state between the first electronic installation 10a and server 20.
It refer to the flow chart that Fig. 4 is the maintenance bus connection method second embodiment of the present invention.Though it is noted that match somebody with somebody below
Close the electronic installation 10b shown in Fig. 1 and Fig. 2 and its maintenance line with illustrating the present invention exemplified by the wiring path P2 of server 20
Method, but it is of the invention not to be limited suitable for this, should be according to the structure composed or its line with server 20 of electronic installation
Path is different and is varied from.As shown in figure 4, the maintenance bus connection method second embodiment of the present invention includes step S401 to step
S406, wherein step S401, S402 are identical with step S301, S302 of aforementioned first embodiment, will not repeat.Below will
Describe the newly-increased each step of this method in detail.
Step S401:Send a n-th test packets to server 20, wherein n-th test packets and require server 20
Respond electronic installation 10b again after N section interval times are waited, and N is positive integer.
Step S402:Judge whether to receive the response that server 20 sends n-th test packets.
If test module 13 receives the response that server 20 is sent to this test packets, now test module 13 will
Step S401 is returned to, carries out the transmission of test packets next time.
Step S403:The N-1 times test packets is sent repeatedly to server 20.
If test module 13 fails to receive the response that server 20 sends n-th test packets, server is represented
20 after the N section interval times corresponding to this test packets are waited, the line between second electronic device 10b and server 20
It may interrupt, therefore consider backtracking to a preceding test packets(That is the N-1 times test packets).And it is to avoid from transmission N-
Institute's elapsed time that 1 test packets to server responds the package may be comparable to stand-by period of certain router, the company of causing
Line state labile, now only voucher time test possibly can not reflect present situation;Therefore test module 13 can be sent multiple repeatedly
The N-1 times test packets is to the reception server 20.In the present embodiment, test module 13 can be sent at least 3 times the N-1 times repeatedly
Test packets to server 20, its number needs and adjusted with design.
Step S404:Judge whether to receive the response that server 20 sends all the N-1 times test packets.
After test module 13 sends the N-1 times test packets to the reception server 20 repeatedly, determine whether to receive clothes
The response that business device 20 is sent to all the N-1 times test packets.If test module 13 confirms the N-1 times test sent every time
Package can receive response, then carry out step S405;If test module 13 confirms the N-1 times test packets not sent every time
Response can be received, then carries out step S406.
Step S405:It is one week to calculate from the N-1 times test packets to the response institute's elapsed time of the reception server 20 is sent
Time phase.
If test module 13 receives response of the server 20 to all multiple the N-1 times test packets sent, represent
Server 20 sends the N-1 times test packets to the response institute's elapsed time of the reception server 20 from second electronic device 10b should be small
In the stand-by period of each router, i.e., line is stable under this state, therefore calculates and sent the N-1 times from the first electronic installation 10a
Test packets to the reception server 20 responds institute's elapsed time, and as cycle time.
Step S406:Calculate it is previous from send the N-2 time test packets to receive the server respond institute's elapsed time
For a cycle time.
If test module 13 fails to receive response of the server 20 to all the N-1 times test packets sent, represent
N-1 section interval times corresponding to the N-1 times test packets may be close with the stand-by period of certain router;At network transmission
In the state of reason has postponed, when the time error caused by it can be more than the wait of certain router plus N-1 section interval times
Between, the line between second electronic device 10b and server 20 will be caused to interrupt, connection state is also relatively unstable.Therefore survey
Die trial block 13 considers backtracking again to a more preceding test packets(That is the N-2 times test packets), calculate from second electronic device 10b
Send the N-2 times test packets to the reception server 20 and respond institute's elapsed time, and as cycle time.
Also include step S407 after step S405 or step S406:After electronic installation switches to standby/park mode,
Sent according to cycle time and maintain package to server 20, to maintain the connection state between server 20.
After cycle time is determined, test module 13 can notify system module 11, be treated when second electronic device 10b is switched to
After machine/park mode, it can continue and regularly send with the cycle time that step S405 or step S406 are calculated to maintain package
To server 20, to keep the connection state between server 20.
The second embodiment that another embodiment illustrates how the maintenance bus connection method using the present invention is enumerated below.Table 3
Represent that the maintenance bus connection method second embodiment of the second electronic device 10b application present invention carries out connection state survey with server 20
The result of examination.
Table 3(Second electronic device 10b)
As shown in table 3, in this embodiment, second electronic device 10b is connected via wiring path P2 and server 20
Line, it is assumed that every section of interval time is 5 seconds, and because the foregoing package turnaround time it is generally very of short duration, in the present embodiment for
Convenient explanation, and assume that the package turnaround time is 0 second, therefore n-th test packets are sent to reception from second electronic device 10b
Server 20 responds package institute's elapsed time, is substantially equal to the N section interval times corresponding to n-th test packets, but this hair
It is bright to be not limited.
Please also refer to Fig. 1, Fig. 2, table 1 and table 3.When the maintenance bus connection method of the second electronic device 10b application present invention
During first embodiment, second electronic device 10b first can send the 1st test packets to server 20, this 1st test packets
It is required that after server 20 waits 5 second interval time, response package is retransmited to second electronic device 10b;Due to its interval time
Less than the stand-by period of each router B, C, E, F in wiring path P1, namely represent that server 20 can smoothly send the 1st test
The response package of package is to second electronic device 10b so that second electronic device 10b is able to continue to send next test packets.
Though the 2nd~7 test packets that then supervention is sent add up 5 second interval time one by one, until corresponding to the 7th test packets
7 sections of interval times(That is 35 second interval time)Again smaller than each router B, C, E, F stand-by period, represent that server 20 can be smooth
Each response packages of the 2nd~7 test packets is sent to second electronic device 10b.
Then, when second electronic device 10b sends the 8th test packets to server 20, the 8th test packets requirement
40 second interval time that server 20 waits is approximately equal to 40 second stand-by period of router E in wiring path P2.When server 20
The response packages of the 8th test packets is sent to during second electronic device 10b, if network state is stable, then still may be used
The transmission of response package can be completed before router E COM1 is closed, now second electronic device 10b can proceed with the
The transmission of 9 test packets;Transmission delay is caused if network state is unstable, router E COM1 may first quilt
Closing causes line to interrupt, and second electronic device 10b can not be smoothly sent to by responding package, now i.e. as foregoing first is real
The mode of example is applied, backtracking responds to previous 7th test packets to send the 7th test packets to the reception server 20 certainly
Institute's elapsed time is cycle time.In the present embodiment, assert that network state is relatively stable for the time being so that second electronic device
10b can proceed with the transmission of the 9th test packets.
When second electronic device 10b sends the 9th test packets to server 20, the 9th time test packets require service
45 second interval time that device 20 waits has been more than 40 second stand-by period of router E in wiring path P2;So that server 20 is sent out
The response packages of the 9th test packets is sent to during second electronic device 10b, because router E links to router C's
COM1, which has been closed, causes line to interrupt, and can not smoothly be sent to second electronic device 10b.Second electronic device 10b
Test module 13 after judging not receiving response package of the server 20 transmitted by the 9th test packets, judge this 45
Interval time second is long, therefore test module 13 understands backtracking to the state of previous 8th test packets.
But in the present embodiment, in order to ensure second electronic device 10b can normally receive response package(That is the second electronics
Line is stable between device 10b and server 20 does not interrupt), therefore test module 13 can send at least the 8th of 3 times the time survey repeatedly
Try package.Assuming that second electronic device 10b can receive the response package of all the 8th test packets sent, that is, represent institute
Corresponding 8 sections of interval times(That is 40 second interval time)It is appropriate, therefore second electronic device 10b can be sent the 8th time with oneself
Test packets to the reception server 20 responds institute's elapsed time(It is 40 seconds in the present embodiment)For cycle time.
If assuming, second electronic device 10b does not receive the response package of all the 8th test packets sent, that is, represents
From send the 8th test packets to the reception server 20 respond institute's elapsed time, may still can be more than the router stand-by period and
Cause line to interrupt, thus second electronic device 10b can again backtracking to previous 7th test packets, and with from send the 7th time survey
Try package to the reception server 20 and respond institute's elapsed time(It is 35 seconds in the present embodiment)For cycle time.
Passing through the design of the present invention so that electronic installation finds out more appropriate cycle time in maximum tolerance band, in
Switch to periodically to send after standby/park mode and maintain package to line server, the line shape between maintenance and server
State;So whenever necessary, server can be by network at any time from Remote Wake Up electronic installation, to carry out access of data etc.
Operation.Package transmission times can be also greatly decreased in the design of the present invention simultaneously, to save the resource consumption of electronic installation.
Certainly, the present invention can also have other various embodiments, ripe in the case of without departing substantially from spirit of the invention and its essence
Know those skilled in the art when can be made according to the present invention it is various it is corresponding change and deformation, but these corresponding change and become
Shape should all belong to the protection domain of claims appended hereto.
Claims (9)
1. one kind maintains bus connection method, for maintaining the connection state between an electronic installation and a server, it is characterised in that
This method comprises the following steps:
(a) sending a n-th test packets to the server, wherein n-th test packets requires the server in wait N sections
The electronic installation is responded after interval time again, and N is positive integer;
(b) judge whether to receive the response that the server sends the n-th test packets;
If the response that the server is sent to the n-th test packets (c) is received, repeat step (a);If do not receive
The response that the server is sent to the n-th test packets, then calculate previous from the N-1 times test packets are sent to reception
The server responds institute's elapsed time to be directly set as a cycle time;And
(d) after the electronic installation switches to a standby/park mode, send one according to the cycle time and maintain package to the clothes
Business device, to maintain the connection state between the server.
2. maintenance bus connection method according to claim 1, it is characterised in that judge to wait the server in step (b)
Whether the time of response adds the summation of N section interval times more than a package turnaround time, and the package turnaround time is from the electricity
After sub-device sends a package to the server, the total time that the server responds to the package immediately is received.
3. maintenance bus connection method according to claim 2, it is characterised in that in the state of N=1, if not receiving this
The response that server is sent to the 1st test packets, then using the package turnaround time as a cycle time.
4. maintenance bus connection method according to claim 1, it is characterised in that the interval time is 5~20 seconds.
5. one kind maintains bus connection method, for maintaining the connection state between an electronic installation and a server, it is characterised in that
This method comprises the following steps:
(a) sending a n-th test packets to the server, wherein n-th test packets requires the server in wait N sections
The electronic installation is responded after interval time again, and N is positive integer;
(b) judge whether to receive the response that the server sends the n-th test packets;
If the response that the server is sent to the n-th test packets (c) is received, repeat step (a);If do not receive
The response that the server is sent to the n-th test packets, then the N-1 times test packets are sent repeatedly and judge whether to connect
Receive the response that the server is sent to all the N-1 times test packets;
If (d) receiving response of the server to all the N-1 times test packets sent repeatedly, calculate and send this certainly
The N-1 times test packets is a cycle time to server response institute's elapsed time is received;If the server pair is not received
The response of all the N-1 times test packets sent repeatedly, then calculate previous from the N-2 times test packets are sent to reception
The server responds institute's elapsed time to be directly set as a cycle time;And
(e) after the electronic installation switches to a standby/park mode, send one according to the cycle time and maintain package to the clothes
Business device, to maintain the connection state between the server.
6. maintenance bus connection method according to claim 5, it is characterised in that at least 3 N- are sent in step (c)
1 test packets is to the server.
7. maintenance bus connection method according to claim 5, it is characterised in that judge to wait the server in step (b)
Whether the time of response exceedes responds the envelope from the electronic installation one package of transmission in the case of not postponing to the server is received
One turnaround time of bag, plus the summation of N section interval times.
8. maintenance bus connection method according to claim 7, it is characterised in that in the state of N=1, if not receiving this
The response that server is sent to the 1st test packets, then using the turnaround time as a cycle time.
9. maintenance bus connection method according to claim 5, it is characterised in that the interval time is 5~20 seconds.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310112126.3A CN104104647B (en) | 2013-04-02 | 2013-04-02 | Maintain bus connection method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310112126.3A CN104104647B (en) | 2013-04-02 | 2013-04-02 | Maintain bus connection method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104104647A CN104104647A (en) | 2014-10-15 |
CN104104647B true CN104104647B (en) | 2018-02-06 |
Family
ID=51672450
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310112126.3A Expired - Fee Related CN104104647B (en) | 2013-04-02 | 2013-04-02 | Maintain bus connection method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104104647B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI644235B (en) * | 2017-04-13 | 2018-12-11 | 國立政治大學 | Wearable instant interaction system |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6212175B1 (en) * | 1997-04-22 | 2001-04-03 | Telxon Corporation | Method to sustain TCP connection |
CN101459871A (en) * | 2007-12-14 | 2009-06-17 | 华为技术有限公司 | Method, system and apparatus for paging periodic synchronization of access terminal and access network |
CN102246469A (en) * | 2008-12-15 | 2011-11-16 | 日本电气株式会社 | Data transfer device |
US8396950B1 (en) * | 2000-03-02 | 2013-03-12 | Rockstar Consortium Us Lp | Method and apparatus for the fast detection of connectivity loss between devices in a network |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI266502B (en) * | 2004-12-14 | 2006-11-11 | Inst Information Industry | Method for automatically detecting the disconnection time in network address and port translation environment |
CN100433660C (en) * | 2006-09-30 | 2008-11-12 | 杭州华三通信技术有限公司 | Method and equipment for realizing fast detection |
US7693084B2 (en) * | 2007-02-28 | 2010-04-06 | Microsoft Corporation | Concurrent connection testing for computation of NAT timeout period |
EP2223509A1 (en) * | 2007-12-20 | 2010-09-01 | Telefonaktiebolaget LM Ericsson (publ) | Method and arrangement to maintain a tcp connection |
US9516116B2 (en) * | 2008-06-06 | 2016-12-06 | Apple Inc. | Managing notification service connections |
US8375134B2 (en) * | 2009-06-08 | 2013-02-12 | Microsoft Corporation | Determining an efficient keep-alive interval for a network connection |
US8065419B2 (en) * | 2009-06-23 | 2011-11-22 | Core Wireless Licensing S.A.R.L. | Method and apparatus for a keep alive probe service |
US8566625B2 (en) * | 2011-07-01 | 2013-10-22 | Intel Corporation | System and method for determining transmitting frequency to maintain remote application server connectivity |
US8892710B2 (en) * | 2011-09-09 | 2014-11-18 | Microsoft Corporation | Keep alive management |
-
2013
- 2013-04-02 CN CN201310112126.3A patent/CN104104647B/en not_active Expired - Fee Related
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6212175B1 (en) * | 1997-04-22 | 2001-04-03 | Telxon Corporation | Method to sustain TCP connection |
US8396950B1 (en) * | 2000-03-02 | 2013-03-12 | Rockstar Consortium Us Lp | Method and apparatus for the fast detection of connectivity loss between devices in a network |
CN101459871A (en) * | 2007-12-14 | 2009-06-17 | 华为技术有限公司 | Method, system and apparatus for paging periodic synchronization of access terminal and access network |
CN102246469A (en) * | 2008-12-15 | 2011-11-16 | 日本电气株式会社 | Data transfer device |
Also Published As
Publication number | Publication date |
---|---|
CN104104647A (en) | 2014-10-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9363847B2 (en) | Method and apparatus for providing for discontinuous reception via cells having different time division duplex subframe configurations | |
USRE45600E1 (en) | Techniques for collaborative power management for heterogeneous networks | |
CN102377814B (en) | Remote assistance service method aiming at embedded operation system | |
CN102567125B (en) | Method for realizing communication between browser pages | |
US20100142500A1 (en) | Coexistence interface for multiple radio modules using a reduced number of connections | |
US20080259821A1 (en) | Dynamic packet training | |
CN102647370B (en) | Communication method for communicating WiFi network with ZigBee network | |
EP1735960A1 (en) | Optimizing the delivery of low-latency data for constantly active stations in virtual lans | |
CN103051426B (en) | The sending method of a kind of data or signaling and device | |
CN109756994A (en) | A kind of restoration methods of the SOT state of termination, device, base station and terminal | |
CN101248628A (en) | Network interface control program and network interface control device | |
US8756447B2 (en) | Apparatus and method for transmitting a pause frame to a link partner to establish a transmission pause period according to a low data rate being detected | |
CN106612340B (en) | Method for penetrating network position converter and communication device | |
CN104104412A (en) | Direct memory access (DMA) based power line network system and communication method thereof | |
CN113556213B (en) | Method for determining time-out Retransmission Time (RTO) and related device | |
CN103067956B (en) | Ipsec tunnel backup and changing method and equipment in 3G network environment | |
CN104104647B (en) | Maintain bus connection method | |
CN107276859A (en) | Keep the method and device of long connection | |
CN103780472B (en) | A kind of aggregation port group chooses mouthful management method and equipment | |
CN101399714B (en) | Transmission method and device for bidirectionally transceiving and detecting packet | |
CN103905498B (en) | Service information management method and service information management system | |
US8576849B2 (en) | Method and system for realizing transmission of message between an extended processor and switch chip | |
KR20110046287A (en) | Energy-Efficient Ethernet Link Transition with Zero Packet Loss with Driver Fast Failover | |
CN104156332B (en) | High-performance parallel computing method based on external PCI-E connection | |
CN106507699A (en) | Power consumption in control peer-to-peer communications |
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 | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20180206 |