Movatterモバイル変換


[0]ホーム

URL:


CN107295592A - Network switching method, mobile terminal and computer-readable storage medium - Google Patents

Network switching method, mobile terminal and computer-readable storage medium
Download PDF

Info

Publication number
CN107295592A
CN107295592ACN201710693235.7ACN201710693235ACN107295592ACN 107295592 ACN107295592 ACN 107295592ACN 201710693235 ACN201710693235 ACN 201710693235ACN 107295592 ACN107295592 ACN 107295592A
Authority
CN
China
Prior art keywords
network
mobile terminal
currently connected
wlan
preset threshold
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
Application number
CN201710693235.7A
Other languages
Chinese (zh)
Inventor
胡亚东
候祥
刘铭
宋永耀
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp LtdfiledCriticalGuangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201710693235.7ApriorityCriticalpatent/CN107295592A/en
Publication of CN107295592ApublicationCriticalpatent/CN107295592A/en
Pendinglegal-statusCriticalCurrent

Links

Classifications

Landscapes

Abstract

Translated fromChinese

本发明适用于通信技术领域,提供了一种网络切换方法、移动终端及计算机可读存储介质,所述方法包括:检测移动终端当前所连接的网络;若移动终端当前所连接的网络为无线局域网WLAN,则获取移动终端当前所连接的WLAN的网络质量分数;若移动终端当前所连接的WLAN的网络质量分数小于第一预设阈值,则提高检测移动终端当前所连接的WLAN的网络质量分数的频率;若在提高频率后检测到移动终端当前所连接的WLAN的网络质量分数小于第二预设阈值,则将移动终端当前所连接的WLAN切换至网络质量分数大于第三预设阈值的网络。通过本发明可解决当移动终端连接的WLAN的网络状况较差时,可能无法满足用户的上网需求的问题。

The present invention is applicable to the field of communication technology, and provides a network switching method, a mobile terminal and a computer-readable storage medium, the method comprising: detecting the network currently connected to the mobile terminal; if the network currently connected to the mobile terminal is a wireless local area network WLAN, obtaining the network quality score of the WLAN currently connected to the mobile terminal; if the network quality score of the WLAN currently connected to the mobile terminal is less than a first preset threshold, increasing the frequency of detecting the network quality score of the WLAN currently connected to the mobile terminal; if it is detected that the network quality score of the WLAN currently connected to the mobile terminal is less than a second preset threshold after increasing the frequency, switching the WLAN currently connected to the mobile terminal to a network whose network quality score is greater than a third preset threshold. The present invention can solve the problem that when the network condition of the WLAN connected to the mobile terminal is poor, the user's Internet access needs may not be met.

Description

Translated fromChinese
网络切换方法、移动终端及计算机可读存储介质Network switching method, mobile terminal and computer-readable storage medium

技术领域technical field

本发明属于通信技术领域,尤其涉及网络切换方法、移动终端及计算机可读存储介质。The invention belongs to the technical field of communication, and in particular relates to a network switching method, a mobile terminal and a computer-readable storage medium.

背景技术Background technique

随着通信技术的发展,大多数的移动终端(例如手机、平板电脑等)都可以通过连接无线局域网(Wireless Local Area Networks,WLAN)进行网络访问,例如手机在连接WLAN下进行网页浏览或者聊天等操作。然而,当移动终端连接的WLAN的网络状况较差时,可能无法满足用户的上网需求。With the development of communication technology, most mobile terminals (such as mobile phones, tablet computers, etc.) can access the network by connecting to a wireless local area network (Wireless Local Area Networks, WLAN), such as web browsing or chatting when a mobile phone is connected to a WLAN. operate. However, when the network condition of the WLAN to which the mobile terminal is connected is poor, it may not be able to meet the user's Internet access requirements.

故有必要提出一种新的技术方案,以解决上述技术问题。Therefore it is necessary to propose a new technical solution to solve the above technical problems.

发明内容Contents of the invention

有鉴于此,本发明实施例提供了一种网络切换方法、移动终端及计算机可读存储介质,以解决当移动终端连接的WLAN的网络状况较差时,可能无法满足用户的上网需求的问题。In view of this, embodiments of the present invention provide a network switching method, a mobile terminal, and a computer-readable storage medium to solve the problem that the mobile terminal may not be able to meet the user's Internet access requirements when the network condition of the WLAN connected to the mobile terminal is poor.

本发明实施例的第一方面提供了一种网络切换方法,所述网络切换方法包括:The first aspect of the embodiments of the present invention provides a network switching method, and the network switching method includes:

检测移动终端当前所连接的网络;Detect the network currently connected to the mobile terminal;

若所述移动终端当前所连接的网络为无线局域网WLAN,则获取所述移动终端当前所连接的WLAN的网络质量分数,其中,所述网络质量分数是评价网络质量的指标;If the network currently connected to the mobile terminal is a wireless local area network (WLAN), then obtain the network quality score of the WLAN currently connected to the mobile terminal, wherein the network quality score is an index for evaluating network quality;

若所述移动终端当前所连接的WLAN的网络质量分数小于第一预设阈值,则提高检测所述移动终端当前所连接的WLAN的网络质量分数的频率;If the network quality score of the WLAN currently connected to the mobile terminal is less than a first preset threshold, increasing the frequency of detecting the network quality score of the WLAN currently connected to the mobile terminal;

若在提高频率后检测到所述移动终端当前所连接的WLAN的网络质量分数小于第二预设阈值,则将所述移动终端当前所连接的WLAN切换至网络质量分数大于第三预设阈值的网络,其中,第二预设阈值小于第一预设阈值,第三预设阈值大于第一预设阈值。If it is detected that the network quality score of the WLAN currently connected to the mobile terminal is less than the second preset threshold after the frequency is increased, switch the WLAN currently connected to the mobile terminal to a network with a network quality score greater than the third preset threshold. network, wherein the second preset threshold is smaller than the first preset threshold, and the third preset threshold is larger than the first preset threshold.

本发明实施例的第二方面提供了一种移动终端,所述移动终端包括:A second aspect of the embodiments of the present invention provides a mobile terminal, where the mobile terminal includes:

网络检测模块,用于检测移动终端当前所连接的网络;A network detection module, configured to detect the network currently connected to the mobile terminal;

分数获取模块,用于若所述移动终端当前所连接的网络为无线局域网WLAN,则获取所述移动终端当前所连接的WLAN的网络质量分数,其中,所述网络质量分数是评价网络质量的指标;A score acquisition module, configured to acquire the network quality score of the WLAN currently connected to the mobile terminal if the network currently connected to the mobile terminal is a wireless local area network WLAN, wherein the network quality score is an index for evaluating network quality ;

频率提高模块,用于若所述移动终端当前所连接的WLAN的网络质量分数小于第一预设阈值,则提高检测所述移动终端当前所连接的WLAN的网络质量分数的频率;A frequency increasing module, configured to increase the frequency of detecting the network quality score of the WLAN currently connected to the mobile terminal if the network quality score of the WLAN currently connected to the mobile terminal is less than a first preset threshold;

网络切换模块,用于若在提高频率后检测到所述移动终端当前所连接的WLAN的网络质量分数小于第二预设阈值,则将所述移动终端当前所连接的WLAN切换至网络质量分数大于第三预设阈值的网络,其中,第二预设阈值小于第一预设阈值,第三预设阈值大于第一预设阈值。The network switching module is configured to switch the WLAN currently connected to the mobile terminal to a network quality score greater than or equal to the second preset threshold if it is detected after the frequency is increased A network with a third preset threshold, wherein the second preset threshold is smaller than the first preset threshold, and the third preset threshold is larger than the first preset threshold.

本发明实施例的第三方面提供了一种移动终端,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如上述第一方面所述网络切换方法的步骤。A third aspect of the embodiments of the present invention provides a mobile terminal, including a memory, a processor, and a computer program stored in the memory and operable on the processor, when the processor executes the computer program The steps of the network switching method described in the first aspect above are implemented.

本发明实施例的第四方面提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现如上述第一方面所述网络切换方法的步骤。A fourth aspect of the embodiments of the present invention provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the network switching method described in the above-mentioned first aspect is implemented. A step of.

本发明实施例与现有技术相比存在的有益效果是:本发明实施例通过在移动终端当前所连接的网络为WLAN时,获取所述移动终端当前所连接的WLAN的网络质量分数,将所述移动终端当前所连接的WLAN的网络质量分数与第一预设阈值进行比较,并在小于第一预设阈值时,提高检测所述移动终端当前所连接的WLAN的网络质量分数的频率,若提高频率后检测到所述移动终端当前所连接的WLAN的网络质量分数小于第二预设阈值,则将所述移动终端当前所连接的WLAN切换至网络质量分数大于第三预设阈值的网络。本发明实施例通过在移动终端当前所连接的WLAN的网络质量分数小于第二预设阈值时,将移动终端当前所连接的WLAN切换至网络质量分数大于第三预设阈值的网络,从而可实现在移动终端当前所连接的WLAN的网络状态较差时,将其切换至网络状态较好的其他网络,进而满足用户的上网需求。Compared with the prior art, the embodiment of the present invention has the following beneficial effects: the embodiment of the present invention acquires the network quality score of the WLAN currently connected to the mobile terminal when the network currently connected to the mobile terminal is a WLAN, and the obtained The network quality score of the WLAN currently connected to the mobile terminal is compared with a first preset threshold, and when it is less than the first preset threshold, the frequency of detecting the network quality score of the WLAN currently connected to the mobile terminal is increased, if After increasing the frequency, it is detected that the network quality score of the WLAN currently connected to the mobile terminal is less than the second preset threshold, then switching the WLAN currently connected to the mobile terminal to a network with a network quality score greater than the third preset threshold. In the embodiment of the present invention, when the network quality score of the WLAN currently connected to the mobile terminal is less than the second preset threshold, the WLAN currently connected to the mobile terminal is switched to a network with a network quality score greater than the third preset threshold, thereby achieving When the network status of the WLAN currently connected to the mobile terminal is poor, it is switched to another network with a better network status, so as to meet the user's Internet access requirements.

附图说明Description of drawings

为了更清楚地说明本发明实施例中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the accompanying drawings that need to be used in the descriptions of the embodiments or the prior art. Obviously, the accompanying drawings in the following descriptions are only of the present invention. For some embodiments, those skilled in the art can also obtain other drawings according to these drawings without paying creative efforts.

图1是本发明实施例一提供的网络切换方法的实现流程示意图;FIG. 1 is a schematic diagram of the implementation flow of the network switching method provided by Embodiment 1 of the present invention;

图2是本发明实施例二提供的网络切换方法的实现流程示意图;FIG. 2 is a schematic diagram of the implementation flow of the network switching method provided by Embodiment 2 of the present invention;

图3是本发明实施例三提供的移动终端的示意图;FIG. 3 is a schematic diagram of a mobile terminal provided by Embodiment 3 of the present invention;

图4是本发明实施例四提供的移动终端的示意图;FIG. 4 is a schematic diagram of a mobile terminal provided in Embodiment 4 of the present invention;

图5是本发明实施例五提供的移动终端的示意图。FIG. 5 is a schematic diagram of a mobile terminal provided by Embodiment 5 of the present invention.

具体实施方式detailed description

以下描述中,为了说明而不是为了限定,提出了诸如特定系统结构、技术之类的具体细节,以便透彻理解本发明实施例。然而,本领域的技术人员应当清楚,在没有这些具体细节的其它实施例中也可以实现本发明。在其它情况中,省略对众所周知的系统、装置、电路以及方法的详细说明,以免不必要的细节妨碍本发明的描述。In the following description, specific details such as specific system structures and technologies are presented for the purpose of illustration rather than limitation, so as to thoroughly understand the embodiments of the present invention. It will be apparent, however, to one skilled in the art that the invention may be practiced in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.

应当理解,当在本说明书和所附权利要求书中使用时,术语“包括”指示所描述特征、整体、步骤、操作、元素和/或组件的存在,但并不排除一个或多个其它特征、整体、步骤、操作、元素、组件和/或其集合的存在或添加。It should be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and/or components, but does not exclude one or more other features. , whole, step, operation, element, component and/or the presence or addition of a collection thereof.

还应当理解,在此本发明说明书中所使用的术语仅仅是出于描述特定实施例的目的而并不意在限制本发明。如在本发明说明书和所附权利要求书中所使用的那样,除非上下文清楚地指明其它情况,否则单数形式的“一”、“一个”及“该”意在包括复数形式。It should also be understood that the terminology used in the description of the present invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the present invention. As used in this specification and the appended claims, the singular forms "a", "an" and "the" are intended to include plural referents unless the context clearly dictates otherwise.

还应当进一步理解,在本发明说明书和所附权利要求书中使用的术语“和/或”是指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。It should also be further understood that the term "and/or" used in the description of the present invention and the appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations .

如在本说明书和所附权利要求书中所使用的那样,术语“如果”可以依据上下文被解释为“当...时”或“一旦”或“响应于确定”或“响应于检测到”。类似地,短语“如果确定”或“如果检测到[所描述条件或事件]”可以依据上下文被解释为意指“一旦确定”或“响应于确定”或“一旦检测到[所描述条件或事件]”或“响应于检测到[所描述条件或事件]”。As used in this specification and the appended claims, the term "if" may be construed as "when" or "once" or "in response to determining" or "in response to detecting" depending on the context . Similarly, the phrase "if determined" or "if [the described condition or event] is detected" may be construed, depending on the context, to mean "once determined" or "in response to the determination" or "once detected [the described condition or event] ]” or “in response to detection of [described condition or event]”.

具体实现中,本发明实施例中描述的移动终端包括但不限于诸如具有触摸敏感表面(例如,触摸屏显示器和/或触摸板)的移动电话、膝上型计算机或平板计算机之类的其它便携式设备。还应当理解的是,在某些实施例中,所述设备并非便携式通信设备,而是具有触摸敏感表面(例如,触摸屏显示器和/或触摸板)的台式计算机。In a specific implementation, the mobile terminals described in the embodiments of the present invention include but are not limited to other portable devices such as mobile phones, laptop computers or tablet computers with touch-sensitive surfaces (for example, touch screen displays and/or touch pads) . It should also be appreciated that in some embodiments, the device is not a portable communication device, but a desktop computer with a touch-sensitive surface (eg, a touchscreen display and/or a touchpad).

在接下来的讨论中,描述了包括显示器和触摸敏感表面的移动终端。然而,应当理解的是,移动终端可以包括诸如物理键盘、鼠标和/或控制杆的一个或多个其它物理用户接口设备。In the ensuing discussion, a mobile terminal including a display and a touch-sensitive surface is described. However, it should be understood that a mobile terminal may include one or more other physical user interface devices such as a physical keyboard, mouse and/or joystick.

移动终端支持各种应用程序,例如以下中的一个或多个:绘图应用程序、演示应用程序、文字处理应用程序、网站创建应用程序、盘刻录应用程序、电子表格应用程序、游戏应用程序、电话应用程序、视频会议应用程序、电子邮件应用程序、即时消息收发应用程序、锻炼支持应用程序、照片管理应用程序、数码相机应用程序、数字摄影机应用程序、web浏览应用程序、数字音乐播放器应用程序和/或数字视频播放器应用程序。The mobile terminal supports various applications such as one or more of the following: drawing application, presentation application, word processing application, website creation application, disk burning application, spreadsheet application, game application, telephone applications, video conferencing applications, email applications, instant messaging applications, exercise support applications, photo management applications, digital camera applications, digital video camera applications, web browsing applications, digital music player applications and/or digital video player applications.

可以在移动终端上执行的各种应用程序可以使用诸如触摸敏感表面的至少一个公共物理用户接口设备。可以在应用程序之间和/或相应应用程序内调整和/或改变触摸敏感表面的一个或多个功能以及终端上显示的相应信息。这样,终端的公共物理架构(例如,触摸敏感表面)可以支持具有对用户而言直观且透明的用户界面的各种应用程序。Various applications that can be executed on the mobile terminal can use at least one common physical user interface device, such as a touch-sensitive surface. One or more functions of the touch-sensitive surface and corresponding information displayed on the terminal may be adjusted and/or changed between applications and/or within the respective applications. In this way, the common physical architecture (eg, touch-sensitive surface) of the terminal can support various applications with a user interface that is intuitive and transparent to the user.

应理解,本实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本发明实施例的实施过程构成任何限定。It should be understood that the sequence numbers of the steps in this embodiment do not mean the order of execution, and the execution order of each process should be determined by its functions and internal logic, and should not constitute any limitation to the implementation process of the embodiment of the present invention.

为了说明本发明所述的技术方案,下面通过具体实施例来进行说明。In order to illustrate the technical solutions of the present invention, specific examples are used below to illustrate.

参见图1,是本发明实施例一提供的网络切换方法的实现流程示意图,该网络切换方法应用于移动终端,如图所示该网络切换方法可以包括以下步骤:Referring to FIG. 1, it is a schematic diagram of the implementation flow of the network switching method provided by Embodiment 1 of the present invention. The network switching method is applied to a mobile terminal. As shown in the figure, the network switching method may include the following steps:

步骤S101,检测移动终端当前所连接的网络。Step S101, detecting the network to which the mobile terminal is currently connected.

在本发明实施例中,在移动终端中通常设置有开启WLAN的开关和数据网络的开关,所述移动终端可以通过检测WLAN的开关状态和数据网络的开关状态,确定所述移动终端当前所连接的网络是WLAN还是数据网络。具体的,在检测到WLAN的开关状态为开启状态时,确定所述移动终端当前所连接的网络是WLAN,在检测到WLAN的开关状态关闭状态时,确定所述移动终端当前时刻未连接WLAN;在检测到数据网络的开关状态为开启状态时,确定所述移动终端当前所连接的网络为数据网络,在检测到数据网络的开关状态为关闭状态时,确定所述移动终端当前时刻未连接数据网络。需要说明的是,在检测到WLAN的开关状态和数据网络的开关状态均为开启状态时,可以预先设置网络访问优先级,例如设置WLAN的优先级高于数据网络,则在检测到WLAN的开关状态和数据网络的开关状态均为开启状态时,虽然移动终端显示同时连接了WLAN和数据网络,但实质上是优先使用连接的WLAN进行网络访问。In the embodiment of the present invention, a switch for turning on the WLAN and a switch for the data network are usually set in the mobile terminal, and the mobile terminal can determine the current connection of the mobile terminal by detecting the switch state of the WLAN and the switch state of the data network. Whether your network is a WLAN or a data network. Specifically, when it is detected that the switch state of the WLAN is on, it is determined that the network currently connected to the mobile terminal is WLAN, and when it is detected that the switch state of the WLAN is off, it is determined that the mobile terminal is not currently connected to the WLAN; When it is detected that the switch state of the data network is on, it is determined that the network currently connected to the mobile terminal is a data network, and when it is detected that the switch state of the data network is off, it is determined that the mobile terminal is not currently connected to the data network. network. It should be noted that when it is detected that the on/off state of the WLAN and the on/off state of the data network are both on, the priority of network access can be set in advance. For example, if the priority of the WLAN is set higher than that of the data network, the When both status and data network switch status are on, although the mobile terminal displays that both WLAN and data network are connected at the same time, in essence, the connected WLAN is preferentially used for network access.

其中,所述数据网络是指所述移动终端所安装的用户身份识别卡(SubscriberIdentification Module,SIM卡)所属的运营商所提供的网络,例如三大运营商联通、移动、电信通提供的网络,例如通用分组无线服务技术(General Packet Radio Service,GPRS)网络、第三代移动通信网络(即3G网络)、第四代移动通信网络(即4G网络)等,此处不作限定。所述WLAN包括但不限于无线保真(Wireless Fidelity,WiFi)网络。Wherein, the data network refers to the network provided by the operator to which the subscriber identification module (Subscriber Identification Module, SIM card) installed in the mobile terminal belongs, such as the network provided by the three major operators China Unicom, China Mobile, and China Telecom, For example, a general packet radio service (General Packet Radio Service, GPRS) network, a third-generation mobile communication network (ie, a 3G network), a fourth-generation mobile communication network (ie, a 4G network), etc., which are not limited herein. The WLAN includes but is not limited to a wireless fidelity (Wireless Fidelity, WiFi) network.

步骤S102,若所述移动终端当前所连接的网络为无线局域网WLAN,则获取所述移动终端当前所连接的WLAN的网络质量分数,其中,所述网络质量分数是评价网络质量的指标。Step S102, if the network currently connected to the mobile terminal is a wireless local area network (WLAN), obtain a network quality score of the WLAN currently connected to the mobile terminal, wherein the network quality score is an index for evaluating network quality.

在本发明实施例中,可以通过检测所述移动终端当前所连接WLAN链路的传输控制协议(Transmission Control Protocol,TCP)、超文本传输协议(HyperText TransferProtocol,HTTP)、丢包率和接收信号的强度指示(Received Signal StrengthIndication,RSSI)值等参数,将所获取的上述四个参数进行加权算法计算所述移动终端当前所连接的WLAN的网络质量分数,根据所述移动终端当前所连接的WLAN的网络质量分数可判断所述移动终端当前所连接的WLAN的网络状态。In the embodiment of the present invention, it is possible to detect the transmission control protocol (Transmission Control Protocol, TCP), hypertext transfer protocol (HyperText TransferProtocol, HTTP), packet loss rate and received signal of the WLAN link currently connected to the mobile terminal. Strength indication (Received Signal StrengthIndication, RSSI) value and other parameters, the weighted algorithm is used to calculate the network quality score of the WLAN currently connected to the mobile terminal by performing a weighted algorithm on the above four parameters obtained, and according to the network quality score of the WLAN currently connected to the mobile terminal The network quality score can determine the network status of the WLAN to which the mobile terminal is currently connected.

可选的,所述获取所述移动终端当前所连接的WLAN的网络质量分数包括:Optionally, the obtaining the network quality score of the WLAN currently connected to the mobile terminal includes:

获取所述移动终端当前所连接的WLAN的传输控制协议TCP连接状态、超文本传输协议HTTP连接状态、丢包率和接收信号的强度指示RSSI值;Obtain the transmission control protocol TCP connection status, hypertext transfer protocol HTTP connection status, packet loss rate and received signal strength indication RSSI value of the WLAN currently connected to the mobile terminal;

分别对所述移动终端当前所连接的WLAN的TCP连接状态、HTTP连接状态、丢包率和RSSI值打分,以获取所述移动终端当前所连接的WLAN的TCP连接状态的分数、HTTP连接状态的分数、丢包率的分数和RSSI值的分数;Score the TCP connection status, HTTP connection status, packet loss rate and RSSI value of the WLAN currently connected to the mobile terminal, so as to obtain the TCP connection status and HTTP connection status of the WLAN currently connected to the mobile terminal. Score, Score for Packet Loss Rate and Score for RSSI Value;

将所述移动终端当前所连接的WLAN的TCP连接状态的分数、HTTP连接状态的分数、丢包率的分数和RSSI值的分数进行累加,并将累加值作为所述移动终端当前所连接的WLAN的网络质量分数。Accumulate the score of the TCP connection state, the score of the HTTP connection state, the score of the packet loss rate and the score of the RSSI value of the WLAN currently connected to the mobile terminal, and use the accumulated value as the WLAN currently connected to the mobile terminal network quality score for .

在本发明实施例中,所述TCP连接状态包括TCP连接成功和TCP连接失败。在对所述移动终端当前所连接的WLAN的TCP连接状态进行打分时,可以预先设置在WLAN的TCP连接状态为TCP连接成功时对应的TCP连接状态的分数为第一预设分数,在WLAN的TCP连接状态为TCP连接失败时对应的TCP连接状态的分数为第二预设分数,且第一预设分数大于第二预设分数,在获取到所述移动终端当前所连接的WLAN的TCP连接状态之后,根据预先设置的WLAN的TCP连接状态的分数的对应关系,获取所述移动终端当前所连接的WLAN的TCP连接状态的分数。所述HTTP连接状态包括HTTP连接成功和HTTP连接失败。在对所述移动终端当前所连接的WLAN的HTTP连接状态进行打分时,可以预先设置在WLAN的HTTP连接状态为HTTP连接成功时对应的HTTP连接状态的分数为第三预设分数,在WLAN的HTTP连接状态为HTTP连接失败时对应的HTTP连接状态的分数为第四预设分数,且第三预设分数大于第四预设分数,在获取到所述移动终端当前所连接的WLAN的HTTP连接状态之后,根据预先设置的WLAN的HTTP连接状态的分数的对应关系,获取所述移动终端当前所连接的WLAN的HTTP连接状态的分数。在对所述移动终端当前所连接的WLAN的丢包率进行打分时,可以预先设置多个丢包率范围,并建立所述多个丢包率范围与丢包率的分数的对应关系,在获取到所述移动终端当前所连接的WLAN的丢包率之后,判断所述移动终端当前所连接的WLAN的丢包率所属的丢包率范围,并将该丢包率范围对应的丢包率的分数作为所述移动终端当前所连接的WLAN的丢包率的分数。在对所述移动终端当前所连接的WLAN的RSSI值进行打分时,可以预先设置多个RSSI值范围,并建立所述多个RSSI值范围与RSSI值的分数的对应关系,在获取到所述移动终端当前所连接的WLAN的RSSI值之后,判断所述移动终端当前所连接的WLAN的RSSI值所属RSSI值范围,并将该RSSI值范围对应的RSSI值的分数作为所述移动终端当前所连接的WLAN的RSSI值的分数。In the embodiment of the present invention, the TCP connection status includes TCP connection success and TCP connection failure. When scoring the TCP connection state of the WLAN currently connected to the mobile terminal, the TCP connection state of the WLAN can be preset to be the first preset score when the TCP connection state of the WLAN is a successful TCP connection. When the TCP connection status is TCP connection failure, the corresponding TCP connection status score is the second preset score, and the first preset score is greater than the second preset score. After obtaining the TCP connection of the WLAN currently connected to the mobile terminal After the status, the score of the TCP connection status of the WLAN currently connected to the mobile terminal is acquired according to the preset correspondence relationship of the scores of the TCP connection status of the WLAN. The HTTP connection status includes HTTP connection success and HTTP connection failure. When scoring the HTTP connection state of the WLAN currently connected to the mobile terminal, the HTTP connection state of the WLAN can be preset to be the third preset score when the HTTP connection state of the WLAN is a successful HTTP connection. When the HTTP connection status is HTTP connection failure, the corresponding HTTP connection status score is the fourth preset score, and the third preset score is greater than the fourth preset score. After obtaining the HTTP connection of the WLAN currently connected to the mobile terminal After the status, the score of the HTTP connection status of the WLAN to which the mobile terminal is currently connected is acquired according to the preset correspondence relationship of the scores of the HTTP connection status of the WLAN. When scoring the packet loss rate of the WLAN currently connected to the mobile terminal, a plurality of packet loss rate ranges may be preset, and a corresponding relationship between the multiple packet loss rate ranges and the scores of the packet loss rate is established. After obtaining the packet loss rate of the WLAN currently connected to the mobile terminal, determine the packet loss rate range to which the packet loss rate of the WLAN currently connected to the mobile terminal belongs, and calculate the packet loss rate corresponding to the packet loss rate range The score of is used as the score of the packet loss rate of the WLAN to which the mobile terminal is currently connected. When scoring the RSSI value of the WLAN currently connected to the mobile terminal, a plurality of RSSI value ranges may be preset, and a corresponding relationship between the plurality of RSSI value ranges and the scores of the RSSI values is established. After the RSSI value of the WLAN currently connected to the mobile terminal, determine that the RSSI value of the WLAN currently connected to the mobile terminal belongs to the RSSI value range, and use the fraction of the RSSI value corresponding to the RSSI value range as the current connected RSSI value of the mobile terminal. Fraction of the RSSI value of the WLAN.

步骤S103,若所述移动终端当前所连接的WLAN的网络质量分数小于第一预设阈值,则提高检测所述移动终端当前所连接的WLAN的网络质量分数的频率。Step S103, if the network quality score of the WLAN currently connected to the mobile terminal is less than a first preset threshold, increasing the frequency of detecting the network quality score of the WLAN currently connected to the mobile terminal.

在本发明实施例中,将所述移动终端当前所连接的WLAN的网络质量分数与第一预设阈值进行比较,以确定是否提高检测所述移动终端当前所连接的WLAN的网络质量分数的频率,并在所述移动终端当前所连接的WLAN的网络质量分数小于第一预设阈值时,提高检测所述移动终端当前所连接的WLAN的网络质量分数的频率,在所述移动终端当前所连接的WLAN的网络质量分数大于或等于第一预设阈值时,继续以原来的频率检测所述移动终端当前所连接的WLAN的网络质量分数。In the embodiment of the present invention, the network quality score of the WLAN currently connected to the mobile terminal is compared with a first preset threshold to determine whether to increase the frequency of detecting the network quality score of the WLAN currently connected to the mobile terminal , and when the network quality score of the WLAN currently connected to the mobile terminal is less than a first preset threshold, the frequency of detecting the network quality score of the WLAN currently connected to the mobile terminal is increased, and the network quality score of the WLAN currently connected to the mobile terminal is When the network quality score of the WLAN is greater than or equal to the first preset threshold, continue to detect the network quality score of the WLAN currently connected to the mobile terminal at the original frequency.

步骤S104,若在提高频率后检测到所述移动终端当前所连接的WLAN的网络质量分数小于第二预设阈值,则将所述移动终端当前所连接的WLAN切换至网络质量分数大于第三预设阈值的网络,其中,第二预设阈值小于第一预设阈值,第三预设阈值大于第一预设阈值。Step S104, if it is detected that the network quality score of the WLAN currently connected to the mobile terminal is less than a second preset threshold after the frequency is increased, switch the WLAN currently connected to the mobile terminal to a network quality score greater than a third preset threshold. A threshold-set network, wherein the second preset threshold is smaller than the first preset threshold, and the third preset threshold is larger than the first preset threshold.

在本发明实施例中,将所述移动终端当前所连接的WLAN的网络质量分数与第二预设阈值进行比较,若所述移动终端当前所连接的WLAN的网络质量分数小于第二预设阈值,则确定所述移动终端当前所连接的WLAN的网络状态较差,不能满足用户的上网需求;若所述移动终端当前所连接的WLAN的网络质量分数大于或等于第二预设阈值,则确定所述移动终端当前所连接的WLAN的网络状况较好,可以满足用户的上网需求。其中,所述第二预设阈值是用于判断所述移动终端当前所连接的WLAN是否能够满足用户的上网需求的标准值。所述第二预设阈值可以根据经验值进行设定。由于不同的上网需求需要的网络质量不同,也可以根据不同的上网需求设定所述第二预设阈值。例如不同的上网需求:观看视频和浏览网页,由于观看视频所需的网络质量要高于浏览网页所需的网络质量,那么在设置第二预设阈值时,观看视频对应的第二预设阈值必定大于浏览网页对应的第二预设阈值。In the embodiment of the present invention, the network quality score of the WLAN currently connected to the mobile terminal is compared with a second preset threshold, and if the network quality score of the WLAN currently connected to the mobile terminal is smaller than the second preset threshold , it is determined that the network status of the WLAN currently connected to the mobile terminal is poor and cannot meet the user's Internet access requirements; if the network quality score of the WLAN currently connected to the mobile terminal is greater than or equal to the second preset threshold, then determine The network condition of the WLAN to which the mobile terminal is currently connected is relatively good, which can meet the user's Internet access requirements. Wherein, the second preset threshold is a standard value for judging whether the WLAN to which the mobile terminal is currently connected can meet the user's Internet access requirements. The second preset threshold can be set according to empirical values. Since different network quality requirements are different for different Internet access requirements, the second preset threshold may also be set according to different Internet access requirements. For example, different Internet access requirements: watching videos and browsing webpages. Since the network quality required for watching videos is higher than that required for browsing webpages, when setting the second preset threshold, the second preset threshold corresponding to watching videos must be greater than the second preset threshold corresponding to browsing web pages.

为了将网络状态较差的所述移动终端当前所连接的WLAN切换至网络状态较好的其他网络,可以通过大于第二预设阈值的第三预设阈值来确定网络状态较好的其他网络。其中,所述网络质量分数大于第三预设阈值的网络包括但不限于网络质量分数大于第三预设阈值的WLAN和数据网络。In order to switch the currently connected WLAN of the mobile terminal with a poor network status to another network with a better network status, another network with a better network status may be determined by a third preset threshold greater than the second preset threshold. Wherein, the network whose network quality score is greater than the third preset threshold includes but not limited to a WLAN and a data network whose network quality score is greater than the third preset threshold.

本发明实施例通过在移动终端当前所连接的WLAN的网络质量分数小于第二预设阈值时,将移动终端当前所连接的WLAN切换至网络质量分数大于第三预设阈值的网络,从而可实现在移动终端当前所连接的WLAN的网络状态较差时,将其切换至网络状态较好的其他网络,进而满足用户的上网需求。In the embodiment of the present invention, when the network quality score of the WLAN currently connected to the mobile terminal is less than the second preset threshold, the WLAN currently connected to the mobile terminal is switched to a network with a network quality score greater than the third preset threshold, thereby achieving When the network status of the WLAN currently connected to the mobile terminal is poor, it is switched to another network with a better network status, so as to meet the user's Internet access requirements.

参见图2,是本发明实施例二提供的网络切换方法的实现流程示意图,该网络切换方法应用于移动终端,如图所示该网络切换方法可以包括以下步骤:Referring to FIG. 2, it is a schematic diagram of the implementation flow of the network switching method provided by Embodiment 2 of the present invention. The network switching method is applied to a mobile terminal. As shown in the figure, the network switching method may include the following steps:

步骤S201,检测移动终端当前所连接的网络。Step S201, detecting the network to which the mobile terminal is currently connected.

该步骤与步骤S101相同,具体可参见步骤S101的相关描述,在此不再赘述。This step is the same as step S101, for details, please refer to the relevant description of step S101, which will not be repeated here.

步骤S202,若所述移动终端当前所连接的网络为无线局域网WLAN,则获取所述移动终端当前所连接的WLAN的网络质量分数,其中,所述网络质量分数是评价网络质量的指标。Step S202, if the network currently connected to the mobile terminal is a wireless local area network (WLAN), obtain a network quality score of the WLAN currently connected to the mobile terminal, wherein the network quality score is an index for evaluating network quality.

该步骤与步骤S102相同,具体可参见步骤S102的相关描述,在此不再赘述。This step is the same as step S102, for details, please refer to the relevant description of step S102, which will not be repeated here.

步骤S203,若所述移动终端当前所连接的WLAN的网络质量分数小于第一预设阈值,则提高检测所述移动终端当前所连接的WLAN的网络质量分数的频率。Step S203, if the network quality score of the WLAN currently connected to the mobile terminal is less than a first preset threshold, increasing the frequency of detecting the network quality score of the WLAN currently connected to the mobile terminal.

该步骤与步骤S103相同,具体可参见步骤S103的相关描述,在此不再赘述。This step is the same as step S103, for details, please refer to the related description of step S103, which will not be repeated here.

步骤S204,若在提高频率后检测到所述移动终端当前所连接的WLAN的网络质量分数小于第二预设阈值,则检测预设范围内是否存在其他网络,其中,所述其他网络是指除所述移动终端当前所连接的WLAN之外的网络。Step S204, if it is detected that the network quality score of the WLAN currently connected to the mobile terminal is less than the second preset threshold after the frequency is increased, then detect whether there are other networks within the preset range, wherein the other networks refer to other networks except A network other than the WLAN to which the mobile terminal is currently connected.

其中,所述预设范围是可以保障所述移动终端能够搜索到其他网络且可以与搜索到的其他网络建立通信连接的距离范围。例如,以移动终端的当前位置为圆心,半径为10米的圆。Wherein, the preset range is a distance range that can ensure that the mobile terminal can search for other networks and establish a communication connection with the other networks found. For example, a circle with a radius of 10 meters takes the current location of the mobile terminal as the center.

所述其他网络包括但不限于除所述移动终端当前所连接的WLAN之外的WLAN和数据网络。The other networks include, but are not limited to, WLANs and data networks other than the WLAN to which the mobile terminal is currently connected.

步骤S205,若存在其他网络,则获取所述其他网络的网络质量分数。Step S205, if there are other networks, acquiring the network quality scores of the other networks.

需要说明的是,若所述其他网络为除所述移动终端当前所连接的WLAN之外的WLAN,则可以采用与步骤S102中获取所述移动终端当前所连接的WLAN的网络质量分数的相同算法计算所述其他WLAN。若所述其他网络为数据网络,则可以检测所述数据网络是否能够上网(例如,通过轮番检测所述数据网络的链路的TCP和HTTP来确定该数据网络是否能够上网),若能够上网,则将所述数据网络的网络质量分数设置为第四预设阈值,其中,所述第四预设阈值高于第三预设阈值;若不能够上网,则将所述数据网络的网络质量分数设置为第五预设阈值,且所述第五预设阈值小于第二预设阈值。It should be noted that, if the other network is a WLAN other than the WLAN currently connected to the mobile terminal, the same algorithm as that used to obtain the network quality score of the WLAN currently connected to the mobile terminal in step S102 can be used The other WLANs are calculated. If the other network is a data network, it can be detected whether the data network can access the Internet (for example, by detecting the TCP and HTTP of the link of the data network in turn to determine whether the data network can access the Internet), if it can access the Internet, Then the network quality score of the data network is set to a fourth preset threshold, wherein the fourth preset threshold is higher than the third preset threshold; if the Internet cannot be accessed, the network quality score of the data network is set to It is set as the fifth preset threshold, and the fifth preset threshold is smaller than the second preset threshold.

步骤S206,若所述其他网络中存在网络质量分数大于第三预设阈值的网络,则将所述移动终端当前所连接的WLAN切换至该网络。Step S206, if there is a network with a network quality score greater than a third preset threshold among the other networks, switching the WLAN currently connected to the mobile terminal to this network.

其中,所述第三预设阈值是用于判断其他网络的网络质量较好,即能够满足用户上网需求的标准值。可选的,用户可以根据实际需要设定第三预设阈值,在此不作限定,但第三预设阈值必须大于第一预设阈值。Wherein, the third preset threshold is a standard value for judging that the network quality of other networks is better, that is, it can meet the user's Internet access requirements. Optionally, the user may set a third preset threshold according to actual needs, which is not limited here, but the third preset threshold must be greater than the first preset threshold.

可选的,若所述其他网络中存在网络质量分数大于第三预设阈值的网络,则将所述移动终端当前所连接的WLAN切换至该网络包括:Optionally, if there is a network with a network quality score greater than a third preset threshold among the other networks, switching the WLAN currently connected to the mobile terminal to the network includes:

若所述其他网络中存在多个网络质量分数大于第三预设阈值的网络,则将所述移动终端当前所连接的WLAN切换至所述多个网络中网络质量分数最高的网络。If there are multiple networks with network quality scores greater than a third preset threshold among the other networks, switching the WLAN currently connected to the mobile terminal to the network with the highest network quality score among the multiple networks.

在本发明实施例中,若检测到所述其他网络中存在多个网络质量分数大于第三预设阈值的网络,则将所述多个网络的网络质量分数进行比较,从而确定所述多个网络中哪个网络的网络质量分数最高,并将所述移动终端当前所连接的WLAN切换至网络质量分数最高的网络。In the embodiment of the present invention, if it is detected that there are multiple networks with network quality scores greater than the third preset threshold among the other networks, the network quality scores of the multiple networks are compared to determine the network quality scores of the multiple networks. Which network in the network has the highest network quality score, and switches the WLAN currently connected to the mobile terminal to the network with the highest network quality score.

可选的,若所述其他网络中存在网络质量分数大于第三预设阈值的网络,则将所述移动终端当前所连接的WLAN切换至该网络包括:Optionally, if there is a network with a network quality score greater than a third preset threshold among the other networks, switching the WLAN currently connected to the mobile terminal to the network includes:

若所述其他网络中存在多个网络质量分数大于第三预设阈值的网络,则根据预设条件对所述多个网络进行排序,并按照排列顺序显示所述多个网络;If there are multiple networks with network quality scores greater than a third preset threshold among the other networks, sorting the multiple networks according to preset conditions, and displaying the multiple networks in an order of arrangement;

在检测到用户对所述多个网络的选择操作时,将所述移动终端当前所连接的WLAN切换至所选中的网络。When it is detected that the user selects the plurality of networks, the WLAN currently connected to the mobile terminal is switched to the selected network.

在本发明实施例中,若检测到所述其他网络中存在多个网络质量分数大于第三预设阈值的网络,则将所述多个网络的网络质量分数进行比较,根据预设条件(例如网络质量分数由高至低)对所述多个网络进行排序,并按照排列顺序在所述移动终端的屏幕上显示所述多个网络(例如显示所述多个网络中每个网络的名称和对应的网络质量分数),以便于用户查看所述多个网络,从所显示的所述多个网络中选择将所述移动终端当前所连接的WLAN切换至哪个网络。In the embodiment of the present invention, if it is detected that there are multiple networks with network quality scores greater than the third preset threshold among the other networks, the network quality scores of the multiple networks are compared, and according to preset conditions (such as network quality scores from high to low) to sort the multiple networks, and display the multiple networks on the screen of the mobile terminal according to the order of arrangement (for example, display the name and name of each network in the multiple networks Corresponding network quality score), so that the user can check the multiple networks and select which network to switch the WLAN currently connected to the mobile terminal from the multiple displayed networks.

可选的,所述网络切换方法还包括:Optionally, the network switching method also includes:

若所述其他网络中不存在网络质量分数大于第三预设阈值的网络,则提示用户修复所述移动终端当前所连接的WLAN。If there is no network with a network quality score greater than the third preset threshold among the other networks, the user is prompted to repair the WLAN to which the mobile terminal is currently connected.

示例性的,提示用户修复所述移动终端当前所连接的WLAN可以是提示用户所述移动终端当前所连接的WLAN不可上网,请检测所述移动终端当前所连接的WLAN的路由器。Exemplarily, prompting the user to repair the WLAN currently connected to the mobile terminal may be prompting the user that the WLAN currently connected to the mobile terminal cannot access the Internet, please detect the router of the WLAN currently connected to the mobile terminal.

本发明实施例通过在移动终端当前所连接的WLAN的网络质量分数小于第二预设阈值时,将移动终端当前所连接的WLAN切换至网络质量分数大于第三预设阈值的网络,从而可实现在移动终端当前所连接的WLAN的网络状态较差时,将其切换至网络状态较好的其他网络,进而满足用户的上网需求。In the embodiment of the present invention, when the network quality score of the WLAN currently connected to the mobile terminal is less than the second preset threshold, the WLAN currently connected to the mobile terminal is switched to a network with a network quality score greater than the third preset threshold, thereby achieving When the network status of the WLAN currently connected to the mobile terminal is poor, it is switched to another network with a better network status, so as to meet the user's Internet access requirements.

参见图3,是本发明实施例三提供的移动终端的示意图,为了便于说明,仅示出了与本发明实施例相关的部分。Referring to FIG. 3 , it is a schematic diagram of a mobile terminal provided by Embodiment 3 of the present invention. For ease of description, only parts related to the embodiment of the present invention are shown.

所述移动终端包括:The mobile terminal includes:

网络检测模块31,用于检测移动终端当前所连接的网络;A network detection module 31, configured to detect the network currently connected to the mobile terminal;

分数获取模块32,用于若所述移动终端当前所连接的网络为无线局域网WLAN,则获取所述移动终端当前所连接的WLAN的网络质量分数,其中,所述网络质量分数是评价网络质量的指标;A score acquisition module 32, configured to acquire the network quality score of the WLAN currently connected to the mobile terminal if the network currently connected to the mobile terminal is a wireless local area network (WLAN), wherein the network quality score is used to evaluate network quality index;

频率提高模块33,用于若所述移动终端当前所连接的WLAN的网络质量分数小于第一预设阈值,则提高检测所述移动终端当前所连接的WLAN的网络质量分数的频率;A frequency increasing module 33, configured to increase the frequency of detecting the network quality score of the WLAN currently connected to the mobile terminal if the network quality score of the WLAN currently connected to the mobile terminal is less than a first preset threshold;

网络切换模块34,用于若在提高频率后检测到所述移动终端当前所连接的WLAN的网络质量分数小于第二预设阈值,则将所述移动终端当前所连接的WLAN切换至网络质量分数大于第三预设阈值的网络,其中,第二预设阈值小于第一预设阈值,第三预设阈值大于第一预设阈值。The network switching module 34 is used to switch the WLAN currently connected to the mobile terminal to the network quality score if it is detected that the network quality score of the WLAN currently connected to the mobile terminal is less than a second preset threshold after the frequency is increased. A network larger than a third preset threshold, wherein the second preset threshold is smaller than the first preset threshold, and the third preset threshold is larger than the first preset threshold.

可选的,所述网络切换模块34包括:Optionally, the network switching module 34 includes:

检测单元341,用于若在提高频率后检测到所述移动终端当前所连接的WLAN的网络质量分数小于第二预设阈值,则检测预设范围内是否存在其他网络,其中,所述其他网络是指除所述移动终端当前所连接的WLAN之外的网络;The detection unit 341 is configured to detect whether there are other networks within the preset range if the network quality score of the WLAN currently connected to the mobile terminal is detected to be less than a second preset threshold after the frequency is increased, wherein the other networks refers to a network other than the WLAN to which the mobile terminal is currently connected;

获取单元342,用于若存在其他网络,则获取所述其他网络的网络质量分数;An obtaining unit 342, configured to obtain network quality scores of other networks if there are other networks;

切换单元343,用于若所述其他网络中存在网络质量分数大于第三预设阈值的网络,则将所述移动终端当前所连接的WLAN切换至该网络。The switching unit 343 is configured to switch the WLAN currently connected to the mobile terminal to the network if there is a network with a network quality score greater than a third preset threshold among the other networks.

可选的,所述切换单元343具体用于:Optionally, the switching unit 343 is specifically used for:

若所述其他网络中存在多个网络质量分数大于第三预设阈值的网络,则将所述移动终端当前所连接的WLAN切换至所述多个网络中网络质量分数最高的网络。If there are multiple networks with network quality scores greater than a third preset threshold among the other networks, switching the WLAN currently connected to the mobile terminal to the network with the highest network quality score among the multiple networks.

可选的,所述切换单元343包括:Optionally, the switching unit 343 includes:

显示子单元,用于若所述其他网络中存在多个网络质量分数大于第三预设阈值的网络,则根据预设条件对所述多个网络进行排序,并按照排列顺序显示所述多个网络;a display subunit, configured to sort the multiple networks according to preset conditions if there are multiple networks whose network quality scores are greater than the third preset threshold in the other networks, and display the multiple networks in order of arrangement. network;

切换子单元,用于在检测到用户对所述多个网络的选择操作时,将所述移动终端当前所连接的WLAN切换至所选中的网络。The switching subunit is configured to switch the WLAN currently connected to the mobile terminal to the selected network when a user's selection operation on the plurality of networks is detected.

可选的,所述网络切换模块34还包括:Optionally, the network switching module 34 also includes:

提示单元344,用于若所述其他网络中不存在网络质量分数大于第三预设阈值的网络,则提示用户修复所述移动终端当前所连接的WLAN。The prompting unit 344 is configured to prompt the user to restore the WLAN to which the mobile terminal is currently connected if there is no network with a network quality score greater than a third preset threshold among the other networks.

可选的,所述分数获取模块32包括:Optionally, the score acquisition module 32 includes:

参数获取单元321,用于获取所述移动终端当前所连接的WLAN的传输控制协议TCP连接状态、超文本传输协议HTTP连接状态、丢包率和接收信号的强度指示RSSI值;The parameter obtaining unit 321 is used to obtain the transmission control protocol TCP connection state, the hypertext transfer protocol HTTP connection state, the packet loss rate and the strength indicator RSSI value of the received signal of the WLAN currently connected to the mobile terminal;

打分单元322,用于分别对所述移动终端当前所连接的WLAN的TCP连接状态、HTTP连接状态、丢包率和RSSI值打分,以获取所述移动终端当前所连接的WLAN的TCP连接状态的分数、HTTP连接状态的分数、丢包率的分数和RSSI值的分数;The scoring unit 322 is used to score the TCP connection status, HTTP connection status, packet loss rate and RSSI value of the WLAN currently connected to the mobile terminal, so as to obtain the TCP connection status of the WLAN currently connected to the mobile terminal. score, score for HTTP connection status, score for packet loss rate, and score for RSSI value;

累加单元323,用于将所述移动终端当前所连接的WLAN的TCP连接状态的分数、HTTP连接状态的分数、丢包率的分数和RSSI值的分数进行累加,并将累加值作为所述移动终端当前所连接的WLAN的网络质量分数。The accumulating unit 323 is used to accumulate the scores of the TCP connection status, the HTTP connection status, the packet loss rate and the RSSI value of the WLAN currently connected to the mobile terminal, and use the accumulated value as the mobile terminal. The network quality score of the WLAN the terminal is currently connected to.

本发明实施例通过在移动终端当前所连接的WLAN的网络质量分数小于第二预设阈值时,将移动终端当前所连接的WLAN切换至网络质量分数大于第三预设阈值的网络,从而可实现在移动终端当前所连接的WLAN的网络状态较差时,将其切换至网络状态较好的其他网络,进而满足用户的上网需求。In the embodiment of the present invention, when the network quality score of the WLAN currently connected to the mobile terminal is less than the second preset threshold, the WLAN currently connected to the mobile terminal is switched to a network with a network quality score greater than the third preset threshold, thereby achieving When the network status of the WLAN currently connected to the mobile terminal is poor, it is switched to another network with a better network status, so as to meet the user's Internet access requirements.

图4是本发明实施例四提供的移动终端的示意图。如图所示的该移动终端可以包括:一个或多个处理器401(图中仅示出一个);一个或多个输入设备402(图中仅示出一个),一个或多个输出设备403(图中仅示出一个)和存储器404。上述处理器401、输入设备402、输出设备403和存储器404通过总线405连接。存储器404用于存储指令,处理器401用于执行存储器404存储的指令。其中:FIG. 4 is a schematic diagram of a mobile terminal provided by Embodiment 4 of the present invention. The mobile terminal as shown in the figure may include: one or more processors 401 (only one is shown in the figure); one or more input devices 402 (only one is shown in the figure), one or more output devices 403 (only one is shown in the figure) and memory 404 . The aforementioned processor 401 , input device 402 , output device 403 and memory 404 are connected through a bus 405 . The memory 404 is used to store instructions, and the processor 401 is used to execute the instructions stored in the memory 404 . in:

所述处理器401,用于检测移动终端当前所连接的网络;若所述移动终端当前所连接的网络为无线局域网WLAN,则通过所述输入设备402获取所述移动终端当前所连接的WLAN的网络质量分数,其中,所述网络质量分数是评价网络质量的指标;若所述移动终端当前所连接的WLAN的网络质量分数小于第一预设阈值,则提高检测所述移动终端当前所连接的WLAN的网络质量分数的频率;若在提高频率后检测到所述移动终端当前所连接的WLAN的网络质量分数小于第二预设阈值,则将所述移动终端当前所连接的WLAN切换至网络质量分数大于第三预设阈值的网络,其中,第二预设阈值小于第一预设阈值,第三预设阈值大于第一预设阈值。The processor 401 is configured to detect the network currently connected to the mobile terminal; if the network currently connected to the mobile terminal is a wireless local area network (WLAN), obtain the information of the WLAN currently connected to the mobile terminal through the input device 402 Network quality score, wherein, the network quality score is an indicator for evaluating network quality; if the network quality score of the WLAN currently connected to the mobile terminal is less than a first preset threshold, then improve the detection of the network quality score of the WLAN currently connected to the mobile terminal. The frequency of the network quality score of WLAN; if after increasing the frequency, it is detected that the network quality score of the WLAN currently connected to the mobile terminal is less than the second preset threshold, then the WLAN currently connected to the mobile terminal is switched to network quality A network with a score greater than a third preset threshold, wherein the second preset threshold is less than the first preset threshold, and the third preset threshold is greater than the first preset threshold.

可选的,所述处理器401,具体用于若在提高频率后检测到所述移动终端当前所连接的WLAN的网络质量分数小于第二预设阈值,则检测预设范围内是否存在其他网络,其中,所述其他网络是指除所述移动终端当前所连接的WLAN之外的网络;若存在其他网络,则通过所述输入设备402获取所述其他网络的网络质量分数;若所述其他网络中存在网络质量分数大于第三预设阈值的网络,则将所述移动终端当前所连接的WLAN切换至该网络。Optionally, the processor 401 is specifically configured to detect whether there are other networks within the preset range if the network quality score of the WLAN to which the mobile terminal is currently connected is detected to be less than a second preset threshold after the frequency is increased. , wherein, the other network refers to a network other than the WLAN currently connected to the mobile terminal; if there is another network, the network quality score of the other network is obtained through the input device 402; if the other network If there is a network with a network quality score greater than the third preset threshold in the network, the WLAN currently connected to the mobile terminal is switched to the network.

可选的,所述处理器401,具体用于若所述其他网络中存在多个网络质量分数大于第三预设阈值的网络,则将所述移动终端当前所连接的WLAN切换至所述多个网络中网络质量分数最高的网络。Optionally, the processor 401 is specifically configured to, if there are multiple networks with a network quality score greater than a third preset threshold in the other networks, switch the WLAN currently connected to the mobile terminal to the multiple networks. The network with the highest network quality score among the networks.

可选的,所述处理器401,具体用于若所述其他网络中存在多个网络质量分数大于第三预设阈值的网络,则根据预设条件对所述多个网络进行排序,并按照排列顺序通过所述输出设备403显示所述多个网络;在检测到用户对所述多个网络的选择操作时,将所述移动终端当前所连接的WLAN切换至所选中的网络。Optionally, the processor 401 is specifically configured to sort the multiple networks according to preset conditions if there are multiple networks with a network quality score greater than a third preset threshold among the other networks, and sort the multiple networks according to The arrangement sequence displays the plurality of networks through the output device 403; when the user's selection operation on the plurality of networks is detected, the WLAN currently connected to the mobile terminal is switched to the selected network.

可选的,所述处理器401,还用于若所述其他网络中不存在网络质量分数大于第三预设阈值的网络,则提示用户修复所述移动终端当前所连接的WLAN。Optionally, the processor 401 is further configured to prompt the user to repair the WLAN to which the mobile terminal is currently connected if there is no network with a network quality score greater than a third preset threshold among the other networks.

可选的,所述处理器401,具体用于通过所述输入设备402获取所述移动终端当前所连接的WLAN的传输控制协议TCP连接状态、超文本传输协议HTTP连接状态、丢包率和接收信号的强度指示RSSI值;分别对所述移动终端当前所连接的WLAN的TCP连接状态、HTTP连接状态、丢包率和RSSI值打分,以获取所述移动终端当前所连接的WLAN的TCP连接状态的分数、HTTP连接状态的分数、丢包率的分数和RSSI值的分数;将所述移动终端当前所连接的WLAN的TCP连接状态的分数、HTTP连接状态的分数、丢包率的分数和RSSI值的分数进行累加,并将累加值作为所述移动终端当前所连接的WLAN的网络质量分数。Optionally, the processor 401 is specifically configured to obtain, through the input device 402, the transmission control protocol TCP connection status, hypertext transfer protocol HTTP connection status, packet loss rate and reception The strength of the signal indicates the RSSI value; respectively scoring the TCP connection status, HTTP connection status, packet loss rate and RSSI value of the WLAN currently connected to the mobile terminal to obtain the TCP connection status of the WLAN currently connected to the mobile terminal The score of the score of the HTTP connection state, the score of the packet loss rate and the score of the RSSI value; the score of the TCP connection state, the score of the HTTP connection state, the score of the packet loss rate and the RSSI The scores of the values are accumulated, and the accumulated value is used as the network quality score of the WLAN to which the mobile terminal is currently connected.

所述存储器404,用于存储软件程序以及模块。所述处理器401通过运行存储在所述存储器404的软件程序以及模块,从而执行各种功能应用以及数据处理,以将所述移动终端当前所连接的WLAN切换至网络质量分数大于第三预设阈值的网络。The memory 404 is used to store software programs and modules. The processor 401 executes various functional applications and data processing by running the software programs and modules stored in the memory 404, so as to switch the WLAN currently connected to the mobile terminal to a network quality score greater than a third preset threshold network.

应当理解,在本发明实施例中,所述处理器401可以是中央处理单元(CentralProcessing Unit,CPU),该处理器还可以是其他通用处理器、数字信号处理器(DigitalSignal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。It should be understood that, in the embodiment of the present invention, the processor 401 may be a central processing unit (Central Processing Unit, CPU), and the processor may also be other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), dedicated Integrated Circuit (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor, or the processor may be any conventional processor, or the like.

输入设备402可以包括触控板、指纹采传感器(用于采集用户的指纹信息和指纹的方向信息)、麦克风、数据接收接口等。输出设备403可以包括显示器(LCD等)、扬声器、数据发送接口等。The input device 402 may include a touch panel, a fingerprint sensor (for collecting user's fingerprint information and fingerprint direction information), a microphone, a data receiving interface, and the like. The output device 403 may include a display (LCD, etc.), a speaker, a data sending interface, and the like.

该存储器404可以包括只读存储器和随机存取存储器,并向处理器401提供指令和数据。存储器404的一部分还可以包括非易失性随机存取存储器。例如,存储器404还可以存储设备类型的信息。The memory 404 may include read-only memory and random-access memory, and provides instructions and data to the processor 401 . A portion of memory 404 may also include non-volatile random access memory. For example, memory 404 may also store device type information.

具体实现中,本发明实施例中所描述的处理器401、输入设备402、输出设备403和存储器404可执行本发明实施例提供的网络切换方法的实施例中所描述的实现方式,也可执行实施例三所述移动终端中所描述的实现方式,在此不再赘述。In a specific implementation, the processor 401, the input device 402, the output device 403, and the memory 404 described in the embodiment of the present invention can execute the implementation described in the embodiment of the network switching method provided in the embodiment of the present invention, and can also execute The implementation described in the mobile terminal described in the third embodiment will not be repeated here.

图5是本发明实施例五提供的移动终端的示意图。如图5所示,该实施例的移动终端5包括:处理器50、存储器51以及存储在所述存储器51中并可在所述处理器50上运行的计算机程序52。所述处理器50执行所述计算机程序52时实现上述各个信息处理方法实施例中的步骤,例如图1所示的步骤S101至S104。或者,所述处理器50执行所述计算机程序52时实现上述各移动终端实施例中各模块/单元的功能,例如图3所示模块31至34的功能。FIG. 5 is a schematic diagram of a mobile terminal provided by Embodiment 5 of the present invention. As shown in FIG. 5 , the mobile terminal 5 of this embodiment includes: a processor 50 , a memory 51 , and a computer program 52 stored in the memory 51 and operable on the processor 50 . When the processor 50 executes the computer program 52, it implements the steps in the above embodiments of the information processing method, for example, steps S101 to S104 shown in FIG. 1 . Alternatively, when the processor 50 executes the computer program 52, functions of the modules/units in the above mobile terminal embodiments are implemented, for example, the functions of the modules 31 to 34 shown in FIG. 3 .

示例性的,所述计算机程序52可以被分割成一个或多个模块/单元,所述一个或者多个模块/单元被存储在所述存储器51中,并由所述处理器50执行,以完成本发明。所述一个或多个模块/单元可以是能够完成特定功能的一系列计算机程序指令段,该指令段用于描述所述计算机程序52在所述移动终端5中的执行过程。例如,所述计算机程序52可以被分割成网络检测模块、分数获取模块、频率提高模块以及网络切换模块,各模块具体功能如下:Exemplarily, the computer program 52 can be divided into one or more modules/units, and the one or more modules/units are stored in the memory 51 and executed by the processor 50 to complete this invention. The one or more modules/units may be a series of computer program instruction segments capable of accomplishing specific functions, and the instruction segments are used to describe the execution process of the computer program 52 in the mobile terminal 5 . For example, the computer program 52 can be divided into a network detection module, a score acquisition module, a frequency improvement module and a network switching module, and the specific functions of each module are as follows:

网络检测模块,用于检测移动终端当前所连接的网络;A network detection module, configured to detect the network currently connected to the mobile terminal;

分数获取模块,用于若所述移动终端当前所连接的网络为无线局域网WLAN,则获取所述移动终端当前所连接的WLAN的网络质量分数,其中,所述网络质量分数是评价网络质量的指标;A score acquisition module, configured to acquire the network quality score of the WLAN currently connected to the mobile terminal if the network currently connected to the mobile terminal is a wireless local area network WLAN, wherein the network quality score is an index for evaluating network quality ;

频率提高模块,用于若所述移动终端当前所连接的WLAN的网络质量分数小于第一预设阈值,则提高检测所述移动终端当前所连接的WLAN的网络质量分数的频率;A frequency increasing module, configured to increase the frequency of detecting the network quality score of the WLAN currently connected to the mobile terminal if the network quality score of the WLAN currently connected to the mobile terminal is less than a first preset threshold;

网络切换模块,用于若在提高频率后检测到所述移动终端当前所连接的WLAN的网络质量分数小于第二预设阈值,则将所述移动终端当前所连接的WLAN切换至网络质量分数大于第三预设阈值的网络,其中,第二预设阈值小于第一预设阈值,第三预设阈值大于第一预设阈值。The network switching module is configured to switch the WLAN currently connected to the mobile terminal to a network quality score greater than or equal to the second preset threshold if it is detected after the frequency is increased A network with a third preset threshold, wherein the second preset threshold is smaller than the first preset threshold, and the third preset threshold is larger than the first preset threshold.

可选的,所述网络切换模块包括:Optionally, the network switching module includes:

检测单元,用于若在提高频率后检测到所述移动终端当前所连接的WLAN的网络质量分数小于第二预设阈值,则检测预设范围内是否存在其他网络,其中,所述其他网络是指除所述移动终端当前所连接的WLAN之外的网络;The detection unit is configured to detect whether there are other networks within the preset range if the network quality score of the WLAN currently connected to the mobile terminal is detected to be less than a second preset threshold after the frequency is increased, wherein the other networks are Refers to a network other than the WLAN to which the mobile terminal is currently connected;

获取单元,用于若存在其他网络,则获取所述其他网络的网络质量分数;An obtaining unit, configured to obtain network quality scores of other networks if there are other networks;

切换单元,用于若所述其他网络中存在网络质量分数大于第三预设阈值的网络,则将所述移动终端当前所连接的WLAN切换至该网络。A switching unit, configured to switch the WLAN currently connected to the mobile terminal to the network if there is a network whose network quality score is greater than a third preset threshold among the other networks.

可选的,所述切换单元具体用于:Optionally, the switching unit is specifically used for:

若所述其他网络中存在多个网络质量分数大于第三预设阈值的网络,则将所述移动终端当前所连接的WLAN切换至所述多个网络中网络质量分数最高的网络。If there are multiple networks with network quality scores greater than a third preset threshold among the other networks, switching the WLAN currently connected to the mobile terminal to the network with the highest network quality score among the multiple networks.

可选的,所述切换单元包括:Optionally, the switching unit includes:

显示子单元,用于若所述其他网络中存在多个网络质量分数大于第三预设阈值的网络,则根据预设条件对所述多个网络进行排序,并按照排列顺序显示所述多个网络;a display subunit, configured to sort the multiple networks according to preset conditions if there are multiple networks whose network quality scores are greater than the third preset threshold in the other networks, and display the multiple networks in order of arrangement. network;

切换子单元,用于在检测到用户对所述多个网络的选择操作时,将所述移动终端当前所连接的WLAN切换至所选中的网络。The switching subunit is configured to switch the WLAN currently connected to the mobile terminal to the selected network when a user's selection operation on the plurality of networks is detected.

可选的,所述网络切换模块还包括:Optionally, the network switching module also includes:

提示单元,用于若所述其他网络中不存在网络质量分数大于第三预设阈值的网络,则提示用户修复所述移动终端当前所连接的WLAN。A prompting unit, configured to prompt the user to repair the WLAN to which the mobile terminal is currently connected if there is no network with a network quality score greater than a third preset threshold among the other networks.

可选的,所述分数获取模块包括:Optionally, the score acquisition module includes:

参数获取单元,用于获取所述移动终端当前所连接的WLAN的传输控制协议TCP连接状态、超文本传输协议HTTP连接状态、丢包率和接收信号的强度指示RSSI值;The parameter acquisition unit is used to acquire the transmission control protocol TCP connection status, hypertext transfer protocol HTTP connection status, packet loss rate and received signal strength indicator RSSI value of the WLAN currently connected to the mobile terminal;

打分单元,用于分别对所述移动终端当前所连接的WLAN的TCP连接状态、HTTP连接状态、丢包率和RSSI值打分,以获取所述移动终端当前所连接的WLAN的TCP连接状态的分数、HTTP连接状态的分数、丢包率的分数和RSSI值的分数;A scoring unit for scoring the TCP connection status, HTTP connection status, packet loss rate and RSSI value of the WLAN currently connected to the mobile terminal, so as to obtain the score of the TCP connection status of the WLAN currently connected to the mobile terminal , the score of HTTP connection status, the score of packet loss rate and the score of RSSI value;

累加单元,用于将所述移动终端当前所连接的WLAN的TCP连接状态的分数、HTTP连接状态的分数、丢包率的分数和RSSI值的分数进行累加,并将累加值作为所述移动终端当前所连接的WLAN的网络质量分数。The accumulating unit is used to accumulate the scores of the TCP connection status, the HTTP connection status, the packet loss rate and the RSSI value of the WLAN currently connected to the mobile terminal, and use the accumulated value as the mobile terminal The network quality score of the currently connected WLAN.

所述移动终端5可以是桌上型计算机、笔记本、掌上电脑及云端服务器等计算设备。所述移动终端可包括,但不仅限于,处理器50、存储器51。本领域技术人员可以理解,图5仅仅是移动终端5的示例,并不构成对移动终端5的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如所述移动终端还可以包括输入输出设备、网络接入设备、总线等。The mobile terminal 5 may be a computing device such as a desktop computer, a notebook, a palmtop computer, or a cloud server. The mobile terminal may include, but not limited to, a processor 50 and a memory 51 . Those skilled in the art can understand that FIG. 5 is only an example of the mobile terminal 5, and does not constitute a limitation to the mobile terminal 5. It may include more or less components than those shown in the figure, or combine certain components, or different components. , for example, the mobile terminal may further include an input and output device, a network access device, a bus, and the like.

所称处理器50可以是中央处理单元CPU,还可以是其他通用处理器、数字信号处理器DSP、专用集成电路ASIC、现成可编程门阵列FPGA或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。The so-called processor 50 can be a central processing unit CPU, and can also be other general-purpose processors, digital signal processors DSP, application-specific integrated circuits ASIC, off-the-shelf programmable gate array FPGA or other programmable logic devices, discrete gates or transistor logic devices , discrete hardware components, etc. A general-purpose processor may be a microprocessor, or the processor may be any conventional processor, or the like.

所述存储器51可以是所述移动终端5的内部存储单元,例如移动终端5的硬盘或内存。所述存储器51也可以是所述移动终端5的外部存储设备,例如所述移动终端5上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,所述存储器51还可以既包括所述移动终端5的内部存储单元也包括外部存储设备。所述存储器51用于存储所述计算机程序以及所述移动终端所需的其他程序和数据。所述存储器51还可以用于暂时地存储已经输出或者将要输出的数据。所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述移动终端的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。实施例中的各功能单元、模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中,上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。另外,各功能单元、模块的具体名称也只是为了便于相互区分,并不用于限制本申请的保护范围。上述系统中单元、模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。The memory 51 may be an internal storage unit of the mobile terminal 5 , such as a hard disk or memory of the mobile terminal 5 . The memory 51 can also be an external storage device of the mobile terminal 5, such as a plug-in hard disk equipped on the mobile terminal 5, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, flash memory card (Flash Card), etc. Further, the memory 51 may also include both an internal storage unit of the mobile terminal 5 and an external storage device. The memory 51 is used to store the computer program and other programs and data required by the mobile terminal. The memory 51 can also be used to temporarily store data that has been output or will be output. Those skilled in the art can clearly understand that for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used for illustration. In practical applications, the above-mentioned functions can be assigned to different functional units, Module completion means that the internal structure of the mobile terminal is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment may be integrated into one processing unit, or each unit may exist separately physically, or two or more units may be integrated into one unit, and the above-mentioned integrated units may adopt hardware It can also be implemented in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the present application. For the specific working process of the units and modules in the above system, reference may be made to the corresponding process in the foregoing method embodiments, and details will not be repeated here.

在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述或记载的部分,可以参见其它实施例的相关描述。In the above-mentioned embodiments, the descriptions of each embodiment have their own emphases, and for parts that are not detailed or recorded in a certain embodiment, refer to the relevant descriptions of other embodiments.

本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。Those skilled in the art can appreciate that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present invention.

在本发明所提供的实施例中,应该理解到,所揭露的移动终端和方法,可以通过其它的方式实现。例如,以上所描述的移动终端实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通讯连接可以是通过一些接口,装置或单元的间接耦合或通讯连接,可以是电性,机械或其它的形式。In the embodiments provided in the present invention, it should be understood that the disclosed mobile terminal and method can be implemented in other ways. For example, the mobile terminal embodiments described above are only illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components May be combined or may be integrated into another system, or some features may be omitted, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.

所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.

所述集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明实现上述实施例方法中的全部或部分流程,也可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一计算机可读存储介质中,该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。其中,所述计算机程序包括计算机程序代码,所述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质等。需要说明的是,所述计算机可读介质包含的内容可以根据司法管辖区内立法和专利实践的要求进行适当的增减,例如在某些司法管辖区,根据立法和专利实践,计算机可读介质不包括电载波信号和电信信号。If the integrated module/unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention realizes all or part of the processes in the methods of the above embodiments, and can also be completed by instructing related hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer When the program is executed by the processor, the steps in the above-mentioned various method embodiments can be realized. Wherein, the computer program includes computer program code, and the computer program code may be in the form of source code, object code, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM, Read-Only Memory) , Random Access Memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal, and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, computer-readable media Excludes electrical carrier signals and telecommunication signals.

以上所述实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围,均应包含在本发明的保护范围之内。The above-described embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: it can still carry out the foregoing embodiments Modifications to the technical solutions recorded in the examples, or equivalent replacement of some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the various embodiments of the present invention, and should be included in within the protection scope of the present invention.

Claims (14)

Translated fromChinese
1.一种网络切换方法,其特征在于,所述网络切换方法包括:1. A network switching method, characterized in that, the network switching method comprises:检测移动终端当前所连接的网络;Detect the network currently connected to the mobile terminal;若所述移动终端当前所连接的网络为无线局域网WLAN,则获取所述移动终端当前所连接的WLAN的网络质量分数,其中,所述网络质量分数是评价网络质量的指标;If the network currently connected to the mobile terminal is a wireless local area network (WLAN), then obtain the network quality score of the WLAN currently connected to the mobile terminal, wherein the network quality score is an index for evaluating network quality;若所述移动终端当前所连接的WLAN的网络质量分数小于第一预设阈值,则提高检测所述移动终端当前所连接的WLAN的网络质量分数的频率;If the network quality score of the WLAN currently connected to the mobile terminal is less than a first preset threshold, increasing the frequency of detecting the network quality score of the WLAN currently connected to the mobile terminal;若在提高频率后检测到所述移动终端当前所连接的WLAN的网络质量分数小于第二预设阈值,则将所述移动终端当前所连接的WLAN切换至网络质量分数大于第三预设阈值的网络,其中,第二预设阈值小于第一预设阈值,第三预设阈值大于第一预设阈值。If it is detected that the network quality score of the WLAN currently connected to the mobile terminal is less than the second preset threshold after the frequency is increased, switch the WLAN currently connected to the mobile terminal to a network with a network quality score greater than the third preset threshold. network, wherein the second preset threshold is smaller than the first preset threshold, and the third preset threshold is larger than the first preset threshold.2.如权利要求1所述的网络切换方法,其特征在于,若在提高频率后检测到所述移动终端当前所连接的WLAN的网络质量分数小于第二预设阈值,则将所述移动终端当前所连接的WLAN切换至网络质量分数大于第三预设阈值的网络包括:2. The network switching method according to claim 1, wherein if it is detected after the frequency is increased that the network quality score of the WLAN currently connected to the mobile terminal is less than a second preset threshold, then the mobile terminal Switching the currently connected WLAN to a network whose network quality score is greater than the third preset threshold includes:若在提高频率后检测到所述移动终端当前所连接的WLAN的网络质量分数小于第二预设阈值,则检测预设范围内是否存在其他网络,其中,所述其他网络是指除所述移动终端当前所连接的WLAN之外的网络;If it is detected that the network quality score of the WLAN currently connected to the mobile terminal is less than the second preset threshold after the frequency is increased, then it is detected whether there are other networks within the preset range, wherein the other networks refer to other networks other than the mobile terminal. A network other than the WLAN to which the terminal is currently connected;若存在其他网络,则获取所述其他网络的网络质量分数;If there are other networks, obtaining the network quality scores of the other networks;若所述其他网络中存在网络质量分数大于第三预设阈值的网络,则将所述移动终端当前所连接的WLAN切换至该网络。If there is a network with a network quality score greater than a third preset threshold among the other networks, switching the WLAN currently connected to the mobile terminal to the network.3.如权利要求2所述的网络切换方法,其特征在于,若所述其他网络中存在网络质量分数大于第三预设阈值的网络,则将所述移动终端当前所连接的WLAN切换至该网络包括:3. The network switching method according to claim 2, wherein, if there is a network with a network quality score greater than a third preset threshold in the other networks, the WLAN currently connected to the mobile terminal is switched to the network. The network includes:若所述其他网络中存在多个网络质量分数大于第三预设阈值的网络,则将所述移动终端当前所连接的WLAN切换至所述多个网络中网络质量分数最高的网络。If there are multiple networks with network quality scores greater than a third preset threshold among the other networks, switching the WLAN currently connected to the mobile terminal to the network with the highest network quality score among the multiple networks.4.如权利要求2所述的网络切换方法,其特征在于,若所述其他网络中存在网络质量分数大于第三预设阈值的网络,则将所述移动终端当前所连接的WLAN切换至该网络包括:4. The network switching method according to claim 2, wherein, if there is a network with a network quality score greater than a third preset threshold in the other networks, the WLAN currently connected to the mobile terminal is switched to the network. The network includes:若所述其他网络中存在多个网络质量分数大于第三预设阈值的网络,则根据预设条件对所述多个网络进行排序,并按照排列顺序显示所述多个网络;If there are multiple networks with network quality scores greater than a third preset threshold among the other networks, sorting the multiple networks according to preset conditions, and displaying the multiple networks in an order of arrangement;在检测到用户对所述多个网络的选择操作时,将所述移动终端当前所连接的WLAN切换至所选中的网络。When it is detected that the user selects the plurality of networks, the WLAN currently connected to the mobile terminal is switched to the selected network.5.如权利要求2所述的网络切换方法,其特征在于,所述网络切换方法还包括:5. The network switching method according to claim 2, further comprising:若所述其他网络中不存在网络质量分数大于第三预设阈值的网络,则提示用户修复所述移动终端当前所连接的WLAN。If there is no network with a network quality score greater than the third preset threshold among the other networks, the user is prompted to repair the WLAN to which the mobile terminal is currently connected.6.如权利要求1所述的网络切换方法,其特征在于,所述获取所述移动终端当前所连接的WLAN的网络质量分数包括:6. The network switching method according to claim 1, wherein the obtaining the network quality score of the WLAN currently connected to the mobile terminal comprises:获取所述移动终端当前所连接的WLAN的传输控制协议TCP连接状态、超文本传输协议HTTP连接状态、丢包率和接收信号的强度指示RSSI值;Obtain the transmission control protocol TCP connection status, hypertext transfer protocol HTTP connection status, packet loss rate and received signal strength indication RSSI value of the WLAN currently connected to the mobile terminal;分别对所述移动终端当前所连接的WLAN的TCP连接状态、HTTP连接状态、丢包率和RSSI值打分,以获取所述移动终端当前所连接的WLAN的TCP连接状态的分数、HTTP连接状态的分数、丢包率的分数和RSSI值的分数;Score the TCP connection status, HTTP connection status, packet loss rate and RSSI value of the WLAN currently connected to the mobile terminal, so as to obtain the TCP connection status and HTTP connection status of the WLAN currently connected to the mobile terminal. Score, Score for Packet Loss Rate and Score for RSSI Value;将所述移动终端当前所连接的WLAN的TCP连接状态的分数、HTTP连接状态的分数、丢包率的分数和RSSI值的分数进行累加,并将累加值作为所述移动终端当前所连接的WLAN的网络质量分数。Accumulate the score of the TCP connection state, the score of the HTTP connection state, the score of the packet loss rate and the score of the RSSI value of the WLAN currently connected to the mobile terminal, and use the accumulated value as the WLAN currently connected to the mobile terminal network quality score for .7.一种移动终端,其特征在于,所述移动终端包括:7. A mobile terminal, characterized in that the mobile terminal comprises:网络检测模块,用于检测移动终端当前所连接的网络;A network detection module, configured to detect the network currently connected to the mobile terminal;分数获取模块,用于若所述移动终端当前所连接的网络为无线局域网WLAN,则获取所述移动终端当前所连接的WLAN的网络质量分数,其中,所述网络质量分数是评价网络质量的指标;A score acquisition module, configured to acquire the network quality score of the WLAN currently connected to the mobile terminal if the network currently connected to the mobile terminal is a wireless local area network WLAN, wherein the network quality score is an index for evaluating network quality ;频率提高模块,用于若所述移动终端当前所连接的WLAN的网络质量分数小于第一预设阈值,则提高检测所述移动终端当前所连接的WLAN的网络质量分数的频率;A frequency increasing module, configured to increase the frequency of detecting the network quality score of the WLAN currently connected to the mobile terminal if the network quality score of the WLAN currently connected to the mobile terminal is less than a first preset threshold;网络切换模块,用于若在提高频率后检测到所述移动终端当前所连接的WLAN的网络质量分数小于第二预设阈值,则将所述移动终端当前所连接的WLAN切换至网络质量分数大于第三预设阈值的网络,其中,第二预设阈值小于第一预设阈值,第三预设阈值大于第一预设阈值。The network switching module is configured to switch the WLAN currently connected to the mobile terminal to a network quality score greater than or equal to the second preset threshold if it is detected after the frequency is increased A network with a third preset threshold, wherein the second preset threshold is smaller than the first preset threshold, and the third preset threshold is larger than the first preset threshold.8.如权利要求7所述的移动终端,其特征在于,所述网络切换模块包括:8. The mobile terminal according to claim 7, wherein the network switching module comprises:检测单元,用于若在提高频率后检测到所述移动终端当前所连接的WLAN的网络质量分数小于第二预设阈值,则检测预设范围内是否存在其他网络,其中,所述其他网络是指除所述移动终端当前所连接的WLAN之外的网络;The detection unit is configured to detect whether there are other networks within the preset range if the network quality score of the WLAN currently connected to the mobile terminal is detected to be less than a second preset threshold after the frequency is increased, wherein the other networks are Refers to a network other than the WLAN to which the mobile terminal is currently connected;获取单元,用于若存在其他网络,则获取所述其他网络的网络质量分数;An obtaining unit, configured to obtain network quality scores of other networks if there are other networks;切换单元,用于若所述其他网络中存在网络质量分数大于第三预设阈值的网络,则将所述移动终端当前所连接的WLAN切换至该网络。A switching unit, configured to switch the WLAN currently connected to the mobile terminal to the network if there is a network whose network quality score is greater than a third preset threshold among the other networks.9.如权利要求8所述的移动终端,其特征在于,所述切换单元具体用于:9. The mobile terminal according to claim 8, wherein the switching unit is specifically used for:若所述其他网络中存在多个网络质量分数大于第三预设阈值的网络,则将所述移动终端当前所连接的WLAN切换至所述多个网络中网络质量分数最高的网络。If there are multiple networks with network quality scores greater than a third preset threshold among the other networks, switching the WLAN currently connected to the mobile terminal to the network with the highest network quality score among the multiple networks.10.如权利要求8所述的移动终端,其特征在于,所述切换单元包括:10. The mobile terminal according to claim 8, wherein the switching unit comprises:显示子单元,用于若所述其他网络中存在多个网络质量分数大于第三预设阈值的网络,则根据预设条件对所述多个网络进行排序,并按照排列顺序显示所述多个网络;a display subunit, configured to sort the multiple networks according to preset conditions if there are multiple networks whose network quality scores are greater than the third preset threshold in the other networks, and display the multiple networks in order of arrangement. network;切换子单元,用于在检测到用户对所述多个网络的选择操作时,将所述移动终端当前所连接的WLAN切换至所选中的网络。The switching subunit is configured to switch the WLAN currently connected to the mobile terminal to the selected network when a user's selection operation on the plurality of networks is detected.11.如权利要求8所述的移动终端,其特征在于,所述网络切换模块还包括:11. The mobile terminal according to claim 8, wherein the network switching module further comprises:提示单元,用于若所述其他网络中不存在网络质量分数大于第三预设阈值的网络,则提示用户修复所述移动终端当前所连接的WLAN。A prompting unit, configured to prompt the user to repair the WLAN to which the mobile terminal is currently connected if there is no network with a network quality score greater than a third preset threshold among the other networks.12.如权利要求7所述的移动终端,其特征在于,所述分数获取模块包括:12. The mobile terminal according to claim 7, wherein the score obtaining module comprises:参数获取单元,用于获取所述移动终端当前所连接的WLAN的传输控制协议TCP连接状态、超文本传输协议HTTP连接状态、丢包率和接收信号的强度指示RSSI值;The parameter acquisition unit is used to acquire the transmission control protocol TCP connection status, hypertext transfer protocol HTTP connection status, packet loss rate and received signal strength indicator RSSI value of the WLAN currently connected to the mobile terminal;打分单元,用于分别对所述移动终端当前所连接的WLAN的TCP连接状态、HTTP连接状态、丢包率和RSSI值打分,以获取所述移动终端当前所连接的WLAN的TCP连接状态的分数、HTTP连接状态的分数、丢包率的分数和RSSI值的分数;A scoring unit for scoring the TCP connection status, HTTP connection status, packet loss rate and RSSI value of the WLAN currently connected to the mobile terminal, so as to obtain the score of the TCP connection status of the WLAN currently connected to the mobile terminal , the score of HTTP connection status, the score of packet loss rate and the score of RSSI value;累加单元,用于将所述移动终端当前所连接的WLAN的TCP连接状态的分数、HTTP连接状态的分数、丢包率的分数和RSSI值的分数进行累加,并将累加值作为所述移动终端当前所连接的WLAN的网络质量分数。The accumulating unit is used to accumulate the scores of the TCP connection status, the HTTP connection status, the packet loss rate and the RSSI value of the WLAN currently connected to the mobile terminal, and use the accumulated value as the mobile terminal The network quality score of the currently connected WLAN.13.一种移动终端,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现如权利要求1至6任一项所述网络切换方法的步骤。13. A mobile terminal, comprising a memory, a processor, and a computer program stored in the memory and operable on the processor, characterized in that, when the processor executes the computer program, the computer program according to claim Steps of the network switching method described in any one of 1 to 6.14.一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至6任一项所述网络切换方法的步骤。14. A computer-readable storage medium, the computer-readable storage medium storing a computer program, characterized in that, when the computer program is executed by a processor, the network switching method according to any one of claims 1 to 6 is implemented A step of.
CN201710693235.7A2017-08-142017-08-14 Network switching method, mobile terminal and computer-readable storage mediumPendingCN107295592A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201710693235.7ACN107295592A (en)2017-08-142017-08-14 Network switching method, mobile terminal and computer-readable storage medium

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201710693235.7ACN107295592A (en)2017-08-142017-08-14 Network switching method, mobile terminal and computer-readable storage medium

Publications (1)

Publication NumberPublication Date
CN107295592Atrue CN107295592A (en)2017-10-24

Family

ID=60105945

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201710693235.7APendingCN107295592A (en)2017-08-142017-08-14 Network switching method, mobile terminal and computer-readable storage medium

Country Status (1)

CountryLink
CN (1)CN107295592A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN107949024A (en)*2018-01-082018-04-20广东欧珀移动通信有限公司 AP switching control method and device, electronic device, and computer-readable storage medium
CN110267302A (en)*2019-06-182019-09-20广东以诺通讯有限公司A kind of raising VoWiFi business service quality method and system
CN112040520A (en)*2020-08-202020-12-04Oppo(重庆)智能科技有限公司Network switching method, device, terminal equipment and computer storage medium
CN114465932A (en)*2021-07-302022-05-10荣耀终端有限公司 TCP communication quality evaluation method, device and electronic equipment
CN115915318A (en)*2022-10-102023-04-04北京小米移动软件有限公司 Network switching method, device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN104902526A (en)*2015-05-252015-09-09广东欧珀移动通信有限公司 Method, device and mobile terminal for switching networks
CN106162768A (en)*2015-05-212016-11-23小米科技有限责任公司Wireless access point switching method and device
CN106211254A (en)*2016-06-152016-12-07维沃移动通信有限公司 A network connection method and mobile terminal
CN106231640A (en)*2016-07-292016-12-14北京小米移动软件有限公司Wireless access point switching method and device
CN106658588A (en)*2016-12-212017-05-10广东欧珀移动通信有限公司Network quality detection method and device and computer equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN106162768A (en)*2015-05-212016-11-23小米科技有限责任公司Wireless access point switching method and device
CN104902526A (en)*2015-05-252015-09-09广东欧珀移动通信有限公司 Method, device and mobile terminal for switching networks
CN106211254A (en)*2016-06-152016-12-07维沃移动通信有限公司 A network connection method and mobile terminal
CN106231640A (en)*2016-07-292016-12-14北京小米移动软件有限公司Wireless access point switching method and device
CN106658588A (en)*2016-12-212017-05-10广东欧珀移动通信有限公司Network quality detection method and device and computer equipment

Cited By (6)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN107949024A (en)*2018-01-082018-04-20广东欧珀移动通信有限公司 AP switching control method and device, electronic device, and computer-readable storage medium
CN110267302A (en)*2019-06-182019-09-20广东以诺通讯有限公司A kind of raising VoWiFi business service quality method and system
CN112040520A (en)*2020-08-202020-12-04Oppo(重庆)智能科技有限公司Network switching method, device, terminal equipment and computer storage medium
CN112040520B (en)*2020-08-202023-02-17Oppo(重庆)智能科技有限公司Network switching method, device, terminal equipment and computer storage medium
CN114465932A (en)*2021-07-302022-05-10荣耀终端有限公司 TCP communication quality evaluation method, device and electronic equipment
CN115915318A (en)*2022-10-102023-04-04北京小米移动软件有限公司 Network switching method, device and storage medium

Similar Documents

PublicationPublication DateTitle
CN107197489A (en) Network switching method, mobile terminal and computer-readable storage medium
CN107484190A (en) Network connection method, mobile terminal, and computer-readable storage medium
CN107360536A (en)Control method, terminal device and the computer-readable recording medium of terminal device
CN107295592A (en) Network switching method, mobile terminal and computer-readable storage medium
CN106250133A (en)message display method, device and equipment
CN108156508B (en)Barrage information processing method and device, mobile terminal, server and system
CN107222898A (en) Network switching method, mobile terminal and computer-readable storage medium
CN110442297A (en)Split screen display method, split screen display device and terminal equipment
CN107318140A (en) Network switching method, mobile terminal and computer-readable storage medium
CN110113496A (en)Screen display mode switching method and device and terminal equipment
CN107317928A (en)Information processing method, mobile terminal and computer-readable recording medium
CN108521460A (en)Information pushing method and device, mobile terminal and computer readable storage medium
CN109271266B (en) File transfer method, device and terminal device
CN107277896A (en) WiFi hotspot management method, device and terminal equipment
CN107969012B (en)Network access method, mobile terminal and computer readable storage medium
CN107995645A (en)Network connection method, mobile terminal and computer readable storage medium
CN107277877A (en) Network switching method, mobile terminal and computer-readable storage medium
CN107332988A (en) Information processing method, mobile terminal, and computer-readable storage medium
CN110874729B (en)Switching method and switching device for electronic red packet identification strategy and mobile terminal
CN108536512B (en) Interface switching method, device and terminal device
CN110874730B (en)Information processing method, information processing device and mobile terminal
CN110874277B (en) An electronic red envelope processing method, electronic red envelope processing device and mobile terminal
CN108509111B (en)Application notification method and device and terminal equipment
CN114385478A (en)Data acquisition reporting method and device, electronic equipment and storage medium
CN111242081A (en) Video detection method, target detection network training method, device and terminal equipment

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
RJ01Rejection of invention patent application after publication

Application publication date:20171024

RJ01Rejection of invention patent application after publication

[8]ページ先頭

©2009-2025 Movatter.jp