CN106922006B - Network preferred mode switching method and device - Google Patents

Network preferred mode switching method and device Download PDF

Info

Publication number
CN106922006B
CN106922006B CN201710257539.9A CN201710257539A CN106922006B CN 106922006 B CN106922006 B CN 106922006B CN 201710257539 A CN201710257539 A CN 201710257539A CN 106922006 B CN106922006 B CN 106922006B
Authority
CN
China
Prior art keywords
network
timer
mode
position information
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710257539.9A
Other languages
Chinese (zh)
Other versions
CN106922006A (en
Inventor
胡建树
王东洋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Lianhong Technology Co ltd
Original Assignee
TP Link Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by TP Link Technologies Co Ltd filed Critical TP Link Technologies Co Ltd
Priority to CN201710257539.9A priority Critical patent/CN106922006B/en
Publication of CN106922006A publication Critical patent/CN106922006A/en
Application granted granted Critical
Publication of CN106922006B publication Critical patent/CN106922006B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/0005Control or signalling for completing the hand-off
    • H04W36/0083Determination of parameters used for hand-off, e.g. generation or modification of neighbour cell lists
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/16Threshold monitoring
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/08Testing, supervising or monitoring using real traffic
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/0005Control or signalling for completing the hand-off
    • H04W36/0083Determination of parameters used for hand-off, e.g. generation or modification of neighbour cell lists
    • H04W36/0085Hand-off measurements
    • H04W36/0094Definition of hand-off measurement parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/02Services making use of location information
    • H04W4/025Services making use of location information using location based information parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/02Services making use of location information
    • H04W4/029Location-based management or tracking services

Abstract

The invention discloses a method and a device for switching network preferred modes, wherein the method comprises the following steps: detecting whether the network parameters meet the switching condition of the second network optimization mode under the first network optimization mode; when the historical position information is not satisfied, clearing the historical position information; when the first network preference mode is satisfied, setting the first network preference mode; judging whether historical position information exists or not in a second network optimization mode; if not, setting the value of the second timer as an initial value; if yes, setting the value of a second timer to be not less than the last set value according to the current position information and the historical position information; periodically detecting whether the network parameters meet the switching condition of the first network preferred mode according to the value of the second timer; and when the current position information meets the preset condition, setting the current position information as the historical position information, and saving the current position information. By the method, intelligent switching of the network optimization mode is realized, and the problems that the network optimization mode is frequently switched and cannot be set to be a better network optimization mode in time when manual setting is carried out are solved.

Description

Network preferred mode switching method and device
Technical Field
The invention relates to the technical field of communication, in particular to a network optimal mode switching method and device.
Background
With the rapid development of mobile communication technology, the emergence and popularization of third generation mobile communication technology (3G) and fourth generation mobile communication technology (4G), more and more people use mobile terminals to transmit and receive data through mobile data networks. Theoretically, the network quality of 4G networks will be better than that of 3G networks, so when selecting the network preference mode, one will often select the 4G preference mode, i.e. when using a mobile data network, the 4G network is preferred.
However, because the operator networks are not balanced in construction, in some areas, the 4G network quality is not good, but the 3G network quality is good, when the current network preference mode of the terminal is set to the 4G preference mode, if it is detected that the signal quality of the 4G network is less than a threshold value, and the signal quality of the 3G network is greater than the threshold value at this time, the terminal automatically switches from the 4G network to the 3G network; when the terminal is in the 3G network, the signal quality of the 4G network is detected at regular intervals, and when the signal quality of the 4G network is detected to be greater than a threshold value, the terminal is switched from the 3G network to the 4G network; and if the signal quality of the 4G network is detected to be poor again, switching to the 3G network again. Frequent network switching can cause unstable network connection of the terminal and poor user internet experience, so that the user needs to manually select the 3G refer mode at the moment to enable the current network to stay in the 3G network, and the problem that the terminal frequently switches the network is solved. However, when the user leaves the area with poor 4G network quality, the network quality of the 4G network is better than that of the 3G network, and the user needs to manually select the current network preference mode as the 4G preference mode again to reconnect to the 4G network.
When a user is in a certain area, the user needs to manually change a network preferred mode under the condition that the network quality of a current connected network is poor so as to obtain better network quality, meanwhile, after the user manually selects a 3G refer mode in the area with poor 4G network quality, the user can not judge when the 4G network quality is improved, so that the user can frequently and manually change the network preferred mode so as to obtain better network quality in time, or the terminal is maintained in the 3G refer mode for a long time, but under the condition, even if the 4G network quality is improved, the terminal can only be connected with the 3G network but cannot be connected with the 4G network.
Disclosure of Invention
The invention aims to provide a network switching method and a network switching device, which can realize intelligent switching of a network optimization mode, can set different detection periods according to different conditions, and solve the problems that the network optimization mode is frequently switched and cannot be set to a better network optimization mode in time when the network optimization mode is manually set.
In order to achieve the above object, an aspect of the present invention provides a network preferred mode switching method, including:
when the current network optimization mode is the first network optimization mode, periodically detecting whether the network parameters in the first network meet the switching condition of the second network optimization mode according to the preset timing value of the first timer;
when the network parameters in the first network do not meet the switching condition of the preferred mode of the second network, the historical position information of the communication equipment is cleared;
when the network parameters in the first network meet the switching condition of the second network optimization mode, setting the current network optimization mode as the second network optimization mode;
when the current network optimization mode is a second network optimization mode, judging whether the historical position information exists or not;
when the historical position information is not stored, setting a timing value of a second timer as a preset initial value;
when the historical position information is stored, setting the timing value of a second timer to be not less than the last setting value of the second timer according to the current position information and the historical position information of the communication equipment;
periodically detecting whether the network parameters in the second network meet the switching condition of the first network preferred mode according to the timing value of the second timer;
and when the network parameters in the second network meet the switching condition of the first network optimization mode, setting the current network optimization mode as the first network optimization mode, and acquiring current position information to be used as historical position information for storage.
In an optional implementation, the setting, when the historical location information is stored, the timing value of the second timer to be not less than a last setting value of the second timer according to the current location information of the communication device and the historical location information includes:
when the historical position information exists, acquiring the current position information of the communication equipment;
calculating the moving distance of the communication equipment according to the current position information and the historical position information;
judging whether the moving distance of the communication equipment is greater than a preset distance threshold value or not;
when the moving distance of the communication equipment is greater than a preset distance threshold value, setting a timing value of a second timer to be N times of a last setting value of the second timer; wherein N is greater than 1;
and when the moving distance of the communication equipment is smaller than a preset distance threshold value, setting the timing value of the second timer to be a preset maximum value.
In an optional implementation manner, when the historical location information is stored, the setting the timing value of the second timer to be not less than a last setting value of the second timer according to the current location information of the communication device and the historical location information further includes:
and when the timing value of the second timer exceeds the preset maximum value, setting the timing value of the second timer to be the preset maximum value.
In an optional implementation manner, when the current network preferred mode is the first network preferred mode, periodically detecting whether the network parameter in the first network meets the second network preferred mode switching condition according to a preset timer value of the first timer, includes:
when the current network optimization mode is the first network optimization mode, periodically detecting the current network speed of the first network according to a preset timing value of a first timer;
and when the current network speed of the first network is greater than the network speed threshold value, judging that the network parameters under the first network do not meet the switching condition of the preferred mode of the second network.
In an optional implementation manner, when the current network preferred mode is the first network preferred mode, periodically detecting whether a network parameter in the first network meets a second network preferred mode switching condition according to a preset timer value of the first timer, further includes:
when the current network speed of the first network is smaller than a network speed threshold value, performing connectivity detection on the first network to obtain an average packet loss number and an average delay;
when the average packet loss number is smaller than a packet loss threshold and the average delay is smaller than a delay threshold, judging that the network parameters in the first network do not meet the switching condition of the preferred mode of the second network;
and when the average packet loss number is greater than a packet loss threshold or the average delay is greater than a delay threshold, judging that the network parameters in the first network meet the switching condition of the preferred mode of the second network.
In order to achieve the same object, another aspect of the present invention provides a network preferred mode switching apparatus, configured in a communication device, including:
the first network detection module is used for periodically detecting whether the network parameters in the first network meet the switching condition of the preferred mode of the second network according to the preset timing value of the first timer when the current network preferred mode is the preferred mode of the first network;
the historical position clearing module is used for clearing the historical position information of the communication equipment when the network parameters under the first network do not meet the switching condition of the preferred mode of the second network;
the first mode switching module is used for setting the current network optimization mode to be a second network optimization mode when the network parameters under the first network meet the switching condition of the second network optimization mode;
a historical position judging module, configured to judge whether the historical position information is stored when the current network preferred mode is a second network preferred mode;
the first timing value setting module is used for setting the timing value of the second timer as a preset initial value when the historical position information is not stored;
the second timing value setting module is used for setting the timing value of a second timer to be not less than the last set value of the second timer according to the current position information and the historical position information of the communication equipment when the historical position information is stored;
the second network detection module is used for periodically detecting whether the network parameters in the second network meet the switching condition of the first network preferred mode according to the timing value of the second timer;
and the second mode switching module is used for setting the current network optimization mode as the first network optimization mode when the network parameters in the second network meet the first network optimization mode switching condition, and acquiring the current position information to be stored as historical position information.
In an optional embodiment, the second timing value setting module includes:
a current position acquisition unit configured to acquire current position information of the communication device when the history position information exists;
the distance calculation unit is used for calculating the moving distance of the communication equipment according to the current position information and the historical position information;
the distance judging unit is used for judging whether the moving distance of the communication equipment is greater than a preset distance threshold value or not;
a first timing value setting unit, configured to set a timing value of a second timer to be N times of a last setting value of the second timer when a moving distance of the communication device is greater than a preset distance threshold; wherein N is greater than 1;
and the second timing value setting unit is used for setting the timing value of the second timer to be a preset maximum value when the moving distance of the communication equipment is smaller than a preset distance threshold value.
In an optional embodiment, the second timing value setting module further includes:
and the timing value setting control unit is used for setting the timing value of the second timer to be the preset maximum value when the timing value of the second timer exceeds the preset maximum value.
In an optional implementation, the first network detection module includes:
the first network speed detection unit is used for periodically detecting the current network speed of the first network according to a preset timing value of a first timer when the current network optimization mode is the first network optimization mode;
and the first detection judging unit is used for judging that the network parameters under the first network do not meet the switching condition of the preferred mode of the second network when the current network speed of the first network is greater than the network speed threshold value.
In an optional implementation manner, the first network detection module further includes:
a connectivity detection unit, configured to perform connectivity detection on the first network to obtain an average packet loss number and an average delay when the current network speed of the first network is less than a network speed threshold;
a second detection determining unit, configured to determine that the network parameter in the first network does not satisfy a second network preferred mode switching condition when the average packet loss number is smaller than a packet loss threshold and the average delay time is smaller than a delay threshold;
and the third detection judging unit is used for judging that the network parameters in the first network meet the switching condition of the preferred mode of the second network when the average packet loss number is greater than a packet loss threshold or the average delay is greater than a delay threshold.
Compared with the prior art, the embodiment of the invention has the beneficial effects that: the embodiment of the invention provides a network preferred mode switching method and a device, wherein the method comprises the following steps: when the current network optimization mode is the first network optimization mode, periodically detecting whether the network parameters in the first network meet the switching condition of the second network optimization mode according to the preset timing value of the first timer; when the network parameters in the first network do not meet the switching condition of the preferred mode of the second network, the historical position information of the communication equipment is cleared; when the network parameters in the first network meet the switching condition of the second network optimization mode, setting the current network optimization mode as the second network optimization mode; when the current network optimization mode is a second network optimization mode, judging whether the historical position information exists or not; when the historical position information is not stored, setting a timing value of a second timer as a preset initial value; when the historical position information is stored, setting the timing value of a second timer to be not less than the last setting value of the second timer according to the current position information and the historical position information of the communication equipment; periodically detecting whether the network parameters in the second network meet the switching condition of the first network preferred mode according to the timing value of the second timer; and when the network parameters in the second network meet the switching condition of the first network optimization mode, setting the current network optimization mode as the first network optimization mode, and acquiring current position information to be used as historical position information for storage. By the method, the communication equipment automatically switches the network optimization mode when detecting that the network parameters of the current network meet the network optimization mode switching condition in the current network optimization mode, sets the timing values of different second timers according to the existence or nonexistence of historical position information and the size of the moving distance, optimizes the second timers to set different detection periods, realizes intelligent switching of the network optimization mode, and solves the problems that the network optimization mode is frequently switched and cannot be set to be a better network optimization mode in time when the network optimization mode is manually set.
Drawings
In order to more clearly illustrate the technical solution of the present invention, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart illustrating a network preferred mode switching method according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a network preferred mode switching device in an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Please refer to fig. 1, which is a flowchart illustrating a network preferred mode switching method according to an embodiment of the present invention. The embodiment of the invention provides a network preferred mode switching method, which comprises the following steps:
s1, when the current network optimization mode is the first network optimization mode, periodically detecting whether the network parameters in the first network meet the second network optimization mode switching condition according to the preset timing value of the first timer;
s2, when the network parameter in the first network does not satisfy the switch condition of the second network preference mode, the historical position information of the communication equipment is cleared;
s3, when the network parameter in the first network meets the switch condition of the second network preference mode, the current network preference mode is set as the second network preference mode;
s4, when the current network optimization mode is the second network optimization mode, judging whether the historical position information is stored;
s5, when the historical position information is not stored, setting the timing value of the second timer as a preset initial value;
s6, when the historical position information is stored, setting the timing value of a second timer to be not less than the last setting value of the second timer according to the current position information and the historical position information of the communication equipment;
s7, periodically detecting whether the network parameter in the second network meets the first network preferred mode switching condition according to the timing value of the second timer;
and S8, when the network parameter in the second network meets the switching condition of the first network preference mode, setting the current network preference mode as the first network preference mode, and acquiring the current position information to be stored as historical position information.
According to the method provided by the embodiment of the invention, under the current network optimization mode, when the network parameters of the current network are detected to meet the network optimization mode switching condition, the network optimization mode is automatically switched, and when the current network optimization mode is the second network optimization mode, different timing values of the second timer can be set according to the existence or nonexistence of historical position information and the size of the moving distance, so that the second timer is optimized to set different detection periods, the intelligent switching of the network optimization mode is realized, and the problems that the network optimization mode is frequently switched and cannot be set to a better network optimization mode in time when the network optimization mode is manually set are solved.
It should be understood that, when the network parameter under the first network does not satisfy the second network preferred mode switching condition, the current network preferred mode is the first network preferred mode, and the communication device keeps connecting with the first network; and when the network parameters under the second network do not meet the switching condition of the first network preference mode, the current network preference mode is the second network preference mode, and the communication equipment keeps being connected with the second network.
It should be noted that, since the detection of whether the network parameter under the first network satisfies the second network preferred mode switching condition is performed periodically in the present invention, the historical location information of the communication device is cleared once it is detected that the network parameter under the first network does not satisfy the second network preferred mode switching condition. Such as: during the first detection, the network parameters in the first network are detected not to meet the switching condition of the preferred mode of the second network, and the historical position information of the communication equipment is cleared; at the time of the second detection, it is detected that the network parameter under the first network meets the second network preference mode switching condition, and the current network preference mode is set to the second network preference mode, at this time, since the historical location information of the communication device has been cleared in the first detection, in the step of determining whether the historical location information is stored when the current network preference mode is the second network preference mode, the historical location information is not stored, that is, in this case, it is determined that the historical location information is not stored.
In an alternative embodiment, the step S1 includes:
when the current network optimization mode is the first network optimization mode, periodically detecting the current network speed of the first network according to a preset timing value of a first timer;
and when the current network speed of the first network is greater than the network speed threshold value, judging that the network parameters under the first network do not meet the switching condition of the preferred mode of the second network.
When the current network speed of the first network is greater than the network speed threshold, that is, the network layer speed of the current network is greater than the network speed threshold and the user has a large traffic demand on the current network, therefore, the current network optimization mode is not switched at this time, that is, the communication device maintains the connection with the first network, and the network instability of the communication device caused by switching the network under the condition that the user has a large traffic demand on the network can be avoided.
In an optional implementation, the step S1 further includes:
when the current network speed of the first network is smaller than a network speed threshold value, performing connectivity detection on the first network to obtain an average packet loss number and an average delay;
when the average packet loss number is smaller than a packet loss threshold and the average delay is smaller than a delay threshold, judging that the network parameters in the first network do not meet the switching condition of the preferred mode of the second network;
and when the average packet loss number is greater than a packet loss threshold or the average delay is greater than a delay threshold, judging that the network parameters in the first network meet the switching condition of the preferred mode of the second network.
When the current network speed of the first network is smaller than the network speed threshold, that is, the network layer speed of the current network is smaller than the network speed threshold or the traffic demand of the current user on the network is small, further determination needs to be performed through a connectivity test; when the average packet loss number acquired in the connectivity test is smaller than the packet loss threshold and the average delay is smaller than the delay threshold, it is indicated that the reason that the current network speed of the current first network is smaller than the network speed threshold is that the current user has a smaller traffic demand on the network, so that the network optimization mode does not need to be switched, even if the communication device keeps being connected with the first network; when the average packet loss number acquired in the connectivity test is greater than the packet loss threshold or the average delay is greater than the delay threshold, it indicates that the reason that the current network speed of the current first network is less than the network speed threshold is that the network layer speed of the current network is less than the network speed threshold, so that the current network optimization mode is switched to the second network optimization mode, even if the communication device is connected with the second network.
In another optional embodiment, the step S1 further includes:
when the current network speed of the first network is less than the network speed threshold, performing connectivity detection on the first network for M times, and correspondingly obtaining the average packet loss number and the average delay of each connectivity detection; wherein M is greater than 1;
when the average packet loss number in the connectivity detection is larger than a packet loss threshold or the average delay is larger than a delay threshold, judging that the first network passes the current connectivity test;
when the average packet loss number in the connectivity detection is smaller than a packet loss threshold and the average delay time is smaller than a delay threshold, determining that the first network does not pass the current connectivity test;
when the number of times that the current network does not pass the current connectivity test is less than K times in the M times of connectivity tests, judging that the network parameters under the first network do not meet the switching condition of the preferred mode of the second network;
and when the number of times that the current network does not pass the current connectivity test is more than or equal to K times in the M times of connectivity tests, judging that the network parameters under the first network meet the second network mode switching condition, wherein K is more than 1 and less than or equal to M.
Such as: when the current network speed of the first network is less than the network speed threshold value, performing connectivity detection on the first network for 3 times, and when the connectivity detection of 3 times is determined that the current network passes the current connectivity detection, determining that the network parameters in the first network do not satisfy the second network mode switching condition; and when the current network does not pass the current connectivity detection for 2 times in the 3 times of connectivity detection, judging that the network parameters under the first network meet the second network mode switching condition.
By carrying out multiple times of connectivity detection on the first network, the situation of judgment errors caused by transient network faults is effectively avoided, and the judgment accuracy is improved.
In an optional embodiment, the connectivity detection specifically includes: ping a preset destination address. The average packet loss number and the average delay can be obtained through the ping preset destination address to reflect the speed of the current network layer speed, and meanwhile, the ping preset destination address is a network speed measuring method with low user consumption flow and is beneficial to reducing the influence on the user.
In an alternative embodiment, the preset destination address includes a preset first destination address and a preset second destination address. When the first destination address preset by ping returns abnormal information, the second destination address preset by ping obtains the average packet loss number and the average delay, and by setting the two destination addresses with different priorities, the judgment error caused by the abnormality of a single server in the network is avoided, and the judgment accuracy is improved.
In an alternative embodiment, the step S6 includes:
when the historical position information exists, acquiring the current position information of the communication equipment;
calculating the moving distance of the communication equipment according to the current position information and the historical position information;
judging whether the moving distance of the communication equipment is greater than a preset distance threshold value or not;
when the moving distance of the communication equipment is greater than a preset distance threshold value, setting a timing value of a second timer to be N times of a last setting value of the second timer; wherein N is greater than 1;
and when the moving distance of the communication equipment is smaller than a preset distance threshold value, setting the timing value of the second timer to be a preset maximum value.
When the historical location information is stored, it is indicated that the communication device not only meets the second network preferred mode switching condition in the detection of the network parameters in the first network when the network preferred mode is the first network preferred mode, and when the network preferred mode is changed from the second network preferred mode to the first network preferred mode in the first detection, the detection of the network parameters in the first network also meets the second network preferred mode switching condition, that is, the current network parameters of the first network are not improved, at this time, the moving distance of the communication device calculated according to the current location information and the historical location information sets timing values of different time lengths for the second timer by judging whether the moving distance of the communication device is smaller than a distance threshold value or not.
In the existing operator network construction, the network parameter change of the same network is small in a certain distance range, namely when the moving distance of the communication equipment is in the certain distance range, the network parameter change of the same network is not too large; when the moving distance of the communication device exceeds the certain distance range, the network parameters of the same network may have large changes. Therefore, when the moving distance of the communication equipment is smaller than the distance threshold value, the network parameters under the first network are not greatly improved, and the timing value of the second timer is set to the preset maximum value, so that the current network preference mode can be maintained in the second network preference mode for a long time, and frequent switching of the network preference mode is avoided; when the moving distance of the communication equipment is greater than the distance threshold value, the network parameters of the first network may have large changes, and at this time, the timing value of the second timer is set to be N times of the last setting value of the second timer, wherein N is greater than 1, and the timing value of the second timer is properly increased, so that not only can the network switching frequency be properly reduced, but also the network optimization mode switching failure caused by long-time non-detection can be avoided.
In an optional implementation, the step S6 further includes:
and when the timing value of the second timer exceeds the preset maximum value, setting the timing value of the second timer to be the preset maximum value.
In the setting of the timing value of the second timer, the timing value of the second timer is controlled within a preset maximum value, so that the phenomenon that the network parameter detection period of the second network is too long due to the fact that the timing value of the second timer is continuously increased is effectively avoided, and the practicability is improved.
In an alternative embodiment, the step S7 includes:
periodically detecting the current network speed of the second network according to the timing value of the second timer;
when the current network speed of the second network is less than the network speed threshold value, judging that the network parameters under the second network meet the switching condition of the preferred mode of the first network;
and when the current network speed of the second network is greater than the network speed threshold value, judging that the network parameters under the second network do not meet the switching condition of the preferred mode of the first network.
When the current network speed of the second network is smaller than the network speed threshold value, the current user has smaller flow demand on the network, and at the moment, if the network optimization mode switching is carried out to realize the switching of the current network, the influence on the user is smaller, so that the first network optimization mode switching condition is judged to be met; when the current network speed of the second network is greater than the network speed threshold, it indicates that the traffic demand of the current user on the network is large, and at this time, if the network optimization mode is switched, the network connection of the communication device is unstable, and the user is greatly affected, so that it is determined that the first network optimization mode switching condition is not satisfied.
In an alternative embodiment, the first network preferred mode is a 4G refer mode, and the first network is a 4G network; the second network preferred mode is a 3G refer mode, and the second network is a 3G network. The following will illustrate the specific implementation of the present invention in different cases by taking the present embodiment as an example:
in the case that the network parameters of the 4G network do not always satisfy the 3G preference mode switching condition during the connection of the mobile data network using the communication device: when the current network mode is the 4G preference mode, periodically detecting whether the network parameters of the 4G network meet the 3G preference mode switching condition or not according to the timing value of the first timer, and when the network parameters of the 4G network do not meet the 3G preference mode switching condition, the communication equipment keeps connection with the 4G network and clears the historical position information of the communication equipment. When detecting that the 4G network parameters do not meet the 3G preference mode switching condition all the time, it indicates that the current 4G network parameters are always better, so the current network preferred mode is kept in the 4G preference mode, and the communication device keeps being connected with the 4G network.
In case the distance of movement of the communication device is greater than a distance threshold during connection of the mobile data network using the communication device, and the movement of the communication device causes the network parameters of the 4G network to undergo a change from satisfying the 3G preference mode switching condition to not satisfying the 3G preference mode switching condition: when the current network preference mode is the 4G preference mode, periodically detecting whether the network parameters of the 4G network meet the switching condition of the 3G preference mode according to the timing value of a first timer, and setting the current network preference mode to be the 3G preference mode when the network parameters of the 4G network meet the switching condition of the 3G preference mode; in the 3G refer mode, judging whether historical position information exists or not, wherein the historical position information does not exist in the process of using the communication equipment just now, so that the historical position information does not exist, setting the timing value of the second timer to be a preset initial value, and periodically detecting whether the network parameters of the 3G network meet the requirement of switching to the 4G refer mode according to the timing value of the second timer; when the network parameters of the 3G network are detected to meet the requirement of switching to a 4G preference mode, setting the current network preference mode to the 4G preference mode, and acquiring current position information to store as historical position information; and in the 4G prefer mode, periodically detecting whether the network parameters of the 4G network meet the 3G prefer mode switching condition according to the timing value of the first timer, and clearing the historical position information because the communication equipment improves the network parameters of the 4G network due to the position change of the communication equipment and does not meet the 3G prefer mode switching condition, wherein the current network preferred mode is the 4G prefer mode, and the communication equipment keeps being connected with the 4G network. In the 4G refer mode, when periodically detecting whether the network parameter of the 4G network satisfies the 3G refer mode switching condition according to the timing value of the first timer, the historical location information is cleared once it is detected that the network parameter of the 4G network does not satisfy the 3G refer mode switching condition, so that in this case, even if the network parameter of the 4G network has a large change and satisfies the 3G refer mode switching condition, it is determined that the historical location information does not exist, and the timing value of the second timer is set to a preset initial value.
In the process of connecting the mobile data network by using the communication equipment, the moving distance of the communication equipment is greater than the distance threshold, and under the condition that the network parameters of the 4G network always meet the 3G prefer mode switching condition: when the current network optimization mode is the 4G pre-mode, periodically detecting whether the network parameters of the 4G network meet the 3G pre-mode switching condition according to the timing value of a first timer, and setting the current network optimization mode to be the 3G pre-mode when the network parameters of the 4G network meet the 3G pre-mode switching condition; in the 3G refer mode, judging whether historical position information exists or not, wherein the historical position information does not exist in the process of using the communication equipment just now, so that the historical position information does not exist, setting the timing value of the second timer to be a preset initial value, and periodically detecting whether the network parameters of the 3G network meet the requirement of switching to the 4G refer mode according to the timing value of the second timer; when the network parameters of the 3G network are detected to meet the requirement of switching to a 4G preference mode, setting the current network preference mode to the 4G preference mode, and acquiring current position information to store as historical position information; in the 4G refer mode, periodically detecting whether the network parameter of the 4G network meets the 3G refer mode switching condition according to a timing value of a first timer, calculating a moving distance according to the current position information and the historical position information of the communication device because the network parameter of the 4G network still meets the 3G refer mode switching condition at this time and the historical position information is stored at this time, calculating that the moving distance of the communication device is greater than a distance threshold value, thus judging that the 4G network parameter is possibly improved, setting a timing value of a second timer to be N times of a last setting value of the second timer, namely the timing value of the second timer is N times of a preset initial value at this time, and periodically detecting whether the network parameter of the 3G network meets the switching to the 4G refer mode according to the timing value of the second timer. When detecting that the 4G network parameters meet the 3G preference mode switching condition and the historical location information exists, the moving distance of the communication device is greater than the distance threshold, which indicates that the 4G network parameters are likely to be improved, so that the timing value of the second timer is set to be N times of the initial value, which can reduce the network preferred mode switching frequency and ensure that the current network can be set to be the 4G preference mode in a short time.
The three use scenarios described above are three use scenarios listed for better illustrating the implementation of the embodiment of the present invention, and are not all use scenarios of the embodiment of the present invention.
Compared with the prior art, the embodiment of the invention has the beneficial effects that: the embodiment of the invention provides a network preferred mode switching method, which comprises the following steps: when the current network optimization mode is the first network optimization mode, periodically detecting whether the network parameters in the first network meet the switching condition of the second network optimization mode according to the preset timing value of the first timer; when the network parameters in the first network do not meet the switching condition of the preferred mode of the second network, the historical position information of the communication equipment is cleared; when the network parameters in the first network meet the switching condition of the second network optimization mode, setting the current network optimization mode as the second network optimization mode; when the current network optimization mode is a second network optimization mode, judging whether the historical position information exists or not; when the historical position information is not stored, setting a timing value of a second timer as a preset initial value; when the historical position information is stored, setting the timing value of a second timer to be not less than the last setting value of the second timer according to the current position information and the historical position information of the communication equipment; periodically detecting whether the network parameters in the second network meet the switching condition of the first network preferred mode according to the timing value of the second timer; and when the network parameters in the second network meet the switching condition of the first network optimization mode, setting the current network optimization mode as the first network optimization mode, and acquiring current position information to be used as historical position information for storage. By the method, the communication equipment automatically switches the network optimization mode when detecting that the network parameters of the current network meet the network optimization mode switching condition in the current network optimization mode, sets the timing values of different second timers according to the existence or nonexistence of historical position information and the size of the moving distance, optimizes the second timers to set different detection periods, realizes intelligent switching of the network optimization mode, and solves the problems that the network optimization mode is frequently switched and cannot be set to be a better network optimization mode in time when the network optimization mode is manually set.
In order to achieve the same object, another aspect of the present invention provides a network preferred mode switching apparatus, which is configured in a communication device. Please refer to fig. 2, which is a schematic structural diagram of a network preferred mode switching apparatus according to an embodiment of the present invention. The embodiment of the invention provides a network preferred mode switching device, which comprises:
the first network detection module 1 is configured to periodically detect whether a network parameter in a first network meets a second network preferred mode switching condition according to a preset timer value of a first timer when a current network preferred mode is a first network preferred mode;
the historical position clearing module 2 is used for clearing the historical position information of the communication equipment when the network parameters under the first network do not meet the switching condition of the preferred mode of the second network;
a first mode switching module 3, configured to set the current network preferred mode to a second network preferred mode when the network parameter in the first network meets a second network preferred mode switching condition;
a historical position judging module 4, configured to judge whether the historical position information exists when the current network preferred mode is a second network preferred mode;
a first timing value setting module 5, configured to set a timing value of the second timer to a preset initial value when the historical location information is not stored;
a second timing value setting module 6, configured to set, when the historical location information is stored, a timing value of a second timer to be not less than a last setting value of the second timer according to the current location information of the communication device and the historical location information;
a second network detection module 7, configured to periodically detect whether a network parameter in the second network meets a first network preferred mode switching condition according to a timing value of the second timer;
and a second mode switching module 8, configured to set the current network preferred mode to the first network preferred mode when the network parameter in the second network meets a first network preferred mode switching condition, and acquire current location information to be stored as historical location information.
In an alternative embodiment, the first network detection module 1 comprises:
the first network speed detection unit is used for periodically detecting the current network speed of the first network according to a preset timing value of a first timer when the current network optimization mode is the first network optimization mode;
and the first detection judging unit is used for judging that the network parameters under the first network do not meet the switching condition of the preferred mode of the second network when the current network speed of the first network is greater than the network speed threshold value.
In an optional embodiment, the first network detection module 1 further includes:
a connectivity detection unit, configured to perform connectivity detection on the first network to obtain an average packet loss number and an average delay when the current network speed of the first network is less than a network speed threshold;
a second detection determining unit, configured to determine that the network parameter in the first network does not satisfy a second network preferred mode switching condition when the average packet loss number is smaller than a packet loss threshold and the average delay time is smaller than a delay threshold;
and the third detection judging unit is used for judging that the network parameters in the first network meet the switching condition of the preferred mode of the second network when the average packet loss number is greater than a packet loss threshold or the average delay is greater than a delay threshold.
In an alternative embodiment, the second timing value setting module 6 includes:
a current position acquisition unit configured to acquire current position information of the communication device when the history position information exists;
the distance calculation unit is used for calculating the moving distance of the communication equipment according to the current position information and the historical position information;
the distance judging unit is used for judging whether the moving distance of the communication equipment is greater than a preset distance threshold value or not;
a first timing value setting unit, configured to set a timing value of a second timer to be N times of a last setting value of the second timer when a moving distance of the communication device is greater than a preset distance threshold; wherein N is greater than 1;
and the second timing value setting unit is used for setting the timing value of the second timer to be a preset maximum value when the moving distance of the communication equipment is smaller than a preset distance threshold value.
In an optional embodiment, the second timing value setting module 6 further includes:
and the timing value setting control unit is used for setting the timing value of the second timer to be the preset maximum value when the timing value of the second timer exceeds the preset maximum value.
It should be noted that, when the network preferred mode switching device provided in the embodiment of the present invention is used in the network preferred mode switching method, the working principle and the beneficial effects thereof correspond to the method for preventing the touch screen from being triggered by mistake, and thus, the description thereof is omitted.
While the invention has been described with reference to a preferred embodiment, it will be understood by those skilled in the art that various changes in form and detail may be made therein without departing from the spirit and scope of the invention.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.

Claims (8)

1. A network preferred mode switching method, the method comprising:
when the current network optimization mode is the first network optimization mode, periodically detecting whether the network parameters in the first network meet the switching condition of the second network optimization mode according to the preset timing value of the first timer;
when the network parameters in the first network do not meet the switching condition of the preferred mode of the second network, the historical position information of the communication equipment is cleared;
when the network parameters in the first network meet the switching condition of the second network optimization mode, setting the current network optimization mode as the second network optimization mode;
when the current network optimization mode is the second network optimization mode, judging whether the historical position information exists or not;
when the historical position information is not stored, setting a timing value of a second timer as a preset initial value;
when the historical position information is stored, setting the timing value of a second timer to be not less than the last setting value of the second timer according to the current position information and the historical position information of the communication equipment;
periodically detecting whether the network parameters in the second network meet the switching condition of the first network preferred mode according to the timing value of the second timer;
when the network parameters in the second network meet the switching condition of the first network optimization mode, setting the current network optimization mode as the first network optimization mode, and acquiring current position information to be used as historical position information for storage;
when the historical position information is stored, setting the timing value of the second timer to be not less than the last setting value of the second timer according to the current position information and the historical position information of the communication equipment, including:
when the historical position information exists, acquiring the current position information of the communication equipment;
calculating the moving distance of the communication equipment according to the current position information and the historical position information;
judging whether the moving distance of the communication equipment is greater than a preset distance threshold value or not;
when the moving distance of the communication equipment is greater than a preset distance threshold value, setting the value of a second timer to be N times of the last set value of the second timer; wherein N is greater than 1;
and when the moving distance of the communication equipment is smaller than a preset distance threshold value, setting the value of a second timer to be a preset maximum value.
2. The network preference mode switching method according to claim 1, wherein when the historical location information is stored, setting a timing value of the second timer to be not less than a last setting value of the second timer according to current location information of a communication device and the historical location information, further comprising:
and when the timing value of the second timer exceeds the preset maximum value, setting the timing value of the second timer to be the preset maximum value.
3. The network preference mode switching method of claim 1, wherein the periodically detecting whether the network parameter under the first network satisfies the second network preference mode switching condition according to a preset timer value of the first timer when the current network preference mode is the first network preference mode comprises:
when the current network optimization mode is the first network optimization mode, periodically detecting the current network speed of the first network according to a preset timing value of a first timer;
and when the current network speed of the first network is greater than the network speed threshold value, judging that the network parameters under the first network do not meet the switching condition of the preferred mode of the second network.
4. The network preference mode switching method of claim 3, wherein when the current network preference mode is the first network preference mode, periodically detecting whether the network parameters under the first network satisfy the second network preference mode switching condition according to a preset timer value of the first timer, further comprising:
when the current network speed of the first network is smaller than a network speed threshold value, performing connectivity detection on the first network to obtain an average packet loss number and an average delay;
when the average packet loss number is smaller than a packet loss threshold and the average delay is smaller than a delay threshold, judging that the network parameters in the first network do not meet the switching condition of the preferred mode of the second network;
and when the average packet loss number is greater than a packet loss threshold or the average delay is greater than a delay threshold, judging that the network parameters in the first network meet the switching condition of the preferred mode of the second network.
5. A network preferred mode switching apparatus, configured in a communication device, comprising:
the first network detection module is used for periodically detecting whether the network parameters in the first network meet the switching condition of the preferred mode of the second network according to the preset timing value of the first timer when the current network preferred mode is the preferred mode of the first network;
the historical position clearing module is used for clearing the historical position information of the communication equipment when the network parameters under the first network do not meet the switching condition of the preferred mode of the second network;
the first mode switching module is used for setting the current network optimization mode to be a second network optimization mode when the network parameters under the first network meet the switching condition of the second network optimization mode;
a historical position judging module, configured to judge whether the historical position information is stored when the current network preferred mode is a second network preferred mode;
the first timing value setting module is used for setting the timing value of the second timer as a preset initial value when the historical position information is not stored;
the second timing value setting module is used for setting the timing value of a second timer to be not less than the last set value of the second timer according to the current position information and the historical position information of the communication equipment when the historical position information is stored;
the second network detection module is used for periodically detecting whether the network parameters in the second network meet the switching condition of the first network preferred mode according to the timing value of the second timer;
the second mode switching module is used for setting the current network optimization mode as the first network optimization mode when the network parameters in the second network meet the first network optimization mode switching condition, and acquiring current position information to be used as historical position information for storage;
wherein the second timing value setting module includes:
a current position acquisition unit configured to acquire current position information of the communication device when the history position information exists;
the distance calculation unit is used for calculating the moving distance of the communication equipment according to the current position information and the historical position information;
the distance judging unit is used for judging whether the moving distance of the communication equipment is greater than a preset distance threshold value or not;
a first timing value setting unit, configured to set a timing value of a second timer to be N times of a last setting value of the second timer when a moving distance of the communication device is greater than a preset distance threshold; wherein N is greater than 1;
and the second timing value setting unit is used for setting the timing value of the second timer to be a preset maximum value when the moving distance of the communication equipment is smaller than a preset distance threshold value.
6. The network preferred mode switching device of claim 5, wherein the second timing value setting module further comprises:
and the timing value setting control unit is used for setting the timing value of the second timer to be the preset maximum value when the timing value of the second timer exceeds the preset maximum value.
7. The network preferred mode switching device of claim 5, wherein the first network detection module comprises:
the first network speed detection unit is used for periodically detecting the current network speed of the first network according to a preset timing value of a first timer when the current network optimization mode is the first network optimization mode;
and the first detection judging unit is used for judging that the network parameters under the first network do not meet the switching condition of the preferred mode of the second network when the current network speed of the first network is greater than the network speed threshold value.
8. The network preferred mode switching device of claim 7, wherein the first network detection module further comprises:
a connectivity detection unit, configured to perform connectivity detection on the first network to obtain an average packet loss number and an average delay when the current network speed of the first network is less than a network speed threshold;
a second detection determining unit, configured to determine that the network parameter in the first network does not satisfy a second network preferred mode switching condition when the average packet loss number is smaller than a packet loss threshold and the average delay time is smaller than a delay threshold;
and the third detection judging unit is used for judging that the network parameters in the first network meet the switching condition of the preferred mode of the second network when the average packet loss number is greater than a packet loss threshold or the average delay is greater than a delay threshold.
CN201710257539.9A 2017-04-19 2017-04-19 Network preferred mode switching method and device Active CN106922006B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710257539.9A CN106922006B (en) 2017-04-19 2017-04-19 Network preferred mode switching method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710257539.9A CN106922006B (en) 2017-04-19 2017-04-19 Network preferred mode switching method and device

Publications (2)

Publication Number Publication Date
CN106922006A CN106922006A (en) 2017-07-04
CN106922006B true CN106922006B (en) 2020-03-24

Family

ID=59567379

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710257539.9A Active CN106922006B (en) 2017-04-19 2017-04-19 Network preferred mode switching method and device

Country Status (1)

Country Link
CN (1) CN106922006B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3512260A1 (en) * 2018-01-12 2019-07-17 MediaTek Inc. Method and apparatus for communication on high speed rail
CN109151711B (en) * 2018-08-21 2021-01-26 新华三技术有限公司 Connection establishing method and device
CN113055962B (en) * 2021-03-05 2022-07-26 南昌黑鲨科技有限公司 Multi-network switching method and system of intelligent terminal and computer readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101610521A (en) * 2008-06-19 2009-12-23 中国移动通信集团公司 A kind of method and device of measuring report cycle of adjusting
CN106257952A (en) * 2015-06-16 2016-12-28 西安中兴新软件有限责任公司 A kind of method switching mobile network and mobile terminal
CN106412983A (en) * 2016-11-18 2017-02-15 宇龙计算机通信科技(深圳)有限公司 Terminal-flow-based control method and apparatus
WO2017053742A1 (en) * 2015-09-23 2017-03-30 Convida Wireless, Llc Aggregated handover in integrated small cell and wifi networks

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101610521A (en) * 2008-06-19 2009-12-23 中国移动通信集团公司 A kind of method and device of measuring report cycle of adjusting
CN106257952A (en) * 2015-06-16 2016-12-28 西安中兴新软件有限责任公司 A kind of method switching mobile network and mobile terminal
WO2017053742A1 (en) * 2015-09-23 2017-03-30 Convida Wireless, Llc Aggregated handover in integrated small cell and wifi networks
CN106412983A (en) * 2016-11-18 2017-02-15 宇龙计算机通信科技(深圳)有限公司 Terminal-flow-based control method and apparatus

Also Published As

Publication number Publication date
CN106922006A (en) 2017-07-04

Similar Documents

Publication Publication Date Title
CN106922006B (en) Network preferred mode switching method and device
US10218818B2 (en) Matching encoder output to network bandwidth
CN108834203B (en) Network switching method, device, terminal and storage medium
EP2688339A2 (en) Network connection control apparatus and method of mobile terminal
EP2717625B1 (en) Method and device for cell changing in heterogeneous network
WO2022078050A1 (en) Cell search method and apparatus, chip, mobile terminal, and storage medium
EP3324673A1 (en) Signal processing method and relevant device
CN111431772B (en) Network delay measuring method, system, readable storage medium and terminal equipment
CN113965474A (en) Network quality evaluation method, electronic device and storage medium
CN105423482A (en) Temperature detection method and air conditioner
CN104918304A (en) Traffic management device for terminal and traffic management method
CN106488495A (en) Base station selecting method and device based on base station signal quality
CN109661012A (en) Information collection and processing method, apparatus and system
CN111491348B (en) Channel switching method and system for radio and television white spectrum cognition WiFi
CN104170459A (en) Handover opportunity configuring method, device, system and equipment
CN110650488A (en) Communication quality monitoring method and system
WO2024037070A1 (en) Method and apparatus for implementing a switch between networks, and electronic device
CN104506358A (en) SNMP (simple network management protocol) based network management system and network management method
CN104378844B (en) A kind of transmission method and equipment of tunnel keepalive message
CN107241174B (en) Network switching method and network equipment
CN109819482B (en) Data processing method and device
CN102740388B (en) Method and terminal for residing network
EP3883300B1 (en) Wi-fi network processing method and apparatus, electronic device and storage medium
CN106792882A (en) Network estimation method and device
JP6382530B2 (en) Communication terminal and program

Legal Events

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

Effective date of registration: 20220615

Address after: 200000 5th floor, No. 1 and 5, Lane 168, Xumin Road, Qingpu District, Shanghai

Patentee after: Shanghai LianHong Technology Co.,Ltd.

Address before: 518000 the 1st and 3rd floors of the south section of building 24 and the 1st-4th floor of the north section of building 28, Shennan Road Science and Technology Park, Nanshan District, Shenzhen City, Guangdong Province

Patentee before: TP-LINK TECHNOLOGIES Co.,Ltd.