A method, apparatus and storage medium for network repair
By detecting data transmission interruptions in the terminal network connection and executing an automatic repair process, the problem of unstable IPv4 and IPv6 connections in 4G networks was resolved, improving network connection stability and reliability, reducing service interruptions, and enhancing user experience.
Patent Information
- Application Number
- CN202411530566.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2025-12-19
- Estimated Expiration
- 2044-10-30
AI Technical Summary
When the device is using a 4G network, although it can obtain both IPv4 and IPv6 addresses, it can only actually use IPv6 to connect to the network, resulting in unstable network connections. Users cannot connect using IPv4 addresses, and existing solutions such as toggling airplane mode or restarting the device have low reliability.
By detecting whether data transmission interruptions occur in the terminal network connection, the system checks the IPv4 and IPv6 network connectivity separately, and executes an automatic repair process when a connection failure occurs, including disconnecting the network connection and resetting the modem. The detection frequency is dynamically adjusted to ensure network stability and reliability.
It improves the stability and reliability of network connections, reduces service interruptions caused by network problems, enhances user experience, and ensures the adaptability of terminals in different network environments.
Smart Images

Figure CN119629776B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer networks, and particularly relates to a network repair method and device and storage medium. BACKGROUND
[0002] With the rapid development of the Internet and the explosive growth of the number of devices, the IPv4 address is ultimately exhausted due to its 32-bit address limitation, and cannot meet the increasing global connection demand. The IPv6 address uses a 128-bit address, almost unlimitedly expands the address space, and meets the future device connection demand. In addition, the IPv6 address also optimizes the network architecture, enhances the security, and realizes more efficient network operation. Therefore, the introduction of the IPv6 address is an important step to cope with the challenges of the Internet era.
[0003] At present, a device can obtain an IPv4 address and an IPv6 address at the same time, thereby connecting an IPv4 network and an IPv6 network, so as to promote the development and deployment of the IPv6 network and ensure the smooth transition to the IPv6 network environment.
[0004] However, when the device uses a 4G network, although the IPv4 address and the IPv6 address can be correctly obtained, in fact, only the IPv6 address can be used to connect the network, which causes the user to be unable to use the IPv4 address to connect the network. When the device cannot connect the network, the user can only reconnect the network by turning on or off the flight mode or restarting the device, and the network connection is unstable and has low reliability. SUMMARY
[0005] In order to solve the above technical problems, the present application provides a network repair method and device and storage medium, which are used to improve the stability and reliability of network connection.
[0006] The technical solutions provided in the present application are described as follows:
[0007] The first aspect of the present application provides a network repair method, which comprises the following steps:
[0008] When the terminal is running, it is detected whether data transmission stagnation occurs in network connection of the terminal;
[0009] If yes, the connection conditions of an IPv4 network and an IPv6 network of the terminal are detected respectively;
[0010] When the connection condition of at least one of the IPv4 network and the IPv6 network is connection failure, an automatic repair process is executed, and the automatic repair process is used to repair the connection of the IPv4 network and the IPv6 network.
[0011] Optionally, when the connection of the IPv4 network and the IPv6 network is failed, the method further comprises:
[0012] determining whether the connection of the IPv4 network and the IPv6 network is successful after the repairing;
[0013] if the connection is successful, ending the automatic repairing process, otherwise, updating the number of repairing failures and executing the automatic repairing process again.
[0014] Optionally, after the number of repairing failures is updated and the automatic repairing process is executed again, the method further comprises:
[0015] determining whether the number of repairing failures reaches a preset number;
[0016] if yes, disabling the automatic repairing process and generating an abnormal prompt notification.
[0017] Optionally, after the connection is successful, the method further comprises:
[0018] continuously detecting whether the data transmission stagnation occurs in the network connection of the terminal.
[0019] Optionally, after the data transmission stagnation is detected, the method further comprises:
[0020] if no, determining the network connection quality;
[0021] dynamically adjusting the detection frequency according to the network connection quality.
[0022] Optionally, the method further comprises:
[0023] when the network state of the terminal changes, resetting the detection frequency.
[0024] Optionally, the executing the automatic repairing process comprises:
[0025] disconnecting the current network connection of the terminal and releasing the occupied data connection resources;
[0026] resetting the Modem of the terminal by sending a target instruction and re-establishing the network connection of the terminal.
[0027] The second aspect of the application provides a network repairing device, the device comprises:
[0028] a first detection unit, configured to detect whether the data transmission stagnation occurs in the network connection of the terminal when the terminal runs;
[0029] The second detection unit is used to detect the connection status of the terminal's IPv4 network and IPv6 network respectively;
[0030] An automatic repair unit is configured to execute an automatic repair process when at least one of the IPv4 network and the IPv6 network experiences a connection failure. The automatic repair process is used to repair the connection between the IPv4 network and the IPv6 network.
[0031] Optionally, the automatic repair unit is also used for:
[0032] Determine whether the connection status of the repaired IPv4 network and the IPv6 network is successfully established;
[0033] If all connections are successful, the automatic repair process ends; otherwise, the number of repair failures is updated, and the automatic repair process is executed again.
[0034] Optionally, a notification unit may also be included for:
[0035] Determine whether the number of repair failures has reached a preset number;
[0036] If so, the automatic repair process is disabled and an error notification is generated, which prompts the user to perform a restart or switch airplane mode on / off.
[0037] Optionally, the first detection unit is also used for:
[0038] Continue to detect whether data transmission stalls occur during network connection at the terminal.
[0039] Optionally, an adjustment unit is also included for:
[0040] If not, determine the current network connection quality;
[0041] The detection frequency is dynamically adjusted based on the network connection quality.
[0042] Optionally, the adjustment unit is also used for:
[0043] When the network status of the terminal changes, the detection frequency is reset.
[0044] Optionally, the automatic repair unit is also used for:
[0045] Disconnect the terminal's current network connection and release the occupied data connection resources;
[0046] The target command is sent to reset the terminal's modem and re-establish the terminal's network connection.
[0047] The third aspect of the present application provides a network repair device, the device comprises:
[0048] a processor, a memory, an input / output unit and a bus;
[0049] The processor is connected with the memory, the input / output unit and the bus;
[0050] The memory stores a program, and the processor invokes the program to execute the method of the first aspect and any optional aspect of the first aspect.
[0051] The fourth aspect of the present application provides a computer readable storage medium, the computer readable storage medium stores a program, and the program executes the method of the first aspect and any optional aspect of the first aspect when executed on a computer.
[0052] From the above technical solutions, the present application has the following advantages:
[0053] During the terminal running process, the data transmission stagnation is actively detected, and the network problem is found and solved in advance. When the data transmission stagnation occurs, the connection conditions of the IPv4 network and the IPv6 network are detected respectively, so that the current mainstream network protocol can be comprehensively covered, and it is ensured that the terminal can adapt to different network environments. Once the network connection fails, the automatic repair process can be immediately executed according to the specific connection conditions of the IPv4 network and the IPv6 network, the influence of the network failure on the user experience is reduced, the service interruption caused by the network problem is reduced, and the network connection stability and reliability of the terminal are improved. BRIEF DESCRIPTION OF DRAWINGS
[0054] In order to more clearly illustrate the technical solutions in the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0055] Figure 1 An embodiment flowchart of the network repair method provided by the present application is provided.
[0056] Figure 2 Another embodiment flowchart of the network repair method provided by the present application is provided.
[0057] Figure 3 An embodiment flowchart of the network repair method provided by the present application is provided.
[0058] Figure 4An embodiment flowchart of a method for triggering other processing mechanisms when the automatic repair flow in the network repair method provided in the present application fails continuously for multiple times;
[0059] Figure 5 An embodiment flowchart of a method for executing the automatic repair flow in the network repair method provided in the present application;
[0060] Figure 6 An embodiment structure diagram of a device for network repair provided in the present application;
[0061] Figure 7 Another embodiment structure diagram of a device for network repair provided in the present application. DETAILED DESCRIPTION
[0062] The present application provides a network repair method, device and storage medium, which is used to improve the stability and reliability of network connection.
[0063] It should be noted that the network repair method provided in the present application can be applied to a terminal, a system or a server. For example, the terminal can be a smart payment device, a smart phone or a computer, a tablet computer, a smart television, a smart watch, a portable computer terminal or a desktop computer. For convenience of description, the terminal is taken as an example in the present application.
[0064] Please refer to Figure 1 The present application first provides an embodiment of a network repair method, which includes:
[0065] S101, when the terminal is running, detecting whether data transmission stagnation occurs in network connection of the terminal;
[0066] IPv4 (Internet Protocol version 4) is a network protocol used to identify and locate terminals on the Internet. Its address length is 32 bits, typically represented by four sets of decimal numbers, providing approximately 4.2 billion unique addresses. Due to the rapid growth of Internet users and terminals, IPv4 addresses are gradually being exhausted. IPv6 (Internet Protocol version 6) is also a network protocol, a successor to IPv4. Its address length is 128 bits, represented in hexadecimal form, and theoretically can provide a virtually unlimited address space to address the address shortage problem and improve network security and efficiency. In current network environments, network operators or terminal configurations prioritize using IPv6 addresses for connections to adapt to future network development and reduce the problem of IPv4 address depletion. Therefore, even if a terminal successfully obtains both an IPv4 and IPv6 address, its default or preferred network protocol is IPv6. If the network infrastructure and server do not support IPv4 or there are restrictions on IPv4 address connections, such as router or firewall configuration issues, the terminal will be unable to access the network via IPv4. In addition, some applications and services may only support IPv6, preventing users from connecting using IPv4 addresses.
[0067] If a terminal cannot access the IPv4 network due to prioritizing IPv6, some applications and services may malfunction, leading to data transmission interruptions or delays. Detecting data transmission pauses allows for timely identification and diagnosis of network connection problems, such as confirming whether the connection anomaly is due to the choice of transport protocol. This enables rapid action on abnormally connected networks, such as adjusting terminal configurations or contacting the network service provider, to ensure normal network function and minimize business losses and user experience impacts caused by data transmission pauses.
[0068] In this embodiment, the Android Data Stall detection mechanism is selected to detect data stagnation. The Data Stall detection mechanism is used in Android terminals to handle unstable or interrupted data connections. Deeply integrated into the Android system, it seamlessly collaborates with other system functions, achieving higher real-time performance and accuracy. After the Android terminal starts, the Data Stall mechanism monitors the sending and receiving of data packets. If no data is transmitted within a set time, it considers a data stagnation to have occurred.
[0069] S102. If so, then check the connection status of the terminal's IPv4 network and IPv6 network respectively.
[0070] Detecting the connection status of IPv4 network and IPv6 network can ensure the connection stability and reliability of the terminal under two different protocols. Especially under the background of the gradual popularization of IPv6, some networks may only support one of the protocols. Separate detection can clearly identify which type of connection has problems, so targeted repair can be performed.
[0071] In this embodiment, when IPv4 address and IPv6 address are connected to the network at the same time, the DataStall detection mechanism of the Android terminal usually cannot accurately determine which data link has problems. To accurately determine the link problem, other tools and log analysis are usually needed, or the connection status of IPv4 and IPv6 needs to be tested and diagnosed separately in the network settings.
[0072] S103, when the connection status of at least one of the IPv4 network and the IPv6 network is connection failure, an automatic repair process is performed, and the automatic repair process is used to repair the connection of the IPv4 network and the IPv6 network.
[0073] It should be noted that the program in the system that performs the automatic repair process is the automatic repair program. When the connection of the IPv4 network or the IPv6 network fails, the system sends a signal to the automatic repair program. After receiving the signal, the automatic repair program performs initialization processing to determine the nature and scope of the fault, and then activates the corresponding repair process. By automatically identifying and responding to connection problems, the need for manual intervention is reduced, ensuring that the terminal can quickly recover to a normal network state and reducing service interruption time. This automated response mechanism not only improves the self-healing ability of network connection, but also enhances user trust in the terminal and network service, thereby playing an important role in maintaining continuous online and smooth data interaction.
[0074] In this embodiment, during the running of the terminal, data transmission stagnation is actively detected, and network problems are discovered and solved in advance. When data transmission stagnation occurs, by detecting the connection status of the IPv4 network and the IPv6 network respectively, the current mainstream network protocol can be fully covered, and the terminal can adapt to different network environments. Once network connection failure is detected, the automatic repair process can be immediately performed according to the specific connection status of the IPv4 network and the IPv6 network, reducing the impact of network failure on user experience, reducing service interruption caused by network problems, and improving the network connection stability and reliability of the terminal.
[0075] In some specific embodiments, the method of network repair can be further optimized according to whether data transmission stagnation occurs. Please refer to Figure 2 , Figure 2 Another embodiment of the network repair method provided in this application comprises:
[0076] S201, detecting whether data transmission stagnation occurs in the network connection of the terminal;
[0077] In this embodiment, step S201 is similar to step S101 of the previous embodiment, which will not be repeated here.
[0078] S202, if not, determining the current network connection quality;
[0079] After confirming that data transmission has not stagnated, it is necessary to evaluate the current network connection quality, including measuring multiple network performance indicators such as delay, packet loss rate, and bandwidth utilization, etc. Through network diagnostic tools or built-in monitoring mechanisms, these data are collected, and then specific algorithms or models are used to analyze the collected data comprehensively to quantify the quality of network connection. Understanding the quality of network connection helps to predict potential problems, optimize data transmission strategies, and improve user experience.
[0080] S203, dynamically adjusting the detection frequency according to the network connection quality.
[0081] Based on the evaluation results of the network connection quality, the detection frequency of data transmission stagnation is dynamically adjusted. In the case of high network connection quality and stable data transmission, the detection frequency can be appropriately reduced to reduce the occupation of system resources and avoid unnecessary detection overhead. On the contrary, when signs of network connection quality decline are detected, such as increased delay and rising packet loss rate, the detection frequency is quickly increased to capture abnormalities or stagnation in data transmission more timely. For example, the detection frequency can be dynamically adjusted according to the heartbeat detection results. Dynamically adjusting the detection frequency can ensure the continuity and reliability of data transmission.
[0082] In some specific embodiments, when the network state of the terminal changes, the detection frequency is reset, which will be described in detail as follows:
[0083] When the network state of the terminal changes, such as switching from Wi-Fi to mobile data, resetting the detection frequency can help the terminal adapt to the new network environment and ensure the stability and effectiveness of network connection. The delay, bandwidth and stability of different networks may be different, therefore, resetting the detection frequency can avoid frequent network requests in inappropriate states leading to performance degradation or data waste. By adjusting the detection interval, the terminal can more intelligently select the appropriate time for data transmission, thereby improving the overall user experience, such as avoiding high traffic consumption on mobile data networks while maintaining necessary connection monitoring.
[0084] In the embodiment, the detection frequency is dynamically adjusted according to the network connection quality in the case of normal network connection, which can ensure the stability of the network, and at the same time, the network connection quality that does not need high-frequency detection is timely released or the use of resources is reduced. The dynamic adjustment of the detection frequency can ensure the continuity and reliability of data transmission, and at the same time, the degree of automation of the adjustment of the network connection quality is improved.
[0085] In the step S102, before the automatic repair process is started, the connection conditions of the IPv4 network and the IPv6 network of the terminal are detected respectively, and after the automatic repair process is executed, the connection conditions are still detected. Please refer to Figure 3 , Figure 3 An embodiment of the method for judging whether the connection conditions are all successfully connected in the network repair method provided in the application, the method comprises:
[0086] S301, judging whether the connection conditions of the repaired IPv4 network and the IPv6 network are all successfully connected;
[0087] If the connection conditions are all successfully connected, step S302 is executed, otherwise, step S303 is executed;
[0088] In the embodiment, the Ping command can be used to judge whether the connection of the IPv4 network or the IPv6 network is successfully repaired. The Ping command is a tool for testing network connection conditions, which judges the connectivity of the network by sending an ICMP (Internet Control Message Protocol) echo request to a target IP address and waiting for a response.
[0089] After the automatic repair process is executed, the preset Ping command is triggered, an ICMP echo request is sent to a target IP address, and it is confirmed whether the target terminal can respond, so as to judge whether the network connection is available. If a response is received and the response time is within an acceptable range, it is indicated that the connection has been successfully repaired. If no reply is received or the response time is too long, it may indicate that the connection still has problems. For the IPv4 network and the IPv6 network, the Ping command is also used, and only the IPv4 address or the IPv6 address needs to be specified to complete the detection.
[0090] S302, ending the automatic repair process this time;
[0091] When the Ping command sends a request to the target terminal and successfully receives the response of IPv4 address or IPv6 address from the terminal, it indicates that the communication of the two networks is normal. At this time, the Ping command sends a broadcast message to the automatic repair program, indicating that the network connection or the IP protocol communication is in a healthy state. After receiving the broadcast indicating the normal network, the automatic repair program will stop continuing to enter the next automatic repair process. This avoids unnecessary repair operations and ensures the stability and efficient operation of the network environment.
[0092] In some specific embodiments, after successfully repairing the network connection, it is still necessary to continue to detect whether data transmission stagnation occurs, which will be described in detail below:
[0093] After successfully repairing the network connection, the network connection may still be disturbed by other factors, such as insufficient signal strength, physical obstacles, network terminal failure, and network service provider failure, which may all cause the connection to be interrupted. In order to ensure smooth communication, the Data Stall detection mechanism will still run in the background of the system, monitoring the status of IPv4 network and IPv6 network in real time or periodically, detecting whether data transmission stagnation occurs or data packet transmission and reception is continuous without interruption. When detecting that the network has data transmission stagnation, the pre-set Ping command will be triggered to detect the current network connection, and the automatic repair process will be performed for the network connection that has failed. Continuing to detect whether data transmission stagnation occurs can timely discover and solve potential data transmission problems, ensuring the stability and reliability of the network connection.
[0094] S303, updating the number of repair failures and performing the automatic repair process again.
[0095] In the automatic repair process, the failure of the automatic repair process will also be continuously monitored. When the network connection cannot be successfully repaired after performing the first automatic repair process, the current automatic repair process will be counted as a failure, the number of repair failures will be updated, and the second automatic repair process will be performed again. In this way, through repeated attempts, the problems that may be encountered in the initial repair can be overcome.
[0096] In this embodiment, the Ping command is used to detect the network after the automatic repair process is performed. When it is detected that the automatic repair process successfully repairs the network connection, the automatic repair process is immediately ended. When it is detected that the network is still in a fault state, a signal is transmitted to the automatic repair process to continue attempting repair. It ensures that the automatic repair process can quickly and effectively restore the network connection when facing network faults by ending the automatic repair process in time, updating the number of failures and repeatedly performing the automatic repair process. At the same time, it avoids repeatedly performing the automatic repair process in unnecessary cases, reduces resource waste and improves the automation of network connection.
[0097] When the automatic repair process fails continuously for multiple times, other processing mechanisms are triggered. Please refer to Figure 4 , Figure 4 This is an embodiment of the method for network repair provided in the present application, in which the automatic repair process continuously fails for multiple times to trigger other processing mechanisms.
[0098] S401, determining whether the number of repair failures reaches a preset number of times;
[0099] In order to timely feedback the network problem that cannot be repaired by the automatic repair process, a preset number of times of continuous failure of the automatic repair process is set.
[0100] In this embodiment, the preset number of times is set to 5. When the automatic repair process continuously fails and reaches 5 times, it is considered that the network problem is relatively serious, rather than a simple temporary fault. The preset number of times can effectively avoid wasting system resources in invalid repair attempts.
[0101] S402, if yes, disabling the automatic repair process and generating an abnormal prompt notification.
[0102] When the number of repair failures reaches 5 times, the automatic repair process is immediately disabled to prevent continuous invalid repair attempts. At the same time, an abnormal prompt notification is generated to remind the user that there is a problem with the network connection. The notification suggests that the user performs a restart operation or switches to the flight mode to reset the network state, helping the user to restore normal network connection.
[0103] In this embodiment, the preset number of times is set to handle the case of continuous failure of the automatic repair process. When the preset number of times is reached, the automatic repair is stopped and an abnormal prompt notification is issued, effectively avoiding the waste of system resources. Through the explicit user prompt, the user is prompted to actively intervene in solving complex network problems, thereby significantly improving the recovery efficiency of network connection.
[0104] In the above step S103, when the connection of the IPv4 network or the IPv6 network is a connection failure, the automatic repair process is performed. Please refer to Figure 5 , Figure 5An embodiment of the method for network repair provided in the present application performs an automatic repair process, which includes:
[0105] S501, disconnecting the current network connection of the terminal and releasing the occupied data connection resources;
[0106] During the processing, the automatic repair process evaluates the current network configuration, connection state, and historical records, etc. to formulate effective recovery measures, such as clearing the data connection and resetting the Modem, etc.
[0107] In this embodiment, when the automatic repair process is executed, the network connection with the current fault will be cleared. First, the current network connection of the terminal is disconnected, and all data connection resources related to the connection are released to provide a channel for subsequent repair. By disconnecting the connection, it can avoid the terminal to continue to attempt to send data or receive information, reduce the waste of resources caused by network occupation, and thus improve the overall network performance.
[0108] S502, resetting the Modem of the terminal by sending a target instruction and re-establishing the network connection of the terminal.
[0109] The Modem is composed of a Modulator and a Demodulator, which is a terminal that converts digital signals into analog signals for long-distance transmission through traditional telephone lines, cables, or optical fibers, etc. analog transmission medium. At the same time, it can also demodulate the received analog signal back to digital signal, which is a bridge between digital and analog signals, so that digital terminals such as computers can be connected to the Internet or other digital networks through analog communication lines. In the Android terminal, the Modem is a key component, which is responsible for the wireless communication function of the terminal.
[0110] After releasing the data connection resources, the automatic repair program sends a specific reset instruction to the Modem of the terminal to restore the initial state of the Modem and clear any potential errors or configuration problems. After the reset is completed, the automatic repair program can attempt to re-establish the network connection. The process of resetting the Modem helps to restore the connection and improves the network stability to provide more reliable services for users.
[0111] In this embodiment, the automatic repair process releases the occupied data connection resources and resets the Modem for the faulty network connection, avoids continuing to attempt to send data or receive information, causes resource occupation, and also improves the network stability to provide a foundation for re-connecting the network.
[0112] Please refer to Figure 6 The present application also provides a network repair device, which comprises:
[0113] The first detection unit 601 is configured to detect whether data transmission stagnation occurs in the network connection of the terminal when the terminal is running.
[0114] The second detection unit 602 is configured to detect the connection status of the IPv4 network and the IPv6 network of the terminal respectively.
[0115] The automatic repair unit 603 is configured to perform an automatic repair process when the connection status of at least one of the IPv4 network and the IPv6 network is connection failure, and the automatic repair process is configured to repair the connection of the IPv4 network and the IPv6 network.
[0116] Optionally, the automatic repair unit 603 is further configured to:
[0117] determine whether the connection status of the repaired IPv4 network and the IPv6 network is both connection success.
[0118] If yes, the automatic repair process is ended; otherwise, the number of repair failures is updated, and the automatic repair process is performed again.
[0119] Optionally, the notification unit 604 is further configured to:
[0120] determine whether the number of repair failures reaches a preset number.
[0121] If yes, the automatic repair process is disabled and an abnormal prompt is generated.
[0122] Optionally, the first detection unit 601 is further configured to:
[0123] continuously detect whether data transmission stagnation occurs in the network connection of the terminal.
[0124] Optionally, the adjustment unit 605 is further configured to:
[0125] If no, the network connection quality is determined.
[0126] The detection frequency is dynamically adjusted according to the network connection quality.
[0127] Optionally, the adjustment unit 605 is further configured to:
[0128] When the network state of the terminal changes, the detection frequency is reset.
[0129] Optionally, the automatic repair unit 603 is further configured to:
[0130] disconnect the current network connection of the terminal and release the occupied data connection resource.
[0131] reset the Modem of the terminal by sending a target instruction, and reestablish the network connection of the terminal.
[0132] Please refer to Figure 7 The application further provides a network repair device, comprising:
[0133] The processor 701, the memory 702, the input output unit 703, and the bus 704 are connected;
[0134] The processor 701 is connected with the memory 702, the input output unit 703, and the bus 704;
[0135] The memory 702 stores a program, and the processor 701 invokes the program to execute any method described above.
[0136] The application further relates to a computer readable storage medium, and the computer readable storage medium stores a program, and when the program runs on a computer, the computer executes any method described above.
[0137] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the system, the device and the unit described above can refer to the corresponding processes in the foregoing method embodiments, and will not be described here.
[0138] In the several embodiments provided in the present 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 schematic. The division of the units is only a logical function division. There can be another division manner for actual implementation, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections between the units can be indirect couplings or communication connections through some interfaces, devices or units, and can be electrical, mechanical or in other forms.
[0139] The units described as separate components can or can not be physically separate, and the components displayed as units can or can not be physical units, that is, can be located in one place, or can be distributed on a plurality of network units. According to actual needs, some or all of the units can be selected to achieve the purpose of the embodiment scheme.
[0140] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present alone, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0141] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a computer-readable storage medium. Based on such understanding, the technical solutions of the present application, essentially or in other words, the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a number of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the various embodiments of the method of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, read-only memory), a random access memory (RAM, random access memory), a magnetic disk or an optical disk, and various media that can store program codes.
Claims
1. A method of network repair, characterized by, The method comprises: detecting whether data transmission stagnation occurs in network connection of the terminal when the terminal is running; if yes, detecting connection conditions of IPv4 network and IPv6 network of the terminal respectively; when the connection condition of at least one of the IPv4 network and the IPv6 network is connection failure, performing an automatic repair process for repairing the connection of the IPv4 network and the IPv6 network; after the detection of whether data transmission stagnation occurs in network connection of the terminal, the method further comprises: if no, determining current network connection quality; dynamically adjusting detection frequency according to the network connection quality; when the network state of the terminal changes, resetting the detection frequency; the performance of the automatic repair process comprises: disconnecting the current network connection of the terminal, releasing occupied data connection resources; resetting the Modem of the terminal by sending a target instruction, and re-establishing the network connection of the terminal.
2. The method of claim 1, wherein, after the performance of the automatic repair process when the connection condition of at least one of the IPv4 network and the IPv6 network is connection failure, the method further comprises: judging whether the connection conditions of the repaired IPv4 network and the IPv6 network are both successful; if both are successful, ending the current automatic repair process, otherwise updating the number of repair failures and performing the automatic repair process again.
3. The method of claim 2, wherein, after the updating of the number of repair failures and the performance of the automatic repair process again, the method further comprises: judging whether the number of repair failures reaches a preset number; if yes, disabling the automatic repair process and generating an abnormal prompt notification.
4. The method of claim 2, wherein, after the performance of the automatic repair process when both are successful, the method further comprises: continuing to detect whether data transmission stagnation occurs in network connection of the terminal.
5. An apparatus for network repair, the apparatus comprising: The device comprises: a first detection unit for detecting whether data transmission stagnation occurs in network connection of the terminal when the terminal is running; a second detection unit for detecting connection conditions of IPv4 network and IPv6 network of the terminal respectively if the detection result of the first detection unit is yes; an automatic repair unit for performing an automatic repair process when the connection condition of at least one of the IPv4 network and the IPv6 network is connection failure, the automatic repair process being used for repairing the connection of the IPv4 network and the IPv6 network; an adjustment unit for: if the detection result of the first detection unit is no, determining current network connection quality; dynamically adjusting detection frequency according to the network connection quality; when the network state of the terminal changes, resetting the detection frequency; the automatic repair unit is specifically used for: disconnecting the current network connection of the terminal, releasing occupied data connection resources; resetting the Modem of the terminal by sending a target instruction, and re-establishing the network connection of the terminal.
6. An apparatus for network repair, the apparatus comprising: The device comprises: a processor, a memory, an input / output unit and a bus; The processor is connected with the memory, the input / output unit and the bus; The memory stores a program, and the processor invokes the program to execute the method in any one of claims 1 to 4. 7.A computer readable storage medium, which stores a program, and the program executes the method in any one of claims 1 to 4 when executed on a computer.
Citation Information
Patent Citations
Method and system for connecting dual-stack terminal to network
CN102368789A
Play fault recovery method and device in IPv4 / IPv6 dual-stack environment, and storage medium
CN112787936A