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.
In order to make the advantages of the technical solutions of the present invention clearer, the present invention is described in detail below with reference to the accompanying drawings and examples.
An embodiment of the present invention provides a network search method applied to a mobile terminal, as shown in fig. 1, the method includes:
101. and the terminal judges whether the network searching times reach the preset times or not.
For example, when the terminal is powered on or when there is no network due to interference of signals, terrain, and the like, a network needs to be searched again. If the terminal searches for the network all the time, it consumes much power and generates radiation. On one hand, in order to save the electric quantity of the terminal and reduce radiation, a preset number of times for searching the network is set for the terminal, when the number of times for searching the network by the terminal reaches the preset number, if the network cannot be searched, the network searching is stopped, and the next process is executed; on the other hand, if the terminal cannot search the network all the time, the location may be in a blind area of the network signal, and the preset times are set, so that the failure rate of network searching can be reduced, and the network searching efficiency is improved in a phase-changing manner. The preset times can be set by the terminal according to the system requirements, and can also be set by the user.
102. And if the network searching times reach the preset times, the terminal stops searching the network.
103. After stopping searching the network, the terminal judges whether the current state meets a preset condition.
In order to enable the terminal to stop searching the network and then search the network again, a preset condition is set, and when the terminal meets the preset condition, the network is searched again. For example, the case where the preset condition is satisfied may include at least the following three: firstly, the time interval between the time when the terminal stops searching the network and the current time is more than or equal to the preset time length, and the value of the preset time length can be comprehensively considered from two aspects of power saving factors and network searching efficiency and can be set by a user; secondly, the terminal is switched to different network cells from the network cell where the terminal is located at the moment of stopping searching the network, after the terminal switches the network cells, the position of the terminal is changed, and the success rate of searching the network after searching the network again is higher; thirdly, the terminal stops searching for the difference between the Position at the time of network and the Position at the current time, and the Position change can be measured by using a specific sensor or by using a GPS (Global positioning System) System. For example, the terminal detects the change of the environmental factor of the position where the terminal stops searching the network and the environmental factor of the position where the terminal is located at the current time according to an environmental sensor; if these two positions are present; the environmental factors may include temperature, brightness, and other factors, and the corresponding environment sensors for measurement are a temperature sensor and a brightness sensor. Or the terminal detects the distance change between the position where the terminal stops searching the network and the position where the terminal is located at the current time, and specifically, the distance change between the two positions can be acquired by using a GPS, a pedometer and the like.
104. And if the current state meets the preset condition, the terminal restarts searching the network.
Optionally, when the terminal searches for a network, it preferentially searches for a network with a higher rank in the network modes supported by the terminal; and if the network with higher level in the network mode supported by the terminal is not searched, searching the network one level lower than the network with higher level in the network mode supported by the terminal.
Optionally, when the terminal searches for at least two networks, a network with a higher rank of the at least two networks is preferentially used.
For example, suppose that the terminal supports 2g (second generation mobile communication technology), 3g (third generation mobile communication technology) and 4g (fourth generation mobile communication technology) networks at the same time, and the network levels are 4g, 3g and 2g from high to low.
Optionally, the method further includes: and if the network searching times do not reach the preset times, the terminal continues to search the network.
In the prior art, if a terminal is in a network-free state, a network is searched all the time, the success rate of the process of continuously searching the network is low, the electric quantity of the terminal is wasted greatly, and radiation harmful to a terminal user is generated. Compared with the prior art, the embodiment of the invention judges whether the number of times of searching the network reaches the preset number of times; if the number of times of searching the network reaches the preset number of times, the terminal stops searching the network; after stopping searching the network, the terminal judges whether the current state meets a preset condition; and if the current state meets the preset condition, the terminal restarts searching the network. On one hand, the terminal can effectively search the network without continuously searching the network by setting the maximum searching times; and on the other hand, setting a preset condition, and restarting to search the network if the preset condition is met after the terminal stops searching the network. Through the configuration, the success rate that the terminal can search the network is improved, and the power consumption of the terminal and the physical harm to a terminal user are reduced.
Another embodiment of the present invention provides a network searching method, which is applied to a mobile terminal, and is described by taking a mobile phone as an example, where the mobile phone supports both a 3g network and a 4g network, as shown in fig. 2, the method includes:
200. and carrying out parameter configuration on the mobile phone.
For example, the method mainly includes configuration of the maximum number of times of network searching and a preset condition, where the preset condition is a condition that needs to be met when a mobile phone searches for a network again after the maximum number of times of network searching is reached.
201. The handset searches for 3g networks and 4g networks.
For example, when the mobile phone is powered on or when no network exists or the network signal is weak due to interference of signals, terrain and the like, the network needs to be searched again.
202. When the mobile phone searches for both the 3g network and the 4g network or only the 4g network, the mobile phone uses the 4g network for communication.
It should be noted that, if the mobile phone searches for a plurality of networks belonging to different network systems at the same time, the network with the higher network system is preferentially used. The network system priority may refer to the following: 5g > 4g > 3g > 2 g.
203. When the mobile phone searches a 3g network but does not search a 4g network, judging whether the number of times of searching the 4g network reaches a preset number, and if not, executing astep 204; if the preset number of times is reached,step 205 is executed.
It should be noted that if the mobile phone always searches for the network, it will consume more power and generate radiation. On one hand, in order to save the electric quantity of the mobile phone and reduce the radiation, a preset number of network searching times is set for the mobile phone, when the number of network searching times of the mobile phone reaches the preset number, if the network can not be searched, the network searching is stopped, and step 205 is executed; on the other hand, if the mobile phone cannot search the network all the time, the location may be in a blind area of the network signal, and the preset times are set to reduce the failure rate of network searching and improve the network searching efficiency in a phase-changing manner. The preset times can be set by the mobile phone according to system requirements, and can also be set by the user.
204. The mobile phone continues to search for the 4g network until the search times reach the preset times or the 4g network is searched.
Further, after the number of times of searching for the 2g network by the mobile phone reaches the preset number,step 205 is executed.
205. The handset stops searching for the network and communicates using the 3g network.
206. When the mobile phone does not search 3g networks and does not search 4g networks, respectively judging whether the times of searching the 4g networks and the 3g networks reach preset times, and if not, executingstep 201; if the preset number of times is reached,step 207 is executed.
207. The handset stops searching for 3g and 4g networks.
Further, afterstep 205 and step 207, it is determined whether the handset satisfies the preset condition.
208. Judging whether the current state of the mobile phone meets a preset condition, and if so, executingstep 201 or step 204; if the current state of the mobile phone does not satisfy the preset condition, go to step 209.
When the condition instep 205 meets a preset condition, executingstep 204; when the situation instep 207 satisfies the preset condition,step 201 is executed.
In order to enable the mobile phone to stop searching the network and then search the network again, a preset condition is set, and when the mobile phone meets the preset condition, the network is searched again. For example, the case where the preset condition is satisfied may include at least the following two: firstly, the time interval between the time when the mobile phone stops searching the network and the current time is more than or equal to the preset time length, and the value of the preset time length can be comprehensively considered from two aspects of power saving factors and network searching efficiency and can be set by a user; secondly, the mobile phone is switched to different network cells from the network cell where the mobile phone is located at the moment of stopping searching the network, after the mobile phone switches the network cells, the position of the mobile phone is changed, and at the moment, the success rate of searching the network after searching the network again is higher. Thirdly, the position of the mobile phone at the moment of stopping searching the network is different from the position of the mobile phone at the current moment, and the position change can be measured by using a specific sensor or positioning measurement by using a GPS system. For example, the mobile phone detects, according to an environment sensor, a change between an environment factor of a location where the mobile phone stops searching for a network and an environment factor of a location where the mobile phone is located at the current time; if these two positions are present; the environmental factors may include temperature, brightness, and other factors, and the corresponding environment sensors for measurement are a temperature sensor and a brightness sensor. Or the mobile phone detects the distance change between the position where the mobile phone stops searching the network and the position where the mobile phone is located at the current time, and specifically, the distance change between the two positions can be acquired by using a GPS, a pedometer and the like.
209. The handset remains in a no network state.
The mobile phone keeps a network-free state until a preset condition is met to trigger network searching again.
In the prior art, if the mobile phone is in a network-free state, the mobile phone always searches for a network, the success rate of the process of continuously searching for the network is low, a large amount of electric quantity of the mobile phone is wasted, and radiation harmful to mobile phone users is generated. Compared with the prior art, the embodiment of the invention judges whether the number of times of searching the network reaches the preset number of times; if the number of times of searching the network reaches the preset number of times, the mobile phone stops searching the network; after stopping searching the network, the mobile phone judges whether the current state meets a preset condition; and if the current state meets the preset condition, the mobile phone restarts searching the network. On one hand, the mobile phone can effectively search the network without continuously searching the network by setting the maximum searching times; on the other hand, a preset condition is set, and after the mobile phone stops searching the network, if the preset condition is met, the network searching is restarted. Through the configuration, the success rate that the mobile phone can search the network is improved, and the electricity consumption of the mobile phone and the physical harm to a mobile phone user are reduced.
Another embodiment of the present invention provides a network searching method, which is applied to a mobile terminal, and is described by taking a mobile phone as an example, where the mobile phone supports both a 2g network and a 3g network, as shown in fig. 3, the method includes:
301. and carrying out parameter configuration on the mobile phone.
For example, the method mainly includes configuration of the maximum number of times of network searching and a preset condition, where the preset condition is a condition that needs to be met when a mobile phone searches for a network again after the maximum number of times of network searching is reached.
302. The handset searches for a 3g network.
For example, when the mobile phone is powered on or when no network exists or the network signal is weak due to interference of signals, terrain and the like, the network needs to be searched again.
It should be noted that, if the mobile phone searches for a plurality of networks belonging to different network systems at the same time, the network with the higher network system is preferentially used. The network system priority may refer to the following: 5g > 4g > 3g > 2 g.
303. When the mobile phone searches for the 3g network, the 3g network is used for communication.
304. When the mobile phone does not search the 3g network, judging whether the number of times of searching the 3g network by the mobile phone reaches the preset number, if not, executing the step 305; if the predetermined number of times is reached, go to step 306.
It should be noted that if the mobile phone always searches for the network, it will consume more power and generate radiation. On one hand, in order to save the electric quantity of the mobile phone and reduce radiation, a preset number of times for searching the network is set for the mobile phone, when the number of times for searching the network by the mobile phone reaches the preset number, if the network cannot be searched, the network searching is stopped, and step 306 is executed; on the other hand, if the mobile phone cannot search the network all the time, the location may be in a blind area of the network signal, and the preset times are set to reduce the failure rate of network searching and improve the network searching efficiency in a phase-changing manner. The preset times can be set by the mobile phone according to system requirements, and can also be set by the user.
305. The mobile phone continues to search the 3g network until the search times reach the preset times or the 3g network is searched.
Further, after the number of times of searching for the 3g network by the mobile phone reaches a preset number, step 305 is executed.
306. The handset stops searching for the network.
307. Judging whether the current state of the mobile phone meets a preset condition, and if so, executing the step 305; if the current state of the mobile phone does not satisfy the preset condition, go to step 308.
In order to enable the mobile phone to stop searching the network and then search the network again, a preset condition is set, and when the mobile phone meets the preset condition, the network is searched again. For example, the case where the preset condition is satisfied may include at least the following two: firstly, the time interval between the time when the mobile phone stops searching the network and the current time is more than or equal to the preset time length, and the value of the preset time length can be comprehensively considered from two aspects of power saving factors and network searching efficiency and can be set by a user; secondly, the mobile phone is switched to different network cells from the network cell where the mobile phone is located at the moment of stopping searching the network, after the mobile phone switches the network cells, the position of the mobile phone is changed, and at the moment, the success rate of searching the network after searching the network again is higher. Thirdly, the position of the mobile phone at the moment of stopping searching the network is different from the position of the mobile phone at the current moment, and the position change can be measured by using a specific sensor or positioning measurement by using a GPS system. For example, the mobile phone detects, according to an environment sensor, a change between an environment factor of a location where the mobile phone stops searching for a network and an environment factor of a location where the mobile phone is located at the current time; if these two positions are present; the environmental factors may include temperature, brightness, and other factors, and the corresponding environment sensors for measurement are a temperature sensor and a brightness sensor. Or the mobile phone detects the distance change between the position where the mobile phone stops searching the network and the position where the mobile phone is located at the current time, and specifically, the distance change between the two positions can be acquired by using a GPS, a pedometer and the like.
308. The handset remains in a no network state.
The mobile phone keeps a network-free state until a preset condition is met to trigger network searching again.
In the prior art, if the mobile phone is in a network-free state, the mobile phone always searches for a network, the success rate of the process of continuously searching for the network is low, a large amount of electric quantity of the mobile phone is wasted, and radiation harmful to mobile phone users is generated. Compared with the prior art, the embodiment of the invention judges whether the number of times of searching the network reaches the preset number of times; if the number of times of searching the network reaches the preset number of times, the mobile phone stops searching the network; after stopping searching the network, the mobile phone judges whether the current state meets a preset condition; and if the current state meets the preset condition, the mobile phone restarts searching the network. On one hand, the mobile phone can effectively search the network without continuously searching the network by setting the maximum searching times; on the other hand, a preset condition is set, and after the mobile phone stops searching the network, if the preset condition is met, the network searching is restarted. Through the configuration, the success rate that the mobile phone can search the network is improved, and the electricity consumption of the mobile phone and the physical harm to a mobile phone user are reduced.
Still another embodiment of the present invention provides a terminal 40, as shown in fig. 4, where the terminal 40 includes:
afirst judgment unit 41, configured to judge whether the number of times of searching for a network reaches a preset number of times;
a searchingunit 42 configured to stop searching for a network when the first determiningunit 41 determines that the number of times of searching for a network reaches a preset number of times;
asecond judging unit 43, configured to judge whether the current state meets a preset condition after the searchingunit 42 stops searching for the network;
the searchingunit 42 is further configured to restart the network search when the second determiningunit 43 determines that the current state satisfies the preset condition.
Wherein the preset conditions include: the time interval between the time when the searching unit 32 stops searching the network and the current time is greater than or equal to a preset time length; alternatively, the terminal 30 switches from the network cell in which the time of stopping searching for the network is located to a different network cell.
Optionally, the preset condition further includes: and the terminal stops searching the network at the moment and the current moment.
Further, as shown in fig. 5, thesecond judging unit 43 includes:
a first detectingsubunit 431, configured to detect, according to an environment sensor, a change between an environment factor of a location where the terminal stops searching for a network and an environment factor of a location where the terminal is located at the current time;
a first determiningsubunit 432, configured to determine, according to a detection result of the first detectingsubunit 431, whether a location of a time when the terminal stops searching for a network is different from a location of a current time.
Further, as shown in fig. 5, thesecond judging unit 43 further includes:
a second detectingsubunit 433, configured to detect a change in a distance between a location where the terminal stops searching for a network and a location where the terminal currently locates;
a second determiningsubunit 434, configured to determine, according to the detection result of the second detectingsubunit 433, whether the location at the time when the terminal stops searching for the network is different from the location at the current time.
The second detectingsubunit 433 is specifically configured to:
using a Global Positioning System (GPS) to position and detect the distance change between the position of the terminal at the moment when the terminal stops searching the network and the position of the terminal at the current moment; or,
and detecting the distance change between the position of the terminal at the moment when the terminal stops searching the network and the position of the terminal at the current moment by using a distance sensor.
In the prior art, if a terminal is in a network-free state, a network is searched all the time, the success rate of the process of continuously searching the network is low, the electric quantity of the terminal is wasted greatly, and radiation harmful to a terminal user is generated. Compared with the prior art, the embodiment of the invention judges whether the number of times of searching the network reaches the preset number of times; if the number of times of searching the network reaches the preset number of times, the terminal stops searching the network; after stopping searching the network, the terminal judges whether the current state meets a preset condition; and if the current state meets the preset condition, the terminal restarts searching the network. On one hand, the terminal can effectively search the network without continuously searching the network by setting the maximum searching times; and on the other hand, setting a preset condition, and restarting to search the network if the preset condition is met after the terminal stops searching the network. Through the configuration, the success rate that the terminal can search the network is improved, and the power consumption of the terminal and the physical harm to a terminal user are reduced.
The terminal provided by the embodiment of the present invention can implement the method embodiment provided above, and for specific function implementation, reference is made to the description in the method embodiment, which is not described herein again. The network searching method and the terminal provided by the embodiment of the invention can be applied to a mobile terminal, but are not limited to the mobile terminal.
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.
The above description is only for the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.