CN103024226B - Data communication method and communication terminal - Google Patents
Data communication method and communication terminal Download PDFInfo
- Publication number
- CN103024226B CN103024226B CN201210527641.3A CN201210527641A CN103024226B CN 103024226 B CN103024226 B CN 103024226B CN 201210527641 A CN201210527641 A CN 201210527641A CN 103024226 B CN103024226 B CN 103024226B
- Authority
- CN
- China
- Prior art keywords
- voip
- server
- communication terminal
- communication
- address
- 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
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
An embodiment of the invention discloses a data communication method and a communication terminal which can timely recover voice over internet protocol (VoIP) businesses when the network returns to the normal and accordingly improve user experience. The data communication method includes that: the communication terminal transmits messages to a communication server; when the communication terminal does not receive response of the communication server in the preset duration, the communication terminal performs communication channel detection; and if the communication terminal fails in communication channel detection, the communication terminal broadcasts a dynamic host configuration protocol (DHCP) renewal package to renew the internet protocol (IP) address of the communication terminal; if renewal is successful, the communication terminal and the communication server interact. The data communication method and the communication terminal can timely recover the VoIP businesses when the network returns to the normal and accordingly improve user experience.
Description
Technical field
The present invention relates to the communications field, particularly relate to a kind of data communications method and communication terminal.
Background technology
Internet speech communication (VoIP, Voice over Internet Protocol) be a kind of voice communication mode emerging at present, it can by the voice signal of simulation through oversampling, collection and coding, by the compression algorithm of voice, compression process is carried out to encoded speech data, then these speech datas are packed by internet protocol standard, through IP network, packet is delivered to destination, destination reverts to original voice signal these VoPs again, thus reaches the object being transmitted voice by the Internet.
Existing VoIP terminal can from DHCP (DHCP, Dynamic HostConfiguration Protocol) agreement gets IP address, concrete, VoIP terminal is when needs use VoIP business, address assignment request can be sent to Dynamic Host Configuration Protocol server, Dynamic Host Configuration Protocol server can according to the specification of DHCP agreement to this VoIP terminal distribution IP address, then this VoIP terminal can use this IP address to carry out VoIP business.
In actual networking application, Dynamic Host Configuration Protocol server timing can send out link detection message to VoIP terminal, when between VoIP terminal and Dynamic Host Configuration Protocol server, network goes wrong, the probe messages that Dynamic Host Configuration Protocol server can be caused to send does not receive response in certain time length, then Dynamic Host Configuration Protocol server can discharge the IP address originally distributing to VoIP terminal, the IP address lease that VoIP terminal originally obtained does not arrive, and can not independently discharge, so VoIP terminal can think that this IP address can normally use always.
After link circuit condition recovers, this VoIP terminal can continue to use this IP address to send data to VoIP server, but because this IP address is discharged by Dynamic Host Configuration Protocol server, so the data that this VoIP terminal uses this IP address to send can be considered to invalid data, thus cause VoIP service fail.
Summary of the invention
Embodiments provide a kind of data communications method and communication terminal, VoIP business can be recovered in time when network recovery is normal, thus improve Consumer's Experience.
The data communications method that the embodiment of the present invention provides, comprising:
Communication terminal uses the internet protocol address that gets and the communication server to carry out alternately;
Communication terminal sends message to the described communication server;
When described communication terminal does not receive the response of the described communication server in preset time period, described communication terminal carries out communication port detection;
Detect unsuccessfully if described communication terminal carries out communication port, then described communication terminal broadcast dynamic host configuration protocol DHCP re-rents bag to re-rent IP address;
If re-rent successfully, then described communication terminal carries out with the described communication server again alternately.
Alternatively, detect successfully if described communication terminal carries out communication port, then described communication terminal and spare communication server carry out alternately.
Alternatively, described communication terminal carry out communication port detection comprise:
Described communication terminal adopts ARP detection mode, or PING detection mode carries out communication port detection.
Alternatively, if re-rent failure, then communication terminal resends DHCP request to Dynamic Host Configuration Protocol server.
Alternatively, described communication terminal comprises after Dynamic Host Configuration Protocol server resends DHCP request:
Described communication terminal receives the dhcp response of described Dynamic Host Configuration Protocol server feedback, comprises newly assigned IP address in described dhcp response;
Described communication terminal uses described newly assigned IP address to register to the described communication server;
After having registered, described communication terminal uses described newly assigned IP address and the described communication server to carry out alternately.
The communication terminal that the embodiment of the present invention provides, comprising:
First interactive unit, carries out alternately for using the internet protocol address that gets and the communication server;
Transmitting element, for sending message to the described communication server;
Probe unit, for when not receiving the response of the described communication server in preset time period, carries out communication port detection;
Radio unit, for carry out when described probe unit communication port detect unsuccessfully time, broadcast dynamic host configuration protocol DHCP re-rent bag to re-rent IP address;
Second interactive unit, for when re-renting successfully, carries out with the described communication server again alternately.
Alternatively, described communication terminal also comprises:
3rd interactive unit, for carry out when described probe unit communication port detect successfully time, carry out alternately with spare communication server.
Alternatively, described communication terminal also comprises:
Request unit, for when re-renting unsuccessfully, resends DHCP request to Dynamic Host Configuration Protocol server.
Alternatively, described communication terminal also comprises:
Receiving element, for receiving the dhcp response of described Dynamic Host Configuration Protocol server feedback, comprises newly assigned IP address in described dhcp response;
Registering unit, registers to the described communication server for using described newly assigned IP address;
4th interactive unit, for after described registering unit has been registered, has used described newly assigned IP address and the described communication server to carry out alternately.
The communication terminal that the embodiment of the present invention provides, comprising:
Message module, message result treatment module, detecting module, abnormality processing module and DHCP process processing module;
Transmission result for sending logon message, service message, and is informed message result treatment module by described message module;
Described message result treatment module is analyzed described transmission result, and determines trigger detection module or abnormality processing module according to analysis result;
Described detecting module is used for detecting communication port, and determines that triggering DHCP process processing module still triggers message module according to result of detection;
Described abnormality processing module is used for according to the switching between the primary communication server of timer start by set date and spare communication server, makes described message module send message to the primary communication server or spare communication server;
Described DHCP process processing module is used for carrying out DHCP and re-rents and restart dhcp process, until success, and triggers described message module and carries out respective handling.
As can be seen from the above technical solutions, the embodiment of the present invention has the following advantages:
In the embodiment of the present invention, when communication terminal sends after message to the communication server, if when not receiving the response of the communication server in preset time period, then this communication terminal can carry out communication port detection, and when communication port detects unsuccessfully, DHCP can be broadcasted and re-rent bag to re-rent IP address, thus again carry out with the communication server alternately, so for VoIP business, if due to the reason of Network Abnormal, Dynamic Host Configuration Protocol server releases the IP address of VoIP terminal, so VoIP terminal also can when finding that communication port detects unsuccessfully, in time IP address is re-rented, mutual with what recover as early as possible between VoIP server, therefore, it is possible to recover VoIP business in time when network recovery is normal, thus raising Consumer's Experience.
Accompanying drawing explanation
Fig. 1 is data communications method of the present invention embodiment schematic diagram;
Fig. 2 is another embodiment schematic diagram of data communications method of the present invention;
Fig. 3 is another embodiment schematic diagram of data communications method of the present invention;
Fig. 4 is communication terminal of the present invention embodiment schematic diagram;
Fig. 5 is another embodiment schematic diagram of communication terminal of the present invention;
Fig. 6 is another embodiment schematic diagram of communication terminal of the present invention.
Embodiment
Embodiments provide a kind of data communications method and communication terminal, VoIP business can be recovered in time when network recovery is normal, thus improve Consumer's Experience.
Refer to Fig. 1, the embodiment of the data communications method in the embodiment of the present invention comprises:
101, communication terminal uses the IP address that gets and the communication server to carry out alternately;
In the present embodiment, communication terminal is when needs carry out communication service, first the IP address for this communication terminal distributes can be got from Dynamic Host Configuration Protocol server, and use this IP address to register to the communication server, this IP address and the communication server just can be used afterwards to carry out data interaction, thus carry out communication service.
102, communication terminal sends message to the communication server;
In the present embodiment, message can be sent to the communication server in the process of communication terminal and the communication server.
Message in the present embodiment can be multiple message, and such as heavy logon message, call business message, heartbeat message etc., specifically do not limit herein.
103, when communication terminal does not receive the response of the communication server in preset time period, communication terminal carries out communication port detection;
If communication terminal sends after message to the communication server, the response of the communication server for this message is not received within preset duration, the exception that network service between communication terminal and the communication server occurs then is described, then communication terminal can carry out communication port detection.
Detect unsuccessfully if 104 communication terminals carry out communication port, then communication terminal broadcast DHCP re-rents bag to re-rent IP address;
After communication terminal carries out communication port detection, if determine, communication port detects unsuccessfully, then illustrate that exception has appearred in the communication port between communication terminal and the communication server, this exception causes because the IP address of communication terminal is invalid, then communication terminal can be broadcasted DHCP and be re-rented bag to re-rent IP address.
If 105 re-rent successfully, then communication terminal carries out with the communication server again alternately.
After communication terminal broadcast DHCP re-rents bag, Dynamic Host Configuration Protocol server can receive this DHCP and re-rent bag, then can re-rent the IP address of this communication terminal.
If re-rent successfully, communication terminal then can carry out with the communication server alternately again, owing to re-renting successfully, so communication terminal can proceed communication service.
In the present embodiment, when communication terminal sends after message to the communication server, if when not receiving the response of the communication server in preset time period, then this communication terminal can carry out communication port detection, and when communication port detects unsuccessfully, DHCP can be broadcasted and re-rent bag to re-rent IP address, thus again carry out with the communication server alternately, so for VoIP business, if due to the reason of Network Abnormal, Dynamic Host Configuration Protocol server releases the IP address of VoIP terminal, so VoIP terminal also can when finding that communication port detects unsuccessfully, in time IP address is re-rented, mutual with what recover as early as possible between VoIP server, therefore, it is possible to recover VoIP business in time when network recovery is normal, thus raising Consumer's Experience.
Be described the data communications method in the embodiment of the present invention with an instantiation below, refer to Fig. 2, another embodiment of the data communications method in the embodiment of the present invention comprises:
201, VoIP terminal uses the IP address that gets and VoIP server to carry out alternately;
In the present embodiment, VoIP terminal is when needs carry out VoIP business, first the IP address into this VoIP terminal distribution can be got from Dynamic Host Configuration Protocol server, and use this IP address to register to VoIP server, this IP address and VoIP server just can be used afterwards to carry out data interaction, thus carry out VoIP business.
Only be described using VoIP business as communication service example in the present embodiment, be understandable that, in actual applications, in addition to voip traffic, can also be the communication service of other types, such as network video service, media delivery business etc., specifically do not limit herein, be only described for VoIP business.
202, VoIP terminal sends message to VoIP server;
In the present embodiment, message can be sent to VoIP server in the process of VoIP terminal and VoIP server.
Message in the present embodiment can be multiple message, and such as heavy logon message, call business message, heartbeat message etc., specifically do not limit herein.
203, whether VoIP terminal judges receives the response of VoIP server in preset duration, if so, then performs step 201, if not, then performs step 204;
In the present embodiment, VoIP terminal is after sending message to VoIP server, can judge within preset duration, whether receive the response of VoIP server for this message, if receive, then illustrate that the communication between VoIP terminal and VoIP server is normal, then can continue to perform step 201 and carry out VoIP business, if do not receive, communication abnormality between VoIP terminal and VoIP server is then described, then can performs step 204 and carry out VoIP channel detection.
204, VoIP terminal carries out VoIP channel detection;
If VoIP terminal sends after message to VoIP server, within preset duration, do not receive the response of VoIP server for this message, then VoIP terminal can carry out VoIP channel detection.
Concrete, address resolution protocol (ARP can be adopted, Address Resolution Protocol) mode that detects, or the mode of PING detection carries out VoIP channel detection, be understandable that, in actual applications, other mode can also be adopted to carry out VoIP channel detection, specifically do not limit herein.
205, whether VoIP terminal judges VoIP channel detection is successful, if so, then performs step 206, if not, then performs step 207;
In the present embodiment, after VoIP terminal carries out VoIP channel detection, can judge that whether VoIP channel detection is successful, if success, then perform step 206, if unsuccessful, then perform step 207.
Concrete, according to ARP message or PING message interaction, whether VoIP terminal can normally judge that whether VoIP channel detection is successful, if normal alternately, then the success of VoIP channel detection is described, if abnormal, then illustrates that VoIP channel detection is unsuccessful.
206, VoIP terminal and VoIP server for subsequent use carry out alternately;
In the present embodiment, if VoIP terminal determines the success of VoIP channel detection after carrying out VoIP channel detection, then illustrate that VoIP passage is normal, communication abnormality between VoIP terminal and VoIP server is because the reason of VoIP server causes, so now VoIP terminal can be carried out mutual to proceed VoIP business according to preset strategy and VoIP server for subsequent use.
207, VoIP terminal broadcast DHCP re-rents bag to re-rent IP address;
In the present embodiment, if VoIP terminal determines the failure of VoIP channel detection after carrying out VoIP channel detection, then VoIP channel abnormal is described, the communication abnormality between VoIP terminal and VoIP server is because the IP address failure of VoIP terminal causes.
Then VoIP terminal can be broadcasted DHCP and re-rent bag to re-rent IP address.
208, whether VoIP terminal judges is re-rented successful, if success, then performs step 201, if failure, then performs step 209;
After VoIP terminal broadcast DHCP re-rents bag, what can judge whether to receive Dynamic Host Configuration Protocol server feedback in preset time period re-rents response, if receive, then illustrates and re-rents successfully, if do not receive, then illustrates and re-rents failure.
Above-mentionedly only describe VoIP terminal with an example and how to judge to re-rent whether success, more mode can also be adopted in actual applications, whether what such as VoIP terminal judges received re-rent in response to indicate allows to re-rent, if instruction allows to re-rent, then illustrating re-rents successfully, re-rent if do not allow, then illustrate and re-rent failure.
Be understandable that, more mode can also be had in actual applications to judge, and whether VoIP terminal is re-rented successful, does not specifically limit herein.
It should be noted that, if VoIP terminal is re-rented successfully, then original IP address of VoIP terminal can continue to use, and namely can return step 201, by VoIP terminal and VoIP server interaction to proceed VoIP business.
209, VoIP terminal resends DHCP request to Dynamic Host Configuration Protocol server;
In the present embodiment, if VoIP terminal re-rents failure, then illustrate that the original IP address of this VoIP terminal is redistributed by Dynamic Host Configuration Protocol server, cannot re-rent for this VoIP terminal again.
Now, VoIP terminal can resend DHCP request to Dynamic Host Configuration Protocol server, to require that Dynamic Host Configuration Protocol server is the IP address that this VoIP terminal distribution one is new again.
210, VoIP terminal receives the dhcp response of Dynamic Host Configuration Protocol server feedback;
VoIP terminal sends after DHCP request to Dynamic Host Configuration Protocol server, can receive dhcp response, comprise the promising newly assigned IP address of this VoIP terminal in this dhcp response from Dynamic Host Configuration Protocol server.
211, VoIP terminal uses newly assigned IP address to register to VoIP server;
VoIP terminal can extract newly assigned IP address from the dhcp response received, and uses this newly assigned IP address to register to VoIP server.
212, VoIP terminal uses newly assigned IP address and VoIP server to carry out alternately.
When VoIP terminal uses newly assigned IP address to after VoIP server is registered, this newly assigned IP address and VoIP server can be used to carry out alternately, thus proceed VoIP business.
In the present embodiment, when VoIP terminal sends after message to VoIP server, if when not receiving the response of VoIP server in preset time period, then VoIP terminal can carry out VoIP channel detection, and when the failure of VoIP channel detection, DHCP can be broadcasted and re-rent bag to re-rent IP address, thus again carry out with VoIP server alternately, so, if due to the reason of Network Abnormal, Dynamic Host Configuration Protocol server releases the IP address of VoIP terminal, so VoIP terminal also can when finding that communication port detects unsuccessfully, in time IP address is re-rented, mutual with what recover as early as possible between VoIP server, therefore, it is possible to recover VoIP business in time when network recovery is normal, thus raising Consumer's Experience,
In addition, if VoIP terminal check re-rents failure, then again can send DHCP request to Dynamic Host Configuration Protocol server, and receive the dhcp response of Dynamic Host Configuration Protocol server feedback, with to the new IP address of Dynamic Host Configuration Protocol server request dispatching, then VoIP terminal can use this newly assigned IP address to carry out registration also alternately to VoIP server, thus recovers VoIP business.
For ease of understanding, be described in detail the data communications method the embodiment of the present invention from the angle of practical application below, refer to Fig. 3, in the embodiment of the present invention, another embodiment of data communications method comprises:
301, VoIP terminal obtains IP address, and uses the IP address registration got to VoIP server;
In the present embodiment, VoIP terminal is when needs carry out VoIP business, first the IP address into this VoIP terminal distribution can be got from Dynamic Host Configuration Protocol server, and use this IP address to register to VoIP server, this IP address and VoIP server just can be used afterwards to carry out data interaction, thus carry out VoIP business.
Only be described using VoIP business as communication service example in the present embodiment, be understandable that, in actual applications, in addition to voip traffic, can also be the communication service of other types, such as network video service, media delivery business etc., specifically do not limit herein, be only described for VoIP business.
302, when the registration of VoIP SS later, service message interaction failure, VoIP terminal switch is attempted to VoIP server for subsequent use;
In the present embodiment, when the registration of VoIP SS later, service message interaction failure, first can switch to VoIP server for subsequent use and attempt, to attempt whether can successfully continuing VoIP business.
303, judge VoIP server for subsequent use whether trial and success, if so, then can perform step 301, if not, then can perform step 304;
If VoIP server for subsequent use trial and success, then illustrate that former primary VoIP server exists fault, then VoIP terminal continues to carry out alternately with VoIP server for subsequent use.
304, judge that before not having interaction success, whether sent DHCP re-rents bag, if not, then can perform step 305, if so, then can perform step 307;
If VoIP server for subsequent use is attempted unsuccessfully, then VoIP terminal can judge that before not having interaction success with VoIP server, whether sent DHCP re-rents bag, if not, then can perform step 305, if so, then can perform step 307 further.
305, VoIP terminal carries out ARP detection to gateway;
If VoIP terminal determines that sending DHCP before not having interaction success with VoIP server re-rents bag, then VoIP terminal can carry out ARP detection to detect VoIP passage to gateway.
Be understandable that, in actual applications, except adopting the mode of ARP detection to detect except VoIP passage, other similar modes can also be adopted to carry out VoIP channel detection, specifically do not limit herein, be only described for ARP detection.
306, whether VoIP terminal judges detects successfully in appointment duration, if success, then can perform step 307, if failure, then can perform step 310;
After VoIP carries out ARP detection to gateway, can judge whether detect successfully in appointment duration, if success, then step 307 can be performed, if failure, then step 310 can be performed.
Concrete, according to ARP message interaction, whether VoIP terminal can normally judge that whether VoIP channel detection is successful, if normal alternately, then the success of VoIP channel detection is described, if abnormal, then illustrates that VoIP channel detection is unsuccessful.
307, VoIP terminal initiates message to primary VoIP server;
In the present embodiment, detect successfully if VoIP terminal carries out ARP in appointment duration, then illustrate that VoIP passage is normal, now VoIP terminal can be carried out to primary VoIP server initiation message alternately.
Whether the message interaction 308, between VoIP terminal judges and primary VoIP server is failed, if failure, then can perform step 309, if failure, then can perform step 301;
In the present embodiment, VoIP terminal to primary VoIP server initiate message carry out mutual after, can judge that whether message interaction is failed, if not failure, then illustrate that the communication between VoIP terminal and primary VoIP server is normal, then can perform step 301, namely message interaction is proceeded to carry out VoIP business, if failure, then the communication abnormality between VoIP terminal and primary VoIP server is described, now can performs step 309.
309, VoIP terminal uses PING detection to judge whether the IP of primary VoIP server can reach, and whether VoIP terminal sent DHCP and re-rented bag before judging VoIP terminal and primary VoIP server interaction success, if VoIP terminal uses PING, detection determines that the IP of primary VoIP server is unreachable, and VoIP terminal did not send DHCP re-rents bag, then perform step 310, if VoIP terminal uses PING, detection determines that the IP of primary VoIP server can reach, or VoIP terminal had sent DHCP and re-rents bag, then performed step 303;
In the present embodiment, if VoIP terminal to primary VoIP server initiate message carry out mutual after, determine message interaction failure, PING then can be used to detect and to judge whether the IP of primary VoIP server can reach, and whether VoIP terminal sent DHCP and re-rented bag before judging VoIP terminal and primary VoIP server interaction success, if VoIP terminal uses PING, detection determines that the IP of primary VoIP server is unreachable, and VoIP terminal did not send DHCP re-rents bag, then step 310 can be performed, if VoIP terminal uses PING, detection determines that the IP of primary VoIP server can reach, or VoIP terminal had sent DHCP and had re-rented bag, then step 303 can be returned, namely VoIP server for subsequent use whether trial and success is judged.
Be understandable that, in actual applications, except adopting the mode of PING detection to detect except VoIP passage, other similar modes can also be adopted to carry out VoIP channel detection, specifically do not limit herein, be only described for PING detection.
Concrete, according to PING message interaction, whether VoIP terminal can normally judge whether the IP of primary VoIP server can reach, if normal alternately, then illustrate that the IP of primary VoIP server can reach, if abnormal, then illustrate that the IP of primary VoIP server is unreachable.
310, VoIP terminal broadcast DHCP re-rents bag;
If VoIP terminal uses PING, detection determines that the IP of primary VoIP server is unreachable, or VoIP terminal did not send DHCP and re-rents bag, then VoIP terminal broadcast DHCP re-rents bag, and concrete VoIP terminal can be broadcasted DHCP Request and re-rent bag.
311, VoIP terminal judges specifies in duration whether receive response, if so, then can perform step 307, if not, then can perform step 312;
After VoIP terminal broadcast DHCP re-rents bag, can judge whether receive response in appointment duration, if receive, then can perform step 307, if do not receive, then can perform step 312.
312, VoIP terminal judges to broadcast the number of retries that DHCP re-rents bag further and whether exceedes predetermined times, if so, then can perform step 313, if not, then can perform step 310;
If VoIP terminal is determined not receive response in appointment duration, then VoIP terminal can judge to broadcast the number of retries that DHCP re-rents bag and whether exceedes predetermined times, if do not exceed, then illustrate that can also continue broadcast DHCP re-rents bag, then can perform step 310, namely again broadcast DHCP and re-rent bag, if exceed, then illustrate that the number of retries that broadcast DHCP re-rents bag reaches the upper limit, broadcast DHCP can not be continued again and re-rent bag, then can perform step 313.
313, VoIP terminal re-starts DHCP request;
In the present embodiment, if VoIP terminal determines to broadcast the number of retries that DHCP re-rents bag exceeded predetermined times, then illustrate and re-rent failure, this may be because the original IP address of this VoIP terminal is redistributed by Dynamic Host Configuration Protocol server, cannot cause for this VoIP terminal carries out re-renting again.
Now, VoIP terminal can resend DHCP request to Dynamic Host Configuration Protocol server, to require that Dynamic Host Configuration Protocol server is the IP address that this VoIP terminal distribution one is new again.
314, whether successfully VoIP terminal judges re-starts DHCP request, if so, then can perform step 307, if not, then can perform step 313.
VoIP terminal is to after Dynamic Host Configuration Protocol server resends DHCP request, whether successfully can judge to re-start DHCP request, if success, then illustrate that VoIP terminal can get a newly assigned IP address, now VoIP terminal can use this newly assigned IP address and primary VoIP server to carry out alternately to proceed VoIP business, if unsuccessful, then illustrate that VoIP terminal does not get newly assigned IP address, then VoIP terminal can continue to perform step 313, till getting a newly assigned IP address.
In the present embodiment, when VoIP terminal sends after message to VoIP server, if when not receiving the response of VoIP server in preset time period, then VoIP terminal can carry out VoIP channel detection, and when the failure of VoIP channel detection, DHCP can be broadcasted and re-rent bag to re-rent IP address, thus again carry out with VoIP server alternately, so, if due to the reason of Network Abnormal, Dynamic Host Configuration Protocol server releases the IP address of VoIP terminal, so VoIP terminal also can when finding that communication port detects unsuccessfully, in time IP address is re-rented, mutual with what recover as early as possible between VoIP server, therefore, it is possible to recover VoIP business in time when network recovery is normal, thus raising Consumer's Experience,
In addition, if VoIP terminal check re-rents failure, then again can send DHCP request to Dynamic Host Configuration Protocol server, and receive the dhcp response of Dynamic Host Configuration Protocol server feedback, with to the new IP address of Dynamic Host Configuration Protocol server request dispatching, then VoIP terminal can use this newly assigned IP address to carry out registration also alternately to VoIP server, thus recovers VoIP business.
Be described the data communications method in the embodiment of the present invention above, be described below, refer to Fig. 4 to the communication terminal in the embodiment of the present invention, in the embodiment of the present invention, communication terminal embodiment comprises:
First interactive unit 401, carries out alternately for using the internet protocol address that gets and the communication server;
Transmitting element 402, for sending message to the communication server;
Probe unit 403, for when not receiving the response of the communication server in preset time period, carries out communication port detection;
Radio unit 404, for carry out when probe unit communication port detect unsuccessfully time, broadcast dynamic host configuration protocol DHCP re-rent bag to re-rent IP address;
Second interactive unit 405, for when re-renting successfully, carries out with the communication server again alternately.
In the present embodiment, when transmitting element 402 sends after message to VoIP server, if when not receiving the response of VoIP server in preset time period, then probe unit 403 can carry out VoIP channel detection, and when the failure of VoIP channel detection, radio unit 404 can be broadcasted DHCP and be re-rented bag to re-rent IP address, thus again carry out with VoIP server alternately, so, if due to the reason of Network Abnormal, Dynamic Host Configuration Protocol server releases the IP address of VoIP terminal, so VoIP terminal also can when finding that communication port detects unsuccessfully, in time IP address is re-rented, mutual with what recover as early as possible between VoIP server, therefore, it is possible to recover VoIP business in time when network recovery is normal, thus raising Consumer's Experience.
Be described in detail the communication terminal in the embodiment of the present invention with an example below, refer to Fig. 5, in the embodiment of the present invention, another embodiment of communication terminal comprises:
First interactive unit 501, carries out alternately for using the internet protocol address that gets and the communication server;
Transmitting element 502, for sending message to the communication server;
Probe unit 503, for when not receiving the response of the communication server in preset time period, carries out communication port detection;
Radio unit 504, for carry out when probe unit communication port detect unsuccessfully time, broadcast dynamic host configuration protocol DHCP re-rent bag to re-rent IP address;
Second interactive unit 505, for when re-renting successfully, carries out with the communication server again alternately.
Communication terminal in the present embodiment can further include:
3rd interactive unit 506, for carry out when probe unit communication port detect successfully time, carry out alternately with spare communication server.
Communication terminal in the present embodiment can further include:
Request unit 507, for when re-renting unsuccessfully, resends DHCP request to Dynamic Host Configuration Protocol server.
Communication terminal in the present embodiment can further include:
Receiving element 508, for receiving the dhcp response of Dynamic Host Configuration Protocol server feedback, comprises newly assigned IP address in dhcp response;
Registering unit 509, registers to the communication server for using newly assigned IP address;
4th interactive unit 510, for after registering unit has been registered, has used newly assigned IP address and the communication server to carry out alternately.
For ease of understanding, with a practical application scene, the reciprocal process between the communication terminal in the present embodiment and the communication server is described in detail below, it should be noted that, communication terminal in the present embodiment can be VoIP terminal, the communication server can be VoIP server, be understandable that, in actual applications, this communication terminal can also be the communication terminal of other types, this communication server can also be the communication server of other types, specifically do not limit herein, be only described for VoIP terminal and VoIP server in the present embodiment:
In the present embodiment, VoIP terminal is when needs carry out VoIP business, first the IP address into this VoIP terminal distribution can be got from Dynamic Host Configuration Protocol server, and use this IP address to register to VoIP server, this IP address and VoIP server just can be used afterwards to carry out data interaction, thus carry out VoIP business.
Only be described using VoIP business as communication service example in the present embodiment, be understandable that, in actual applications, in addition to voip traffic, can also be the communication service of other types, such as network video service, media delivery business etc., specifically do not limit herein, be only described for VoIP business.
In the present embodiment, message can be sent to VoIP server in the process of VoIP terminal and VoIP server.
Message in the present embodiment can be multiple message, and such as heavy logon message, call business message, heartbeat message etc., specifically do not limit herein.
In the present embodiment, VoIP terminal is after sending message to VoIP server, can judge within preset duration, whether receive the response of VoIP server for this message, if receive, then illustrate that the communication between VoIP terminal and VoIP server is normal, then can proceed VoIP business, if do not receive, communication abnormality between VoIP terminal and VoIP server is then described, then can carries out VoIP channel detection.
If VoIP terminal sends after message to VoIP server, within preset duration, do not receive the response of VoIP server for this message, then VoIP terminal can carry out VoIP channel detection.
Concrete, the mode that ARP detects can be adopted, or the mode of PING detection carries out VoIP channel detection, is understandable that, in actual applications, other mode can also be adopted to carry out VoIP channel detection, specifically do not limit herein.
In the present embodiment, according to ARP message or PING message interaction, whether VoIP terminal can normally judge that whether VoIP channel detection is successful, if normal alternately, then the success of VoIP channel detection is described, if abnormal, then illustrates that VoIP channel detection is unsuccessful.
In the present embodiment, if VoIP terminal determines the success of VoIP channel detection after carrying out VoIP channel detection, then illustrate that VoIP passage is normal, communication abnormality between VoIP terminal and VoIP server is because the reason of VoIP server causes, so now VoIP terminal can be carried out mutual to proceed VoIP business according to preset strategy and VoIP server for subsequent use.
In the present embodiment, if VoIP terminal determines the failure of VoIP channel detection after carrying out VoIP channel detection, then VoIP channel abnormal is described, communication abnormality between VoIP terminal and VoIP server is because the IP address failure of VoIP terminal causes, then VoIP terminal can be broadcasted DHCP and re-rent bag to re-rent IP address.
After VoIP terminal broadcast DHCP re-rents bag, what can judge whether to receive Dynamic Host Configuration Protocol server feedback in preset time period re-rents response, if receive, then illustrates and re-rents successfully, if do not receive, then illustrates and re-rents failure.
Above-mentionedly only describe VoIP terminal with an example and how to judge to re-rent whether success, more mode can also be adopted in actual applications, whether what such as VoIP terminal judges received re-rent in response to indicate allows to re-rent, if instruction allows to re-rent, then illustrating re-rents successfully, re-rent if do not allow, then illustrate and re-rent failure.
Be understandable that, more mode can also be had in actual applications to judge, and whether VoIP terminal is re-rented successful, does not specifically limit herein.
It should be noted that, if VoIP terminal is re-rented successfully, then original IP address of VoIP terminal can continue to use, namely can by VoIP terminal and VoIP server interaction to proceed VoIP business.
In the present embodiment, if VoIP terminal re-rents failure, then illustrate that the original IP address of this VoIP terminal is redistributed by Dynamic Host Configuration Protocol server, cannot re-rent for this VoIP terminal again.
Now, VoIP terminal can resend DHCP request to Dynamic Host Configuration Protocol server, to require that Dynamic Host Configuration Protocol server is the IP address that this VoIP terminal distribution one is new again.
VoIP terminal sends after DHCP request to Dynamic Host Configuration Protocol server, can receive dhcp response, comprise the promising newly assigned IP address of this VoIP terminal in this dhcp response from Dynamic Host Configuration Protocol server.
VoIP terminal can extract newly assigned IP address from the dhcp response received, and uses this newly assigned IP address to register to VoIP server.
When VoIP terminal uses newly assigned IP address to after VoIP server is registered, this newly assigned IP address and VoIP server can be used to carry out alternately, thus proceed VoIP business.
In the present embodiment, when VoIP terminal sends after message to VoIP server, if when not receiving the response of VoIP server in preset time period, then VoIP terminal can carry out VoIP channel detection, and when the failure of VoIP channel detection, DHCP can be broadcasted and re-rent bag to re-rent IP address, thus again carry out with VoIP server alternately, so, if due to the reason of Network Abnormal, Dynamic Host Configuration Protocol server releases the IP address of VoIP terminal, so VoIP terminal also can when finding that communication port detects unsuccessfully, in time IP address is re-rented, mutual with what recover as early as possible between VoIP server, therefore, it is possible to recover VoIP business in time when network recovery is normal, thus raising Consumer's Experience,
In addition, if VoIP terminal check re-rents failure, then again can send DHCP request to Dynamic Host Configuration Protocol server, and receive the dhcp response of Dynamic Host Configuration Protocol server feedback, with to the new IP address of Dynamic Host Configuration Protocol server request dispatching, then VoIP terminal can use this newly assigned IP address to carry out registration also alternately to VoIP server, thus recovers VoIP business.
From the angle of functional module, the communication terminal the embodiment of the present invention is described above, from practical application, the angle of the composition structure of communication terminal is described the communication terminal in the embodiment of the present invention below, refer to Fig. 6, another embodiment of the communication terminal in the embodiment of the present invention comprises:
Message module 601, message result treatment module 602, detecting module 603, abnormality processing module 604 and DHCP process processing module 605;
Transmission result for sending logon message, service message, and is informed message result treatment module 602 by message module 601;
Message result treatment module 602 is analyzed transmission result, and determines trigger detection module 603 or abnormality processing module 604 according to analysis result;
Detecting module 603 for detecting communication port, and determines trigger DHCP process processing module 605 or trigger message module 601 according to result of detection;
Abnormality processing module 604, for according to the switching between the primary communication server of timer start by set date and spare communication server, makes message module 601 send message to the primary communication server or spare communication server;
DHCP process processing module 605 is re-rented for carrying out DHCP and restarts dhcp process, until success, and triggers message module 601 and carries out respective handling.
Detecting module 603 in the present embodiment can be ARP detecting module in actual applications, or PING detecting module, or can also be the detecting module of other types, does not specifically limit herein.
In the present embodiment, when communication terminal sends after message to the communication server, if when not receiving the response of the communication server in preset time period, then this communication terminal can carry out communication port detection, and when communication port detects unsuccessfully, DHCP can be broadcasted and re-rent bag to re-rent IP address, thus again carry out with the communication server alternately, so for VoIP business, if due to the reason of Network Abnormal, Dynamic Host Configuration Protocol server releases the IP address of VoIP terminal, so VoIP terminal also can when finding that communication port detects unsuccessfully, in time IP address is re-rented, mutual with what recover as early as possible between VoIP server, therefore, it is possible to recover VoIP business in time when network recovery is normal, thus raising Consumer's Experience.
Those skilled in the art can be well understood to, and for convenience and simplicity of description, the system of foregoing description, the specific works process of device and unit, with reference to the corresponding process in preceding method embodiment, can not repeat them here.
In several embodiments that the application provides, should be understood that, disclosed system, apparatus and method, can realize by another way.Such as, device embodiment described above is only schematic, such as, the division of described unit, be only a kind of logic function to divide, actual can have other dividing mode when realizing, such as multiple unit or assembly can in conjunction with or another system can be integrated into, or some features can be ignored, or do not perform.Another point, shown or discussed coupling each other or direct-coupling or communication connection can be by some interfaces, and the indirect coupling of device or unit or communication connection can be electrical, machinery or other form.
The described unit illustrated as separating component or can may not be and physically separates, and the parts as unit display can be or may not be physical location, namely can be positioned at a place, or also can be distributed in multiple network element.Some or all of unit wherein can be selected according to the actual needs to realize the object of the present embodiment scheme.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, also can be that the independent physics of unit exists, also can two or more unit in a unit integrated.Above-mentioned integrated unit both can adopt the form of hardware to realize, and the form of SFU software functional unit also can be adopted to realize.
If described integrated unit using the form of SFU software functional unit realize and as independently production marketing or use time, can be stored in a computer read/write memory medium.Based on such understanding, the part that technical scheme of the present invention contributes to prior art in essence in other words or all or part of of this technical scheme can embody with the form of software product, this computer software product is stored in a storage medium, comprising some instructions in order to make a computer equipment (can be personal computer, server, or the network equipment etc.) perform all or part of step of method described in each embodiment of the present invention.And aforesaid storage medium comprises: USB flash disk, portable hard drive, read-only memory (ROM, Read-OnlyMemory), random access memory (RAM, Random Access Memory), magnetic disc or CD etc. various can be program code stored medium.
The above, above embodiment only in order to technical scheme of the present invention to be described, is not intended to limit; Although with reference to previous embodiment to invention has been detailed description, those of ordinary skill in the art is to be understood that: it still can be modified to the technical scheme described in foregoing embodiments, or carries out equivalent replacement to wherein portion of techniques feature; And these amendments or replacement, do not make the essence of appropriate technical solution depart from the spirit and scope of various embodiments of the present invention technical scheme.
Claims (4)
1. a data communications method, is characterized in that, comprising:
Communication terminal uses the internet protocol address that gets and the communication server to carry out alternately;
Communication terminal sends message to the described communication server;
When described communication terminal does not receive the response of the described communication server in preset time period, described communication terminal carries out communication port detection;
Detect unsuccessfully if described communication terminal carries out communication port, then described communication terminal broadcast dynamic host configuration protocol DHCP re-rents bag to re-rent IP address;
If re-rent successfully, then described communication terminal carries out with the described communication server alternately again;
Detect successfully if described communication terminal carries out communication port, then described communication terminal and spare communication server carry out alternately;
If re-rent failure, then described communication terminal resends DHCP request to Dynamic Host Configuration Protocol server;
Described communication terminal comprises after Dynamic Host Configuration Protocol server resends DHCP request:
Described communication terminal receives the dhcp response of described Dynamic Host Configuration Protocol server feedback, comprises newly assigned IP address in described dhcp response;
Described communication terminal uses described newly assigned IP address to register to the described communication server;
After having registered, described communication terminal uses described newly assigned IP address and the described communication server to carry out alternately.
2. method according to claim 1, is characterized in that, described communication terminal carries out communication port detection and comprises:
Described communication terminal adopts ARP detection mode, or PING detection mode carries out communication port detection.
3. a communication terminal, is characterized in that, comprising:
First interactive unit, carries out alternately for using the internet protocol address that gets and the communication server;
Transmitting element, for sending message to the described communication server;
Probe unit, for when not receiving the response of the described communication server in preset time period, carries out communication port detection;
Radio unit, for carry out when described probe unit communication port detect unsuccessfully time, broadcast dynamic host configuration protocol DHCP re-rent bag to re-rent IP address;
Second interactive unit, for when re-renting successfully, carries out with the described communication server alternately again;
Described communication terminal also comprises:
3rd interactive unit, for carry out when described probe unit communication port detect successfully time, carry out alternately with spare communication server;
Described communication terminal also comprises:
Request unit, for when re-renting unsuccessfully, resends DHCP request to Dynamic Host Configuration Protocol server;
Described communication terminal also comprises:
Receiving element, for receiving the dhcp response of described Dynamic Host Configuration Protocol server feedback, comprises newly assigned IP address in described dhcp response;
Registering unit, registers to the described communication server for using described newly assigned IP address;
4th interactive unit, for after described registering unit has been registered, has used described newly assigned IP address and the described communication server to carry out alternately.
4. a communication terminal, is characterized in that, comprising:
Message module, message result treatment module, detecting module, abnormality processing module and DHCP process processing module;
Transmission result for sending logon message, service message, and is informed message result treatment module by described message module;
Described message result treatment module is analyzed described transmission result, and determines trigger detection module or abnormality processing module according to analysis result;
Described detecting module is used for detecting communication port, and determines that triggering DHCP process processing module still triggers message module according to result of detection;
Described abnormality processing module is used for according to the switching between the primary communication server of timer start by set date and spare communication server, makes described message module send message to the primary communication server or spare communication server;
Described DHCP process processing module is used for carrying out DHCP and re-rents and restart dhcp process, until success, and triggers described message module and carries out respective handling.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210527641.3A CN103024226B (en) | 2012-12-10 | 2012-12-10 | Data communication method and communication terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210527641.3A CN103024226B (en) | 2012-12-10 | 2012-12-10 | Data communication method and communication terminal |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103024226A CN103024226A (en) | 2013-04-03 |
CN103024226B true CN103024226B (en) | 2015-04-15 |
Family
ID=47972336
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210527641.3A Active CN103024226B (en) | 2012-12-10 | 2012-12-10 | Data communication method and communication terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103024226B (en) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104683188A (en) * | 2015-03-23 | 2015-06-03 | 太仓市同维电子有限公司 | Method for quickly detecting communication of IP channel of household router |
CN105813056A (en) * | 2016-05-06 | 2016-07-27 | 广东欧珀移动通信有限公司 | Network access method and terminal |
CN106789317A (en) * | 2016-12-30 | 2017-05-31 | 广州市保伦电子有限公司 | A kind of server switching method and its device |
CN108471369B (en) * | 2018-06-27 | 2021-01-15 | 深圳创维数字技术有限公司 | Network dialing method, device and storage medium |
WO2021163873A1 (en) * | 2020-02-18 | 2021-08-26 | Arris Enterprises Llc | Apparatus, system, method, and computer-readable recording media for establishing connections between a network device and remote data servers |
CN112686691A (en) * | 2020-12-22 | 2021-04-20 | 中科网联数据科技有限公司 | Advertisement monitoring system and method |
CN115529255A (en) * | 2021-06-25 | 2022-12-27 | 华为技术有限公司 | Connection detection method, client and server |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2004038979A3 (en) * | 2002-10-24 | 2005-04-28 | Optical Solutions Inc | Passive optical network address association recovery |
CN1816056A (en) * | 2005-02-02 | 2006-08-09 | 日本电气株式会社 | Network, network terminal device, method and program for ip address management using same |
CN1897595A (en) * | 2005-07-11 | 2007-01-17 | 华为技术有限公司 | Method for processing dynamic IP address by wireless access technology |
CN101657002A (en) * | 2008-08-22 | 2010-02-24 | 三美电机株式会社 | Mobile station and its communicating system and communicating system |
CN101778107A (en) * | 2010-01-15 | 2010-07-14 | 中兴通讯股份有限公司 | State synchronization processing method and device |
-
2012
- 2012-12-10 CN CN201210527641.3A patent/CN103024226B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2004038979A3 (en) * | 2002-10-24 | 2005-04-28 | Optical Solutions Inc | Passive optical network address association recovery |
CN1816056A (en) * | 2005-02-02 | 2006-08-09 | 日本电气株式会社 | Network, network terminal device, method and program for ip address management using same |
CN1897595A (en) * | 2005-07-11 | 2007-01-17 | 华为技术有限公司 | Method for processing dynamic IP address by wireless access technology |
CN101657002A (en) * | 2008-08-22 | 2010-02-24 | 三美电机株式会社 | Mobile station and its communicating system and communicating system |
CN101778107A (en) * | 2010-01-15 | 2010-07-14 | 中兴通讯股份有限公司 | State synchronization processing method and device |
Also Published As
Publication number | Publication date |
---|---|
CN103024226A (en) | 2013-04-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103024226B (en) | Data communication method and communication terminal | |
TWI289984B (en) | Method and system for handling service failures | |
CN110708766B (en) | Control method of user equipment and user equipment | |
KR101591102B1 (en) | Method for router of virtual router redundancy protocol and communication system therefor | |
CN103905579B (en) | The communication means of platform and terminal room, communication system, platform and relevant device | |
CN101729426B (en) | Method and system for quickly switching between master device and standby device of virtual router redundancy protocol (VRRP) | |
US20140247772A1 (en) | Robustness Header Compression Processing Method, Compressor And System | |
CN1290350C (en) | Method of registering mobile IP (MIP) for mobile node (MN), system and group data service node | |
CN103347031B (en) | A kind of method and apparatus taking precautions against ARP message aggression | |
CN103795518A (en) | Method, device, and system for synchronizing port modes between devices | |
CN111226463B (en) | Method and device for processing link establishment failure and computer storage medium | |
CN103138984A (en) | Method and system of disaster recovery back serving call session control function | |
CN105578449A (en) | Method and device for changing virtual SIM card | |
CN104009961B (en) | A kind of pppoe session mark distributing method and equipment | |
WO2017219815A1 (en) | Message transmission system, message sending method and device, and message receiving method and device | |
CN107517493A (en) | Connection method, device and the terminal of radio resource control RRC | |
CN1852183A (en) | Method and apparatus for detecting counter defect indication-path condition | |
CN101594674B (en) | Information interaction method used for wireless access network information management | |
CN110933775A (en) | Method and device for establishing signal connection and electronic equipment | |
EP3223493A1 (en) | Point-to-point protocol (ppp)-based dial-on-demand method and device, and computer storage medium | |
CN107172720A (en) | Call control method and device | |
CN115460157A (en) | Multi-network-card converged communication method and communication system | |
CN109246689B (en) | Data connection recovery method and user equipment thereof | |
CN113595765A (en) | Method and device for fault transfer of VoIP terminal registration service | |
CN110121215B (en) | Data connection establishment method and device of 5G terminal and 5G terminal |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |