WO2014177033A1 - Input method invoking method and invoking device, and terminal - Google Patents

Input method invoking method and invoking device, and terminal Download PDF

Info

Publication number
WO2014177033A1
WO2014177033A1 PCT/CN2014/076330 CN2014076330W WO2014177033A1 WO 2014177033 A1 WO2014177033 A1 WO 2014177033A1 CN 2014076330 W CN2014076330 W CN 2014076330W WO 2014177033 A1 WO2014177033 A1 WO 2014177033A1
Authority
WO
WIPO (PCT)
Prior art keywords
input method
web page
language
language type
source code
Prior art date
Application number
PCT/CN2014/076330
Other languages
French (fr)
Chinese (zh)
Inventor
苏炯金
Original Assignee
华为终端有限公司
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 华为终端有限公司 filed Critical 华为终端有限公司
Publication of WO2014177033A1 publication Critical patent/WO2014177033A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • G06F9/454Multi-language systems; Localisation; Internationalisation

Abstract

Disclosed are an input method invoking method and invoking device, and a terminal, belonging to the technical field of information input. The input method invoking method comprises: acquiring a web page source code of a target web page; determining a language type of the target web page in accordance with the web page source code; and sending the determined language type to an operating system, so that the operating system invokes an input method corresponding to the language type. The prevent invention solves the problems that a user needs to manually switch and the use experience feeling is poor because the input method invoked by the operating system is the input method used by the user the last time or the default input method of the operating system after a browser receives an input signal of the user, and achieves the effects that the browser can send the determined language type of the target web page to the operating system, so that the operating system invokes the input method matched with the language type, thus facilitating the use of the user and improving the use experience of the user.

Description

输入法调用方法、 调用装置和终端  Input method calling method, calling device and terminal
本申请要求于 2013 年 04 月 28 日提交中国专利局、 申请号为 201310156487. 8、 名称为 "输入法调用方法、 调用装置和终端" 的中国专 利申请的优先权, 其全部内容通过引用结合在本申请中。 This application claims the priority of the Chinese Patent Application entitled "Input Method, Calling Device and Terminal", filed on April 28, 2013, with the application number of 201310156487. In this application.
技术领域 Technical field
本发明实施例涉及信息输入技术领域, 特别涉及一种输入法调用方法、 调用装置和终端。 背景技术  The embodiments of the present invention relate to the field of information input technologies, and in particular, to an input method calling method, a calling device, and a terminal. Background technique
浏览器是诸如智能手机、 台式电脑、平板电脑或者电子书阅读器之类的终 端中最常用的应用程序之一。用户可以在浏览器提供的各网页的输入框中输入 信息来实现与终端的人机交互。  A browser is one of the most commonly used applications in terminals such as smartphones, desktops, tablets, or e-book readers. The user can input information in the input box of each webpage provided by the browser to realize human-computer interaction with the terminal.
在用户输入信息的过程中, 输入法作为一种输入工具可以被调用。然而由 于输入法既可以支持一种语言种类输入, 也可以支持诸如中文、 英文、 日文或 韩文等多种语言种类输入, 当用户需要在浏览器提供的页面输入信息时,操作 系统可以调用上述语言种类中与任一语言种类对应的输入法。现有的一种输入 法调用方法, 包括: 在浏览器接收到用户的输入信号时, 浏览器发送触发信号 至操作系统,使得操作系统通过输入法接口调用用户前一次使用的输入法或者 操作系统默认的输入法。  The input method can be called as an input tool during the user input of information. However, since the input method can support one language type input, it can also support multiple language types such as Chinese, English, Japanese, or Korean. When the user needs to input information on the page provided by the browser, the operating system can call the above language. An input method corresponding to any language type in the category. An existing method for invoking an input method includes: when a browser receives an input signal of a user, the browser sends a trigger signal to the operating system, so that the operating system invokes an input method or an operating system used by the user through the input method interface. The default input method.
在实现本发明的过程中, 发明人发现现有技术至少存在如下问题: 由于用户在输入框中输入信息时,可能会根据不同的输入需求在输入框中 输入中文、 英文、 日文、 韩文等等, 而操作系统每次调用的输入法都是用户前 一次使用的输入法或者操作系统默认的输入法,与当前用户需要使用的输入法 可能并不匹配,所以这就导致用户需要手动将操作系统提供的输入法切换成当 前需要使用的输入法, 用户使用体验感较差。 发明内容 为了解决现有技术中操作系统提供的输入法与用户当前需要使用的输入 法不匹配, 用户需要手动切换、 使用体验感差的问题, 本发明实施例提供了一 种输入法调用方法、 调用装置和终端。 所述技术方案如下: In the process of implementing the present invention, the inventors have found that at least the following problems exist in the prior art: Since the user inputs information in the input box, the Chinese, English, Japanese, Korean, etc. may be input in the input box according to different input requirements. The input method that the operating system calls each time is the input method used by the user or the default input method of the operating system, which may not match the input method that the current user needs to use, so this requires the user to manually operate the operating system. The input method provided is switched to the input method currently needed, and the user experience is poor. Summary of the invention In order to solve the problem that the input method provided by the operating system in the prior art does not match the input method that the user currently needs to use, the user needs to manually switch and use the problem of poor experience. The embodiment of the present invention provides an input method calling method and a calling device. And terminal. The technical solution is as follows:
第一方面, 提供了一种输入法调用方法, 所述方法, 包括:  The first aspect provides an input method calling method, where the method includes:
获取目标网页的网页源码;  Get the source code of the webpage of the target webpage;
根据所述网页源码确定所述目标网页的语言种类;  Determining a language type of the target webpage according to the webpage source code;
将确定的所述语言种类发送至操作系统,以便所述操作系统调用与所述语 言种类对应的输入法。  The determined language category is sent to an operating system such that the operating system invokes an input method corresponding to the language category.
在第一方面的第一种可能的实现方式中,所述根据所述网页源码确定所述 目标网页的语言种类, 包括:  In a first possible implementation manner of the first aspect, the determining, according to the source code of the webpage, the language type of the target webpage, including:
检测所述网页源码中的字符编码方式;  Detecting a character encoding manner in the webpage source code;
根据检测到的所述字符编码方式确定所述目标网页的语言种类。  Determining the language type of the target webpage according to the detected character encoding manner.
在第一方面的第二种可能的实现方式中,所述根据所述网页源码确定所述 目标网页的语言种类, 包括:  In a second possible implementation manner of the first aspect, the determining, according to the source code of the webpage, the language type of the target webpage, including:
检测所述网页源码中的语言关键字,所述语言关键字包括所述网页源码中 用于标识所述目标网页的语言种类的字段;  Detecting a language keyword in the source code of the webpage, where the language keyword includes a field in the source code of the webpage for identifying a language category of the target webpage;
根据检测到的所述语言关键字确定所述目标网页的语言种类。  Determining the language type of the target webpage according to the detected language keyword.
在第一方面的第三种可能的实现方式中,所述根据所述网页源码确定所述 目标网页的语言种类, 包括:  In a third possible implementation manner of the first aspect, the determining, according to the source code of the webpage, the language type of the target webpage, including:
根据所述网页源码获取所述目标网页中每种语言种类的字符总个数; 将所述字符总个数最多的语言种类确定为所述目标网页的语言种类。 第二方面, 提供了一种输入法调用装置, 所述装置, 包括:  Obtaining, according to the webpage source code, a total number of characters of each language category in the target webpage; determining a language category with the total number of characters is the language type of the target webpage. In a second aspect, an input method calling device is provided, the device comprising:
信息获取模块, 用于获取目标网页的网页源码;  An information acquisition module, configured to obtain a webpage source code of the target webpage;
语言确定模块,用于根据所述信息获取模块获取到的所述网页源码确定所 述目标网页的语言种类;  a language determining module, configured to determine a language type of the target webpage according to the webpage source obtained by the information acquiring module;
输入法调用模块,用于将所述语言确定模块确定的所述语言种类发送至操 作系统, 以便所述操作系统调用与所述语言种类对应的输入法。  And an input method calling module, configured to send the language category determined by the language determining module to the operating system, so that the operating system invokes an input method corresponding to the language category.
在第二方面的第一种可能的实现方式中, 所述语言确定模块, 包括: 第一检测单元,用于检测所述信息获取模块获取的所述网页源码中的字符 编码方式; 第一确定单元,用于根据所述第一检测单元检测到的所述字符编码方式确 定所述目标网页的语言种类。 In a first possible implementation manner of the second aspect, the language determining module includes: a first detecting unit, configured to detect a character encoding manner in the webpage source code acquired by the information acquiring module; a first determining unit, configured to determine a language type of the target webpage according to the character encoding manner detected by the first detecting unit.
在第二方面的第二种可能的实现方式中, 所述语言确定模块, 包括: 第二检测单元,用于检测所述信息获取模块获取的所述网页源码中的语言 关键字,所述语言关键字包括所述网页源码中用于标识所述目标网页的语言种 类的字段;  In a second possible implementation manner of the second aspect, the language determining module includes: a second detecting unit, configured to detect a language keyword in the webpage source obtained by the information acquiring module, the language The keyword includes a field in the webpage source code for identifying a language category of the target webpage;
第二确定单元,用于根据所述第二检测单元检测到的所述语言关键字确定 所述目标网页的语言种类。  a second determining unit, configured to determine a language type of the target webpage according to the language keyword detected by the second detecting unit.
在第二方面的第三种可能的实现方式中, 所述语言确定模块, 包括: 个数获取单元,用于根据所述信息获取模块获取的所述网页源码获取所述 目标网页中每种语言种类的字符总个数;  In a third possible implementation of the second aspect, the language determining module includes: a number obtaining unit, configured to acquire each language in the target webpage according to the webpage source obtained by the information acquiring module The total number of characters of the category;
第三确定单元,用于将所述个数获取单元获取的所述字符总个数最多的语 言种类确定为所述目标网页的语言种类。  And a third determining unit, configured to determine a language type that is the largest number of the characters obtained by the number obtaining unit as a language type of the target webpage.
第三方面, 提供了一种终端, 所述终端包括上述输入法调用装置。  In a third aspect, a terminal is provided, and the terminal includes the above input method calling device.
本发明实施例提供的技术方案的有益效果是: 通过根据目标网页的网页源码来确定目标网页的语言种类,从而根据确定 的语言种类调用与语言种类对应的输入法;解决了当浏览器接收到用户的输入 信号之后,操作系统调用的输入法是用户前一次使用的输入法或者操作系统默 认的输入法, 从而导致用户需要手动切换、 使用体验感差的问题; 达到了浏览 器可以将确定的目标网页的语言种类发送至操作系统,使得操作系统调用与语 言种类相匹配的输入法, 从而方便了用户使用、 提高了用户使用体验的效果。 附图说明  The technical solution provided by the embodiment of the present invention has the beneficial effects of: determining the language type of the target webpage according to the webpage source code of the target webpage, thereby invoking an input method corresponding to the language category according to the determined language type; and solving when the browser receives After the user's input signal, the input method invoked by the operating system is the input method used by the user or the default input method of the operating system, which leads to the problem that the user needs to manually switch and use the experience; the browser can determine the The language type of the target webpage is sent to the operating system, so that the operating system invokes an input method that matches the language type, thereby facilitating the user to use and improving the effect of the user experience. DRAWINGS
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所 需要使用的附图作简单地介绍, 显而易见地, 下面描述中的附图仅仅是本发明 的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下, 还可以根据这些附图获得其他的附图。  In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly described below. It is obvious that the drawings in the following description are only some embodiments of the present invention. Other drawings may also be obtained from those of ordinary skill in the art in view of the drawings.
图 1是本发明实施例一提供的输入法调用方法的方法流程图;  1 is a flowchart of a method for calling an input method according to Embodiment 1 of the present invention;
图 2是本发明实施例二提供的输入法调用方法的方法流程图;  2 is a flowchart of a method for invoking an input method according to Embodiment 2 of the present invention;
图 3是本发明实施例三提供的输入法调用方法的方法流程图; 图 4是本发明实施例四提供的输入法调用方法的方法流程图; 图 5是本发明实施例五提供的输入法调用装置的结构方框图; 3 is a flowchart of a method for invoking an input method according to Embodiment 3 of the present invention; 4 is a flowchart of a method for invoking an input method according to Embodiment 4 of the present invention; FIG. 5 is a block diagram showing a structure of an input method calling device according to Embodiment 5 of the present invention;
图 6是本发明实施例六提供的输入法调用装置的结构方框图;  6 is a block diagram showing the structure of an input method calling apparatus according to Embodiment 6 of the present invention;
图 7是本发明实施例七提供的输入法调用装置的结构方框图; 图 8是本发明实施例八提供的输入法调用装置的结构方框图。 具体实施方式  Figure 7 is a block diagram showing the structure of an input method calling device according to Embodiment 7 of the present invention; and Figure 8 is a block diagram showing the structure of an input method calling device according to Embodiment 8 of the present invention. detailed description
为了使本发明的目的、技术方案和优点更加清楚, 下面将结合附图对本发 明作进一歩地详细描述, 显然, 所描述的实施例仅仅是本发明一部份实施例, 而不是全部的实施例。基于本发明中的实施例, 本领域普通技术人员在没有做 出创造性劳动前提下所获得的所有其它实施例, 都属于本发明保护的范围。 实施例一  The present invention will be described in detail with reference to the accompanying drawings, in which example. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention. Embodiment 1
请参考图 1, 其示出了本发明实施例一提供的输入法调用方法的方法流程 图, 该方法包括:  Please refer to FIG. 1, which is a flowchart of a method for invoking an input method according to Embodiment 1 of the present invention. The method includes:
歩骤 101, 获取目标网页的网页源码;  Step 101: Obtain a webpage source code of the target webpage;
歩骤 102, 根据网页源码确定目标网页的语言种类;  Step 102: Determine a language type of the target webpage according to the webpage source code;
歩骤 103, 将确定的语言种类发送至操作系统, 以便操作系统调用与语言 种类对应的输入法。  Step 103: Send the determined language category to the operating system, so that the operating system invokes an input method corresponding to the language type.
综上所述, 本实施例提供的输入法调用方法,通过根据目标网页的网页源 码来确定目标网页的语言种类,从而根据确定到的语言种类调用与语言种类对 应的输入法; 解决了当浏览器接收到用户的输入信号之后,操作系统调用的输 入法是用户前一次使用的输入法或者操作系统默认的输入法,从而导致用户需 要手动切换、使用体验感差的问题; 达到了浏览器可以将确定的目标网页的语 言种类发送至操作系统, 使得操作系统调用与语言种类相匹配的输入法, 从而 方便了用户使用、 提高了用户使用体验的效果。 由于上述 102的实现方式有多种,下面根据不同的实施例分别对各种实现 方式进行详细描述。  In summary, the input method calling method provided in this embodiment determines the language type of the target webpage according to the webpage source code of the target webpage, and invokes an input method corresponding to the language type according to the determined language type; After receiving the input signal of the user, the input method invoked by the operating system is the input method used by the user or the default input method of the operating system, thereby causing the user to manually switch and use the experience of poor experience; The language type of the determined target webpage is sent to the operating system, so that the operating system invokes an input method that matches the language type, thereby facilitating the user to use and improving the effect of the user experience. Since there are various implementations of the above 102, various implementation manners are respectively described in detail according to different embodiments.
实施例二 请参考图 2, 其示出了本发明实施例二提供的输入法调用方法的方法流程 图, 该方法可以应用于诸如智能手机、 台式电脑、平板电脑或者电子书阅读器 之类的终端浏览器中, 该方法包括: Embodiment 2 Please refer to FIG. 2, which is a flowchart of a method for invoking an input method according to Embodiment 2 of the present invention. The method can be applied to a terminal browser such as a smart phone, a desktop computer, a tablet computer or an e-book reader. The method includes:
歩骤 201, 获取目标网页的网页源码;  Step 201: Obtain a webpage source code of the target webpage;
用户在使用终端上的浏览器浏览网页时,浏览器可以根据目标网页的网页 地址获取目标网页的网页源码。  When the user browses the webpage using the browser on the terminal, the browser can obtain the webpage source code of the target webpage according to the webpage address of the target webpage.
歩骤 202, 检测网页源码中的字符编码方式;  Step 202: Detect a character encoding manner in a webpage source code;
由于可以在网页源码中通过定义字符编码方式的方法来定义目标网页的 语言种类,所以在浏览器获取到目标网页的网页源码之后, 浏览器可以检测网 页源码中的字符编码方式。其中,字符编码方式可以包括如下方式中的任一种: 中文编码 GBK、 中文编码 GB2312、 繁体中文编码 Big5、 日文编码 EUC-JP、 韩 文编码 EUC-KR以及通用编码 UTF-8。  Since the language type of the target web page can be defined by defining a character encoding method in the webpage source code, after the browser obtains the webpage source code of the target webpage, the browser can detect the character encoding mode in the webpage source code. The character encoding method may include any one of the following methods: Chinese encoding GBK, Chinese encoding GB2312, Traditional Chinese encoding Big5, Japanese encoding EUC-JP, Korean encoding EUC-KR, and universal encoding UTF-8.
比如, 目标网页的网页地址为 www. xyz. com, 浏览器获取到的该目标网页 的其中一段网页源码为:  For example, the webpage address of the target webpage is www.xyz.com, and the source code of one of the webpages of the target webpage obtained by the browser is:
<meta http_equiv=〃Content_Type〃 content="text/html; charset=gbk〃  <meta http_equiv=〃Content_Type〃 content="text/html; charset=gbk〃
则从该网页源码的 " charset=GBK"可以知道, 该目标网页采用中文简体 编码方式。 From the "charset=GBK" of the source code of the webpage, it can be known that the target webpage adopts Chinese simplified encoding.
歩骤 203, 根据检测到的字符编码方式确定目标网页的语言种类; 浏览器在检测得到目标网页的字符编码方式之后,可以根据检测到的字符 编码方式确定目标网页的语言种类。比如,浏览器得到目标网页 "漏. xyz. com " 的编码方式为中文简体编码,则浏览器可以确定该目标网页的语言种类为中文。 类似的, 如果浏览器检测到目标网页的编码方式为 " char set=EUC-JP" , 则浏 览器可以确定该目标网页的语言种类为日文, 在此本实施例不再赘述。 Step 203: Determine a language type of the target webpage according to the detected character encoding manner. After detecting the character encoding manner of the target webpage, the browser may determine the language type of the target webpage according to the detected character encoding manner. For example, if the browser obtains the encoding method of the target webpage "leak. xyz. com" as Chinese simplified encoding, the browser can determine that the language type of the target webpage is Chinese. Similarly, if the browser detects that the encoding of the target webpage is "ch ar se t=EUC-JP", the browser can determine that the language type of the target webpage is Japanese, which is not described in this embodiment.
歩骤 204, 将确定的语言种类发送至操作系统, 以便操作系统调用与语言 种类对应的输入法。  Step 204: Send the determined language category to the operating system, so that the operating system invokes an input method corresponding to the language type.
由于在一个网页中,用户在输入框中需要输入的信息的语言种类极大部分 都与网页的语言种类相同,也即用户需要使用的输入法的语言种类大多与网页 的语言种类相同, 所以在浏览器检测到目标网页的语言种类之后, 浏览器可以 将确定的语言种类通过输入法接口发送至操作系统,以便操作系统调用与语言 种类对应的输入法。 Since in a webpage, the language type of the information that the user needs to input in the input box is the same as the language type of the webpage, that is, the language type of the input method that the user needs to use is mostly the same as the language type of the webpage, so After the browser detects the language type of the target webpage, the browser can The determined language type is sent to the operating system through the input method interface, so that the operating system calls the input method corresponding to the language type.
具体地讲, 浏览器可以预先与操作系统为每种语言种类约定一个标识, 当 浏览器检测到目标网页的语言种类之后,将该语言种类对应的标识通过输入法 接口发送至操作系统,从而在操作系统接收到标识之后调用该标识对应的输入 法。比如,浏览器与操作系统约定中文、英文、 日文和韩文的标识分别为 ' 1、 2、 3、 4' , 则在浏览器检测到目标网页的语言种类为中文时, 浏览器可以将 中文对应的标识 ' 1 ' 通过输入法接口发送至操作系统, 从而在操作系统接收 到标识 ' 1 ' 之后调用标识 ' 1 ' 对应的中文输入法。  Specifically, the browser may pre-assign an identifier to the operating system for each language category. After the browser detects the language type of the target webpage, the identifier corresponding to the language category is sent to the operating system through the input method interface, thereby After the operating system receives the identifier, the input method corresponding to the identifier is called. For example, the browser and the operating system agree that the Chinese, English, Japanese, and Korean logos are '1, 2, 3, 4', respectively. When the browser detects that the language of the target webpage is Chinese, the browser can correspond to Chinese. The identifier ' 1 ' is sent to the operating system through the input method interface, so that the Chinese input method corresponding to the identifier ' 1 ' is called after the operating system receives the identifier ' 1 '.
需要补充说明的一点是,浏览器还可以将语言种类通过一个新增的输入法 接口发送至操作系统,并且约定操作系统优先调用与通过新增的输入法接口接 收到的语言种类对应的输入法。  It should be added that the browser can also send the language type to the operating system through a new input method interface, and the operating system preferentially invokes the input method corresponding to the language type received through the newly added input method interface. .
比如, 操作系统默认的输入法接口为 、 新增的输入法接口为 B, 则浏览 器在将检测到的语言种类的标识通过接口 B发送至操作系统之后,操作系统可 以调用标识对应的输入法,然而由于在浏览器提供的网页接收到输入信号之后, 操作系统也会通过默认接口 A调用输入法,所以此时可以约定操作系统优先通 过接口 B调用输入法。  For example, the default input method interface of the operating system is, and the new input method interface is B. After the browser sends the detected language type identifier to the operating system through the interface B, the operating system can invoke the input method corresponding to the identifier. However, since the operating system also calls the input method through the default interface A after receiving the input signal from the webpage provided by the browser, it is possible to agree that the operating system preferentially invokes the input method through the interface B.
需要补充说明的另一点是,本实施例只是以操作系统接收到浏览器发送的 语言种类时调用与语言种类对应的输入法为例,在具体实现时, 还可以在浏览 器接收到用户的输入信号之后调用与语言种类对应的输入法,本实施例对操作 系统调用与语言种类对应的输入法的时刻并不做限定。  Another point that needs to be supplemented is that the input method corresponding to the language type is used as an example when the operating system receives the language type sent by the browser. In the specific implementation, the user's input can also be received in the browser. After the signal, the input method corresponding to the language type is called. This embodiment does not limit the time when the operating system calls the input method corresponding to the language type.
综上所述, 本实施例提供的输入法调用方法,通过根据目标网页的网页源 码来确定目标网页的语言种类,从而根据确定到的语言种类调用与语言种类对 应的输入法; 解决了当浏览器接收到用户的输入信号之后,操作系统调用的输 入法是用户前一次使用的输入法或者操作系统默认的输入法,从而导致用户需 要手动切换、使用体验感差的问题; 达到了浏览器可以将确定的目标网页的语 言种类发送至操作系统, 使得操作系统调用与语言种类相匹配的输入法, 从而 方便了用户使用、提高了用户使用体验的效果。 同时在本实施例中, 通过检测 网页源码中的字符编码方式,从而根据字符编码方式确定目标网页的语言种类, 减少了用户在输入信息时将调用的输入法切换成需要使用的输入法的切换次 数, 达到了方便用户使用的效果。 实施例三 In summary, the input method calling method provided in this embodiment determines the language type of the target webpage according to the webpage source code of the target webpage, and invokes an input method corresponding to the language type according to the determined language type; After receiving the input signal of the user, the input method invoked by the operating system is the input method used by the user or the default input method of the operating system, thereby causing the user to manually switch and use the experience of poor experience; Sending the determined language type of the target webpage to the operating system, so that the operating system invokes an input method that matches the language type, thereby facilitating the user to use and improving the effect of the user experience. At the same time, in the embodiment, by detecting the character encoding mode in the webpage source code, the language type of the target webpage is determined according to the character encoding manner, and the switching of the input method called when the user inputs the information into the input method to be used is reduced. Times The number has reached the effect of user convenience. Embodiment 3
请参考图 3, 其示出了本发明实施例三提供的输入法调用方法的方法流程 图, 该方法可以应用于诸如智能手机、 台式电脑、平板电脑或者电子书阅读器 之类的终端浏览器中, 该方法包括:  Please refer to FIG. 3, which is a flowchart of a method for invoking an input method according to Embodiment 3 of the present invention. The method can be applied to a terminal browser such as a smart phone, a desktop computer, a tablet computer or an e-book reader. The method includes:
歩骤 301, 获取目标网页的网页源码;  Step 301: Obtain a webpage source code of the target webpage;
用户在使用终端上的浏览器浏览网页时,浏览器可以根据目标网页的网页 地址获取目标网页的网页源码。  When the user browses the webpage using the browser on the terminal, the browser can obtain the webpage source code of the target webpage according to the webpage address of the target webpage.
歩骤 302, 检测网页源码中的语言关键字;  Step 302: detecting a language keyword in a webpage source code;
由于可以在网页源码中通过语言关键字来标识目标网页的语言种类,所以 在浏览器获取到目标网页的网页源码之后,浏览器可以检测网页源码中的语言 关键字。其中,语言关键字包括网页源码中用于标识目标网页的语言种类的字 段。  Since the language type of the target webpage can be identified by the language keyword in the webpage source code, after the browser obtains the webpage source code of the target webpage, the browser can detect the language keyword in the webpage source code. The language keyword includes a field in the webpage source code for identifying the language type of the target webpage.
比如, 目标网页的网页地址为 www. xxxx. com, 浏览器获取的该目标网页 的其中一段网页源码为:  For example, the webpage address of the target webpage is www.xxxx.com, and the source code of one of the webpages of the target webpage obtained by the browser is:
<META http_equiv=,, content-language " content=〃 ja〃〉  <META http_equiv=,, content-language " content=〃 ja〃>
则根据上述网页源码可以知道标识目标网页语言种类的字段也即语言关 键字为 ' content ja〃 ' 。  According to the above webpage source code, the field identifying the language type of the target webpage, that is, the language keyword is 'content ja〃'.
需要补充说明的是,不同网页采用的网页源码的编程方式可以相同也可以 不同, 这也就是说,在不同的网页源码中定义语言关键字的方式可以相同也可 以不同, 本实施例只是以上述实现方式为例, 在具体实现时还可以通过 " g-strlanguageld=en"等方式来定义, 本实施例对此不再赘述。  It should be added that the programming method of the webpage source code used by different webpages may be the same or different. That is to say, the manner of defining the language keywords in different webpage source codes may be the same or different, and the embodiment is only the above. As an example, the implementation may be defined by a method such as "g-strlanguageld=en", which is not described in this embodiment.
歩骤 303, 根据检测到的语言关键字确定目标网页的语言种类;  Step 303: Determine a language type of the target webpage according to the detected language keyword.
浏览器在检测到目标网页的语言关键字之后,可以根据检测到的语言关键 字确定目标网页的语言种类。 比如, 浏览器检测到目标网页 www. xxxx. com的 语言关键字为 " content="ja" " ,所以浏览器可以知道该目标网页的语言种类 为日文。类似的, 当浏览器检测到的语言关键字为 " C Ontent="cn" " , 则目标 网页的语言种类为中文; 当浏览器检测到的语言关键字为 " content="en" " , 则目标网页的语言种类为英文, 在此不再赘述。 歩骤 304, 将确定的语言种类发送至操作系统, 以便操作系统调用与语言 种类对应的输入法。 After detecting the language keyword of the target webpage, the browser can determine the language type of the target webpage according to the detected language keyword. For example, the browser detects that the language keyword of the target webpage www. xxxx.com is "content="ja"" , so the browser can know that the language of the target webpage is Japanese. Similarly, when the language keyword detected by the browser is " CO nt en t=" cn "" , the language of the target webpage is Chinese; when the language keyword detected by the browser is "cont e nt="en "" , the language of the target page is English, and will not be described here. Step 304: Send the determined language category to the operating system, so that the operating system invokes an input method corresponding to the language category.
由于在一个网页中,用户在输入框中需要输入的信息的语言种类极大部分 都与网页的语言种类相同,也即用户需要使用的输入法的语言种类大多与网页 的语言种类相同, 所以在浏览器检测到目标网页的语言种类之后, 浏览器可以 将确定的语言种类通过输入法接口发送至操作系统,以便操作系统调用与语言 种类对应的输入法。  Since in a webpage, the language type of the information that the user needs to input in the input box is the same as the language type of the webpage, that is, the language type of the input method that the user needs to use is mostly the same as the language type of the webpage, so After the browser detects the language type of the target webpage, the browser can send the determined language type to the operating system through the input method interface, so that the operating system invokes the input method corresponding to the language type.
需要补充说明的一点是,浏览器还可以将语言种类通过一个新增的输入法 接口发送至操作系统,并且约定操作系统优先调用与通过新增的输入法接口接 收到的语言种类对应的输入法。  It should be added that the browser can also send the language type to the operating system through a new input method interface, and the operating system preferentially invokes the input method corresponding to the language type received through the newly added input method interface. .
需要补充说明的另一点是,本实施例只是以操作系统接收到浏览器发送的 语言种类时调用与语言种类对应的输入法为例,在具体实现时, 还可以在浏览 器接收到用户的输入信号之后调用与语言种类对应的输入法,本实施例对操作 系统调用与语言种类对应的输入法的时刻并不做限定。  Another point that needs to be supplemented is that the input method corresponding to the language type is used as an example when the operating system receives the language type sent by the browser. In the specific implementation, the user's input can also be received in the browser. After the signal, the input method corresponding to the language type is called. This embodiment does not limit the time when the operating system calls the input method corresponding to the language type.
综上所述, 本实施例提供的输入法调用方法,通过根据目标网页的网页源 码来确定目标网页的语言种类,从而根据确定到的语言种类调用与语言种类对 应的输入法; 解决了当浏览器接收到用户的输入信号之后,操作系统调用的输 入法是用户前一次使用的输入法或者操作系统默认的输入法,从而导致用户需 要手动切换、使用体验感差的问题; 达到了浏览器可以将确定的目标网页的语 言种类发送至操作系统, 使得操作系统调用与语言种类相匹配的输入法, 从而 方便了用户使用、提高了用户使用体验的效果。 同时在本实施例中, 通过检测 网页源码中的语言关键字, 从而根据语言关键字确定目标网页的语言种类,减 少了用户在输入信息时将调用的输入法切换成需要使用的输入法的切换次数, 达到了方便用户使用的效果。 实施例四  In summary, the input method calling method provided in this embodiment determines the language type of the target webpage according to the webpage source code of the target webpage, and invokes an input method corresponding to the language type according to the determined language type; After receiving the input signal of the user, the input method invoked by the operating system is the input method used by the user or the default input method of the operating system, thereby causing the user to manually switch and use the experience of poor experience; Sending the determined language type of the target webpage to the operating system, so that the operating system invokes an input method that matches the language type, thereby facilitating the user to use and improving the effect of the user experience. At the same time, in the embodiment, by detecting the language keyword in the webpage source code, the language type of the target webpage is determined according to the language keyword, and the switching of the input method that the user invokes when inputting the information to the input method to be used is reduced. The number of times has reached the effect of user convenience. Embodiment 4
请参考图 4, 其示出了本发明实施例四提供的输入法调用方法的方法流程 图, 该方法可以应用于诸如智能手机、 台式电脑、平板电脑或者电子书阅读器 之类的终端浏览器中, 该方法包括:  Please refer to FIG. 4, which is a flowchart of a method for invoking an input method according to Embodiment 4 of the present invention, which can be applied to a terminal browser such as a smart phone, a desktop computer, a tablet computer or an e-book reader. The method includes:
歩骤 401, 获取目标网页的网页源码; 用户在使用终端上的浏览器浏览网页时,浏览器可以根据目标网页的网页 地址获取目标网页的网页源码。 Step 401: Obtain a webpage source code of the target webpage; When the user browses the webpage by using the browser on the terminal, the browser can obtain the webpage source code of the target webpage according to the webpage address of the target webpage.
歩骤 402, 根据所述网页源码获取目标网页中每种语言种类的字符总个数; 在浏览器获取到目标网页的网页源码之后,浏览器可以对网页源码进行解 析, 从而根据网页源码中设置的内容进行显示。这也就是说, 在浏览器对网页 源码进行解析的过程中, 浏览器可以获取到目标网页中的所有字符,所以浏览 器可以根据网页源码获取目标网页中每种语言种类的字符总个数。具体地, 浏 览器可以分别计算目标网页中所有中文字符对应的字符总个数、所有英文字符 对应的字符总个数以及所有日文字符对应的字符总个数等等。  Step 402: Obtain a total number of characters of each language category in the target webpage according to the webpage source code; after the browser obtains the webpage source code of the target webpage, the browser may parse the webpage source code, thereby setting according to the webpage source code The content is displayed. That is to say, in the process of parsing the source code of the webpage by the browser, the browser can obtain all the characters in the target webpage, so the browser can obtain the total number of characters of each language category in the target webpage according to the webpage source code. Specifically, the browser can separately calculate the total number of characters corresponding to all Chinese characters in the target webpage, the total number of characters corresponding to all English characters, and the total number of characters corresponding to all Japanese characters.
歩骤 403, 将字符总个数最多的语言种类确定为目标网页的语言种类; 在浏览器计算各语言种类字符串的字符个数之后,浏览器可以选择其中字 符总个数最多的语言种类作为目标网页的语言种类。 比如, 在网页地址为 www. yyy. com的目标网页中, 浏览器计算得到所有中文字符对应的字符总个数 为 ' 102 ' 、所有英文字符对应的字符总个数为 ' 239 ' 以及所有日文字符对应 的字符总个数为 ' 15 ' 个,所以此时浏览器可以将英文确定为目标网页的语言 种类。  Step 403, determining the language type with the largest number of characters as the language type of the target webpage; after the browser calculates the number of characters of each language type string, the browser can select the language type in which the total number of characters is the most The language of the landing page. For example, in the target webpage whose webpage address is www.yyy.com, the browser calculates that the total number of characters corresponding to all Chinese characters is '102', the total number of characters corresponding to all English characters is '239' and all Japanese The total number of characters corresponding to a character is '15', so at this time the browser can determine English as the language type of the target webpage.
歩骤 404, 将确定的语言种类发送至操作系统, 以便操作系统调用与语言 种类对应的输入法。  Step 404: Send the determined language category to the operating system, so that the operating system invokes an input method corresponding to the language type.
由于在一个网页中,用户在输入框中需要输入的信息的语言种类极大部分 都与网页的语言种类相同,也即用户需要使用的输入法的语言种类大多与网页 的语言种类相同, 所以在浏览器检测到目标网页的语言种类之后, 浏览器可以 将确定的语言种类通过输入法接口发送至操作系统,以便操作系统调用与语言 种类对应的输入法。  Since in a webpage, the language type of the information that the user needs to input in the input box is the same as the language type of the webpage, that is, the language type of the input method that the user needs to use is mostly the same as the language type of the webpage, so After the browser detects the language type of the target webpage, the browser can send the determined language type to the operating system through the input method interface, so that the operating system invokes the input method corresponding to the language type.
需要补充说明的一点是,浏览器还可以将语言种类通过一个新增的输入法 接口发送至操作系统,并且约定操作系统优先调用与通过新增的输入法接口接 收到的语言种类对应的输入法。  It should be added that the browser can also send the language type to the operating system through a new input method interface, and the operating system preferentially invokes the input method corresponding to the language type received through the newly added input method interface. .
需要补充说明的另一点是,本实施例只是以操作系统接收到浏览器发送的 语言种类时调用与语言种类对应的输入法为例,在具体实现时, 还可以在浏览 器接收到用户的输入信号之后调用与语言种类对应的输入法,本实施例对操作 系统调用与语言种类对应的输入法的时刻并不做限定。 综上所述, 本实施例提供的输入法调用方法,通过根据目标网页的网页源 码来确定目标网页的语言种类,从而根据确定到的语言种类调用与语言种类对 应的输入法; 解决了当浏览器接收到用户的输入信号之后,操作系统调用的输 入法是用户前一次使用的输入法或者操作系统默认的输入法,从而导致用户需 要手动切换、使用体验感差的问题; 达到了浏览器可以将确定的目标网页的语 言种类发送至操作系统, 使得操作系统调用与语言种类相匹配的输入法, 从而 方便了用户使用、提高了用户使用体验的效果。 同时在本实施例中, 通过根据 网页源码来计算各语言种类字符串的字符个数,并将字符个数最多的字符串对 应的语言种类确定为目标网页的语言种类,从而使得确定的语言种类更加贴近 目标网页的实际显示的语言种类,减少了用户在输入信息时将调用的输入法切 换成需要使用的输入法的切换次数, 达到了方便用户使用的效果。 需要补充说明的是,本实施例只是以每个目标网页只是用一种语言种类检 测方法,在具体实现时, 还可以同时使用其中的两种或者三种的组合来确定目 标网页的语言种类, 本实施例对此并不做限定。 并且, 本实施例也只是以其中 的三种语言种类确定方法为例,在具体实现时还可以通过其他方法来确定目标 网页的语言种类, 并将确定的语言种类发送至操作系统, 使得操作系统调用与 语言种类对应的输入法, 本实施例对语言种类的确定方法并不做限定。 实施例五 Another point that needs to be supplemented is that the input method corresponding to the language type is used as an example when the operating system receives the language type sent by the browser. In the specific implementation, the user's input can also be received in the browser. After the signal, the input method corresponding to the language type is called. This embodiment does not limit the time when the operating system calls the input method corresponding to the language type. In summary, the input method calling method provided in this embodiment determines the language type of the target webpage according to the webpage source code of the target webpage, and invokes an input method corresponding to the language type according to the determined language type; After receiving the input signal of the user, the input method invoked by the operating system is the input method used by the user or the default input method of the operating system, thereby causing the user to manually switch and use the experience of poor experience; Sending the determined language type of the target webpage to the operating system, so that the operating system invokes an input method that matches the language type, thereby facilitating the user to use and improving the effect of the user experience. In the embodiment, the number of characters of each language type character string is calculated according to the webpage source code, and the language type corresponding to the character string having the largest number of characters is determined as the language type of the target webpage, thereby determining the language type. The language type that is actually displayed closer to the target webpage reduces the number of times the user inputs the input method to the number of times the input method needs to be used when inputting the information, thereby achieving the effect of facilitating the user. It should be noted that, in this embodiment, only one language type detection method is used for each target webpage. In a specific implementation, two or three of the combinations may be simultaneously used to determine the language type of the target webpage. This embodiment does not limit this. In addition, the embodiment only takes the three language category determination methods as an example. In the specific implementation, the language type of the target webpage may be determined by other methods, and the determined language category is sent to the operating system, so that the operating system The input method corresponding to the language type is called, and the method for determining the language type is not limited in this embodiment. Embodiment 5
请参考图 5, 其示出了本发明实施例五提供的输入法调用装置的结构方框 图, 该输入法调用装置, 包括: 信息获取模块 510、 语言确定模块 520和输入 法调用模块 530;  Referring to FIG. 5, it is a block diagram showing the structure of an input method calling device according to Embodiment 5 of the present invention. The input method calling device includes: an information obtaining module 510, a language determining module 520, and an input method calling module 530;
信息获取模块 510, 用于获取目标网页的网页源码;  The information obtaining module 510 is configured to obtain a webpage source code of the target webpage;
语言确定模块 520, 用于根据所述信息获取模块 510获取到的所述网页源 码确定所述目标网页的语言种类;  a language determining module 520, configured to determine, according to the webpage source code acquired by the information acquiring module 510, a language type of the target webpage;
输入法调用模块 530, 用于将所述语言确定模块 520确定的所述语言种类 发送至操作系统, 以便所述操作系统调用与所述语言种类对应的输入法。  The input method calling module 530 is configured to send the language category determined by the language determining module 520 to an operating system, so that the operating system invokes an input method corresponding to the language category.
综上所述, 本实施例提供的输入法调用装置,通过根据目标网页的网页源 码来确定目标网页的语言种类,从而根据确定到的语言种类调用与语言种类对 应的输入法; 解决了当浏览器接收到用户的输入信号之后,操作系统调用的输 入法是用户前一次使用的输入法或者操作系统默认的输入法,从而导致用户需 要手动切换、使用体验感差的问题; 达到了浏览器可以将确定的目标网页的语 言种类发送至操作系统, 使得操作系统调用与语言种类相匹配的输入法, 从而 方便了用户使用、 提高了用户使用体验的效果。 实施例六 In summary, the input method calling apparatus provided in this embodiment determines the language type of the target webpage according to the webpage source code of the target webpage, and invokes the language type pair according to the determined language type. The input method is solved; after the browser receives the input signal from the user, the input method invoked by the operating system is the input method used by the user or the default input method of the operating system, thereby causing the user to manually switch and use the experience. Poor problem; The browser can send the determined language type of the target web page to the operating system, so that the operating system calls the input method that matches the language type, thereby facilitating the user to use and improving the user experience. Embodiment 6
请参考图 6, 其示出了本发明实施例六提供的输入法调用装置的结构方框 图,该装置包括:信息获取模块 510、语言确定模块 520和输入法调用模块 530; 信息获取模块 510, 用于获取目标网页的网页源码;  Please refer to FIG. 6 , which is a structural block diagram of an input method calling device provided by Embodiment 6 of the present invention. The device includes: an information acquiring module 510, a language determining module 520, and an input method calling module 530. The information acquiring module 510 is used by Obtaining the source code of the webpage of the target webpage;
语言确定模块 520, 用于根据所述信息获取模块 510获取到的所述网页源 码确定所述目标网页的语言种类;  a language determining module 520, configured to determine, according to the webpage source code acquired by the information acquiring module 510, a language type of the target webpage;
输入法调用模块 530, 用于将所述语言确定模块 520确定的所述语言种类 发送至操作系统, 以便所述操作系统调用与所述语言种类对应的输入法。  The input method calling module 530 is configured to send the language category determined by the language determining module 520 to an operating system, so that the operating system invokes an input method corresponding to the language category.
具体地讲, 所述语言确定模块 520, 可以包括: 第一检测单元 521和第一 确定单元 522 ;  Specifically, the language determining module 520 may include: a first detecting unit 521 and a first determining unit 522;
第一检测单元 521, 用于检测所述信息获取模块 510获取的所述网页源码 中的字符编码方式;  a first detecting unit 521, configured to detect a character encoding manner in the webpage source code acquired by the information acquiring module 510;
第一确定单元 522, 用于根据所述第一检测单元 521检测到的所述字符编 码方式确定所述目标网页的语言种类。  The first determining unit 522 is configured to determine a language type of the target webpage according to the character encoding manner detected by the first detecting unit 521.
综上所述, 本实施例提供的输入法调用装置,通过根据目标网页的网页源 码来确定目标网页的语言种类,从而根据确定到的语言种类调用与语言种类对 应的输入法; 解决了当浏览器接收到用户的输入信号之后,操作系统调用的输 入法是用户前一次使用的输入法或者操作系统默认的输入法,从而导致用户需 要手动切换、使用体验感差的问题; 达到了浏览器可以将确定的目标网页的语 言种类发送至操作系统, 使得操作系统调用与语言种类相匹配的输入法, 从而 方便了用户使用、提高了用户使用体验的效果。 同时在本实施例中, 通过检测 网页源码中的字符编码方式,从而根据字符编码方式确定目标网页的语言种类, 减少了用户在输入信息时将调用的输入法切换成需要使用的输入法的切换次 数, 达到了方便用户使用的效果。 实施例七 In summary, the input method calling apparatus provided in this embodiment determines the language type of the target webpage according to the webpage source code of the target webpage, and invokes an input method corresponding to the language type according to the determined language type; After receiving the input signal of the user, the input method invoked by the operating system is the input method used by the user or the default input method of the operating system, thereby causing the user to manually switch and use the experience of poor experience; Sending the determined language type of the target webpage to the operating system, so that the operating system invokes an input method that matches the language type, thereby facilitating the user to use and improving the effect of the user experience. At the same time, in the embodiment, by detecting the character encoding mode in the webpage source code, the language type of the target webpage is determined according to the character encoding manner, and the switching of the input method called when the user inputs the information into the input method to be used is reduced. The number of times has reached the effect of user convenience. Example 7
请参考图 7, 其示出了本发明实施例七提供的输入法调用装置的结构方框 图, 该输入法调用装置, 包括: 信息获取模块 510、 语言确定模块 520和输入 法调用模块 530;  Referring to FIG. 7, FIG. 7 is a block diagram showing the structure of an input method calling device according to Embodiment 7 of the present invention. The input method calling device includes: an information acquiring module 510, a language determining module 520, and an input method calling module 530;
信息获取模块 510, 用于获取目标网页的网页源码;  The information obtaining module 510 is configured to obtain a webpage source code of the target webpage;
语言确定模块 520, 用于根据所述信息获取模块 510获取到的所述网页源 码确定所述目标网页的语言种类;  a language determining module 520, configured to determine, according to the webpage source code acquired by the information acquiring module 510, a language type of the target webpage;
输入法调用模块 530, 用于将所述语言确定模块 520确定的所述语言种类 发送至操作系统, 以便所述操作系统调用与所述语言种类对应的输入法。  The input method calling module 530 is configured to send the language category determined by the language determining module 520 to an operating system, so that the operating system invokes an input method corresponding to the language category.
具体地讲, 所述语言确定模块 520, 可以包括: 第二检测单元 523和第二 确定单元 524;  Specifically, the language determining module 520 may include: a second detecting unit 523 and a second determining unit 524;
第二检测单元 523, 用于检测所述信息获取模块 510获取的所述网页源码 中的语言关键字,所述语言关键字包括所述网页源码中用于标识所述目标网页 的语言种类的字段;  a second detecting unit 523, configured to detect a language keyword in the webpage source code acquired by the information acquiring module 510, where the language keyword includes a field in the webpage source code for identifying a language category of the target webpage ;
第二确定单元 524, 用于根据所述第二检测单元 523检测到的所述语言关 键字确定所述目标网页的语言种类。  The second determining unit 524 is configured to determine a language type of the target webpage according to the language keyword detected by the second detecting unit 523.
综上所述, 本实施例提供的输入法调用装置,通过根据目标网页的网页源 码来确定目标网页的语言种类,从而根据确定到的语言种类调用与语言种类对 应的输入法; 解决了当浏览器接收到用户的输入信号之后,操作系统调用的输 入法是用户前一次使用的输入法或者操作系统默认的输入法,从而导致用户需 要手动切换、使用体验感差的问题; 达到了浏览器可以将确定的目标网页的语 言种类发送至操作系统, 使得操作系统调用与语言种类相匹配的输入法, 从而 方便了用户使用、提高了用户使用体验的效果。 同时在本实施例中, 通过检测 网页源码中的语言关键字, 从而根据语言关键字确定目标网页的语言种类,减 少了用户在输入信息时将调用的输入法切换成需要使用的输入法的切换次数, 达到了方便用户使用的效果。 实施例八  In summary, the input method calling apparatus provided in this embodiment determines the language type of the target webpage according to the webpage source code of the target webpage, and invokes an input method corresponding to the language type according to the determined language type; After receiving the input signal of the user, the input method invoked by the operating system is the input method used by the user or the default input method of the operating system, thereby causing the user to manually switch and use the experience of poor experience; Sending the determined language type of the target webpage to the operating system, so that the operating system invokes an input method that matches the language type, thereby facilitating the user to use and improving the effect of the user experience. At the same time, in the embodiment, by detecting the language keyword in the webpage source code, the language type of the target webpage is determined according to the language keyword, and the switching of the input method that the user invokes when inputting the information to the input method to be used is reduced. The number of times has reached the effect of user convenience. Example eight
请参考图 8, 其示出了本发明实施例八提供的输入法调用装置的结构方框 图,该结构输入法调用装置,可以包括:信息获取模块 510、语言确定模块 520 和输入法调用模块 530; Please refer to FIG. 8 , which shows a structural block of an input method calling device according to Embodiment 8 of the present invention. The structure input method calling device may include: an information obtaining module 510, a language determining module 520, and an input method calling module 530;
信息获取模块 510, 用于获取目标网页的网页源码;  The information obtaining module 510 is configured to obtain a webpage source code of the target webpage;
语言确定模块 520, 用于根据所述信息获取模块 510获取到的所述网页源 码确定所述目标网页的语言种类;  a language determining module 520, configured to determine, according to the webpage source code acquired by the information acquiring module 510, a language type of the target webpage;
输入法调用模块 530, 用于将所述语言确定模块 520确定的所述语言种类 发送至操作系统, 以便所述操作系统调用与所述语言种类对应的输入法。  The input method calling module 530 is configured to send the language category determined by the language determining module 520 to an operating system, so that the operating system invokes an input method corresponding to the language category.
具体地讲, 所述语言确定模块 520, 可以包括: 个数获取单元 525和第三 确定单元 526;  Specifically, the language determining module 520 may include: a number obtaining unit 525 and a third determining unit 526;
个数获取单元 525, 用于根据所述信息获取模块 510获取的所述网页源码 获取所述目标网页中每种语言种类的字符总个数;  a number obtaining unit 525, configured to obtain, according to the webpage source obtained by the information acquiring module 510, a total number of characters of each language category in the target webpage;
第三确定单元 526, 用于将所述个数获取单元 525获取的所述字符总个数 最多的语言种类确定为所述目标网页的语言种类。  The third determining unit 526 is configured to determine, as the language type of the target webpage, the language type that is the largest number of the characters acquired by the number obtaining unit 525.
综上所述, 本实施例提供的输入法调用装置,通过根据目标网页的网页源 码来确定目标网页的语言种类,从而根据确定到的语言种类调用与语言种类对 应的输入法; 解决了当浏览器接收到用户的输入信号之后,操作系统调用的输 入法是用户前一次使用的输入法或者操作系统默认的输入法,从而导致用户需 要手动切换、使用体验感差的问题; 达到了浏览器可以将确定的目标网页的语 言种类发送至操作系统, 使得操作系统调用与语言种类相匹配的输入法, 从而 方便了用户使用、提高了用户使用体验的效果。 同时在本实施例中, 通过根据 网页源码来计算各语言种类字符串的字符个数,并将字符个数最多的字符串对 应的语言种类确定为目标网页的语言种类,从而使得确定的语言种类更加贴近 目标网页的实际显示的语言种类,减少了用户在输入信息时将调用的输入法切 换成需要使用的输入法的切换次数, 达到了方便用户使用的效果。 需要说明的是: 上述实施例提供的输入法调用装置在调用输入法时, 仅以 上述各功能模块的划分进行举例说明, 实际应用中, 可以根据需要而将上述功 能分配由不同的功能模块完成, 即将设备的内部结构划分成不同的功能模块, 以完成以上描述的全部或者部分功能。另外, 上述实施例提供的输入法调用装 置与输入法调用方法的方法实施例属于同一构思,其具体实现过程详见方法实 施例, 这里不再赘述。 上述本发明实施例序号仅仅为了描述, 不代表实施例的优劣。 In summary, the input method calling apparatus provided in this embodiment determines the language type of the target webpage according to the webpage source code of the target webpage, and invokes an input method corresponding to the language type according to the determined language type; After receiving the input signal of the user, the input method invoked by the operating system is the input method used by the user or the default input method of the operating system, thereby causing the user to manually switch and use the experience of poor experience; Sending the determined language type of the target webpage to the operating system, so that the operating system invokes an input method that matches the language type, thereby facilitating the user to use and improving the effect of the user experience. In the embodiment, the number of characters of each language type character string is calculated according to the webpage source code, and the language type corresponding to the character string having the largest number of characters is determined as the language type of the target webpage, thereby determining the language type. The language type that is actually displayed closer to the target webpage reduces the number of times the user inputs the input method to the number of times the input method needs to be used when inputting the information, thereby achieving the effect of facilitating the user. It should be noted that: when the input method is invoked, the input method calling device provided by the foregoing embodiment is only illustrated by the division of each functional module. In actual applications, the function allocation may be completed by different functional modules as needed. , the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the input method calling device provided by the above embodiment is the same concept as the method embodiment of the input method calling method, and the specific implementation process is detailed in the method. The example is not repeated here. The serial numbers of the embodiments of the present invention are merely for the description, and do not represent the advantages and disadvantages of the embodiments.
本领域普通技术人员可以理解实现上述实施例的全部或部分歩骤可以通 过硬件来完成, 也可以通过程序来指令相关的硬件完成,所述的程序可以存储 于一种计算机可读存储介质中, 上述提到的存储介质可以是只读存储器,磁盘 或光盘等。 以上所述仅为本发明的较佳实施例, 并不用以限制本发明, 凡在本发明的 精神和原则之内, 所作的任何修改、 等同替换、 改进等, 均应包含在本发明的 保护范围之内。  A person skilled in the art may understand that all or part of the steps of implementing the foregoing embodiments may be completed by hardware, or may be instructed by a program to execute related hardware, and the program may be stored in a computer readable storage medium. The above mentioned storage medium may be a read only memory, a magnetic disk or an optical disk or the like. The above is only the preferred embodiment of the present invention, and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., which are within the spirit and scope of the present invention, should be included in the protection of the present invention. Within the scope.

Claims

权 利 要 求 书 claims
1、 一种输入法调用方法, 其特征在于, 所述方法包括: 1. An input method calling method, characterized in that the method includes:
获取目标网页的网页源码; Obtain the web page source code of the target web page;
根据所述网页源码确定所述目标网页的语言种类; Determine the language type of the target web page based on the web page source code;
将确定的所述语言种类发送至操作系统,以便所述操作系统调用与所述语 言种类对应的输入法。 The determined language type is sent to the operating system, so that the operating system calls the input method corresponding to the language type.
2、 根据权利要求 1所述的输入法调用方法, 其特征在于, 所述根据所述 网页源码确定所述目标网页的语言种类, 包括: 2. The input method calling method according to claim 1, wherein the determining the language type of the target web page based on the web page source code includes:
检测所述网页源码中的字符编码方式; Detect the character encoding method in the source code of the web page;
根据检测到的所述字符编码方式确定所述目标网页的语言种类。 The language type of the target web page is determined according to the detected character encoding method.
3、 根据权利要求 1所述的输入法调用方法, 其特征在于, 所述根据所述 网页源码确定所述目标网页的语言种类, 包括: 3. The input method calling method according to claim 1, wherein the determining the language type of the target web page based on the web page source code includes:
检测所述网页源码中的语言关键字,所述语言关键字包括所述网页源码中 用于标识所述目标网页的语言种类的字段; Detecting language keywords in the web page source code, where the language keywords include fields in the web page source code used to identify the language type of the target web page;
根据检测到的所述语言关键字确定所述目标网页的语言种类。 The language type of the target web page is determined according to the detected language keyword.
4、 根据权利要求 1所述的输入法调用方法, 其特征在于, 所述根据所述 网页源码确定所述目标网页的语言种类, 包括: 4. The input method calling method according to claim 1, wherein the determining the language type of the target web page based on the web page source code includes:
根据所述网页源码获取所述目标网页中每种语言种类的字符总个数; 将所述字符总个数最多的语言种类确定为所述目标网页的语言种类。 The total number of characters of each language type in the target web page is obtained according to the web page source code; and the language type with the largest total number of characters is determined as the language type of the target web page.
5、 一种输入法调用装置, 其特征在于, 所述装置包括: 5. An input method calling device, characterized in that the device includes:
信息获取模块, 用于获取目标网页的网页源码; Information acquisition module, used to obtain the web page source code of the target web page;
语言确定模块,用于根据所述信息获取模块获取到的所述网页源码确定所 述目标网页的语言种类; A language determination module, configured to determine the language type of the target web page based on the web page source code obtained by the information acquisition module;
输入法调用模块,用于将所述语言确定模块确定的所述语言种类发送至操 作系统, 以便所述操作系统调用与所述语言种类对应的输入法。 The input method calling module is configured to send the language type determined by the language determining module to the operating system, so that the operating system calls the input method corresponding to the language type.
6、 根据权利要求 5所述的输入法调用装置, 其特征在于, 所述语言确定 模块, 包括: 6. The input method calling device according to claim 5, characterized in that the language determination module includes:
第一检测单元,用于检测所述信息获取模块获取的所述网页源码中的字符 编码方式; The first detection unit is used to detect the character encoding method in the web page source code obtained by the information acquisition module;
第一确定单元,用于根据所述第一检测单元检测到的所述字符编码方式确 定所述目标网页的语言种类。 The first determining unit is configured to determine the language type of the target web page according to the character encoding method detected by the first detecting unit.
7、 根据权利要求 5所述的输入法调用装置, 其特征在于, 所述语言确定 模块, 包括: 7. The input method calling device according to claim 5, characterized in that the language determination module includes:
第二检测单元,用于检测所述信息获取模块获取的所述网页源码中的语言 关键字,所述语言关键字包括所述网页源码中用于标识所述目标网页的语言种 类的字段; The second detection unit is used to detect the language keyword in the web page source code obtained by the information acquisition module. The language keyword includes a field in the web page source code used to identify the language type of the target web page;
第二确定单元,用于根据所述第二检测单元检测到的所述语言关键字确定 所述目标网页的语言种类。 The second determination unit is configured to determine the language type of the target web page according to the language keyword detected by the second detection unit.
8、 根据权利要求 5所述的输入法调用装置, 其特征在于, 所述语言确定 模块, 包括: 8. The input method calling device according to claim 5, characterized in that the language determination module includes:
个数获取单元,用于根据所述信息获取模块获取的所述网页源码获取所述 目标网页中每种语言种类的字符总个数; A number acquisition unit, configured to acquire the total number of characters of each language type in the target web page according to the web page source code acquired by the information acquisition module;
第三确定单元,用于将所述个数获取单元获取的所述字符总个数最多的语 言种类确定为所述目标网页的语言种类。 The third determining unit is configured to determine the language type with the largest total number of characters obtained by the number obtaining unit as the language type of the target web page.
9、 一种终端, 其特征在于, 所述终端包括如权利要求 5至 8任一所述的 输入法调用装置。 9. A terminal, characterized in that the terminal includes an input method calling device as described in any one of claims 5 to 8.
PCT/CN2014/076330 2013-04-28 2014-04-28 Input method invoking method and invoking device, and terminal WO2014177033A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310156487.8 2013-04-28
CN2013101564878A CN103294547A (en) 2013-04-28 2013-04-28 Input method calling method, input method calling device and terminal

Publications (1)

Publication Number Publication Date
WO2014177033A1 true WO2014177033A1 (en) 2014-11-06

Family

ID=49095478

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/076330 WO2014177033A1 (en) 2013-04-28 2014-04-28 Input method invoking method and invoking device, and terminal

Country Status (2)

Country Link
CN (1) CN103294547A (en)
WO (1) WO2014177033A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104391622A (en) * 2014-12-11 2015-03-04 厦门美图移动科技有限公司 Input method rapid-setting method for input box

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103294547A (en) * 2013-04-28 2013-09-11 华为终端有限公司 Input method calling method, input method calling device and terminal
CN107748737A (en) * 2017-11-17 2018-03-02 深圳市泉眼网络科技有限公司 A kind of word editing method and device
CN109947517B (en) * 2019-03-22 2022-06-24 海信视像科技股份有限公司 Method for Web application to call UI input method in display equipment
CN110427238A (en) * 2019-07-30 2019-11-08 北京航天发射技术研究所 A kind of software is multilingual to show and inputs method for synchronously switching, system, terminal and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102436454A (en) * 2010-09-29 2012-05-02 腾讯科技(深圳)有限公司 Input method switching method and system for browser
CN102577334A (en) * 2009-10-14 2012-07-11 高通股份有限公司 Method and apparatus for the automatic predictive selection of input methods for web browsers
CN103294547A (en) * 2013-04-28 2013-09-11 华为终端有限公司 Input method calling method, input method calling device and terminal

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4773671B2 (en) * 2002-07-24 2011-09-14 富士通セミコンダクター株式会社 Input method using a pointing device
CN101706690A (en) * 2009-12-07 2010-05-12 北京搜狗科技发展有限公司 Adaptive input method and adaptive input system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102577334A (en) * 2009-10-14 2012-07-11 高通股份有限公司 Method and apparatus for the automatic predictive selection of input methods for web browsers
CN102436454A (en) * 2010-09-29 2012-05-02 腾讯科技(深圳)有限公司 Input method switching method and system for browser
CN103294547A (en) * 2013-04-28 2013-09-11 华为终端有限公司 Input method calling method, input method calling device and terminal

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104391622A (en) * 2014-12-11 2015-03-04 厦门美图移动科技有限公司 Input method rapid-setting method for input box

Also Published As

Publication number Publication date
CN103294547A (en) 2013-09-11

Similar Documents

Publication Publication Date Title
TWI690812B (en) Method, device and client for dynamic layout of page elements
CN110020292B (en) Webpage content extraction method and terminal equipment
CN107861713B (en) Data calling method and device and computer readable storage medium
US9886430B2 (en) Entity based content selection
RU2727063C1 (en) Service processing method and device
US9027837B2 (en) Method of recognizing QR code in image data and apparatus and method for converting QR code in content data into touchable object
US20170083495A1 (en) Method for Modifying Webpage and Apparatus for Modifying Webpage
CN106021421B (en) method and device for accelerating webpage rendering
US10091607B2 (en) Electronic device pairing
WO2016177341A1 (en) Interface calling method and device, and terminal
CN104484193A (en) Method and device for rapidly starting application program
WO2014177033A1 (en) Input method invoking method and invoking device, and terminal
KR102274561B1 (en) Transaction system error detection method, apparatus, storage medium and computer device
CN107679214B (en) Link positioning method, device, terminal and computer readable storage medium
CN101526963A (en) Method for identifying web page coding, device and terminal equipment
WO2014154033A1 (en) Method and apparatus for extracting web page content
CN107045546B (en) Webpage processing method and device and intelligent terminal
WO2020119409A1 (en) List positioning method and apparatus, and device and storage medium
US10120846B2 (en) System and method for displaying online comments
JP6859504B2 (en) Methods, devices and terminal devices for extracting data
US10628031B2 (en) Control instruction identification method and apparatus, and storage medium
US10996845B2 (en) Method, application, browser, and electronic device for providing webpage content
CN103336666A (en) HID one-touch internet access method and HID using same
CN102902751A (en) Webpage input method and device in mobile terminal and mobile terminal
CN106657316B (en) Message withdrawing method and device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14791607

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14791607

Country of ref document: EP

Kind code of ref document: A1