[go: up one dir, main page]

CN111782060B - Object display method, device and electronic device - Google Patents

Object display method, device and electronic device Download PDF

Info

Publication number
CN111782060B
CN111782060B CN202010559109.4A CN202010559109A CN111782060B CN 111782060 B CN111782060 B CN 111782060B CN 202010559109 A CN202010559109 A CN 202010559109A CN 111782060 B CN111782060 B CN 111782060B
Authority
CN
China
Prior art keywords
character information
candidate
target object
character
memory word
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
Application number
CN202010559109.4A
Other languages
Chinese (zh)
Other versions
CN111782060A (en
Inventor
李司棋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN202010559109.4A priority Critical patent/CN111782060B/en
Publication of CN111782060A publication Critical patent/CN111782060A/en
Application granted granted Critical
Publication of CN111782060B publication Critical patent/CN111782060B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/02Input arrangements using manually operated switches, e.g. using keyboards or dials
    • G06F3/023Arrangements 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/0233Character input methods
    • G06F3/0237Character input methods using prediction or retrieval techniques
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing
    • G06F40/216Parsing using statistical methods
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • Probability & Statistics with Applications (AREA)
  • Human Computer Interaction (AREA)
  • Machine Translation (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application discloses an object display method, an object display device and electronic equipment, wherein the method comprises the following steps: acquiring a candidate object corresponding to the first character information; the first character information is character information input based on a keyboard control; searching a target object from a memory word stock; the target object is an object corresponding to second character information, and the second character information is character information with the minimum editing distance with the first character information in the memory word stock; and if the first number of occurrences of the target object in the memory word stock is greater than the second number of occurrences of the candidate object in the memory word stock, displaying the target object in a candidate display area. The implementation of the method can simplify the operation of a user.

Description

对象显示方法、装置和电子设备Object display method, device and electronic device

技术领域Technical Field

本申请属于通信技术领域,具体涉及一种对象显示方法、装置和电子设备。The present application belongs to the field of communication technology, and specifically relates to an object display method, device and electronic device.

背景技术Background technique

随着电子设备的快速发展,电子设备上配置的输入法各项功能日益完善,比如,针对输入法开发了一种记忆词库的功能。记忆词库是指当用户再次输入重复的字符串如拼音串时,用户点选过的相应候选对象,如候选词会被排列到候选显示区域中更靠前的位置。With the rapid development of electronic devices, the functions of input methods configured on electronic devices are becoming increasingly perfect. For example, a memory word library function has been developed for input methods. The memory word library means that when a user re-enters a repeated string such as a pinyin string, the corresponding candidate objects selected by the user, such as candidate words, will be arranged in a more forward position in the candidate display area.

在记忆词库的输入场景下,由于各个键盘字母之间的间距较小,临近的位置非常容易按错,因此,当用户输错字符串且完成一次点选时,被点选的对象就会被加入到记忆词库中;当用户再次输入相同的字符串时,这个对象就会出现在候选显示区域中靠前的位置。在这种场景下,可能需要用户进行撤销操作以重新输入正确的字符串,如此,现有的对象显示方式存在操作繁琐的问题。In the input scenario of the memory word library, since the spacing between the letters on the keyboard is small, it is very easy to press the wrong position in the adjacent position. Therefore, when the user enters the wrong string and completes a click, the clicked object will be added to the memory word library; when the user enters the same string again, the object will appear in the front position in the candidate display area. In this scenario, the user may need to undo the operation to re-enter the correct string. In this way, the existing object display method has the problem of cumbersome operation.

发明内容Summary of the invention

本申请实施例的目的是提供一种对象显示方法、装置和电子设备,能够解决现有技术中,对象显示方式存在操作繁琐的问题。The purpose of the embodiments of the present application is to provide an object display method, device and electronic device, which can solve the problem of cumbersome operation in the object display method in the prior art.

为了解决上述技术问题,本申请是这样实现的:In order to solve the above technical problems, this application is implemented as follows:

第一方面,本申请实施例提供了一种对象显示方法,包括:In a first aspect, an embodiment of the present application provides an object display method, comprising:

获取第一字符信息对应的候选对象;其中,所述第一字符信息为基于键盘控件输入的字符信息;Acquire a candidate object corresponding to the first character information; wherein the first character information is character information input based on a keyboard control;

从记忆词库中查找目标对象;其中,所述目标对象为第二字符信息对应的对象,所述第二字符信息为所述记忆词库中与所述第一字符信息的编辑距离最小的字符信息;Searching for a target object from a memory word library; wherein the target object is an object corresponding to the second character information, and the second character information is character information in the memory word library having the smallest edit distance with the first character information;

若所述目标对象在所述记忆词库中出现的第一次数大于所述候选对象在所述记忆词库中出现的第二次数,则在候选显示区域显示所述目标对象。If the first number of times the target object appears in the memory word library is greater than the second number of times the candidate object appears in the memory word library, the target object is displayed in the candidate display area.

第二方面,本申请实施例提供了一种对象显示装置,包括:In a second aspect, an embodiment of the present application provides an object display device, including:

获取模块,用于获取第一字符信息对应的候选对象;其中,所述第一字符信息为基于键盘控件输入的字符信息;An acquisition module, used to acquire a candidate object corresponding to the first character information; wherein the first character information is character information input based on a keyboard control;

查找模块,用于从记忆词库中查找目标对象;其中,所述目标对象为第二字符信息对应的对象,所述第二字符信息为所述记忆词库中与所述第一字符信息的编辑距离最小的字符信息;A search module, used to search for a target object from a memory word library; wherein the target object is an object corresponding to the second character information, and the second character information is character information in the memory word library with the smallest edit distance with the first character information;

第一显示模块,用于若所述目标对象在所述记忆词库中出现的第一次数大于所述候选对象在所述记忆词库中出现的第二次数,则在候选显示区域显示所述目标对象。The first display module is used to display the target object in the candidate display area if the first number of times the target object appears in the memory word library is greater than the second number of times the candidate object appears in the memory word library.

第三方面,本申请实施例提供了一种电子设备,该电子设备包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如第一方面所述的方法的步骤。In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method described in the first aspect.

第四方面,本申请实施例提供了一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如第一方面所述的方法的步骤。In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.

第五方面,本申请实施例提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如第一方面所述的方法。In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.

本申请实施例中,通过在记忆词库中查找与第一字符信息最相似的第二字符信息对应的目标对象,并在判定记忆词库中该目标对象比候选对象出现频繁的情况下,对该目标对象进行显示。这样,在第一字符信息由于输错而不符合用户预期的情况下,通过预测用户所预期输入的第二字符信息,并在候选显示区域显示所述第二字符信息对应的目标对象,使得用户无需进行撤销操作并重新进行字符输入,如此可以简化用户的操作。In the embodiment of the present application, the target object corresponding to the second character information that is most similar to the first character information is searched in the memory word library, and when it is determined that the target object appears more frequently than the candidate object in the memory word library, the target object is displayed. In this way, when the first character information does not meet the user's expectations due to incorrect input, the second character information expected to be input by the user is predicted, and the target object corresponding to the second character information is displayed in the candidate display area, so that the user does not need to perform an undo operation and re-enter the character, which can simplify the user's operation.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

图1是本申请实施例提供的对象显示方法的流程图;FIG1 is a flow chart of an object display method provided in an embodiment of the present application;

图2是现有的候选显示区域中对象的显示示意图;FIG2 is a schematic diagram showing the display of objects in an existing candidate display area;

图3是本申请实施例中候选显示区域中对象的显示示意图之一;FIG3 is one of the display schematic diagrams of objects in the candidate display area in an embodiment of the present application;

图4是本申请实施例中候选显示区域中对象的显示示意图之二;FIG4 is a second schematic diagram of displaying objects in a candidate display area according to an embodiment of the present application;

图5是本申请实施例提供的对象显示装置的结构图;FIG5 is a structural diagram of an object display device provided in an embodiment of the present application;

图6是本申请实施例提供的电子设备的结构图;FIG6 is a structural diagram of an electronic device provided in an embodiment of the present application;

图7为实现本申请实施例的一种电子设备的硬件结构示意图。FIG. 7 is a schematic diagram of the hardware structure of an electronic device implementing an embodiment of the present application.

具体实施方式Detailed ways

下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施,且“第一”、“第二”等所区分的对象通常为一类,并不限定对象的个数,例如第一对象可以是一个,也可以是多个。此外,说明书以及权利要求中“和/或”表示所连接对象的至少其中之一,字符“/”,一般表示前后关联对象是一种“或”的关系。The terms "first", "second", etc. in the specification and claims of this application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and/or" in the specification and claims represents at least one of the connected objects, and the character "/" generally indicates that the objects associated with each other are in an "or" relationship.

下面结合附图,通过具体的实施例及其应用场景对本申请实施例提供的对象显示进行详细地说明。The object display provided by the embodiment of the present application is described in detail below through specific embodiments and their application scenarios in conjunction with the accompanying drawings.

参见图1,图1是本申请实施例提供的对象显示方法的流程图,如图1所示,包括以下步骤:Referring to FIG. 1 , FIG. 1 is a flow chart of an object display method provided in an embodiment of the present application, as shown in FIG. 1 , comprising the following steps:

步骤101,获取第一字符信息对应的候选对象;其中,所述第一字符信息为基于键盘控件输入的字符信息。Step 101, obtaining candidate objects corresponding to first character information; wherein the first character information is character information input based on a keyboard control.

该步骤中,所述键盘控件可以为虚拟键盘控件,也可以为实体键盘控件,这里不做具体限定。In this step, the keyboard control may be a virtual keyboard control or a physical keyboard control, which is not specifically limited here.

所述第一字符信息可以为使用自带的或者安装的输入法应用程序,通过键盘控件输入的字符信息。所述第一字符信息可以包括至少一个字符,该至少一个字符中可以包括字母、数字或其他符号等。The first character information may be character information inputted through a keyboard control using a built-in or installed input method application. The first character information may include at least one character, which may include letters, numbers or other symbols.

所述候选对象的数量可以为至少一个,其可以为表情、词语或句子等,比如,输入一串拼音“kaixin”,该拼音对应的候选对象的数量可以为两个,分别为一个词语“开心”和一个开心表情,又比如,输入一串拼音“senlinzhenmei”,该拼音对应的候选对象可以为一个句子“森林真美”。The number of candidate objects may be at least one, which may be expressions, words or sentences, etc. For example, if a string of pinyin "kaixin" is input, the number of candidate objects corresponding to the pinyin may be two, namely a word "happy" and a happy expression. For another example, if a string of pinyin "senlinzhenmei" is input, the candidate object corresponding to the pinyin may be a sentence "the forest is so beautiful".

所述候选对象的类型可以为中文,也可以为英文,亦或是其他语言。其中,可以根据输入法的类型确定所述候选对象的类型,比如,若输入法的类型为拼音输入法,通过键盘控件输入的第一字符信息为由字母组合成的拼音,则所述候选对象的类型即为中文,又比如,若输入法的类型为英文输入法,通过键盘控件输入的第一字符信息为由字母组合成的英文单词,则所述候选对象的类型即为英文。以下描述中,所述候选对象的类型将以中文为例进行详细说明。The type of the candidate object can be Chinese, English, or other languages. Among them, the type of the candidate object can be determined according to the type of input method. For example, if the type of input method is Pinyin input method, and the first character information input through the keyboard control is Pinyin composed of letters, then the type of the candidate object is Chinese. For another example, if the type of input method is English input method, and the first character information input through the keyboard control is an English word composed of letters, then the type of the candidate object is English. In the following description, the type of the candidate object will be described in detail using Chinese as an example.

可以根据实际情况来获取第一字符信息对应的候选对象。在一场景下,用户第一次输入第一字符信息,或者再次输入第一字符信息,但是用户之前并未针对该第一字符信息进行输入确认操作,此时,输入法应用程序配置的记忆词库中未存储该第一字符信息,其候选对象可以是根据语义理解得到。比如,用户第一次输入第一字符信息“zhenengshurufa”,该第一字符信息可以语义理解为“这能输入法”。The candidate object corresponding to the first character information can be obtained according to the actual situation. In one scenario, the user inputs the first character information for the first time, or inputs the first character information again, but the user has not previously performed an input confirmation operation for the first character information. At this time, the first character information is not stored in the memory word library configured by the input method application, and its candidate object can be obtained based on semantic understanding. For example, when the user inputs the first character information "zhenengshurufa" for the first time, the first character information can be semantically understood as "this input method".

在另一场景下,所述第一字符信息对应的候选对象可以为记忆词库中所述第一字符信息对应的对象,在该种场景下,所述第一字符信息通常是用户再次输入的字符信息。比如,用户再次输入“zhenengshurufa”,此时,从记忆词库中可以查询到第一字符信息对应的候选对象,为“这能输入法”。In another scenario, the candidate object corresponding to the first character information may be an object corresponding to the first character information in the memory word library. In this scenario, the first character information is usually character information input again by the user. For example, the user inputs "zhenengshurufa" again. At this time, the candidate object corresponding to the first character information can be found in the memory word library, which is "this input method".

然而,还有一种场景,用户输入第一字符信息,但是该第一字符信息无法被语义理解,此时结束流程。比如,用户输入第一字符信息“ji@dkj”,该第一字符信息无法被语义理解,此时结束流程。However, there is another scenario where the user inputs the first character information, but the first character information cannot be semantically understood, and the process is terminated at this time. For example, the user inputs the first character information "ji@dkj", and the first character information cannot be semantically understood, and the process is terminated at this time.

步骤102,从记忆词库中查找目标对象;其中,所述目标对象为第二字符信息对应的对象,所述第二字符信息为所述记忆词库中与所述第一字符信息的编辑距离最小的字符信息。Step 102, searching for a target object from a memory word library; wherein the target object is an object corresponding to the second character information, and the second character information is character information in the memory word library having the smallest edit distance with the first character information.

所述记忆词库中通常存储有用户之前输入确认过的一些对象的相关参数,如存储有用户之前输入的字符串、字符串的分隔方式,该字符串对应的全拼和该全拼对应的词语或句子,以及还可以存储有该词语或句子的词频,该词频表征用户对该词语或句子进行输入确认的次数。The memory word library usually stores relevant parameters of some objects that the user has previously input and confirmed, such as the character string previously input by the user, the separation method of the character string, the full spelling corresponding to the character string and the word or sentence corresponding to the full spelling, and can also store the word frequency of the word or sentence, which represents the number of times the user has input and confirmed the word or sentence.

该步骤中,在查找目标对象的过程中,可以首先从记忆词库中查找第二字符信息。In this step, in the process of searching for the target object, the second character information may be first searched from the memory word library.

具体的,可以遍历所述记忆词库中的字符信息,计算第一字符信息与所述记忆词库中除第一字符信息之外的其他字符信息的编辑距离,所述编辑距离可以表征第一字符信息与一字符信息的差异程度,也就是说,所述编辑距离可以表征从第一字符信息变成该字符信息需要进行多少次处理。Specifically, the character information in the memory vocabulary can be traversed to calculate the edit distance between the first character information and other character information in the memory vocabulary except the first character information. The edit distance can represent the degree of difference between the first character information and a character information, that is, the edit distance can represent how many times the processing is required to change the first character information into the character information.

比如,用户输入的第一字符信息为字符串“zhenengshurufa”,记忆词库中一字符信息为字符串“zhinengshurufa”,第一字符信息与该字符信息的编辑距离为1,即将字符“e”替换为字符“i”,则可以将字符串“zhenengshurufa”转换为字符串“zhinengshurufa”。For example, the first character information input by the user is the string "zhenengshurufa", and a character information in the memory vocabulary is the string "zhinengshurufa". The editing distance between the first character information and the character information is 1, that is, the character "e" is replaced with the character "i", then the string "zhenengshurufa" can be converted to the string "zhinengshurufa".

所述编辑距离可以为莱文斯坦距离,其计算公式如下式(1)所示。The edit distance may be the Levenshtein distance, and its calculation formula is shown in the following formula (1).

其中,上式(1)中,a表示第一字符信息,b表示记忆词库当前遍历的字符信息,i表示第一字符信息a的下标,j表示记忆词库当前遍历的字符信息b的下标。通过上式(1)即可计算得到第一字符信息与所述记忆词库中除第一字符信息之外的其他字符信息的编辑距离。In the above formula (1), a represents the first character information, b represents the character information currently traversed in the memory word library, i represents the subscript of the first character information a, and j represents the subscript of the character information b currently traversed in the memory word library. The above formula (1) can be used to calculate the edit distance between the first character information and other character information in the memory word library except the first character information.

从记忆词库中获取与第一字符信息编辑距离最小的第二字符信息,该第二字符信息即为与用户输入的第一字符信息最相似的字符信息。The second character information having the smallest edit distance with the first character information is obtained from the memory word library, and the second character information is the character information most similar to the first character information input by the user.

获取第二字符信息之后,从记忆词库中获取该第二字符信息对应的对象,即为目标对象。所述目标对象可能是用户所期待出现的对象。After obtaining the second character information, an object corresponding to the second character information is obtained from the memory word library, which is the target object. The target object may be an object that the user expects to appear.

步骤103,若所述目标对象在所述记忆词库中出现的第一次数大于所述候选对象在所述记忆词库中出现的第二次数,则在候选显示区域显示所述目标对象。Step 103: If the first number of times the target object appears in the memory word library is greater than the second number of times the candidate object appears in the memory word library, then display the target object in the candidate display area.

其中,所述目标对象与所述候选对象不同。The target object is different from the candidate object.

所述记忆词库中可以存储有对象的词频。该步骤中,隐含包含了所述目标对象的词频是否大于候选对象的词频的判断步骤,即隐含包含了所述目标对象在所述记忆词库中出现的第一次数是否大于所述候选对象在所述记忆词库中出现的第二次数的判断步骤。The memory word library may store the word frequency of the object. In this step, it implicitly includes a step of judging whether the word frequency of the target object is greater than the word frequency of the candidate object, that is, it implicitly includes a step of judging whether the first number of times the target object appears in the memory word library is greater than the second number of times the candidate object appears in the memory word library.

判断所述目标对象在所述记忆词库中出现的第一次数大于所述候选对象在所述记忆词库中出现的第二次数时,可以将该目标对象标注为纠错记忆对象,并在候选显示区域对其进行显示。其中,所述纠错记忆对象可以理解为记忆词库中对所述第一字符信息对应的候选对象进行错误纠正的对象,该纠错记忆对象与所述第一字符信息对应的候选对象不同。When it is determined that the first number of times the target object appears in the memory word library is greater than the second number of times the candidate object appears in the memory word library, the target object can be marked as an error correction memory object and displayed in the candidate display area. The error correction memory object can be understood as an object in the memory word library that corrects the error of the candidate object corresponding to the first character information, and the error correction memory object is different from the candidate object corresponding to the first character information.

所述纠错记忆对象可以为一个表情、词语或句子,比如,用户输入字符串“zhenengshurfa”,由于记忆词库中记录的是用户之前经常输入字符串“zhinengshurufa”,其“智能输入法”的词频远远大于“这能输入法”的词频,则目标对象“智能输入法”可以为候选对象“这能输入法”的纠错记忆对象,即候选对象“这能输入法”可能是由于用户对第一字符信息的误输入而出现的对象,而目标对象“智能输入法”可能是用户更想期待出现的对象。The error correction memory object can be an expression, a word or a sentence. For example, the user inputs the character string "zhenengshurfa". Since the memory vocabulary records the character string "zhinengshurufa" that the user frequently input before, and the word frequency of its "intelligent input method" is much greater than the word frequency of "this input method", the target object "intelligent input method" can be the error correction memory object of the candidate object "this input method", that is, the candidate object "this input method" may be the object that appears due to the user's mis-input of the first character information, and the target object "intelligent input method" may be the object that the user expects to appear more.

为了使候选显示区域中显示的目标对象更加符合用户的预期,保证候选显示区域中显示的目标对象质量,可以在判断目标对象的词频远远大于候选对象的词频的情况下,才对其进行显示。其中,这里远远大于指的是目标对象的词频在候选对象的词频的两倍以上。In order to make the target object displayed in the candidate display area more in line with the user's expectations and ensure the quality of the target object displayed in the candidate display area, the target object may be displayed only when it is judged that the word frequency of the target object is much greater than the word frequency of the candidate object. Here, much greater means that the word frequency of the target object is more than twice the word frequency of the candidate object.

在判断所述目标对象在所述记忆词库中出现的第一次数小于或等于所述候选对象在所述记忆词库中出现的第二次数,则可以不对该目标对象进行显示。If it is determined that the first number of times the target object appears in the memory word library is less than or equal to the second number of times the candidate object appears in the memory word library, the target object may not be displayed.

进一步的,为了保证候选显示区域中显示的对象一方面与用户输入的第一字符信息匹配,另一方面避免由于用户对第一字符信息的误输入而使候选显示区域中显示的对象与用户所期待出现的对象不匹配的问题,可以在候选显示区域中同时显示所述候选对象和目标对象。所述在候选显示区域显示所述目标对象的同时,所述方法还包括:Furthermore, in order to ensure that the object displayed in the candidate display area matches the first character information input by the user on the one hand, and to avoid the problem that the object displayed in the candidate display area does not match the object expected by the user due to the user's erroneous input of the first character information on the other hand, the candidate object and the target object can be displayed simultaneously in the candidate display area. While displaying the target object in the candidate display area, the method further includes:

在所述候选显示区域显示所述候选对象;Displaying the candidate object in the candidate display area;

其中,所述在候选显示区域显示所述目标对象,包括:The step of displaying the target object in the candidate display area includes:

在所述候选显示区域以预设显示方式显示所述目标对象;其中,所述预设显示方式与所述候选对象的显示方式不同。The target object is displayed in the candidate display area in a preset display mode; wherein the preset display mode is different from the display mode of the candidate object.

具体的,所述候选显示区域中,所述候选对象可以显示在目标对象之前,也可以显示在目标对象之后,这里不做具体限定。Specifically, in the candidate display area, the candidate object may be displayed before the target object or after the target object, which is not specifically limited here.

所述目标对象以预设显示方式显示,与所述候选对象的显示方式不同,目的是在所述候选显示区域突出显示所述目标对象,也就是所述目标对象突出显示指的是与候选对象不同的方式显示,比如可以是加粗显示,斜体显示,字体变大显示,采用与候选对象不同的颜色显示等等。The target object is displayed in a preset display mode, which is different from the display mode of the candidate objects. The purpose is to highlight the target object in the candidate display area. That is, the target object highlighting refers to displaying it in a different way from the candidate objects, such as bold display, italic display, larger font display, using a color different from the candidate objects, etc.

通过在候选显示区域中对目标对象进行增加显示,一方面可以保证候选显示区域中显示的对象一方面与用户输入的第一字符信息匹配,另一方面可以避免由于用户对第一字符信息的误输入而使候选显示区域中显示的对象与用户所期待出现的对象不匹配的问题。并通过在候选显示区域中对目标对象进行突出显示,可以使用户在多个对象中更快分辨出目标对象,从而可以提高用户对目标对象的确认速度。By adding the target object to the candidate display area, it is ensured that the object displayed in the candidate display area matches the first character information input by the user, and it is also possible to avoid the problem that the object displayed in the candidate display area does not match the object expected by the user due to the user's erroneous input of the first character information. And by highlighting the target object in the candidate display area, the user can more quickly distinguish the target object from multiple objects, thereby improving the user's confirmation speed of the target object.

参见图2,图2是现有的候选显示区域中对象的显示示意图,如图2所示,所述第一字符信息对应的候选对象“这能输入法”显示在所述候选显示区域中靠前的位置。参见图3,图3是本申请实施例中候选显示区域中对象的显示示意图之一,如图3所示,在候选对象之后还突出显示有目标对象“智能输入法”。Referring to Fig. 2, Fig. 2 is a schematic diagram of displaying objects in an existing candidate display area. As shown in Fig. 2, the candidate object "this input method" corresponding to the first character information is displayed at a front position in the candidate display area. Referring to Fig. 3, Fig. 3 is one of the schematic diagrams of displaying objects in the candidate display area in an embodiment of the present application. As shown in Fig. 3, the target object "smart input method" is also highlighted after the candidate object.

本实施例中,通过在记忆词库中查找与第一字符信息最相似的第二字符信息对应的目标对象,并在判定记忆词库中该目标对象比候选对象出现频繁的情况下,对该目标对象进行显示。这样,在第一字符信息由于输错而不符合用户预期的情况下,通过预测用户所预期输入的第二字符信息,并在候选显示区域显示所述第二字符信息对应的目标对象,使得用户无需进行撤销操作并重新进行字符输入,如此可以简化用户的操作。In this embodiment, the target object corresponding to the second character information that is most similar to the first character information is searched in the memory word library, and when it is determined that the target object appears more frequently than the candidate object in the memory word library, the target object is displayed. In this way, when the first character information does not meet the user's expectations due to incorrect input, the second character information expected to be input by the user is predicted, and the target object corresponding to the second character information is displayed in the candidate display area, so that the user does not need to perform an undo operation and re-enter the character, which can simplify the user's operation.

可选的,基于实施例一,所述步骤101具体包括:Optionally, based on the first embodiment, step 101 specifically includes:

对第一字符信息进行字符分隔,获得字符组合结果;Separate the first character information into characters to obtain a character combination result;

在所述字符组合结果满足预设匹配规则的情况下,判断所述记忆词库中是否存在所述字符组合结果;In the case where the character combination result satisfies the preset matching rule, determining whether the character combination result exists in the memory word library;

在所述记忆词库中存在所述字符组合结果的情况下,在所述记忆词库中获取所述字符组合结果对应的所述候选对象。In the case where the character combination result exists in the memory word library, the candidate object corresponding to the character combination result is obtained in the memory word library.

本实施例中,首先可以采用现有的或新的语义理解算法,对第一字符信息进行字符分隔,获得所有可能的字符组合结果。其中,这些字符组合结果中可能包括一些不符合用户输入习惯的字符组合结果,所述字符组合结果可以携带有分隔标记。In this embodiment, an existing or new semantic understanding algorithm may be first used to perform character separation on the first character information to obtain all possible character combination results, wherein these character combination results may include some character combination results that do not conform to the user's input habits, and the character combination results may carry separation marks.

然后,判断所述字符组合结果是否满足预设匹配规则,所述预设匹配规则根据输入法的类型不同而不同。比如,若输入法的类型为拼音输入法,用户输入的第一字符信息为拼音串,则所述字符组合结果为拼音组合结果,所述预设匹配规则为,所述拼音组合结果是按照全拼方式和/或简拼方式对所述第一字符信息进行字符分隔获得。Then, it is determined whether the character combination result satisfies a preset matching rule, and the preset matching rule varies according to the type of input method. For example, if the input method is a pinyin input method, and the first character information input by the user is a pinyin string, the character combination result is a pinyin combination result, and the preset matching rule is that the pinyin combination result is obtained by separating the first character information by characters in a full spelling method and/or a simplified spelling method.

以拼音输入法为例,根据《汉语拼音方案》,汉语拼音一共有63个,其中,声母23个,韵母24个,整体认读音节16个,采用合法全拼方式,可排列组合成的拼音有428个。另外,用户在输入过程中,通常还会采用简拼方式输入拼音串,用户输入常用的简拼方式包括末尾简拼,全简拼和其它简拼如中间简拼,首位简拼等。Taking Pinyin input method as an example, according to the "Chinese Pinyin Scheme", there are 63 Chinese Pinyin in total, including 23 initials, 24 finals, and 16 whole syllables. Using the legal full spelling method, there are 428 Pinyins that can be arranged and combined. In addition, during the input process, users usually use abbreviations to input Pinyin strings. Commonly used abbreviations for user input include the final abbreviation, the full abbreviation, and other abbreviations such as the middle abbreviation, the first abbreviation, etc.

若所述拼音组合结果是按照全拼方式和/或简拼方式对所述第一字符信息进行字符分隔获得,则确定所述拼音组合结果满足预设匹配规则。举个例子来说,用户输入拼音串“xians”,若拼音组合结果为“x/ian/s”,由于“ian”不符合全拼方式,也不符合简拼方式,则所述拼音组合结果不满足预设匹配规则。If the pinyin combination result is obtained by separating the first character information in full spelling and/or simplified spelling, it is determined that the pinyin combination result meets the preset matching rule. For example, the user inputs the pinyin string "xians", and if the pinyin combination result is "x/ian/s", since "ian" does not conform to the full spelling method or the simplified spelling method, the pinyin combination result does not meet the preset matching rule.

另外,用户的输入行为通常符合一定的规律,用户输入的拼音串通常会优先使用全拼方式,其次是末尾简拼,再其次是其它简拼。因此,可以按照拼音串从前至后的顺序,首先使用全拼方式对拼音串进行字符分隔,若在分隔过程中,拼音串的类型不符合全拼方式,则可以使用简拼方式对拼音串进行字符分隔,比如拼音串“xians”,其拼音“s”的类型不符合全拼方式,因此可以使用简拼方式分隔,最终获得拼音组合结果。这样,在用户输入的拼音串可以被语义理解的情况下,其获得的拼音组合结果通常为符合用户输入习惯的拼音组合结果。In addition, the user's input behavior usually conforms to a certain rule. The pinyin string input by the user usually gives priority to the full spelling method, followed by the abbreviation at the end, and then other abbreviations. Therefore, according to the order of the pinyin string from front to back, the full spelling method can be used to separate the characters of the pinyin string first. If the type of the pinyin string does not conform to the full spelling method during the separation process, the abbreviation method can be used to separate the characters of the pinyin string. For example, the pinyin string "xians" has a type of pinyin "s" that does not conform to the full spelling method, so the abbreviation method can be used to separate, and finally the pinyin combination result is obtained. In this way, when the pinyin string input by the user can be semantically understood, the pinyin combination result obtained is usually a pinyin combination result that conforms to the user's input habits.

举个例子来说,用户输入拼音串“xians”,则根据所述预设匹配规则,可以得到携带有分隔标记的拼音组合结果“xi/an/s”,对应的候选对象可能为“西安是”,“西安市”等。以及得到拼音组合结果“xian/s”,对应的候选对象可能为“先是”,“显示”等。For example, if the user inputs the pinyin string "xians", according to the preset matching rule, the pinyin combination result "xi/an/s" with a separation mark can be obtained, and the corresponding candidate objects may be "西安是", "西安市", etc. And the pinyin combination result "xian/s" can be obtained, and the corresponding candidate objects may be "先是", "现", etc.

接着,在所述字符组合结果满足预设匹配规则的情况下,判断所述记忆词库中是否存在所述字符组合结果。具体的,可以首先从记忆词库中匹配第一字符信息,在匹配到第一字符信息的情况下,判断记忆词库中所述第一字符信息对应的分隔方式是否与字符组合结果中分隔标记指示的分隔方式一致,在判断一致的情况下,判定所述记忆词库中存在所述字符组合结果。Next, if the character combination result satisfies the preset matching rule, it is determined whether the character combination result exists in the memory word library. Specifically, the first character information can be matched from the memory word library first, and if the first character information is matched, it is determined whether the separation method corresponding to the first character information in the memory word library is consistent with the separation method indicated by the separation mark in the character combination result, and if they are consistent, it is determined that the character combination result exists in the memory word library.

最后,在所述记忆词库中存在所述字符组合结果的情况下,在所述记忆词库中获取所述字符组合结果对应的所述候选对象。Finally, in the case where the character combination result exists in the memory word library, the candidate object corresponding to the character combination result is obtained in the memory word library.

本实施例中,通过对第一字符信息进行字符分隔,获得字符组合结果,在所述字符组合结果满足预设匹配规则的情况下,判断所述记忆词库中是否存在所述字符组合结果;并在所述记忆词库中存在所述字符组合结果的情况下,在所述记忆词库中获取所述字符组合结果对应的所述候选对象。这样,可以使得第一字符信息进行字符分隔获得的字符组合结果可以很好的符合用户输入习惯,从而可以准确获取候选对象并显示。In this embodiment, the character combination result is obtained by performing character separation on the first character information, and when the character combination result satisfies the preset matching rule, it is determined whether the character combination result exists in the memory word library; and when the character combination result exists in the memory word library, the candidate object corresponding to the character combination result is obtained in the memory word library. In this way, the character combination result obtained by performing character separation on the first character information can well meet the user input habits, so that the candidate object can be accurately obtained and displayed.

可选的,基于实施例一,所述步骤103之后,所述方法还包括:Optionally, based on the first embodiment, after step 103, the method further includes:

在接收到对所述目标对象的第一输入的情况下,若所述记忆词库中包括所述第一字符信息与所述候选对象的映射关系,则删除所述映射关系;其中,所述第一输入用于对所述目标对象进行输入确认;In the case of receiving a first input for the target object, if the memory word library includes a mapping relationship between the first character information and the candidate object, deleting the mapping relationship; wherein the first input is used to confirm the input of the target object;

将所述第一字符信息与所述目标对象关联。The first character information is associated with the target object.

本实施例中,在候选显示区域显示目标对象即显示用户可能更期待的对象之后,可以根据用户对该目标对象的输入行为,确定用户期待的对象是否与预期的一致。当用户对该目标对象进行输入确认时,则确定第一字符信息为用户误输入的字符信息,该用户实际上期望输入的是第二字符信息,且期待的是目标对象。此时,可以对记忆词库进行修正。In this embodiment, after the target object is displayed in the candidate display area, i.e., the object that the user may be more likely to expect, it can be determined whether the object expected by the user is consistent with the expectation based on the user's input behavior for the target object. When the user confirms the input of the target object, it is determined that the first character information is the character information input by the user by mistake, and the user actually expects to input the second character information and expects the target object. At this time, the memory word library can be corrected.

具体的,在接收到对所述目标对象的第一输入的情况下,则确定用户期待的对象与预期的一致,此时,若所述记忆词库中包括所述第一字符信息与所述候选对象的映射关系,则删除所述映射关系。比如,删除记忆词库中第一字符信息“zhenengshurufa”与候选对象“这能输入法”的映射关系。Specifically, when the first input of the target object is received, it is determined that the object expected by the user is consistent with the expectation. At this time, if the memory word library includes a mapping relationship between the first character information and the candidate object, the mapping relationship is deleted. For example, the mapping relationship between the first character information "zhenengshurufa" and the candidate object "this input method" in the memory word library is deleted.

其中,第一输入可以为语音输入,也可以为体感输入,还可以为触控输入。其中,触控输入可以包括:单击操作、双击操作、多击操作、拖动操作等等。The first input may be voice input, somatosensory input, or touch input, wherein the touch input may include single-click operation, double-click operation, multi-click operation, drag operation, and the like.

之后,将所述第一字符信息与所述目标对象关联,以修正记忆词库中目标对象的另一种输入可能性。比如,将目标对象“智能输入法”的映射关系修正为,字符信息“zhinengshurufa”和“zhenengshurufa”同时映射至“智能输入法”。如此,参见图4,图4是本申请实施例中候选显示区域中对象的显示示意图之二,如图4所示,若用户再次误输入字符串“zhenengshurufa”,候选显示区域则可以直接显示“智能输入法”。Afterwards, the first character information is associated with the target object to correct another input possibility of the target object in the memory word library. For example, the mapping relationship of the target object "intelligent input method" is corrected so that the character information "zhinengshurufa" and "zhenengshurufa" are simultaneously mapped to "intelligent input method". In this way, referring to Figure 4, Figure 4 is a second display schematic diagram of the object in the candidate display area in the embodiment of the present application. As shown in Figure 4, if the user mistakenly enters the character string "zhenengshurufa" again, the candidate display area can directly display "intelligent input method".

本实施例中,在接收到对所述目标对象的第一输入的情况下,通过删除所述映射关系,并将所述第一字符信息与所述目标对象关联,一方面可以减小记忆词库的内存负担,另一方面又可以很好地拟合用户的输入行为。In this embodiment, when the first input to the target object is received, by deleting the mapping relationship and associating the first character information with the target object, the memory burden of the memory vocabulary can be reduced on the one hand, and the user's input behavior can be well fitted on the other hand.

需要说明的是,本申请实施例提供的对象显示方法,执行主体可以为对象显示装置,或者该对象显示装置中的用于执行对象显示方法的控制模块。本申请实施例中以对象显示装置执行对象显示方法为例,说明本申请实施例提供的对象显示装置。It should be noted that the object display method provided in the embodiment of the present application can be executed by an object display device or a control module in the object display device for executing the object display method. In the embodiment of the present application, the object display device provided in the embodiment of the present application is described by taking the object display device executing the object display method as an example.

参见图5,图5是本申请实施例提供的对象显示装置的结构图,如图5所示,对象显示装置500包括:Referring to FIG. 5 , FIG. 5 is a structural diagram of an object display device provided in an embodiment of the present application. As shown in FIG. 5 , the object display device 500 includes:

获取模块501,用于获取第一字符信息对应的候选对象;其中,所述第一字符信息为基于键盘控件输入的字符信息;The acquisition module 501 is used to acquire a candidate object corresponding to the first character information; wherein the first character information is character information input based on a keyboard control;

查找模块502,用于从记忆词库中查找目标对象;其中,所述目标对象为第二字符信息对应的对象,所述第二字符信息为所述记忆词库中与所述第一字符信息的编辑距离最小的字符信息;A search module 502 is used to search for a target object from a memory word library; wherein the target object is an object corresponding to the second character information, and the second character information is character information in the memory word library with the smallest edit distance with the first character information;

第一显示模块503,用于若所述目标对象在所述记忆词库中出现的第一次数大于所述候选对象在所述记忆词库中出现的第二次数,则在候选显示区域显示所述目标对象。The first display module 503 is configured to display the target object in the candidate display area if the first number of times the target object appears in the memory word library is greater than the second number of times the candidate object appears in the memory word library.

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

字符分隔单元,用于对第一字符信息进行字符分隔,获得字符组合结果;A character separation unit, used for performing character separation on the first character information to obtain a character combination result;

判断单元,用于在所述字符组合结果满足预设匹配规则的情况下,判断所述记忆词库中是否存在所述字符组合结果;A judging unit, configured to judge whether the character combination result exists in the memory word library when the character combination result satisfies a preset matching rule;

获取单元,用于在所述记忆词库中存在所述字符组合结果的情况下,在所述记忆词库中获取所述字符组合结果对应的所述候选对象。An acquiring unit is used to acquire the candidate object corresponding to the character combination result in the memory word library when the character combination result exists in the memory word library.

可选的,所述字符组合结果为拼音组合结果,所述预设匹配规则为,所述拼音组合结果是按照全拼方式和/或简拼方式对所述第一字符信息进行字符分隔获得。Optionally, the character combination result is a pinyin combination result, and the preset matching rule is that the pinyin combination result is obtained by separating the first character information in a full spelling manner and/or a simplified spelling manner.

可选的,所述装置还包括:Optionally, the device further comprises:

删除模块,用于在接收到对所述目标对象的第一输入的情况下,若所述记忆词库中包括所述第一字符信息与所述候选对象的映射关系,则删除所述映射关系;其中,所述第一输入用于对所述目标对象进行输入确认;a deleting module, configured to, upon receiving a first input for the target object, delete the mapping relationship between the first character information and the candidate object if the memory word library includes the mapping relationship between the first character information and the candidate object; wherein the first input is used to confirm the input of the target object;

关联模块,用于将所述第一字符信息与所述目标对象关联。An associating module is used to associate the first character information with the target object.

可选的,所述装置还包括:Optionally, the device further comprises:

第二显示模块,用于在所述候选显示区域显示所述候选对象;A second display module, configured to display the candidate object in the candidate display area;

其中,所述第一显示模块503,具体用于在所述候选显示区域以预设显示方式显示所述目标对象;其中,所述预设显示方式与所述候选对象的显示方式不同。The first display module 503 is specifically configured to display the target object in the candidate display area in a preset display manner; wherein the preset display manner is different from the display manner of the candidate object.

本实施例中,通过查找模块502在记忆词库中查找与第一字符信息最相似的第二字符信息对应的目标对象,并通过第一显示模块503在判定记忆词库中该目标对象比候选对象出现频繁的情况下,对该目标对象进行显示。这样,在第一字符信息由于输错而不符合用户预期的情况下,通过预测用户所预期输入的第二字符信息,并在候选显示区域显示所述第二字符信息对应的目标对象,使得用户无需进行撤销操作并重新进行字符输入,如此可以简化用户的操作。In this embodiment, the search module 502 searches the memory word library for the target object corresponding to the second character information that is most similar to the first character information, and the first display module 503 displays the target object when it is determined that the target object appears more frequently than the candidate object in the memory word library. In this way, when the first character information does not meet the user's expectations due to incorrect input, the second character information expected to be input by the user is predicted, and the target object corresponding to the second character information is displayed in the candidate display area, so that the user does not need to perform an undo operation and re-enter the character, which can simplify the user's operation.

本申请实施例中的对象显示装置可以是装置,也可以是终端中的部件、集成电路、或芯片。该装置可以是移动电子设备,也可以为非移动电子设备。示例性的,移动电子设备可以为手机、平板电脑、笔记本电脑、掌上电脑、车载电子设备、可穿戴设备、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本或者个人数字助理(personaldigital assistant,PDA)等,非移动电子设备可以为服务器、网络附属存储器(NetworkAttached Storage,NAS)、个人计算机(personal computer,PC)、电视机(television,TV)、柜员机或者自助机等,本申请实施例不作具体限定。The object display device in the embodiment of the present application can be a device, or a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc. The non-mobile electronic device can be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.

本申请实施例中的对象显示装置可以为具有操作系统的装置。该操作系统可以为安卓(Android)操作系统,可以为ios操作系统,还可以为其他可能的操作系统,本申请实施例不作具体限定。The object display device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

本申请实施例提供的对象显示装置能够实现图1的方法实施例实现的各个过程,为避免重复,这里不再赘述。The object display device provided in the embodiment of the present application can implement each process implemented by the method embodiment of Figure 1, and will not be described again here to avoid repetition.

可选的,参见图6,图6是本申请实施例提供的电子设备的结构图,如图6所示,本申请实施例还提供一种电子设备600,包括处理器601,存储器602,存储在存储器602上并可在所述处理器601上运行的程序或指令,该程序或指令被处理器601执行时实现上述对象显示方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Optionally, refer to Figure 6, which is a structural diagram of an electronic device provided in an embodiment of the present application. As shown in Figure 6, an embodiment of the present application also provides an electronic device 600, including a processor 601, a memory 602, and a program or instruction stored in the memory 602 and executable on the processor 601. When the program or instruction is executed by the processor 601, each process of the above-mentioned object display method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

需要注意的是,本申请实施例中的电子设备包括上述所述的移动电子设备和非移动电子设备。It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.

图7为实现本申请实施例的一种电子设备的硬件结构示意图。FIG. 7 is a schematic diagram of the hardware structure of an electronic device implementing an embodiment of the present application.

该电子设备700包括但不限于:射频单元701、网络模块702、音频输出单元703、输入单元704、传感器705、显示单元706、用户输入单元707、接口单元708、存储器709、以及处理器710等部件。The electronic device 700 includes but is not limited to: a radio frequency unit 701, a network module 702, an audio output unit 703, an input unit 704, a sensor 705, a display unit 706, a user input unit 707, an interface unit 708, a memory 709, and a processor 710.

本领域技术人员可以理解,电子设备700还可以包括给各个部件供电的电源(比如电池),电源可以通过电源管理系统与处理器710逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。图7中示出的电子设备结构并不构成对电子设备的限定,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置,在此不再赘述。Those skilled in the art will appreciate that the electronic device 700 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 710 through a power management system, so that the power management system can manage charging, discharging, and power consumption. The electronic device structure shown in FIG7 does not constitute a limitation on the electronic device, and the electronic device may include more or fewer components than shown, or combine certain components, or arrange components differently, which will not be described in detail here.

其中,处理器710,用于获取第一字符信息对应的候选对象;其中,所述第一字符信息为基于键盘控件输入的字符信息;从记忆词库中查找目标对象;其中,所述目标对象为第二字符信息对应的对象,所述第二字符信息为所述记忆词库中与所述第一字符信息的编辑距离最小的字符信息;The processor 710 is configured to obtain a candidate object corresponding to the first character information; wherein the first character information is character information input based on a keyboard control; and to search for a target object from a memory word library; wherein the target object is an object corresponding to the second character information, and the second character information is character information in the memory word library having the smallest edit distance with the first character information;

显示单元706,用于若所述目标对象在所述记忆词库中出现的第一次数大于所述候选对象在所述记忆词库中出现的第二次数,则在候选显示区域显示所述目标对象。The display unit 706 is configured to display the target object in the candidate display area if the first number of times the target object appears in the memory word library is greater than the second number of times the candidate object appears in the memory word library.

本申请实施例中,通过处理器710在记忆词库中查找与第一字符信息最相似的第二字符信息对应的目标对象,并通过显示单元706在判定记忆词库中该目标对象比候选对象出现频繁的情况下,对该目标对象进行显示。这样,在第一字符信息由于输错而不符合用户预期的情况下,通过预测用户所预期输入的第二字符信息,并在候选显示区域显示所述第二字符信息对应的目标对象,使得用户无需进行撤销操作并重新进行字符输入,如此可以简化用户的操作。In the embodiment of the present application, the processor 710 searches the memory word library for the target object corresponding to the second character information that is most similar to the first character information, and the display unit 706 displays the target object when it is determined that the target object appears more frequently than the candidate object in the memory word library. In this way, when the first character information does not meet the user's expectations due to incorrect input, the second character information expected to be input by the user is predicted, and the target object corresponding to the second character information is displayed in the candidate display area, so that the user does not need to perform an undo operation and re-enter the character, which can simplify the user's operation.

可选的,处理器710,还用于对第一字符信息进行字符分隔,获得字符组合结果;在所述字符组合结果满足预设匹配规则的情况下,判断所述记忆词库中是否存在所述字符组合结果;在所述记忆词库中存在所述字符组合结果的情况下,在所述记忆词库中获取所述字符组合结果对应的所述候选对象。Optionally, the processor 710 is further used to perform character separation on the first character information to obtain a character combination result; when the character combination result satisfies a preset matching rule, determine whether the character combination result exists in the memory vocabulary; when the character combination result exists in the memory vocabulary, obtain the candidate object corresponding to the character combination result in the memory vocabulary.

可选的,处理器710,还用于在接收到对所述目标对象的第一输入的情况下,若所述记忆词库中包括所述第一字符信息与所述候选对象的映射关系,则删除所述映射关系;其中,所述第一输入用于对所述目标对象进行输入确认;将所述第一字符信息与所述目标对象关联。Optionally, the processor 710 is further used to, upon receiving a first input to the target object, delete the mapping relationship between the first character information and the candidate object if the memory vocabulary includes the mapping relationship between the first character information and the candidate object; wherein the first input is used to confirm the input of the target object; and associate the first character information with the target object.

可选的,显示单元706,还用于在所述候选显示区域显示所述候选对象;在所述候选显示区域以预设显示方式显示所述目标对象;其中,所述预设显示方式与所述候选对象的显示方式不同。Optionally, the display unit 706 is further configured to display the candidate object in the candidate display area; and display the target object in the candidate display area in a preset display manner; wherein the preset display manner is different from a display manner of the candidate object.

应理解的是,本申请实施例中,输入单元704可以包括图形处理器(GraphicsProcessing Unit,GPU)7041和麦克风7042,图形处理器7041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。显示单元706可包括显示面板7061,可以采用液晶显示器、有机发光二极管等形式来配置显示面板7061。用户输入单元707包括触控面板7071以及其他输入设备7072。触控面板7071,也称为触摸屏。触控面板7071可包括触摸检测装置和触摸控制器两个部分。其他输入设备7072可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。存储器709可用于存储软件程序以及各种数据,包括但不限于应用程序和操作系统。处理器710可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器710中。It should be understood that in the embodiment of the present application, the input unit 704 may include a graphics processor (Graphics Processing Unit, GPU) 7041 and a microphone 7042, and the graphics processor 7041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 706 may include a display panel 7061, and the display panel 7061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 707 includes a touch panel 7071 and other input devices 7072. The touch panel 7071 is also called a touch screen. The touch panel 7071 may include two parts: a touch detection device and a touch controller. Other input devices 7072 may include but are not limited to a physical keyboard, a function key (such as a volume control button, a switch button, etc.), a trackball, a mouse, and a joystick, which will not be repeated here. The memory 709 can be used to store software programs and various data, including but not limited to applications and operating systems. The processor 710 can integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and applications, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 710.

本申请实施例还提供一种可读存储介质,所述可读存储介质上存储有程序或指令,该程序或指令被处理器执行时实现上述对象显示方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned object display method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

其中,所述处理器为上述实施例中所述的电子设备中的处理器。所述可读存储介质,包括计算机可读存储介质,如计算机只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等。The processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

本申请实施例另提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现上述对象显示方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned object display method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

应理解,本申请实施例提到的芯片还可以称为系统级芯片、系统芯片、芯片系统或片上系统芯片等。It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。此外,需要指出的是,本申请实施方式中的方法和装置的范围不限按示出或讨论的顺序来执行功能,还可包括根据所涉及的功能按基本同时的方式或按相反的顺序来执行功能,例如,可以按不同于所描述的次序来执行所描述的方法,并且还可以添加、省去、或组合各种步骤。另外,参照某些示例所描述的特征可在其他示例中被组合。It should be noted that, in this article, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises one..." does not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be noted that the scope of the method and device in the embodiment of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.

上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims (10)

1. An object display method, comprising:
Acquiring a candidate object corresponding to the first character information; the candidate objects are obtained according to semantic understanding or are objects corresponding to the first character information stored in a memory word stock;
Searching a target object from a memory word stock; the target object is an object corresponding to second character information, and the second character information is character information with the minimum editing distance with the first character information in the memory word stock;
If the first time number of the target object appearing in the memory word stock is larger than the second time number of the candidate object appearing in the memory word stock, displaying the target object in a candidate display area;
The method further comprises, while displaying the target object in the candidate display area:
displaying the candidate object in the candidate display area;
Wherein the displaying the target object in the candidate display area includes:
displaying the target object in the candidate display area in a preset display mode; the preset display mode is different from the display mode of the candidate object.
2. The method according to claim 1, wherein the obtaining the candidate object corresponding to the first character information includes:
character separation is carried out on the first character information, and a character combination result is obtained;
judging whether the character combination result exists in the memory word stock or not under the condition that the character combination result meets a preset matching rule;
and under the condition that the character combination result exists in the memory word stock, acquiring the candidate object corresponding to the character combination result from the memory word stock.
3. The method according to claim 2, wherein the character combination result is a pinyin combination result, and the preset matching rule is that the pinyin combination result is obtained by character separation of the first character information in a full-spelling manner and/or a simple-spelling manner.
4. The method of claim 1, wherein after the target object is displayed in the candidate display area, the method further comprises:
Under the condition that a first input to the target object is received, deleting the mapping relation if the memory word stock comprises the mapping relation between the first character information and the candidate object; the first input is used for carrying out input confirmation on the target object;
And associating the first character information with the target object.
5. An object display device, comprising:
The acquisition module is used for acquiring a candidate object corresponding to the first character information; the candidate objects are obtained according to semantic understanding or are objects corresponding to the first character information stored in a memory word stock;
The searching module is used for searching the target object from the memory word stock; the target object is an object corresponding to second character information, and the second character information is character information with the minimum editing distance with the first character information in the memory word stock;
the first display module is used for displaying the target object in a candidate display area if the first number of occurrences of the target object in the memory word stock is larger than the second number of occurrences of the candidate object in the memory word stock;
the apparatus further comprises:
The second display module is used for displaying the candidate objects in the candidate display area;
The first display module is specifically configured to display the target object in the candidate display area in a preset display manner; the preset display mode is different from the display mode of the candidate object.
6. The apparatus of claim 5, wherein the acquisition module comprises:
the character separation unit is used for carrying out character separation on the first character information to obtain a character combination result;
The judging unit is used for judging whether the character combination result exists in the memory word stock or not under the condition that the character combination result meets a preset matching rule;
The obtaining unit is used for obtaining the candidate object corresponding to the character combination result in the memory word stock under the condition that the character combination result exists in the memory word stock.
7. The apparatus of claim 6, wherein the character combination result is a pinyin combination result, and the preset matching rule is that the pinyin combination result is obtained by character separation of the first character information in a full-spelling manner and/or a simple-spelling manner.
8. The apparatus of claim 5, wherein the apparatus further comprises:
The deleting module is used for deleting the mapping relation if the memory word stock comprises the mapping relation between the first character information and the candidate object under the condition that the first input to the target object is received; the first input is used for carrying out input confirmation on the target object;
and the association module is used for associating the first character information with the target object.
9. An electronic device comprising a processor, a memory and a program or instruction stored on the memory and executable on the processor, which when executed by the processor, implements the steps of the object display method as claimed in claims 1-4.
10. A readable storage medium, characterized in that the readable storage medium has stored thereon a program or instructions which, when executed by a processor, implement the steps of the object display method according to claims 1-4.
CN202010559109.4A 2020-06-18 2020-06-18 Object display method, device and electronic device Active CN111782060B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010559109.4A CN111782060B (en) 2020-06-18 2020-06-18 Object display method, device and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010559109.4A CN111782060B (en) 2020-06-18 2020-06-18 Object display method, device and electronic device

Publications (2)

Publication Number Publication Date
CN111782060A CN111782060A (en) 2020-10-16
CN111782060B true CN111782060B (en) 2024-07-26

Family

ID=72756678

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010559109.4A Active CN111782060B (en) 2020-06-18 2020-06-18 Object display method, device and electronic device

Country Status (1)

Country Link
CN (1) CN111782060B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110488990A (en) * 2019-08-12 2019-11-22 腾讯科技(深圳)有限公司 Input error correction method and device

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005182487A (en) * 2003-12-19 2005-07-07 Nec Software Chubu Ltd Character input apparatus, method and program
CN102184028A (en) * 2011-04-11 2011-09-14 百度在线网络技术(北京)有限公司 Method and equipment for acquiring candidate character strings corresponding to input key sequence
CN102360250A (en) * 2011-10-13 2012-02-22 广东步步高电子工业有限公司 A memory type input method, system and mobile handheld device for its application
CN103677299A (en) * 2012-09-12 2014-03-26 深圳市世纪光速信息技术有限公司 Method and device for achievement of intelligent association in input method and terminal device
CN105204663A (en) * 2015-10-30 2015-12-30 维沃移动通信有限公司 Method of virtual keyboard input and terminal
CN107102746B (en) * 2016-02-19 2023-03-24 北京搜狗科技发展有限公司 Candidate word generation method and device and candidate word generation device
CN107229348B (en) * 2016-03-23 2021-11-02 北京搜狗科技发展有限公司 Input error correction method and device for input error correction
CN107340880B (en) * 2016-05-03 2021-11-02 北京搜狗科技发展有限公司 Association input method and device and electronic equipment for realizing association input
CN106896937A (en) * 2017-02-28 2017-06-27 百度在线网络技术(北京)有限公司 Method and apparatus for being input into information
CN107329585A (en) * 2017-06-28 2017-11-07 北京百度网讯科技有限公司 Method and apparatus for inputting word
CN109308126B (en) * 2017-07-27 2022-09-13 北京搜狗科技发展有限公司 Candidate word display method and device
CN109976548B (en) * 2017-12-28 2022-07-19 北京搜狗科技发展有限公司 Input method and input device
CN110780751B (en) * 2019-10-25 2024-04-05 维沃移动通信有限公司 Information processing method and electronic device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110488990A (en) * 2019-08-12 2019-11-22 腾讯科技(深圳)有限公司 Input error correction method and device

Also Published As

Publication number Publication date
CN111782060A (en) 2020-10-16

Similar Documents

Publication Publication Date Title
US10698604B2 (en) Typing assistance for editing
EP2713255B1 (en) Method and electronic device for prompting character input
CN111898388B (en) Video subtitle translation editing method and device, electronic equipment and storage medium
CN112631437B (en) Information recommendation method, device and electronic equipment
US8976118B2 (en) Method for character correction
EP3403197B1 (en) Content authoring inline commands
CN112269475A (en) Character display method and device and electronic equipment
WO2021254251A1 (en) Input display method and apparatus, and electronic device
CN111860000A (en) Text translation editing method, device, electronic device and storage medium
US11899904B2 (en) Text input system with correction facility
CN113359999A (en) Candidate word updating method and device and electronic equipment
CN107797676B (en) Single character input method and device
CN112764734B (en) Auxiliary method and device for code editing and electronic equipment
WO2022105754A1 (en) Character input method and apparatus, and electronic device
JP2022511139A (en) Information processing methods, devices and storage media
CN111966267A (en) Application review method, device and electronic device
CN111782060B (en) Object display method, device and electronic device
CN113190125B (en) Input correction method and device
CN112328096B (en) Candidate word display method, device and electronic device
CN116775982A (en) Search methods, apparatus, equipment and media
CN114356118A (en) Character input method, device, electronic device and medium
WO2022143523A1 (en) Vocabulary display method and apparatus, and electronic device
CN109271094B (en) Text editing method, device and equipment
CN112434519B (en) A kind of error correction evaluation method and related device
CN112765953A (en) Display method and device of Chinese sentence, electronic equipment and readable storage medium

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