Network recovery method and device
In the early stage of 5G SA network deployment, adjusting TCP/IP parameters, modifying DNS addresses and disabling network background applications according to the current operating scenario of electronic devices, solving the Internet access problem caused by network abnormalities, reducing user perception and improving network recovery speed , improves the user experience.
Patent Information
- Application Number
- CN202111126427.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-24
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2041-09-24
AI Technical Summary
In the early stages of 5G SA network deployment, Internet access problems caused by network abnormalities (such as game stuttering, short video circling, and inability to open web pages) affect the user experience, and the existing technology recovery methods are obvious.
When a network stutter is detected, the target network recovery operation matching the current operating scenario of the electronic device is obtained, including adjusting the TCP/IP parameters, modifying the DNS address to ipv4-only, and banning the network background application to restore the network.
Reduce users' perception of network lag recovery, improve network recovery rate, and thus improve users' online experience.
Smart Images

Figure CN113810901B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of communication technology, and specifically relates to a network recovery method and device. Background Art
[0002] 5G has greater transmission capacity, higher reliability and lower latency. It can not only meet the continuously growing demand for large-bandwidth mobile Internet in ToC, but also be integrated with various businesses in vertical industries to meet the application needs of ToB industries such as industrial manufacturing, transportation, energy, and medical care. Therefore, 5G, as a new generation of digital infrastructure, is becoming a new driving force for economic and social development.
[0003] With the gradual popularization of 5G SA (Standalone, SA) independent networking networks, people's Internet experience is getting better and better. However, in the early stage of SA network deployment, there were many Internet problems caused by network abnormalities, such as game lag, short video spinning in circles, inability to open web pages, etc., which affected people's daily Internet experience.
[0004] In related technologies, the general recovery methods after determining that the network is stuck are very direct, such as re-establishing connection to the network, shutting down the 5G network, etc., at which time the user will have a clear perception. Summary of the invention
[0005] The purpose of the embodiments of the present application is to provide a network recovery method and device, which can solve the problem that users have obvious perception when restoring the network.
[0006] In a first aspect, an embodiment of the present application provides a network recovery method, the method comprising:
[0007] When a network freeze is detected, obtaining a target network recovery operation of the network that matches a current operation scenario of the electronic device;
[0008] Controlling the electronic device to perform the target network recovery operation to recover the network;
[0009] The target network recovery operation includes at least one of the following: adjusting TCP / IP parameters, modifying the DNS address to ipv4-only, and disabling the background application in the electronic device from accessing the network.
[0010] In a second aspect, an embodiment of the present application provides a network recovery device, the device comprising:
[0011] An acquisition module, used to acquire a target network recovery operation matching a current operation scenario of the electronic device when a network freeze is detected;
[0012] A control module, used for controlling the electronic device to perform the target network recovery operation to recover the network;
[0013] The target network recovery operation includes at least one of the following: adjusting TCP / IP parameters, modifying the DNS address to ipv4-only, and disabling the background application in the electronic device from accessing the network.
[0014] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method described in the first aspect.
[0015] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0016] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.
[0017] In an embodiment of the present application, when a network freeze is detected, a target network recovery operation matching the current operating scenario of the electronic device is first obtained, and then the electronic device is controlled to execute the target network recovery operation to restore the network. Since the target network recovery operation usually includes adjusting TCP / IP parameters, modifying the DNS address to ipv4-only, and disabling the background application in the electronic device from accessing the network, the target network recovery operation makes the user less aware of the recovery from the network freeze, increases the rate of network recovery, and thus improves the user's Internet experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 is a flow chart of a network recovery method provided by an embodiment of the present application;
[0019] Figure 2 is a schematic diagram of a network recovery method of an example provided in an embodiment of the present application;
[0020] Figure 3 It is a structural schematic diagram of a network recovery device provided in an embodiment of the present application;
[0021] Figure 4 It is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;
[0022] Figure 5It is a schematic diagram of the hardware structure of another electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0023] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0024] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0025] The network recovery method provided in the embodiment of the present application is described in detail below through specific embodiments and their application scenarios in conjunction with the accompanying drawings.
[0026] Please see Figure 1 , which is a flow chart of a network recovery method provided in an embodiment of the present application. The method can be applied to electronic devices, which may be mobile phones, tablet computers, laptops, and the like. The electronic device can work in a NSA non-standalone (NSA) scenario, or in a SA (Standalone, SA) independent networking scenario. Among them, for independent networking SA, it only requires 5G to be connected to the base station alone; and for non-independent networking NSA, it is implemented in a dual-connection scenario of Long Term Evolution (LTE) and New Radio (NR) to ensure that LTE and NR can work simultaneously.
[0027] like Figure 1 As shown, the method may include steps 1100 to 1200, which are described in detail below.
[0028] Step 1100, when a network freeze is detected, a target network recovery operation matching the current operating scenario of the electronic device is obtained.
[0029] In this embodiment, the electronic device can operate in the SA scenario. In the early stage of SA network deployment, there are many Internet access problems caused by network anomalies, such as game lag, short video playback in circles, inability to open web pages, etc., which affect people's daily Internet experience.
[0030] The current running scene of the electronic device may be a scene determined according to the type of the foreground application in the electronic device. The running scene may include, for example but not limited to, a game scene, a video scene, a browser scene, an instant messaging scene, a download scene, and other scenes.
[0031] For example, the foreground application running in the electronic device is application A, and application A is a game application, so the current running scene of the electronic device is a game scene.
[0032] For another example, the foreground application running in the electronic device is application B, and application B is a video application, then the current running scene of the electronic device is a video scene.
[0033] For another example, the foreground application running in the electronic device is application C, and application C is a search engine application, then the current running scene of the electronic device is a browser scene.
[0034] For another example, the foreground application running in the electronic device is application D, and application D is a communication application, then the current running scenario of the electronic device is an instant messaging scenario.
[0035] For another example, the foreground application running in the electronic device is application E, and application E is a downloading application, then the current running scene of the electronic device is the downloading scene.
[0036] For another example, the foreground application running in the electronic device is application F, and application F is an application of another type other than the above types, then the current running scene of the electronic device is another scene.
[0037] The target network recovery operation is used to recover the network. The target network recovery operation includes at least one of the following: adjusting the parameters of the Transmission Control Protocol / Internet Protocol (TCP / IP), modifying the address of the Domain Name System (DNS) to Internet Protocol version 4-only (IPv4-only), and prohibiting the background application in the electronic device from accessing the network.
[0038] TCP / IP parameters include, but are not limited to, / proc / sys / net / ipv4 / tcp_mem, / proc / sys / net / ipv4 / tcp_rmem, / proc / sys / net / ipv4 / tcp_syn_retries, etc.
[0039] tcp_mem indicates how the TCP stack should reflect memory usage. Each value is in memory pages (usually 4KB). The first value is the lower limit of memory usage; the second value is the upper limit at which the memory pressure mode starts to apply pressure to the buffer; the third value is the upper limit of memory usage. At this level, packets can be discarded to reduce memory usage.
[0040] tcp_rmem defines the memory used by the socket for automatic tuning. The first value is the minimum number of bytes allocated for the socket receive buffer; the second value is the default value (which will be overwritten by rmem_default), the buffer can grow to this value when the system is not heavily loaded; the third value is the maximum number of bytes of the receive buffer space.
[0041] The value of tcp_syn_retries indicates the number of retries after the first SYN packet is sent when the socket client performs s.connect() and the server does not return the SYN+ACK flag, that is, after the connection times out, including the calculation of the retry time.
[0042] When a network freeze is detected, after obtaining the target network recovery operation that matches the current operation scenario of the electronic device, enter:
[0043] Step 1200: Control the electronic device to execute the target network recovery operation to recover the network.
[0044] The target network recovery operation includes at least one of the following: adjusting TCP / IP parameters, modifying the DNS address to ipv4-only, and disabling the background application in the electronic device from accessing the network. In one example, when the target network recovery operation includes adjusting TCP / IP parameters, controlling the electronic device to perform the target network recovery operation to restore the network in step 1200 may further include: controlling the electronic device to adjust TCP / IP parameters to restore the network.
[0045] In this example, when a network freeze is detected, for example, / proc / sys / net / ipv4 / tcp_rmem=a1 can be adjusted to / proc / sys / net / ipv4 / tcp_rmem=a2, and / proc / sys / net / ipv4 / tcp_mem=b1 can be adjusted to / proc / sys / net / ipv4 / tcp_mem=b2, and so on.
[0046] In this example, when the network freezes, the TCP / IP parameters can be adjusted for all operating scenarios to restore the network as quickly as possible, and the user's perception is very small.
[0047] In one example, when the target network recovery operation includes adjusting TCP / IP parameters, controlling the electronic device to perform the target network recovery operation to recover the network in step 1200 may further include: controlling the electronic device to modify the DNS address to ipv4-only to recover the network.
[0048] In this example, when Internet access is slow, it may also be caused by DNS slowness. In the early stage of IPv6 deployment, IPv6 access failures often occur. If the network slowdown is caused by IPv6 access failure, change the DNS address to IPv4 only for a period of time to restore the network.
[0049] In this example, if the network is stuck and the reason for the network stuck is the failure of ipv6 access, the electronic device will change the DNS address from ipv6 to ipv4 only, so that the network can be restored as soon as possible, and the user will hardly notice it.
[0050] In one example, when the target network recovery operation includes disabling background applications in the electronic device from the network, controlling the electronic device to perform the target network recovery operation to restore the network in step 1200 may further include: disabling background applications in the electronic device from the network to restore the network.
[0051] In this example, when the network freezes, you can first obtain the background applications in the electronic device, and directly ban the non-essential background applications from the network to restore the network. The non-essential application is an application that has not been used within a preset time period. Since the user has not used the background application within the preset time period, it means that even if it is banned from the network, the impact on the user is very small. At the same time, the network recovery of the foreground application in the electronic device is guaranteed.
[0052] In one example, when the current operating scenario of the electronic device is a video scenario, the target network recovery operation also includes increasing the cache quantity of the video. In step 1200, controlling the electronic device to perform the target network recovery operation to restore the network may further include: controlling the electronic device to increase the cache quantity of the video to restore the network.
[0053] In this example, for video scenarios, for example, h1 videos were previously loaded. When the network freezes, h1 can be increased to h2, that is, h2 videos are loaded, so that the user can surf the Internet as normally as possible.
[0054] In this embodiment, when a network freeze is detected, after obtaining a target network recovery operation of the network that matches the current operating scenario of the electronic device, the electronic device can be controlled to execute the target network recovery operation to recover the network.
[0055] In this embodiment, when the target network recovery operation includes N, where N is a positive integer greater than 1. In step 1200, controlling the electronic device to perform the target network recovery operation to recover the network may further include the following steps 1210 to 1220:
[0056] Step 1210: Obtain the priority of each of the N target network recovery operations.
[0057] Example 1: The current operating scenario of the electronic device is an operating scenario other than a video scenario, and the target network recovery operation includes, for example, adjusting TCP / IP parameters, modifying the DNS address to ipv4-only, and disabling at least two of the background applications in the electronic device from accessing the network.
[0058] In this example, the target network recovery operation has a priority, wherein the priority of adjusting TCP / IP parameters is higher than the priority of modifying the DNS address to ipv4-only, and the priority of modifying the DNS address to ipv4-only is higher than the priority of disabling the background application in the electronic device from the Internet.
[0059] Example 2: The current operation scenario of the electronic device is a video scenario, and the target network recovery operation also includes increasing the cache quantity of the video. That is, the target network recovery operation not only includes increasing the cache quantity of the video, but also includes adjusting TCP / IP parameters, modifying the DNS address to ipv4-only, prohibiting the background application in the electronic device from accessing the network, and increasing the cache quantity of the video.
[0060] In this example, the target network recovery operation has priorities, wherein the priority of increasing the cache amount of the video is higher than the priority of adjusting the TCP / IP parameters, the priority of adjusting the TCP / IP parameters is higher than the priority of modifying the DNS address to ipv4-only, and the priority of modifying the DNS address to ipv4-only is higher than the priority of disabling the background application in the electronic device from the Internet.
[0061] Step 1220: According to the priorities of the N target network recovery operations, control the electronic device to sequentially execute the N target network recovery operations until the network is recovered.
[0062] Continuing with the above example 1, it can be that according to the priority of the target network recovery operation, the electronic device is first controlled to adjust the TCP / IP parameters, and after adjusting the TCP / IP parameters, if the electronic device does not recover the network, the electronic device is controlled to modify the DNS address to the priority of ipv4-only, and after modifying the DNS address to the priority of ipv4-only, if the electronic device does not recover the network, the background application in the electronic device continues to be banned from the network to ensure that the electronic device recovers the network. Of course, after executing any target network recovery operation, if the electronic device recovers the network, the subsequent target network recovery operation will not be continued.
[0063] Exemplarily, taking the current running scenario of the electronic device as a game scenario, here, the electronic device can be controlled to adjust the TCP / IP parameters first, and after adjusting the TCP / IP parameters, if the electronic device does not restore the network, the electronic device is controlled to modify the DNS address to ipv4-only, and after modifying the DNS address to the priority of ipv4-only, the electronic device restores the network, and the subsequent target network recovery operation is stopped.
[0064] Continuing with the above example 2, it may be possible to first control the electronic device to increase the number of video caches based on the priority of the target network recovery operation. After increasing the number of video caches, if the electronic device has not recovered the network, adjust the TCP / IP parameters. After adjusting the TCP / IP parameters, if the electronic device has not recovered the network, control the electronic device to modify the DNS address to ipv4-only. After modifying the DNS address to the priority of ipv4-only, if the electronic device has not recovered the network, continue to ban the background application in the electronic device from the network to ensure that the electronic device recovers the network. Of course, after executing any target network recovery operation, the electronic device recovers the network, and the subsequent target network recovery operation will not be continued.
[0065] Exemplarily, since the current operating scenario of the electronic device is a video scenario, here, the electronic device can be controlled to increase the video cache quantity first, and after increasing the video cache quantity, the electronic device restores the network, then stops adjusting the TCP / IP parameters, modifies the DNS address to ipv4-only, and prohibits the background application in the electronic device from accessing the network.
[0066] According to the embodiment of the present application, when a network freeze is detected, a target network recovery operation of a network matching the current operating scenario of the electronic device is first obtained, and then the electronic device is controlled to perform the target network recovery operation to restore the network. Since the target network recovery operation generally includes adjusting TCP / IP parameters, modifying the DNS address to ipv4-only, and disabling the network for background applications in the electronic device, the target network recovery operation makes the user less aware of the recovery from the network freeze and provides a network recovery rate, thereby improving the user's Internet experience.
[0067] In some embodiments of the present application, before executing the above step 1100 and obtaining the current operation scene of the electronic device when a network freeze is detected, the method may further include steps 2100 to 2200:
[0068] Step 2100, obtaining a judgment parameter for judging whether a network freeze occurs.
[0069] The evaluation parameters include first type parameters, which include at least one of the following: a first round-trip time for sending data packets based on the TCP protocol, a packet loss rate losepackRate for sending data packets based on the TCP protocol, a retransmit rate retransmitpackRate for sending data packets based on the TCP protocol, and a network rate speed of the electronic device.
[0070] The first round-trip time is a round-trip delay (RTT) for sending a data packet based on the TCP protocol. The first round-trip time may be referred to as TCP RTT.
[0071] Step 2200: Determine whether the network is stuck based on the evaluation parameters.
[0072] In one example, determining whether the network is stuck according to the evaluation parameter in step 2200 may further include the following steps 2210a to 2220a:
[0073] Step 2210a: Determine a first evaluation condition that matches each of the first type parameters according to the current operating scenario.
[0074] The first judgment condition is associated with a judgment threshold of the corresponding first type parameter.
[0075] In this step 2210a, corresponding evaluation conditions are set for each first type parameter in different current operation scenarios.
[0076] For the first round trip time TCP RTT, a matching first threshold x may be set, and the first evaluation condition is that the first round trip time TCP RTT is greater than the first threshold x.
[0077] For the packet loss rate lostpackRate, a matching second threshold y may be set, and the first judgment condition is that the packet loss rate lostpackRate is greater than the second threshold y.
[0078] For the retransmit rate retransmitpackRate, a matching third threshold z may be set, and the first evaluation condition includes that the retransmit rate retransmitpackRate is greater than the third threshold z.
[0079] For the network rate speed, a matching fourth threshold s may be set, and the first evaluation condition includes that the network rate speed is less than the fourth threshold s.
[0080] Step 2220a: When all the first type parameters satisfy the first matching judgment condition, determine that the network is stuck.
[0081] In this step 2220a, for example, the first evaluation parameter includes the first round-trip time, packet loss rate, retransmission rate and network rate. Then, when the first round-trip time TCP RTT is greater than the first threshold x, the packet loss rate lostpackRate is greater than the second threshold y, the retransmission rate retransmitpackRate is greater than the third threshold z, and the network rate speed is less than the fourth threshold s, it is determined that the network is stuck.
[0082] According to the above steps 2210a to S2220a, in order to quickly identify network stalls, this example sets different evaluation conditions, that is, different evaluation thresholds, for different operating scenarios, so that network stalls can be quickly identified.
[0083] In one example, the evaluation parameters also include second type parameters, which include at least one of the following: a second round trip time of DNS, a DNS resolution success rate, a ping network, parameters of a modem in the electronic device, and a user identification card of the electronic device.
[0084] The second round-trip time is the round-trip delay (RTT) corresponding to the DNS, and the second round-trip time may be referred to as DNS RTT.
[0085] Modem parameters include, but are not limited to, wireless network uplink authorization, transmit power, block error rate (BLER), reference signal receiving power (RSRP), and the like.
[0086] In step 2200, determining whether the network is stuck according to the evaluation parameters may further include the following steps 2210b to 2220b:
[0087] Step 2210b: Determine a second evaluation condition that matches each of the second type parameters according to the current operating scenario.
[0088] The second judgment parameter is associated with a judgment threshold of the corresponding second type parameter.
[0089] In this step 2210b, corresponding evaluation conditions are set for each second type parameter in different current operation scenarios.
[0090] For the second round trip time DNS RTT, a matching fifth threshold p may be set, and the second evaluation condition is that the second round trip time DNS RTT is greater than the fifth threshold p.
[0091] For the DNS resolution success rate, a matching sixth threshold q may be set, and the second evaluation condition is that the DNS resolution success rate is less than the sixth threshold p.
[0092] For pinging the network, the second evaluation condition is that the pinging network is unavailable.
[0093] For parameters of the modem in the electronic device, such as RSRP, a matching seventh threshold a may be set, and the second evaluation condition is that RSRP is less than the seventh threshold a.
[0094] For a SIM card of an electronic device, the second evaluation condition is that the speed of the SIM card is limited.
[0095] It is understandable that different second type parameters can be selected for different operating scenarios, for example, only the second round trip time of DNS, the resolution success rate of DNS, and the ping network can be selected, or only the second round trip time of DNS and the resolution success rate of DNS can be selected.
[0096] Step 2220b, when all the first type parameters satisfy the first matching judgment condition and all the second type parameters satisfy the second matching judgment condition, determine that the network is stuck.
[0097] For example, the first evaluation parameter includes the first round trip time, packet loss rate, retransmission rate and network rate, and the selected second type parameter includes the DNS resolution success rate. If the first round trip time TCP RTT is greater than the first threshold x, the packet loss rate lostpackRate is greater than the second threshold y, the retransmit rate retransmitpackRate is greater than the third threshold z, the network rate speed is less than the fourth threshold s, and the DNS resolution success rate is less than the sixth threshold p, it is determined that the network is stuck.
[0098] For another example, the first evaluation parameter includes the first round trip time, packet loss rate, retransmission rate and network speed, and the selected second type parameter includes ping network. Then, when the first round trip time TCP RTT is greater than the first threshold x, the packet loss rate lostpackRate is greater than the second threshold y, the retransmit rate retransmitpackRate is greater than the third threshold z, the network speed speed is less than the fourth threshold s, and the ping network is unavailable, it is determined that the network is stuck.
[0099] According to the above steps 2210b to S2220b, in order to quickly identify network stalls, this example sets auxiliary evaluation parameters for different operating scenarios so that network stalls can be quickly identified.
[0100] Next, taking the current operation scene of the electronic device as a video scene, an example of a network recovery method is shown. In this example, the network recovery method includes:
[0101] Step 300: The user accesses the Internet and watches a video based on a terminal device.
[0102] Step 310, obtaining a first round trip time of sending a data packet based on the TCP protocol, a packet loss rate of sending a data packet based on the TCP protocol, a retransmission rate of sending a data packet based on the TCP protocol, and a network rate of the electronic device.
[0103] Step 320, when the first round-trip time TCP RTT is greater than the first threshold x, the packet loss rate lostpackRate is greater than the second threshold y, the retransmit rate retransmitpackRate is greater than the third threshold z, the network rate speed is less than the fourth threshold s, and the DNS resolution success rate is less than the sixth threshold p, it is determined that the network is stuck and step 330 is executed. Otherwise, the above step 300 is executed.
[0104] Step 330, when a network freeze is detected, obtain the priority of the target network recovery operation that matches the current operating scenario of the electronic device.
[0105] For example, when the target network recovery operation includes increasing the cache quantity of the video, adjusting the parameters of TCP / IP, modifying the address of DNS to ipv4-only, and disabling the background application in the electronic device from the network, the priority of increasing the cache quantity of the video is higher than the priority of adjusting the parameters of TCP / IP, the priority of adjusting the parameters of TCP / IP is higher than the priority of modifying the address of DNS to ipv4-only, and the priority of modifying the address of DNS to ipv4-only is higher than the priority of disabling the background application in the electronic device from the network.
[0106] Step 340: According to the priority of the target network recovery operation, control the electronic device to sequentially execute the target network recovery operation until the network is recovered.
[0107] Continuing with the above example, the electronic device may be controlled to increase the number of video caches, and after the number of video caches is increased from h1 to h2, the electronic device restores the network, and then stops the subsequent target recovery operation.
[0108] Step 350, whether the terminal device is restarted, if yes, execute step 360, otherwise, the process ends.
[0109] Step 360: Resume the executed target network recovery operation.
[0110] For example, because the electronic device previously increased the number of cached videos from h1 to h2, after the terminal device is restarted, the number of cached videos can be reduced from h2 to h1.
[0111] It should be noted that the network recovery method provided in the embodiment of the present application can be executed by a network recovery device or a control module in the network recovery device for executing the network recovery method. In the embodiment of the present application, the network recovery method is executed by a network recovery device as an example to illustrate the device of the network recovery method provided in the embodiment of the present application.
[0112] Corresponding to the above embodiment, see Figure 3 The embodiment of the present application further provides a network recovery device 300 , which includes an acquisition module 310 and a control module 320 .
[0113] The acquisition module 310 is used to acquire a target network recovery operation of the network that matches the current operation scenario of the electronic device when a network freeze is detected.
[0114] The control module 320 is used to control the electronic device to perform the target network recovery operation to recover the network.
[0115] The target network recovery operation includes at least one of the following: adjusting TCP / IP parameters, modifying the DNS address to ipv4-only, and disabling the background application in the electronic device from accessing the network.
[0116] In some embodiments, the network recovery device 300 further includes: the device 300 further includes a determination module (not shown in the figure).
[0117] The acquisition module 310 is also used to obtain evaluation parameters for judging whether the network is stuck; wherein the evaluation parameters include first type parameters, and the first type parameters include at least one of the following: a first round-trip time for sending data packets based on the TCP protocol, a packet loss rate for sending data packets based on the TCP protocol, a retransmission rate for sending data packets based on the TCP protocol, and a network rate of the electronic device.
[0118] The determination module is used to determine whether the network is stuck according to the evaluation parameters.
[0119] In some embodiments, the determination module is specifically used to: determine a first judgment condition that matches each of the first type parameters according to the current operating scenario; and determine that the network is stuck when all of the first type parameters meet the matching first judgment condition.
[0120] The first evaluation condition is associated with a corresponding evaluation threshold of the first type parameter.
[0121] In some embodiments, the evaluation parameters also include second type parameters, and the second type parameters include at least one of the following: a second round-trip time of DNS, a DNS resolution success rate, a ping network, parameters of the modem in the electronic device, and a user identification card of the electronic device; the detection module is specifically used to: determine a second evaluation condition that matches each of the second type parameters according to the current operating scenario; and determine that the network is stuck when all the first type parameters meet the matching first evaluation condition and all the second type parameters meet the matching second evaluation condition.
[0122] The second judgment parameter is associated with a judgment threshold of the corresponding second type parameter.
[0123] In one embodiment, when the target network recovery operation includes N, where N is a positive integer greater than 1. The control module 320 is specifically configured to obtain the priority of each of the N target network recovery operations; and according to the priority of each target network recovery operation, control the electronic device to sequentially execute the N target network recovery operations until the network is recovered.
[0124] In an embodiment of the present application, when a network freeze is detected, a target network recovery operation of a network matching the current operating scenario of the electronic device is first obtained, and then the electronic device is controlled to perform the target network recovery operation to restore the network. Since the target network recovery operation typically includes adjusting TCP / IP parameters, modifying the DNS address to ipv4-only, and disabling the network for background applications in the electronic device, the target network recovery operation makes the user less aware of the recovery from the network freeze and provides a faster network recovery rate, thereby improving the user's Internet experience.
[0125] The network recovery device in the embodiment of the present application can be a device, or a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device. Exemplarily, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA).
[0126] The network recovery device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0127] The network recovery device provided in the embodiment of the present application can achieve Figure 4 To avoid repetition, the various processes implemented by the method embodiment are not described here.
[0128] Corresponding to the above embodiment, optionally, as Figure 4 As shown, an embodiment of the present application also provides an electronic device 400, including a processor 401, a memory 402, and a program or instruction stored in the memory 402 and executable on the processor 401. When the program or instruction is executed by the processor 401, each process of the above-mentioned network recovery method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0129] It should be noted that the electronic device in the embodiments of the present application includes the mobile electronic device described above.
[0130] Figure 5 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.
[0131] The electronic device 500 includes but is not limited to: a radio frequency unit 501, a network module 502, an audio output unit 503, an input unit 504, a sensor 505, a display unit 506, a user input unit 507, an interface unit 508, a memory 509, and a processor 510.
[0132] Those skilled in the art will appreciate that the electronic device 500 may also include a power source (such as a battery) for supplying power to various components, and the power source may be logically connected to the processor 510 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Figure 5 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.
[0133] The processor 510 is used to obtain a target network recovery operation of the network that matches the current operation scenario of the electronic device when a network freeze is detected; and control the electronic device to execute the target network recovery operation to recover the network. The target network recovery operation includes at least one of the following: adjusting TCP / IP parameters, modifying the DNS address to ipv4-only, and prohibiting the background application in the electronic device from accessing the network.
[0134] In some embodiments, the processor 510 is further used to obtain evaluation parameters for judging whether the network is stuck; wherein the evaluation parameters include first type parameters, and the first type parameters include at least one of the following: a first round-trip time for sending data packets based on the TCP protocol, a packet loss rate for sending data packets based on the TCP protocol, a retransmission rate for sending data packets based on the TCP protocol, and a network rate of the electronic device; based on the evaluation parameters, determine whether the network is stuck.
[0135] In some embodiments, the processor 510 is further configured to determine, according to the current operating scenario, a first evaluation condition matching each of the first type parameters; and to determine that the network is stuck when all the first type parameters satisfy the matching first evaluation condition. The first evaluation condition is associated with a corresponding evaluation threshold of the first type parameter.
[0136] In some embodiments, the evaluation parameter also includes a second type parameter, and the second type parameter includes at least one of a second round trip time of the DNS, a DNS resolution success rate, a ping network, a parameter of a modem in the electronic device, and a user identification card of the electronic device. The processor 510 is also used to: determine a second evaluation condition that matches each of the second type parameters according to the current operation scenario; and determine that the network is stuck when all the first type parameters meet the matching first evaluation condition and all the second type parameters meet the matching second evaluation condition. The second evaluation parameter is associated with a corresponding evaluation threshold of the second type parameter.
[0137] In one embodiment, when the target network recovery operation includes N operations, where N is a positive integer greater than 1, the processor 510 is further used to: obtain the priority of each of the N target network recovery operations; and control the electronic device to execute the N target network recovery operations in sequence according to the priority of each target network recovery operation until the network is recovered.
[0138] In an embodiment of the present application, when a network freeze is detected, a target network recovery operation of a network matching the current operating scenario of the electronic device is first obtained, and then the electronic device is controlled to execute the target network recovery operation to restore the network. Since the target network recovery operation typically includes adjusting TCP / IP parameters, modifying the DNS address to ipv4-only, and disabling the network for background applications in the electronic device, the target network recovery operation makes the user less aware of the recovery from the network freeze, increases the rate of network recovery, and thus improves the user's Internet experience.
[0139] It should be understood that in the embodiment of the present application, the input unit 504 may include a graphics processor (Graphics Processing Unit, GPU) 5041 and a microphone 5042, and the graphics processor 5041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 506 may include a display panel 5061, and the display panel 5061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 507 includes a touch panel 5071 and other input devices 5072. The touch panel 5071 is also called a touch screen. The touch panel 5071 may include two parts: a touch detection device and a touch controller. Other input devices 5072 may include but are not limited to a physical keyboard, a function key (such as a volume control button, a switch button, etc.), a trackball, a mouse, and a joystick, which will not be repeated here. The memory 509 can be used to store software programs and various data, including but not limited to applications and operating systems. The processor 510 can integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, the user interface, and the application program, etc., and the modem processor mainly processes wireless communication. It is understandable that the above-mentioned modem processor may not be integrated into the processor 510.
[0140] The embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned network recovery method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0141] The processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0142] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned network recovery embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0143] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0144] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0145] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0146] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A network recovery method, characterized in that: include: When a network freeze is detected, a target network recovery operation matching a current operation scenario of the electronic device is obtained; Controlling the electronic device to perform the target network recovery operation to recover the network; The target network recovery operation includes at least two of the following: adjusting the parameters of the transmission control protocol / Internet protocol TCP / IP, modifying the address of the domain name system DNS to Internet protocol version 4 ipv4-only, and prohibiting the background application in the electronic device from accessing the network; Wherein, in the case where the target network recovery operation includes N, controlling the electronic device to perform the target network recovery operation to restore the network includes: obtaining the priority of each target network recovery operation in the N target network recovery operations; according to the priority of each target network recovery operation, controlling the electronic device to perform the N target network recovery operations in sequence until the network is restored; wherein N is a positive integer greater than 1.
2. The method according to claim 1, characterized in that Before obtaining the current operation scene of the electronic device when a network freeze is detected, the method further includes: Obtain the evaluation parameters for judging whether the network is stuck; The evaluation parameters include first type parameters, and the first type parameters include at least one of the following: a first round trip time for sending a data packet based on the TCP protocol, a packet loss rate for sending a data packet based on the TCP protocol, a retransmission rate for sending a data packet based on the TCP protocol, and a network rate of the electronic device; According to the evaluation parameters, it is determined whether the network is stuck.
3. The method according to claim 2, characterized in that The determining, according to the evaluation parameter, whether the network is stuck, includes: Determine, according to the current operation scenario, a first evaluation condition matching each of the first type parameters; wherein the first evaluation condition is associated with a corresponding evaluation threshold of the first type parameter; When all the first-type parameters satisfy the first matching judgment condition, it is determined that the network is stuck.
4. The method according to claim 3, characterized in that The evaluation parameters also include a second type of parameters, which include at least one of the following: a second round trip time of the DNS, a DNS resolution success rate, a ping network, parameters of a modem in the electronic device, and a user identification card of the electronic device; The determining, according to the evaluation parameter, whether the network is stuck, includes: Determine, according to the current operation scenario, a second evaluation condition matching each of the second type parameters; wherein the second evaluation condition is associated with a corresponding evaluation threshold of the second type parameter; When all the first-type parameters satisfy the first matching judgment condition and all the second-type parameters satisfy the second matching judgment condition, it is determined that the network is stuck.
5. A network recovery device, characterized in that: The device comprises: An acquisition module, used to acquire a target network recovery operation matching a current operation scenario of the electronic device when a network freeze is detected; A control module, used for controlling the electronic device to perform the target network recovery operation to recover the network; The target network recovery operation includes at least two of the following: adjusting TCP / IP parameters, modifying the DNS address to ipv4-only, and prohibiting the background application in the electronic device from accessing the network; Wherein, the acquisition module is further used to acquire the priority of each target network recovery operation in the N target network recovery operations; The control module is further used to control the electronic device to sequentially perform the N target network recovery operations until the network is recovered according to the priority of each target network recovery operation; Wherein, N is a positive integer greater than 1.
6. The device according to claim 5, characterized in that The device also includes a determination module, The acquisition module is further used to acquire a judgment parameter for judging whether the network is stuck; wherein the judgment parameter includes a first type parameter, and the first type parameter includes at least one of the following: a first round trip time for sending a data packet based on the TCP protocol, a packet loss rate for sending a data packet based on the TCP protocol, a retransmission rate for sending a data packet based on the TCP protocol, and a network rate of the electronic device; The determination module is used to determine whether a network freeze occurs according to the evaluation parameter.
7. The device according to claim 6, characterized in that The determining module is specifically used for: Determine, according to the current operation scenario, a first evaluation condition matching each of the first type parameters; wherein the first evaluation condition is associated with a corresponding evaluation threshold of the first type parameter; When all the first-type parameters satisfy the first matching judgment condition, it is determined that the network is stuck.
8. The device according to claim 7, characterized in that The evaluation parameters also include a second type of parameters, which include at least one of the following: a second round trip time of the DNS, a DNS resolution success rate, a ping network, parameters of a modem in the electronic device, and a user identification card of the electronic device; the determination module is specifically used to: Determine, according to the current operation scenario, a second evaluation condition matching each of the second type parameters; wherein the second evaluation condition is associated with a corresponding evaluation threshold of the second type parameter; When all the first-type parameters satisfy the first matching judgment condition and all the second-type parameters satisfy the second matching judgment condition, it is determined that the network is stuck.
