技术领域technical field
本发明属于通信技术领域,尤其涉及一种信息修正方法、装置、存储介质及电子设备。The invention belongs to the technical field of communication, and in particular relates to an information correction method, device, storage medium and electronic equipment.
背景技术Background technique
随着终端的智能化程度越来越高,终端可以执行的任务也越来越广泛。比如,终端可以对文本信息进行错字检测,并将检测到的错字提示给用户查看,以提醒用户输入的文本信息中存在错误。As the terminal becomes more and more intelligent, the tasks that the terminal can perform are also becoming more and more extensive. For example, the terminal may detect typos in the text information, and prompt the detected typos to the user, so as to remind the user that there are errors in the input text information.
发明内容Contents of the invention
本发明实施例提供一种信息修正方法、装置、存储介质及电子设备,能提高错误文字修正的准确度。Embodiments of the present invention provide an information correction method, device, storage medium, and electronic equipment, which can improve the accuracy of error text correction.
本发明实施例提供一种方法,包括:An embodiment of the present invention provides a method, including:
获取即时通信应用交互界面中待发送的字符信息,所述字符信息中包括多个文字;Obtain character information to be sent in the instant messaging application interface, where the character information includes a plurality of characters;
检测所述字符信息中是否包含错误文字;Detecting whether the character information contains wrong words;
若检测出所述字符信息中包含错误文字,则获取所述即时通信应用的聊天记录信息;If it is detected that the character information contains wrong words, then obtain the chat record information of the instant messaging application;
根据所述聊天记录信息,预测所述错误文字对应的正确文字;Predicting the correct text corresponding to the wrong text according to the chat record information;
按照所述正确文字,对所述错误文字进行修正。Correct the erroneous words according to the correct words.
本发明实施例提供一种装置,包括:An embodiment of the present invention provides a device, including:
第一获取模块,用于获取即时通信应用交互界面中待发送的字符信息,所述字符信息中包括多个文字;The first obtaining module is used to obtain character information to be sent in the instant messaging application interface, and the character information includes a plurality of characters;
检测模块,用于检测所述字符信息中是否包含错误文字;A detection module, configured to detect whether the character information contains wrong words;
第二获取模块,用于若检测出所述字符信息中包含错误文字,则获取所述即时通信应用的聊天记录信息;The second obtaining module is used to obtain the chat record information of the instant messaging application if it is detected that the character information contains wrong words;
预测模块,用于根据所述聊天记录信息,预测所述错误文字对应的正确文字;A prediction module, configured to predict the correct text corresponding to the erroneous text according to the chat record information;
修正模块,用于按照所述正确文字,对所述错误文字进行修正。A correction module, configured to correct the erroneous text according to the correct text.
本发明实施例提供一种存储介质,其上存储有计算机程序,当所述计算机程序在计算机上执行时,使得所述计算机执行本发明实施例提供的信息修正方法。An embodiment of the present invention provides a storage medium on which a computer program is stored, and when the computer program is executed on a computer, the computer is made to execute the information correction method provided by the embodiment of the present invention.
本发明实施例还提供一种电子设备,包括存储器,处理器,所述处理器通过调用所述存储器中存储的计算机程序,用于执行本发明实施例提供的信息修正方法。An embodiment of the present invention also provides an electronic device, including a memory and a processor, and the processor is used to execute the information correction method provided by the embodiment of the present invention by invoking a computer program stored in the memory.
本发明实施例提供的信息修正方法、装置、存储介质及电子设备,在用户使用即时通信应用进行即时通信时,终端可以获取该即时通信应用的交互界面中待发送的字符信息,该字符信息中包括多个文字。然后,终端可以检测该字符信息中是否包含错误文字。若是,则终端可以获取该即时通信应用的聊天记录信息。然后,终端可以根据该聊天记录信息,预测该错误文字对应的正确文字,并按照该正确文字对该错误文字进行修正。因此,本发明实施例可以提高错误文字修正的准确度。The information correction method, device, storage medium and electronic device provided by the embodiments of the present invention, when the user uses the instant messaging application for instant messaging, the terminal can obtain the character information to be sent in the interactive interface of the instant messaging application, the character information Include multiple text. Then, the terminal can detect whether the character information contains wrong characters. If yes, the terminal can obtain the chat record information of the instant messaging application. Then, the terminal can predict the correct text corresponding to the wrong text according to the chat record information, and correct the wrong text according to the correct text. Therefore, the embodiments of the present invention can improve the accuracy of error text correction.
附图说明Description of drawings
下面结合附图,通过对本发明的具体实施方式详细描述,将使本发明的技术方案及其有益效果显而易见。The technical solution and beneficial effects of the present invention will be apparent through the detailed description of specific embodiments of the present invention in conjunction with the accompanying drawings.
图1是本发明实施例提供的终端与服务器之间的交互示意图。FIG. 1 is a schematic diagram of interaction between a terminal and a server provided by an embodiment of the present invention.
图2是本发明实施例提供的信息修正方法的流程示意图。Fig. 2 is a schematic flowchart of an information correction method provided by an embodiment of the present invention.
图3是本发明实施例提供的信息修正方法的另一流程示意图。Fig. 3 is another schematic flowchart of the information correction method provided by the embodiment of the present invention.
图4A至图4E是本发明实施例提供的信息修正方法的场景示意图。4A to 4E are schematic diagrams of scenarios of an information correction method provided by an embodiment of the present invention.
图5是本发明实施例提供的信息修正装置的结构示意图。Fig. 5 is a schematic structural diagram of an information correction device provided by an embodiment of the present invention.
图6是本发明实施例提供的移动终端的结构示意图。Fig. 6 is a schematic structural diagram of a mobile terminal provided by an embodiment of the present invention.
图7是本发明实施例提供的移动终端的另一结构示意图。Fig. 7 is another schematic structural diagram of a mobile terminal provided by an embodiment of the present invention.
具体实施方式detailed description
请参照图式,其中相同的组件符号代表相同的组件,本发明的原理是以实施在一适当的运算环境中来举例说明。以下的说明是基于所例示的本发明具体实施例,其不应被视为限制本发明未在此详述的其它具体实施例。Referring to the drawings, wherein like reference numerals represent like components, the principles of the present invention are exemplified when implemented in a suitable computing environment. The following description is based on illustrated specific embodiments of the invention, which should not be construed as limiting other specific embodiments of the invention not described in detail herein.
以下将详细说明。Details will be given below.
可以理解的是,本发明实施例的执行主体可以是诸如智能手机或平板电脑等的终端设备。It can be understood that the execution subject of this embodiment of the present invention may be a terminal device such as a smart phone or a tablet computer.
在该终端设备上可以安装有即时通信应用。如图1所示,借助于该即时通信应用及其服务器,本终端的用户可以与其他终端的用户进行即时通信。An instant messaging application may be installed on the terminal device. As shown in FIG. 1 , by means of the instant messaging application and its server, the user of this terminal can conduct instant messaging with users of other terminals.
请参阅图2,图2是本发明实施例提供的信息修正方法的流程示意图,流程可以包括:Please refer to FIG. 2. FIG. 2 is a schematic flow diagram of an information correction method provided by an embodiment of the present invention. The flow may include:
在步骤S101中,获取即时通信应用交互界面中待发送的字符信息,该字符信息中包括多个文字。In step S101, the character information to be sent in the instant messaging application interface is acquired, and the character information includes a plurality of characters.
比如,随着终端的智能化程度越来越高,终端可以执行的任务也越来越广泛。例如,终端可以对文本信息进行错字检测,并将检测到的错字提示给用户查看,以提醒用户输入的文本信息中存在错误。然而,相关技术中,终端无法对检测出的错字进行修正。For example, as the terminal becomes more and more intelligent, the tasks that the terminal can perform are also becoming more and more extensive. For example, the terminal may detect typos in the text information, and prompt the detected typos to the user, so as to remind the user that there are errors in the input text information. However, in the related art, the terminal cannot correct the detected typo.
在本发明实施例的步骤S101中,比如,在用户使用即时通信应用和好友进行即时通信时,终端可以先获取该即时通信应用交互界面中待发送的字符信息,该字符信息中可以包括多个文字。In step S101 of the embodiment of the present invention, for example, when a user uses an instant messaging application to conduct instant messaging with a friend, the terminal may first obtain the character information to be sent in the instant messaging application interface, and the character information may include multiple Word.
在步骤S102中,检测该字符信息中是否包含错误文字。In step S102, it is detected whether the character information contains wrong characters.
在步骤S103中,若检测出该字符信息中包含错误文字,则获取该即时通信应用的聊天记录信息。In step S103, if it is detected that the character information contains wrong characters, the chat record information of the instant messaging application is acquired.
在步骤S104中,根据该聊天记录信息,预测该错误文字对应的正确文字。In step S104, the correct character corresponding to the wrong character is predicted according to the chat record information.
比如,步骤S102、S103和S104可以包括:For example, steps S102, S103 and S104 may include:
在获取到即时通信应用交互界面中待发送的字符信息之后,终端可以检测该字符信息中是否包含错误文字。After acquiring the character information to be sent in the instant messaging application interface, the terminal can detect whether the character information contains wrong words.
如果检测出该字符信息中不包含错误文字,那么终端可以执行其它操作,即步骤S106。If it is detected that the character information does not contain an error character, then the terminal may perform other operations, ie step S106.
如果检测出该字符信息中包含错误文字,那么终端可以获取该即时通信应用的聊天记录信息。If it is detected that the character information contains wrong words, then the terminal can acquire the chat record information of the instant messaging application.
然后,终端可以根据该聊天记录信息,预测出与该错误文字对应的正确文字。Then, the terminal can predict the correct text corresponding to the wrong text according to the chat record information.
例如,终端根据该即时通信应用的聊天记录信息,预测出错误文字“附进”对应的正确文字为“附近”。For example, according to the chat history information of the instant messaging application, the terminal predicts that the correct text corresponding to the wrong text "attached" is "nearby".
在步骤S105中,按照该正确文字,对该错误文字进行修正。In step S105, the erroneous characters are corrected according to the correct characters.
比如,在确定出与错误文字对应的正确文字之后,终端可以按照该正确文字,对该错误文字进行修正。For example, after determining the correct text corresponding to the erroneous text, the terminal may correct the erroneous text according to the correct text.
可以理解的是,在进行即时通信时,用户往往以很快的速度进行打字,因此用户发送给对方的信息中经常会存在错误文字。在一些场景下,这些错误文字很容易会引起对方的误解。It is understandable that when performing instant messaging, users often type at a very fast speed, so there are often erroneous characters in the information sent by the user to the other party. In some scenarios, these wrong words can easily cause misunderstandings by the other party.
在本发明实施例中,终端可以对即时通信交互界面中待发送的字符信息进行错误文字检测,并预测该错误文字对应的正确文字,然后以该预测出来的正确文字对检测到的错误文字进行修正。因此,本发明实施例可以减少终端发送出去的信息中的错误文字,从而提高终端所发送的信息的准确性。In the embodiment of the present invention, the terminal can detect the wrong character of the character information to be sent in the instant messaging interface, and predict the correct character corresponding to the wrong character, and then use the predicted correct character to perform the detection of the detected wrong character. fix. Therefore, the embodiments of the present invention can reduce erroneous characters in the information sent by the terminal, thereby improving the accuracy of the information sent by the terminal.
同时,由于在即时通信时,用户前后输入的字符信息间存在很强的上下文关联,因此本发明实施例在检测到错误文字之后,可以根据之前的聊天记录来预测与错误文字对应的正确文字,并按照该正确文字对该错误文字进行修正。通过这种方式,终端可以提高错误文字修正的准确度。At the same time, since there is a strong contextual relationship between the character information input by the user during instant messaging, the embodiment of the present invention can predict the correct text corresponding to the wrong text according to the previous chat records after detecting the wrong text. And correct the wrong word according to the correct word. In this way, the terminal can improve the accuracy of error text correction.
在本发明实施例中,终端可以获取该即时通信应用的交互界面中待发送的字符信息,该字符信息中包括多个文字。然后,终端可以检测该字符信息中是否包含错误文字。若是,则终端可以获取该即时通信应用的聊天记录信息。然后,终端可以根据该聊天记录信息,预测该错误文字对应的正确文字,并按照该正确文字对该错误文字进行修正。因此,本发明实施例可以提高终端所发送的信息的准确度。In the embodiment of the present invention, the terminal may obtain character information to be sent in the interactive interface of the instant messaging application, and the character information includes multiple characters. Then, the terminal can detect whether the character information contains wrong characters. If yes, the terminal can obtain the chat record information of the instant messaging application. Then, the terminal can predict the correct text corresponding to the wrong text according to the chat record information, and correct the wrong text according to the correct text. Therefore, the embodiment of the present invention can improve the accuracy of the information sent by the terminal.
请参阅图3,图3为本发明实施例提供的信息修正方法的另一流程示意图,流程可以包括:Please refer to FIG. 3. FIG. 3 is another schematic flow diagram of the information correction method provided by the embodiment of the present invention. The flow may include:
在步骤S201中,终端获取即时通信应用交互界面中待发送的字符信息,该字符信息中包括多个文字。In step S201, the terminal obtains character information to be sent in an instant messaging application interface, and the character information includes a plurality of characters.
比如,在用户使用即时通信应用和好友进行即时通信时,终端可以先获取即时通信应用交互界面中由用户输入的,且尚未发送出去的字符信息,该字符信息中可以包括由多个文字。For example, when a user uses an instant messaging application to conduct instant messaging with a friend, the terminal may first obtain character information input by the user in the interactive interface of the instant messaging application and not yet sent out, and the character information may include multiple characters.
在获取到待发送的字符信息之后,终端可以检测该字符信息中是否包含错误文字。After acquiring the character information to be sent, the terminal can detect whether the character information contains wrong characters.
在一种实施方式中,终端可以通过第三方应用来检测字符信息中是否包含错误文字。例如,该第三方应用可以是嵌入即时通信应用中的错字检测软件。In an implementation manner, the terminal may use a third-party application to detect whether the character information contains wrong characters. For example, the third-party application may be a typo detection software embedded in an instant messaging application.
如果检测出该字符信息中不包含错误文字,那么终端可以执行其它操作。If it is detected that the character information does not contain an error character, then the terminal can perform other operations.
如果检测出该字符信息中包含错误文字,那么进入步骤S202。If it is detected that the character information contains wrong characters, then go to step S202.
在步骤S202中,若检测出该字符信息中包含错误文字,则终端获取该即时通信应用在预设时间范围内生成的待选聊天记录信息,及各条待选聊天记录信息对应的生成时间。In step S202, if it is detected that the character information contains wrong characters, the terminal acquires the candidate chat record information generated by the instant messaging application within a preset time range, and the generation time corresponding to each piece of candidate chat record information.
比如,终端检测出即时通信应用交互界面中待发送的字符信息中包含错误文字。在这种情况下,终端可以获取该即时通信应用在预设时间范围内生成的聊天记录信息,即待选聊天记录信息。可以理解的是,该待选聊天记录信息也就是用户之前发送给好友的即时通信消息以及接收到的(由该好友发送的)即时通信消息。For example, the terminal detects that the character information to be sent in the instant messaging application interface contains wrong text. In this case, the terminal may acquire chat record information generated by the instant messaging application within a preset time range, that is, chat record information to be selected. It can be understood that the chat record information to be selected is the instant messaging message sent by the user to the friend and the instant messaging message (sent by the friend) received by the user.
另外,终端还可以获取各条待选聊天记录信息对应的生成时间。In addition, the terminal may also acquire the generation time corresponding to each piece of chat record information to be selected.
例如,在检测出即时通信应用交互界面中待发送的字符信息中包含错误文字的情况下,终端可以获取预设的2分钟或3分钟内生成的聊天记录信息(待选聊天记录信息),以及各条待选聊天记录信息对应的生成时间。For example, when it is detected that the character information to be sent in the instant messaging application interface contains wrong words, the terminal can obtain the preset chat record information generated within 2 minutes or 3 minutes (chat record information to be selected), and The generation time corresponding to each piece of chat record information to be selected.
例如,终端获取到的最近的2分钟内生成的待选聊天记录信息包括A、B、C、D、E、F,其中A的生成时间最晚;B的生成时间早于A,但晚于C、D、E和F;C的生成时间早于B,但晚于D、E和F;D的生成时间早于C,但晚于E和F;E是生成时间早于D,但晚于F;F的生成时间最早。For example, the candidate chat record information obtained by the terminal and generated within the last 2 minutes includes A, B, C, D, E, and F, where the generation time of A is the latest; the generation time of B is earlier than A, but later than C, D, E, and F; C was generated earlier than B, but later than D, E, and F; D was generated earlier than C, but later than E and F; E was generated earlier than D, but later Yu F; F was the earliest generation time.
在步骤S203中,终端按照生成时间由后到先的顺序,对待选聊天记录信息进行排列,得到关于待选聊天记录信息的序列。In step S203, the terminal arranges the chat record information to be selected in descending order of generation time, and obtains a sequence of chat record information to be selected.
在步骤S204中,终端将排在该序列的预设序位的待选聊天记录信息确定为目标聊天记录信息。In step S204, the terminal determines the chat record information to be selected in the preset order of the sequence as the target chat record information.
比如,步骤S203和S204可以包括:For example, steps S203 and S204 may include:
在获取到待选聊天记录信息,以及各条待选聊天记录信息对应的生成时间之后,终端可以按照生成时间由后到先的顺序,对所有的待选聊天记录信息进行排列,从而得到一个关于待选聊天记录信息的序列。也即,在该序列中,排在第一位的是生成时间最晚的那条待选聊天记录信息,而排在序列最后一位的四生成时间最早的那条待选聊天记录信息。After obtaining the chat record information to be selected and the generation time corresponding to each piece of chat record information to be selected, the terminal can arrange all the chat record information to be selected in the order of generation time from last to first, so as to obtain an information about The sequence of chat log information to be selected. That is to say, in the sequence, the chat record information to be selected with the latest generation time is ranked first, and the chat record information to be selected with the earliest generation time is ranked last in the sequence.
在得到关于待选聊天记录信息的序列之后,终端可以将排在预设序位的待选聊天记录信息确定为目标聊天记录信息。After obtaining the sequence of the chat record information to be selected, the terminal may determine the chat record information to be selected in the preset order as the target chat record information.
例如,在得到待选聊天记录信息A、B、C、D、E、F,及其各自的生成时间之后,终端可以按照生成时间由后到先的顺序,对这六条待选聊天记录信息进行排列,从而得到一个序列。例如,由于A的生成时间最晚;B的生成时间早于A,但晚于C、D、E和F;C的生成时间早于B,但晚于D、E和F;D的生成时间早于C,但晚于E和F;E是生成时间早于D,但晚于F;F的生成时间最早。因此,得到的序列为(A、B、C、D、E、F)。For example, after obtaining the chat record information A, B, C, D, E, and F to be selected, and their respective generation times, the terminal can process the six pieces of chat record information to be selected according to the order of generation time from last to first. Arrange to get a sequence. For example, since A was the latest to spawn; B was spawned earlier than A, but later than C, D, E, and F; C was spawned earlier than B, but later than D, E, and F; D was spawned Earlier than C, but later than E and F; E is earlier than D, but later than F; F is the earliest generation time. Therefore, the resulting sequence is (A, B, C, D, E, F).
然后,终端可以将该序列中排在预设的第一位至第三位的待选聊天记录信息确定为目标聊天记录信息。例如,终端确定出来的目标聊天记录信息为A、B、C。Then, the terminal may determine the chat record information to be selected from the preset first to third positions in the sequence as the target chat record information. For example, the target chat record information determined by the terminal is A, B, and C.
在步骤S205中,终端从该目标聊天记录信息中提取至少一个关键字。In step S205, the terminal extracts at least one keyword from the target chat record information.
在步骤S206中,终端获取该错误文字对应的拼音,并根据该拼音获取多个待选文字。In step S206, the terminal obtains the pinyin corresponding to the erroneous character, and obtains a plurality of candidate characters according to the pinyin.
在步骤S207中,终端从该待选文字中,选取与该关键字匹配的目标文字,并将该目标文字预测为该错误文字对应的正确文字。In step S207, the terminal selects the target text matching the keyword from the candidate text, and predicts the target text as the correct text corresponding to the wrong text.
比如,步骤S205、S206和S207可以包括:For example, steps S205, S206 and S207 may include:
在得到目标聊天记录信息之后,终端可以从该目标聊天记录信息中提取至少一个关键字。After obtaining the target chat record information, the terminal may extract at least one keyword from the target chat record information.
然后,终端可以获取之前检测到的错误文字对应的拼音,并根据该拼音获取多个待选文字。例如,在一种实施方式中,该多个待选文字和错误文字的拼音一致。也即,终端可以根据错误文字的拼音,获取多个拼音与该错误文字的拼音一致的待选文字。Then, the terminal can obtain the pinyin corresponding to the previously detected incorrect text, and obtain multiple texts to be selected according to the pinyin. For example, in one embodiment, the pinyin of the plurality of candidate characters is consistent with that of the wrong character. That is, according to the pinyin of the erroneous word, the terminal can acquire a plurality of candidate characters whose pinyin is consistent with the pinyin of the erroneous word.
在获取到待选文字之后,终端可以从该多个待选文字中,选取出一个与步骤S205中提取到的关键字匹配的文字,即目标文字。然后,终端可以将该目标文字预测为该错误文字对应的正确文字。After obtaining the text to be selected, the terminal may select a text matching the keyword extracted in step S205 from the multiple texts to be selected, that is, the target text. Then, the terminal can predict the target character as the correct character corresponding to the erroneous character.
例如,目标聊天记录信息C为“晚上我们去哪里吃饭?”,目标聊天记录信息B为“都行,你定地方吧。”,目标聊天记录信息A为“那我们去车公庙的XX饭店,如何?”,那么终端可以从这三条目标聊天记录信息中提取关键字。例如,终端可以通过一定的学习算法,对这三条聊天记录信息进行分析处理,提取到关键字“晚上”、“吃饭”、“车公庙”、“XX饭店”。For example, the target chat record information C is "where shall we go for dinner at night?", the target chat record information B is "anything is fine, you can choose a place.", and the target chat record information A is "then let's go to the XX restaurant in Chegongmiao , how?", then the terminal can extract keywords from these three pieces of target chat record information. For example, the terminal can analyze and process the three pieces of chat record information through a certain learning algorithm, and extract keywords "evening", "dining", "Che Gong Temple" and "XX restaurant".
例如,步骤S201中用户在即时通信应用交互界面中输入的字符信息为“可以,我下午刚好在车公庙附进办事。”,其中终端检测到的错误文字为“附进”。那么,终端可以获取“附进”的拼音“fujin”。然后,终端可以根据拼音“fujin”获取多个待选文字,该多个待选文字的拼音均为“fujin”。例如,终端获取到的待选文字包括“附近”、“富锦”、“福晋”。For example, in step S201, the character information entered by the user in the instant messaging application interface is "Yes, I just happened to do business in Chegongmiao Fujin this afternoon.", and the error text detected by the terminal is "Fujin". Then, the terminal can obtain the pinyin "fujin" of "attachment". Then, the terminal can acquire multiple texts to be selected according to the pinyin "fujin", and the pinyin of the multiple texts to be selected are all "fujin". For example, the texts to be selected acquired by the terminal include "nearby", "Fujin" and "Fujin".
然后,终端可以从待选文字“附近”、“富锦”、“福晋”中选取一个与关键字“晚上”、“吃饭”、“车公庙”、“XX饭店”匹配的目标文字。例如,终端通过一定的学习算法,将待选文字包括“附近”、“富锦”、“福晋”和关键字“晚上”、“吃饭”、“车公庙”、“XX饭店”逐一进行匹配后,检测到与关键字“车公庙”及“XX饭店”匹配的拼音为“fujin”的文字为“附近”。那么,终端可以将“附近”确定为目标文字。Then, the terminal can select a target text matching the keywords "evening", "dining", "Che Gong Temple" and "XX restaurant" from the candidate texts "nearby", "Fujin" and "Fujin". For example, through a certain learning algorithm, the terminal matches the text to be selected including "nearby", "Fujin", "Fujin" and the keywords "evening", "dining", "Chegongmiao" and "XX restaurant" one by one Afterwards, it is detected that the words with the pinyin of "fujin" matching the keywords "chegongmiao" and "XX restaurant" are "nearby". Then, the terminal can determine "nearby" as the target text.
在步骤S208中,终端按照该正确文字,对该错误文字进行修正。In step S208, the terminal corrects the erroneous text according to the correct text.
比如,在预测出正确文字之后,终端可以按照该正确文字,对该错误文字进行修正。For example, after predicting the correct text, the terminal can correct the wrong text according to the correct text.
例如,在确定出正确文字“附近”之后,终端可以按照该正确文字对错误文字“附进”进行修正。也即,将用户输入的字符信息由“可以,我下午刚好在车公庙附进办事。”修改为“可以,我下午刚好在车公庙附近办事。”。For example, after determining the correct word "near", the terminal may correct the wrong word "attached" according to the correct word. That is, the character information input by the user is changed from "Yes, I just happened to be doing business near Chegongmiao in the afternoon." to "Yes, I just happened to be doing business near Chegongmiao in the afternoon.".
例如,在一种实施方式中,步骤S208中终端按照该正确文字,对该错误文字进行修正的步骤可以包括:For example, in one embodiment, the step of correcting the wrong text by the terminal according to the correct text in step S208 may include:
终端确定该错误文字在该字符信息中的位置;The terminal determines the position of the error text in the character information;
按照该位置,终端采用该正确文字修正该错误文字,并对该正确文字进行高亮显示。According to the position, the terminal uses the correct character to correct the wrong character, and highlights the correct character.
比如,在确定出正确文字之后,终端可以确定出错误文字在字符信息中的位置,然后终端可以将该正确文字从该字符信息中删除,再在该错误文字原来的位置上插入正确文字,从而完成对该正确文字的修正。然后,终端可以对该正确文字进行高亮显示,从而提醒用户本终端对错误文字进行了修正。For example, after determining the correct text, the terminal can determine the position of the wrong text in the character information, and then the terminal can delete the correct text from the character information, and then insert the correct text at the original position of the wrong text, so that Complete the correction to the correct text. Then, the terminal can highlight the correct text, thereby reminding the user that the terminal has corrected the wrong text.
例如,在确定出正确文字“附近”之后,终端可以确定出错误文字“附进”在字符信息“可以,我下午刚好在车公庙附近办事。”中的位置。例如,终端确定出错误文字“附进”在字符信息“可以,我下午刚好在车公庙附进办事。”的第13和14个字的位置。For example, after determining the correct text "nearby", the terminal can determine the position of the wrong text "attached" in the character information "Yes, I just happened to be doing business near Chegongmiao in the afternoon.". For example, the terminal determines that the erroneous text "Fujin" is at the 13th and 14th characters of the character information "Yes, I happened to be working in Fujin at Chegongmiao this afternoon."
然后,终端可以将错误文字“附进”从字符信息“可以,我下午刚好在车公庙附进办事。”中删除,再将正确文字“附近”插入到删除错误文字后的字符信息“可以,我下午刚好在车公庙办事。”的第13和14个字的位置,得到修正后的字符信息“可以,我下午刚好在车公庙附近办事。”。Then, the terminal can delete the wrong text "attached" from the character information "Yes, I happened to be doing business in Chegongmiao this afternoon.", and then insert the correct text "near" into the character information after deleting the wrong text "OK , I just happened to be doing business in Chegongmiao in the afternoon." In the positions of the 13th and 14th characters, the corrected character information is obtained "Yes, I just happened to be doing business near Chegongmiao in the afternoon.".
可以理解的是,在将字符信息由“可以,我下午刚好在车公庙附进办事。”修正为“可以,我下午刚好在车公庙附近办事。”后,终端发送出去的信息的准确度得到提高。It is understandable that after modifying the character information from "Yes, I happened to be doing business near Chegongmiao in the afternoon." to "Yes, I happened to be doing business near Chegongmiao in the afternoon." degree has been improved.
在一种实施方式中,本发明实施例可以在每次检测到用户输入标点符号或空格符号后,获取在该标点符号或空格符号前输入的且未经过错误文字检测的字符信息,并检测其中是否包含错误文字。In one implementation, the embodiment of the present invention can obtain the character information input before the punctuation mark or the space mark and has not been detected by the wrong text after each detection of the user inputting the punctuation mark or the space mark, and detect the Whether to include error text.
例如,用户在即时通信应用交互界面上输入了第一句话“XXXXX,”,那么当检测到用户输入了第一个标点符号“,”之后,终端可以获取在第一个逗号前输入的字符信息“XXXXX”,并检测该字符信息“XXXXX”中是否包含错误文字。接着,用户输入了第二句话“******,”。那么,当终端检测到用户输入第二个逗号时,终端可以获取在第二个逗号前输入且未经过错误文字检测的字符信息“******”,并检测其中是否包含错误文字。For example, if the user enters the first sentence "XXXXX," on the interactive interface of the instant messaging application, after detecting that the user has entered the first punctuation mark ",", the terminal can obtain the characters entered before the first comma information "XXXXX", and detect whether the character information "XXXXX" contains wrong text. Next, the user enters the second sentence "******,". Then, when the terminal detects that the user enters the second comma, the terminal can obtain the character information "******" that was input before the second comma and has not passed the error text detection, and detect whether it contains error text.
在一种实施方式中,用户在看见高亮显示的正确文字之后,如果不认可终端用该正确文字修正错误文字,那么终端还可以点击该高亮显示的正确文字,从而触发终端恢复到之前的文字,即撤销对错误文字的修正。In one embodiment, after the user sees the highlighted correct text, if he does not agree that the terminal uses the correct text to correct the wrong text, then the terminal can also click the highlighted correct text, thereby triggering the terminal to restore the previous text. Text, that is, to undo corrections to incorrect text.
请参阅图4A至图4E,图4A至图4E为本发明实施例提供的信息修正方法的场景示意图。Please refer to FIG. 4A to FIG. 4E . FIG. 4A to FIG. 4E are schematic diagrams of scenes of an information correction method provided by an embodiment of the present invention.
比如,如图4A所示,用户正在与好友小张进行即时通信,在即时通信应用交互界面中输入字符“可以,我下午刚好在车公庙附进办事。”,但尚未将这条信息发送出去。For example, as shown in Figure 4A, the user is instant messaging with his friend Xiao Zhang, and enters the character "Yes, I just happened to be in Chegongmiao this afternoon for business." in the instant messaging application interface, but this information has not been sent yet. go out.
终端可以获取待发送的字符“可以,我下午刚好在车公庙附进办事。”,并检测其中是否包含错误文字。例如,终端检测到其中包含错误文字“附进”。The terminal can obtain the characters to be sent "Yes, I just happened to be doing business in Chegongmiao this afternoon.", and detect whether it contains wrong words. For example, the terminal detects that it contains the wrong text "attach".
在这种情况下,终端可以获取预设的2分钟内生成的待选聊天记录信息,以及各条待选聊天记录信息对应的生成时间。例如,终端获取到的最近的2分钟内生成的待选聊天记录信息包括A、B、C、D、E、F,其中A的生成时间最晚;B的生成时间早于A,但晚于C、D、E和F;C的生成时间早于B,但晚于D、E和F;D的生成时间早于C,但晚于E和F;E是生成时间早于D,但晚于F;F的生成时间最早。In this case, the terminal may obtain the chat record information to be selected generated within the preset 2 minutes, and the generation time corresponding to each piece of chat record information to be selected. For example, the candidate chat record information obtained by the terminal and generated within the last 2 minutes includes A, B, C, D, E, and F, where the generation time of A is the latest; the generation time of B is earlier than A, but later than C, D, E, and F; C was generated earlier than B, but later than D, E, and F; D was generated earlier than C, but later than E and F; E was generated earlier than D, but later Yu F; F was the earliest generation time.
在得到待选聊天记录信息A、B、C、D、E、F,及其各自的生成时间之后,终端可以按照生成时间由后到先的顺序,对这六条待选聊天记录信息进行排列,从而得到一个序列。例如,由于A的生成时间最晚;B的生成时间早于A,但晚于C、D、E和F;C的生成时间早于B,但晚于D、E和F;D的生成时间早于C,但晚于E和F;E是生成时间早于D,但晚于F;F的生成时间最早。因此,得到的序列为(A、B、C、D、E、F)。After obtaining the chat record information A, B, C, D, E, and F to be selected, and their respective generation times, the terminal can arrange the six pieces of chat record information to be selected in the order of generation time from last to first, resulting in a sequence. For example, since A was the latest to spawn; B was spawned earlier than A, but later than C, D, E, and F; C was spawned earlier than B, but later than D, E, and F; D was spawned Earlier than C, but later than E and F; E is earlier than D, but later than F; F is the earliest generation time. Therefore, the resulting sequence is (A, B, C, D, E, F).
终端可以将该序列中排在预设的第一位至第三位的待选聊天记录信息确定为目标聊天记录信息。例如,终端确定出来的目标聊天记录信息为A、B、C。The terminal may determine the chat record information to be selected from the preset first to third positions in the sequence as the target chat record information. For example, the target chat record information determined by the terminal is A, B, and C.
例如,如图4B所示,目标聊天记录信息C为“晚上我们去哪里吃饭?”,目标聊天记录信息B为“都行,你定地方吧。”,目标聊天记录信息A为“那我们去车公庙的XX饭店,如何?”,那么终端可以从这三条目标聊天记录信息中提取关键字。例如,终端可以通过一定的学习算法,对这三条聊天记录信息进行分析处理,提取到关键字“晚上”、“吃饭”、“车公庙”、“XX饭店”。For example, as shown in Figure 4B, the target chat record information C is "Where shall we go for dinner at night?", the target chat record information B is "it's all right, you can decide a place.", and the target chat record information A is "Then let's go XX restaurant in Chegongmiao, how about it?", then the terminal can extract keywords from these three pieces of target chat record information. For example, the terminal can analyze and process the three pieces of chat record information through a certain learning algorithm, and extract keywords "evening", "dining", "Che Gong Temple" and "XX restaurant".
然后,终端可以获取错误文字“附进”的拼音“fujin”。然后,终端可以根据拼音“fujin”获取多个待选文字,该多个待选文字的拼音均为“fujin”。例如,终端获取到的待选文字包括“附近”、“富锦”、“福晋”。Then, the terminal can obtain the pinyin "fujin" of the error text "连级". Then, the terminal can acquire multiple texts to be selected according to the pinyin "fujin", and the pinyin of the multiple texts to be selected are all "fujin". For example, the texts to be selected acquired by the terminal include "nearby", "Fujin" and "Fujin".
然后,终端可以从待选文字“附近”、“富锦”、“福晋”中选取一个与关键字“晚上”、“吃饭”、“车公庙”、“XX饭店”匹配的目标文字。例如,终端通过一定的学习算法,将待选文字包括“附近”、“富锦”、“福晋”和关键字“晚上”、“吃饭”、“车公庙”、“XX饭店”逐一进行匹配后,检测到与关键字“车公庙”及“XX饭店”匹配的拼音为“fujin”的文字为“附近”。那么,终端可以将“附近”确定为目标文字,并将该目标文字“附近”预测为错误文字“附进”对应的正确文字。Then, the terminal can select a target text matching the keywords "evening", "dining", "Che Gong Temple" and "XX restaurant" from the candidate texts "nearby", "Fujin" and "Fujin". For example, through a certain learning algorithm, the terminal matches the text to be selected including "nearby", "Fujin", "Fujin" and the keywords "evening", "dining", "Chegongmiao" and "XX restaurant" one by one Afterwards, it is detected that the words with the pinyin of "fujin" matching the keywords "chegongmiao" and "XX restaurant" are "nearby". Then, the terminal may determine "nearby" as the target text, and predict the target text "nearby" as the correct text corresponding to the wrong text "attached".
在预测出正确文字“附近”之后,终端可以按照该正确文字对错误文字“附进”进行修正。也即,将用户输入的字符信息由“可以,我下午刚好在车公庙附进办事。”修改为“可以,我下午刚好在车公庙附近办事。”,如图4C所示。After predicting the correct word "near", the terminal can correct the wrong word "attached" according to the correct word. That is, the character information input by the user is changed from "Yes, I just happened to be doing business near Chegongmiao in the afternoon." to "Yes, I just happened to be doing business near Chegongmiao in the afternoon.", as shown in Figure 4C.
之后,如图4D所示,用户点击了“发送”按钮,将信息发送出去。在将信息发送出去之后,终端即时通信应用的交互界面可以如图4E所示。Afterwards, as shown in FIG. 4D , the user clicks the "send" button to send the information. After the information is sent, the interactive interface of the instant messaging application of the terminal may be as shown in FIG. 4E.
请参阅图5,图5为本发明实施例提供的信息修正装置的结构示意图。信息修正装置300可以包括:第一获取模块301,检测模块302,第二获取模块303,预测模块304,以及修正模块305。Please refer to FIG. 5 . FIG. 5 is a schematic structural diagram of an information correction device provided by an embodiment of the present invention. The information correction apparatus 300 may include: a first acquisition module 301 , a detection module 302 , a second acquisition module 303 , a prediction module 304 , and a correction module 305 .
第一获取模块301,用于获取即时通信应用交互界面中待发送的字符信息,所述字符信息中包括多个文字。The first acquiring module 301 is configured to acquire character information to be sent in an instant messaging application interface, where the character information includes a plurality of characters.
比如,在用户使用即时通信应用和好友进行即时通信时,第一获取模块301可以先获取即时通信应用交互界面中由用户输入的待发送的字符信息。在该字符信息中可以包括多个文字。For example, when a user uses an instant messaging application to conduct instant messaging with a friend, the first obtaining module 301 may first obtain the character information to be sent input by the user in the interactive interface of the instant messaging application. A plurality of characters may be included in the character information.
检测模块302,用于检测所述字符信息中是否包含错误文字。The detection module 302 is configured to detect whether the character information contains wrong characters.
比如,在第一获取模块301获取到即时通信应用交互界面中待发送的字符信息之后,检测模块302可以检测该字符信息中是否包含错误文字。For example, after the first acquiring module 301 acquires the character information to be sent in the instant messaging application interface, the detecting module 302 can detect whether the character information contains wrong words.
如果检测出该字符信息中不包含错误文字,那么终端可以执行其它操作。If it is detected that the character information does not contain an error character, then the terminal can perform other operations.
第二获取模块303,用于若检测出所述字符信息中包含错误文字,则获取所述即时通信应用的聊天记录信息。The second obtaining module 303 is configured to obtain the chat record information of the instant messaging application if it is detected that the character information contains wrong characters.
预测模块304,用于根据所述聊天记录信息,预测所述错误文字对应的正确文字。The prediction module 304 is configured to predict the correct text corresponding to the wrong text according to the chat record information.
比如,检测模块302检测出即时通信交互界面中待发送的字符信息中包含错误文字,那么第二获取模块303可以获取该即时通信应用的聊天记录信息。For example, if the detection module 302 detects that the character information to be sent in the instant messaging interface contains wrong characters, then the second obtaining module 303 may obtain the chat record information of the instant messaging application.
然后,预测模块304可以根据该聊天记录信息,预测该错误文字对应的正确文字。Then, the prediction module 304 can predict the correct text corresponding to the wrong text according to the chat record information.
例如,预测模块304预测出与错误文字“附进”对应的正确文字为“附近”。For example, the prediction module 304 predicts that the correct word corresponding to the wrong word "attachment" is "near".
修正模块305,用于按照所述正确文字,对所述错误文字进行修正。The correction module 305 is configured to correct the erroneous text according to the correct text.
比如,在预测出与错误文字对应的正确文字之后,修正模块305可以按照该正确文字,对该错误文字进行修正。For example, after predicting the correct character corresponding to the erroneous character, the correction module 305 may correct the erroneous character according to the correct character.
在一种实施方式中,预测模块304可以用于:In one embodiment, the prediction module 304 can be used to:
从所述聊天记录信息中提取至少一个关键字。At least one keyword is extracted from the chat record information.
获取所述错误文字对应的拼音,并根据所述拼音获取多个待选文字。Obtain the pinyin corresponding to the erroneous text, and obtain a plurality of candidate texts according to the pinyin.
从所述待选文字中,选取与所述关键字匹配的目标文字,并将所述目标文字预测为所述错误文字对应的正确文字。From the candidate texts, a target text matching the keyword is selected, and the target text is predicted as a correct text corresponding to the wrong text.
比如,在第二获取模块303获取到该即时通信应用的聊天记录信息之后,预测模块304可以从该聊天记录信息中提取至少一个关键字。然后,预测模块304可以获取错误文字对应的拼音,并根据该拼音获取多个待选文字,再从该多个待选文字中选取与关键字匹配的目标文字,并将该目标文字预测为该错误文字对应的正确文字。For example, after the second obtaining module 303 obtains the chat record information of the instant messaging application, the prediction module 304 may extract at least one keyword from the chat record information. Then, the prediction module 304 can obtain the pinyin corresponding to the wrong text, and obtain a plurality of candidate characters according to the pinyin, then select the target text matching the keyword from the multiple candidate texts, and predict the target text as the The correct text for the wrong text.
在一种实施方式中,修正模块305可以用于:In one embodiment, the correction module 305 can be used to:
确定所述错误文字在所述字符信息中的位置;determining the position of the erroneous text in the character information;
按照所述位置,采用所述正确文字修正所述错误文字,并对所述正确文字进行高亮显示。According to the position, the correct character is used to correct the wrong character, and the correct character is highlighted.
比如,在预测出正确文字之后,修正模块305可以确定出错误文字在字符信息中的位置,然后修正模块305可以将该错误文字从该字符信息中删除,再在该错误文字原来的位置上插入对应的正确文字,从而完成对该错误文字的修正。然后,终端可以对该正确文字进行高亮显示,从而提醒用户终端已对检测到的错误文字进行了修正。For example, after the correct character is predicted, the correcting module 305 can determine the position of the wrong character in the character information, and then the correcting module 305 can delete the wrong character from the character information, and then insert it at the original position of the wrong character The corresponding correct text is displayed, so as to complete the correction of the wrong text. Then, the terminal can highlight the correct text, thereby reminding the user that the terminal has corrected the detected incorrect text.
例如,在预测出正确文字“附近”之后,修正模块305可以确定出错误文字“附进”在字符信息“可以,我下午刚好在车公庙附近办事。”中的位置。例如,修正模块305确定出错误文字“附进”在字符信息“可以,我下午刚好在车公庙附进办事。”的第13和14个字的位置。For example, after predicting the correct word "nearby", the correction module 305 can determine the position of the wrong word "attached" in the character information "Yes, I just happened to be working near Chegongmiao in the afternoon.". For example, the correcting module 305 determines that the wrong word "fujin" is in the position of the 13th and 14th characters of the character information "yes, I just happened to do business in Chegongmiao Fujin this afternoon."
然后,修正模块305可以将错误文字“附进”从字符信息“可以,我下午刚好在车公庙附进办事。”中删除,再将正确文字“附近”插入到删除错误文字后的字符信息“可以,我下午刚好在车公庙办事。”的第13和14个字的位置,得到修正后的字符信息“可以,我下午刚好在车公庙附近办事。”。Then, the correction module 305 can delete the wrong word "attached" from the character information "Yes, I happened to be working in Che Gongmiao in the afternoon.", and then insert the correct word "near" into the character information after deleting the wrong word In the position of the 13th and 14th characters of "Yes, I happened to be doing business in Chegongmiao in the afternoon.", the corrected character information "Yes, I happened to be doing business near Chegongmiao in the afternoon." was obtained.
在一种实施方式中,第二获取模块303可以用于:In one embodiment, the second obtaining module 303 may be used to:
获取所述即时通信应用的在预设时间范围内生成的待选聊天记录信息,及各条待选聊天记录信息对应的生成时间。Acquire the chat record information to be selected generated within the preset time range of the instant messaging application, and the generation time corresponding to each piece of chat record information to be selected.
根据所述各条待选聊天记录信息对应的生成时间,从所述待选聊天记录信息中选取目标聊天记录信息。According to the generation time corresponding to each piece of chat record information to be selected, target chat record information is selected from the chat record information to be selected.
那么,预测模块304可以用于:根据所述目标聊天记录信息,预测所述错误文字对应的正确文字。Then, the prediction module 304 may be configured to: predict the correct text corresponding to the wrong text according to the target chat record information.
比如,第二获取模块303可以获取该即时通信应用在预设的2分钟或3分钟内生成的待选聊天记录信息,以及各条待选聊天记录信息对应的生成时间。For example, the second obtaining module 303 may obtain the chat record information to be selected generated by the instant messaging application within the preset 2 minutes or 3 minutes, and the generation time corresponding to each piece of chat record information to be selected.
然后,第二获取模块303可以根据各条待选聊天记录信息对应的生成时间,从所有待选聊天记录信息中选取目标聊天记录信息。Then, the second obtaining module 303 may select the target chat record information from all the chat record information to be selected according to the generation time corresponding to each piece of chat record information to be selected.
那么,在得到目标聊天记录信息后,预测模块304就可以根据该目标聊天记录信息,预测所述错误文字对应的正确文字。Then, after obtaining the target chat record information, the prediction module 304 can predict the correct text corresponding to the erroneous text according to the target chat record information.
例如,在一种实施方式中,第二获取模块303可以用于:For example, in an implementation manner, the second obtaining module 303 may be used to:
按照生成时间由后到先的顺序,对待选聊天记录信息进行排列,得到关于待选聊天记录信息的序列。According to the order of generation time from last to first, the chat record information to be selected is arranged to obtain a sequence of chat record information to be selected.
将排在所述序列的预设序位的待选聊天记录信息确定为目标聊天记录信息。The chat record information to be selected in the pre-ordered position of the sequence is determined as the target chat record information.
比如,在得到待选聊天记录信息A、B、C、D、E、F,及其各自的生成时间之后,第二获取模块303可以按照生成时间由后到先的顺序,对这六条待选聊天记录信息进行排列,从而得到一个序列。例如,由于A的生成时间最晚;B的生成时间早于A,但晚于C、D、E和F;C的生成时间早于B,但晚于D、E和F;D的生成时间早于C,但晚于E和F;E是生成时间早于D,但晚于F;F的生成时间最早。因此,得到的序列为(A、B、C、D、E、F)。For example, after obtaining the candidate chat record information A, B, C, D, E, F, and their respective generation times, the second acquisition module 303 can sort these six candidate chat records in the order of generation time from last to first The chat record information is arranged to obtain a sequence. For example, since A was the latest to spawn; B was spawned earlier than A, but later than C, D, E, and F; C was spawned earlier than B, but later than D, E, and F; D was spawned Earlier than C, but later than E and F; E is earlier than D, but later than F; F is the earliest generation time. Therefore, the resulting sequence is (A, B, C, D, E, F).
然后,第二获取模块303可以将该序列中排在预设的第一位至第三位的待选聊天记录信息确定为目标聊天记录信息。例如,第二获取模块303确定出来的目标聊天记录信息为A、B、C。Then, the second acquiring module 303 may determine the chat record information to be selected from the preset first to third positions in the sequence as the target chat record information. For example, the target chat record information determined by the second acquiring module 303 is A, B, and C.
本发明实施例提供一种计算机可读的存储介质,其上存储有计算机程序,当所述计算机程序在计算机上执行时,使得所述计算机执行如本发明实施例提供的信息修正方法。An embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed on a computer, the computer is made to execute the information correction method provided by the embodiment of the present invention.
本发明实施例还提供一种电子设备,包括存储器,处理器,所述处理器通过调用所述存储器中存储的计算机程序,用于执行本发明实施例提供的信息修正方法。An embodiment of the present invention also provides an electronic device, including a memory and a processor, and the processor is used to execute the information correction method provided by the embodiment of the present invention by invoking a computer program stored in the memory.
例如,上述电子设备可以是诸如平板电脑或者智能手机等移动终端。请参阅图6,图6为本发明实施例提供的移动终端的结构示意图。For example, the above-mentioned electronic device may be a mobile terminal such as a tablet computer or a smart phone. Please refer to FIG. 6. FIG. 6 is a schematic structural diagram of a mobile terminal provided by an embodiment of the present invention.
该移动终端400可以包括通信单元401、存储器402、处理器403等部件。本领域技术人员可以理解,图6中示出的移动终端结构并不构成对移动终端的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。The mobile terminal 400 may include components such as a communication unit 401 , a memory 402 , and a processor 403 . Those skilled in the art can understand that the structure of the mobile terminal shown in FIG. 6 does not constitute a limitation on the mobile terminal, and may include more or less components than those shown in the figure, or combine some components, or arrange different components.
通信单元401可用于收发信息,或通话过程中信号的接收和发送,例如,将下行信息接收后,交由一个或者一个以上处理器403处理;另外,将涉及上行的数据发送出去。The communication unit 401 can be used to send and receive information, or to receive and send signals during a call, for example, after receiving downlink information, hand it over to one or more processors 403 for processing; in addition, send out related uplink data.
存储器402可用于存储应用程序和数据。存储器402存储的应用程序中包含有可执行代码。应用程序可以组成各种功能模块。处理器403通过运行存储在存储器402的应用程序,从而执行各种功能应用以及数据处理。Memory 402 may be used to store applications and data. The application programs stored in the memory 402 include executable codes. Applications can be composed of various functional modules. The processor 403 executes various functional applications and data processing by running the application programs stored in the memory 402 .
处理器403是移动终端的控制中心,利用各种接口和线路连接整个移动终端的各个部分,通过运行或执行存储在存储器402内的应用程序,以及调用存储在存储器402内的数据,执行移动终端的各种功能和处理数据,从而对移动终端进行整体监控。The processor 403 is the control center of the mobile terminal. It uses various interfaces and lines to connect various parts of the entire mobile terminal. By running or executing the application program stored in the memory 402 and calling the data stored in the memory 402, the mobile terminal executes Various functions and processing data, so as to monitor the mobile terminal as a whole.
在本实施例中,处理器403通过调用存储在存储器402中的计算机程序,用于执行如下步骤:In this embodiment, the processor 403 is used to execute the following steps by invoking a computer program stored in the memory 402:
处理器403获取即时通信应用交互界面中待发送的字符信息,所述字符信息中包括多个文字。The processor 403 acquires character information to be sent in the instant messaging application interface, where the character information includes multiple characters.
处理器403检测所述字符信息中是否包含错误文字。The processor 403 detects whether the character information contains wrong characters.
若检测出所述字符信息中包含错误文字,则处理器403获取所述即时通信应用的聊天记录信息。If it is detected that the character information contains wrong words, the processor 403 acquires chat record information of the instant messaging application.
根据所述聊天记录信息,处理器403预测所述错误文字对应的正确文字。According to the chat record information, the processor 403 predicts the correct text corresponding to the wrong text.
按照所述正确文字,处理器403对所述错误文字进行修正。According to the correct text, the processor 403 corrects the erroneous text.
请参阅图7,在另一种实施方式中,移动终端500可以包括通信单元501、存储器502、处理器503、输入单元504和输出单元505等部件。Referring to FIG. 7 , in another implementation manner, a mobile terminal 500 may include components such as a communication unit 501 , a memory 502 , a processor 503 , an input unit 504 , and an output unit 505 .
通信单元501可用于收发信息,或通话过程中信号的接收和发送,例如,将下行信息接收后,交由一个或者一个以上处理器503处理;另外,将涉及上行的数据发送出去。The communication unit 501 can be used to send and receive information, or receive and send signals during a call, for example, after receiving downlink information, hand it over to one or more processors 503 for processing; in addition, send uplink data.
存储器502可用于存储应用程序和数据。存储器502存储的应用程序中包含有可执行代码。应用程序可以组成各种功能模块。处理器503通过运行存储在存储器502的应用程序,从而执行各种功能应用以及数据处理。Memory 502 may be used to store applications and data. The application programs stored in the memory 502 include executable codes. Applications can be composed of various functional modules. The processor 503 executes various functional applications and data processing by running the application programs stored in the memory 502 .
处理器503是移动终端的控制中心,利用各种接口和线路连接整个移动终端的各个部分,通过运行或执行存储在存储器502内的应用程序,以及调用存储在存储器502内的数据,执行移动终端的各种功能和处理数据,从而对移动终端进行整体监控。The processor 503 is the control center of the mobile terminal. It uses various interfaces and lines to connect various parts of the entire mobile terminal. By running or executing the application program stored in the memory 502 and calling the data stored in the memory 502, the mobile terminal executes Various functions and processing data, so as to monitor the mobile terminal as a whole.
输入单元504可用于接收输入的数字、字符信息或用户特征信息(比如指纹),以及产生与用户设置以及功能控制有关的键盘、鼠标、操作杆、光学或者轨迹球信号输入。在一实施例中,输入单元504可包括触敏表面以及其他输入设备。触敏表面,也称为触摸显示屏或者触控板。The input unit 504 can be used to receive input numbers, character information or user characteristic information (such as fingerprints), and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control. In an embodiment, the input unit 504 may include a touch-sensitive surface as well as other input devices. A touch-sensitive surface, also known as a touch display or trackpad.
输出单元505可用于显示由用户输入的信息或提供给用户的信息以及移动终端的各种图形用户接口,这些图形用户接口可以由图形、文本、图标、视频和其任意组合来构成。输出单元可包括显示面板。The output unit 505 can be used to display information input by the user or provided to the user and various graphical user interfaces of the mobile terminal. These graphical user interfaces can be composed of graphics, text, icons, videos and any combination thereof. The output unit may include a display panel.
在本实施例中,处理器503通过调用存储在存储器502中的计算机程序,用于执行如下步骤:In this embodiment, the processor 503 is used to execute the following steps by invoking a computer program stored in the memory 502:
处理器503获取即时通信应用交互界面中待发送的字符信息,所述字符信息中包括多个文字。The processor 503 acquires character information to be sent in the instant messaging application interface, where the character information includes multiple characters.
处理器503检测所述字符信息中是否包含错误文字。The processor 503 detects whether the character information contains wrong characters.
若检测出所述字符信息中包含错误文字,则处理器503获取所述即时通信应用的聊天记录信息。If it is detected that the character information contains wrong characters, the processor 503 acquires chat record information of the instant messaging application.
根据所述聊天记录信息,处理器503预测所述错误文字对应的正确文字。According to the chat record information, the processor 503 predicts the correct text corresponding to the wrong text.
按照所述正确文字,处理器503对所述错误文字进行修正。According to the correct text, the processor 503 corrects the wrong text.
在一种实施方式中,处理器503执行所述根据所述聊天记录信息,预测所述错误文字对应的正确文字的步骤时,可以执行:处理器503从所述聊天记录信息中提取至少一个关键字。处理器503获取所述错误文字对应的拼音,并根据所述拼音获取多个待选文字。从所述待选文字中,处理器503选取与所述关键字匹配的目标文字,并将所述目标文字预测为所述错误文字对应的正确文字。In one embodiment, when the processor 503 executes the step of predicting the correct text corresponding to the wrong text according to the chat record information, it may perform: the processor 503 extracts at least one key word from the chat record information Character. The processor 503 obtains the pinyin corresponding to the erroneous text, and obtains multiple candidate texts according to the pinyin. From the candidate text, the processor 503 selects a target text matching the keyword, and predicts the target text as the correct text corresponding to the wrong text.
在一种实施方式中,处理器503执行所述按照所述正确文字,对所述错误文字进行修正的步骤时,可以执行:处理器503确定所述错误文字在所述字符信息中的位置。按照所述位置,处理器503采用所述正确文字修正所述错误文字,并对所述正确文字进行高亮显示。In one embodiment, when the processor 503 executes the step of correcting the erroneous characters according to the correct characters, it may execute: the processor 503 determines the position of the erroneous characters in the character information. According to the position, the processor 503 uses the correct text to correct the wrong text, and highlights the correct text.
在一种实施方式中,处理器503执行所述获取所述即时通信应用的聊天记录信息的步骤时,可以执行:处理器503获取所述即时通信应用的在预设时间范围内生成的待选聊天记录信息,及各条待选聊天记录信息对应的生成时间。处理器503根据所述各条待选聊天记录信息对应的生成时间,从所述待选聊天记录信息中选取目标聊天记录信息。In one implementation manner, when the processor 503 executes the step of obtaining the chat record information of the instant messaging application, it may execute: the processor 503 obtains the chat record information of the instant messaging application generated within a preset time range; Chat record information, and the generation time corresponding to each piece of chat record information to be selected. The processor 503 selects target chat record information from the chat record information to be selected according to the generation time corresponding to each piece of chat record information to be selected.
那么,处理器503执行所述根据所述聊天记录信息,预测所述错误文字对应的正确文字的步骤时,可以执行:根据所述目标聊天记录信息,处理器503预测所述错误文字对应的正确文字。Then, when the processor 503 executes the step of predicting the correct text corresponding to the erroneous text according to the chat record information, it may perform: according to the target chat record information, the processor 503 predicts the correct text corresponding to the erroneous text. Word.
在一种实施方式中,处理器503执行所述根据所述各条聊天记录信息对应的生成时间,从所述待选聊天记录信息中选取目标聊天记录信息的步骤时,可以执行:按照生成时间由后到先的顺序,对待选聊天记录信息进行排列,得到关于待选聊天记录信息的序列。将排在所述序列的预设序位的待选聊天记录信息确定为目标聊天记录信息。In one embodiment, when the processor 503 executes the step of selecting the target chat record information from the candidate chat record information according to the generation time corresponding to each piece of chat record information, it may perform: according to the generation time Arranging the chat record information to be selected in a last-to-first order to obtain a sequence of chat record information to be selected. The chat record information to be selected in the pre-ordered position of the sequence is determined as the target chat record information.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见上文针对信息修正方法的详细描述,此处不再赘述。In the above-mentioned embodiments, the descriptions of each embodiment have their own emphases. For the part that is not described in detail in a certain embodiment, refer to the detailed description of the information correction method above, and will not be repeated here.
本发明实施例提供的所述信息修正装置与上文实施例中的信息修正方法属于同一构思,在所述信息修正装置上可以运行所述信息修正方法实施例中提供的任一方法,其具体实现过程详见所述信息修正方法实施例,此处不再赘述。The information correction device provided in the embodiment of the present invention belongs to the same idea as the information correction method in the above embodiment, and any method provided in the information correction method embodiment can be run on the information correction device, and its specific For the implementation process, refer to the embodiment of the information correction method, and details are not repeated here.
需要说明的是,对本发明实施例所述信息修正方法而言,本领域普通技术人员可以理解实现本发明实施例所述信息修正方法的全部或部分流程,是可以通过计算机程序来控制相关的硬件来完成,所述计算机程序可存储于一计算机可读取存储介质中,如存储在存储器中,并被至少一个处理器执行,在执行过程中可包括如所述信息修正方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储器(ROM,Read Only Memory)、随机存取记忆体(RAM,Random Access Memory)等。It should be noted that, for the information correction method described in the embodiment of the present invention, those of ordinary skill in the art can understand that all or part of the flow of the information correction method described in the embodiment of the present invention can be controlled by computer programs. To complete, the computer program can be stored in a computer-readable storage medium, such as a memory, and executed by at least one processor, and the execution process can include the flow of the embodiment of the information correction method . Wherein, the storage medium may be a magnetic disk, an optical disk, a read only memory (ROM, Read Only Memory), a random access memory (RAM, Random Access Memory) and the like.
对本发明实施例的所述信息修正装置而言,其各功能模块可以集成在一个处理芯片中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中,所述存储介质譬如为只读存储器,磁盘或光盘等。For the information correction device in the embodiment of the present invention, its various functional modules can be integrated into one processing chip, or each module can exist separately physically, or two or more modules can be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software function modules. If the integrated modules are implemented in the form of software function modules and sold or used as independent products, they can also be stored in a computer-readable storage medium, such as read-only memory, magnetic disk or optical disk, etc. .
以上对本发明实施例所提供的一种信息修正方法、装置、存储介质以及电子设备进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。The information correction method, device, storage medium and electronic equipment provided by the embodiments of the present invention are described above in detail. In this paper, specific examples are used to illustrate the principle and implementation of the present invention. The description of the above embodiments is only It is used to help understand the method and its core idea of the present invention; at the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation and scope of application. In summary, this specification The content should not be construed as a limitation of the invention.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710526231.XACN107291698B (en) | 2017-06-30 | 2017-06-30 | Information correction method, information correction device, storage medium and electronic equipment |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710526231.XACN107291698B (en) | 2017-06-30 | 2017-06-30 | Information correction method, information correction device, storage medium and electronic equipment |
| Publication Number | Publication Date |
|---|---|
| CN107291698Atrue CN107291698A (en) | 2017-10-24 |
| CN107291698B CN107291698B (en) | 2020-08-04 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201710526231.XAActiveCN107291698B (en) | 2017-06-30 | 2017-06-30 | Information correction method, information correction device, storage medium and electronic equipment |
| Country | Link |
|---|---|
| CN (1) | CN107291698B (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108009136A (en)* | 2017-10-31 | 2018-05-08 | 努比亚技术有限公司 | A kind of modified method of message and mobile terminal, computer-readable recording medium |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101136871A (en)* | 2006-08-31 | 2008-03-05 | 腾讯科技(深圳)有限公司 | Corrective method, instant communication terminal and system of transmitting error message |
| CN103019398A (en)* | 2011-09-20 | 2013-04-03 | 腾讯科技(深圳)有限公司 | Character input method and character input device |
| CN104036047A (en)* | 2014-07-02 | 2014-09-10 | 携程计算机技术(上海)有限公司 | Method and system for automatically correcting character strings |
| CN105247446A (en)* | 2013-05-16 | 2016-01-13 | 株式会社酷凯 | Input error correction method and device for executing the method |
| CN105378607A (en)* | 2013-07-05 | 2016-03-02 | 三星电子株式会社 | Method and electronic device for recovering automatically corrected characters |
| CN106095751A (en)* | 2016-06-07 | 2016-11-09 | 维沃移动通信有限公司 | The knowledge mistake processing method of a kind of word input and mobile terminal |
| CN106250364A (en)* | 2016-07-20 | 2016-12-21 | 科大讯飞股份有限公司 | A kind of text modification method and device |
| CN106249909A (en)* | 2015-06-05 | 2016-12-21 | 苹果公司 | Language in-put corrects |
| CN106656748A (en)* | 2016-11-15 | 2017-05-10 | 北京三快在线科技有限公司 | Information display method and device, and electronic equipment |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101136871A (en)* | 2006-08-31 | 2008-03-05 | 腾讯科技(深圳)有限公司 | Corrective method, instant communication terminal and system of transmitting error message |
| CN103019398A (en)* | 2011-09-20 | 2013-04-03 | 腾讯科技(深圳)有限公司 | Character input method and character input device |
| CN105247446A (en)* | 2013-05-16 | 2016-01-13 | 株式会社酷凯 | Input error correction method and device for executing the method |
| CN105378607A (en)* | 2013-07-05 | 2016-03-02 | 三星电子株式会社 | Method and electronic device for recovering automatically corrected characters |
| CN104036047A (en)* | 2014-07-02 | 2014-09-10 | 携程计算机技术(上海)有限公司 | Method and system for automatically correcting character strings |
| CN106249909A (en)* | 2015-06-05 | 2016-12-21 | 苹果公司 | Language in-put corrects |
| CN106095751A (en)* | 2016-06-07 | 2016-11-09 | 维沃移动通信有限公司 | The knowledge mistake processing method of a kind of word input and mobile terminal |
| CN106250364A (en)* | 2016-07-20 | 2016-12-21 | 科大讯飞股份有限公司 | A kind of text modification method and device |
| CN106656748A (en)* | 2016-11-15 | 2017-05-10 | 北京三快在线科技有限公司 | Information display method and device, and electronic equipment |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108009136A (en)* | 2017-10-31 | 2018-05-08 | 努比亚技术有限公司 | A kind of modified method of message and mobile terminal, computer-readable recording medium |
| CN108009136B (en)* | 2017-10-31 | 2021-09-21 | 努比亚技术有限公司 | Message correction method, mobile terminal and computer readable storage medium |
| Publication number | Publication date |
|---|---|
| CN107291698B (en) | 2020-08-04 |
| Publication | Publication Date | Title |
|---|---|---|
| CN108370347B (en) | Predictive response method and system for incoming communications | |
| US20170076181A1 (en) | Converting text strings into number strings, such as via a touchscreen input | |
| US10122839B1 (en) | Techniques for enhancing content on a mobile device | |
| WO2018039008A1 (en) | Providing ideogram translation | |
| US20130007606A1 (en) | Text deletion | |
| CN106484266A (en) | A text processing method and device | |
| US11429272B2 (en) | Multi-factor probabilistic model for evaluating user input | |
| CN107066188B (en) | A kind of method and terminal sending screenshot picture | |
| US20130346905A1 (en) | Targeted key press zones on an interactive display | |
| US20130191714A1 (en) | Fill by example animation and visuals | |
| KR102210238B1 (en) | Form processing | |
| US20200120048A1 (en) | System and method for transmitting a response in a messaging application | |
| CN109891374B (en) | Method and computing device for force-based interaction with digital agents | |
| US11811718B2 (en) | System and method for generating and rendering intent-based actionable content using input interface | |
| US20180314343A1 (en) | Text input system using evidence from corrections | |
| WO2018075191A1 (en) | Techniques for scheduling language models and character recognition models for handwriting inputs | |
| CN107391165A (en) | Control display methods, client and storage medium | |
| CN104363349A (en) | Short message processing method and portable terminal using same | |
| CN110427622A (en) | Appraisal procedure, device and the storage medium of corpus labeling | |
| CN108668241A (en) | Information reminding method, device, storage medium and electronic equipment | |
| US20170277419A1 (en) | Method and Electronic Device for Replying to a Message | |
| CN108460077B (en) | Index analysis method, system and computer readable storage medium | |
| CN107291698B (en) | Information correction method, information correction device, storage medium and electronic equipment | |
| US10514843B2 (en) | Method for displaying virtual keypad overlapping an application and electronic device | |
| CN106201017A (en) | A kind of input method and terminal |
| 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 | ||
| CB02 | Change of applicant information | ||
| CB02 | Change of applicant information | Address after:Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Applicant after:GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. Address before:Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Applicant before:GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. | |
| GR01 | Patent grant | ||
| GR01 | Patent grant |