CN101626591A - Detection method and detection device of data link - Google Patents
Detection method and detection device of data link Download PDFInfo
- Publication number
- CN101626591A CN101626591A CN200910165553A CN200910165553A CN101626591A CN 101626591 A CN101626591 A CN 101626591A CN 200910165553 A CN200910165553 A CN 200910165553A CN 200910165553 A CN200910165553 A CN 200910165553A CN 101626591 A CN101626591 A CN 101626591A
- Authority
- CN
- China
- Prior art keywords
- gprs
- data
- data traffic
- sends
- unit
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Mobile Radio Communication Systems (AREA)
Abstract
The invention embodiment relates to a detection method and a detection device of a data link. The method comprises the following steps: detecting the data flow of a general packet radio service (GPRS) interface; sending a data message to a GPRS server after confirming that the data flow is not changed; and reestablishing GPRS data connection if not receiving an answering response sent by the GPRS server within a preset time. The invention detects and maintains the GPRS data link by combining a data flow detection method and a heartbeat detection method so as to reduce an invalid data flow and network blockage at terminals and improve the detection efficiency.
Description
Technical field
The present invention relates to communication technical field, particularly a kind of detection method of data link and device.
Background technology
Along with development of Communication Technique, when using GPRS (GPRS, General PacketRadio Service) when communicating, connect in order to keep data, guarantee that the GPRS terminal is always online, the GPRS terminal adopts " heartbeat " to detect usually with the GPRS server and safeguards that GPRS is connected link.Wherein " heartbeat " detects two aspect effects: be to detect the online situation of GPRS server on the one hand, judge the normal condition of GPRS data link in view of the above; Be by the timed sending data on the other hand, notify GPRS server " the GPRS terminal is also online, please hang up " with this.
That is to say, the message (being often referred to heartbeat signal) of GPRS terminal periodic transmission set form is to the GPRS server, if in the time of setting, do not receive the heartbeat signal of GPRS server feedback, perhaps do not receive that GPRS server feedback heartbeat signal has arrived certain number continuously, the GPRS terminal can think that data link breaks down, and the GPRS server is in the regular hour, if do not receive the data that the GPRS terminal sends, then can think free of data flow on the GPRS data link of in this time GPRS terminal, the GPRS server will disconnect connection, thereby cause the GPRS terminal dialing to connect for " void ".
This shows, detect there are following several point defects in this at present " heartbeat ": connect in order to keep data, the GPRS terminal needs periodically to send " heartbeat " and detects, when data traffic less on the data link, send " heartbeat " again and detect this moment, thereby cause the problem of the wasting of resources; When the data traffic on the data link was big, sent " heartbeat " again and detect this moment, and it is overtime easily to detect feedback information, thereby cause the abnormal problem of network blockage or the disconnected data volume road of GPRS terminal erroneous judgement.
Summary of the invention
The embodiment of the invention provides a kind of detection method and device of data link, with solve the GPRS terminal can not the judgment data link normal problem whether, improve the utilance of resource.
For solving the problems of the technologies described above, the present invention is the detection method that embodiment provides a kind of data link, comprising:
Detect the data traffic of general packet radio service gprs interface;
When definite described data traffic does not change, send datagram to the GPRS server;
If in Preset Time, do not receive the response that the GPRS server sends, then rebulid the GPRS data and connect.
Preferably, described method also comprises:
When described data traffic changes, carry out the step of the data traffic of described detection GPRS interface.
Preferably, described method also comprises: if receive the response that the GPRS server sends in Preset Time, carry out the step of the data traffic of described detection GPRS interface.
Preferably, described data message is the data message of set form.
Preferably, described sending datagram to the GPRS server is specially: the message that regularly sends set form to the GPRS server.
Accordingly, the embodiment of the invention also provides a kind of checkout gear of data link, comprising:
Detecting unit is used to detect the data traffic of GPRS interface;
Determining unit is used for sending datagram to the GPRS server when definite described data traffic does not change;
Reconstruction unit is used for not receiving the response of GPRS server transmission in Preset Time, then rebulid the GPRS data and connect.
Preferably, described determining unit comprises: first judging unit and transmitting element, wherein
Described first judging unit is used to judge whether described data traffic changes, and the judged result that will not change sends to described transmitting element, and the judged result that changes is sent to described detecting unit;
Described transmitting element is used for sending datagram to the GPRS server when reception first judging unit sends the judged result that does not change;
Described detecting unit also is used for: when the judged result that the data traffic that receives the transmission of first judging unit changes, continue to detect the data traffic of GPRS interface.
Preferably, described reconstruction unit comprises: second judging unit and link re-establishment unit, wherein
Described second judging unit, be used to judge and in Preset Time, whether receive the response that the GPRS server sends, and the judged result that will receive response sends to detecting unit, and the judged result that will not receive response sends to the link re-establishment unit;
Described link re-establishment unit, be used for receive that second judging unit sends do not receive the judged result of response the time, rebulid the GPRS data and connect;
Described detecting unit also is used for: send when receiving the judged result of response receiving second judging unit, continue to detect the data traffic of GPRS interface.
Preferably, when described determining unit did not change in definite described data traffic, the data message that sends to the GPRS server was the data message of set form.
Preferably, the checkout gear of described data link is integrated on the GPRS terminal, perhaps independent the deployment.
As shown from the above technical solution, the embodiment of the invention is by detecting the data traffic of GPRS interface, and determine whether described data traffic changes, and when this data traffic does not change, send datagram to the GPRS server, and in Preset Time, do not receive the response that the GPRS server sends, then rebulid the GPRS data and connect.That is to say, detect by the method that data flow detection and heartbeat detection are combined in the embodiment of the invention and safeguard the GPRS data link, thereby reduced the network blockage of invalid data flow and terminal, improve detection efficiency.
Description of drawings
The flow chart of the detection method of a kind of data link of providing in the embodiment of the invention is provided Fig. 1;
The particular flow sheet of the detection method of a kind of data link of providing in the embodiment of the invention is provided Fig. 2;
The structural representation of the checkout gear of a kind of data link of providing in the embodiment of the invention is provided Fig. 3;
The structural representation of the checkout gear of the another kind of data link that provides in the embodiment of the invention is provided Fig. 4.
Embodiment
Below we will be in conjunction with the accompanying drawings, embodiment of the present invention are described in detail.
See also Fig. 1, the flow chart of the detection method of a kind of data link of providing in the embodiment of the invention is provided, described method comprises step:
Step 101: the data traffic that detects the GPRS interface; The mode of its detection has multiple: can be regular detection, also can be real-time detection, also can be the two combination etc., and present embodiment does not limit.
Step 102: when definite described data traffic does not change, send datagram to the GPRS server; Wherein, described data message can be the data message of set form, such as regularly, in real time or the two send the data message of set form alternately to the GPRS server, the data message of described set form can be " heartbeat " signal, but is not limited to this.
Step 103:, then rebulid the GPRS data and connect if in Preset Time, do not receive the response that the GPRS server sends.
Preferably, described method can further include: when described data traffic changes, and execution in step 101, i.e. continuation detects the data traffic of GPRS interface.
Preferably, described method can further include: if receive the response that the GPRS server sends in Preset Time, execution in step 101 promptly continues the regular phase and states the data traffic that detects the GPRS interface.
In the embodiment of the invention, the GPRS terminal can regularly detect the data traffic on the GPRS interface, if within a certain period of time, free of data flow on the GPRS data link that the GPRS terminal detects, and the GPRS server does not receive the data message that the GPRS terminal sends yet, then the GPRS server will disconnect connection, always online in order to ensure the GPRS terminal equipment, in the present embodiment, the GPRS terminal is taked that the data traffic detection is kept data with the mode that heartbeat detection combines and is connected link, and its concrete realization flow as shown in Figure 2.
Also see also Fig. 2, be the particular flow sheet of the method for the detection of data link in the embodiment of the invention, detailed process comprises:
Step 201:GPRS terminal is set up the GPRS data with the GPRS server and is connected;
Step 202:GPRS terminal detects GPRS interface data total flow; The mode of its detection has a variety of, such as regular, real-time.Perhaps the two is mutual etc., and the embodiment of the invention does not limit.
The GPRS terminal can be set a fixed test cycle earlier, detects the data total flow of GPRS interface every a fixed test cycle, and whether the data total flow of adding up this detection changes.
Whether this data traffic of step 203:GPRS terminal judges changes, and if not, execution in step 204 is if return step 202;
That is to say that if this data total flow of GPRS terminal judges changes, then explanation has data to pass through the GPRS interface, data link is normal; If the data total flow does not change, then may terminal not carry out data communication in this cycle, also may be that data link is undesired.For further whether the specified data link is normal, then need step 204 further to realize safeguarding and detecting.
Step 204:GPRS terminal sends datagram to the GPRS server, and this data message can be the data message of set form, such as heartbeat signal etc.That is to say that the GPRS terminal is when judging that this data total flow does not change, the GPRS terminal equipment is waited for replying of GPRS server to the message of GPRS server transmission set form, and sets and reply time-out time.
Whether step 205:GPRS terminal judges receives the response that the GPRS server sends in the time of setting; If, execution in step 206; If not, return step 202;
That is to say that the GPRS terminal if receive replying of GPRS server in the time-out time of setting, illustrates that then the GPRS data link is normal behind the message that sends set form, return step 202.If reply overtimely, then the GPRS terminal thinks that the GPRS data link is undesired, need rebulid the GPRS data link.
Step 206:GPRS terminal rebulids the GPRS data with the GPRS server and is connected.
That is to say that if do not receive replying of GPRS server in the time-out time that the GPRS terminal is set, then the GPRS data link is undesired, the GPRS terminal need rebulid the GPRS data link with the GPRS server.
Certainly, setting up the GPRS data link, the GPRS terminal continues to detect GPRS interface data total flow.
Implementation procedure based on said method, the embodiment of the invention also provides a kind of checkout gear of data link, its structural representation sees Fig. 3 for details, the checkout gear of described data link comprises: detecting unit 31, determining unit 32 and reconstruction unit 33, wherein, described detecting unit 31 is used to detect the data traffic of GPRS interface; Described determining unit is used for sending datagram to the GPRS server when the data traffic of determining described detecting unit detection does not change; Reconstruction unit 33 is used for not receiving the response of GPRS server transmission in Preset Time, then rebulid the GPRS data and connect.
Preferably, described determining unit 32 may further include: first judging unit 321 and transmitting element 322, wherein, described first judging unit 321, be used to judge whether described detecting unit 31 detected data traffics change, and the judged result that will not change sends to described transmitting element 322, and the judged result that changes is sent to described detecting unit 31; Described transmitting element 322 is used for sending datagram to the GPRS server when reception first judging unit 321 sends the judged result that does not change; Described detecting unit 31 also is used for: when the judged result that the data traffic that receives 321 transmissions of first judging unit changes, continue to detect the data traffic of GPRS interface.Its concrete structural representation sees Fig. 4 for details, and Fig. 4 is the schematic diagram of checkout gear of the another kind of data link of the embodiment of the invention.
Preferably, described reconstruction unit 33 can further include: second judging unit 331 and link re-establishment unit 332, wherein, described second judging unit 331, be used to judge and in Preset Time, whether receive the response that the GPRS server sends, and the judged result that will receive response sends to detecting unit 31, and the judged result that will not receive response sends to link re-establishment unit 332; Described link re-establishment unit 332, be used for receive that second judging unit 331 sends do not receive the judged result of response the time, rebulid the GPRS data and connect; Described detecting unit 31 also is used for: send when receiving the judged result of response receiving second judging unit 331, continue to detect the data traffic of GPRS interface.Its concrete structural representation also sees Fig. 4 for details.
Preferably, when described determining unit did not change in definite described data traffic, the data message that sends to the GPRS server was the data message of set form.
Preferably, the checkout gear of described data link is integrated on the GPRS terminal, perhaps independent the deployment.
As shown from the above technical solution, the embodiment of the invention is by detecting the data traffic of GPRS interface, and determine whether described data traffic changes, and when this data traffic does not change, send datagram to the GPRS server, and in Preset Time, do not receive the response that the GPRS server sends, then rebulid the GPRS data and connect.That is to say, detect by the method that data flow detection and heartbeat detection are combined in the embodiment of the invention and safeguard the GPRS data link, thereby reduced the network blockage of invalid data flow and terminal, improve detection efficiency.Promptly when the GPRS terminal is idle, just produce " heartbeat " flow, reduce the wasting of resources, when GPRS terminal transmission valid data, do not produce " additionally " flow, reduce GPRS network and stop up.The method that the embodiment of the invention detects by data traffic and heartbeat detection combines detects and safeguards that the GPRS data link is more reliable, reduces because of network " heartbeat " overtime flase drop survey probability when busy.
Through the above description of the embodiments, those skilled in the art can be well understood to the present invention and can realize by the mode that software adds essential general hardware platform, can certainly pass through hardware, but the former is better execution mode under a lot of situation.Based on such understanding, the part that technical scheme of the present invention contributes to prior art in essence in other words can embody with the form of software product, this computer software product can be stored in the storage medium, as ROM/RAM, magnetic disc, CD etc., comprise that some instructions are with so that a computer equipment (can be a personal computer, server, the perhaps network equipment etc.) carry out the described method of some part of each embodiment of the present invention or embodiment.
The above only is a preferred implementation of the present invention; should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the principle of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.
Claims (10)
1, a kind of detection method of data link is characterized in that, comprising:
Detect the data traffic of general packet radio service gprs interface;
When definite described data traffic does not change, send datagram to the GPRS server;
If in Preset Time, do not receive the response that the GPRS server sends, then rebulid the GPRS data and connect.
2, method according to claim 1 is characterized in that, described method also comprises:
When described data traffic changes, carry out the step of the data traffic of described detection GPRS interface.
3, method according to claim 2 is characterized in that, described method also comprises: if receive the response that the GPRS server sends in Preset Time, then carry out the step of the data traffic of described detection GPRS interface.
According to each described method of claim 1 to 3, it is characterized in that 4, described data message is the data message of set form.
5, method according to claim 4 is characterized in that, described sending datagram to the GPRS server is specially: the message that regularly sends set form to the GPRS server.
6, a kind of checkout gear of data link is characterized in that, comprising:
Detecting unit is used to detect the data traffic of GPRS interface;
Determining unit is used for sending datagram to the GPRS server when definite described data traffic does not change;
Reconstruction unit is used for not receiving the response of GPRS server transmission in Preset Time, then rebulid the GPRS data and connect.
7, device according to claim 6 is characterized in that, described determining unit comprises: first judging unit and transmitting element, wherein
Described first judging unit is used to judge whether described data traffic changes, and the judged result that will not change sends to described transmitting element, and the judged result that changes is sent to described detecting unit;
Described transmitting element is used for sending datagram to the GPRS server when reception first judging unit sends the judged result that does not change;
Described detecting unit also is used for: when the judged result that the data traffic that receives the transmission of first judging unit changes, continue to detect the data traffic of GPRS interface.
8, device according to claim 6 is characterized in that, described reconstruction unit comprises: second judging unit and link re-establishment unit, wherein
Described second judging unit is used to judge whether receive the response that the GPRS server sends in Preset Time, and the judged result that will receive response sends to detecting unit; The judged result that will not receive response sends to the link re-establishment unit;
Described link re-establishment unit, be used for receive that second judging unit sends do not receive the judged result of response the time, rebulid the GPRS data and connect;
Described detecting unit also is used for: send when receiving the judged result of response receiving second judging unit, continue to detect the data traffic of GPRS interface.
According to each described device of claim 6 to 8, it is characterized in that 9, when described determining unit did not change in definite described data traffic, the data message that sends to the GPRS server was the data message of set form.
According to each described device of claim 6 to 8, it is characterized in that 10, the checkout gear of described data link is integrated on the GPRS terminal, perhaps independent the deployment.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN200910165553A CN101626591A (en) | 2009-07-30 | 2009-07-30 | Detection method and detection device of data link |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN200910165553A CN101626591A (en) | 2009-07-30 | 2009-07-30 | Detection method and detection device of data link |
Publications (1)
Publication Number | Publication Date |
---|---|
CN101626591A true CN101626591A (en) | 2010-01-13 |
Family
ID=41522211
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN200910165553A Pending CN101626591A (en) | 2009-07-30 | 2009-07-30 | Detection method and detection device of data link |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101626591A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101778019A (en) * | 2010-04-01 | 2010-07-14 | 杭州华三通信技术有限公司 | Heartbeat detection message sending method and equipment |
CN103297470A (en) * | 2012-02-29 | 2013-09-11 | 中国移动通信集团公司 | Method for processing always-online service, application server, user terminal and system |
CN103684815A (en) * | 2012-09-03 | 2014-03-26 | 中国移动通信集团公司 | Keep-alive method, device and system for data transmission link |
-
2009
- 2009-07-30 CN CN200910165553A patent/CN101626591A/en active Pending
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101778019A (en) * | 2010-04-01 | 2010-07-14 | 杭州华三通信技术有限公司 | Heartbeat detection message sending method and equipment |
CN101778019B (en) * | 2010-04-01 | 2013-10-23 | 杭州华三通信技术有限公司 | Heartbeat detection message sending method and equipment |
CN103297470A (en) * | 2012-02-29 | 2013-09-11 | 中国移动通信集团公司 | Method for processing always-online service, application server, user terminal and system |
CN103297470B (en) * | 2012-02-29 | 2016-03-30 | 中国移动通信集团公司 | The processing method of always online business, application server, user terminal and system |
CN103684815A (en) * | 2012-09-03 | 2014-03-26 | 中国移动通信集团公司 | Keep-alive method, device and system for data transmission link |
CN103684815B (en) * | 2012-09-03 | 2017-02-01 | 中国移动通信集团公司 | Keep-alive method, device and system for data transmission link |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP2510651B1 (en) | Connectivity fault management timeout period control | |
CN103139818A (en) | Method, system, area of effect (AOE), always on line (AOG) and terminal of maintaining long connection in acquisition of signal (AOS) | |
CN102647314A (en) | Client side on-line state judgment method and system | |
CN109413762A (en) | A kind of awakening method and device of vehicle-mounted Tbox | |
CN102223381A (en) | Message pushing method, server, client terminal and system | |
CN101989933A (en) | Method and system for failure detection | |
MXPA04006830A (en) | Remote sensing of power supply states. | |
CN102111728B (en) | Network connection management module and method of mobile terminal | |
CN101888610A (en) | Method, system and device for realizing short message service | |
CN100466564C (en) | Failure monitoring method and device of the virtual rented line | |
CN101626591A (en) | Detection method and detection device of data link | |
CN101980482A (en) | Method for monitoring network connection and system thereof | |
CN101232406A (en) | OAM fast detecting method, apparatus and system | |
CN104243199A (en) | Data transmission method and protection device of packet transport network | |
CN101977396B (en) | System and method for realizing network element service switching in multimedia messaging service | |
CN103684897A (en) | Method, system and device for detecting network connectivity in client | |
CN101202963A (en) | Method and system for transmitting data used in engineering machinery remote monitor supervision area | |
US8503333B2 (en) | Reestablishment of an interface between nodes in a network using a backoff time | |
US20130036220A1 (en) | Apparatus and Method for Implementing Point to Point Protocol Data Service Link-Disconnect | |
CN102918802B (en) | Method, node and system for determining fault indication state | |
CN101729530B (en) | Data synchronization method and data synchronization system | |
CN104639356A (en) | Failure recovery method and device | |
CN102014054A (en) | Sending method and equipment for keep-alive messages | |
CN101800682A (en) | Bidirectional forwarding detection (BFD) method and device | |
CN102149116B (en) | Backup method and device for coordinator of wireless private area network |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C12 | Rejection of a patent application after its publication | ||
RJ01 | Rejection of invention patent application after publication |
Open date: 20100113 |