CN110502126B - Input method and electronic equipment - Google Patents
Input method and electronic equipment Download PDFInfo
- Publication number
- CN110502126B CN110502126B CN201910661615.1A CN201910661615A CN110502126B CN 110502126 B CN110502126 B CN 110502126B CN 201910661615 A CN201910661615 A CN 201910661615A CN 110502126 B CN110502126 B CN 110502126B
- Authority
- CN
- China
- Prior art keywords
- input
- result
- data
- user
- electronic device
- 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.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/02—Input arrangements using manually operated switches, e.g. using keyboards or dials
- G06F3/023—Arrangements for converting discrete items of information into a coded form, e.g. arrangements for interpreting keyboard generated codes as alphanumeric codes, operand codes or instruction codes
- G06F3/0233—Character input methods
-
- G—PHYSICS
- G10—MUSICAL INSTRUMENTS; ACOUSTICS
- G10L—SPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
- G10L15/00—Speech recognition
- G10L15/26—Speech to text systems
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computational Linguistics (AREA)
- Health & Medical Sciences (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Acoustics & Sound (AREA)
- Multimedia (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
Description
技术领域Technical field
本申请涉及电子设备技术领域,尤其涉及一种输入方法及电子设备。The present application relates to the technical field of electronic equipment, and in particular, to an input method and electronic equipment.
背景技术Background technique
输入法应用(input method application,IMA),也可称为输入法引擎(inputmethod engine,IME),或输入法编辑器(input method editor,IME),其是用于实现字词输入的软件。目前,比较常用的输入法应用有华为输入法、搜狗输入法、百度输入法等。通过在手机等终端中安装输入法应用,可以辅助用户在终端中实现字词的输入。现有的输入法应用汇总通常可以为用户提供多种输入方式,包括键盘输入方式、语音输入方式、图像扫描输入方式等,为用户提供了便利。Input method application (IMA), also known as input method engine (IME), or input method editor (IME), is software used to implement word input. Currently, the more commonly used input method applications include Huawei input method, Sogou input method, Baidu input method, etc. By installing input method applications in terminals such as mobile phones, users can be assisted to input words in the terminal. A summary of existing input method applications can usually provide users with multiple input methods, including keyboard input, voice input, image scanning input, etc., providing convenience to users.
但是,用户采用某种输入方式输入过的内容,在用户采用另外一种方式输入时可能无法准确输入,导致用户输入效率低。例如,用户采用键盘输入方式输入过一个人名“章三”,在用户采用语音输入方式输入音节序列zhang’san时,可能会被识别成“张三”,而不是用户所期望的“章三”。此时用户需要在编辑框中手动将“张”修改成“章”。此过程操作繁琐,用户体验差。However, the content that the user has input using a certain input method may not be accurately input when the user inputs using another method, resulting in low user input efficiency. For example, if the user has entered a name "Zhang San" using the keyboard input method, when the user inputs the syllable sequence zhang'san using the voice input method, it may be recognized as "Zhang San" instead of the "Zhang San" expected by the user. . At this time, the user needs to manually change "Zhang" into "Zhang" in the edit box. This process is cumbersome and the user experience is poor.
发明内容Contents of the invention
本申请实施例提供了一种输入方法及电子设备,可以提升用户的输入效率。Embodiments of the present application provide an input method and electronic device, which can improve user input efficiency.
第一方面,本申请实施例提供了一种输入方法,包括:接收用户采用第一输入方式输入的第一数据;根据上述第一数据确定目标结果,上述目标结果为上述用户采用第二输入方式输入第二数据的历史选择结果,上述第一数据与上述第二数据对应的音节序列相同,上述目标结果与上述音节序列对应的通用结果不同;在目标输入界面中显示上述目标结果。In a first aspect, embodiments of the present application provide an input method, including: receiving first data input by a user using a first input method; determining a target result based on the first data, where the target result is the user using a second input method. Input the historical selection result of the second data, the syllable sequence corresponding to the above-mentioned first data and the above-mentioned second data is the same, and the above-mentioned target result is different from the general result corresponding to the above-mentioned syllable sequence; the above-mentioned target result is displayed in the target input interface.
本申请实施例可以融合用户采用不同的输入方式输入的数据,使用户的使用习惯不受不同输入方式的影响,在用户的使用习惯与大众使用习惯不同的情况下,无论用户采用何种输入方式均可使输出的结果更加符合用户自身的使用习惯,提升用户的输入效率。The embodiments of the present application can integrate data input by users using different input methods, so that the user's usage habits are not affected by different input methods. When the user's usage habits are different from those of the public, no matter what input method the user uses, This can make the output results more in line with the user's own usage habits and improve the user's input efficiency.
在一种可能的实现方式中,上述根据上述第一数据确定目标结果包括:根据上述第一数据查找第一语言库,输出第一结果;上述第一语言库为多种输入方式对应的语言库;根据上述第一数据查找第二语言库,输出第二结果;其中,上述第二语言库为根据上述第二数据产生的语言库;根据上述第一结果及上述第二结果确定目标结果。In a possible implementation, determining the target result based on the first data includes: searching a first language library based on the first data and outputting the first result; the first language library is a language library corresponding to multiple input methods. ; Search the second language library according to the above-mentioned first data and output the second result; wherein the above-mentioned second language library is a language library generated according to the above-mentioned second data; determine the target result according to the above-mentioned first result and the above-mentioned second result.
本申请实施例可以融合使用该电子设备的用户采用不同的输入方式输入的数据,在不同的输入方式中共享数据,增强电子设备对输入数据的处理能力,使输出的结果与现有相比更加符合用户的使用习惯,提升用户的输入效率。Embodiments of the present application can integrate data input by users of the electronic device using different input methods, share data in different input methods, enhance the processing capabilities of the electronic device for input data, and make the output results more efficient than existing ones. It conforms to the user's usage habits and improves the user's input efficiency.
在一种可能的实现方式中,上述第一语言库及上述第二语言库均包括字词、上述字词对应的音节序列及上述字词对应的词频;上述第二语言库中的音节序列对应的词频最高的字词与上述第一语言库中上述音节序列对应的词频最高的字词不同。In a possible implementation, both the first language library and the second language library include words, syllable sequences corresponding to the words, and word frequencies corresponding to the words; the syllable sequences in the second language library correspond to The word with the highest word frequency is different from the word with the highest word frequency corresponding to the above-mentioned syllable sequence in the above-mentioned first language library.
本申请实施例中,第二语言库可以记录用户自身的使用习惯,且用户自身的使用习惯与大众的使用习惯不同。综合考虑用户自身的使用习惯及大众的使用习惯,使输出的结果更加准确。In the embodiment of the present application, the second language library can record the user's own usage habits, and the user's own usage habits are different from the public's usage habits. Comprehensively consider the user's own usage habits and the usage habits of the public to make the output results more accurate.
在一种可能的实现方式中,上述第二语言库中的字词对应的音节序列为上述第一数据对应的音节序列的一部分。In a possible implementation, the syllable sequence corresponding to the word in the second language library is part of the syllable sequence corresponding to the first data.
在一种可能的实现方式中,上述第一数据对应的音节序列为上述第二语言库中的字词对应的音节序列的一部分。In a possible implementation, the syllable sequence corresponding to the first data is part of the syllable sequence corresponding to the words in the second language library.
在一种可能的实现方式中,第一输入方式为语音输入方式,第二输入方式为键盘输入方式、图像输入方式及手写输入方式中的至少一种。In a possible implementation, the first input method is a voice input method, and the second input method is at least one of a keyboard input method, an image input method, and a handwriting input method.
本申请实施例可以将用户采用键盘输入方式、图像输入方式及手写输入方式输入的数据共享给语音输入方式,可以提高语音识别的准确率,提高用户的输入效率。Embodiments of the present application can share data input by users using keyboard input, image input, and handwriting input to the voice input method, which can improve the accuracy of speech recognition and improve the user's input efficiency.
在另外一种可能的实现方式中,第一输入方式为键盘输入方式,第二输入方式为语音输入方式、图像输入方式及手写输入方式中的至少一种。In another possible implementation, the first input method is a keyboard input method, and the second input method is at least one of a voice input method, an image input method, and a handwriting input method.
本申请实施例可以将语音输入方式、图像输入方式及手写输入方式输入的数据共享给语音输入方式,可以提高键盘输入的准确率,提高用户的输入效率。Embodiments of the present application can share data input by the voice input method, image input method, and handwriting input method to the voice input method, which can improve the accuracy of keyboard input and improve the user's input efficiency.
在另外一种可能的实现方式中,第二结果为空,目标结果为第一结果。In another possible implementation, the second result is empty and the target result is the first result.
可能地,第二结果为空即为第二结果不存在。Possibly, the second result being empty means that the second result does not exist.
本申请实施例中,在第二结果不存在的情况下,输出结果以第一结果为准。第一结果为根据多名用户的使用习惯产生的结果,符合大多数用户的使用习惯。In the embodiment of this application, if the second result does not exist, the output result shall be based on the first result. The first result is a result generated based on the usage habits of multiple users, which is in line with the usage habits of most users.
在另外一种可能的实现方式中,第二结果不为空,目标结果为第二结果。In another possible implementation, the second result is not empty, and the target result is the second result.
本申请实施例中,在第二结果存在的情况下,输出结果以第二结果为准。第二结果为根据使用该电子设备的使用习惯产生的结构,更加符合该用户的使用习惯,保证输出结果的准确性,提升用户输入的效率,提升用户体验。In the embodiment of this application, if the second result exists, the output result shall be based on the second result. The second result is a structure generated based on the usage habits of the electronic device, which is more in line with the usage habits of the user, ensuring the accuracy of the output results, improving the efficiency of user input, and improving the user experience.
第二方面,本申请实施例提供了一种电子设备,包括:一个或多个处理器、存储器以及无线通信模块;上述存储器以及上述无线通信模块与一个或多个处理器耦合,上述存储器用于存储计算机程序代码,上述计算机程序代码包括计算机指令,当上述一个或多个处理器执行上述计算机指令时,电子设备执行:接收用户采用第一输入方式输入的数据;根据上述第一数据确定目标结果,上述目标结果为上述用户采用第二输入方式输入第二数据的历史选择结果,上述第一数据与上述第二数据对应的音节序列相同,上述目标结果与上述音节序列对应的通用结果不同;在目标输入界面中显示上述目标结果。In a second aspect, embodiments of the present application provide an electronic device, including: one or more processors, memories, and wireless communication modules; the above-mentioned memory and the above-mentioned wireless communication module are coupled with one or more processors, and the above-mentioned memory is used to Store computer program code. The computer program code includes computer instructions. When the one or more processors execute the computer instructions, the electronic device performs: receiving data input by the user using the first input method; determining a target result based on the first data. , the above-mentioned target result is the historical selection result of the above-mentioned user inputting the second data using the second input method, the above-mentioned first data and the above-mentioned second data correspond to the same syllable sequence, the above-mentioned target result is different from the general result corresponding to the above-mentioned syllable sequence; in The above target results are displayed in the target input interface.
在一种可能的实现方式中,电子设备执行上述根据上述第一数据确定目标结果时具体执行:根据上述第一数据查找第一语言库,输出第一结果;第一语言库是多种输入方式对应的语言库;根据上述第一数据查找第二语言库,输出第二结果;第二语言库为根据上述第二数据产生的语言库;根据第一结果及上述第二结果确定目标结果。In a possible implementation, when the electronic device performs the above-mentioned determination of the target result based on the above-mentioned first data, it specifically performs: searching the first language library according to the above-mentioned first data, and outputting the first result; the first language library is a variety of input methods The corresponding language library; searches the second language library according to the above-mentioned first data, and outputs the second result; the second language library is a language library generated according to the above-mentioned second data; and determines the target result according to the first result and the above-mentioned second result.
在一种可能的实现方式中,上述第一语言库及上述第二语言库均包括字词、上述字词对应的音节序列及上述字词对应的词频;上述第二语言库中的音节序列对应的词频最高的字词与上述第一语言库中上述音节序列对应的词频最高的字词不同。In a possible implementation, both the first language library and the second language library include words, syllable sequences corresponding to the words, and word frequencies corresponding to the words; the syllable sequences in the second language library correspond to The word with the highest word frequency is different from the word with the highest word frequency corresponding to the above-mentioned syllable sequence in the above-mentioned first language library.
在一种可能的实现方式中,上述第二语言库中的字词对应的音节序列为上述第一数据对应的音节序列的一部分。In a possible implementation, the syllable sequence corresponding to the word in the second language library is part of the syllable sequence corresponding to the first data.
在一种可能的实现方式中,上述第一数据对应的音节序列为上述第二语言库中的字词对应的音节序列的一部分。In a possible implementation, the syllable sequence corresponding to the first data is part of the syllable sequence corresponding to the words in the second language library.
在一种可能的实现方式中,第一输入方式为语音输入方式,第二输入方式为键盘输入方式、图像输入方式及手写输入方式中的至少一种。In a possible implementation, the first input method is a voice input method, and the second input method is at least one of a keyboard input method, an image input method, and a handwriting input method.
在另外一种可能的实现方式中,第一输入方式为键盘输入方式,第二输入方式为语音输入方式、图像输入方式及手写输入方式中的至少一种。In another possible implementation, the first input method is a keyboard input method, and the second input method is at least one of a voice input method, an image input method, and a handwriting input method.
在另外一种可能的实现方式中,第二结果为空,目标结果为第一结果。In another possible implementation, the second result is empty and the target result is the first result.
在另外一种可能的实现方式中,第二结果不为空,目标结果为第二结果。In another possible implementation, the second result is not empty, and the target result is the second result.
第三方面,本申请实施例提供了一种电子设备,包括:输入模块、确定模块及显示模块。其中:输入模块用于接收用户采用第一输入方式输入的第一数据;确定模块用于根据上述第一数据确定目标结果,上述目标结果为上述用户采用第二输入方式输入第二数据的历史选择结果,上述第一数据与上述第二数据对应的音节序列相同,上述目标结果与上述音节序列对应的通用结果不同;显示模块用于在目标输入界面中显示上述目标结果。In a third aspect, embodiments of the present application provide an electronic device, including: an input module, a determination module, and a display module. Among them: the input module is used to receive the first data input by the user using the first input method; the determination module is used to determine the target result based on the above-mentioned first data, and the above-mentioned target result is the historical selection of the above-mentioned user inputting the second data using the second input method. As a result, the syllable sequence corresponding to the above-mentioned first data and the above-mentioned second data are the same, and the above-mentioned target result is different from the general result corresponding to the above-mentioned syllable sequence; the display module is used to display the above-mentioned target result in the target input interface.
在一种可能的实现方式中,上述确定模块包括第一查找单元、第二查找单元及确定单元;其中,第一查找单元用于根据输入模块接收的第一数据输出第一结果;第一语言库是多种输入方式对应的语言库;第二查找单元用于根据输入模块接收的第一数据输出第二结果;第二语言库为根据上述第二数据产生的语言库;确定单元用于根据第一结果和第二结果确定目标结果。In a possible implementation, the above-mentioned determination module includes a first search unit, a second search unit and a determination unit; wherein the first search unit is used to output the first result according to the first data received by the input module; the first language The library is a language library corresponding to multiple input methods; the second search unit is used to output the second result according to the first data received by the input module; the second language library is a language library generated based on the above-mentioned second data; the determination unit is used to output the second result according to the first data received by the input module. The first result and the second result determine the target result.
在一种可能的实现方式中,上述第一语言库及上述第二语言库均包括字词、上述字词对应的音节序列及上述字词对应的词频;上述第二语言库中的音节序列对应的词频最高的字词与上述第一语言库中上述音节序列对应的词频最高的字词不同。In a possible implementation, both the first language library and the second language library include words, syllable sequences corresponding to the words, and word frequencies corresponding to the words; the syllable sequences in the second language library correspond to The word with the highest word frequency is different from the word with the highest word frequency corresponding to the above-mentioned syllable sequence in the above-mentioned first language library.
在一种可能的实现方式中,上述第二语言库中的字词对应的音节序列为上述第一数据对应的音节序列的一部分。In a possible implementation, the syllable sequence corresponding to the word in the second language library is part of the syllable sequence corresponding to the first data.
在一种可能的实现方式中,上述第一数据对应的音节序列为上述第二语言库中的字词对应的音节序列的一部分。In a possible implementation, the syllable sequence corresponding to the first data is part of the syllable sequence corresponding to the words in the second language library.
在一种可能的实现方式中,第一输入方式为语音输入方式,第二输入方式为键盘输入方式、图像输入方式及手写输入方式中的至少一种。In a possible implementation, the first input method is a voice input method, and the second input method is at least one of a keyboard input method, an image input method, and a handwriting input method.
在另外一种可能的实现方式中,第一输入方式为键盘输入方式,第二输入方式为语音输入方式、图像输入方式及手写输入方式中的至少一种。In another possible implementation, the first input method is a keyboard input method, and the second input method is at least one of a voice input method, an image input method, and a handwriting input method.
在另外一种可能的实现方式中,第二结果为空,目标结果为第一结果。In another possible implementation, the second result is empty and the target result is the first result.
在另外一种可能的实现方式中,第二结果不为空,目标结果为第二结果。In another possible implementation, the second result is not empty, and the target result is the second result.
第四方面,本申请实施例提供了一种计算机存储介质,包括计算机指令,当计算机指令在电子设备上运行时,使得电子设备执行如第一方面或第一方面的任意一种实现方式提供的输入方法。In a fourth aspect, embodiments of the present application provide a computer storage medium that includes computer instructions. When the computer instructions are run on an electronic device, the electronic device causes the electronic device to execute the method provided in the first aspect or any implementation of the first aspect. Input method.
第五方面,本申请实施例提供一种计算机程序产品,当计算机程序产品在电子设备上运行时,使得电子设备执行如第一方面或第一方面的任意一种实现方式提供的输入方法。In a fifth aspect, embodiments of the present application provide a computer program product, which when the computer program product is run on an electronic device, causes the electronic device to execute the input method provided in the first aspect or any implementation of the first aspect.
可以理解地,上述提供的第二方面上述的电子设备、第三方面上述的电子设备、第四方面上述的计算机存储介质或者第五方面上述的计算机程序产品均用于执行第一方面所提供的输入方法。因此,其所能达到的有益效果可参考对应方法中的有益效果,此处不再赘述。It can be understood that the electronic device mentioned above in the second aspect, the electronic device mentioned in the third aspect, the computer storage medium mentioned in the fourth aspect or the computer program product mentioned in the fifth aspect are all used to execute the method provided in the first aspect. Input method. Therefore, the beneficial effects it can achieve can be referred to the beneficial effects in the corresponding methods, and will not be described again here.
附图说明Description of the drawings
图1为本申请实施例提供的电子设备的硬件结构示意图;Figure 1 is a schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present application;
图2A-图2C为本申请实施例涉及的应用场景示意图;Figures 2A-2C are schematic diagrams of application scenarios involved in embodiments of the present application;
图3A-图3D为本申请实施例提供的键盘输入方式的用户界面示意图;Figures 3A to 3D are schematic diagrams of the user interface of the keyboard input method provided by the embodiment of the present application;
图4为本申请实施例提供的语音输入示意图;Figure 4 is a schematic diagram of voice input provided by an embodiment of the present application;
图5为本申请实施例提供的语音输入结果示意图;Figure 5 is a schematic diagram of the voice input results provided by the embodiment of the present application;
图6A-图6G为本申请实施例提供的图像扫描输入方式的用户界面示意图;6A-6G are schematic user interface diagrams of the image scanning input method provided by the embodiment of the present application;
图7为本申请另一实施例提供的电子设备的结构示意图;Figure 7 is a schematic structural diagram of an electronic device provided by another embodiment of the present application;
图8为本申请实施例提供的一种输入方法流程示意图;Figure 8 is a schematic flow chart of an input method provided by an embodiment of the present application;
图9为本申请实施例提供的一种具体的输入方法流程示意图。Figure 9 is a schematic flowchart of a specific input method provided by an embodiment of the present application.
具体实施方式Detailed ways
下面将结合附图对本申请实施例中的技术方案进行清楚、详尽地描述。The technical solutions in the embodiments of the present application will be described clearly and in detail below with reference to the accompanying drawings.
本申请实施例提供了一种输入方法,可以在输入法的各输入方式之间共享数据,提高语音输入的识别准确率。也即是说,采用键盘输入过的文字或图像输入过的文字,再次通过语音输入时都可以识别出来,从而提高语音输入的识别准确率。Embodiments of the present application provide an input method that can share data between input methods of the input method and improve the recognition accuracy of voice input. That is to say, text input using a keyboard or text input using an image can be recognized when input via voice input again, thereby improving the recognition accuracy of voice input.
本申请实施例中涉及的电子设备可以是便携式移动终端,例如手机、平板电脑、上网本、个人数字助理(Personal Digital Assistant,PDA)、可穿戴电子设备(如智能手环、智能手表等)、虚拟现实设备等。The electronic devices involved in the embodiments of this application may be portable mobile terminals, such as mobile phones, tablet computers, netbooks, personal digital assistants (Personal Digital Assistants, PDAs), wearable electronic devices (such as smart bracelets, smart watches, etc.), virtual Real equipment, etc.
本申请实施例中涉及的电子设备可以包括输入法应用。该输入法应用可以是系统应用,也可以是第三方应用。电子设备中还可以包括一个或多个具有输入框的应用。该具有输入框的应用可以是系统应用,如短信息、日历等,也可以是第三方应用,如脸书(Facebook)、亚马逊、地图、音乐播放器等。用户可以使用输入法应用在具有输入框的应用的输入框中实现字词输入。The electronic device involved in the embodiment of the present application may include an input method application. The input method application can be a system application or a third-party application. The electronic device may also include one or more applications with input boxes. The application with the input box can be a system application, such as short message, calendar, etc., or a third-party application, such as Facebook, Amazon, map, music player, etc. Users can use an input method application to input words in the input box of an application that has an input box.
接下来,介绍本申请以下实施例中提供的示例性电子设备。Next, exemplary electronic devices provided in the following embodiments of the present application are introduced.
图1示出了电子设备100的结构示意图。FIG. 1 shows a schematic structural diagram of an electronic device 100 .
电子设备100可以包括处理器110,内部存储器120,USB接口130、充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,摄像头191以及显示屏192等。其中传感器模块180可以包括陀螺仪传感器180A,加速度传感器180B,距离传感器180C,指纹传感器180D,温度传感器180E,触摸传感器180F等。The electronic device 100 may include a processor 110, an internal memory 120, a USB interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, and an audio module 170, Speaker 170A, receiver 170B, microphone 170C, headphone interface 170D, sensor module 180, buttons 190, camera 191, display screen 192, etc. The sensor module 180 may include a gyroscope sensor 180A, an acceleration sensor 180B, a distance sensor 180C, a fingerprint sensor 180D, a temperature sensor 180E, a touch sensor 180F, etc.
可以理解的是,本申请实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100 . In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figures, or some components may be combined, some components may be separated, or some components may be arranged differently. The components illustrated may be implemented in hardware, software, or a combination of software and hardware.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processingunit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (GPU), an image signal processor ( image signal processor (ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processing unit (NPU), etc. Among them, different processing units can be independent devices or integrated in one or more processors.
控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The controller can generate operation control signals based on the instruction operation code and timing signals to complete the control of fetching and executing instructions.
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in processor 110 is cache memory. This memory may hold instructions or data that have been recently used or recycled by processor 110 . If the processor 110 needs to use the instructions or data again, it can be called directly from the memory. Repeated access is avoided and the waiting time of the processor 110 is reduced, thus improving the efficiency of the system.
充电管理模块140用于从充电器接收充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备供电。The charging management module 140 is used to receive charging input from the charger. While the charging management module 140 charges the battery 142, it can also provide power to the electronic device through the power management module 141.
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器120,显示屏192,摄像头191,和无线通信模块160等供电。The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charging management module 140 and supplies power to the processor 110, the internal memory 120, the display screen 192, the camera 191, the wireless communication module 160, and the like.
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 may be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。The mobile communication module 150 can provide solutions for wireless communication including 2G/3G/4G/5G applied on the electronic device 100 . The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves through the antenna 1, perform filtering, amplification and other processing on the received electromagnetic waves, and transmit them to the modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves through the antenna 1 for radiation.
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wirelesslocal area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。The wireless communication module 160 can provide applications on the electronic device 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), Bluetooth (bluetooth, BT), and global navigation satellite system. (global navigation satellite system, GNSS), frequency modulation (FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions.
电子设备100通过GPU,显示屏192,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏192和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The electronic device 100 implements display functions through a GPU, a display screen 192, an application processor, and the like. The GPU is an image processing microprocessor and is connected to the display screen 192 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
显示屏192用于显示图像,视频等。显示屏192包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emittingdiode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrixorganic light emitting diode 的,AMOLED),柔性发光二极管(flex light-emittingdiode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot lightemitting diodes,QLED)等。本申请实施例中,显示屏192可以用于显示用户采用各种输入方式输入的数据对应的结果。The display screen 192 is used to display images, videos, etc. Display 192 includes a display panel. The display panel can use a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light emitting diode or an active matrix organic light emitting diode (active-matrix organic light emitting diode). (AMOLED), flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diodes (QLED), etc. In this embodiment of the present application, the display screen 192 may be used to display results corresponding to data input by the user using various input methods.
摄像头191用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。本申请实施例中摄像头191可以用于拍摄用户采用图像扫描输入方式输入的包含文本信息的图片,以使电子设备识别该图片中的文本信息,并将该文本信息显示在显示屏192中。Camera 191 is used to capture still images or video. The object passes through the lens to produce an optical image that is projected onto the photosensitive element. The photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to convert it into a digital image signal. ISP outputs digital image signals to DSP for processing. DSP converts digital image signals into standard RGB, YUV and other format image signals. In this embodiment of the present application, the camera 191 can be used to capture a picture containing text information input by the user using an image scanning input method, so that the electronic device can recognize the text information in the picture and display the text information on the display screen 192 .
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备100的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can continuously learn by itself. Intelligent cognitive applications of the electronic device 100 can be implemented through the NPU, such as image recognition, face recognition, speech recognition, text understanding, etc.
内部存储器120可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。内部存储器120可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器120可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器110通过运行存储在内部存储器120的指令,和/或存储在设置于处理器中的存储器的指令,执行电子设备100的各种功能应用以及数据处理。本申请实施例中,内部存储器120可以用于存储第一语言库及第二语言库,以使电子设备100根据用户输入的数据分别查找第一语言库及第二语言库,得到目标结果,并通过显示屏192将目标结果显示出来。Internal memory 120 may be used to store computer executable program code, which includes instructions. The internal memory 120 may include a program storage area and a data storage area. Among them, the stored program area can store an operating system, at least one application program required for a function (such as a sound playback function, an image playback function, etc.). The storage data area may store data created during use of the electronic device 100 (such as audio data, phone book, etc.). In addition, the internal memory 120 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, a flash memory device, universal flash storage (UFS), and the like. The processor 110 executes various functional applications and data processing of the electronic device 100 by executing instructions stored in the internal memory 120 and/or instructions stored in a memory provided in the processor. In the embodiment of the present application, the internal memory 120 can be used to store the first language library and the second language library, so that the electronic device 100 searches the first language library and the second language library respectively according to the data input by the user, obtains the target result, and The target results are displayed through the display screen 192 .
电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。The electronic device 100 can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor. Such as music playback, recording, etc.
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. Audio module 170 may also be used to encode and decode audio signals.
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备100可以通过扬声器170A收听音乐,或收听免提通话。Speaker 170A, also called "speaker", is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music through the speaker 170A, or listen to hands-free calls.
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当电子设备100接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。Receiver 170B, also called "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 answers a call or a voice message, the voice can be heard by bringing the receiver 170B close to the human ear.
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。本申请实施例中,麦克风170C可以用于采集用户输入的音频信号,以使电子设备将音频信号输入到声学模型中。Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak close to the microphone 170C with the human mouth and input the sound signal to the microphone 170C. In this embodiment of the present application, the microphone 170C can be used to collect audio signals input by the user, so that the electronic device can input the audio signals into the acoustic model.
耳机接口170D用于连接有线耳机。The headphone interface 170D is used to connect wired headphones.
陀螺仪传感器180A可以用于确定电子设备100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180A确定电子设备100围绕三个轴(即,x,y和z轴)的角速度。The gyro sensor 180A may be used to determine the motion posture of the electronic device 100 . In some embodiments, the angular velocity of electronic device 100 about three axes (ie, x, y, and z axes) may be determined by gyro sensor 180A.
加速度传感器180B可检测电子设备100在各个方向上(一般为三轴)加速度的大小。The acceleration sensor 180B can detect the acceleration of the electronic device 100 in various directions (generally three axes).
距离传感器180C,用于测量距离。电子设备100可以通过红外或激光测量距离。Distance sensor 180C, used to measure distance. Electronic device 100 can measure distance via infrared or laser.
指纹传感器180D用于采集指纹。电子设备100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。The fingerprint sensor 180D is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to achieve fingerprint unlocking, access to application locks, fingerprint photography, fingerprint answering of incoming calls, etc.
温度传感器180E用于检测温度。Temperature sensor 180E is used to detect temperature.
触摸传感器180F,也称“触控器件”。触摸传感器180F可以设置于显示屏192,由触摸传感器180F与显示屏192组成触摸屏,也称“触控屏”。触摸传感器180F用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏192提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180F也可以设置于电子设备100的表面,与显示屏192所处的位置不同。本申请实施例中,触摸传感器180F可以用于检测用户采用键盘输入方式或手写输入方式输入的数据,以使电子设备输出与该数据对应的结果,将结果显示在显示屏192中。Touch sensor 180F, also known as "touch device". The touch sensor 180F can be disposed on the display screen 192, and the touch sensor 180F and the display screen 192 form a touch screen, which is also called a "touch screen". The touch sensor 180F is used to detect a touch operation on or near the touch sensor 180F. The touch sensor can pass the detected touch operation to the application processor to determine the touch event type. Visual output related to the touch operation may be provided through display screen 192 . In other embodiments, the touch sensor 180F may also be disposed on the surface of the electronic device 100 at a location different from that of the display screen 192 . In the embodiment of the present application, the touch sensor 180F can be used to detect data input by the user using keyboard input or handwriting input, so that the electronic device outputs a result corresponding to the data and displays the result on the display screen 192 .
接下来结合图2A-图2C介绍本申请实施例涉及的应用场景。Next, the application scenarios involved in the embodiments of the present application will be introduced with reference to Figures 2A-2C.
图2A示例性示出了输入法的键盘输入模式界面示意图。FIG. 2A exemplarily shows a schematic diagram of the keyboard input mode interface of the input method.
图2A示出了微信的联系人聊天界面30。其中,微信是一种即时通讯软件。如图2A所示,用户界面30中可以包括:状态栏301、显示区302、输入框303、导航栏304。其中:Figure 2A shows the contact chat interface 30 of WeChat. Among them, WeChat is an instant messaging software. As shown in FIG. 2A , the user interface 30 may include: a status bar 301 , a display area 302 , an input box 303 , and a navigation bar 304 . in:
状态栏301可以包括:运营商指示符(例如运营商的名称“中国移动”)、无线高保真(wireless fidelity,Wi-Fi)信号的一个或多个信号强度指示符、移动通信信号(又可称为蜂窝信号)的一个或多个信号强度指示符、时间指示符和电池状态指示符。The status bar 301 may include: an operator indicator (for example, the name of the operator "China Mobile"), one or more signal strength indicators of a wireless fidelity (Wi-Fi) signal, a mobile communication signal (which may also be One or more signal strength indicators, time indicators, and battery status indicators known as cellular signals.
显示区302可以用于显示与该联系人(Emmy)的历史聊天内容。The display area 302 may be used to display historical chat content with the contact (Emmy).
用户可以对输入框303执行点击操作。响应于该点击操作,电子设备100的处理器110可以调用电子设备110中的输入法应用,并在显示屏192上显示图2B示出的输入法应用的界面305。该界面是具有26键的字母组合按键的输入界面。用户可以在该输入法应用的界面305输入字符串。电子设备100的处理器110可以根据用户输入的字符串查找该字符串对应的一个或多个字词,并通过显示屏192显示在输入法应用的界面305中。用户可从该字符串对应的一个或多个字词中选择其预期输入的字词。The user can perform a click operation on the input box 303. In response to the click operation, the processor 110 of the electronic device 100 may call the input method application in the electronic device 110 and display the interface 305 of the input method application shown in FIG. 2B on the display screen 192 . This interface is an input interface with 26 alphanumeric keys. The user can input a string in the interface 305 of the input method application. The processor 110 of the electronic device 100 can search for one or more words corresponding to the string according to the string input by the user, and display the words in the interface 305 of the input method application through the display screen 192 . The user can select the word they intend to input from one or more words corresponding to the string.
可以理解,图2B中,输入法应用的界面305是以具有26键的字母组合按键的输入界面为例示出的,输入法应用的界面也可以是具有9键的数字组合按键的输入界面,用户也可以在该界面中输入字符串。It can be understood that in FIG. 2B, the interface 305 of the input method application is shown as an input interface with 26-key letter combination keys. The interface of the input method application can also be an input interface with 9-key number combination keys. The user You can also enter strings in this interface.
导航栏304可以包括:返回按键3041、主界面(Home screen)按键3042、呼出任务历史按键3043等系统导航键。其中,主界面为电子设备100在任何一个用户界面检测到作用于主界面按键3042的用户操作后显示的界面。当检测到用户点击返回按键3041时,电子设备100可显示当前用户界面的上一个用户界面。当检测到用户点击主界面按键3042时,电子设备100可显示主界面。当检测到用户点击呼出任务历史按键3043时,电子设备100可显示用户最近打开过的任务。各导航键的命名还可以为其他,比如,3041可以叫Back Button,3042可以叫Home button,3043可以叫Menu Button,本申请对此不做限制。导航栏304中的各导航键不限于虚拟按键,也可以实现为物理按键。The navigation bar 304 may include: a return button 3041, a home screen button 3042, an outgoing task history button 3043 and other system navigation keys. The main interface is an interface displayed by the electronic device 100 after any user interface detects a user operation on the main interface button 3042 . When detecting that the user clicks the return button 3041, the electronic device 100 may display the previous user interface of the current user interface. When detecting that the user clicks the home interface button 3042, the electronic device 100 may display the home interface. When detecting that the user clicks the outgoing task history button 3043, the electronic device 100 may display tasks recently opened by the user. The navigation keys can also be named in other ways. For example, 3041 can be called Back Button, 3042 can be called Home button, and 3043 can be called Menu Button. This application does not limit this. Each navigation key in the navigation bar 304 is not limited to a virtual key, and can also be implemented as a physical key.
输入法应用的界面305可以包括输入方式切换控件3051。The interface 305 of the input method application may include an input mode switching control 3051.
输入方式切换控件3051可以用于切换输入方式。具体地,电子设备100可以检测到作用于输入方式切换控件3051的触控操作(如在输入方式切换控件3051上的点击操作),响应于该操作,电子设备100可在输入法应用的界面305中显示其他输入方式的图标,如图2C中示出的文字扫描输入方式的图标3052、语音输入方式的图标3053及手写输入方式的图标3054。其中:The input mode switching control 3051 can be used to switch the input mode. Specifically, the electronic device 100 can detect a touch operation acting on the input mode switching control 3051 (such as a click operation on the input mode switching control 3051), and in response to the operation, the electronic device 100 can perform a touch operation on the input method application interface 305. Icons for other input methods are displayed, such as the icon 3052 for the text scanning input method, the icon 3053 for the voice input method, and the icon 3054 for the handwriting input method shown in FIG. 2C . in:
文字扫描输入方式的图标3052可以用于通过扫描图像输入字词。具体地,电子设备100可以检测到作用于图像扫描输入方式的图标3052的触控操作(如在文字扫描输入方式的图标3052上的点击操作),响应于该操作,电子设备100开启摄像头191扫描图片,将扫描的图片内容发送至处理器110,通过处理器110识别出该图片中的文字或字符(字母、数字、符号等),通过显示屏192将识别的结果显示在输入法应用的界面305中。The text scanning input mode icon 3052 can be used to input words by scanning an image. Specifically, the electronic device 100 can detect a touch operation on the icon 3052 in the image scanning input mode (such as a click operation on the icon 3052 in the text scanning input mode). In response to the operation, the electronic device 100 turns on the camera 191 to scan. Picture, the scanned picture content is sent to the processor 110, the processor 110 recognizes the text or characters (letters, numbers, symbols, etc.) in the picture, and the recognition result is displayed on the interface of the input method application through the display screen 192. 305 in.
语音输入方式的图标3053用于通过语音输入字词。具体地,电子设备100可以检测到作用于语音输入方式的图标3053的触控操作(如在语音输入方式的图标3053上的点击操作),响应于该操作,电子设备100可开启麦克风170C采集声音信号,将采集到的声音信号发送至处理器110,通过处理器110识别出该声音信号对应的文字或字符(字母、数字等),通过显示屏192将识别的结果显示在输入法应用的界面305中。The voice input mode icon 3053 is used to input words by voice. Specifically, the electronic device 100 can detect a touch operation on the icon 3053 in the voice input mode (such as a click operation on the icon 3053 in the voice input mode). In response to the operation, the electronic device 100 can turn on the microphone 170C to collect sound. signal, the collected sound signal is sent to the processor 110, the processor 110 recognizes the words or characters (letters, numbers, etc.) corresponding to the sound signal, and the recognition result is displayed on the interface of the input method application through the display screen 192. 305 in.
手写输入方式的图标3054可以用于通过用户手写输入字词。具体地,电子设备100可以检测到作用于手写输入方式的图标3054的处境操作(如在手写输入方式的图标3054上的点击操作),响应于该操作,电子设备100可以在输入法应用的界面305中显示手写检测区域,检测用户在手写检测区域中输入的触控轨迹,根据触控轨迹确定用户输入的字词,通过显示屏192将字词显示在输入法应用的界面305中。The handwriting input mode icon 3054 may be used to input words by the user's handwriting. Specifically, the electronic device 100 can detect a contextual operation (such as a click operation on the icon 3054 of the handwriting input mode) that acts on the icon 3054 of the handwriting input mode. In response to the operation, the electronic device 100 can perform the input method application interface on the interface of the input method. A handwriting detection area is displayed in 305, the touch track input by the user in the handwriting detection area is detected, the words input by the user are determined based on the touch track, and the words are displayed in the input method application interface 305 through the display screen 192.
接下来结合前述应用场景介绍本申请几个实施例提供的输入方法。Next, the input methods provided by several embodiments of the present application will be introduced in conjunction with the aforementioned application scenarios.
实施例一:键盘输入-语音输入,即将采用键盘输入方式输入的数据共享给语音输入方式。Embodiment 1: keyboard input-voice input, that is, data input using the keyboard input method is shared with the voice input method.
接下来将分四个部分介绍实施例一提供的输入方法。Next, the input method provided by Embodiment 1 will be introduced in four parts.
第一部分:采用键盘输入方式输入数据,输出对应的结果。Part One: Use keyboard input to input data and output the corresponding results.
如图3A所示,电子设备100可以检测到作用于输入法应用的界面305中输入字符串zhangsan,一个或多个字母按键(该一个或多个字母按键例如可以依次是zhangsan)的点击操作,响应于该点击操作,电子设备100可在输入法应用的界面305中显示输入结果401(zhang’san),并显示该输入结果对应的待选项列表402及下拉控件403。其中,待选项列表402可以包括一个或多个待选项4021。As shown in FIG. 3A , the electronic device 100 can detect the click operation of inputting the string zhangsan and one or more letter keys (for example, the one or more letter keys can be zhangsan in sequence) in the interface 305 of the input method application. In response to the click operation, the electronic device 100 can display the input result 401 (zhang'san) in the interface 305 of the input method application, and display the option list 402 and the drop-down control 403 corresponding to the input result. The candidate list 402 may include one or more candidate options 4021.
其中,下拉控件403可用于显示更多的待选项。电子设备100可以检测到作用于下拉控件403的触控操作(如在下拉控件403上的点击操作),响应于该操作,电子设备100可以更新显示图3B所示的输入法应用的界面305。Among them, the drop-down control 403 can be used to display more waiting options. The electronic device 100 may detect a touch operation (such as a click operation on the drop-down control 403) acting on the drop-down control 403, and in response to the operation, the electronic device 100 may update the interface 305 that displays the input method application shown in FIG. 3B.
如图3B所示,输入法应用的界面305中可以包括待选项列表402、上翻控件404、下翻控件405及返回控件406。As shown in FIG. 3B , the interface 305 of the input method application may include a list of options 402 , a scroll up control 404 , a scroll down control 405 and a return control 406 .
其中,上翻控件404及下翻控件405均可以用于更新显示待选项列表402中的待选项。电子设备100可以检测到作用于下翻控件405的触控操作(如在下翻控件405上的点击操作),响应于该操作,电子设备100可以更新显示待选项列表402中的待选项。同理适用于上翻控件404,此处不赘述。Among them, both the scroll up control 404 and the scroll down control 405 can be used to update the candidate options in the display candidate list 402 . The electronic device 100 may detect a touch operation on the flip-down control 405 (such as a click operation on the flip-down control 405), and in response to the operation, the electronic device 100 may update the candidate options in the display candidate list 402. The same principle applies to the flip-up control 404, which will not be described again here.
返回控件406可以用于使电子设备100显示图3A示出的用户界面30。Return control 406 may be used to cause electronic device 100 to display user interface 30 shown in Figure 3A.
上述待选项可以是完整的输入结果“zhang’san”对应的待选项,也可以是输入结果的前半部分“zhang”对应的待选项。The above options can be the options corresponding to the complete input result “zhang’san”, or the options corresponding to the first half of the input result “zhang”.
用户可以点击图3B的待选项列表402中的待选项选择预期的结果。例如,用户可以点击待选项列表402中的“章”以选定输入结果“zhang”对应的字词。选定输入结果的前半部分对应的字词后,电子设备100可以显示图3C所示的输入法应用的界面305。The user can click on the options in the option list 402 of FIG. 3B to select the desired result. For example, the user can click "Zhang" in the list of options 402 to select the word corresponding to the input result "zhang". After selecting the word corresponding to the first half of the input result, the electronic device 100 can display the input method application interface 305 shown in FIG. 3C .
图3C中示出的输入法应用的界面305与图3B中示出的输入法应用界面305类似。不同之处在于,图3B中的输入法应用的界面305中的待选项列表402中显示的是完整的输入结果“zhang’san”对应的待选项或输入结果的前半部分“zhang”对应的待选项。而图3C中的输入法应用的界面305中的待选项列表402中显示的是输入结果的后半部分“san”对应的待选项。The input method application interface 305 shown in FIG. 3C is similar to the input method application interface 305 shown in FIG. 3B. The difference is that the list of options 402 in the interface 305 of the input method application in Figure 3B displays the options corresponding to the complete input result "zhang'san" or the options corresponding to the first half of the input result "zhang". options. The candidate list 402 in the input method application interface 305 in FIG. 3C displays the candidate options corresponding to the second half of the input result "san".
用户可以点击图3C的待选项列表402中的待选项选择预期结果。例如,用户可以点击待选项列表402中的“三”以选定输入结果“san”对应的字词。The user can click an option in the option list 402 of FIG. 3C to select an expected result. For example, the user can click "three" in the list of options 402 to select the word corresponding to the input result "san".
电子设备100确定完整的输入结果“zhang’san”对应的字词后,如图3D所示,可以将其对应的字词“章三”显示在输入框303中。After the electronic device 100 determines the word corresponding to the complete input result “zhang’san”, as shown in FIG. 3D , the corresponding word “zhang’san” can be displayed in the input box 303 .
本申请实施例中涉及的键盘输入方式可以是拼音输入方式,也可以是五笔输入方式等通过键盘输入的输入方式。其中输入法应用的界面305可以包含26键的字母组合按键的输入界面,也可以包含9键的数字组合按键的输入界面等。The keyboard input method involved in the embodiment of the present application may be a pinyin input method, or may be an input method through a keyboard such as the Wubi input method. The interface 305 of the input method application may include an input interface of 26-key letter combination keys, or may include an input interface of 9-key number combination keys, etc.
接下来介绍电子设备100确定该字符串对应的结果的过程。Next, the process of the electronic device 100 determining the result corresponding to the character string is introduced.
电子设备100接收到用户输入的字符串之后,可以将该字符串组合成多种音节或音节序列,并查找这多种音节或音节序列对应的字词。After receiving the string input by the user, the electronic device 100 can combine the string into multiple syllables or syllable sequences, and search for words corresponding to the multiple syllables or syllable sequences.
首先,电子设备100可以确定该字符串组成的多种音节或音节序列,并分别确定每种音节或音节序列的可能性。电子设备100可以在待选项列表402中优先显示可能性最高的音节或音节序列对应的字词。First, the electronic device 100 can determine multiple syllables or syllable sequences composed of the character string, and determine the possibility of each syllable or syllable sequence respectively. The electronic device 100 may preferentially display words corresponding to the most likely syllables or syllable sequences in the candidate list 402 .
其中,确定每种音节或音节序列的可能性的依据可以是搜集大量用户的使用习惯得出,进一步地还可以根据使用该电子设备100的用户的使用习惯进行调整得出。The basis for determining the possibility of each syllable or syllable sequence can be obtained by collecting the usage habits of a large number of users, and further can be adjusted according to the usage habits of users who use the electronic device 100 .
例如,用户输入的字符串可以是xian。该字符串对应的音节或音节序列可以是xi’an,还可以是xian。若多个用户的1000次选择中,有600次选择该字符串对应的音节或音节序列是xian,有400次选择该字符串对应的音节序列是xi’an。则该字符串对应的音节或音节序列是xian的可能性为60%,该字符串对应的节序列是xi’an的可能性为40%。其中,电子设备100可以根据用户最终选择的字词确定用户选择该字符串对应的音节或音节序列。电子设备100确定该字符串对应的各种音节或音节序列的可能性后,可以在待选项列表402中优先显示可能性最高的音节或音节序列对应的字词。For example, the string entered by the user could be xian. The syllable or syllable sequence corresponding to this string can be xi’an or xian. If multiple users made 1,000 choices, the syllable or syllable sequence corresponding to the string was chosen 600 times as xian, and the syllable sequence corresponding to the string was chosen xi’an 400 times. Then the probability that the syllable or syllable sequence corresponding to the string is xian is 60%, and the probability that the syllable sequence corresponding to the string is xi’an is 40%. The electronic device 100 may determine the syllable or syllable sequence corresponding to the character string selected by the user based on the word finally selected by the user. After the electronic device 100 determines the possibility of various syllables or syllable sequences corresponding to the character string, the electronic device 100 may preferentially display the words corresponding to the most likely syllables or syllable sequences in the waiting list 402 .
进一步地,若在使用该电子设备100的用户的10次选择中,有6次选择该字符串对应的音节序列是xi’an,有4次选择该字符串对应的音节是xian。则电子设备100可以根据使用该电子设备100的用户的使用习惯进行调整,确定该字符串对应的音节序列是xi’an的可能性为60%,该字符串对应的音节是xian的可能性为40%。则电子设备100可以在待选项列表402中优先显示音节序列xi’an对应的字词。Further, if the user using the electronic device 100 makes 10 selections, 6 times the syllable sequence corresponding to the string is xi’an, and 4 times the syllable sequence corresponding to the string is xian. Then the electronic device 100 can be adjusted according to the usage habits of the user using the electronic device 100, and the possibility of determining that the syllable sequence corresponding to the string is xi'an is 60%, and the possibility of the syllable sequence corresponding to the string being xian is 40%. Then the electronic device 100 can prioritize the words corresponding to the syllable sequence xi'an in the waiting list 402.
不限于在待选项列表402中优先显示可能性最高的音节或音节序列对应的字词,还可以在待选项列表402中优先显示用户最近选择的音节或音节序列对应的字词。例如,使用该电子设备100的用户上一次选择字符串xian对应的音节序列是xi’an,则电子设备100可以在用户再次输入字符串xian时,在待选项列表402中优先显示音节序列xi’an对应的字词。Instead of preferentially displaying the words corresponding to the most likely syllable or syllable sequence in the candidate list 402 , the candidate list 402 may also prioritize displaying the words corresponding to the syllable or syllable sequence recently selected by the user in the candidate list 402 . For example, the last time the user using the electronic device 100 selected the syllable sequence corresponding to the string xian was xi'an, then the electronic device 100 can display the syllable sequence xi' in priority in the waiting option list 402 when the user inputs the string xian again. The word corresponding to an.
其次,电子设备100可以确定音节对应的一种或多种字词,并分别确定各种字词的可能性。电子设备100可以在待选项列表402中优先显示可能性最高的字词。Secondly, the electronic device 100 can determine one or more words corresponding to the syllable, and determine the possibility of each word respectively. The electronic device 100 may preferentially display words with the highest probability in the candidate list 402 .
可以知道,音节或音节序列对应的字词可以有多种。例如,音节序列xi’an对应的字词可以是“西安”、“西岸”、“锡安”等,音节xian对应的字词可以是“先”、“现”、“线”、“鲜”等。It can be known that there can be many kinds of words corresponding to syllables or syllable sequences. For example, the words corresponding to the syllable sequence xi'an can be "Xi'an", "West Bank", "Zion", etc., and the words corresponding to the syllable xian can be "Xian", "Xian", "Xian", "Xian" wait.
电子设备100可以搜集大量用户的使用习惯得出该音节对应的各种字词的可能性,进一步地还可以根据使用该电子设备100的用户的使用习惯进行调整得出。The electronic device 100 can collect the usage habits of a large number of users to obtain the possibility of various words corresponding to the syllable, and can further adjust the possibility according to the usage habits of the users who use the electronic device 100 .
例如,对于音节xian而言,若多个用户的1000次选择中,有400次选择该音节对应的字词是“先”,有300次选择该音节对应的字词是“现”,有200次选择该音节对应的字词是“线”,有100次选择该音节对应的字词是“鲜”。则该音节对应的字词是“先”的可能性为40%,该音节对应的字词是“现”的可能性为30%,该音节对应的字词是“线”的可能性为20%,该音节对应的字词是“鲜”的可能性为10%。电子设备100确定该音节对应的各种字符串的可能性后,可以在待选项列表402中优先显示可能性最高的字词。For example, for the syllable xian, if among 1,000 selections by multiple users, 400 times the word corresponding to the syllable is "Xian", 300 times the word corresponding to the syllable is "Xian", and 200 times The word corresponding to the syllable selected for the first time is "line", and the word corresponding to the syllable selected 100 times is "Xian". Then the possibility of the word corresponding to this syllable being "Xian" is 40%, the possibility of the word corresponding to this syllable being "Xian" is 30%, and the possibility of the word corresponding to this syllable being "Xian" is 20% %, the probability that the word corresponding to this syllable is "fresh" is 10%. After the electronic device 100 determines the possibility of various character strings corresponding to the syllable, the electronic device 100 may preferentially display the word with the highest possibility in the candidate list 402 .
进一步地,若在使用该电子设备100的用户的10次选择中,有5次选择该音节对应的字词是“鲜”,有3次选择该音节对应的字词是“线”,有一次选择该音节对应的字词是“现”,有一次选择该音节对应的字词是“先”。则电子设备100可以根据使用该电子设备100的用户的使用习惯进行调整,确定该音节对应的字词是“鲜”的可能性为50%,该音节对应的字词是“线”的可能性为30%,该音节对应的字词是“现”的可能性为10%,该音节对应的字词是“先”的可能性为10%。则电子设备100可以在待选项列表402中优先显示字词“鲜”。Further, if among the 10 selections made by the user using the electronic device 100, 5 times the word corresponding to the syllable is selected as "Xian", 3 times the word corresponding to the syllable is selected as "Xian", and 1 time Selecting the word corresponding to this syllable is "now", and once selecting the word corresponding to this syllable is "xian". Then the electronic device 100 can be adjusted according to the usage habits of the user using the electronic device 100, and determine that the possibility of the word corresponding to the syllable is "Xian" is 50%, and the possibility of the word corresponding to the syllable is "线" is 30%, the probability that the word corresponding to this syllable is "Xian" is 10%, and the probability that the word corresponding to this syllable is "Xian" is 10%. Then the electronic device 100 can display the word "fresh" first in the waiting list 402 .
不限于在待选项列表402中优先显示可能性最高的字词,还可以在待选项列表402中优先显示用户最近选择的该音节对应的字词。例如,使用该电子设备100的用户上一次选择音节xian对应的字词是“仙”,则电子设备100可以在用户再次输入音节xian时,在待选项列表402中优先显示字词“仙”。Instead of preferentially displaying words with the highest probability in the candidate list 402 , the word corresponding to the syllable recently selected by the user may also be prioritized in the candidate list 402 . For example, if the last time the user using the electronic device 100 selected the word corresponding to the syllable xian was "Xian", the electronic device 100 may display the word "Xian" first in the waiting option list 402 when the user inputs the syllable xian again.
上述在待选项列表402中优先显示字词的方式可以是在待选项列表402的最左列、最上排显示。The above-mentioned way of preferentially displaying words in the candidate list 402 may be to display them in the leftmost column or the top row of the candidate list 402 .
第二部分:生成个性化语言库。Part 2: Generate personalized language library.
具体地,电子设备100可以将用户采用键盘输入的字符串以及用户最终选择的该字符串对应的字词保存在个性化语言库中。其中,个性化语言库可以是内部存储器120中的某个存储区域。电子设备100可以根据个性化语言库确定该字符串对应的音节或音节序列,以及该音节或音节序列对应的字词,并记录该字词被选定的次数(即词频)。因此,最终生成的个性化语言库可以符合使用该电子设备100的用户的使用习惯。Specifically, the electronic device 100 can save the character string input by the user using the keyboard and the word corresponding to the character string finally selected by the user in the personalized language library. The personalized language library may be a certain storage area in the internal memory 120 . The electronic device 100 can determine the syllable or syllable sequence corresponding to the string and the word corresponding to the syllable or syllable sequence according to the personalized language library, and record the number of times the word is selected (ie, word frequency). Therefore, the finally generated personalized language library can conform to the usage habits of the user using the electronic device 100 .
例如,用户采用键盘输入字符串zhangsan,用户最终选择该字符串对应的字词为“章三”,则电子设备100可以确定该字符串zhangsan对应的音节序列为zhang’san,该音节序列zhang’san对应的字词为“章三”,而不是“张三”。For example, if the user inputs the string zhangsan using the keyboard, and the user finally selects the word corresponding to the string "Zhang San", then the electronic device 100 can determine that the syllable sequence corresponding to the string zhangsan is zhang'san, and the syllable sequence zhang' The corresponding word for san is "Zhang San", not "Zhang San".
第三部分:采用语音输入方式输入数据。Part 3: Enter data using voice input.
用户点击图2B中的图标3053后,电子设备100可以显示图4示出的输入法的应用界面305,并开启麦克风170C(图4中示例性示出了麦克风170C的位置),开始采集声音信号。此时,用户可以输入音频信号。After the user clicks the icon 3053 in Figure 2B, the electronic device 100 can display the input method application interface 305 shown in Figure 4, turn on the microphone 170C (the position of the microphone 170C is exemplarily shown in Figure 4), and start collecting sound signals. . At this point, the user can input audio signals.
具体地,电子设备100可以抽取用户输入的音频信号的音频特征,将该音频特征输入到声学模型中,输出音节或音节序列。接下来以输出的音节序列为zhang’san为例,示例性对以下第四部分进行说明。Specifically, the electronic device 100 can extract audio features of the audio signal input by the user, input the audio features into the acoustic model, and output syllables or syllable sequences. Next, taking the output syllable sequence as zhang’san as an example, the following fourth part will be explained as an example.
第四部分:查找通用语言库及个性化语言库,并输出最终结果。Part 4: Search the general language library and personalized language library, and output the final results.
电子设备100确定声学模型输出的音节序列为zhang’san后,分别在通用语言库及个性化语言库中查找与该音节序列对应的结果,根据查找通用语言库的结果和查找个性化语言库的结果确定最终结果,并将最终结果显示在图5中示出的输入框303中。After the electronic device 100 determines that the syllable sequence output by the acoustic model is zhang'san, it searches for the results corresponding to the syllable sequence in the general language library and the personalized language library respectively, and based on the results of searching the general language library and the results of searching the personalized language library The result determines the final result, and the final result is displayed in the input box 303 shown in Figure 5.
具体地,通用语言库是预设的语言库,该语言库可以根据大量用户采用多种输入方式输入的数据得到。因此,通用语言库可以符合大多数用户的使用习惯。通用语言库可以是用户在下载输入法时该输入法自带的语言库,通用语言库还可以是电子设备100自带的语言库。Specifically, the universal language library is a preset language library that can be obtained based on data input by a large number of users using multiple input methods. Therefore, the general language library can meet the usage habits of most users. The general language library may be the language library that comes with the input method when the user downloads the input method. The general language library may also be the language library that comes with the electronic device 100 .
具体地,通用语言库中可以但不限于包括多种字词、各个字词对应的音节序列及该字词对应的词频。此外,通用语言库还可以用于计算候选字词在句子结构中的得分,从而使电子设备100将得分最高的候选字词优先显示在待选项列表402中。可能地,同一个音节序列可以对应多种不同的字词,这些字词对应的词频可以不同。Specifically, the general language library may include, but is not limited to, a variety of words, the syllable sequence corresponding to each word, and the word frequency corresponding to the word. In addition, the general language library can also be used to calculate the scores of candidate words in the sentence structure, so that the electronic device 100 preferentially displays the candidate words with the highest scores in the candidate list 402 . Possibly, the same syllable sequence can correspond to a variety of different words, and the corresponding word frequencies of these words can be different.
电子设备100在确定用户输入的音频信号对应的音节或音节序列后,可以查找通用语言库,确定该音节或音节序列对应的可能性最高的结果。将查找通用语言库的可能性最高的结果称为第一结果。After determining the syllable or syllable sequence corresponding to the audio signal input by the user, the electronic device 100 can search the general language library to determine the most likely result corresponding to the syllable or syllable sequence. The result with the highest probability of finding a general language library is called the first result.
电子设备100还可以在确定用户输入的音频信号对应的音节或音节序列后,查找个性化语言库,确定该音节或音节序列对应的可能性最高的结果。将查找个性化语言库的可能性最高的结果称为第二结果。The electronic device 100 may also search the personalized language library after determining the syllable or syllable sequence corresponding to the audio signal input by the user, and determine the result with the highest probability corresponding to the syllable or syllable sequence. The result with the highest probability of finding a personalized language library is called the second result.
上述个性化语言库中可能性最高的结果可以是用户选择次数最多的结果,也可能是用户最近一次选择的结果,本申请实施例对此不作限定。The most likely result in the above-mentioned personalized language library may be the result selected by the user the most, or may be the result selected by the user most recently, which is not limited in the embodiments of the present application.
查找通用语言库的结果和查找个性化语言库的结果可能存在以下几种情况:The results of searching for a general language library and the results of searching for a personalized language library may be in the following situations:
情况一、第一结果和第二结果一致。此时采用语音输入的最终输出的结果即为第一结果,也为第二结果。Case 1: The first result and the second result are consistent. At this time, the final output result using voice input is the first result and the second result.
情况二、第一结果和第二结果不一致。此时采用语音输入的最终结果即为第二结果。即在第一结果和第二结果不一致的情况下,优先以第二结果为准。Scenario 2: The first result and the second result are inconsistent. At this time, the final result using voice input is the second result. That is, if the first result and the second result are inconsistent, the second result shall prevail.
情况三、第一结果存在,第二结果不存在或者第二结果为空。此时采用语音输入的最终结果即为第一结果。Case 3: The first result exists, but the second result does not exist or the second result is empty. At this time, the final result using voice input is the first result.
另外,本申请实施例对上述查找通用语言库和查找个性化语言库的先后顺序不做限定,上述查找通用语言库和查找个性化语言库的时间关系也可以是同时进行。In addition, the embodiment of the present application does not limit the order in which the general language library and the personalized language library are searched. The time relationship between the general language library search and the personalized language library search can also be performed at the same time.
例如,电子设备100确定用户输入的音频信号对应的音节序列为zhang’san后,在通用语言库中查找该音节对应的可能性最高的结果为“张三”,而在个性化语言库中查找该音节对应的可能性最高的结果为“章三”。即第一结果为“张三”,第二结果为“章三”,则用户输入的音频信号对应的最终结果为“章三”。For example, after the electronic device 100 determines that the syllable sequence corresponding to the audio signal input by the user is zhang'san, it searches for the most likely result corresponding to the syllable in the general language library as "Zhang San", and searches for it in the personalized language library. The most likely result corresponding to this syllable is "Zhang 3". That is, if the first result is "Zhang San" and the second result is "Zhang San", then the final result corresponding to the audio signal input by the user is "Zhang San".
实施本申请实施例可以将用户使用键盘输入方式输入的数据共享给语音输入方式,在采用语音输入时可以同时根据用户采用键盘输入方式输入的历史数据和符合大众的使用习惯来确定输入结果。增强电子设备对输入数据的处理能力,提升语音识别的准确性,提高用户的输入效率。Implementing the embodiments of the present application can share the data input by the user using the keyboard input method to the voice input method. When using voice input, the input result can be determined based on the historical data input by the user using the keyboard input method and the usage habits of the public. Enhance the processing capabilities of electronic devices for input data, improve the accuracy of speech recognition, and improve user input efficiency.
实施例二:图像扫描输入-语音输入,即将采用图像扫描输入方式输入的数据共享给语音输入方式。Embodiment 2: Image scanning input-voice input, that is, data input using the image scanning input method is shared with the voice input method.
接下来将分四个部分介绍实施例二提供的输入方法。Next, the input method provided by Embodiment 2 will be introduced in four parts.
第一部分:采用图像扫描输入方式输入数据,输出对应的结果。Part One: Use image scanning input method to input data and output the corresponding results.
如图2C所示,电子设备100可以检测到作用于图像扫描输入方式的图标3052的触控操作(如在文字扫描输入方式的图标3052上的点击操作),响应于该操作,电子设备100开启摄像头191扫描图片,并显示扫描界面。As shown in FIG. 2C , the electronic device 100 can detect a touch operation on the icon 3052 in the image scanning input mode (such as a click operation on the icon 3052 in the text scanning input mode). In response to the operation, the electronic device 100 turns on The camera 191 scans the picture and displays the scanning interface.
示例性地,如图6A所示,扫描界面70可以包括:扫描内容预览区域701、扫描要求提示框702、扫描控件703、返回控件704及参考线705。其中:For example, as shown in FIG. 6A , the scanning interface 70 may include: a scanning content preview area 701 , a scanning requirement prompt box 702 , a scanning control 703 , a return control 704 and a reference line 705 . in:
扫描内容预览区域701可以用于显示摄像头191捕捉到的图像。Scan content preview area 701 may be used to display images captured by camera 191.
扫描要求提示框702可以用于显示扫描要求,提示用户按照要求进行扫描。The scan request prompt box 702 can be used to display scan requirements and prompt the user to scan according to the requirements.
扫描控件703可以用于确定扫描内容。电子设备100可以检测到作用于扫描控件703的触控操作(如在扫描控件703上的点击操作),响应于该操作,电子设备100可以确定摄像头191在当前时刻捕捉到的图像即为扫描内容,提取扫描内容中有文字的区域。在后续描述中将有文字的区域简称为文字区域。Scan control 703 can be used to determine what to scan. The electronic device 100 can detect a touch operation on the scan control 703 (such as a click operation on the scan control 703). In response to the operation, the electronic device 100 can determine that the image captured by the camera 191 at the current moment is the scan content. , extract the area with text in the scanned content. In the subsequent description, the area with text will be simply referred to as the text area.
返回控件704可以用于使电子设备100显示图2C所示的用户界面30。Return control 704 may be used to cause electronic device 100 to display user interface 30 shown in Figure 2C.
参考线705可以用于提示用户使扫描图像中的文字方向与该参考线705平行,以便于电子设备100识别扫描图像中的文字。The reference line 705 may be used to prompt the user to make the direction of the text in the scanned image parallel to the reference line 705 so that the electronic device 100 can identify the text in the scanned image.
响应于作用于扫描控件703的触控操作,电子设备100还可以显示图6B所示的用户界面80。In response to the touch operation on the scan control 703, the electronic device 100 may also display the user interface 80 shown in FIG. 6B.
示例性地,如图6B所示,用户界面80可以包括:文字区域801A、文字区域801B、确定控件802及返回控件803。For example, as shown in FIG. 6B , the user interface 80 may include: a text area 801A, a text area 801B, a determination control 802 and a return control 803 .
其中,文字区域801A及文字区域801B为电子设备100在扫描内容中提取的有文字的区域。文字区域801A及文字区域801B均可用于确定待选的文字区域。电子设备100可以检测到作用于文字区域801A和/或文字区域801B上的触控操作(如在文字区域801A和/或文字区域801B上的点击操作),响应于该操作,电子设备100可以特殊显示文字区域801A或文字区域801B,以提示用户文字区域801A和/或文字区域801B为待选的文字区域。其中,特殊显示的方式例如可以但不限于是加粗显示待选文字区域的边框。具体可以参考图6C所示的文字区域801B。Among them, the text area 801A and the text area 801B are areas containing text extracted by the electronic device 100 from the scanned content. Both text area 801A and text area 801B can be used to determine the text area to be selected. The electronic device 100 can detect a touch operation acting on the text area 801A and/or the text area 801B (such as a click operation on the text area 801A and/or the text area 801B). In response to the operation, the electronic device 100 can specifically The text area 801A or the text area 801B is displayed to prompt the user that the text area 801A and/or the text area 801B is the text area to be selected. The special display method may be, for example, but is not limited to, boldly displaying the border of the text area to be selected. For details, reference may be made to the text area 801B shown in FIG. 6C.
确定控件802可以用于确定目标文字区域。电子设备100可以检测作用于确定控件802的触控操作(如在确定控件802上的点击操作),响应于该操作,电子设备100可以确定待选的文字区域为目标文字区域,并显示图6D所示的用户界面90。The determination control 802 can be used to determine the target text area. The electronic device 100 can detect a touch operation on the determination control 802 (such as a click operation on the determination control 802), and in response to the operation, the electronic device 100 can determine the text area to be selected as the target text area, and display FIG. 6D User interface 90 is shown.
返回控件803可以用于使电子设备100显示图6B所示的用户界面70。The return control 803 may be used to cause the electronic device 100 to display the user interface 70 shown in Figure 6B.
如图6D所示,用户界面90可以包括:目标文字区域显示框901、扫描结果显示区域902、发送控件903、复制控件904及返回控件905。其中:As shown in FIG. 6D , the user interface 90 may include: a target text area display box 901 , a scan result display area 902 , a send control 903 , a copy control 904 and a return control 905 . in:
目标文字区域901可以用于显示目标文字区域。The target text area 901 can be used to display the target text area.
扫描结果显示区域902可以用于显示电子设备100从目标文字区域中提取的内容,即扫描结果。The scan result display area 902 may be used to display the content extracted by the electronic device 100 from the target text area, that is, the scan result.
发送控件903可以用于使扫描结果显示在输入框305中。电子设备100可以检测到作用于发送控件903的触控操作(如在发送控件903上的点击操作),响应于该操作,电子设备100可以显示图6E示出的用户界面30,用户界面30的输入框303中可以显示扫描结果。Send control 903 may be used to cause scan results to be displayed in input box 305 . The electronic device 100 can detect a touch operation (such as a click operation on the sending control 903) acting on the sending control 903. In response to the operation, the electronic device 100 can display the user interface 30 shown in FIG. 6E. The user interface 30 The scan results can be displayed in the input box 303.
复制控件904可以用于复制扫描结果。Copy control 904 can be used to copy scan results.
返回控件905可以用于使电子设备100显示图6C所示的用户界面80。Return control 905 may be used to cause electronic device 100 to display user interface 80 shown in Figure 6C.
第二部分:生成个性化语言库。Part 2: Generate personalized language library.
具体地,电子设备100可以将用户采用图像扫描输入方式输入的文字保存在个性化语言库中。此外,电子设备100还可以将用户采用图像扫描输入方式输入的文字对应的音节或音节序列保存在个性化语言库中。因此,最终生成的个性化语言库可以符合使用该电子设备100的用户的使用习惯。其中,个性化语言库可以是内部存储器120中的某个存储区域。保存在个性化语言库中的结果可以包括字词、该字词对应的音节序列以及该字词被选定的次数(即词频)等。可能地,同一个音节序列可以对应多种不同的字词,这些字词对应的词频可以不同。Specifically, the electronic device 100 can save the text input by the user using the image scanning input method in the personalized language library. In addition, the electronic device 100 can also save the syllables or syllable sequences corresponding to the text input by the user using the image scanning input method in the personalized language library. Therefore, the finally generated personalized language library can conform to the usage habits of the user using the electronic device 100 . The personalized language library may be a certain storage area in the internal memory 120 . The results saved in the personalized language database may include words, the syllable sequence corresponding to the word, and the number of times the word is selected (ie, word frequency), etc. Possibly, the same syllable sequence can correspond to a variety of different words, and the corresponding word frequencies of these words can be different.
例如,用户采用图像扫描方式输入的结果为“湖北省武汉市东湖高新区金融港B17栋1006室”,电子设备100可以保存在个性化语言库中的结果示例性的可以如下表:For example, the result input by the user using image scanning is "Room 1006, Building B17, Financial Port, East Lake High-tech Zone, Wuhan City, Hubei Province". The results that the electronic device 100 can save in the personalized language library can be exemplified in the following table:
表1个性化语言库中的结果列表Table 1 List of results in the personalized language library
不限于表1列举的词语,在具体实现中保存在个性化语言库中的字词还可以是其他,本申请实施例对此不作限定。It is not limited to the words listed in Table 1. In specific implementation, the words stored in the personalized language library can also be other words, which are not limited in the embodiments of the present application.
可以知道,表1中列举的各个字词对应的词频均为举例说明,实际是根据用户输入的历史数据记录的,上述列举的词频对本申请实施例不构成限制。It can be known that the word frequencies corresponding to each word listed in Table 1 are examples, and are actually recorded based on historical data input by the user. The word frequencies listed above do not limit the embodiments of the present application.
第三部分:采用语音输入方式输入数据。Part 3: Enter data using voice input.
具体地,该实施例中的第三部分与实施例一中的第三部分类似。Specifically, the third part in this embodiment is similar to the third part in Embodiment 1.
假设,电子设备100抽取用户输入的音频信号的音频特征,将该音频特征输入到声学模型中后,输出的音节序列为hu’bei’sheng’wu’han’shi’dong’hu’gao’xin’qu’jin’rong’gang’bi’shi’qi’dong’yi’ling’ling’liu’shi。Assume that the electronic device 100 extracts the audio features of the audio signal input by the user, and after inputting the audio features into the acoustic model, the output syllable sequence is hu'bei'sheng'wu'han'shi'dong'hu'gao'xin 'qu'jin'rong'gang'bi'shi'qi'dong'yi'ling'ling'liu'shi.
不限于输入的音频信号对应的音节序列与采用图像扫描方式输入的结果对应的音节序列完全一致,在具体实现中,输入的音频信号对应的音节序列可以是采用图像扫描方式输入的结果对应的音节序列的一部分,例如图6F所示,根据用户输入的音频信号输出的音节序列可以是dong’hu’gao’xin’qu。The syllable sequence corresponding to the input audio signal is not limited to the syllable sequence corresponding to the input result using the image scanning method. In a specific implementation, the syllable sequence corresponding to the input audio signal may be the syllable sequence corresponding to the result input using the image scanning method. A part of the sequence, for example as shown in Figure 6F, the syllable sequence output according to the audio signal input by the user may be dong'hu'gao'xin'qu.
相反的,采用图像扫描输入方式输入的结果对应的音节序列还可以是输入的音频信号对应的音节序列的一部分,例如图6G所示,根据用户输入的音频信号输出的音节序列可以是wo’yao’qu’dong’hu’gao’xin’qu。On the contrary, the syllable sequence corresponding to the input result using the image scanning input method can also be part of the syllable sequence corresponding to the input audio signal. For example, as shown in Figure 6G, the syllable sequence output according to the audio signal input by the user can be wo'yao 'qu'dong'hu'gao'xin'qu.
第四部分:查找通用语言库及个性化语言库,并输出最终结果。Part 4: Search the general language library and personalized language library, and output the final results.
具体地,该实施例中的第四部分与实施例一中的第四部分类似,此处不赘述。Specifically, the fourth part in this embodiment is similar to the fourth part in Embodiment 1, and will not be described again here.
实施本申请实施例可以将用户使用图像扫描入方式输入的数据共享给语音输入方式,在采用语音输入时可以同时根据用户采用图像扫描方式输入的历史数据和符合大众的使用习惯来确定输入结果。提升语音识别的准确性,提高用户的输入效率。Implementing the embodiments of the present application can share the data input by the user using the image scanning method to the voice input method. When using voice input, the input result can be determined based on the historical data input by the user using the image scanning method and the usage habits of the public. Improve the accuracy of speech recognition and improve user input efficiency.
实施例三:语音输入-键盘输入,即将采用语音输入方式输入的数据共享给键盘输入方式。Embodiment 3: Voice input-keyboard input, that is, data input using the voice input method is shared with the keyboard input method.
接下来将分四个部分介绍实施例三提供的输入方法。Next, the input method provided by Embodiment 3 will be introduced in four parts.
第一部分:采用语音输入方式输入数据,输出对应的结果。Part One: Use voice input to input data and output the corresponding results.
具体地,用户采用语音输入方式输入数据的过程可以参考图4,此处不赘述。Specifically, the process of the user inputting data using the voice input method can be referred to Figure 4, which will not be described again here.
假设电子设备100抽取用户采用语音输入方式输入的音频信号的音频特征,将该音频特征输入到声学模型中,输出的音节序列为wu’he’da’dao。电子设备100可在输入框303中显示该音节序列对应的可能性最高结果为“五河大道”。若该结果不符合用户的预期,用户可在输入框中再次采用键盘输入方式进行编辑,例如可以将“河”更改为“和”。电子设备100可以确定更改后的结果“五和大道”为音节序列wu’he’da’dao对应的字词。Assume that the electronic device 100 extracts the audio features of the audio signal input by the user in the voice input mode, inputs the audio features into the acoustic model, and the output syllable sequence is wu’he’da’dao. The electronic device 100 may display in the input box 303 that the most likely result corresponding to the syllable sequence is "Five Rivers Avenue". If the result does not meet the user's expectations, the user can use keyboard input again in the input box to edit, for example, "river" can be changed to "and". The electronic device 100 may determine that the modified result “五和大道” is a word corresponding to the syllable sequence wu’he’da’dao.
不限于更改部分结果,例如上述将“河”更改为“和”,在具体实现中用户还可以在输入框中再次采用键盘输入方式对全部结果进行再次编辑,例如将语音识别的结果“五河大道”全部删除后重新采用键盘输入方式编辑。电子设备100可以确认重新编辑后的结果为音节序列wu’he’da’dao对应的字词。本申请实施例对此不作限定。It is not limited to changing some results, such as changing "river" to "和" as mentioned above. In the specific implementation, the user can also use the keyboard input method to edit all the results again in the input box, for example, changing the speech recognition result "五河" Delete all "Avenue" and edit again using keyboard input. The electronic device 100 can confirm that the re-edited result is the word corresponding to the syllable sequence wu’he’da’dao. The embodiments of the present application do not limit this.
第二部分:生成个性化语言库。Part 2: Generate personalized language library.
电子设备100可以保存用户采用语音输入方式输入的音频信号对应的音节序列(如wu’he’da’dao)以及最终确定的该音节序列对应的字词(如“五和大道”)在个性化语言库中,并记录该字词被选定的次数(即词频)。其中,个性化语言库可以是内部存储器120中的某个存储区域。因此,最终生成的个性化语言库可以符合使用该电子设备100的用户的使用习惯。The electronic device 100 can save the syllable sequence (such as wu'he'da'dao) corresponding to the audio signal input by the user in the voice input mode and the finally determined word corresponding to the syllable sequence (such as "五和大道") in the personalized language database, and record the number of times the word is selected (i.e. word frequency). The personalized language library may be a certain storage area in the internal memory 120 . Therefore, the finally generated personalized language library can conform to the usage habits of the user using the electronic device 100 .
第三部分:采用键盘输入方式输入数据。Part 3: Enter data using keyboard input.
具体地,用户采用键盘输入方式输入数据的过程可以参考图3A,此处不赘述。接下来以用户采用键盘输入方式输入的字符串为wuhedadao为例,示例性地对第四部分进行说明。Specifically, the process of the user inputting data using the keyboard input method can be referred to FIG. 3A , which will not be described again here. Next, taking the string input by the user using the keyboard input mode as wuhedadao as an example, the fourth part will be explained exemplarily.
第四部分:查找通用语言库及个性化语言库,确定最终结果,并在待选项列表402中优先显示最终结果。Part 4: Search the general language library and the personalized language library, determine the final result, and display the final result first in the waiting list 402.
具体地,该实施例中确定最终结果的过程与实施例一中的第四部分类似,此处不赘述。Specifically, the process of determining the final result in this embodiment is similar to the fourth part in Embodiment 1, and will not be described again here.
例如,电子设备100可以确定字符串wuhedadao对应的音节序列为wu’he’da’dao。电子设备100可以查找通用语言库,确定该音节序列对应的结果为“五河大道”,即第一结果为“五河大道”。电子设备100可以查找个性化语言库,确定该音节序列对应的结果为“五和大道”,即第二结果为“五和大道”。电子设备100可在待选项列表402中优先显示第二结果“五和大道”,其次显示第一结果“五河大道”。For example, the electronic device 100 may determine that the syllable sequence corresponding to the string wuhedadao is wu’he’da’dao. The electronic device 100 can search the universal language library and determine that the result corresponding to the syllable sequence is "五河道", that is, the first result is "五河道". The electronic device 100 can search the personalized language library and determine that the result corresponding to the syllable sequence is "五和大道", that is, the second result is "五和大道". The electronic device 100 may display the second result "Wuhe Avenue" first in the waiting option list 402, and secondly display the first result "Wuhe Avenue".
实施本申请实施例可以将用户使用语音输入方式输入的数据共享给键盘输入方式,在键盘输入方式的待选项列表中优先显示符合用户语音输入习惯的选项,减少用户在待选项列表中查找目标选项的时间,提升用户的输入效率。Implementing the embodiments of the present application can share the data input by the user using the voice input mode to the keyboard input mode, and prioritize the options that conform to the user's voice input habits in the waiting option list of the keyboard input mode, reducing the user's search for target options in the waiting option list. time to improve user input efficiency.
不限于上述列举的几个实施例,在具体实现中还可以将图像扫描输入方式输入的数据共享给键盘输入方式,还可以将手写输入方式输入的数据共享给键盘输入方式或语音输入方式,具体实现过程可以与前述三个实施例类似,在此不再赘述。Not limited to the above-mentioned embodiments, in a specific implementation, the data input by the image scanning input method can also be shared with the keyboard input method, and the data input by the handwriting input method can also be shared with the keyboard input method or the voice input method. Specifically, The implementation process may be similar to the previous three embodiments and will not be described again here.
不限于图4中示出的用户界面,在具体实现中,用户可以通过语音助手输入音频数据,本申请实施例对输入音频数据的用户界面不做限定。具体地,通过语音助手输入音频数据时电子设备100可以显示任意用户界面,或者电子设备100可以处于锁屏状态或熄屏状态。电子设备可以将语音识别的结果显示在语音助手的界面中。其中,语音助手可以是电子设备100具备的一个功能,通常需要通过特定的关键词唤醒该功能,该关键词例如可以但不限于是“小艺小艺”。It is not limited to the user interface shown in Figure 4. In a specific implementation, the user can input audio data through the voice assistant. The embodiment of the present application does not limit the user interface for inputting audio data. Specifically, when audio data is input through the voice assistant, the electronic device 100 may display any user interface, or the electronic device 100 may be in a screen lock state or a screen off state. The electronic device can display the speech recognition results in the interface of the voice assistant. Among them, the voice assistant may be a function of the electronic device 100, and the function usually needs to be awakened through a specific keyword. The keyword may be, for example, but is not limited to, "xiaoyi xiaoyi".
接下来介绍本申请另一实施例提供的电子设备。Next, an electronic device provided by another embodiment of the present application is introduced.
如图7所示,电子设备100可以包括输入模块810、通用语言库820、个性化语言库830、确定模块840及显示模块850。其中:As shown in FIG. 7 , the electronic device 100 may include an input module 810 , a general language library 820 , a personalized language library 830 , a determination module 840 and a display module 850 . in:
输入模块810可以用于接收用户输入的数据。The input module 810 may be used to receive data input by a user.
具体地,当用户采用语音输入方式输入数据时,输入模块810可以是麦克风170C。当用户采用键盘输入方式或手写输入方式输入数据时,输入模块810可以是触摸传感器180F。当用户采用图像扫描输入方式输入数据时,输入模块810可以是摄像头191。Specifically, when the user uses voice input to input data, the input module 810 may be the microphone 170C. When the user inputs data using keyboard input or handwriting input, the input module 810 may be a touch sensor 180F. When the user inputs data using the image scanning input method, the input module 810 may be the camera 191 .
通用语言库820可以根据输入模块810接收的数据输出第一结果。The universal language library 820 may output the first result according to the data received by the input module 810 .
具体地,通用语言库820可以是预设的语言库,该语言库可以根据大量用户采用多种输入方式输入的数据得到。在本申请实施例中可以将通用语言库称为第一语言库。Specifically, the universal language library 820 can be a preset language library, which can be obtained based on data input by a large number of users using multiple input methods. In the embodiment of this application, the general language library may be called the first language library.
具体地,通用语言库中可以但不限于包括多种字词、各个字词对应的音节序列及该字词对应的词频。此外,通用语言库还可以用于计算候选字词在句子结构中的得分,从而使电子设备100将得分最高的候选字词优先显示在待选项列表402中。可能地,同一个音节序列可以对应多种不同的字词,这些字词对应的词频可以不同。Specifically, the general language library may include, but is not limited to, a variety of words, the syllable sequence corresponding to each word, and the word frequency corresponding to the word. In addition, the general language library can also be used to calculate the scores of candidate words in the sentence structure, so that the electronic device 100 preferentially displays the candidate words with the highest scores in the candidate list 402 . Possibly, the same syllable sequence can correspond to a variety of different words, and the corresponding word frequencies of these words can be different.
个性化语言库830可以根据输入模块810接收的数据输出第二结果。在本申请实施例中可以将个性化语言库称为第二语言库。The personalized language library 830 may output the second result according to the data received by the input module 810. In the embodiment of this application, the personalized language library may be called a second language library.
具体地,当用户采用键盘输入方式输入数据时,个性化语言库830可以是记录了用户采用除键盘输入方式以外的其他输入方式(如图像扫描输入方式、语音输入方式及手写输入方式)输入的数据。Specifically, when the user inputs data using the keyboard input method, the personalized language database 830 may record the user's input using other input methods other than the keyboard input method (such as image scanning input method, voice input method, and handwriting input method). data.
当用户采用语音输入方式输入数据时,个性化语言库830可以是记录了用户采用除语音输入方式以外的其他输入方式(如图像扫描输入方式、键盘输入方式及手写输入方式)输入的数据。When the user inputs data using the voice input method, the personalized language database 830 may record the data input by the user using other input methods besides the voice input method (such as image scanning input method, keyboard input method, and handwriting input method).
上述通用语言库820和个性化语言库830可以是内部存储器120中的某个存储区域。The above-mentioned general language library 820 and personalized language library 830 may be a certain storage area in the internal memory 120 .
确定模块840可以用于接收通用语言库820输出的第一结果以及个性化语言库830输出的第二结果,根据第一结果和第二结果确定最终结果。在本申请实施例中可以将最终结果称为目标结果。The determining module 840 may be configured to receive the first result output by the general language library 820 and the second result output by the personalized language library 830, and determine the final result according to the first result and the second result. In the embodiment of this application, the final result may be called the target result.
显示模块850,用于在目标输入界面中显示上述最终结果。具体地,显示模块850可以是显示屏192。其中,目标输入界面可以是具有输入框的应用的用户界面。具有输入框的应用可以是系统应用,如短信息、日历等,也可以是第三方应用,如脸书(Facebook)、亚马逊、地图、音乐播放器等。目标输入界面还可以是语音助手的界面。The display module 850 is used to display the above final result in the target input interface. Specifically, the display module 850 may be the display screen 192. The target input interface may be a user interface of an application having an input box. Applications with input boxes can be system applications, such as text messages, calendars, etc., or third-party applications, such as Facebook, Amazon, maps, music players, etc. The target input interface can also be the interface of the voice assistant.
本申请实施例提供的电子设备可以融合不同的输入方式的用户数据,在不同的输入方式中共享数据,提升用户的输入效率。The electronic device provided by the embodiment of the present application can integrate user data of different input methods, share data in different input methods, and improve user input efficiency.
接下来介绍本申请实施例提供的输入方法。Next, the input method provided by the embodiment of this application is introduced.
如图8所示,本申请实施例提供的输入方法至少可以包括以下几个步骤:As shown in Figure 8, the input method provided by the embodiment of the present application may include at least the following steps:
S901:接收用户采用第一输入方式输入的第一数据。S901: Receive the first data input by the user using the first input method.
具体地,第一输入方式可以是前述实施例中提到的语音输入方式或者键盘输入方式。其中,键盘输入方式可以是拼音输入方式或者五笔输入方式。Specifically, the first input method may be the voice input method or keyboard input method mentioned in the previous embodiment. Among them, the keyboard input method may be Pinyin input method or Wubi input method.
用户采用语音输入方式输入数据的过程可以参考实施例一或实施例二中第三部分的描述,此处不赘述。For the process of the user inputting data using the voice input method, reference can be made to the description in the third part of Embodiment 1 or Embodiment 2, which will not be described again here.
用户采用键盘输入方式输入数据的过程可以参考图3A的描述或者参考实施例三中第三部分的描述,此处不赘述。The user may refer to the description in FIG. 3A or the description in the third part of Embodiment 3 for the process of inputting data using the keyboard input method, which will not be described again here.
S902:根据第一数据确定目标结果,该目标结果为用户采用第二输入方式输入第二数据的历史选择结果,第一数据与第二数据对应的音节序列相同,目标结果与音节序列对应的通用结果不同。S902: Determine the target result based on the first data. The target result is the historical selection result of the user inputting the second data using the second input method. The syllable sequence corresponding to the first data and the second data is the same, and the target result is the universal corresponding to the syllable sequence. The results are different.
其中,历史选择结果为用户在此之前采用其他输入方式输入第二数据时选择的结果。通用结果是符合大多数用户使用习惯的结果。Wherein, the historical selection results are the results selected by the user before using other input methods to input the second data. Universal results are results that are consistent with the usage habits of most users.
例如,若第一输入方式为语音输入方式,输入的第一数据为音频信号,根据该音频信号提取的音频特征输入到声学模型中后输出的音节序列可以是zhang’san,第二输入方式为键盘输入方式,第二数据为字符串zhangsan,用户采用第二输入方式输入第二数据的历史选择结果为“章三”,音节序列zhang’san对应的通用结果为“张三”。可知,根据第一数据确定的目标结果为“章三”,而非“张三”。For example, if the first input method is a voice input method, the input first data is an audio signal, and the audio features extracted according to the audio signal are input into the acoustic model and the output syllable sequence can be zhang'san, and the second input method is In the keyboard input mode, the second data is the string zhangsan. The historical selection result of the user inputting the second data using the second input mode is "Zhang San", and the general result corresponding to the syllable sequence zhang'san is "Zhang San". It can be seen that the target result determined based on the first data is "Zhang San", not "Zhang San".
也即是说,目标结果不符合大众的使用习惯,但与用户采用其他输入方式输入的数据关联,符合自己采用其他输入方式输入数据时的使用习惯。That is to say, the target result is not in line with the public's usage habits, but it is related to the data input by the user using other input methods, and is in line with the user's usage habits when using other input methods to input data.
在一种具体的实现方式中,上述S902具体可以包括以下几个步骤:In a specific implementation manner, the above S902 may include the following steps:
S9021:根据用户输入的第一数据查找第一语言库,输出第一结果。S9021: Search the first language library according to the first data input by the user, and output the first result.
具体地,第一语言库可以是前述实施例中提到的通用语言库。通用语言库可以是预设的语言库,该语言库可以根据大量用户采用多种输入方式输入的数据得到。通用语言库可以是用户在下载输入法时该输入法自带的语言库,通用语言库还可以是电子设备100自带的语言库。Specifically, the first language library may be the general language library mentioned in the previous embodiment. The universal language library can be a preset language library, which can be obtained based on data input by a large number of users using multiple input methods. The general language library may be the language library that comes with the input method when the user downloads the input method. The general language library may also be the language library that comes with the electronic device 100 .
具体地,通用语言库中可以但不限于包括多种字词、各个字词对应的音节序列及该字词对应的词频。此外,通用语言库还可以用于计算候选字词在句子结构中的得分,从而使电子设备100将得分最高的候选字词优先显示在待选项列表402中。可能地,同一个音节序列可以对应多种不同的字词,这些字词对应的词频可以不同。Specifically, the general language library may include, but is not limited to, a variety of words, the syllable sequence corresponding to each word, and the word frequency corresponding to the word. In addition, the general language library can also be used to calculate the scores of candidate words in the sentence structure, so that the electronic device 100 preferentially displays the candidate words with the highest scores in the candidate list 402 . Possibly, the same syllable sequence can correspond to a variety of different words, and the corresponding word frequencies of these words can be different.
S9022:根据用户输入的第一数据查找第二语言库,输出第二结果。S9022: Search the second language library according to the first data input by the user, and output the second result.
具体地,第二语言库可以是前述实施例中提到的个性化语言库。个性化语言库可以记录用户采用除第一输入方式以外的其他输入方式输入的数据。Specifically, the second language library may be the personalized language library mentioned in the previous embodiment. The personalized language library can record data input by the user using other input methods other than the first input method.
可能地,个性化语言库中的音节序列对应的词频最高的字词与通用语言库中该音节序列对应的词频最高的字词不一致。即个性化语言库记录的使用该电子设备的用户自己的使用习惯,而通用语言库记录的是大众的使用习惯。该用户自己的使用习惯不同于大众的使用习惯。Possibly, the word with the highest word frequency corresponding to the syllable sequence in the personalized language database is inconsistent with the word with the highest word frequency corresponding to the syllable sequence in the general language database. That is, the personalized language library records the usage habits of the user who uses the electronic device, while the general language library records the usage habits of the public. The user's own usage habits are different from the usage habits of the public.
可能地,用户采用第一输入方式输入的数据对应的音节序列可以是个性化语言库中记录的数据对应的音节序列的一部分。例如,用户采用第一输入方式输入的数据对应的音节序列可以是gao’xin’qu,而个性化语言库中记录的数据对应的音节序列可以是dong’hu’gao’xin’qu。Possibly, the syllable sequence corresponding to the data input by the user using the first input method may be part of the syllable sequence corresponding to the data recorded in the personalized language library. For example, the syllable sequence corresponding to the data input by the user using the first input method may be gao’xin’qu, and the syllable sequence corresponding to the data recorded in the personalized language library may be dong’hu’gao’xin’qu.
相反的,个性化语言库中记录的数据对应的音节序列也可以是用户采用第一输入方式输入的数据对应的音节序列中的一部分。例如,用户采用第一输入方式输入的数据对应的音节序列可以是wo’yao’qu’dong’hu’gao’xin’qu,而个性化语言库中记录的数据对应的音节序列可以是dong’hu’gao’xin’qu。On the contrary, the syllable sequence corresponding to the data recorded in the personalized language library may also be part of the syllable sequence corresponding to the data input by the user using the first input method. For example, the syllable sequence corresponding to the data input by the user using the first input method may be wo'yao'qu'dong'hu'gao'xin'qu, and the syllable sequence corresponding to the data recorded in the personalized language library may be dong' hu'gao'xin'qu.
电子设备100包括的输入方式可以包括但不限于:键盘输入方式、语音输入方式、图像扫描输入方式及手写输入方式。The input methods included in the electronic device 100 may include but are not limited to: keyboard input method, voice input method, image scanning input method, and handwriting input method.
若第一输入方式为语音输入方式,则个性化语言库可以记录用户采用键盘输入方式、图像扫描输入方式及手写输入方式输入过的数据。If the first input method is voice input, the personalized language library can record data input by the user using keyboard input, image scanning input, and handwriting input.
若第一输入方式为键盘输入方式,则个性化语言库可以记录用户采用图像扫描方式、语音输入方式及手写输入方式输入过的数据。If the first input method is keyboard input, the personalized language library can record data input by the user using image scanning, voice input, and handwriting input.
第二结果可以存在或者不存在。当第二结果不存在时,可以看作第二语言库输出的第二结果为空。The second result may or may not exist. When the second result does not exist, it can be regarded that the second result output by the second language library is empty.
本申请实施例中涉及的键盘输入方式可以是拼音输入方式,也可以是五笔输入方式。其中输入法应用的界面305可以包含26键的字母组合按键的输入界面,也可以包含9键的数字组合按键的输入界面。The keyboard input method involved in the embodiment of the present application may be a Pinyin input method or a Wubi input method. The interface 305 of the input method application may include an input interface of 26-key letter combination keys, or may include an input interface of 9-key number combination keys.
可以知道,本申请实施例对上述S9021和S9022实现的先后顺序不作限定。It can be understood that the embodiment of the present application does not limit the order in which the above-mentioned S9021 and S9022 are implemented.
S9023:根据第一结果及第二结果,确定目标结果。S9023: Determine the target result based on the first result and the second result.
可能地,第一结果和第二结果一致。目标结果为第一结果或第二结果。Possibly, the first result and the second result are consistent. The target result is the first result or the second result.
可能地,第一结果和第二结果不一致,且第二结果不为空。目标结果为第二结果。Possibly, the first result and the second result are inconsistent, and the second result is not empty. The target result is the secondary result.
可能地,第一结果和第二结果不一致,且第二结果为空。目标结果为第一结果。Possibly, the first result and the second result are inconsistent, and the second result is empty. The target result is the first result.
S903:在目标输入界面中显示目标结果。S903: Display the target result in the target input interface.
具体地,确定目标结果后,可以将目标结果显示在目标输入界面中。Specifically, after the target result is determined, the target result can be displayed in the target input interface.
若用户通过具有输入框的应用如微信中输入音频数据,则电子设备100可以将目标结果显示在微信界面中的输入框303中。目标输入界面即为具备该输入框303的接收用户输入语音数据的用户界面。例如图5所示的用户界面。If the user inputs audio data through an application with an input box, such as WeChat, the electronic device 100 can display the target result in the input box 303 in the WeChat interface. The target input interface is a user interface provided with the input box 303 that receives voice data input by the user. For example, the user interface shown in Figure 5.
若用户在唤醒语音助手后,通过语音助手输入音频数据,则电子设备100可以将目标结果显示在语音助手的界面中。语音助手的界面即为目标输入界面。If the user inputs audio data through the voice assistant after waking up the voice assistant, the electronic device 100 can display the target result in the interface of the voice assistant. The interface of the voice assistant is the target input interface.
实施本申请实施例可以融合使用该电子设备的用户采用不同的输入方式输入的数据,在不同的输入方式中共享数据,增强电子设备对输入数据的处理能力,使输出的结果与现有相比更加符合用户的使用习惯,提升用户的输入效率。Implementing the embodiments of the present application can integrate data input by users of the electronic device using different input methods, share data in different input methods, enhance the electronic device's ability to process input data, and make the output results better than existing ones. It is more in line with users' usage habits and improves user input efficiency.
在另外一些实施例中,用户采用第一输入方式输入的数据在第一语言库中查找,得出完整的输入数据对应的第一结果。而在第二语言库中查找,得出输入数据中的一部分存在第二结果,输入数据的另一部分不存在第二结果。则最终结果可以是输入数据的另一部分在第一语言库中的结果(即第一结果中与该另一部分对应的结果)与上述第二结果的拼接结果。In some other embodiments, the data input by the user using the first input method is searched in the first language library, and a first result corresponding to the complete input data is obtained. When searching in the second language library, it is found that the second result exists in a part of the input data, but does not exist in another part of the input data. Then the final result may be the splicing result of the result of another part of the input data in the first language library (that is, the result corresponding to the other part in the first result) and the above-mentioned second result.
例如,用户采用语音输入方式输入音频信号,根据该音频信号得出的对应的音节序列为wo’ming’tian’yao’he’xiao’ming’yi’qi’qu’guang’jie。将上述音节序列在第一语言库中查找得出的的第一结果为“我明天要和小明一起去逛街”。而在第二语言库中,得出输入的音频信号的一部分对应的音节序列xiao’ming存在第二结果为“小铭”,其他音节序列不存在第二结果。则最终结果可以是将第一结果中除音节序列xiao’ming之外的结果与第二结果进行拼接,得到的最终结果为“我明天要和小铭一起去逛街”。For example, the user uses voice input to input an audio signal, and the corresponding syllable sequence obtained based on the audio signal is wo’ming’tian’yao’he’xiao’ming’yi’qi’qu’guang’jie. The first result obtained by searching the above syllable sequence in the first language library is "I want to go shopping with Xiao Ming tomorrow." In the second language library, it is found that the syllable sequence xiao'ming corresponding to a part of the input audio signal has a second result of "小明", and other syllable sequences do not have a second result. Then the final result can be to splice the results in the first result except the syllable sequence xiao’ming with the second result, and the final result obtained is "I want to go shopping with Xiao Ming tomorrow."
需要说明的是,提供上述第一输入方式的应用程序及提供上述第二输入方式的应用程序可以相同,也可以不同。例如,提供键盘输入方式的应用程序可以是输入法,而提供语音输入方式的应用程序可以是语音助手等。It should be noted that the application program that provides the first input method and the application program that provides the second input method may be the same or different. For example, an application that provides a keyboard input method may be an input method, and an application that provides a voice input method may be a voice assistant, etc.
接下来介绍本申请实施例提供的一种具体的输入方法。Next, a specific input method provided by the embodiment of the present application is introduced.
如图9所示,输入方法可以包括以下几个步骤:As shown in Figure 9, the input method can include the following steps:
S1001:接收采用键盘输入方式输入字符串wuhedadao的用户操作。S1001: Receive the user operation of inputting the string wuhedadao using the keyboard input method.
具体地,用户可以在输入法的应用界面中输入上述字符串。Specifically, the user can input the above string in the application interface of the input method.
S1002:接收用于确定上述字符串对应的结果为“五和大道”的用户操作。S1002: Receive a user operation for determining that the result corresponding to the above string is "Wuhe Avenue".
具体地,用户确定上述字符串对应的结果的过程可以参考图3A-图3D示出的过程。Specifically, the process by which the user determines the result corresponding to the above character string can refer to the process shown in FIG. 3A to FIG. 3D .
本申请实施例中键盘输入方式即为第二输入方式,用户采用第二输入方式输入的数据即为字符串wuhedadao,历史选择结果即为“五和大道”。In the embodiment of the present application, the keyboard input method is the second input method, the data input by the user using the second input method is the string wuhedadao, and the historical selection result is "Wuhe Avenue".
S1003:将上述字符串以及该字符串对应的结果保存至个性化语言库。S1003: Save the above string and the result corresponding to the string to the personalized language library.
S1004:接收采用语音输入方式输入的音频信号。S1004: Receive audio signals input using voice input.
具体地,用户可以采用语音助手输入上述音频信号,用户还可以采用谷歌地图输入上述音频信号,用户还可以采用输入法输入上述音频信号。本申请实施例对此不作限定。Specifically, the user can use a voice assistant to input the above audio signal, the user can also use Google Maps to input the above audio signal, and the user can also use an input method to input the above audio signal. The embodiments of the present application do not limit this.
本申请实施例中语音输入方式即为第一输入方式,用户输入的音频信号即为第一数据。In the embodiment of the present application, the voice input method is the first input method, and the audio signal input by the user is the first data.
S1005:确定上述音频信号对应的音节序列为wu’he’da’dao。S1005: Determine the syllable sequence corresponding to the above audio signal to be wu’he’da’dao.
具体地,电子设备100可以抽取该音频信号的音频特征,将该音频特征输入到声学模型中后,得到该音频信号对应的音节序列。Specifically, the electronic device 100 can extract the audio features of the audio signal, and input the audio features into the acoustic model to obtain the syllable sequence corresponding to the audio signal.
S1006:查找通用语言库,确定第一结果为“五河大道”。S1006: Search the general language library and determine that the first result is "Five Rivers Avenue".
本申请实施例中“五河大道”为音节序列wu’he’da’dao对应的通用结果。In the embodiment of this application, “Wuhe Avenue” is the general result corresponding to the syllable sequence wu’he’da’dao.
S1007:查找个性化语言库,确定第二结果为“五和大道”。S1007: Search the personalized language library and determine that the second result is "Wuhe Avenue".
本申请实施例中“五和大道”即为历史选择结果。In the embodiment of this application, "Wuhe Avenue" is the historical selection result.
S1008:对比第一结果和第二结果,确定目标结果为“五和大道”。S1008: Compare the first result and the second result, and determine that the target result is "Wuhe Avenue".
可以看出,目标结果与通用结果不同,与历史选择结果相同。As can be seen, the target results are different from the universal results and the same as the historical selection results.
S1009:将目标结果“五和大道”显示在目标输入界面中。S1009: Display the target result "Wuhe Avenue" in the target input interface.
具体地,若用户在S1004中采用语音助手输入音频信号,则目标输入界面为语音助手的界面;若用户在S1004中采用谷歌地图输入上述音频信号,则目标输入界面为谷歌地图的界面;若用户在S1004中采用输入法输入上述音频信号,则目标输入界面可以是接收用户输入语音数据的用户界面,如图5所示的用户界面。Specifically, if the user uses the voice assistant to input audio signals in S1004, the target input interface is the interface of the voice assistant; if the user uses Google Maps to input the above audio signals in S1004, the target input interface is the interface of Google Maps; if the user In S1004, the input method is used to input the audio signal. The target input interface may be a user interface that receives voice data input by the user, such as the user interface shown in Figure 5.
具体地,在第一结果和第二结果不一致的情况下,优先以第二结果为准,即优先将第二结果作为目标结果。由于第二结果是查找个性化语言库得到的结果,而个性化语言库是根据使用该电子设备的用户采用其他输入方式输入的数据得到的。因此,个性化语言库输出的结果更加符合用户的使用习惯,准确性更高,用户输入效率高。Specifically, when the first result and the second result are inconsistent, the second result shall take priority, that is, the second result shall be given priority as the target result. Because the second result is the result of searching the personalized language library, and the personalized language library is obtained based on the data input by the user of the electronic device using other input methods. Therefore, the results output by the personalized language library are more in line with the user's usage habits, with higher accuracy and high user input efficiency.
本申请实施例还提供了一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当其在计算机或处理器上运行时,使得计算机或处理器执行上述任一个方法中的一个或多个步骤。上述电子设备的各组成模块如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在所述计算机可读取存储介质中。Embodiments of the present application also provide a computer-readable storage medium. The computer-readable storage medium stores instructions, which when run on a computer or processor, cause the computer or processor to execute one of the above methods. or multiple steps. If each component module of the above-mentioned electronic device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in the computer-readable storage medium.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者通过所述计算机可读存储介质进行传输。所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如,固态硬盘(solid state disk,SSD))等。In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in or transmitted over a computer-readable storage medium. The computer instructions may be transmitted from one website, computer, server or data center to another website through wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) means. , computer, server or data center for transmission. The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains one or more available media integrated. The available media may be magnetic media (eg, floppy disk, hard disk, magnetic tape), optical media (eg, DVD), or semiconductor media (eg, solid state disk (SSD)), etc.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,该流程可以由计算机程序来指令相关的硬件完成,该程序可存储于计算机可读取存储介质中,该程序在执行时,可包括如上述各方法实施例的流程。而前述的存储介质包括:ROM或随机存储记忆体RAM、磁碟或者光盘等各种可存储程序代码的介质。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments are implemented. This process can be completed by instructing relevant hardware through a computer program. The program can be stored in a computer-readable storage medium. When the program is executed, , may include the processes of the above method embodiments. The aforementioned storage media include: ROM, random access memory (RAM), magnetic disks, optical disks and other media that can store program codes.
Claims (9)
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910453733 | 2019-05-28 | ||
CN2019104537333 | 2019-05-28 |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110502126A CN110502126A (en) | 2019-11-26 |
CN110502126B true CN110502126B (en) | 2023-12-29 |
Family
ID=68586664
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910661615.1A Active CN110502126B (en) | 2019-05-28 | 2019-07-22 | Input method and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110502126B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111627438A (en) * | 2020-05-21 | 2020-09-04 | 四川虹美智能科技有限公司 | Voice recognition method and device |
CN112214115B (en) * | 2020-09-25 | 2024-04-30 | 汉海信息技术(上海)有限公司 | Input mode identification method and device, electronic equipment and storage medium |
CN114995663B (en) * | 2022-06-15 | 2025-08-19 | 维沃移动通信有限公司 | Word determining method and electronic equipment |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH01191199A (en) * | 1988-01-27 | 1989-08-01 | Toshiba Corp | Voice input device |
JPH0651939A (en) * | 1992-07-29 | 1994-02-25 | Nippon Telegr & Teleph Corp <Ntt> | Voice input device |
CN106774975A (en) * | 2016-11-30 | 2017-05-31 | 百度在线网络技术(北京)有限公司 | Input method and device |
CN106873798A (en) * | 2017-02-16 | 2017-06-20 | 北京百度网讯科技有限公司 | For the method and apparatus of output information |
CN106873799A (en) * | 2017-02-16 | 2017-06-20 | 北京百度网讯科技有限公司 | Input method and device |
CN107731229A (en) * | 2017-09-29 | 2018-02-23 | 百度在线网络技术(北京)有限公司 | Method and apparatus for identifying voice |
CN108428446A (en) * | 2018-03-06 | 2018-08-21 | 北京百度网讯科技有限公司 | Audio recognition method and device |
CN109243430A (en) * | 2017-07-04 | 2019-01-18 | 北京搜狗科技发展有限公司 | A kind of audio recognition method and device |
-
2019
- 2019-07-22 CN CN201910661615.1A patent/CN110502126B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH01191199A (en) * | 1988-01-27 | 1989-08-01 | Toshiba Corp | Voice input device |
JPH0651939A (en) * | 1992-07-29 | 1994-02-25 | Nippon Telegr & Teleph Corp <Ntt> | Voice input device |
CN106774975A (en) * | 2016-11-30 | 2017-05-31 | 百度在线网络技术(北京)有限公司 | Input method and device |
CN106873798A (en) * | 2017-02-16 | 2017-06-20 | 北京百度网讯科技有限公司 | For the method and apparatus of output information |
CN106873799A (en) * | 2017-02-16 | 2017-06-20 | 北京百度网讯科技有限公司 | Input method and device |
CN109243430A (en) * | 2017-07-04 | 2019-01-18 | 北京搜狗科技发展有限公司 | A kind of audio recognition method and device |
CN107731229A (en) * | 2017-09-29 | 2018-02-23 | 百度在线网络技术(北京)有限公司 | Method and apparatus for identifying voice |
CN108428446A (en) * | 2018-03-06 | 2018-08-21 | 北京百度网讯科技有限公司 | Audio recognition method and device |
Also Published As
Publication number | Publication date |
---|---|
CN110502126A (en) | 2019-11-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9111538B2 (en) | Genius button secondary commands | |
US9031847B2 (en) | Voice-controlled camera operations | |
EP2440988B1 (en) | Touch anywhere to speak | |
US20150213127A1 (en) | Method for providing search result and electronic device using the same | |
CN111371949A (en) | Application switching method, device, storage medium and touch terminal | |
CN111524501B (en) | Voice playing method, device, computer equipment and computer readable storage medium | |
CN112328398B (en) | Task processing method and device, electronic device and storage medium | |
CN110502126B (en) | Input method and electronic equipment | |
CN103811005A (en) | Mobile terminal and control method thereof | |
CN110659690B (en) | Neural network construction method and device, electronic equipment and storage medium | |
CN113361540A (en) | Image processing method and device, electronic equipment and storage medium | |
WO2020103353A1 (en) | Multi-beam selection method and device | |
CN111369994B (en) | Voice processing method and electronic equipment | |
US20200135205A1 (en) | Input method, device, apparatus, and storage medium | |
CN111339737A (en) | Entity linking method, device, equipment and storage medium | |
CN109685041B (en) | Image analysis method and device, electronic equipment and storage medium | |
CN109447258B (en) | Neural network model optimization method and device, electronic device and storage medium | |
CN113823266B (en) | Keyword detection method, device, equipment and storage medium | |
CN112445906A (en) | Method and device for generating reply message | |
CN111554314B (en) | Noise detection method, device, terminal and storage medium | |
CN112002313B (en) | Interaction method and device, sound box, electronic equipment and storage medium | |
CN110659625A (en) | Training method and device of object recognition network, electronic equipment and storage medium | |
CN116860913A (en) | Voice interaction method, device, equipment and storage medium | |
CN114443814A (en) | Reply information output method, device, device and storage medium | |
US12198696B2 (en) | Electronic device and operation method thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |