[go: up one dir, main page]

CN106603306B - method and device for processing network connection abnormity - Google Patents

method and device for processing network connection abnormity Download PDF

Info

Publication number
CN106603306B
CN106603306B CN201611262914.0A CN201611262914A CN106603306B CN 106603306 B CN106603306 B CN 106603306B CN 201611262914 A CN201611262914 A CN 201611262914A CN 106603306 B CN106603306 B CN 106603306B
Authority
CN
China
Prior art keywords
network connection
preset period
connection state
detected
processing module
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
Application number
CN201611262914.0A
Other languages
Chinese (zh)
Other versions
CN106603306A (en
Inventor
李贺伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jiuchang Shenzhou Technology Co.,Ltd.
Original Assignee
Yulong Computer Telecommunication Scientific Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yulong Computer Telecommunication Scientific Shenzhen Co Ltd filed Critical Yulong Computer Telecommunication Scientific Shenzhen Co Ltd
Priority to CN201611262914.0A priority Critical patent/CN106603306B/en
Publication of CN106603306A publication Critical patent/CN106603306A/en
Application granted granted Critical
Publication of CN106603306B publication Critical patent/CN106603306B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Telephonic Communication Services (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本发明实施例公开了一种网络连接异常的处理方法及装置,用于提供一种网络连接状态的检测方法以及网络连接异常的修复方法。本发明实施例方法包括:检测网络连接状态;若在第一预设周期内所述网络连接状态为连接异常,则在所述第一预设周期后更新数据链路的状态,并继续检测所述网络连接状态;若在第二预设周期内所述网络连接状态为连接异常,则在所述第二预设周期后中断所述数据链路、重新拨号、重新建立所述数据链路,并继续检测所述网络连接状态;若在第三预设周期内所述网络连接状态为连接异常,则在所述第三预设周期后重启调制解调器、重新进行网络注册、重新拨号、重新建立所述数据链路。本发明实施例检测周期可以自定义且修复步骤较少。

The embodiment of the invention discloses a method and device for processing an abnormal network connection, which are used to provide a method for detecting the state of a network connection and a method for repairing an abnormal network connection. The method in the embodiment of the present invention includes: detecting the network connection status; if the network connection status is an abnormal connection within the first preset period, updating the status of the data link after the first preset period, and continuing to detect all The network connection status; if the network connection status is abnormal connection within the second preset period, then interrupt the data link, redial, and re-establish the data link after the second preset period, And continue to detect the network connection status; if the network connection status is abnormal in the third preset period, restart the modem after the third preset period, re-register the network, redial, and re-establish the data link. In this embodiment of the present invention, the detection cycle can be customized and there are fewer repair steps.

Description

一种网络连接异常的处理方法及装置Method and device for processing abnormal network connection

技术领域technical field

本发明涉及网络数据传输领域,尤其是涉及一种网络连接异常的处理方法及装置。The invention relates to the field of network data transmission, in particular to a method and device for processing abnormal network connections.

背景技术Background technique

在现有技术中,当终端发生网络连接时的数据异常时,通常是有上行数据而没有下行数据,终端可以对数据异常的状态进行修复,但是现有技术的修复程序较为繁琐,而且进行网络连接状态的检测时的检测周期过长,用户体验较差。In the prior art, when the data abnormality occurs when the terminal is connected to the network, there is usually uplink data but no downlink data, and the terminal can repair the status of the abnormal data. The detection period of connection state detection is too long, and the user experience is poor.

发明内容Contents of the invention

本发明实施例提供了一种网络连接异常的处理方法及装置,用于提供一种网络连接状态的检测方法以及网络连接异常的修复方法。Embodiments of the present invention provide a method and device for processing an abnormal network connection, which are used to provide a method for detecting a state of a network connection and a method for repairing an abnormal network connection.

有鉴于此,本发明的第一方面提供一种网络连接异常的处理方法,包括:In view of this, the first aspect of the present invention provides a method for processing abnormal network connections, including:

(1)检测网络连接状态;(1) Detect the network connection status;

(2)若在第一预设周期内网络连接状态为连接异常,则在第一预设周期后更新数据链路的状态,并继续检测网络连接状态;(2) If the network connection status is an abnormal connection within the first preset period, then update the status of the data link after the first preset period, and continue to detect the network connection status;

(3)若在第二预设周期内网络连接状态为连接异常,则在第二预设周期后中断数据链路、重新拨号、重新建立数据链路,并继续检测网络连接状态;(3) If the network connection status is abnormal in the second preset period, then interrupt the data link, redial, re-establish the data link after the second preset period, and continue to detect the network connection status;

(4)若在第三预设周期内网络连接状态为连接异常,则在第三预设周期后重启调制解调器、重新进行网络注册、重新拨号、重新建立数据链路。(4) If the network connection status is abnormal within the third preset period, restart the modem after the third preset period, perform network registration again, dial again, and re-establish the data link.

结合本发明实施例的第一方面,在本发明实施例的第一方面的第一种实施方式中,网络连接状态为连接异常包括网络连接状态只检测到上行数据而不能检测到下行数据。With reference to the first aspect of the embodiments of the present invention, in the first implementation manner of the first aspect of the embodiments of the present invention, the network connection status being abnormal connection includes that the network connection status only detects uplink data but cannot detect downlink data.

结合本发明实施例的第一方面、第一方面的第一种实施方式之中的任意一种,在本发明实施例的第一方面的第二种实施方式中,检测网络连接状态之前,还包括:In combination with any one of the first aspect of the embodiments of the present invention and the first implementation manner of the first aspect, in the second implementation manner of the first aspect of the embodiments of the present invention, before detecting the network connection status, further include:

使用ping指令检测网络连接状态;Use the ping command to detect the network connection status;

若网络连接状态为连接异常,则执行步骤(1)至步骤(4)。If the network connection status is abnormal, perform steps (1) to (4).

结合本发明实施例的第一方面、第一方面的第一种至第二种实施方式之中的任意一种,在本发明实施例的第一方面的第三种实施方式中,执行步骤(4)之后,还包括:In combination with the first aspect of the embodiments of the present invention, any one of the first to second implementation manners of the first aspect, in the third implementation manner of the first aspect of the embodiments of the present invention, the step ( 4) After that, also include:

重复执行步骤(1)至步骤(4)直到检测到网络连接状态为连接正常。Repeat step (1) to step (4) until it detects that the network connection status is normal.

结合本发明实施例的第一方面、第一方面的第一种至第三种实施方式之中的任意一种,在本发明实施例的第一方面的第四种实施方式中,执行步骤(4)之后,还包括:In combination with the first aspect of the embodiments of the present invention, any one of the first to third implementation manners of the first aspect, in the fourth implementation manner of the first aspect of the embodiments of the present invention, the step ( 4) After that, also include:

重复执行步骤(1)至步骤(4)直到重复执行的次数达到预设值。Repeat step (1) to step (4) until the number of repeated executions reaches the preset value.

本发明的第二方面提供一种装置,包括:A second aspect of the present invention provides a device, comprising:

检测模块,用于检测网络连接状态;A detection module is used to detect the network connection status;

第一处理模块,用于若在第一预设周期内网络连接状态为连接异常,则在第一预设周期后更新数据链路的状态,并继续检测网络连接状态;The first processing module is configured to update the status of the data link after the first preset period if the network connection status is abnormal during the first preset period, and continue to detect the network connection status;

第二处理模块,用于若在第二预设周期内网络连接状态为连接异常,则在第二预设周期后中断数据链路、重新拨号、重新建立数据链路,并继续检测网络连接状态;The second processing module is used to interrupt the data link, redial, re-establish the data link after the second preset period if the network connection status is abnormal during the second preset period, and continue to detect the network connection status ;

第三处理模块,用于若在第三预设周期内网络连接状态为连接异常,则在第三预设周期后重启调制解调器、重新进行网络注册、重新拨号、重新建立数据链路。The third processing module is configured to restart the modem after the third preset period, re-register the network, re-dial, and re-establish the data link if the network connection status is abnormal within the third preset period.

结合本发明实施例的第二方面,在本发明实施例的第二方面的第一种实施方式中,网络连接状态为连接异常包括网络连接状态只检测到上行数据而不能检测到下行数据。With reference to the second aspect of the embodiments of the present invention, in the first implementation manner of the second aspect of the embodiments of the present invention, the network connection status being abnormal connection includes that the network connection status only detects uplink data but not downlink data.

结合本发明实施例的第二方面和第二方面的第一种实施方式中的任意一种,在本发明实施例的第二方面的第二种实施方式中,还包括:In combination with any one of the second aspect of the embodiment of the present invention and the first implementation manner of the second aspect, in the second implementation manner of the second aspect of the embodiment of the present invention, it further includes:

指令模块,使用ping指令检测网络连接状态;The instruction module uses the ping instruction to detect the network connection status;

指示模块,用于若网络连接状态为连接异常,则指示检测模块、第一处理模块、第二处理模块、第三处理模块工作。The indication module is used to instruct the detection module, the first processing module, the second processing module, and the third processing module to work if the network connection status is an abnormal connection.

结合本发明实施例的第二方面、第二方面的第一种实施方式和第二方面的第二种实施方式中的任意一种,在本发明实施例的第二方面的第三种实施方式中,还包括:In combination with any one of the second aspect of the embodiments of the present invention, the first implementation manner of the second aspect, and the second implementation manner of the second aspect, the third implementation manner of the second aspect of the embodiments of the present invention , also includes:

第一重复模块,用于重复指示检测模块、第一处理模块、第二处理模块、第三处理模块工作直到检测到网络连接状态为连接正常。The first repeating module is used to repeat the work of the indication detection module, the first processing module, the second processing module, and the third processing module until it is detected that the network connection status is normal.

结合本发明实施例的第二方面、第二方面的第一种实施方式至第三种实施方式中的任意一种,在本发明实施例的第二方面的第四种实施方式中,还包括:In combination with the second aspect of the embodiments of the present invention, any one of the first to third implementation manners of the second aspect, in the fourth implementation manner of the second aspect of the embodiments of the present invention, it also includes :

第二重复模块,用于重复指示检测模块、第一处理模块、第二处理模块、第三处理模块工作直到重复执行的次数达到预设值。The second repeating module is used to repeat the work of the indication detection module, the first processing module, the second processing module and the third processing module until the number of repeated executions reaches a preset value.

从以上技术方案可以看出,本发明实施例具有以下优点:It can be seen from the above technical solutions that the embodiments of the present invention have the following advantages:

本发明实施例提供了一种网络连接异常的处理方法及装置,用于检测终端的网络连接状态,并在网络连接状态为连接异常时提供修复步骤。用户可以自定义网络连接状态的检测周期,修复步骤相对于现有技术的修复步骤更为简洁,而且增加了利用ping指令进行网络连接状态的检测方法。本发明实施例步骤较少,检测周期可以自定义,所以本发明实施例效率较高,用时较少。Embodiments of the present invention provide a method and device for processing an abnormal network connection, which are used to detect the network connection state of a terminal, and provide repair steps when the network connection state is an abnormal connection. The user can customize the detection cycle of the network connection state, the repair steps are simpler than those in the prior art, and a method of detecting the network connection state by using the ping command is added. The embodiment of the present invention has fewer steps, and the detection cycle can be customized, so the embodiment of the present invention has higher efficiency and less time consumption.

附图说明Description of drawings

为了更清楚地说明本发明实施例中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the accompanying drawings used in the embodiments. Obviously, the accompanying drawings in the following description are only embodiments of the present invention. Those of ordinary skill in the art can also obtain other drawings based on the provided drawings on the premise of not paying creative efforts.

图1是本发明实施例的一种网络连接异常的处理方法的一个实施例示意图;FIG. 1 is a schematic diagram of an embodiment of a method for processing an abnormal network connection according to an embodiment of the present invention;

图2是本发明实施例的一种网络连接异常的处理方法的另一个实施例示意图;FIG. 2 is a schematic diagram of another embodiment of a method for processing an abnormal network connection according to an embodiment of the present invention;

图3是本发明实施例的一种装置的一个实施例示意图;Fig. 3 is a schematic diagram of an embodiment of a device according to an embodiment of the present invention;

图4是本发明实施例的一种网络连接异常的处理设备的一个实施例示意图。Fig. 4 is a schematic diagram of an embodiment of a device for processing an abnormal network connection according to an embodiment of the present invention.

具体实施方式Detailed ways

本发明实施例提供了一种一种网络连接异常的处理方法及装置,用于检测终端的网络连接状态,并在网络连接状态为连接异常时提供修复步骤。Embodiments of the present invention provide a method and device for processing an abnormal network connection, which are used to detect the network connection state of a terminal, and provide repair steps when the network connection state is abnormal.

为了使本技术领域的人员更好地理解本发明方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分的实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本发明保护的范围。In order to enable those skilled in the art to better understand the solutions of the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only It is an embodiment of a part of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts shall fall within the protection scope of the present invention.

本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”、“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。The terms "first", "second", "third", "fourth", etc. (if any) in the description and claims of the present invention and the above drawings are used to distinguish similar objects, and not necessarily Used to describe a specific sequence or sequence. It is to be understood that the terms so used are interchangeable under appropriate circumstances such that the embodiments described herein can be practiced in sequences other than those illustrated or described herein. Furthermore, the terms "comprising" and "having", as well as any variations thereof, are intended to cover a non-exclusive inclusion, for example, a process, method, system, product or device comprising a sequence of steps or elements is not necessarily limited to the expressly listed instead, may include other steps or elements not explicitly listed or inherent to the process, method, product or apparatus.

在本发明实施例中,当终端检测到网络连接状态发生连接异常时,会进行相关处理。下面就相关工作流程作详细的说明,此处请参阅图1。In the embodiment of the present invention, when the terminal detects that the network connection status is abnormal, it will perform related processing. The relevant workflow will be described in detail below, please refer to Figure 1 here.

步骤101、检测网络连接状态;Step 101, detecting network connection status;

当终端不能正常上网时,终端开始检测网络连接状态,主要是检测网络连接时上行数据以及下行数据的流量情况,如果只有上行数据而没有下行数据,说明此事网络连接状态为连接异常,这里的终端可以为包括手机、平板电脑、个人数字助理、车载电脑等任意终端设备,这里以终端为手机为例。When the terminal cannot access the Internet normally, the terminal starts to detect the network connection status, mainly to detect the flow of uplink data and downlink data during network connection. If there is only uplink data but no downlink data, it means that the network connection status is abnormal. Here The terminal may be any terminal device including a mobile phone, a tablet computer, a personal digital assistant, a vehicle-mounted computer, etc. Here, the terminal is a mobile phone as an example.

步骤102、若在第一预设周期内网络连接状态为连接异常,则在第一预设周期后更新数据链路的状态,并继续检测网络连接状态;Step 102. If the network connection status is abnormal within the first preset period, update the status of the data link after the first preset period, and continue to detect the network connection status;

假如终端在第一个预设周期内检测网络连接状态发现连接异常,则在第一个预设周期之后开始对异常的网络进行处理。首先终端会更新网络连接时使用的数据链路的状态,更新完数据链路的状态后终端继续检测网络连接状态来确定网络连接状态是否能恢复正常。例如,终端如果在20秒的第一个预设周期内,发现数据流只有上行数据而没有下行数据,则确定网络连接状态为连接异常,终端更新数据链路的状态,并在下一个预设周期继续检测网络连接状态。If the terminal detects the network connection status within the first preset period and finds that the connection is abnormal, it starts to process the abnormal network after the first preset period. Firstly, the terminal will update the status of the data link used for network connection. After updating the status of the data link, the terminal will continue to detect the network connection status to determine whether the network connection status can return to normal. For example, if the terminal finds that there is only uplink data but no downlink data in the data stream within the first preset period of 20 seconds, it determines that the network connection status is abnormal, and the terminal updates the status of the data link, and in the next preset period Continue to check the network connection status.

步骤103、若在第二预设周期内网络连接状态为连接异常,则在第二预设周期后中断数据链路、重新拨号、重新建立数据链路,并继续检测网络连接状态;Step 103. If the network connection status is abnormal within the second preset period, then interrupt the data link, redial, re-establish the data link after the second preset period, and continue to detect the network connection status;

在步骤102后,如果终端的网络连接状态没有恢复正常,在第二个预设周期内仍然是连接异常,则在第二个预设周期之后开始对异常的网络进行处理。首先终端会中断网络连接时使用的数据链路,然后重新进行拨号上网,之后重新建立数据链路,并继续检测网络连接状态来确定网络连接状态是否能恢复正常。例如,终端如果在15秒的第二个预设的周期内,发现数据流只有上行数据而没有下行数据,则确定网络连接状态为连接异常,终端中断数据链路、重新拨号、重新建立数据链路的状态,并在下一个预设周期继续检测网络连接状态。After step 102, if the network connection status of the terminal has not returned to normal, and the connection is still abnormal within the second preset period, the abnormal network will be processed after the second preset period. Firstly, the terminal will interrupt the data link used for network connection, then dial-up to access the Internet again, and then re-establish the data link, and continue to detect the network connection status to determine whether the network connection status can return to normal. For example, if the terminal finds that the data flow has only uplink data but no downlink data within the second preset period of 15 seconds, it determines that the network connection status is abnormal connection, and the terminal interrupts the data link, redials, and re-establishes the data link The state of the road, and continue to detect the network connection state in the next preset cycle.

步骤104、若在第三预设周期内网络连接状态为连接异常,则在第三预设周期后重启调制解调器、重新进行网络注册、重新拨号、重新建立数据链路;Step 104. If the network connection status is abnormal during the third preset period, restart the modem after the third preset period, re-register the network, redial, and re-establish the data link;

在步骤103后,如果终端的网络连接状态没有恢复正常,在第三个预设周期内仍然是连接异常,则在第三个预设周期之后开始对异常的网络进行处理。首先终端会重新启动调制解调器,然后重新进行网络注册,重新进行拨号上网,之后重新建立数据链路,并继续检测网络连接状态来确定网络连接状态是否能恢复正常。例如,终端如果在15秒的第三个预设的周期内,发现数据流只有上行数据而没有下行数据,则确定网络连接状态为连接异常,终端重新启动调制解调器、重新进行网络注册、重新拨号、重新建立数据链路的状态。After step 103, if the network connection status of the terminal has not returned to normal, and the connection is still abnormal within the third preset period, the abnormal network will be processed after the third preset period. First, the terminal will restart the modem, then re-register the network, re-dial-up to access the Internet, and then re-establish the data link, and continue to detect the network connection status to determine whether the network connection status can return to normal. For example, if the terminal finds that the data flow has only uplink data but no downlink data within the third preset period of 15 seconds, it determines that the network connection status is abnormal connection, and the terminal restarts the modem, re-registers with the network, redials, Re-establish the status of the data link.

在上述步骤101、步骤102、步骤103、步骤104中若任意一步步骤检测发现网络连接状态为连接正常,则说明网络状态恢复正常而无需进行下一步的步骤,例如通过步骤102的处理,在第二预设周期的15秒内发现网络连接状态都是正常的,则可以无需进行步骤103的处理。In the above step 101, step 102, step 103, and step 104, if any step detects that the network connection status is normal, it means that the network status returns to normal and there is no need to perform the next step. For example, through the processing of step 102, the first If it is found that the network connection status is normal within 15 seconds of the second preset period, then the processing of step 103 may not be performed.

本发明的一个较佳实施例中,终端可以先通过在命令指示符中输入ping指令检测网络连接状态。而且终端可以重复通过修复步骤来处理网络连接状态的连接异常。下面就相关工作流程作详细的说明,此处请参阅图2。In a preferred embodiment of the present invention, the terminal can first detect the network connection status by inputting a ping command in the command indicator. Moreover, the terminal can repeatedly process the connection abnormality of the network connection state through the repairing steps. The relevant workflow will be described in detail below, please refer to Figure 2 here.

步骤201、使用ping指令检测网络连接状态;Step 201, using the ping command to detect the network connection status;

当终端不能正常上网时,终端会使用ping指令检测网络连接状态。ping指令是系统下的一个命令,ping也属于一个通信协议,是TCP/IP协议的一部分。利用ping指令可以检查网络是否连通,可以作为一种网络诊断工具。例如,可以输入ping加上任意一个常用网址,例如输入“ping 111.0.0.1”这样的ping指令和网址的组合来检测网络连接状态。终端可以通过命令指示符cmd的输入框来进行ping指令的输入,也可以通过其他方式进行ping指令的输入,此处不作具体限定。When the terminal cannot access the Internet normally, the terminal will use the ping command to detect the network connection status. The ping command is a command under the system, and ping also belongs to a communication protocol, which is a part of the TCP/IP protocol. Use the ping command to check whether the network is connected, which can be used as a network diagnostic tool. For example, you can input ping plus any common URL, for example, input a combination of ping command and URL such as "ping 111.0.0.1" to detect the network connection status. The terminal can input the ping command through the input box of the command indicator cmd, or can input the ping command through other methods, which are not specifically limited here.

本发明实施例中,步骤202与步骤101相同,步骤203与步骤102相同,步骤204与步骤103相同,步骤205与步骤104相同,此处不再赘述。In the embodiment of the present invention, step 202 is the same as step 101, step 203 is the same as step 102, step 204 is the same as step 103, and step 205 is the same as step 104, which will not be repeated here.

在本发明实施例中,当步骤201使用ping指令检测网络连接状态后确定网络连接状态为连接正常时,则不会执行步骤202以及后续步骤。当使用ping指令检测网络连接状态后确定网络连接状态为连接异常时,则会执行步骤202以及后续的步骤203、步骤204、步骤205。如果步骤202、步骤203、步骤204、步骤205中若任意一步步骤检测发现网络连接状态为连接正常,则说明网络状态恢复正常而无需进行下一步的步骤。如果在步骤205之后网络连接状态仍然为连接异常时,则可以重新返回并执行步骤202、步骤203、步骤204、步骤205,即终端再次执行一系列处理步骤来修复网络连接状态的问题。终端可以设置重复执行步骤202、步骤203、步骤204、步骤205直到检测到网络连接状态为连接正常才停止。终端也可以设置重复执行步骤202、步骤203、步骤204、步骤205直到重复执行的次数达到预设值才停止,例如终端可以设置重复执行步骤202、步骤203、步骤204、步骤205这一系列步骤共5次,5次后假如终端的网络连接状态仍然是连接异常也停止执行。In the embodiment of the present invention, when step 201 uses the ping command to detect the network connection status and determines that the network connection status is normal, then step 202 and subsequent steps will not be executed. When the ping command is used to detect the network connection status and it is determined that the network connection status is an abnormal connection, step 202 and subsequent steps 203 , 204 , and 205 will be executed. If any step in step 202, step 203, step 204, and step 205 detects that the network connection status is normal, it means that the network status is back to normal without further steps. If the network connection status is still abnormal after step 205, then return to and perform steps 202, 203, 204, and 205, that is, the terminal executes a series of processing steps again to repair the problem of the network connection status. The terminal can be set to repeatedly execute steps 202, 203, 204, and 205 until it detects that the network connection status is normal. The terminal can also be set to repeat step 202, step 203, step 204, and step 205 until the number of repeated executions reaches a preset value before stopping. For example, the terminal can be set to repeatedly execute steps 202, 203, 204, and 205. A total of 5 times. After 5 times, if the network connection status of the terminal is still abnormal, the execution will stop.

上面对本发明实施例中的一种网络连接异常的处理方法进行了描述,下面对本发明实施例中的装置进行描述。A method for processing an abnormal network connection in the embodiment of the present invention has been described above, and the device in the embodiment of the present invention will be described below.

请参阅图3,本发明实施例中的一种装置的一个实施例包括:Referring to Figure 3, an embodiment of a device in an embodiment of the present invention includes:

装置包括检测模块301、第一处理模块302、第二处理模块303、第三处理模块304、指令模块305、指示模块306、第一重复模块307、第二重复模块308。The device includes a detection module 301 , a first processing module 302 , a second processing module 303 , a third processing module 304 , an instruction module 305 , an indication module 306 , a first repeating module 307 , and a second repeating module 308 .

检测模块301,用于检测网络连接状态。The detection module 301 is configured to detect the network connection state.

第一处理模块302,用于若在第一预设周期内网络连接状态为连接异常,则在第一预设周期后更新数据链路的状态,并继续检测网络连接状态。The first processing module 302 is configured to update the status of the data link after the first preset period if the network connection status is abnormal during the first preset period, and continue to detect the network connection status.

第二处理模块303,用于若在第二预设周期内网络连接状态为连接异常,则在第二预设周期后中断数据链路、重新拨号、重新建立数据链路,并继续检测网络连接状态。The second processing module 303 is configured to interrupt the data link, redial, re-establish the data link after the second preset period if the network connection status is abnormal within the second preset period, and continue to detect the network connection state.

第三处理模块304,用于若在第三预设周期内网络连接状态为连接异常,则在第三预设周期后重启调制解调器、重新进行网络注册、重新拨号、重新建立数据链路。The third processing module 304 is configured to restart the modem, re-register the network, re-dial, and re-establish the data link if the network connection status is abnormal within the third preset period.

指令模块305,使用ping指令检测网络连接状态。The instruction module 305 uses the ping instruction to detect the network connection status.

指示模块306,用于若网络连接状态为连接异常,则指示检测模块、第一处理模块、第二处理模块、第三处理模块工作。The indication module 306 is configured to instruct the detection module, the first processing module, the second processing module, and the third processing module to work if the network connection status is abnormal.

第一重复模块307,用于重复指示检测模块、第一处理模块、第二处理模块、第三处理模块工作直到检测到网络连接状态为连接正常。The first repeating module 307 is configured to repeat the work of the indication detection module, the first processing module, the second processing module, and the third processing module until it is detected that the network connection status is normal.

第二重复模块308,用于重复指示检测模块、第一处理模块、第二处理模块、第三处理模块工作直到重复执行的次数达到预设值。The second repeating module 308 is configured to repeat the work of the indication detection module, the first processing module, the second processing module, and the third processing module until the number of repeated executions reaches a preset value.

上面从模块化功能实体的角度对本发明实施例中的一种装置进行描述,下面从硬件角度对本发明实施例中的一种网络连接异常的处理设备进行描述。An apparatus in the embodiment of the present invention is described above from the perspective of modular functional entities, and a device for processing network connection exceptions in the embodiment of the present invention is described below from the perspective of hardware.

请参阅图4,本发明实施例中的一种网络连接异常的处理设备的一个实施例包括处理器401,存储器402。Referring to FIG. 4 , an embodiment of a device for processing an abnormal network connection in an embodiment of the present invention includes a processor 401 and a memory 402 .

存储器402用于存储应用程序。The memory 402 is used to store application programs.

处理器401调用存储在存储器402中的应用程序,以执行如下方法:The processor 401 invokes the application program stored in the memory 402 to perform the following method:

(1)检测网络连接状态;(1) Detect the network connection status;

(2)若在第一预设周期内网络连接状态为连接异常,则在第一预设周期后更新数据链路的状态,并继续检测网络连接状态;(2) If the network connection status is an abnormal connection within the first preset period, then update the status of the data link after the first preset period, and continue to detect the network connection status;

(3)若在第二预设周期内网络连接状态为连接异常,则在第二预设周期后中断数据链路、重新拨号、重新建立数据链路,并继续检测网络连接状态;(3) If the network connection status is abnormal in the second preset period, then interrupt the data link, redial, re-establish the data link after the second preset period, and continue to detect the network connection status;

(4)若在第三预设周期内网络连接状态为连接异常,则在第三预设周期后重启调制解调器、重新进行网络注册、重新拨号、重新建立数据链路。(4) If the network connection status is abnormal within the third preset period, restart the modem after the third preset period, perform network registration again, dial again, and re-establish the data link.

在上述步骤(1)检测网络连接状态之前,处理器401调用存储在存储器402中的应用程序,还用于执行如下方法:Before the above step (1) detects the network connection status, the processor 401 calls the application program stored in the memory 402, and is also used to perform the following method:

使用ping指令检测网络连接状态;Use the ping command to detect the network connection status;

若网络连接状态为连接异常,则执行步骤(1)至步骤(4)。If the network connection status is abnormal, perform steps (1) to (4).

执行步骤(4)之后,处理器401调用存储在存储器402中的应用程序,还用于执行如下方法:After performing step (4), the processor 401 calls the application program stored in the memory 402, and is also used to perform the following method:

重复执行步骤(1)至步骤(4)直到检测到网络连接状态为连接正常。Repeat step (1) to step (4) until it detects that the network connection status is normal.

执行步骤(4)之后,处理器401调用存储在存储器402中的应用程序,还用于执行如下方法:After performing step (4), the processor 401 calls the application program stored in the memory 402, and is also used to perform the following method:

重复执行步骤(1)至步骤(4)直到重复执行的次数达到预设值。Repeat step (1) to step (4) until the number of repeated executions reaches the preset value.

所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the above-described system, device and unit can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here.

在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed system, device and method can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.

所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.

所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-OnlyMemory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the essence of the technical solution of the present invention or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , including several instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk, and other media that can store program codes.

以上所述,以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。As mentioned above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: it can still understand the foregoing The technical solutions recorded in each embodiment are modified, or some of the technical features are replaced equivalently; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims (8)

1. A method for processing network connection abnormity is characterized by comprising the following steps:
(1) Detecting a network connection state;
(2) if the network connection state is that only uplink data is detected but downlink data cannot be detected in a first preset period, updating the state of the data link after the first preset period, and continuously detecting the network connection state;
(3) If the network connection state is that only uplink data but downlink data cannot be detected in a second preset period, interrupting the data link, redialing, reestablishing the data link and continuously detecting the network connection state after the second preset period;
(4) and if the network connection state is that only the uplink data but not the downlink data is detected in a third preset period, restarting the modem, performing network registration again, dialing again and reestablishing the data link after the third preset period.
2. The method for processing network connection abnormality according to claim 1, before detecting the network connection state, further comprising:
Detecting the network connection status using a ping instruction;
And (4) if the network connection state is that only the uplink data is detected but the downlink data cannot be detected, executing the steps (1) to (4).
3. The method for processing network connection exception according to claim 2, further comprising, after performing the step (4):
repeating the steps (1) to (4) until the network connection state is detected to be normal.
4. The method for processing network connection exception according to claim 2, further comprising, after performing the step (4):
And (4) repeatedly executing the steps (1) to (4) until the repeated execution times reach a preset value.
5. an apparatus for handling network connection exceptions, comprising:
the detection module is used for detecting the network connection state;
A first processing module, configured to update a state of a data link after a first preset period and continue to detect the network connection state if the network connection state is that only uplink data is detected but downlink data cannot be detected within the first preset period;
a second processing module, configured to, if the network connection state is that only uplink data but downlink data cannot be detected in a second preset period, interrupt the data link, redial, reestablish the data link, and continue to detect the network connection state after the second preset period;
And the third processing module is used for restarting the modem, performing network registration again, redialing and reestablishing the data link after a third preset period if the network connection state is that only the uplink data is detected but the downlink data cannot be detected within the third preset period.
6. the apparatus of claim 5, further comprising:
an instruction module to detect the network connection status using a ping instruction;
And the indicating module is used for indicating the detecting module, the first processing module, the second processing module and the third processing module to work if the network connection state is that only uplink data is detected but downlink data cannot be detected.
7. the apparatus of claim 6, further comprising:
The first repeating module is configured to repeatedly instruct the detecting module, the first processing module, the second processing module, and the third processing module to work until it is detected that the network connection state is normal.
8. The apparatus of claim 6, further comprising:
And the second repeating module is used for repeatedly indicating the work of the detection module, the first processing module, the second processing module and the third processing module until the number of times of repeated execution reaches a preset value.
CN201611262914.0A 2016-12-30 2016-12-30 method and device for processing network connection abnormity Active CN106603306B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611262914.0A CN106603306B (en) 2016-12-30 2016-12-30 method and device for processing network connection abnormity

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611262914.0A CN106603306B (en) 2016-12-30 2016-12-30 method and device for processing network connection abnormity

Publications (2)

Publication Number Publication Date
CN106603306A CN106603306A (en) 2017-04-26
CN106603306B true CN106603306B (en) 2019-12-10

Family

ID=58581473

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611262914.0A Active CN106603306B (en) 2016-12-30 2016-12-30 method and device for processing network connection abnormity

Country Status (1)

Country Link
CN (1) CN106603306B (en)

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107241218B (en) * 2017-05-26 2020-07-28 南京南瑞继保电气有限公司 Fault detection method and device
CN107276856B (en) * 2017-08-03 2019-03-12 Oppo广东移动通信有限公司 Network detection method, network detection device and intelligent terminal
CN107231647B (en) * 2017-08-03 2019-01-11 Oppo广东移动通信有限公司 Network detection method, network detection device and intelligent terminal
CN107332740B (en) * 2017-08-25 2019-03-01 Oppo广东移动通信有限公司 A kind of network detecting method, network detection device and intelligent terminal
CN108322942A (en) * 2018-01-17 2018-07-24 宇龙计算机通信科技(深圳)有限公司 Data transmission method, device, terminal and computer readable storage medium
CN110324673B (en) * 2018-03-28 2022-03-08 视联动力信息技术股份有限公司 Method and device for processing network connection abnormity
JP7178408B2 (en) * 2018-05-23 2022-11-25 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ Abnormality detection device, abnormality detection system and control method
CN110933773B (en) * 2019-11-20 2020-08-18 北京连山时代科技有限公司 Link monitoring method and device
CN112929853B (en) * 2019-12-06 2025-03-11 惠州市德赛西威汽车电子股份有限公司 A method for re-registering a vehicle-mounted Tbox after it loses network connection
CN112243211A (en) * 2020-10-13 2021-01-19 安徽江淮汽车集团股份有限公司 Vehicle-mounted terminal networking method, device, equipment and storage medium
CN113067753A (en) * 2021-04-01 2021-07-02 北京有竹居网络技术有限公司 Method, device, equipment and storage medium for detecting connectivity of mobile data link
CN113825164A (en) * 2021-10-29 2021-12-21 中国电信股份有限公司 Network fault repairing method and device, storage medium and electronic equipment
CN115834651B (en) * 2022-11-11 2025-05-02 北京奕斯伟计算技术股份有限公司 Network connection method, device, equipment, medium and program product
CN118368644B (en) * 2024-06-20 2024-09-03 深圳市智博通电子有限公司 Internet dialing method and device for wireless data terminal

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1917454A (en) * 2005-08-17 2007-02-21 华为技术有限公司 System and method for detecting faults in network
CN102571438A (en) * 2012-01-16 2012-07-11 中国科学院深圳先进技术研究院 Remote monitoring system and automatic network diagnosis method thereof
CN103001822A (en) * 2012-08-29 2013-03-27 五八同城信息技术有限公司 Network anomaly handling method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1917454A (en) * 2005-08-17 2007-02-21 华为技术有限公司 System and method for detecting faults in network
CN102571438A (en) * 2012-01-16 2012-07-11 中国科学院深圳先进技术研究院 Remote monitoring system and automatic network diagnosis method thereof
CN103001822A (en) * 2012-08-29 2013-03-27 五八同城信息技术有限公司 Network anomaly handling method and device

Also Published As

Publication number Publication date
CN106603306A (en) 2017-04-26

Similar Documents

Publication Publication Date Title
CN106603306B (en) method and device for processing network connection abnormity
WO2018059062A1 (en) Network repairing method and apparatus, and terminal
CN103001801B (en) Network restoration method and apparatus
CN108228374B (en) A fault processing method, device and system for equipment
CN104461786B (en) The restoration methods of android system and the recovery system of android system
CN103023699B (en) A kind of network restoration method and system
CN105872273A (en) Individual resource hiding communication method and system thereof
CN110908704A (en) Method and device for calling cross-platform native function of mobile terminal
CN106131241B (en) A network connection method, device and mobile terminal
CN106330482B (en) Repair method and device for wireless router equipment
CN106919489B (en) Method and device for monitoring abnormal exit of application interface of application program
CN104461741B (en) Graphics device interface based computing device optimizing method and device
CN106210243A (en) Method, device and terminal for quickly adding contact information during a call
CN106791150A (en) Abnormal call processing method and terminal
CN106528078B (en) method and device for dynamically adjusting payment mode based on react-native
CN107819508B (en) Link fault detection and recovery method based on EPON home gateway
CN101963939A (en) Embedded electronic device and calibration method of program execution in embedded electronic device
CN102752365B (en) The method and apparatus of information processing
CN104572267B (en) A kind of fault-tolerant call method of cloud application Program Interfaces
CN113791963A (en) View element exposure detection method and device, electronic equipment and storage medium
CN105894197A (en) Work order processing method and device
CN102769604B (en) Operation data processing method and processing device
CN112650567A (en) Implementation method and device of global universal timer and computer equipment
CN117596047B (en) Request processing method, request processing device, electronic equipment and storage medium
CN111782495A (en) Method and device for acquiring buried point data

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20250522

Address after: 100032Beijing City, Xicheng District, No. 136 Xiwai Street, 2nd Floor, Room 1-14-232b

Patentee after: Beijing Jiuchang Shenzhou Technology Co.,Ltd.

Country or region after: China

Address before: 518057 Guangdong Province Nanshan High-tech Industrial Park North District Kupai Information Port, 2 Buildings, 2 Floors

Patentee before: YULONG COMPUTER TELECOMMUNICATION SCIENTIFIC (SHENZHEN) Co.,Ltd.

Country or region before: China

TR01 Transfer of patent right