CN114915984A - Network connection control method, device and storage medium - Google Patents
Network connection control method, device and storage medium Download PDFInfo
- Publication number
- CN114915984A CN114915984A CN202110178396.9A CN202110178396A CN114915984A CN 114915984 A CN114915984 A CN 114915984A CN 202110178396 A CN202110178396 A CN 202110178396A CN 114915984 A CN114915984 A CN 114915984A
- Authority
- CN
- China
- Prior art keywords
- network
- connection
- information
- mobile device
- mobile equipment
- 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.)
- Pending
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W24/00—Supervisory, monitoring or testing arrangements
- H04W24/02—Arrangements for optimising operational condition
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W48/00—Access restriction; Network selection; Access point selection
- H04W48/02—Access restriction performed under specific conditions
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W48/00—Access restriction; Network selection; Access point selection
- H04W48/08—Access restriction or access information delivery, e.g. discovery data delivery
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W76/00—Connection management
- H04W76/10—Connection setup
- H04W76/18—Management of setup rejection or failure
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W76/00—Connection management
- H04W76/10—Connection setup
- H04W76/19—Connection re-establishment
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
本公开是关于一种网络连接控制方法、装置以及存储介质;其中,所述网络连接控制方法应用于移动设备,包括:在移动设备处于第一网络的覆盖范围内时,确定所述移动设备是否成功连接到所述第一网络;若连接所述第一网络失败,禁止所述移动设备自动从连接所述第一网络切换至连接第二网络,并输出提示信息;其中,所述第二网络的网络性能低于所述第一网络。这样,可以有效避免在连接第一网络失败时,发生网络切换所导致的额外资费。
The present disclosure relates to a network connection control method, apparatus, and storage medium; wherein, the network connection control method is applied to a mobile device, including: when the mobile device is within the coverage of a first network, determining whether the mobile device is Successfully connected to the first network; if the connection to the first network fails, prohibit the mobile device from automatically switching from connecting to the first network to connecting to the second network, and output prompt information; wherein, the second network The performance of the network is lower than that of the first network. In this way, additional charges caused by network switching can be effectively avoided when the connection to the first network fails.
Description
技术领域technical field
本公开涉及移动通信技术领域,尤其涉及一种网络连接控制方法、装置以及存储介质。The present disclosure relates to the field of mobile communication technologies, and in particular, to a network connection control method, device, and storage medium.
背景技术Background technique
无线网络是各类电子设备经常使用的功能,维持着电子设备间的数据交换,使用十分频繁,是连接一切事物的桥梁之一。但在电子设备在使用无线网络的过程中,通常会出现各类状况导致电子设备无法连接上无线网络,而用户往往在该种情况下会忽视到该问题,或者,会认为已经连接上了无线网络,但实际却仍然使用的是电子设备的流量,这样就会产生额外的资费。Wireless network is a frequently used function of various electronic devices. It maintains data exchange between electronic devices and is used very frequently. It is one of the bridges connecting everything. However, in the process of using a wireless network for an electronic device, there are usually various situations that cause the electronic device to be unable to connect to the wireless network. In this case, the user often ignores the problem, or thinks that the wireless network has been connected. network, but the traffic of electronic devices is actually still used, which will generate additional tariffs.
发明内容SUMMARY OF THE INVENTION
本公开提供一种网络连接控制方法、装置以及存储介质。The present disclosure provides a network connection control method, device and storage medium.
根据本公开实施例的第一方面,提供一种网络连接控制方法,应用于移动设备,包括:According to a first aspect of the embodiments of the present disclosure, a network connection control method is provided, applied to a mobile device, including:
在移动设备处于第一网络的覆盖范围内时,确定所述移动设备是否成功连接到所述第一网络;When the mobile device is within the coverage of the first network, determining whether the mobile device is successfully connected to the first network;
若连接所述第一网络失败,禁止所述移动设备自动从连接所述第一网络切换至连接第二网络,并输出提示信息;其中,所述第二网络的网络性能低于所述第一网络。If the connection to the first network fails, the mobile device is prohibited from automatically switching from connecting to the first network to connecting to the second network, and outputting prompt information; wherein the network performance of the second network is lower than that of the first network network.
可选地,所述输出提示信息,包括:Optionally, the output prompt information includes:
在确定所述移动设备未开启所述第一网络的连接功能时,输出提示开启所述第一网络的连接功能的提示信息;When it is determined that the mobile device has not enabled the connection function of the first network, outputting prompt information prompting to enable the connection function of the first network;
或者,or,
在确定所述移动设备已开启所述第一网络的连接功能时,输出提示所述第一网络连接错误的提示信息或输出提示重启所述第一网络的提示信息。When it is determined that the mobile device has enabled the connection function of the first network, outputting prompt information indicating that the first network is connected incorrectly or outputting prompt information prompting restarting the first network.
可选地,所述方法还包括:Optionally, the method further includes:
获取所述移动设备的网络连接信息;Obtain the network connection information of the mobile device;
所述在确定所述移动设备已开启所述第一网络的连接功能时,输出提示所述第一网络连接错误的提示信息,包括:When it is determined that the mobile device has enabled the connection function of the first network, outputting prompt information indicating that the first network is connected incorrectly, including:
在确定所述移动设备已开启所述第一网络的连接功能,且根据所述网络连接信息确定出所述移动设备在所述第一网络的覆盖范围内,以及所述第一网络的连接状态从连接成功转变为连接失败时,输出提示所述第一网络连接错误的提示信息。After it is determined that the mobile device has enabled the connection function of the first network, and it is determined according to the network connection information that the mobile device is within the coverage of the first network, and the connection status of the first network When the connection succeeds to the connection failure, prompt information indicating that the first network connection is wrong is output.
可选地,所述在确定所述移动设备已开启所述第一网络的连接功能时,输出提示重启所述第一网络的提示信息,包括:Optionally, when it is determined that the mobile device has enabled the connection function of the first network, outputting prompt information prompting to restart the first network, including:
在确定所述移动设备已开启所述第一网络的连接功能时,重新建立与所述第一网络的连接;When it is determined that the mobile device has enabled the connection function of the first network, re-establish the connection with the first network;
在与所述第一网络的连接重建次数超过预设阈值时,输出提示重启所述第一网络的提示信息。When the number of times of connection re-establishment with the first network exceeds a preset threshold, output prompt information prompting restarting the first network.
可选地,所述方法还包括:Optionally, the method further includes:
获取所述移动设备的移动信息;obtain the movement information of the mobile device;
根据所述移动信息,确定所述移动设备是否处于所述第一网络的覆盖范围内。According to the movement information, it is determined whether the mobile device is within the coverage of the first network.
可选地,所述方法还包括:Optionally, the method further includes:
在检测到所述第一网络的网络信号时,获取对应的定位信息;Obtaining corresponding positioning information when the network signal of the first network is detected;
基于所述定位信息,确定所述第一网络的覆盖范围;determining the coverage of the first network based on the positioning information;
所述根据所述移动信息,确定所述移动设备是否处于所述第一网络的覆盖范围内,包括:The determining whether the mobile device is within the coverage of the first network according to the mobile information includes:
根据所述移动信息,确定所述移动设备的移动轨迹;According to the movement information, determine the movement track of the mobile device;
根据所述移动轨迹,,获取所述移动设备的目标移动位置;According to the movement track, obtain the target movement position of the mobile device;
根据所述目标移动位置和所述第一网络的覆盖范围,确定所述移动设备是否处于所述第一网络的覆盖范围内。According to the target mobile location and the coverage of the first network, it is determined whether the mobile device is within the coverage of the first network.
可选地,所述移动信息包括:加速度传感器检测的加速度信息,或,速度传感器检测的速度信息;Optionally, the movement information includes: acceleration information detected by an acceleration sensor, or speed information detected by a speed sensor;
所述根据所述移动信息,确定所述移动设备的移动轨迹,包括:The determining the movement track of the mobile device according to the movement information includes:
对所述加速度信息或所述速度信息进行积分运算,确定所述移动设备的位移;Integrating the acceleration information or the velocity information to determine the displacement of the mobile device;
根据所述位移和所述移动设备在加速度传感器或速度传感器启动时刻的定位信息,确定所述移动设备的移动轨迹。The movement track of the mobile device is determined according to the displacement and the positioning information of the mobile device when the acceleration sensor or the speed sensor is activated.
根据本公开实施例的第二方面,提供一种网络连接控制装置,应用于移动设备,包括:According to a second aspect of the embodiments of the present disclosure, there is provided a network connection control apparatus, applied to a mobile device, including:
第一确定模块,用于在移动设备处于第一网络的覆盖范围内时,确定所述移动设备是否成功连接到所述第一网络;a first determining module, configured to determine whether the mobile device is successfully connected to the first network when the mobile device is within the coverage of the first network;
处理模块,用于若连接所述第一网络失败,禁止所述移动设备自动从连接所述第一网络切换至连接第二网络,并输出提示信息;其中,所述第二网络的网络性能低于所述第一网络。A processing module, configured to prohibit the mobile device from automatically switching from connecting to the first network to connecting to the second network if the connection to the first network fails, and output prompt information; wherein the network performance of the second network is low in the first network.
可选地,所述处理模块,包括:Optionally, the processing module includes:
第一类输出模块,用于在确定所述移动设备未开启所述第一网络的连接功能时,输出提示开启所述第一网络的连接功能的提示信息;A first type of output module, configured to output prompt information prompting to enable the connection function of the first network when it is determined that the mobile device has not enabled the connection function of the first network;
或者,or,
第二类输出模块,用于在确定所述移动设备已开启所述第一网络的连接功能时,输出提示所述第一网络连接错误的提示信息或输出提示重启所述第一网络的提示信息。The second type of output module is configured to, when it is determined that the mobile device has enabled the connection function of the first network, output prompt information indicating that the first network is connected incorrectly or output prompt information prompting restarting the first network .
可选地,所述装置还包括:Optionally, the device further includes:
网络连接获取模块,用于获取所述移动设备的网络连接信息;a network connection acquisition module for acquiring network connection information of the mobile device;
所述第二类输出模块,还用于:The second type of output module is also used for:
在确定所述移动设备已开启所述第一网络的连接功能,且根据所述网络连接信息确定出所述移动设备在所述第一网络的覆盖范围内,以及所述第一网络的连接状态从连接成功转变为连接失败时,输出提示所述第一网络连接错误的提示信息。After it is determined that the mobile device has enabled the connection function of the first network, and it is determined according to the network connection information that the mobile device is within the coverage of the first network, and the connection status of the first network When the connection succeeds to the connection failure, prompt information indicating that the first network connection is wrong is output.
可选地,所述第二类输出模块,还用于:Optionally, the second type of output module is also used for:
在确定所述移动设备已开启所述第一网络的连接功能时,重新建立与所述第一网络的连接;When it is determined that the mobile device has enabled the connection function of the first network, re-establish the connection with the first network;
在与所述第一网络的连接重建次数超过预设阈值时,输出提示重启所述第一网络的提示信息。When the number of times of connection re-establishment with the first network exceeds a preset threshold, output prompt information prompting restarting the first network.
可选地,所述装置还包括:Optionally, the device further includes:
移动信息获取模块,用于获取所述移动设备的移动信息;a mobile information acquisition module, configured to acquire the mobile information of the mobile device;
位置确定模块,用于根据所述移动信息,确定所述移动设备是否处于所述第一网络的覆盖范围内。A location determination module, configured to determine whether the mobile device is within the coverage of the first network according to the movement information.
可选地,所述装置还包括:Optionally, the device further includes:
定位信息获取模块,用于在检测到所述第一网络的网络信号时,获取对应的定位信息;a positioning information acquisition module, configured to acquire corresponding positioning information when a network signal of the first network is detected;
范围确定模块,用于基于所述定位信息,确定所述第一网络的覆盖范围;a range determination module, configured to determine the coverage range of the first network based on the positioning information;
所述位置确定模块,包括:The position determination module includes:
轨迹确定模块,用于根据所述移动信息,确定所述移动设备的移动轨迹;a trajectory determination module, configured to determine the movement trajectory of the mobile device according to the movement information;
目标移动位置确定模块,用于根据所述移动轨迹,获取所述移动设备的目标移动位置;a target movement position determination module, configured to acquire the target movement position of the mobile device according to the movement track;
位置确定子模块,用于根据所述目标移动位置和所述第一网络的覆盖范围,确定所述移动设备是否处于所述第一网络的覆盖范围内。A location determination submodule, configured to determine whether the mobile device is within the coverage of the first network according to the target mobile location and the coverage of the first network.
可选地,所述移动信息包括:加速度传感器检测的加速度信息,或,速度传感器检测的速度信息;Optionally, the movement information includes: acceleration information detected by an acceleration sensor, or speed information detected by a speed sensor;
所述轨迹确定模块,还用于:The trajectory determination module is also used for:
对所述加速度信息或所述速度信息进行积分运算,确定所述移动设备的位移;Integrating the acceleration information or the velocity information to determine the displacement of the mobile device;
根据所述位移和所述移动设备在加速度传感器或速度传感器启动时刻的定位信息,确定所述移动设备的移动轨迹。The movement track of the mobile device is determined according to the displacement and the positioning information of the mobile device when the acceleration sensor or the speed sensor is activated.
根据本公开实施例的第三方面,提供一种网络连接控制装置,包括:According to a third aspect of the embodiments of the present disclosure, there is provided a network connection control apparatus, including:
处理器;processor;
用于存储处理器可执行指令的存储器;memory for storing processor-executable instructions;
其中,所述处理器被配置为:执行所述存储器中存储的可执行指令时,实现上述第一方面的任一项所述的方法。Wherein, the processor is configured to implement the method of any one of the first aspect above when executing the executable instructions stored in the memory.
根据本公开实施例的第四方面,提供一种非临时性计算机可读存储介质,所述计算机可读存储介质中存储有计算机可执行指令,该计算机可执行指令被处理器执行时实现上述第一方面任一项提供的方法中的步骤。According to a fourth aspect of the embodiments of the present disclosure, a non-transitory computer-readable storage medium is provided, where computer-executable instructions are stored in the computer-readable storage medium, and when the computer-executable instructions are executed by a processor, the above-mentioned first The steps in the method provided in any one of the aspects.
本公开的实施例提供的技术方案可以包括以下有益效果:The technical solutions provided by the embodiments of the present disclosure may include the following beneficial effects:
本公开实施例提供的网络连接控制方法,在移动设备处于第一网络的覆盖范围内时,先确定移动设备是否成功连接到第一网络;若连接第一网络失败,就会禁止移动设备自动从连接所述第一网络切换至连接第二网络,并输出提示信息。这样,当检测到移动设备处于第一网络的覆盖范围内,但又连接第一网络失败时,一方面,通过禁止移动设备自动从连接所述第一网络切换至连接第二网络的方式,可以有效地避免移动设备由于连接第一网络失败,自动切换至可以第二网络所导致的不理想情况的发生;例如,可以有效避免移动设备连接行动热点(WIFI)失败,就自动切换至4G网络或5G网络等蜂窝移动通信等优先级低的网络,所导致的额外资费。另一方面,在连接所述第一网络失败时,通过输出提示信息的方式,可以及时地告知用户连接失败的情况,便于用户可以基于该提示信息及时找到应对方法,能够提高用户的使用体验。In the network connection control method provided by the embodiments of the present disclosure, when the mobile device is within the coverage of the first network, it is first determined whether the mobile device is successfully connected to the first network; if the connection to the first network fails, the mobile device is prohibited from automatically Switching from connecting to the first network to connecting to the second network, and outputting prompt information. In this way, when it is detected that the mobile device is within the coverage of the first network but fails to connect to the first network, on the one hand, by prohibiting the mobile device from automatically switching from connecting to the first network to connecting to the second network, it is possible to Effectively avoid the undesired situation caused by the mobile device automatically switching to the second network due to the failure to connect to the first network; Additional charges caused by low-priority networks such as cellular mobile communications such as 5G networks. On the other hand, when connecting to the first network fails, the user can be informed of the connection failure in time by outputting prompt information, so that the user can find a response method in time based on the prompt information, which can improve the user experience.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure.
附图说明Description of drawings
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本发明的实施例,并与说明书一起用于解释本发明的原理。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description serve to explain the principles of the invention.
图1是根据一示例性实施例示出的一种网络连接控制方法的流程图一。FIG. 1 is a flowchart 1 of a method for controlling network connection according to an exemplary embodiment.
图2是根据一示例性实施例示出的一种网络连接控制方法的流程图二。Fig. 2 is a second flowchart of a method for controlling a network connection according to an exemplary embodiment.
图3是根据一示例性实施例示出的一种网络连接控制方法的流程图三。Fig. 3 is a third flowchart of a method for controlling a network connection according to an exemplary embodiment.
图4是根据一示例性实施例示出的一种网络连接控制装置的结构示意图。FIG. 4 is a schematic structural diagram of a network connection control apparatus according to an exemplary embodiment.
图5是根据一示例性实施例示出的一种网络连接控制装置的框图。Fig. 5 is a block diagram of a network connection control apparatus according to an exemplary embodiment.
具体实施方式Detailed ways
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本公开相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本公开的一些方面相一致的装置和方法的例子。Exemplary embodiments will be described in detail herein, examples of which are illustrated in the accompanying drawings. Where the following description refers to the drawings, the same numerals in different drawings refer to the same or similar elements unless otherwise indicated. The implementations described in the illustrative examples below are not intended to represent all implementations consistent with this disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as recited in the appended claims.
本公开实施例提供一种网络连接控制方法,图1是根据一示例性实施例示出的一种网络连接控制方法的流程图一,如图1所示,该网络连接控制方法包括以下步骤:An embodiment of the present disclosure provides a network connection control method. FIG. 1 is a flow chart 1 of a network connection control method according to an exemplary embodiment. As shown in FIG. 1 , the network connection control method includes the following steps:
步骤101,在移动设备处于第一网络的覆盖范围内时,确定所述移动设备是否成功连接到所述第一网络;
步骤102,若连接所述第一网络失败,禁止所述移动设备自动从连接所述第一网络切换至连接第二网络,并输出提示信息;其中,所述第二网络的网络性能低于所述第一网络。Step 102: If the connection to the first network fails, prohibit the mobile device from automatically switching from connecting to the first network to connecting to the second network, and output prompt information; wherein the network performance of the second network is lower than the Describe the first network.
需要说明的是,该网络连接控制方法可以应用于任意的移动设备,该移动设备可以是:智能手机,平板电脑,台式电脑或数码相机等设备。It should be noted that the network connection control method can be applied to any mobile device, and the mobile device can be: a smart phone, a tablet computer, a desktop computer, or a digital camera.
该移动设备支持多种网络连接方式。例如,支持远距离的无线网络和近距离的无线网络;其中,远距离的无线网络可以是5G、4G、3G或2G等;近距离的无线网络可以是WIFI等。The mobile device supports multiple network connection methods. For example, a long-distance wireless network and a short-distance wireless network are supported; the long-distance wireless network may be 5G, 4G, 3G or 2G, etc.; the short-distance wireless network may be WIFI and the like.
本公开实施例中,该第一网络至少包括:WIFI。In this embodiment of the present disclosure, the first network at least includes: WIFI.
第二网络可以是:上述远距离的无线网络;或者是其他WIFI。其他WIFI包括:与第一网络对应的WIFI的覆盖范围存在重叠的WIFI。The second network may be: the above-mentioned long-distance wireless network; or other WIFI. The other WIFIs include: WIFIs with overlapping coverages of the WIFIs corresponding to the first network.
例如,第一网络为第一WIFI,则第二网络可以是5G、4G、3G或2G等。For example, if the first network is the first WIFI, the second network may be 5G, 4G, 3G or 2G, etc.
再例如,第一网络为第一WIFI,则第二网络可以是第二WIFI;第二WIFI可以是公共WIFI。如第一WIFI是家里的WIFI,而第二网络可以是隔壁家的WIFI。For another example, if the first network is the first WIFI, the second network may be the second WIFI; the second WIFI may be a public WIFI. For example, the first WIFI is the WIFI at home, and the second network can be the WIFI of the next door.
需要说明的是,第二网络的网络性能低于第一网络。It should be noted that the network performance of the second network is lower than that of the first network.
这里,网络性能用于指示网络的连接和运行效果,较好的网络性能可以提高用户的使用满意度。在本公开实施例中,衡量网络性能的指标可以包括:带宽和信号强度。其中,带宽越大,单位时间内传输的数据量越多,网络性能越强。同样的,信号强度越大,连接能力越强,对应的网络性能也越强。Here, network performance is used to indicate the connection and operation effect of the network, and better network performance can improve user satisfaction. In this embodiment of the present disclosure, indicators for measuring network performance may include bandwidth and signal strength. Among them, the greater the bandwidth, the greater the amount of data transmitted per unit time, and the stronger the network performance. Similarly, the greater the signal strength, the stronger the connection capability and the stronger the corresponding network performance.
本公开实施例中所述第二网络的网络性能低于所述第一网络;即第一网络相较于第二网络具有更好的网络性能。移动设备在当前环境下进行网络连接时,由于第一网络的信号强度更大,会优先与第一网络建立连接;如果成功连接到第一网络,则可以以更好的数据传输能力来传输数据,更有利于用户使用。In the embodiment of the present disclosure, the network performance of the second network is lower than that of the first network; that is, the first network has better network performance than the second network. When the mobile device is connected to the network in the current environment, because the signal strength of the first network is higher, it will establish a connection with the first network first; if it is successfully connected to the first network, it can transmit data with better data transmission capability , which is more beneficial to users.
在另一些实施例中,所述第二网络的资费可以低于所述第一网络;例如,所述第一网络可为流量免费网络,所述第二网络为流量计费网络。或者,所述第一网络为:流量计费的费率更低的网络,所述第二网络为流量计费的费率更高的网络。再或者,所述第一网络为:按使用时长收费的网络,而所述第二网络为:按流量收费的网络。In other embodiments, the tariff of the second network may be lower than that of the first network; for example, the first network may be a traffic-free network, and the second network may be a traffic-charging network. Alternatively, the first network is a network with a lower rate for traffic charging, and the second network is a network with a higher rate for traffic charging. Still alternatively, the first network is a network that charges according to the usage time, and the second network is a network that charges according to the flow.
作为一个具体示例,当第一网络为WIFI,则第二网络为4G,由于4G需要资费,当移动设备由于连接WIFI失败,自动从WIFI连接变为4G时就会产生资费,不利于用户使用。这样,即使暂时连接所述第一网络失败,也禁止所述移动设备自动切换至连接第二网络,可以有效地避免产生不必要的资费。此时只有禁止移动设备连接的网络自动从WIFI连接变为4G,才能有效避免不必要的资费损失。As a specific example, when the first network is WIFI, the second network is 4G. Since 4G requires tariffs, when the mobile device fails to connect to WIFI and automatically changes from WIFI to 4G, tariffs will be incurred, which is not conducive to user use. In this way, even if temporarily connecting to the first network fails, the mobile device is prohibited from automatically switching to connecting to the second network, which can effectively avoid unnecessary charges. At this time, only the network that the mobile device is connected to is prohibited from automatically changing from WIFI connection to 4G can effectively avoid unnecessary loss of tariffs.
如此,在移动设备处于第一网络的覆盖范围内,但连接所述第一网络失败时,可以通过禁止移动设备自动从连接所述第一网络切换至连接第二网络的方式,来尽可能地保障用户利益。In this way, when the mobile device is within the coverage of the first network but fails to connect to the first network, the mobile device can be prevented from automatically switching from connecting to the first network to connecting to the second network to minimize Protect the interests of users.
如此,当检测到移动设备处于第一网络的覆盖范围内,但又连接第一网络失败时,通过禁止移动设备自动从连接所述第一网络切换至连接第二网络的方式,可以有效地避免移动设备由于连接第一网络失败,自动切换至可以第二网络所导致的不理想情况的发生,提高用户的使用体验。In this way, when it is detected that the mobile device is within the coverage of the first network, but fails to connect to the first network, by prohibiting the mobile device from automatically switching from connecting to the first network to connecting to the second network, it can be effectively avoided. When the mobile device fails to connect to the first network, it can automatically switch to the second network, resulting in an unsatisfactory situation, which improves the user experience.
这里,移动设备是否处于第一网络的覆盖范围内,可以基于对移动设备的位置信息来的检测来确定。该位置信息可以是表征位置坐标的信息或经纬度信息,具体可以通过移动设备中的全球定位系统(GPS)来检测得到。Here, whether the mobile device is within the coverage of the first network may be determined based on detection of location information of the mobile device. The location information may be information representing location coordinates or latitude and longitude information, and may be specifically detected by a global positioning system (GPS) in the mobile device.
需要说明的是,移动设备处于第一网络的覆盖范围内,但连接所述第一网络失败存在多种可能的情况。It should be noted that, the mobile device is within the coverage of the first network, but there are many possible situations in which the connection to the first network fails.
例如,可能是移动设备从至第一网络的覆盖范围外移动至第一网络的覆盖范围内后,连接所述第一网络失败;即处于第一网络的覆盖范围内时,一直没有成功连接第一网络。For example, it may be that the mobile device fails to connect to the first network after moving from outside the coverage of the first network to the coverage of the first network; that is, when it is within the coverage of the first network, it has not successfully connected to the first network. a network.
还例如,可能是移动设备从至第一网络的覆盖范围外移动至第一网络的覆盖范围内后,先与第一网络连接成功,但后续发生了:在所述第一网络的覆盖范围内与所述第一网络的连接状态,从连接成功转变为连接失败;或者处于第一网络的覆盖范围内时,先处于与第一网络连接成功的状态,但后续由于一些原因,变为失败。Also, for example, it may be that after the mobile device moves from outside the coverage of the first network to within the coverage of the first network, it first successfully connects to the first network, but then it happens: within the coverage of the first network The connection state with the first network changes from successful connection to connection failure; or when it is within the coverage of the first network, it is in the state of successful connection with the first network first, but then becomes failure due to some reasons.
还需要说明的是,由于目前移动设备处于第一网络的覆盖范围内时,如果之前有成功连接上第一网络,则当移动设备再次处于第一网络的覆盖范围内,且打开有无线网络的连接功能时,会自动连接上第一网络。那么,在步骤101和102之前,该网络连接控制方法还包括:It should also be noted that, since the mobile device is currently within the coverage of the first network, if it has successfully connected to the first network before, when the mobile device is within the coverage of the first network again, and the wireless network is turned on. When the function is connected, it will automatically connect to the first network. Then, before
确定移动设备的历史使用中,是否成功连接上第一网络;Determine whether the mobile device is successfully connected to the first network in the historical use;
在历史使用中成功连接上第一网络后,执行上述步骤101和102。After successfully connecting to the first network in historical use, the
这里,如果历史使用中没有成功连接上第一网络,则不执行上述步骤101和102。Here, if the first network is not successfully connected in the historical use, the
该确定移动设备的历史使用中,是否成功连接上第一网络,可以通过对移动设备内存储的网络连接信息进行查询来确定。即,如果历史使用中移动设备成功连接上第一网络后,会对应存储该第一网络的网络连接信息,如果移动设备内未存储该第一网络的网络连接信息,则认为历史使用中没有成功连接上第一网络。In determining whether the mobile device is successfully connected to the first network in the historical use, it can be determined by querying the network connection information stored in the mobile device. That is, if the mobile device is successfully connected to the first network in historical use, the network connection information of the first network will be stored correspondingly. If the network connection information of the first network is not stored in the mobile device, it is considered that there is no successful connection in historical use. on the first network.
所述连接信息可至少包括:账号信息。The connection information may include at least account information.
例如,针对不加密的公共网络,所述第一网络的连接信息至少包括:账号信息。针对加密的私人网络,所述第一网络的连接信息可包括:账号信息和密码信息。For example, for an unencrypted public network, the connection information of the first network includes at least account information. For an encrypted private network, the connection information of the first network may include account information and password information.
进一步地,在移动设备处于第一网络的覆盖范围内,但确定连接所述第一网络失败时,本公开的网络连接控制方法,除了禁止移动设备自动从连接所述第一网络切换至连接第二网络,还可以输出提示信息。Further, when the mobile device is within the coverage of the first network, but it is determined that the connection to the first network fails, the network connection control method of the present disclosure, except that the mobile device is prohibited from automatically switching from connecting to the first network to connecting to the first network. The second network can also output prompt information.
该提示信息包括:用于提示连接第一网络失败原因的提示信息,或,用于在连接第一网络失败时提示如何操作的提示信息。The prompt information includes: prompt information for prompting the reason for failing to connect to the first network, or prompt information for prompting how to operate when the connection to the first network fails.
如此,通过输出提示信息的方式,可以使用户能够直接获知当前的网络连接情况,也便于用户能够及时操作,尽快能成功连接到所述第一网络,并且,能够有效地避免用户在未知的情况下发生了网络切换。In this way, by outputting the prompt information, the user can directly know the current network connection situation, and it is also convenient for the user to operate in time, to successfully connect to the first network as soon as possible, and to effectively avoid the unknown situation of the user. A network switch has occurred.
在一些实施例中,该提示信息可以在确定连接所述第一网络失败时,通过移动设备的显示屏输出。这里,通过显示屏输出时,可以直接在显示屏上弹出提示信息,或者以短信的方式输出。In some embodiments, the prompt information may be output through the display screen of the mobile device when it is determined that the connection to the first network fails. Here, when outputting through the display screen, prompt information can be popped up directly on the display screen, or output in the form of a short message.
在另一些实施例中,该提示信息可以在确定连接所述第一网络失败时,通过移动设备的扬声器输出。In other embodiments, the prompt information may be output through the speaker of the mobile device when it is determined that the connection to the first network fails.
这里,相较于显示屏输出的方式,扬声器输出可以迅速地让用户获知情况。但可能在移动设备的静音模式下,该扬声器输出被忽略,如此,显示屏输出可能更能保证用户对信息的获知。本公开对提示信息的输出方式不作限定,可以根据需要进行选择,或进行组合。Here, the speaker output can quickly let the user know the situation compared to the display output. But maybe in the silent mode of the mobile device, the speaker output is ignored, so the display output may better ensure that the user is informed of the information. The present disclosure does not limit the output manner of the prompt information, which can be selected or combined as required.
在一些实施例中,所述提示信息提示以下内容之一:In some embodiments, the prompt information prompts one of the following:
开启所述第一网络的连接功能;enabling the connection function of the first network;
重启所述第一网络的路由器;restarting the router of the first network;
所述第一网络连接错误。The first network connection is wrong.
这里,提示开启第一网络的连接功能和重启所述第一网络的路由器是属于:在连接第一网络失败时提示如何操作的提示信息。而提示第一网络连接错误是属于:提示连接第一网络失败原因的提示信息。Here, the prompt to enable the connection function of the first network and to restart the router of the first network belongs to the prompt information that prompts how to operate when the connection to the first network fails. The prompting the first network connection error belongs to: prompting information prompting the reason for the failure to connect to the first network.
由于移动设备处于第一网络的覆盖范围内,但连接所述第一网络失败的原因可能有多种;例如,移动设备上未开启所述第一网络的连接功能,如未打开WIFI或移动蜂窝网络的连接。还例如,移动设备上开启有所述第一网络的连接功能,但与第一网络的连接发生错误。再例如,第一网络的路由器发生故障。Since the mobile device is within the coverage of the first network, there may be various reasons for the failure to connect to the first network; for example, the connection function of the first network is not enabled on the mobile device, such as not opening WIFI or mobile cellular network connection. For another example, the connection function of the first network is enabled on the mobile device, but an error occurs in connection with the first network. As another example, the router of the first network fails.
需要说明的是,上述与第一网络的连接发生错误可能是:第一网络的连接信息发生了更换,基于旧的连接信息,无法成功连接第一网络;还可能是:第一网络的连接信息未发生更换,但连接中由于网络波动等原因,无法成功连接第一网络。It should be noted that the above-mentioned error in connection with the first network may be: the connection information of the first network has been replaced, and the first network cannot be successfully connected based on the old connection information; it may also be: the connection information of the first network No replacement has occurred, but the first network cannot be successfully connected due to network fluctuations and other reasons during the connection.
而第一网络的路由器发生故障可能是:路由器在长时间工作的时候经常会出现无法正常的发射信号;还可能是:路由器本身出现功能性故障,例如,电源损坏、无线发射模块损坏或处理芯片损坏等。The failure of the router of the first network may be: the router often fails to transmit signals normally when it works for a long time; it may also be: the router itself has a functional failure, for example, the power supply is damaged, the wireless transmission module is damaged or the processing chip is damaged. damage, etc.
如此,在连接所述第一网络失败时,通过发生上述提示信息,一方面可以使用户获知当前的网络连接情况,还可以提示用户可以通过执行何种操作来尽可能地实现与所述第一网络的连接成功。In this way, when the connection to the first network fails, the above prompt information can be generated, on the one hand, the user can be informed of the current network connection situation, and can also prompt the user what operation can be performed to achieve the connection with the first network as much as possible. The connection to the network is successful.
在一些实施例中,图2是根据一示例性实施例示出的一种网络连接控制方法的流程图二,如图2所示,步骤102中,所述输出提示信息,包括:In some embodiments, FIG. 2 is a second flowchart of a network connection control method according to an exemplary embodiment. As shown in FIG. 2 , in
步骤1021,在确定所述移动设备未开启所述第一网络的连接功能时,输出提示开启所述第一网络的连接功能的提示信息;
或者,or,
步骤1022,在确定所述移动设备已开启所述第一网络的连接功能时,输出提示所述第一网络连接错误的提示信息或输出提示重启所述第一网络的提示信息。
这里,如上所述,移动设备在第一网络的覆盖范围内,但连接第一网络失败的原因可能有多种,在确定连接所述第一网络失败时随意选取一条提示信息进行输出,不利用问题的解决。Here, as mentioned above, the mobile device is within the coverage of the first network, but there may be various reasons for the failure to connect to the first network. When it is determined that the connection to the first network fails, a piece of prompt information is arbitrarily selected for output, and no use of problem solving.
本公开实施例在确定连接所述第一网络失败时,先确定移动设备是否开启所述第一网络的连接功能,在确定未开启所述第一网络的连接功能时,很大概率可以确定连接所述第一网络失败的原因是移动设备未开启所述第一网络的连接功能。如此,可以在输入提示开启所述第一网络的连接功能的提示信息后,有很大可能可以使与所述第一网络的连接变为成功。In this embodiment of the present disclosure, when it is determined that the connection to the first network fails, it is first determined whether the mobile device has enabled the connection function of the first network. The reason for the failure of the first network is that the mobile device does not enable the connection function of the first network. In this way, after inputting prompt information prompting to enable the connection function of the first network, there is a high possibility that the connection with the first network can be made successful.
相对地,如果确定开启有所述第一网络的连接功能,则说明连接所述第一网络失败的原因是其他原因,此时,就可以输出提示所述第一网络连接错误的提示信息或输出提示重启所述第一网络的提示信息,用以提示用户进行对应的操作。On the other hand, if it is determined that the connection function of the first network is enabled, it indicates that the reason for the failure to connect to the first network is other reasons, and at this time, a prompt message or output indicating that the first network connection is wrong can be output. The prompt information for prompting to restart the first network is used to prompt the user to perform a corresponding operation.
如此,可以根据不同的情况输出不同的提示信息,方便用户及时且有效地解决连接第一网络失败的问题,也可以提升问题解决的成功率。In this way, different prompt information can be output according to different situations, which is convenient for the user to solve the problem of failure to connect to the first network in a timely and effective manner, and can also improve the success rate of problem solving.
在一些实施例中,所述方法还包括:In some embodiments, the method further includes:
获取所述移动设备的网络连接信息。Obtain network connection information of the mobile device.
该网络连接信息中指示有:当前连接的网络以及与该网络的连接状态。The network connection information indicates: the currently connected network and the connection status with the network.
与该网络的连接状态包括:连接成功或连接失败。The connection status to this network includes: connection successful or connection failure.
例如,网络连接信息指示出移动设备当前连接的网络为第一WIFI,并指示出与该第一WIFI的连接状态为连接成功。For example, the network connection information indicates that the network currently connected to the mobile device is the first WIFI, and indicates that the connection status with the first WIFI is successful.
基于该网络连接信息,所述在确定所述移动设备已开启所述第一网络的连接功能时,输出提示所述第一网络连接错误的提示信息,包括:Based on the network connection information, when it is determined that the mobile device has enabled the connection function of the first network, outputting prompt information indicating that the first network connection is incorrect, including:
在确定所述移动设备已开启所述第一网络的连接功能,且根据所述网络连接信息确定出所述移动设备在所述第一网络的覆盖范围内,以及所述第一网络的连接状态从连接成功转变为连接失败时,输出提示所述第一网络连接错误的提示信息。After it is determined that the mobile device has enabled the connection function of the first network, and it is determined according to the network connection information that the mobile device is within the coverage of the first network, and the connection status of the first network When the connection succeeds to the connection failure, prompt information indicating that the first network connection is wrong is output.
这里,在移动设备从至第一网络的覆盖范围外移动至第一网络的覆盖范围内后,先与第一网络的连接成功,但在所述第一网络的覆盖范围内与所述第一网络的连接状态,从连接成功转变为连接失败时,由于存在过连接成功,则不会是未开启所述第一网络的连接功能的问题,此时可以认为与第一网络的连接发生了错误。Here, after the mobile device moves from outside the coverage of the first network to within the coverage of the first network, the connection to the first network is successful, but the mobile device is connected to the first network within the coverage of the first network. When the connection status of the network changes from successful connection to connection failure, because there is a successful connection, it will not be a problem that the connection function of the first network is not enabled, and it can be considered that an error has occurred in the connection with the first network. .
在一些实施例中,所述在确定所述移动设备已开启所述第一网络的连接功能时,输出提示重启所述第一网络的提示信息,包括:In some embodiments, when it is determined that the mobile device has enabled the connection function of the first network, outputting prompt information prompting to restart the first network includes:
在确定所述移动设备已开启所述第一网络的连接功能时,重新建立与所述第一网络的连接;When it is determined that the mobile device has enabled the connection function of the first network, re-establish the connection with the first network;
在与所述第一网络的连接重建次数超过预设阈值时,输出提示重启所述第一网络的提示信息。When the number of times of connection re-establishment with the first network exceeds a preset threshold, output prompt information prompting restarting the first network.
这里,由于开启有所述第一网络的连接功能,但连接所述第一网络失败的原因无法直接确定,就可以尝试执行一些操作来解决连接第一网络失败的问题,例如,先尝试重新建立与第一网络的连接。Here, since the connection function of the first network is enabled, but the reason for the failure to connect to the first network cannot be directly determined, you can try to perform some operations to solve the problem of the failure to connect to the first network, for example, first try to re-establish connection to the first network.
这里,重新建立与第一网络的连接,可以是按照移动设备内存储的连接信息来自动发起连接。还可以是,在自动连接中,检测到连接信息错误的提示信息时,输出连接信息的输入框,以便于用户重新输入连接信息。Here, the re-establishment of the connection with the first network may be to automatically initiate the connection according to the connection information stored in the mobile device. It is also possible that, in the automatic connection, when detecting the prompt information that the connection information is wrong, an input box of the connection information is output, so as to facilitate the user to re-input the connection information.
该连接信息包括:账号信息和密码信息。The connection information includes: account information and password information.
本公开实施例中,为与所述第一网络的连接的建立次数设置有预设阈值,当重建次数超过预设阈值,就可能是路由器的问题,此时可以提示用户重启路由器。In the embodiment of the present disclosure, a preset threshold is set for the number of times of establishing a connection with the first network. When the number of reconstructions exceeds the preset threshold, it may be a problem with the router, and the user may be prompted to restart the router.
由于在与所述第一网络的连接重建过程中,如果之前所述第一网络连接错误是由于网络波动,那么在后续重新连接中,大概率会连接成功;或者之前所述第一网络连接错误是连接信息更改,那么在后续重新输入连接信息后,大概率会连接成功。如果在预设阈值的多次连接中,均未成功,则可以认为是路由器存在故障,可以提示用户重启路由器。In the process of re-establishing the connection with the first network, if the previous first network connection error was due to network fluctuations, in the subsequent reconnection, there is a high probability that the connection will be successful; or the previous first network connection error If the connection information is changed, there is a high probability that the connection will be successful after re-entering the connection information subsequently. If the multiple connections of the preset threshold are unsuccessful, it may be considered that the router is faulty, and the user may be prompted to restart the router.
在一些实施例中,所述方法还包括:In some embodiments, the method further includes:
当重启路由器后,如果与所述第一网络的连接仍然失败,则输出第一网络的路由器功能性故障的提示信息。After the router is restarted, if the connection with the first network still fails, prompt information indicating that the router of the first network is functionally faulty is output.
如上所述,而第一网络的路由器发生故障可能是:路由器在长时间工作的时候经常会出现无法正常的发射信号;还可能是:路由器本身出现功能性故障,例如,电源损坏、无线发生模块损坏或处理芯片损坏等。如果是由于长时间工作无法正常的发射信号,可以通过重启路由器来解决。但如果是路由器本身出现功能性故障,则重启是无法解决的,此时输出第一网络功能性故障的提示信息,以提示用户更换路由器,或,维修路由器。As mentioned above, the failure of the router of the first network may be: the router often transmits signals abnormally when it works for a long time; it may also be: the router itself has a functional failure, for example, the power supply is damaged, the wireless module damage or handle chip damage, etc. If the signal cannot be transmitted normally due to long-term work, it can be solved by restarting the router. However, if the router itself has a functional failure, restarting cannot solve the problem. At this time, a prompt message of the first network functional failure is output to prompt the user to replace the router, or repair the router.
在一些实施例中,图3是根据一示例性实施例示出的一种网络连接控制方法的流程图三,如图3所示,所述方法还包括:In some embodiments, FIG. 3 is a third flowchart of a network connection control method according to an exemplary embodiment. As shown in FIG. 3 , the method further includes:
步骤103,获取所述移动设备的移动信息;
步骤104,根据所述移动信息,确定所述移动设备是否处于所述第一网络的覆盖范围内。Step 104: Determine whether the mobile device is within the coverage of the first network according to the movement information.
通过获取移动设备的移动信息,来判断出移动设备在每个检测时刻是否位于所述第一网络的覆盖范围内。By acquiring the movement information of the mobile device, it is determined whether the mobile device is within the coverage of the first network at each detection moment.
在一些实施例中,所述移动信息包括以下至少之一:In some embodiments, the movement information includes at least one of the following:
加速度传感器检测的加速度;The acceleration detected by the acceleration sensor;
速度传感器检测的速度。The speed detected by the speed sensor.
这里,移动设备内包含加速度传感器或速度传感器。该加速度传感器用于检测加速度信息,该速度传感器用于检测速度信息。Here, the mobile device contains an acceleration sensor or a speed sensor. The acceleration sensor is used for detecting acceleration information, and the speed sensor is used for detecting speed information.
该加速度传感器包括:三轴加速度传感器或单轴加速度传感器。The acceleration sensor includes: a three-axis acceleration sensor or a single-axis acceleration sensor.
需要说明的是,当移动设备内只包含加速度传感器时,将先获取根据加速度传感器检测的加速度信息,再对加速度信息进行乘法运算,得到速度信息。It should be noted that, when only the acceleration sensor is included in the mobile device, the acceleration information detected by the acceleration sensor will be obtained first, and then the acceleration information will be multiplied to obtain the speed information.
总之,在本公开实施例中,所述移动信息可用于确定所述移动设备是否位于第一网络的覆盖范围内。In conclusion, in this embodiment of the present disclosure, the movement information may be used to determine whether the mobile device is located within the coverage of the first network.
在一些实施例中,所述根据所述移动信息,确定所述移动设备是否处于所述第一网络的覆盖范围内,包括:In some embodiments, the determining whether the mobile device is within the coverage of the first network according to the movement information includes:
根据所述移动信息,确定所述移动设备的移动轨迹;According to the movement information, determine the movement track of the mobile device;
根据所述移动轨迹,获取所述移动设备的目标移动位置;According to the movement track, obtain the target movement position of the mobile device;
根据所述目标移动位置和所述第一网络的覆盖范围,确定所述移动设备是否处于所述第一网络的覆盖范围内。According to the target mobile location and the coverage of the first network, it is determined whether the mobile device is within the coverage of the first network.
这里,在一些实施例中,当移动信息包括:加速度传感器检测的加速度信息或速度传感器检测的速度信息时,根据所述移动信息,确定所述移动设备的移动轨迹就可以是:Here, in some embodiments, when the movement information includes: acceleration information detected by an acceleration sensor or speed information detected by a speed sensor, determining the movement trajectory of the mobile device according to the movement information may be:
对所述加速度信息或所述速度信息进行积分运算,确定所述移动设备的位移;Integrating the acceleration information or the velocity information to determine the displacement of the mobile device;
根据所述位移和所述移动设备在加速度传感器或速度传感器启动时刻的定位信息,确定所述移动设备的移动轨迹。The movement track of the mobile device is determined according to the displacement and the positioning information of the mobile device when the acceleration sensor or the speed sensor is activated.
这里,所述位移是指移动设备的移动距离。Here, the displacement refers to the moving distance of the mobile device.
具体地,基于多个相邻检测时刻检测的加速度信息或速度信息,可以确定所述移动设备的移动距离。所述相邻两个检测时刻包括:当前检测时刻和前一个检测时刻,或者,当前检测时刻和下一个检测时刻。所述相邻两个检测时刻为:检测时间轴上的两个进行检测的时间点。Specifically, the moving distance of the mobile device may be determined based on acceleration information or speed information detected at multiple adjacent detection moments. The two adjacent detection moments include: the current detection moment and the previous detection moment, or the current detection moment and the next detection moment. The two adjacent detection moments are: two detection time points on the detection time axis.
所述加速度传感器可以直接测得移动设备的加速度。而根据距离计算公式,距离与加速度的平方成正比,那么,本公开实施例中的移动设备的移动距离可以是对所述加速度进行二重积分得到。对应的,速度传感器可以直接测得移动设备的速度。根据距离计算公式,距离与速度成正比,那么,本公开实施例中的移动设备的移动距离可以是对所述速度直接进行积分得到。The acceleration sensor can directly measure the acceleration of the mobile device. According to the distance calculation formula, the distance is proportional to the square of the acceleration. Then, the moving distance of the mobile device in the embodiment of the present disclosure may be obtained by double-integrating the acceleration. Correspondingly, the speed sensor can directly measure the speed of the mobile device. According to the distance calculation formula, the distance is proportional to the speed. Then, the moving distance of the mobile device in the embodiment of the present disclosure may be obtained by directly integrating the speed.
如此,在得到移动设备在相邻两个检测时刻的时间间隔内的位移后,进一步确定出相邻两个检测时刻中的前一个检测时刻的位置,在所述位置上加上所述位移,即可得到移动设备的当前的位置。这里,可以获取移动设备在所述加速度传感器或速度传感器启动时刻的定位信息,基于该定位信息结合多个检测时刻所确定的位移,可以确定出移动设备的移动轨迹。In this way, after obtaining the displacement of the mobile device in the time interval between two adjacent detection moments, the position of the previous detection moment in the two adjacent detection moments is further determined, and the displacement is added to the position, You can get the current location of the mobile device. Here, the positioning information of the mobile device at the activation time of the acceleration sensor or the speed sensor can be obtained, and the movement trajectory of the mobile device can be determined based on the positioning information combined with the displacements determined at multiple detection moments.
需要说明的是,定位信息可以通过移动设备中的GPS检测得到。而加速度传感器确定出的加速度除了包含加速度的数值本身,还包括加速度的方向。基于该方向上的位移和移动设备在所述加速度传感器或速度传感器启动时刻的定位信息,即可得到移动轨迹。对应的速度传感器也可确定出速度方向,本公开对此不作赘述。It should be noted that the positioning information can be obtained through GPS detection in the mobile device. The acceleration determined by the acceleration sensor not only includes the value of the acceleration itself, but also includes the direction of the acceleration. Based on the displacement in this direction and the positioning information of the mobile device at the moment of activation of the acceleration sensor or the speed sensor, the movement trajectory can be obtained. The corresponding speed sensor can also determine the speed direction, which is not repeated in this disclosure.
这种直接基于传感器检测的方式简单方便,且加速度传感器或速度传感器与GPS相配合,为移动设备的移动轨迹的确定提供了实现可能。This method based on direct sensor detection is simple and convenient, and the acceleration sensor or the speed sensor cooperates with the GPS, which provides the possibility of realizing the determination of the movement trajectory of the mobile device.
在确定出移动设备的移动轨迹后,本公开需要将该轨迹与第一网络的覆盖范围进行匹配,来确定所述移动设备是否处于所述第一网络的覆盖范围内。After the movement trajectory of the mobile device is determined, the present disclosure needs to match the trajectory with the coverage of the first network to determine whether the mobile device is within the coverage of the first network.
这里,在一些实施例中,第一网络的覆盖范围的确定可以是:Here, in some embodiments, the determination of the coverage of the first network may be:
在检测到所述第一网络的网络信号时,获取对应的定位信息;Obtaining corresponding positioning information when the network signal of the first network is detected;
基于所述定位信息,确定所述第一网络的覆盖范围。Based on the positioning information, the coverage of the first network is determined.
即在移动设备的历史使用中,当在移动中检测到第一网络的网络信号时,意味着移动设备此时进入了第一网络的覆盖范围,那么可以从移动设备的多个方向的移动中,及时采集到多个定位信息,基于多个该定位信息即可确定出所述第一网络的覆盖范围。That is, in the historical use of the mobile device, when the network signal of the first network is detected while moving, it means that the mobile device has entered the coverage of the first network at this time. , multiple pieces of positioning information are collected in time, and the coverage of the first network can be determined based on multiple pieces of the positioning information.
如此,在获知移动设备的移动轨迹的移动轨迹后,就可以基于该移动轨迹和第一网络的覆盖范围的比较,确定移动设备是否移出所述第一网络的覆盖范围外。In this way, after knowing the movement track of the movement track of the mobile device, it can be determined whether the mobile device moves out of the coverage range of the first network based on the comparison between the movement track and the coverage range of the first network.
本公开实施例提供的网络连接控制方法,在移动设备处于第一网络的覆盖范围内时,先确定移动设备是否成功连接到第一网络;若连接第一网络失败,就会禁止移动设备自动从连接所述第一网络切换至连接第二网络。这样,当检测到移动设备处于第一网络的覆盖范围内,但又连接第一网络失败时,通过禁止移动设备自动从连接所述第一网络切换至连接第二网络的方式,可以有效地避免移动设备由于连接第一网络失败,自动切换至可以第二网络所导致的不理想情况的发生;例如,可以有效避免没移动设备连接上WIFI上,但自动切换至4G或5G网络等蜂窝移动通信等优先级低的网络,所导致的额外资费。In the network connection control method provided by the embodiments of the present disclosure, when the mobile device is within the coverage of the first network, it is first determined whether the mobile device is successfully connected to the first network; if the connection to the first network fails, the mobile device is prohibited from automatically Connecting to the first network switches to connecting to the second network. In this way, when it is detected that the mobile device is within the coverage of the first network but fails to connect to the first network, by prohibiting the mobile device from automatically switching from connecting to the first network to connecting to the second network, it can be effectively avoided. Undesirable situations caused by the failure of the mobile device to connect to the first network and automatically switch to the second network; for example, it can effectively prevent the mobile device from being connected to WIFI, but automatically switch to cellular mobile communications such as 4G or 5G networks Other low-priority networks will result in additional charges.
并且,连接所述第一网络失败时,通过输出提示信息的方式,可以及时地告知用户连接失败的情况,便于用户可以基于该提示信息及时找到应对方法,能够提高用户的使用体验。In addition, when the connection to the first network fails, the user can be informed of the connection failure in a timely manner by outputting prompt information, so that the user can find a response method in time based on the prompt information, which can improve the user experience.
本公开还提供一种网络连接控制装置,图4是根据一示例性实施例示出的一种网络连接控制装置的结构示意图,如图4所示,所述网络连接控制装置400,包括:The present disclosure further provides a network connection control apparatus. FIG. 4 is a schematic structural diagram of a network connection control apparatus according to an exemplary embodiment. As shown in FIG. 4 , the network connection control apparatus 400 includes:
第一确定模块401,用于在移动设备处于第一网络的覆盖范围内时,确定所述移动设备是否成功连接到所述第一网络;A first determining module 401, configured to determine whether the mobile device is successfully connected to the first network when the mobile device is within the coverage of the first network;
处理模块402,用于若连接所述第一网络失败,禁止所述移动设备自动从连接所述第一网络切换至连接第二网络,并输出提示信息;其中,所述第二网络的网络性能低于所述第一网络。The processing module 402 is configured to prohibit the mobile device from automatically switching from connecting to the first network to connecting to the second network if the connection to the first network fails, and output prompt information; wherein, the network performance of the second network below the first network.
在一些实施例中,所述处理模块,包括:In some embodiments, the processing module includes:
第一类输出模块,用于在确定未开启所述第一网络的连接功能时,输出提示开启所述第一网络的连接功能的提示信息;A first type of output module, configured to output prompt information prompting to enable the connection function of the first network when it is determined that the connection function of the first network is not enabled;
或者,or,
第二类输出模块,用于在确定所述移动设备已开启所述第一网络的连接功能时,输出提示所述第一网络连接错误的提示信息或输出提示重启所述第一网络的提示信息。The second type of output module is configured to, when it is determined that the mobile device has enabled the connection function of the first network, output prompt information indicating that the first network is connected incorrectly or output prompt information prompting restarting the first network .
在一些实施例中,所述装置还包括:In some embodiments, the apparatus further includes:
网络连接获取模块,用于获取所述移动设备的网络连接信息;a network connection acquisition module for acquiring network connection information of the mobile device;
所述第二类输出模块,还用于:The second type of output module is also used for:
在确定所述移动设备已开启所述第一网络的连接功能,且根据所述网络连接信息确定出所述移动设备在所述第一网络的覆盖范围内,以及所述第一网络的连接状态从连接成功转变为连接失败时,输出提示所述第一网络连接错误的提示信息。After it is determined that the mobile device has enabled the connection function of the first network, and it is determined according to the network connection information that the mobile device is within the coverage of the first network, and the connection status of the first network When the connection succeeds to the connection failure, prompt information indicating that the first network connection is wrong is output.
在一些实施例中,所述第二类输出模块,还用于:In some embodiments, the second type of output module is further used for:
在确定所述移动设备已开启所述第一网络的连接功能时,重新建立与所述第一网络的连接;When it is determined that the mobile device has enabled the connection function of the first network, re-establish the connection with the first network;
在与所述第一网络的连接重建次数超过预设阈值时,输出提示重启所述第一网络的提示信息。When the number of times of connection re-establishment with the first network exceeds a preset threshold, output prompt information prompting restarting the first network.
在一些实施例中,所述装置还包括:In some embodiments, the apparatus further includes:
移动信息获取模块,用于获取所述移动设备的移动信息;a mobile information acquisition module, configured to acquire the mobile information of the mobile device;
位置确定模块,用于根据所述移动信息,确定所述移动设备是否处于所述第一网络的覆盖范围内。A location determination module, configured to determine whether the mobile device is within the coverage of the first network according to the movement information.
在一些实施例中,所述装置还包括:In some embodiments, the apparatus further includes:
定位信息获取模块,用于在检测到所述第一网络的网络信号时,获取对应的定位信息;a positioning information acquisition module, configured to acquire corresponding positioning information when a network signal of the first network is detected;
范围确定模块,用于基于所述定位信息,确定所述第一网络的覆盖范围;a range determination module, configured to determine the coverage range of the first network based on the positioning information;
所述位置确定模块,包括:The position determination module includes:
轨迹确定模块,用于根据所述移动信息,确定所述移动设备的移动轨迹;a trajectory determination module, configured to determine the movement trajectory of the mobile device according to the movement information;
目标移动位置确定模块,用于根据所述移动轨迹,获取所述移动设备的目标移动位置;a target movement position determination module, configured to acquire the target movement position of the mobile device according to the movement track;
位置确定子模块,用于根据所述目标移动位置和所述第一网络的覆盖范围,确定所述移动设备是否处于所述第一网络的覆盖范围内。A location determination submodule, configured to determine whether the mobile device is within the coverage of the first network according to the target mobile location and the coverage of the first network.
在一些实施例中,所述移动信息包括:加速度传感器检测的加速度信息,或,速度传感器检测的速度信息;In some embodiments, the movement information includes: acceleration information detected by an acceleration sensor, or speed information detected by a speed sensor;
所述轨迹确定模块,还用于:The trajectory determination module is also used for:
对所述加速度信息或所述速度信息进行积分运算,确定所述移动设备的位移;Integrating the acceleration information or the velocity information to determine the displacement of the mobile device;
根据所述位移和所述移动设备在加速度传感器或速度传感器启动时刻的定位信息,确定所述移动设备的移动轨迹。The movement track of the mobile device is determined according to the displacement and the positioning information of the mobile device when the acceleration sensor or the speed sensor is activated.
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。Regarding the apparatus in the above-mentioned embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be described in detail here.
图5是根据一示例性实施例示出的一种网络连接控制装置1800的框图。例如,装置1800可以是移动电话、计算机、数字广播终端、消息收发设备、游戏控制台、平板设备、医疗设备、健身设备、个人数字助理等。FIG. 5 is a block diagram of a network
参照图5,装置1800可以包括以下一个或多个组件:处理组件1802,存储器1804,电力组件1806,多媒体组件1808,音频组件1810,输入/输出(I/O)接口1812,传感器组件1814,以及通信组件1816。5,
处理组件1802通常控制装置1800的整体操作,诸如与显示、电话呼叫、数据通信、相机操作和记录操作相关联的操作。处理组件1802可以包括一个或多个处理器1820来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件1802还可以包括一个或多个模块,便于处理组件1802和其他组件之间的交互。例如,处理组件1802可以包括多媒体模块,以方便多媒体组件1808和处理组件1802之间的交互。The
存储器1804被配置为存储各种类型的数据以支持在装置1800的操作。这些数据的示例包括用于在装置1800上操作的任何应用程序或方法的指令、联系人数据、电话簿数据、消息、图像、视频等。存储器1804可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM)、电可擦除可编程只读存储器(EEPROM)、可擦除可编程只读存储器(EPROM)、可编程只读存储器(PROM)、只读存储器(ROM)、磁存储器、快闪存储器、磁盘或光盘。
电力组件1806为装置1800各种组件提供电力。电力组件1806可以包括:电源管理系统,一个或多个电源,及其他与为装置1800生成、管理和分配电力相关联的组件。
多媒体组件1808包括在所述装置1800和用户之间提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件1808包括一个前置摄像头和/或后置摄像头。当装置1800处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和/或后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。
音频组件1810被配置为输出和/或输入音频信号。例如,音频组件1810包括一个麦克风(MIC),当装置1800处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器1804或经由通信组件1816发送。在一些实施例中,音频组件1810还包括一个扬声器,用于输出音频信号。
I/O接口1812为处理组件1802和外围接口模块之间提供接口,上述外围接口模块可以是键盘、点击轮、按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。The I/
传感器组件1814包括一个或多个传感器,用于为装置1800提供各个方面的状态评估。例如,传感器组件1814可以检测到装置1800的打开/关闭状态、组件的相对定位,例如所述组件为装置1800的显示器和小键盘,传感器组件1814还可以检测装置1800或装置1800一个组件的位置改变,用户与装置1800接触的存在或不存在,装置1800方位或加速/减速和装置1800的温度变化。传感器组件1814可以包括接近传感器,被配置为在没有任何的物理接触时检测附近物体的存在。传感器组件1814还可以包括光传感器,如CMOS或CCD图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件1814还可以包括加速度传感器、陀螺仪传感器、磁传感器、压力传感器或温度传感器。
通信组件1816被配置为便于装置1800和其他设备之间有线或无线方式的通信。装置1800可以接入基于通信标准的无线网络,如WiFi、2G或3G,或它们的组合。在一个示例性实施例中,通信组件1816经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,所述通信组件1816还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术、超宽带(UWB)技术、蓝牙(BT)技术或其他技术来实现。
在示例性实施例中,装置1800可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。In an exemplary embodiment,
在示例性实施例中,还提供了一种包括指令的非临时性计算机可读存储介质,例如包括指令的存储器1804,上述指令可由装置1800的处理器1820执行以完成上述方法。例如,所述非临时性计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions, such as a
一种非临时性计算机可读存储介质,当所述存储介质中的指令由处理器执行时,使得能够执行上述方法。A non-transitory computer-readable storage medium having instructions in the storage medium, when executed by a processor, enable the above-described method to be performed.
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本公开的其它实施方案。本公开旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由所附的权利要求指出。Other embodiments of the present disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common general knowledge or techniques in the technical field not disclosed by this disclosure . The specification and examples are to be regarded as exemplary only, with the true scope and spirit of the disclosure being indicated by the appended claims.
应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限制。It is to be understood that the present disclosure is not limited to the precise structures described above and illustrated in the accompanying drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims (16)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110178396.9A CN114915984A (en) | 2021-02-09 | 2021-02-09 | Network connection control method, device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110178396.9A CN114915984A (en) | 2021-02-09 | 2021-02-09 | Network connection control method, device and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114915984A true CN114915984A (en) | 2022-08-16 |
Family
ID=82760795
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110178396.9A Pending CN114915984A (en) | 2021-02-09 | 2021-02-09 | Network connection control method, device and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114915984A (en) |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106332172A (en) * | 2016-09-13 | 2017-01-11 | 广东欧珀移动通信有限公司 | A method and device for improving network signal quality |
CN106454531A (en) * | 2016-10-20 | 2017-02-22 | 合网络技术(北京)有限公司 | Multimedia resource loading method and device |
CN107148059A (en) * | 2017-05-09 | 2017-09-08 | 惠州Tcl移动通信有限公司 | A kind of switching method of network connection, storage device and mobile terminal |
CN107241758A (en) * | 2017-08-04 | 2017-10-10 | 广东欧珀移动通信有限公司 | Network control method, network control device and intelligent terminal |
CN107454640A (en) * | 2017-09-23 | 2017-12-08 | 广东欧珀移动通信有限公司 | Network access switching method and related products |
CN108965064A (en) * | 2018-08-30 | 2018-12-07 | 希格斯动力科技(珠海)有限公司 | A kind of network management and system for Android system |
CN110096325A (en) * | 2019-04-24 | 2019-08-06 | 上海连尚网络科技有限公司 | Social multidate information methods of exhibiting, computer equipment and storage medium |
CN110557776A (en) * | 2019-05-16 | 2019-12-10 | Oppo广东移动通信有限公司 | network connection control method, terminal and storage medium |
WO2020166425A1 (en) * | 2019-02-15 | 2020-08-20 | 日本電信電話株式会社 | Network device, network system, network connection method, and program |
CN111726850A (en) * | 2020-06-22 | 2020-09-29 | 展讯通信(上海)有限公司 | Network access control method, device, terminal and readable storage medium |
-
2021
- 2021-02-09 CN CN202110178396.9A patent/CN114915984A/en active Pending
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106332172A (en) * | 2016-09-13 | 2017-01-11 | 广东欧珀移动通信有限公司 | A method and device for improving network signal quality |
CN106454531A (en) * | 2016-10-20 | 2017-02-22 | 合网络技术(北京)有限公司 | Multimedia resource loading method and device |
CN107148059A (en) * | 2017-05-09 | 2017-09-08 | 惠州Tcl移动通信有限公司 | A kind of switching method of network connection, storage device and mobile terminal |
CN107241758A (en) * | 2017-08-04 | 2017-10-10 | 广东欧珀移动通信有限公司 | Network control method, network control device and intelligent terminal |
CN107454640A (en) * | 2017-09-23 | 2017-12-08 | 广东欧珀移动通信有限公司 | Network access switching method and related products |
CN108965064A (en) * | 2018-08-30 | 2018-12-07 | 希格斯动力科技(珠海)有限公司 | A kind of network management and system for Android system |
WO2020166425A1 (en) * | 2019-02-15 | 2020-08-20 | 日本電信電話株式会社 | Network device, network system, network connection method, and program |
CN110096325A (en) * | 2019-04-24 | 2019-08-06 | 上海连尚网络科技有限公司 | Social multidate information methods of exhibiting, computer equipment and storage medium |
CN110557776A (en) * | 2019-05-16 | 2019-12-10 | Oppo广东移动通信有限公司 | network connection control method, terminal and storage medium |
CN111726850A (en) * | 2020-06-22 | 2020-09-29 | 展讯通信(上海)有限公司 | Network access control method, device, terminal and readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3301856B1 (en) | Router management method, router and mobile terminal | |
EP3260362A1 (en) | Transferring control authorization for a controlled terminal | |
EP3200116B1 (en) | Method and apparatus for acquiring information via a virtual identity module from lost or stolen terminal | |
EP3076716A1 (en) | Method and apparatus for network access | |
EP3113131A1 (en) | Method and device for providing object finding information | |
EP3116165B1 (en) | Method and device for testing a terminal | |
CN106658593B (en) | Network switching method and terminal | |
KR101713305B1 (en) | Method, apparatus, system, program and recording medium for smart device to access router | |
CN113873607B (en) | Cell switching method and device | |
CN111262941B (en) | Method for reconnecting cloud server and electronic equipment | |
WO2020227879A1 (en) | Connection processing method and apparatus, and medium | |
US12096407B2 (en) | Time domain configuration method, device, and storage media | |
WO2022120540A1 (en) | Connection establishment method and apparatus | |
CN106034323A (en) | Wireless-terminal-based automatic recovery method and relevant apparatus for data connection | |
CN107734139A (en) | The control method and device of terminal device | |
CN109076619B (en) | Random access control method and random access control device | |
CN114928867A (en) | Cell switching method, device, electronic equipment and storage medium | |
CN108347718B (en) | Method, device and storage medium for monitoring communication packet | |
CN107040949B (en) | Network residing method, device and computer readable storage medium | |
US20170147134A1 (en) | Method and apparatus for controlling touch-screen sensitivity | |
EP4037425A1 (en) | Link failure information processing method and electronic device | |
CN107959974B (en) | Communication processing method, terminal and storage medium | |
CN114915984A (en) | Network connection control method, device and storage medium | |
CN107039054B (en) | The way of recording and device | |
CN112804769B (en) | Method, device and storage medium for connecting network |
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 |