CN106535312A - Network connection control method and intelligent terminal - Google Patents
Network connection control method and intelligent terminal Download PDFInfo
- Publication number
- CN106535312A CN106535312A CN201611109332.9A CN201611109332A CN106535312A CN 106535312 A CN106535312 A CN 106535312A CN 201611109332 A CN201611109332 A CN 201611109332A CN 106535312 A CN106535312 A CN 106535312A
- Authority
- CN
- China
- Prior art keywords
- network connection
- content
- smart terminal
- mobile network
- network
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W52/00—Power management, e.g. Transmission Power Control [TPC] or power classes
- H04W52/02—Power saving arrangements
- H04W52/0209—Power saving arrangements in terminal devices
- H04W52/0261—Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level
- H04W52/0274—Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level by switching on or off the equipment or parts thereof
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72484—User interfaces specially adapted for cordless or mobile telephones wherein functions are triggered by incoming communication events
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Human Computer Interaction (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
本发明公开了一种网络连接控制方法和智能终端,其中,所述方法包括如下步骤:接收电话来电或第一短信,获取所述电话来电或第一短信的主叫号码和/或被叫号码,确定其是否满足验证条件;当满足所述验证条件时,获取所述电话来电的电话内容或所述第一短信的短信内容,确定其是否包含预设的标识内容;当包含所述标识内容时,利用智能终端中相应的电话号码身份开启移动网络连接。通过本发明的处理,能够通过对智能终端网络连接的控制,在保证其能及时进行通信的同时,有效节省电能和移动网络的数据流量,提升了使用智能终端时的用户体验。
The invention discloses a network connection control method and an intelligent terminal, wherein the method includes the following steps: receiving an incoming call or a first short message, and obtaining a calling number and/or a called number of the incoming call or the first short message , determine whether it satisfies the verification condition; when the verification condition is met, obtain the phone content of the incoming call or the short message content of the first short message, and determine whether it contains the preset identification content; when the identification content is included , use the corresponding phone number identity in the smart terminal to open the mobile network connection. Through the processing of the present invention, it is possible to effectively save electric energy and data flow of the mobile network by controlling the network connection of the smart terminal while ensuring that it can communicate in time, thereby improving the user experience when using the smart terminal.
Description
技术领域technical field
本发明涉及通信技术领域,具体而言,本发明涉及一种网络连接控制方法及智能终端。The present invention relates to the field of communication technologies, and in particular, the present invention relates to a network connection control method and an intelligent terminal.
背景技术Background technique
随着通信技术的发展和智能控制技术的普及,许多传统的电子产品也增加了智能终端的功能,比如过去通常只能用来看时间的手表,如今也可以通过智能手机或家庭网络与互联网相连,显示来电信息、Twitter和新闻feeds、天气信息等内容,因而近年来智能手表经历了从概念兴起到市场增容,成为倍受关注的智能终端产品。智能手表是具有信息处理能力,符合手表基本技术要求的手表,除指示时间之外,由于具有操作系统,其还可进行提醒、导航、校准、监测、人机交互等操作,另外部分智能手表具有定位、呼救、通话、短信、上网等功能;其显示方式包括指针、数字、图像等。With the development of communication technology and the popularization of intelligent control technology, many traditional electronic products have also added the function of smart terminals, such as watches that used to be used to tell the time, but now can also be connected to the Internet through smart phones or home networks , to display incoming call information, Twitter and news feeds, weather information, etc. Therefore, in recent years, smart watches have experienced the rise of concept to market expansion, and become a smart terminal product that has attracted much attention. A smart watch is a watch that has information processing capabilities and meets the basic technical requirements of watches. In addition to indicating time, it can also perform operations such as reminders, navigation, calibration, monitoring, and human-computer interaction due to its operating system. In addition, some smart watches have Functions such as positioning, calling for help, calling, text message, and surfing the Internet; its display methods include pointers, numbers, images, etc.
为了与云端服务器或其他终端保持正常的数据通信,智能终端常常需开启移动网络功能,以发送心跳包,维持长链接。此时后台的一些程序容易被唤醒运行,使用移动网络。In order to maintain normal data communication with cloud servers or other terminals, smart terminals often need to enable mobile network functions to send heartbeat packets and maintain long-term connections. At this time, some programs in the background are easy to wake up and run, using the mobile network.
然而,现有技术中至少存在以下问题:首先,被移动网络连接唤醒的后台程序进行的数据传输浪费了移动网络的数据流量;其次,长时间维持移动网络连接及其唤醒的后台程序又将消耗大量的电能,缩短了续航时间,影响用户在使用智能终端时的体验。而如果关闭移动网络,则智能终端又无法及时进行通信,影响其正常使用。However, there are at least the following problems in the prior art: first, the data transmission of the background program awakened by the mobile network connection wastes the data traffic of the mobile network; secondly, maintaining the mobile network connection and the background program awakened for a long time will consume A large amount of electric energy shortens the battery life and affects the user experience when using the smart terminal. And if the mobile network is turned off, the smart terminal cannot communicate in time, affecting its normal use.
发明内容Contents of the invention
本发明的目的在于针对以上存在的至少一方面不足,提供一种网络连接控制方法及智能终端,能够有效节省电能和数据流量。The object of the present invention is to address at least one aspect of the above shortcomings, and provide a network connection control method and an intelligent terminal, which can effectively save electric energy and data traffic.
为了实现上述目的,本发明采取如下若干方面的技术方案:In order to achieve the above object, the present invention takes the following technical solutions in several aspects:
第一方面,本发明实施例中提供了一种网络连接控制方法,包括如下步骤:In a first aspect, an embodiment of the present invention provides a network connection control method, including the following steps:
接收电话来电或第一短信,获取所述电话来电或第一短信的主叫号码和/或被叫号码,确定其是否满足验证条件;Receiving an incoming call or a first text message, obtaining the calling number and/or called number of the incoming call or first text message, and determining whether they meet the verification conditions;
当满足所述验证条件时,获取所述电话来电的电话内容或所述第一短信的短信内容,确定其是否包含预设的标识内容;When the verification condition is satisfied, obtain the phone content of the incoming call or the text message content of the first text message, and determine whether it contains a preset identification content;
当包含所述标识内容时,利用智能终端中相应的电话号码身份开启移动网络连接。When the identification content is included, the mobile network connection is opened by using the corresponding phone number identity in the smart terminal.
结合第一方面,本发明在第一方面的第一种实现方式中,所述验证条件包括:所述电话来电和/或所述第一短信的被叫号码为所述智能终端中已联入移动通信网络的在网电话号码。With reference to the first aspect, in the first implementation manner of the first aspect of the present invention, the verification condition includes: the called number of the incoming call and/or the first text message is connected to the smart terminal The online phone number of the mobile communication network.
结合第一方面的第一种实现方式,在第一方面的第二种实现方式中,所述在网电话号码用于通过其身份开启所述智能终端的移动网络连接。With reference to the first implementation manner of the first aspect, in a second implementation manner of the first aspect, the online phone number is used to enable the mobile network connection of the smart terminal through its identity.
结合第一方面的第一种实现方式,在第一方面的第三种实现方式中,所述验证条件还包括:所述验证条件还包括:所述电话来电和/或所述第一短信的主叫号码为存储于所述智能终端的预设电话号码,所述预设电话号码用于触发智能终端开启移动网络连接。With reference to the first implementation manner of the first aspect, in the third implementation manner of the first aspect, the verification condition further includes: the verification condition further includes: the phone call and/or the first short message The calling number is a preset phone number stored in the smart terminal, and the preset phone number is used to trigger the smart terminal to start a mobile network connection.
结合第一方面的第二种实现方式,在第一方面的第四种实现方式中,In combination with the second implementation of the first aspect, in the fourth implementation of the first aspect,
所述确定所述电话内容是否包含预设的标识内容的过程包括:The process of determining whether the phone content contains preset identification content includes:
接通所述电话来电,采集音频数据;Connecting the incoming call and collecting audio data;
根据所述音频数据进行语音识别和/或按键音识别,确定其是否包含预设的标识内容;所述标识内容用于触发智能终端开启移动网络连接。Carry out voice recognition and/or key tone recognition according to the audio data, and determine whether it contains preset identification content; the identification content is used to trigger the smart terminal to start a mobile network connection.
结合第一方面,在第一方面的第五种实现方式中,当包含所述标识内容时,开启所述智能终端的Wi-Fi网络连接。With reference to the first aspect, in a fifth implementation manner of the first aspect, when the identification content is included, the Wi-Fi network connection of the smart terminal is enabled.
结合第一方面的第五种实现方式,在第一方面的第六种实现方式中,当满足验证条件时,检测Wi-Fi网络连接是否可用;若是,则开启并优先使用Wi-Fi网络。In combination with the fifth implementation of the first aspect, in the sixth implementation of the first aspect, when the verification condition is met, it is detected whether the Wi-Fi network connection is available; if so, the Wi-Fi network is enabled and used preferentially.
结合第一方面的第六种实现方式,在第一方面的第七种实现方式中,其特征在于,开启Wi-Fi网络后,关闭移动网络。With reference to the sixth implementation of the first aspect, in the seventh implementation of the first aspect, it is characterized in that after the Wi-Fi network is turned on, the mobile network is turned off.
结合第一方面,或第一方面的第五种实现方式,在第一方面的第八种实现方式中,In combination with the first aspect, or the fifth implementation of the first aspect, in the eighth implementation of the first aspect,
还包括以下后续步骤:Also includes the following next steps:
判断所述移动网络连接是否满足智能终端的网络关闭条件;Judging whether the mobile network connection meets the network shutdown condition of the smart terminal;
当满足网络关闭条件时,关闭所述智能终端的移动网络。When the network closing condition is met, the mobile network of the smart terminal is closed.
结合第一方面的第八种实现方式,在第一方面的第九种实现方式中,开启移动网络连接或Wi-Fi网络连接后,计算所述移动网络连接或Wi-Fi网络连接的工作时长;In combination with the eighth implementation of the first aspect, in the ninth implementation of the first aspect, after the mobile network connection or the Wi-Fi network connection is turned on, the working hours of the mobile network connection or the Wi-Fi network connection are calculated ;
所述网络关闭条件包括:所述工作时长达到预设时间值;The network shutdown condition includes: the working time reaches a preset time value;
当满足网络关闭条件时,关闭所述智能终端的移动网络和/或所述Wi-Fi网络。When the network closing condition is met, the mobile network of the smart terminal and/or the Wi-Fi network are closed.
结合第一方面的第八种实现方式,在第一方面的第十种实现方式中,开启所述移动网络连接后,还包括如下步骤:In combination with the eighth implementation of the first aspect, in the tenth implementation of the first aspect, after enabling the mobile network connection, the following steps are further included:
接收第二短信,获取所述第二短信的内容;receiving a second short message, and acquiring the content of the second short message;
判断所述第二短信的内容是否满足智能终端的网络关闭条件;所述网络关闭条件还包括:所述第二短信的内容中包含预设的关闭标识内容,所述关闭标识内容用于触发智能终端关闭移动网络。Judging whether the content of the second short message satisfies the network closing condition of the smart terminal; the network closing condition also includes: the content of the second short message contains a preset closing identification content, and the closing identification content is used to trigger the smart terminal. The terminal turns off the mobile network.
结合第一方面的第九种实现方式,在第一方面的第十一种实现方式中,当满足网络关闭条件时,使所述智能设备维持开启移动网络连接的状态,并将所述移动网络连接的心跳包发送频率设置为预设频率值。With reference to the ninth implementation of the first aspect, in the eleventh implementation of the first aspect, when the network shutdown condition is met, the smart device is kept in the state of opening the mobile network connection, and the mobile network The heartbeat packet sending frequency of the connection is set to the preset frequency value.
结合第一方面的第十一种实现方式,在第一方面的第十二种实现方式中,所述预设频率值小于所述设置前的心跳包发送频率。With reference to the eleventh implementation manner of the first aspect, in a twelfth implementation manner of the first aspect, the preset frequency value is smaller than the heartbeat packet sending frequency before the setting.
第二方面,本发明实施例中提供了一种智能终端,包括:In a second aspect, an embodiment of the present invention provides a smart terminal, including:
第一接收单元和验证单元,所述第一接收单元被配置为接收电话来电和/或第一短信,所述验证单元被配置为获取所述电话来电或第一短信的主叫号码和/或被叫号码,确定其是否满足验证条件;A first receiving unit and a verification unit, the first receiving unit is configured to receive an incoming phone call and/or a first text message, and the verification unit is configured to obtain the calling number and/or of the incoming phone call or first text message The called number, to determine whether it meets the verification conditions;
识别单元,被配置为当满足验证条件时,获取所述电话来电的电话内容或所述第一短信的短信内容,确定其是否包含预设的标识内容;The identification unit is configured to acquire the content of the incoming call or the content of the first short message when the verification condition is satisfied, and determine whether it contains a preset identification content;
开启控制单元,被配置为当包含所述标识内容时,利用智能终端中相应的电话号码身份开启移动网络连接。The opening control unit is configured to use the corresponding phone number identity in the smart terminal to open the mobile network connection when the identification content is included.
第一接收单元第一接收单元结合第二方面,在第二方面的第一种实现方式中,所述验证单元的验证条件包括:所述电话来电和/或所述第一短信的被叫号码为所述智能终端中已联入移动通信网络的在网电话号码。The first receiving unit The first receiving unit combines the second aspect. In the first implementation of the second aspect, the verification condition of the verification unit includes: the called number of the incoming call and/or the first short message It is the online phone number of the smart terminal connected to the mobile communication network.
结合第二方面的第一种实现方式,在第二方面的第二种实现方式中,所述验证单元被配置为:所述在网电话号码用于通过其身份开启所述智能终端的移动网络连接。With reference to the first implementation of the second aspect, in the second implementation of the second aspect, the verification unit is configured to: use the online phone number to enable the mobile network of the smart terminal through its identity connect.
结合第二方面的第一种实现方式,在第二方面的第三种实现方式中,所述验证单元的验证条件还包括:所述电话来电和/或所述第一短信的主叫号码为存储于所述智能终端的预设电话号码,所述预设电话号码用于触发智能终端开启移动网络连接。With reference to the first implementation of the second aspect, in the third implementation of the second aspect, the verification condition of the verification unit further includes: the calling number of the incoming call and/or the first short message is A preset phone number stored in the smart terminal, the preset phone number is used to trigger the smart terminal to start a mobile network connection.
结合第二方面的第二种实现方式,在第二方面的第四种实现方式中,所述确定所述电话内容是否包含预设的标识内容的过程包括:With reference to the second implementation of the second aspect, in the fourth implementation of the second aspect, the process of determining whether the phone content contains preset identification content includes:
接通所述电话来电,采集音频数据;Connecting the incoming call and collecting audio data;
根据所述音频数据进行语音识别和/或按键音识别,确定其是否包含预设的标识内容;所述标识内容用于触发智能终端开启移动网络连接。Carry out voice recognition and/or key tone recognition according to the audio data, and determine whether it contains preset identification content; the identification content is used to trigger the smart terminal to start a mobile network connection.
标识内容标识内容结合第二方面,在第二方面的第五种实现方式中,所述识别单元还被配置为:当满足验证条件时,开启所述智能终端的Wi-Fi网络连接。Identification Content Identification Content With reference to the second aspect, in a fifth implementation manner of the second aspect, the identification unit is further configured to: when a verification condition is met, enable the Wi-Fi network connection of the smart terminal.
结合第二方面的第五种实现方式,在第二方面的第六种实现方式中,所述识别单元还被配置为:当包含所述标识内容时,检测Wi-Fi网络连接是否可用;若是,则开启并优先使用Wi-Fi网络连接。With reference to the fifth implementation of the second aspect, in the sixth implementation of the second aspect, the identification unit is further configured to: when the identification content is included, detect whether the Wi-Fi network connection is available; if , then enable and use the Wi-Fi network connection first.
结合第二方面的第六种实现方式,在第二方面的第七种实现方式中,识别单元还被配置为:开启Wi-Fi网络连接后,关闭移动网络连接。With reference to the sixth implementation manner of the second aspect, in a seventh implementation manner of the second aspect, the identification unit is further configured to: after enabling the Wi-Fi network connection, close the mobile network connection.
结合第二方面及其第一至第四的任意一种实现方式,在第二方面的第八种实现方式中,还包括:In combination with the second aspect and any one of the first to fourth implementations thereof, the eighth implementation of the second aspect further includes:
关闭判断单元,被配置为判断所述移动网络连接是否满足智能终端的网络关闭条件;The shutdown judging unit is configured to judge whether the mobile network connection satisfies the network shutdown condition of the smart terminal;
关闭控制单元,被配置为当满足网络关闭条件时,关闭所述智能终端的移动网络连接。The closing control unit is configured to close the mobile network connection of the smart terminal when the network closing condition is met.
结合第二方面或第二方面的第一种实现方式,在第二方面的第九种实现方式中,所述关闭判断单元还被配置为:开启移动网络连接或Wi-Fi网络连接后,计算所述数据网络连接或Wi-Fi网络连接的工作时长;With reference to the second aspect or the first implementation manner of the second aspect, in the ninth implementation manner of the second aspect, the shutdown judging unit is further configured to: after enabling the mobile network connection or the Wi-Fi network connection, calculate The working hours of said data network connection or Wi-Fi network connection;
所述网络关闭条件包括:所述工作时长达到预设时间值;The network shutdown condition includes: the working time reaches a preset time value;
当满足网络关闭条件时,关闭所述智能终端的移动网络和/或所述Wi-Fi网络。When the network closing condition is met, the mobile network of the smart terminal and/or the Wi-Fi network are closed.
结合第二方面的第八种实现方式,在第二方面的第十种实现方式中,还包括第二接收单元,被配置为:在开启所述移动网络连接后接收第二短信,获取所述第二短信的内容;With reference to the eighth implementation of the second aspect, in the tenth implementation of the second aspect, it further includes a second receiving unit configured to: receive a second short message after opening the mobile network connection, and obtain the the content of the second SMS;
所述关闭判断单元还被配置为判断所述第二短信的内容是否满足智能终端的网络关闭条件;所述关闭控制单元的网络关闭条件还包括:所述第二短信的内容中包含预设的关闭标识内容,所述关闭标识内容用于触发智能终端关闭移动网络连接。The closure judging unit is also configured to judge whether the content of the second short message satisfies the network closing condition of the smart terminal; the network closing condition of the closing control unit also includes: the content of the second short message contains a preset Closing identification content, the closing identification content is used to trigger the smart terminal to close the mobile network connection.
结合第二方面的第九种实现方式,在第二方面的第十一种实现方式中,所述关闭控制单元还被配置为:当满足网络关闭条件时,使所述智能设备维持开启移动网络连接的状态,并将所述移动网络连接的心跳包发送频率设置为预设频率值。With reference to the ninth implementation manner of the second aspect, in the eleventh implementation manner of the second aspect, the shutdown control unit is further configured to: enable the smart device to keep the mobile network turned on when the network shutdown condition is satisfied. state of the connection, and set the heartbeat packet sending frequency of the mobile network connection to a preset frequency value.
结合第二方面的第十一种实现方式,在第二方面的第十二种实现方式中,所述预设频率值小于所述设置前的心跳包发送频率。With reference to the eleventh implementation manner of the second aspect, in a twelfth implementation manner of the second aspect, the preset frequency value is smaller than the heartbeat packet sending frequency before the setting.
与现有技术相比较,本发明提供的技术方案至少具有如下优点:Compared with the prior art, the technical solution provided by the present invention has at least the following advantages:
本发明充分利用智能终端及其操作系统提供的特性,首先接收电话来电和/或第一短信,根据所述电话来电和/或第一短信的主叫号码、被叫号码判断其是否满足智能终端的验证条件,当满足验证条件时,获取所述电话来电的电话内容或所述第一短信的短信内容,确定其是否包含预设的标识内容,当包含所述标识内容时,利用智能终端中相应的电话号码身份开启移动网络连接,实现了移动网络连接的智能开启,保证智能终端的及时通信。在此基础上,还可以通过判断所述移动网络连接是否满足网络关闭条件;当满足网络关闭条件时,关闭所述智能终端的移动网络连接或降低心跳包的发送频率,从而能够有效节省电能和数据流量。The present invention makes full use of the characteristics provided by the intelligent terminal and its operating system. First, it receives an incoming call and/or the first short message, and judges whether it meets the requirements of the intelligent terminal according to the calling number and called number of the incoming call and/or the first short message. The verification condition, when the verification condition is met, obtain the phone content of the incoming call or the short message content of the first short message, determine whether it contains the preset identification content, and when the identification content is included, use the smart terminal The corresponding phone number identity opens the mobile network connection, realizes the intelligent opening of the mobile network connection, and ensures the timely communication of the intelligent terminal. On this basis, it is also possible to judge whether the mobile network connection meets the network shutdown condition; when the network shutdown condition is met, close the mobile network connection of the smart terminal or reduce the sending frequency of the heartbeat packet, thereby effectively saving power and Data Flow.
概括而言,本发明的实施,解决了智能终端为保证及时通信,浪费电能和数据流量的问题。通过对智能终端网络连接的智能开启,有效节省电能和数据流量并保证其能够及时通信,提升了使用智能终端时的用户体验。In a nutshell, the implementation of the present invention solves the problem of waste of electric energy and data flow in order to ensure timely communication of intelligent terminals. By intelligently opening the network connection of the smart terminal, it can effectively save power and data traffic and ensure timely communication, which improves the user experience when using the smart terminal.
然而,书不尽言,本发明附加的方面和优点将在下面的描述中部分给出,这些将从下面的描述中变得更加简明易懂,或通过本发明的实践了解到。However, this is not exhaustive, and additional aspects and advantages of the present invention will be set forth in part in the following description, and these will become more apparent from the following description, or learned by practice of the present invention.
附图说明Description of drawings
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings that need to be used in the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For those skilled in the art, other drawings can also be obtained based on these drawings without any creative effort.
图1为本发明中网络连接控制方法的一个实施例的流程示意图;FIG. 1 is a schematic flowchart of an embodiment of a network connection control method in the present invention;
图2为本发明中网络连接控制方法的一个实施例的流程示意图;FIG. 2 is a schematic flowchart of an embodiment of a network connection control method in the present invention;
图3为本发明中智能终端的一个实施例的结构示意图;FIG. 3 is a schematic structural diagram of an embodiment of an intelligent terminal in the present invention;
图4为本发明中智能终端的一个实施例的结构示意图。FIG. 4 is a schematic structural diagram of an embodiment of an intelligent terminal in the present invention.
具体实施方式detailed description
为了使本技术领域的人员更好地理解本发明方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述。In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention.
在本发明的说明书和权利要求书及上述附图中的描述的一些流程中,包含了按照特定顺序出现的多个操作,但是应该清楚了解,这些操作可以不按照其在本文中出现的顺序来执行或并行执行,操作的序号如S10、S11等,仅仅是用于区分开各个不同的操作,序号本身不代表任何的执行顺序。另外,这些流程可以包括更多或更少的操作,并且这些操作可以按顺序执行或并行执行。需要说明的是,本文中的“第一”、“第二”等描述,是用于区分不同的消息、设备、模块等,不代表先后顺序,也不限定“第一”和“第二”是不同的类型。In some processes described in the specification and claims of the present invention and the above-mentioned drawings, a plurality of operations appearing in a specific order are contained, but it should be clearly understood that these operations may not be performed in the order in which they appear herein Execution or parallel execution, the sequence number of the operation, such as S10, S11, etc., is only used to distinguish different operations, and the sequence number itself does not represent any execution sequence. Additionally, these processes can include more or fewer operations, and these operations can be performed sequentially or in parallel. It should be noted that the descriptions of "first" and "second" in this article are used to distinguish different messages, devices, modules, etc. are different types.
本领域普通技术人员可以理解,除非特意声明,这里使用的单数形式“一”、“一个”、“所述”和“该”也可包括复数形式。应该进一步理解的是,本发明的说明书中使用的措辞“包括”是指存在所述特征、整数、步骤、操作、元件和/或组件,但是并不排除存在或添加一个或多个其他特征、整数、步骤、操作、元件、组件和/或它们的组。应该理解,当我们称元件被“连接”或“耦接”到另一元件时,它可以直接连接或耦接到其他元件,或者也可以存在中间元件。此外,这里使用的“连接”或“耦接”可以包括无线连接或无线耦接。这里使用的措辞“和/或”包括一个或更多个相关联的列出项的全部或任一单元和全部组合。Those of ordinary skill in the art will understand that the singular forms "a", "an", "said" and "the" used herein may also include plural forms unless otherwise stated. It should be further understood that the word "comprising" used in the description of the present invention refers to the presence of said features, integers, steps, operations, elements and/or components, but does not exclude the presence or addition of one or more other features, Integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Additionally, "connected" or "coupled" as used herein may include wireless connection or wireless coupling. The expression "and/or" used herein includes all or any elements and all combinations of one or more associated listed items.
本领域普通技术人员可以理解,除非另外定义,这里使用的所有术语(包括技术术语和科学术语),具有与本发明所属领域中的普通技术人员的一般理解相同的意义。还应该理解的是,诸如通用字典中定义的那些术语,应该被理解为具有与现有技术的上下文中的意义一致的意义,并且除非像这里一样被特定定义,否则不会用理想化或过于正式的含义来解释。Those of ordinary skill in the art can understand that, unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meanings as commonly understood by those of ordinary skill in the art to which this invention belongs. It should also be understood that terms, such as those defined in commonly used dictionaries, should be understood to have meanings consistent with their meaning in the context of the prior art, and unless specifically defined as herein, are not intended to be idealized or overly Formal meaning to explain.
本领域普通技术人员可以理解,这里所使用的“终端”、“智能终端”既包括无线信号接收器的设备,其仅具备无发射能力的无线信号接收器的设备,又包括接收和发射硬件的设备,其具有能够在双向通信链路上,进行双向通信的接收和发射硬件的设备。这种设备可以包括:蜂窝或其他通信设备,其具有单线路显示器或多线路显示器或没有多线路显示器的蜂窝或其他通信设备;PCS(Personal Communications Service,个人通信系统),其可以组合语音、数据处理、传真和/或数据通信能力;PDA(Personal Digital Assistant,个人数字助理),其可以包括射频接收器、寻呼机、互联网/内联网访问、网络浏览器、记事本、日历和/或GPS(Global Positioning System,全球定位系统)接收器;常规膝上型和/或掌上型计算机或其他设备,其具有和/或包括射频接收器的常规膝上型和/或掌上型计算机或其他设备。这里所使用的“终端”、“智能终端”可以是便携式、可运输、安装在交通工具(航空、海运和/或陆地)中的,或者适合于和/或配置为在本地运行,和/或以分布形式,运行在地球和/或空间的任何其他位置运行。这里所使用的“终端”、“智能终端”还可以是通信终端、上网终端、音乐/视频播放终端,例如可以是智能手表、PDA、POS(Point of Sales,销售终端)、MID(Mobile Internet Device,移动互联网设备)和/或具有音乐/视频播放功能的移动电话,也可以是智能电视、机顶盒等设备。Those of ordinary skill in the art can understand that the "terminal" and "smart terminal" used here not only include wireless signal receiver equipment, which only has wireless signal receiver equipment without transmission capabilities, but also include receiving and transmitting hardware. A device having receive and transmit hardware capable of bi-directional communication over a bi-directional communication link. Such equipment may include: cellular or other communication equipment, which has a single-line display or a multi-line display or a cellular or other communication equipment without a multi-line display; PCS (Personal Communications Service, personal communication system), which can combine voice, data Processing, facsimile and/or data communication capabilities; PDA (Personal Digital Assistant, Personal Digital Assistant), which may include radio frequency receiver, pager, Internet/Intranet access, web browser, notepad, calendar and/or GPS (Global Positioning System (Global Positioning System) receiver; a conventional laptop and/or palmtop computer or other device having and/or including a radio frequency receiver. As used herein, a "terminal", "smart terminal" may be portable, transportable, installed in a vehicle (air, sea, and/or land), or adapted and/or configured to operate locally, and/or In distributed form, the operation operates at any other location on Earth and/or in space. The "terminal" and "smart terminal" used here can also be a communication terminal, an Internet terminal, a music/video player terminal, such as a smart watch, PDA, POS (Point of Sales, sales terminal), MID (Mobile Internet Device , mobile Internet device) and/or a mobile phone with music/video playback function, or smart TV, set-top box and other devices.
本领域普通技术人员可以理解,本发明所使用的“电话号码身份”包括用户身份识别模块(Subscriber Identity Module,简称SIM卡)所表征的用户身份,用于和通信网络中与其他用户进行区分。SIM卡是一种接触式IC卡,里面储存了SIM卡序列号、国际移动用户识别码(IMSI)、鉴权密钥(Ki)、PIN密码、PUK密码、运营商服务菜单、短信和通讯录。运营商通过智能终端的SIM卡成功鉴别其用户身份后,使SIM卡对应的电话号码联入移动通信网络,并依据该用户身份为智能终端提供电话、短信和移动网络等服务。由于通常情况下电话号码与SIM卡一一对应,所以“电话号码身份”亦可以指代“用户身份”,当电话号码联入移动通信网络时,可称其为“在网电话号码”;电话号码包括固定电话号码和手机(移动电话)号码。Those of ordinary skill in the art can understand that the "telephone number identity" used in the present invention includes the user identity represented by the Subscriber Identity Module (SIM card for short), which is used to distinguish from other users in the communication network. The SIM card is a contact IC card, which stores the SIM card serial number, International Mobile Subscriber Identity (IMSI), authentication key (Ki), PIN password, PUK password, operator service menu, SMS and address book . After successfully identifying the user's identity through the SIM card of the smart terminal, the operator connects the phone number corresponding to the SIM card to the mobile communication network, and provides services such as phone calls, text messages, and mobile networks for the smart terminal based on the user's identity. Due to the one-to-one correspondence between phone numbers and SIM cards under normal circumstances, "phone number identity" can also refer to "user identity". When a phone number is connected to a mobile communication network, it can be called an "online phone number"; Numbers include landline numbers and mobile (mobile) numbers.
本领域普通技术人员可以理解,本发明所使用的“移动网络”包括智能终端通过数据通信实现无线网络连接的方式,如3G网络、4G网络等。移动网络的制式包括TD-SCDMA、WCDMA、CDMA2000、TD-LTE和FDD-LTE等。通常开启移动网络连接进行网络通信需要按其使用的数据流量计费,数据流量的单位转换关系为:1024Byte=1KB;1024KB=1MB;1024MB=1GB;1024GB=1TB。Those of ordinary skill in the art can understand that the "mobile network" used in the present invention includes a way for smart terminals to realize wireless network connection through data communication, such as 3G network, 4G network and so on. Mobile network standards include TD-SCDMA, WCDMA, CDMA2000, TD-LTE, and FDD-LTE. Usually, the mobile network connection needs to be charged according to the data flow used for network communication. The unit conversion relationship of data flow is: 1024Byte=1KB; 1024KB=1MB; 1024MB=1GB; 1024GB=1TB.
本领域普通技术人员可以理解,本发明所使用的“主叫号码”为发起电话来电呼叫和/或发送短信的用户身份的电话号码;“被叫号码”为接收电话来电呼叫和/或接收短信的的用户身份的电话号码。Those of ordinary skill in the art can understand that the "calling number" used in the present invention is the phone number of the user who initiates the incoming call and/or sends the text message; The phone number of the user ID for .
本发明所述方法主要适用于智能手表、智能手机终端或者智能平板终端等具有通信功能的终端,不限制于其操作系统的类型,可以是Android、IOS、WP、塞班等操作系统。The method of the present invention is mainly applicable to terminals with communication functions such as smart watches, smart phone terminals or smart tablet terminals, and is not limited to the type of operating system, which can be Android, IOS, WP, Symbian and other operating systems.
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention, wherein the same or similar symbols throughout represent the same or similar elements or elements with the same or similar functions. Apparently, the described embodiments are only some of the embodiments of the present invention, but not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative efforts fall within the protection scope of the present invention.
请参阅图1,本发明的一种网络连接控制方法,包括如下步骤S11-S13:Referring to Fig. 1, a network connection control method of the present invention includes the following steps S11-S13:
步骤S11,接收电话来电和/或第一短信,获取所述电话来电或第一短信的主叫号码和/或被叫号码,确定其是否满足验证条件。Step S11 , receiving an incoming phone call and/or a first short message, obtaining the calling number and/or called number of the incoming phone call or first short message, and determining whether it satisfies a verification condition.
由于在信令系统中,发起电话来电呼叫或发送第一短信的主叫智能终端将其SIM卡的主叫IMSI串号与被叫号码一起上行传输到移动通信网络的运营商,运营商通过所述IMSI查找到主叫号码,通过被叫号码查找到被叫IMSI串号,后通过被叫IMSI查找到对应的被叫智能终端,并将主叫号码下行传输至被叫智能终端。而且在Android系统中,短信信息被保存于数据库中,可通过Content Provider类来读取短信信息,包括被叫号码、短信中心号码和短信的内容等。Because in the signaling system, the calling intelligent terminal that initiates an incoming call or sends the first short message transmits the calling IMSI serial number of its SIM card together with the called number to the operator of the mobile communication network, the operator through the The IMSI finds the calling number, finds the called IMSI serial number through the called number, and then finds the corresponding called smart terminal through the called IMSI, and downlinks the calling number to the called smart terminal. And in the Android system, the short message information is stored in the database, and the short message information can be read through the Content Provider class, including the called number, the short message center number and the content of the short message.
因此智能终端接收电话来电和/或第一短信后,能够获取所述电话来电和/或第一短信的主叫电话、被叫电话和短信内容等信息。从而根据上述信息,对所述电话来电和/或第一短信是否满足智能终端的验证条件进行判断。Therefore, after receiving the incoming phone call and/or the first short message, the smart terminal can obtain information such as the calling phone number, the called phone number, and the content of the short message of the incoming phone call and/or the first short message. Therefore, according to the above information, it is judged whether the incoming call and/or the first short message satisfy the verification condition of the smart terminal.
本发明优选如下两种可能的验证条件,以在所述电话来电和/或第一短信满足验证条件时进行智能终端的网络连接控制:In the present invention, the following two possible verification conditions are preferred, so as to control the network connection of the intelligent terminal when the incoming call and/or the first short message meet the verification conditions:
其一,所述电话来电和/或所述第一短信的被叫号码为所述智能终端中已联入移动通信网络的在网电话号码。Firstly, the called number of the incoming call and/or the first short message is an online phone number connected to the mobile communication network in the smart terminal.
其二,所述电话来电和/或所述第一短信的主叫号码为存储于所述智能终端的预设电话号码,所述预设电话号码用于触发智能终端开启移动网络连接。Second, the calling number of the incoming call and/or the first short message is a preset phone number stored in the smart terminal, and the preset phone number is used to trigger the smart terminal to start a mobile network connection.
智能终端开机或检测到SIM卡后,将从SIM卡中读取IMSI和TMSI;智能终端联入移动通信网络时,把IMSI或TMSI发送给服务提供者(运营商),运营商通过在数据库中检索IMSI或TMSI来判断其对应的电话号码身份是否是合法,并获得这个IMSI所对应的电话号码和鉴权密钥Ki。随后,运营商会任意生成一个128bit的RAND(随机数),并把这个RAND发送给手机。同时,运营商使用这个RAND和Ki(鉴权密钥)算出一个Kc(通讯密钥)和一个Res(返回码)。智能终端将接收到的RAND输入SIM卡。SIM卡也用自身储存的Ki和这个RAND通过进行A3/A5/A8运算,生成Kc和Res,智能终端读取Kc和Res,并将Res发回给运营商。运营商收到Res后,与自己之前通过A3/A5/A8运算算出来的Res进行对比对比,如果两者一致,即表示鉴权成功,所述电话号码联入移动通信网络,称为在网电话号码。相应地,通过在网电话号码的电话号码身份可开启所述智能终端的移动网络连接。After the smart terminal is powered on or detects the SIM card, it will read the IMSI and TMSI from the SIM card; when the smart terminal connects to the mobile communication network, it will send the IMSI or TMSI to the service provider (operator), and the operator will pass it in the database. Retrieve the IMSI or TMSI to determine whether the identity of the corresponding phone number is legal, and obtain the phone number and authentication key Ki corresponding to the IMSI. Subsequently, the operator will arbitrarily generate a 128bit RAND (random number), and send this RAND to the mobile phone. At the same time, the operator uses the RAND and Ki (authentication key) to calculate a Kc (communication key) and a Res (return code). The smart terminal inputs the received RAND into the SIM card. The SIM card also uses its own stored Ki and this RAND to perform A3/A5/A8 calculations to generate Kc and Res, and the smart terminal reads Kc and Res, and sends Res back to the operator. After the operator receives the Res, it compares it with the Res calculated by itself through A3/A5/A8 calculations. If the two are consistent, it means that the authentication is successful, and the phone number is connected to the mobile communication network, which is called on-network. telephone number. Correspondingly, the mobile network connection of the smart terminal can be opened through the phone number identity of the online phone number.
通过android API中的TelephonyManager对象,可以取得SIM卡中的信息,调用intgetSimState()函数,能够获取已联入移动通信网络的在网电话号码。Through the TelephonyManager object in the android API, the information in the SIM card can be obtained, and the intgetSimState() function can be called to obtain the online phone number connected to the mobile communication network.
在应用第一种验证条件地实施例中,智能终端接收所述电话来电和/或所述第一短信后,获取并判断其被叫号码为所述智能终端中已联入移动通信网络的在网电话号码,则确定所述电话来电和/或所述第一短信满足验证条件。通过该验证条件,使得智能终端在关闭移动网络的情况下,只要接收到电话来电或第一短信,即可判断其满足验证条件,有利于方便及时地进行通信。In the embodiment where the first verification condition is applied, after the smart terminal receives the incoming call and/or the first text message, it obtains and judges that the called number is an online number of the smart terminal connected to the mobile communication network. network phone number, it is determined that the incoming call and/or the first short message meet the verification condition. Through this verification condition, when the mobile network is turned off, the smart terminal can judge that it satisfies the verification condition as long as it receives a phone call or the first short message, which is conducive to convenient and timely communication.
在应用第二种验证条件的实施例中,智能终端中存储至少一个预设电话号码,用于触发智能终端开启移动网络连接。当根据前述方法判断所述电话来电和/或所述第一短信的主叫号码为所述预设电话号码时,确定所述电话来电和/或所述第一短信满足验证条件。通过该验证条件,使得智能终端在关闭移动网络的情况下,需要接收到预设号码发起的电话来电或发送的第一短信,才能开启移动网络连接,实现网络远程唤醒的权限控制,保证及时通信的同时,更加节省电能和数据流量。In an embodiment applying the second verification condition, at least one preset phone number is stored in the smart terminal, which is used to trigger the smart terminal to start a mobile network connection. When it is determined according to the aforementioned method that the calling number of the incoming phone call and/or the first short message is the preset phone number, it is determined that the incoming phone call and/or the first short message meet the verification condition. Through this verification condition, when the mobile network is turned off, the smart terminal needs to receive an incoming call from a preset number or the first text message sent before it can open the mobile network connection, realize the authority control of network remote wake-up, and ensure timely communication At the same time, it saves more power and data traffic.
当然,在一些可能的实施例中,也可根据网络的使用频率等需求,灵活选用以上一种或多种验证条件,以达成及时通信与节省电能、数据流量的平衡。而且,为了提高移动网络地开启频率,还可以将所述智能终端设置为只要满足上述验证条件即开启移动网络连接,以利于更加及时地进行通信。Of course, in some possible embodiments, one or more of the above verification conditions may be flexibly selected according to requirements such as the frequency of use of the network, so as to achieve a balance between timely communication and saving power and data traffic. Moreover, in order to increase the activation frequency of the mobile network, the smart terminal can also be set to enable the mobile network connection as long as the above verification conditions are met, so as to facilitate communication in a more timely manner.
步骤S12,当满足所述验证条件时,获取所述电话来电的电话内容或所述第一短信的短信内容,确定其是否包含预设的标识内容。Step S12, when the verification condition is satisfied, acquire the phone content of the incoming phone call or the text message content of the first short message, and determine whether it contains a preset identification content.
由于骚扰电话和骚扰短信可能引起移动网络的非必要开启,为了对移动网络连接进行更加精确地开启控制。在一种实施例中,智能终端中储存至少一个预设的标识内容,用于触发智能终端开启移动网络连接。所述标识内容可包括文字、符号、数字、图片中的任意一种或多种,必要时还可通过组合等方式可起到类似开启移动网络连接的“密钥”的效果。本发明可根据实际情况,确定第一短信的短信内容和/或电话来电的电话内容是否包含预设的标识内容,以进行智能终端的网络连接控制。Since harassing phone calls and harassing text messages may cause unnecessary opening of the mobile network, in order to control the opening of the mobile network connection more precisely. In one embodiment, at least one preset identification content is stored in the smart terminal, which is used to trigger the smart terminal to start a mobile network connection. The identification content can include any one or more of words, symbols, numbers, and pictures, and if necessary, it can also be combined to play the effect of a "key" similar to opening a mobile network connection. The present invention can determine whether the short message content of the first short message and/or the telephone content of the incoming call contain the preset identification content according to the actual situation, so as to control the network connection of the intelligent terminal.
一方面,根据前述方法获取所述第一短信的短信内容后,将所述短信内容与预设的标识内容进行比对,以确定所述短信内容中是否包含预设的标识内容。On the one hand, after the short message content of the first short message is obtained according to the aforementioned method, the content of the short message is compared with the preset identification content to determine whether the content of the short message contains the preset identification content.
另一方面,确定所述电话内容是否包含预设的标识内容的过程包括:接通所述电话来电,采集音频数据;根据所述音频数据进行语音识别和/或按键音识别,确定其是否包含预设的标识内容。一种实施例中,接收到电话来电后,智能终端自动接通所述电话来电,采集音频数据。例如Android中,可通过honeStateListener类进行电话来电状态检测,在此基础上添加录音功能即可通过音频采集获取所述电话来电的音频数据。获取所述音频数据后,将所述音频数据与预设的标识内容进行特征匹配,当所述语音数据与所述标识内容匹配率大于预设置的阈值时,则确定音频数据含有所述标识内容;否则,确定音频数据不含有所述标识内容。On the other hand, the process of determining whether the phone content contains preset identification content includes: connecting the phone call, collecting audio data; performing speech recognition and/or key tone recognition according to the audio data, and determining whether it contains Default identification content. In one embodiment, after receiving an incoming call, the smart terminal automatically connects to the incoming call and collects audio data. For example, in Android, the incoming call state can be detected through the honeStateListener class, and the audio data of the incoming call can be obtained through audio collection by adding a recording function on this basis. After the audio data is acquired, feature matching is performed on the audio data and the preset identification content, and when the matching rate between the voice data and the identification content is greater than a preset threshold, it is determined that the audio data contains the identification content ; Otherwise, it is determined that the audio data does not contain the identification content.
其中,所述音频数据可包括语音数据和/或按键音数据。语音数据与所述标识内容的匹配可以采用基于语音学和声学的方法,模式匹配的方法或神经网络的方法。如模式匹配的方法中的动态时间规整(DTW)、隐马尔可夫(HMM)理论、矢量量化(VQ)技术等。而根据通话系统中的双音多频(Dual Tone Multi Frequency,简称DTMF)信号原理,即每个按键分别对应两个特的频率的声音,智能终端通过采集所述音频数据,可对应获取来电一方的用户输入的数字,进而根据所述数字与所述标识内容进行匹配,而确定所述音频数据是否含有所述标识内容。Wherein, the audio data may include voice data and/or key tone data. The matching of the speech data and the identified content may adopt a method based on phonetics and acoustics, a method of pattern matching or a method of neural network. For example, dynamic time warping (DTW), hidden Markov (HMM) theory, vector quantization (VQ) technology, etc. in the method of pattern matching. According to the Dual Tone Multi-Frequency (DTMF) signal principle in the call system, that is, each button corresponds to the sound of two special frequencies, the smart terminal can obtain the caller party by collecting the audio data. The number input by the user, and then match the number with the identification content to determine whether the audio data contains the identification content.
为了保证良好的用户体验,智能终端确定第一短信的短信内容和/或电话来电的电话内容是否包含预设的标识内容的过程,可由后台完成且对本方用户保持静默,和/或在接通所述电话来电,采集音频数据时,对来电一方的用户播放“嘟嘟声”或彩铃。在音频数据采集完毕后,通过亮屏、振动、响铃等方式提醒本方用户电话来电。In order to ensure a good user experience, the smart terminal determines whether the text message content of the first text message and/or the phone content of the incoming call contains the preset identification content, which can be completed by the background and remain silent to the local user, and/or When the phone calls, when the audio data is collected, a "beep" or a ring tone is played to the user of the calling party. After the audio data collection is completed, the local user is reminded of an incoming call by brightening the screen, vibrating, ringing, etc.
通过上述步骤,使得智能终端在关闭移动网络的情况下,需要接收到内容中包含预设的标识内容的第一短信或电话来电,才能开启移动网络连接,减少误操作,实现网络远程唤醒的准确控制,从而在保证及时通信的同时,进一步节省电能和数据流量。Through the above steps, when the mobile network is turned off, the smart terminal needs to receive the first text message or phone call containing the preset identification content in the content, so as to open the mobile network connection, reduce misoperations, and realize accurate network remote wake-up control, thereby further saving power and data traffic while ensuring timely communication.
步骤S13,当满足验证条件时,利用智能终端中相应的电话号码身份开启移动网络连接。Step S13, when the verification condition is satisfied, use the corresponding phone number identity in the smart terminal to open the mobile network connection.
智能终端中的一个或多个在网电话号码可通过运营商获取移动网络服务,因此,可预设智能终端中的任一在网电话号码,例如,所述电话来电和/或所述第一短信的被叫号码,在确定所述电话来电和/或第一短信满足智能终端的验证条件时,利用其电话号码身份开启移动网络连接,实现网络通信。One or more online phone numbers in the smart terminal can obtain mobile network services through the operator. Therefore, any online phone number in the smart terminal can be preset, for example, the incoming call and/or the first The called number of the short message, when it is determined that the incoming call and/or the first short message meet the verification conditions of the smart terminal, uses its phone number identity to open a mobile network connection to realize network communication.
在Android中,可通过以下两种方法开启和关闭移动网络:In Android, the mobile network can be turned on and off in the following two ways:
其一,通过操作系统的数据库改变APN(网络接入点),从而实现移动网络的开启和关闭;First, change the APN (network access point) through the database of the operating system, so as to realize the opening and closing of the mobile network;
其二,通过反射调用系统(ConnectivityManager)的setMoblieDataEnabled方法,调用setMobileDataStatus(context,true)开启移动网络连接,调用setMobileDataStatus(context,false)关闭移动网络,同时,也可以通过反射调用getMoblieDataEnabled方法获取智能终端当前的移动网络的开启和关闭状态。Second, call the setMoblieDataEnabled method of the system (ConnectivityManager) through reflection, call setMobileDataStatus(context,true) to open the mobile network connection, and call setMobileDataStatus(context,false) to close the mobile network. At the same time, you can also call the getMoblieDataEnabled method through reflection to obtain the current The on and off status of the mobile network for .
由于Wi-Fi日益普及,在Android中,可通过setWifiEnabled方法来开启Wi-Fi网络。故在一些可能的实施例中,还可以在满足当包含所述标识内容时,开启所述智能终端的Wi-Fi网络连接。或者,当当包含所述标识内容时,检测Wi-Fi网络连接是否可用;若是,则开启并优先使用Wi-Fi网络。又或者,在开启Wi-Fi网络连接后,关闭移动网络,以进一步减少移动网络中数据流量的使用。Due to the increasing popularity of Wi-Fi, in Android, the Wi-Fi network can be enabled through the setWifiEnabled method. Therefore, in some possible embodiments, it is also possible to enable the Wi-Fi network connection of the smart terminal when the content of the identification is included. Or, when the identification content is included, it is detected whether the Wi-Fi network connection is available; if so, it is turned on and the Wi-Fi network is used preferentially. Or, after the Wi-Fi network connection is turned on, the mobile network is turned off, so as to further reduce the usage of data traffic in the mobile network.
为了进一步减少数据流量或电能的浪费,一些可能的实施例中,请参阅图2,还可以通过以下后置步骤,以在开启移动网络或Wi-Fi网络一段时间后关闭所述移动网络和/或Wi-Fi网络:In order to further reduce the waste of data traffic or electric energy, in some possible embodiments, please refer to FIG. 2 , the following post steps can also be used to turn off the mobile network and/or the mobile network and/or the Wi-Fi network after turning on the network for a period of time or Wi-Fi network:
步骤S14,判断所述移动网络连接是否满足智能终端的网络关闭条件。Step S14, judging whether the mobile network connection satisfies the network shutdown condition of the smart terminal.
开启移动网络连接或Wi-Fi网络连接后,为了减少智能终端的电能和/或数据流量的浪费,可对所述移动网络连接和/或Wi-Fi网络连接是否满足智能终端的网络关闭条件进行判断,以适时关闭所述移动网络和/或Wi-Fi网络。After the mobile network connection or Wi-Fi network connection is turned on, in order to reduce the waste of electric energy and/or data traffic of the smart terminal, whether the mobile network connection and/or Wi-Fi network connection meets the network shutdown conditions of the smart terminal can be checked. Judging to close the mobile network and/or Wi-Fi network in due course.
本发明优选如下两种可能的网络关闭条件,以在所述电话来电和/或第一短信满足网络关闭条件时进行智能终端的网络关闭控制:In the present invention, the following two possible network shutdown conditions are preferred, so as to control the network shutdown of the smart terminal when the incoming call and/or the first short message meet the network shutdown conditions:
其一,所述移动网络连接或Wi-Fi网络连接的工作时长达到预设时间值;One, the working hours of the mobile network connection or Wi-Fi network connection reach the preset time value;
其二,接收到内容中包含预设的关闭标识内容的第二短信,所述关闭标识内容用于触发智能终端关闭移动网络。Second, receiving a second short message whose content contains a preset closing identification content, and the closing identification content is used to trigger the smart terminal to close the mobile network.
在应用第一种网络关闭条件地实施例中,智能终端开启移动网络连接或Wi-Fi网络连接后,计算所述移动网络连接或Wi-Fi网络的工作时长,当所述工作时长达到预设时间值时,确定满足网络关闭条件。In the embodiment of applying the first network shutdown condition, after the smart terminal opens the mobile network connection or the Wi-Fi network connection, it calculates the working time of the mobile network connection or the Wi-Fi network, and when the working time reaches the preset When the time value is reached, it is determined that the network shutdown condition is met.
在Android中,一般可采用以下3种方法实现定时器:采用Handler与线程的sleep(long)方法、采用Handler的postDelayed(Runnable,long)方法、采用Handler与timer及TimerTask结合的方法,当定时器到达指定的时间,即当所述工作时长达到预设时间值时,执行关闭智能终端的移动网络或Wi-Fi网络的定时器任务(TimerTask)。通过该网络关闭条件,可有效减少电能浪费,且用户可自行设置预设时间值来保证及时通信,提高工作效率。In Android, the following three methods can generally be used to implement timers: using the sleep (long) method of Handler and thread, using the postDelayed (Runnable, long) method of Handler, using the method of combining Handler with timer and TimerTask, when the timer When the specified time is reached, that is, when the working time reaches the preset time value, the timer task (TimerTask) of turning off the mobile network or Wi-Fi network of the smart terminal is executed. Through the network shutdown condition, the waste of electric energy can be effectively reduced, and the user can set the preset time value by himself to ensure timely communication and improve work efficiency.
在应用第二种网络关闭条件地实施例中,开启所述移动网络连接后,还包括如下步骤:In the embodiment where the second network closing condition is applied, after opening the mobile network connection, the following steps are further included:
接收第二短信,获取所述第二短信的内容;receiving a second short message, and acquiring the content of the second short message;
判断所述第二短信的内容是否满足智能终端的网络关闭条件;所述网络关闭条件还包括:所述第二短信的内容中包含预设的关闭标识内容。Judging whether the content of the second short message satisfies the network closing condition of the smart terminal; the network closing condition further includes: the content of the second short message contains a preset closing identification content.
智能终端中预设有至少一个关闭标识内容,用于触发智能终端关闭移动网络或Wi-Fi网络。当根据前述方法判断所述第二短信的内容中包含预设的关闭标识内容时,确定所述第二短信满足网络关闭条件。通过该网络关闭条件,可使得智能终端在开启移动网络和/或Wi-Fi网络的情况下,需要接收到内容中包含预设的关闭标识内容的第二短信,才能关闭移动网络和/或Wi-Fi网络,实现网络远程关闭的准确控制,从而在保证及时通信的同时,进一步节省电能和数据流量。At least one closing identification content is preset in the smart terminal, which is used to trigger the smart terminal to turn off the mobile network or the Wi-Fi network. When it is judged according to the foregoing method that the content of the second short message contains the preset closing identification content, it is determined that the second short message satisfies the network closing condition. Through the network shutdown condition, it is possible for the smart terminal to turn off the mobile network and/or Wi-Fi network only after receiving a second text message containing the preset shutdown identification content when the mobile network and/or Wi-Fi network is turned on. -Fi network to realize accurate control of network remote shutdown, thereby further saving power and data traffic while ensuring timely communication.
步骤S15,当满足网络关闭条件时,关闭所述智能终端的移动网络连接。Step S15, closing the mobile network connection of the smart terminal when the network closing condition is satisfied.
在Android中,可通过以下两种方法关闭移动网络:In Android, there are two ways to turn off the mobile network:
其一,通过操作系统的数据库改变APN(网络接入点),从而实现移动网络的关闭;First, change the APN (Access Point) through the database of the operating system, so as to realize the closing of the mobile network;
其二,通过反射调用系统(ConnectivityManager)的setMoblieDataEnabled方法,调用setMobileDataStatus(context,false)关闭移动网络,同时,也可以通过反射调用getMoblieDataEnabled方法获取智能终端当前的移动网络的开启和关闭状态。Second, call the setMoblieDataEnabled method of the system (ConnectivityManager) through reflection, and call setMobileDataStatus(context, false) to close the mobile network. At the same time, you can also call the getMoblieDataEnabled method through reflection to obtain the current mobile network on and off status of the smart terminal.
于步骤S13开启Wi-Fi网络连接的可能实施例中,当满足网络关闭条件时,还可关闭所述Wi-Fi网络,以进一步减少电能的消耗。在Android中,可通过setWifiEnabled方法来关闭Wi-Fi网络。In a possible embodiment of enabling the Wi-Fi network connection in step S13, when the network shutdown condition is met, the Wi-Fi network may also be turned off, so as to further reduce power consumption. In Android, the Wi-Fi network can be turned off through the setWifiEnabled method.
在一些可能的实施例中,需使智能终端发送心跳包以维持长链接,因此,当满足网络关闭条件时,还可使所述智能设备维持开启移动网络或Wi-Fi网络连接的状态,并将所述移动网络连接或Wi-Fi网络的心跳包发送频率设置为预设频率值,优选地,所述预设频率值小于所述设置前的心跳包发送频率。该方案可使得智能终端在保持移动网络和/或Wi-Fi网络开启、维持长链接的情况下,减小电能和/或数据流量的消耗。In some possible embodiments, it is necessary to make the smart terminal send a heartbeat packet to maintain a long connection. Therefore, when the network shutdown condition is met, the smart device can also be kept in the state of opening the mobile network or Wi-Fi network connection, and The heartbeat packet sending frequency of the mobile network connection or the Wi-Fi network is set to a preset frequency value, preferably, the preset frequency value is lower than the heartbeat packet sending frequency before the setting. This solution enables the smart terminal to reduce power and/or data traffic consumption while keeping the mobile network and/or Wi-Fi network turned on and maintaining a long connection.
通过对本发明的网络连接控制方法的揭示可以知晓,本发明的实施,能够通过对智能终端网络连接的控制,有效节省电能和数据流量并保证其能够及时通信,提升了使用智能终端时的用户体验。Through the disclosure of the network connection control method of the present invention, it can be known that the implementation of the present invention can effectively save power and data traffic and ensure timely communication through the control of the network connection of the smart terminal, and improve the user experience when using the smart terminal .
依据模块化设计思维,本发明在上述网络连接控制方法的基础上,进一步提出一种智能终端。Based on the idea of modular design, the present invention further proposes an intelligent terminal on the basis of the above network connection control method.
请参阅图3,本发明的一种智能终端,包括:第一接收单元111,验证单元112,识别单元12,开启控制单元13,各单元所实现的功能具体揭示如下:Please refer to FIG. 3 , an intelligent terminal of the present invention includes: a first receiving unit 111, a verification unit 112, an identification unit 12, and an opening control unit 13. The functions implemented by each unit are specifically disclosed as follows:
所述第一接收单元111被配置为接收电话来电和/或第一短信,所述验证单元112被配置为取所述电话来电或第一短信的主叫号码和/或被叫号码,确定其是否满足验证条件。The first receiving unit 111 is configured to receive an incoming phone call and/or a first text message, and the verification unit 112 is configured to obtain the calling number and/or called number of the incoming phone call or first text message, and determine its Whether the verification conditions are met.
由于在信令系统中,发起电话来电呼叫或发送第一短信的主叫智能终端将其SIM卡的主叫IMSI串号与被叫号码一起上行传输到移动通信网络的运营商,运营商通过所述IMSI查找到主叫号码,通过被叫号码查找到被叫IMSI串号,后通过被叫IMSI查找到对应的被叫智能终端,并将主叫号码下行传输至被叫智能终端。而且在Android系统中,短信信息被保存于数据库中,可通过Content Provider类来读取短信信息,包括被叫号码、短信中心号码和短信的内容等。Because in the signaling system, the calling intelligent terminal that initiates an incoming call or sends the first short message transmits the calling IMSI serial number of its SIM card together with the called number to the operator of the mobile communication network, the operator through the The IMSI finds the calling number, finds the called IMSI serial number through the called number, and then finds the corresponding called smart terminal through the called IMSI, and downlinks the calling number to the called smart terminal. And in the Android system, the short message information is stored in the database, and the short message information can be read through the Content Provider class, including the called number, the short message center number and the content of the short message.
因此智能终端接收电话来电和/或第一短信后,能够获取所述电话来电和/或第一短信的主叫电话、被叫电话和短信内容等信息。从而根据上述信息,对所述电话来电和/或第一短信是否满足智能终端的验证条件进行判断。Therefore, after receiving the incoming phone call and/or the first short message, the smart terminal can obtain information such as the calling phone number, the called phone number, and the content of the short message of the incoming phone call and/or the first short message. Therefore, according to the above information, it is judged whether the incoming call and/or the first short message satisfy the verification condition of the smart terminal.
本发明优选如下两种可能的验证条件,以在所述电话来电和/或第一短信满足验证条件时进行智能终端的网络连接控制:In the present invention, the following two possible verification conditions are preferred, so as to control the network connection of the intelligent terminal when the incoming call and/or the first short message meet the verification conditions:
其一,所述电话来电和/或所述第一短信的被叫号码为所述智能终端中已联入移动通信网络的在网电话号码。Firstly, the called number of the incoming call and/or the first short message is an online phone number connected to the mobile communication network in the smart terminal.
其二,所述电话来电和/或所述第一短信的主叫号码为存储于所述智能终端的预设电话号码,所述预设电话号码用于触发智能终端开启移动网络连接。Second, the calling number of the incoming call and/or the first short message is a preset phone number stored in the smart terminal, and the preset phone number is used to trigger the smart terminal to start a mobile network connection.
智能终端开机或检测到SIM卡后,将从SIM卡中读取IMSI和TMSI;智能终端联入移动通信网络时,把IMSI或TMSI发送给服务提供者(运营商),运营商通过在数据库中检索IMSI或TMSI来判断其对应的电话号码身份是否是合法,并获得这个IMSI所对应的电话号码和鉴权密钥Ki。随后,运营商会任意生成一个128bit的RAND(随机数),并把这个RAND发送给手机。同时,运营商使用这个RAND和Ki(鉴权密钥)算出一个Kc(通讯密钥)和一个Res(返回码)。智能终端将接收到的RAND输入SIM卡。SIM卡也用自身储存的Ki和这个RAND通过进行A3/A5/A8运算,生成Kc和Res,智能终端读取Kc和Res,并将Res发回给运营商。运营商收到Res后,与自己之前通过A3/A5/A8运算算出来的Res进行对比对比,如果两者一致,即表示鉴权成功,所述电话号码联入移动通信网络,称为在网电话号码。相应地,通过在网电话号码的电话号码身份可开启所述智能终端的移动网络连接。After the smart terminal is powered on or detects the SIM card, it will read the IMSI and TMSI from the SIM card; when the smart terminal connects to the mobile communication network, it will send the IMSI or TMSI to the service provider (operator), and the operator will pass it in the database. Retrieve the IMSI or TMSI to determine whether the identity of the corresponding phone number is legal, and obtain the phone number and authentication key Ki corresponding to the IMSI. Subsequently, the operator will arbitrarily generate a 128bit RAND (random number), and send this RAND to the mobile phone. At the same time, the operator uses the RAND and Ki (authentication key) to calculate a Kc (communication key) and a Res (return code). The smart terminal inputs the received RAND into the SIM card. The SIM card also uses its own stored Ki and this RAND to perform A3/A5/A8 calculations to generate Kc and Res, and the smart terminal reads Kc and Res, and sends Res back to the operator. After the operator receives the Res, it compares it with the Res calculated by itself through A3/A5/A8 calculations. If the two are consistent, it means that the authentication is successful, and the phone number is connected to the mobile communication network, which is called on-network. telephone number. Correspondingly, the mobile network connection of the smart terminal can be opened through the phone number identity of the online phone number.
通过android API中的TelephonyManager对象,可以取得SIM卡中的信息,调用intgetSimState()函数,能够获取已联入移动通信网络的在网电话号码。Through the TelephonyManager object in the android API, the information in the SIM card can be obtained, and the intgetSimState() function can be called to obtain the online phone number connected to the mobile communication network.
在应用第一种验证条件地实施例中,智能终端接收所述电话来电和/或所述第一短信后,获取并判断其被叫号码为所述智能终端中已联入移动通信网络的在网电话号码,则确定所述电话来电和/或所述第一短信满足验证条件。通过该验证条件,使得智能终端在关闭移动网络的情况下,只要接收到电话来电或第一短信,即可开启移动网络连接,有利于方便及时地进行通信。In the embodiment where the first verification condition is applied, after the smart terminal receives the incoming call and/or the first text message, it obtains and judges that the called number is an online number of the smart terminal connected to the mobile communication network. network phone number, it is determined that the incoming call and/or the first short message meet the verification condition. Through this verification condition, when the mobile network is closed, the smart terminal can open the mobile network connection as long as it receives a phone call or the first short message, which is conducive to convenient and timely communication.
在应用第二种验证条件的实施例中,智能终端中存储至少一个预设电话号码,用于触发智能终端开启移动网络连接。当根据前述方法判断所述电话来电和/或所述第一短信的主叫号码为所述预设电话号码时,确定所述电话来电和/或所述第一短信满足验证条件。通过该验证条件,使得智能终端在关闭移动网络的情况下,需要接收到预设号码发起的电话来电或发送的第一短信,才能开启移动网络连接,实现网络远程唤醒的权限控制,保证及时通信的同时,更加节省电能和数据流量。In an embodiment applying the second verification condition, at least one preset phone number is stored in the smart terminal, which is used to trigger the smart terminal to start a mobile network connection. When it is determined according to the aforementioned method that the calling number of the incoming phone call and/or the first short message is the preset phone number, it is determined that the incoming phone call and/or the first short message meet the verification condition. Through this verification condition, when the mobile network is turned off, the smart terminal needs to receive an incoming call from a preset number or the first text message sent before it can open the mobile network connection, realize the authority control of network remote wake-up, and ensure timely communication At the same time, it saves more power and data traffic.
当然,在一些可能的实施例中,也可根据网络的使用频率等需求,灵活选用以上一种或多种验证条件,以达成及时通信与节省电能、数据流量的平衡。而且,为了提高移动网络地开启频率,还可以将所述智能终端设置为只要满足上述验证条件即开启移动网络连接,以利于更加及时地进行通信。Of course, in some possible embodiments, one or more of the above verification conditions may be flexibly selected according to requirements such as the frequency of use of the network, so as to achieve a balance between timely communication and saving power and data traffic. Moreover, in order to increase the activation frequency of the mobile network, the smart terminal can also be set to enable the mobile network connection as long as the above verification conditions are met, so as to facilitate communication in a more timely manner.
识别单元12,被配置为当满足所述验证条件时,获取所述电话来电的电话内容或所述第一短信的短信内容,确定其是否包含预设的标识内容。The identifying unit 12 is configured to acquire the call content of the incoming call or the short message content of the first short message when the verification condition is met, and determine whether it contains a preset identification content.
由于骚扰电话和骚扰短信可能引起移动网络的非必要开启,为了对移动网络连接进行更加精确地开启控制。在一种实施例中,智能终端中储存至少一个预设的标识内容,用于触发智能终端开启移动网络连接。所述标识内容可包括文字、符号、数字、图片中的任意一种或多种,必要时还可通过组合等方式可起到类似开启移动网络连接的“密钥”的效果。本发明可根据实际情况,确定第一短信的短信内容和/或电话来电的电话内容是否包含预设的标识内容,以进行智能终端的网络连接控制。Since harassing phone calls and harassing text messages may cause unnecessary opening of the mobile network, in order to control the opening of the mobile network connection more precisely. In one embodiment, at least one preset identification content is stored in the smart terminal, which is used to trigger the smart terminal to start a mobile network connection. The identification content can include any one or more of words, symbols, numbers, and pictures, and if necessary, it can also be combined to play the effect of a "key" similar to opening a mobile network connection. The present invention can determine whether the short message content of the first short message and/or the telephone content of the incoming call contain the preset identification content according to the actual situation, so as to control the network connection of the intelligent terminal.
一方面,根据前述方法获取所述第一短信的短信内容后,将所述短信内容与预设的标识内容进行比对,以确定所述短信内容中是否包含预设的标识内容。On the one hand, after the short message content of the first short message is obtained according to the aforementioned method, the content of the short message is compared with the preset identification content to determine whether the content of the short message contains the preset identification content.
另一方面,确定所述电话内容是否包含预设的标识内容的过程包括:接通所述电话来电,采集音频数据;根据所述音频数据进行语音识别和/或按键音识别,确定其是否包含预设的标识内容。一种实施例中,接收到电话来电后,智能终端自动接通所述电话来电,采集音频数据。例如Android中,可通过honeStateListener类进行电话来电状态检测,在此基础上添加录音功能即可通过音频采集获取所述电话来电的音频数据。获取所述音频数据后,将所述音频数据与预设的标识内容进行特征匹配,当所述语音数据与所述标识内容匹配率大于预设置的阈值时,则确定音频数据含有所述标识内容;否则,确定音频数据不含有所述标识内容。On the other hand, the process of determining whether the phone content contains preset identification content includes: connecting the phone call, collecting audio data; performing speech recognition and/or key tone recognition according to the audio data, and determining whether it contains Default identification content. In one embodiment, after receiving an incoming call, the smart terminal automatically connects to the incoming call and collects audio data. For example, in Android, the incoming call state can be detected through the honeStateListener class, and the audio data of the incoming call can be obtained through audio collection by adding a recording function on this basis. After the audio data is acquired, feature matching is performed on the audio data and the preset identification content, and when the matching rate between the voice data and the identification content is greater than a preset threshold, it is determined that the audio data contains the identification content ; Otherwise, it is determined that the audio data does not contain the identification content.
其中,所述音频数据可包括语音数据和/或按键音数据。语音数据与所述标识内容的匹配可以采用基于语音学和声学的方法,模式匹配的方法或神经网络的方法。如模式匹配的方法中的动态时间规整(DTW)、隐马尔可夫(HMM)理论、矢量量化(VQ)技术等。而根据通话系统中的双音多频(Dual Tone Multi Frequency,简称DTMF)信号原理,即每个按键分别对应两个特的频率的声音,智能终端通过采集所述音频数据,可对应获取来电一方的用户输入的数字,进而根据所述数字与所述标识内容进行匹配,而确定所述音频数据是否含有所述标识内容。Wherein, the audio data may include voice data and/or key tone data. The matching of the speech data and the identified content may adopt a method based on phonetics and acoustics, a method of pattern matching or a method of neural network. For example, dynamic time warping (DTW), hidden Markov (HMM) theory, vector quantization (VQ) technology, etc. in the method of pattern matching. According to the Dual Tone Multi-Frequency (DTMF) signal principle in the call system, that is, each button corresponds to the sound of two special frequencies, the smart terminal can obtain the caller party by collecting the audio data. The number input by the user, and then match the number with the identification content to determine whether the audio data contains the identification content.
为了保证良好的用户体验,智能终端确定第一短信的短信内容和/或电话来电的电话内容是否包含预设的标识内容的过程,可由后台完成且对本方用户保持静默,和/或在接通所述电话来电,采集音频数据时,对来电一方的用户播放“嘟嘟声”或彩铃。在音频数据采集完毕后,通过亮屏、振动、响铃等方式提醒本方用户电话来电。In order to ensure a good user experience, the smart terminal determines whether the text message content of the first text message and/or the phone content of the incoming call contains the preset identification content, which can be completed by the background and remain silent to the local user, and/or When the phone calls, when the audio data is collected, a "beep" or a ring tone is played to the user of the calling party. After the audio data collection is completed, the local user is reminded of an incoming call by brightening the screen, vibrating, ringing, etc.
通过上述步骤,使得智能终端在关闭移动网络的情况下,需要接收到内容中包含预设的标识内容的第一短信或电话来电,才能开启移动网络连接,减少误操作,实现网络远程唤醒的准确控制,从而在保证及时通信的同时,进一步节省电能和数据流量。Through the above steps, when the mobile network is turned off, the smart terminal needs to receive the first text message or phone call containing the preset identification content in the content, so as to open the mobile network connection, reduce misoperations, and realize accurate network remote wake-up control, thereby further saving power and data traffic while ensuring timely communication.
识别单元13,被配置为当包含所述标识内容时,利用智能终端中相应的电话号码身份开启移动网络连接。The identification unit 13 is configured to use the corresponding phone number identity in the smart terminal to open a mobile network connection when the identification content is included.
智能终端中的一个或多个在网电话号码可通过运营商获取移动网络服务,因此,可预设智能终端中的任一在网电话号码,例如,所述电话来电和/或所述第一短信的被叫号码,在确定所述电话来电和/或第一短信满足智能终端的验证条件时,利用其电话号码身份开启移动网络连接,实现网络通信。One or more online phone numbers in the smart terminal can obtain mobile network services through the operator. Therefore, any online phone number in the smart terminal can be preset, for example, the incoming call and/or the first The called number of the short message, when it is determined that the incoming call and/or the first short message meet the verification conditions of the smart terminal, uses its phone number identity to open a mobile network connection to realize network communication.
在Android中,可通过以下两种方法开启和关闭移动网络:In Android, the mobile network can be turned on and off in the following two ways:
其一,通过操作系统的数据库改变APN(网络接入点),从而实现移动网络的开启和关闭;First, change the APN (network access point) through the database of the operating system, so as to realize the opening and closing of the mobile network;
其二,通过反射调用系统(ConnectivityManager)的setMoblieDataEnabled方法,调用setMobileDataStatus(context,true)开启移动网络连接,调用setMobileDataStatus(context,false)关闭移动网络,同时,也可以通过反射调用getMoblieDataEnabled方法获取智能终端当前的移动网络的开启和关闭状态。Second, call the setMoblieDataEnabled method of the system (ConnectivityManager) through reflection, call setMobileDataStatus(context,true) to open the mobile network connection, and call setMobileDataStatus(context,false) to close the mobile network. At the same time, you can also call the getMoblieDataEnabled method through reflection to obtain the current The on and off status of the mobile network for .
由于Wi-Fi日益普及,在Android中,可通过setWifiEnabled方法来开启Wi-Fi网络。故在一些可能的实施例中,还可以当包含所述标识内容时,开启所述智能终端的Wi-Fi网络连接。或者,当包含所述标识内容时,检测Wi-Fi网络连接是否可用;若是,则开启并优先使用Wi-Fi网络。又或者,在开启Wi-Fi网络连接后,关闭移动网络,以进一步减少移动网络中数据流量的使用。Due to the increasing popularity of Wi-Fi, in Android, the Wi-Fi network can be enabled through the setWifiEnabled method. Therefore, in some possible embodiments, when the identification content is included, the Wi-Fi network connection of the smart terminal may be enabled. Or, when the identification content is included, it is detected whether the Wi-Fi network connection is available; if so, the Wi-Fi network is enabled and used preferentially. Or, after the Wi-Fi network connection is turned on, the mobile network is turned off, so as to further reduce the usage of data traffic in the mobile network.
为了进一步减少数据流量或电能的浪费,一些可能的实施例中,请参阅图4,还可以通过以下后置步骤,在开启移动网络或Wi-Fi网络一段时间后,关闭所述移动网络和/或Wi-Fi网络:In order to further reduce the waste of data traffic or electric energy, in some possible embodiments, please refer to FIG. 4 , the following post steps can also be used to turn off the mobile network and/or Wi-Fi network after a period of time. or Wi-Fi network:
关闭判断单元14,被配置为判断所述移动网络连接是否满足智能终端的网络关闭条件。The shutdown judging unit 14 is configured to judge whether the mobile network connection satisfies the network shutdown condition of the smart terminal.
开启移动网络连接或Wi-Fi网络连接后,为了减少智能终端的电能和/或数据流量的浪费,可对所述移动网络连接和/或Wi-Fi网络连接是否满足智能终端的网络关闭条件进行判断,以适时关闭所述移动网络和/或Wi-Fi网络。After the mobile network connection or Wi-Fi network connection is turned on, in order to reduce the waste of electric energy and/or data traffic of the smart terminal, whether the mobile network connection and/or Wi-Fi network connection meets the network shutdown conditions of the smart terminal can be checked. Judging to close the mobile network and/or Wi-Fi network in due course.
本发明优选如下两种可能的网络关闭条件,以在所述电话来电和/或第一短信满足网络关闭条件时进行智能终端的网络关闭控制:In the present invention, the following two possible network shutdown conditions are preferred, so as to control the network shutdown of the smart terminal when the incoming call and/or the first short message meet the network shutdown conditions:
其一,所述移动网络连接或Wi-Fi网络连接的工作时长达到预设时间值;One, the working hours of the mobile network connection or Wi-Fi network connection reach the preset time value;
其二,接收到内容中包含预设的关闭标识内容的第二短信,所述关闭标识内容用于触发智能终端关闭移动网络。Second, receiving a second short message whose content contains a preset closing identification content, and the closing identification content is used to trigger the smart terminal to close the mobile network.
在应用第一种网络关闭条件的实施例中,智能终端开启移动网络连接或Wi-Fi网络连接后,计算所述移动网络连接或Wi-Fi网络的工作时长,当所述工作时长达到预设时间值时,确定满足网络关闭条件。In the embodiment of applying the first network shutdown condition, after the smart terminal opens the mobile network connection or the Wi-Fi network connection, it calculates the working time of the mobile network connection or the Wi-Fi network, and when the working time reaches the preset When the time value is reached, it is determined that the network shutdown condition is met.
在Android中,一般可采用以下3种方法实现定时器:采用Handler与线程的sleep(long)方法、采用Handler的postDelayed(Runnable,long)方法、采用Handler与timer及TimerTask结合的方法,当定时器到达指定的时间,即当所述工作时长达到预设时间值时,执行关闭智能终端的移动网络或Wi-Fi网络的定时器任务(TimerTask)。通过该网络关闭条件,可有效减少电能浪费,且用户可自行设置预设时间值来保证及时通信,提高工作效率。In Android, the following three methods can generally be used to implement timers: using the sleep (long) method of Handler and thread, using the postDelayed (Runnable, long) method of Handler, using the method of combining Handler with timer and TimerTask, when the timer When the specified time is reached, that is, when the working time reaches the preset time value, the timer task (TimerTask) of turning off the mobile network or Wi-Fi network of the smart terminal is executed. Through the network shutdown condition, the waste of electric energy can be effectively reduced, and the user can set the preset time value by himself to ensure timely communication and improve work efficiency.
在应用第二种网络关闭条件的实施例中,,智能终端还包括第二接收单元,被配置为:在开启所述移动网络连接后接收第二短信,获取所述第二短信的内容;In an embodiment where the second network shutdown condition is applied, the smart terminal further includes a second receiving unit configured to: receive a second short message after opening the mobile network connection, and obtain the content of the second short message;
所述关闭判断单元14还被配置为判断所述第二短信的内容是否满足智能终端的网络关闭条件;所述关闭控制单元的网络关闭条件还包括:所述第二短信的内容中包含预设的关闭标识内容,所述关闭标识内容用于触发智能终端关闭移动网络连接。The closing judging unit 14 is also configured to judge whether the content of the second short message satisfies the network closing condition of the smart terminal; the network closing condition of the closing control unit also includes: the content of the second short message contains a preset The closing identification content of the closing identification content is used to trigger the smart terminal to close the mobile network connection.
智能终端中预设有至少一个关闭标识内容,用于触发智能终端关闭移动网络或Wi-Fi网络。当根据前述方法判断所述第二短信的内容中包含预设的关闭标识内容时,确定所述第二短信满足网络关闭条件。通过该网络关闭条件,可使得智能终端在开启移动网络和/或Wi-Fi网络的情况下,需要接收到内容中包含预设的关闭标识内容的第二短信,才能关闭移动网络和/或Wi-Fi网络,实现网络远程关闭的准确控制,从而在保证及时通信的同时,进一步节省电能和数据流量。At least one closing identification content is preset in the smart terminal, which is used to trigger the smart terminal to turn off the mobile network or the Wi-Fi network. When it is judged according to the foregoing method that the content of the second short message contains the preset closing identification content, it is determined that the second short message satisfies the network closing condition. Through the network shutdown condition, it is possible for the smart terminal to turn off the mobile network and/or Wi-Fi network only after receiving a second text message containing the preset shutdown identification content when the mobile network and/or Wi-Fi network is turned on. -Fi network to realize accurate control of network remote shutdown, thereby further saving power and data traffic while ensuring timely communication.
关闭控制单元15,被配置为当满足网络关闭条件时,关闭所述智能终端的移动网络连接。The closing control unit 15 is configured to close the mobile network connection of the smart terminal when the network closing condition is met.
在Android中,可通过以下两种方法关闭移动网络:In Android, there are two ways to turn off the mobile network:
其一,通过操作系统的数据库改变APN(网络接入点),从而实现移动网络的关闭;First, change the APN (Access Point) through the database of the operating system, so as to realize the closing of the mobile network;
其二,通过反射调用系统(ConnectivityManager)的setMoblieDataEnabled方法,调用setMobileDataStatus(context,false)关闭移动网络,同时,也可以通过反射调用getMoblieDataEnabled方法获取智能终端当前的移动网络的开启和关闭状态。Second, call the setMoblieDataEnabled method of the system (ConnectivityManager) through reflection, and call setMobileDataStatus(context, false) to close the mobile network. At the same time, you can also call the getMoblieDataEnabled method through reflection to obtain the current mobile network on and off status of the smart terminal.
在开启Wi-Fi网络连接的可能实施例中,当满足网络关闭条件时,还可关闭所述Wi-Fi网络,以进一步减少电能的消耗。在Android中,可通过setWifiEnabled方法来关闭Wi-Fi网络。In a possible embodiment of enabling the Wi-Fi network connection, when the network shutdown condition is satisfied, the Wi-Fi network may also be turned off, so as to further reduce power consumption. In Android, the Wi-Fi network can be turned off through the setWifiEnabled method.
在一些可能的实施例中,需使智能终端发送心跳包以维持长链接,因此,当满足网络关闭条件时,还可使所述智能设备维持开启移动网络或Wi-Fi网络连接的状态,并将所述移动网络连接或Wi-Fi网络的心跳包发送频率设置为预设频率值,优选地,所述预设频率值小于所述设置前的心跳包发送频率。该方案可使得智能终端在保持移动网络和/或Wi-Fi网络开启、维持长链接的情况下,减小电能和/或数据流量的消耗。In some possible embodiments, it is necessary to make the smart terminal send a heartbeat packet to maintain a long connection. Therefore, when the network shutdown condition is met, the smart device can also be kept in the state of opening the mobile network or Wi-Fi network connection, and The heartbeat packet sending frequency of the mobile network connection or the Wi-Fi network is set to a preset frequency value, preferably, the preset frequency value is lower than the heartbeat packet sending frequency before the setting. This solution enables the smart terminal to reduce power and/or data traffic consumption while keeping the mobile network and/or Wi-Fi network turned on and maintaining a long connection.
通过对本发明的智能终端的揭示可以知晓,本发明的实施,能够通过对智能终端网络连接的控制,有效节省电能和数据流量并保证其能够及时通信,提升了使用智能终端时的用户体验。Through the disclosure of the smart terminal of the present invention, it can be known that the implementation of the present invention can effectively save power and data traffic and ensure timely communication by controlling the network connection of the smart terminal, thereby improving the user experience when using the smart terminal.
本领域普通技术人员可以理解,实现上述实施例方法中的全部或部分步骤是可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。Those of ordinary skill in the art can understand that all or part of the steps in the method of the above-mentioned embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium. The above-mentioned The storage medium may be a read-only memory, a magnetic disk or an optical disk, and the like.
以上对本发明所提供的网络连接控制方法和智能终端进行了详细介绍,对于本领域的一般技术人员,在不脱离本发明原理的前提下,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。The network connection control method and the smart terminal provided by the present invention have been introduced in detail above. For those skilled in the art, there will be changes in the specific implementation and application scope without departing from the principles of the present invention. In summary, the contents of this specification should not be construed as limiting the present invention.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611109332.9A CN106535312A (en) | 2016-12-06 | 2016-12-06 | Network connection control method and intelligent terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611109332.9A CN106535312A (en) | 2016-12-06 | 2016-12-06 | Network connection control method and intelligent terminal |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106535312A true CN106535312A (en) | 2017-03-22 |
Family
ID=58341336
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611109332.9A Pending CN106535312A (en) | 2016-12-06 | 2016-12-06 | Network connection control method and intelligent terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106535312A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114244958A (en) * | 2021-12-14 | 2022-03-25 | 咪咕音乐有限公司 | Video color ring playing control method, equipment and readable storage medium |
CN109933187B (en) * | 2019-03-25 | 2023-10-17 | 努比亚技术有限公司 | Wearing equipment operation control method, wearing equipment and computer readable storage medium |
WO2025023922A1 (en) * | 2023-07-21 | 2025-01-30 | Google Llc | Activating a communication mode via a voice call and tone signal to receive data wirelessly |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101304575A (en) * | 2008-06-13 | 2008-11-12 | Tcl天一移动通信(深圳)有限公司 | Method and communication terminal capable of automatically matching incoming call number or note number |
CN102665176A (en) * | 2012-04-23 | 2012-09-12 | 厦门网拓科技有限公司 | System and method for safely monitoring by mobile terminal |
CN104320766A (en) * | 2014-10-16 | 2015-01-28 | 小米科技有限责任公司 | Spam short message identification method, device and equipment |
CN105848260A (en) * | 2016-03-17 | 2016-08-10 | 广东小天才科技有限公司 | Power saving method and power saving system based on data network control |
-
2016
- 2016-12-06 CN CN201611109332.9A patent/CN106535312A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101304575A (en) * | 2008-06-13 | 2008-11-12 | Tcl天一移动通信(深圳)有限公司 | Method and communication terminal capable of automatically matching incoming call number or note number |
CN102665176A (en) * | 2012-04-23 | 2012-09-12 | 厦门网拓科技有限公司 | System and method for safely monitoring by mobile terminal |
CN104320766A (en) * | 2014-10-16 | 2015-01-28 | 小米科技有限责任公司 | Spam short message identification method, device and equipment |
CN105848260A (en) * | 2016-03-17 | 2016-08-10 | 广东小天才科技有限公司 | Power saving method and power saving system based on data network control |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109933187B (en) * | 2019-03-25 | 2023-10-17 | 努比亚技术有限公司 | Wearing equipment operation control method, wearing equipment and computer readable storage medium |
CN114244958A (en) * | 2021-12-14 | 2022-03-25 | 咪咕音乐有限公司 | Video color ring playing control method, equipment and readable storage medium |
WO2025023922A1 (en) * | 2023-07-21 | 2025-01-30 | Google Llc | Activating a communication mode via a voice call and tone signal to receive data wirelessly |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20230251826A1 (en) | Method for Quickly Starting Application Service, and Terminal | |
CN107464557B (en) | Call recording method and device, mobile terminal and storage medium | |
CN105611584B (en) | Switching device of conversing and method | |
CN104253899B (en) | The control method and device of communicating terminal | |
CN100444668C (en) | Method of controlling mobile telephone power consumption and its mobile telephone | |
CN101345958A (en) | Mobile terminal, and method and system for controlling reminding mode | |
CN105263182A (en) | Equipment control method, device and terminal | |
CN104168044A (en) | Method for controlling mobile terminal through multifunctional Bluetooth watch | |
CN105975063B (en) | A kind of method and apparatus controlling intelligent terminal | |
CN102547614B (en) | A kind of automatic reminding method based on mobile phone and mobile phone | |
CN106357886A (en) | Method and device for managing alarm of intelligent watch | |
CN107071152A (en) | Method and system for automatically adjusting volume of sound equipment based on state of call equipment | |
CN106535312A (en) | Network connection control method and intelligent terminal | |
CN102158583A (en) | Voice processing method for wireless terminal and wireless terminal | |
CN104333641B (en) | Call method and device | |
CN105376408A (en) | Method and system for setting sleep mode of terminal | |
CN104935715B (en) | A kind of method and system by biometrics identification technology display of calling end caller information | |
CN105549836B (en) | Method for processing message on screen locking interface of mobile electronic terminal and mobile electronic terminal | |
CN106303026A (en) | A kind of method and system realizing shutdown incoming call | |
CN105848260B (en) | A power saving method and power saving system based on data network control | |
CN105141611B (en) | Distance communicating control device and method | |
WO2019056391A1 (en) | Information processing method and apparatus, mobile terminal, and computer readable storage medium | |
CN106211286B (en) | A kind of control method and mobile terminal | |
CN215934920U (en) | A mobile phone for automatic controllable incoming calls | |
CN113676598B (en) | A mobile phone that can automatically control incoming calls |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170322 |