CN107291698B - Information correction method, information correction device, storage medium and electronic equipment - Google Patents

Information correction method, information correction device, storage medium and electronic equipment Download PDF

Info

Publication number
CN107291698B
CN107291698B CN201710526231.XA CN201710526231A CN107291698B CN 107291698 B CN107291698 B CN 107291698B CN 201710526231 A CN201710526231 A CN 201710526231A CN 107291698 B CN107291698 B CN 107291698B
Authority
CN
China
Prior art keywords
characters
information
character
correct
chat
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
CN201710526231.XA
Other languages
Chinese (zh)
Other versions
CN107291698A (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201710526231.XA priority Critical patent/CN107291698B/en
Publication of CN107291698A publication Critical patent/CN107291698A/en
Application granted granted Critical
Publication of CN107291698B publication Critical patent/CN107291698B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/232Orthographic correction, e.g. spell checking or vowelisation

Abstract

The embodiment of the invention discloses an information correction method, an information correction device, a storage medium and electronic equipment. The method comprises the following steps: acquiring character information to be sent in an instant messaging application interactive interface, wherein the character information comprises a plurality of characters; detecting whether the character information contains error characters; if the character information is detected to contain wrong characters, chat record information of the instant messaging application is obtained; predicting the correct characters corresponding to the wrong characters according to the chatting record information; and correcting the error characters according to the correct characters. The embodiment of the invention can improve the accuracy of correcting the error characters.

Description

Information correction method, information correction device, storage medium and electronic equipment
Technical Field
The present invention relates to the field of communications technologies, and in particular, to an information correction method, an information correction apparatus, a storage medium, and an electronic device.
Background
With the higher and higher intelligent degree of the terminal, the tasks that the terminal can execute are more and more extensive. For example, the terminal may perform wrong word detection on the text message, and prompt the user to view the detected wrong word to remind the user that an error exists in the text message input by the user.
Disclosure of Invention
The embodiment of the invention provides an information correction method, an information correction device, a storage medium and electronic equipment, which can improve the accuracy of error word correction.
The embodiment of the invention provides a method, which comprises the following steps:
acquiring character information to be sent in an instant messaging application interactive interface, wherein the character information comprises a plurality of characters;
detecting whether the character information contains error characters or not;
if the character information is detected to contain wrong characters, chat record information of the instant messaging application is obtained;
predicting correct characters corresponding to the wrong characters according to the chatting record information;
and correcting the error characters according to the correct characters.
An embodiment of the present invention provides an apparatus, including:
the first acquisition module is used for acquiring character information to be sent in an instant messaging application interactive interface, wherein the character information comprises a plurality of characters;
the detection module is used for detecting whether the character information contains wrong characters or not;
the second obtaining module is used for obtaining the chat record information of the instant messaging application if the character information is detected to contain wrong characters;
the prediction module is used for predicting the correct characters corresponding to the wrong characters according to the chatting record information;
and the correcting module is used for correcting the error characters according to the correct characters.
An embodiment of the present invention provides a storage medium having a computer program stored thereon, which, when executed on a computer, causes the computer to execute an information correction method provided by an embodiment of the present invention.
The embodiment of the invention also provides electronic equipment which comprises a memory and a processor, wherein the processor is used for executing the information correction method provided by the embodiment of the invention by calling the computer program stored in the memory.
According to the information correction method, the information correction device, the storage medium and the electronic equipment provided by the embodiment of the invention, when a user uses the instant messaging application to carry out instant messaging, the terminal can obtain character information to be sent in an interactive interface of the instant messaging application, wherein the character information comprises a plurality of characters. Then, the terminal can detect whether the character information contains wrong words. If yes, the terminal can obtain the chat record information of the instant messaging application. Then, the terminal can predict the correct character corresponding to the wrong character according to the chat history information, and correct the wrong character according to the correct character. Therefore, the embodiment of the invention can improve the accuracy of correcting the error characters.
Drawings
The technical solution and the advantages of the present invention will be apparent from the following detailed description of the embodiments of the present invention with reference to the accompanying drawings.
Fig. 1 is a schematic diagram of interaction between a terminal and a server according to an embodiment of the present invention.
Fig. 2 is a schematic flow chart of an information correction method according to an embodiment of the present invention.
Fig. 3 is another schematic flow chart of the information correction method according to the embodiment of the present invention.
Fig. 4A to fig. 4E are schematic scene diagrams of an information correction method according to an embodiment of the present invention.
Fig. 5 is a schematic structural diagram of an information correction apparatus according to an embodiment of the present invention.
Fig. 6 is a schematic structural diagram of a mobile terminal according to an embodiment of the present invention.
Fig. 7 is another schematic structural diagram of a mobile terminal according to an embodiment of the present invention.
Detailed Description
Referring to the drawings, wherein like reference numbers refer to like elements, the principles of the present invention are illustrated as being implemented in a suitable computing environment. The following description is based on illustrated embodiments of the invention and should not be taken as limiting the invention with regard to other embodiments that are not detailed herein.
As will be described in detail below.
It is understood that the execution subject of the embodiment of the present invention may be a terminal device such as a smart phone or a tablet computer.
An instant messaging application may be installed on the terminal device. As shown in fig. 1, the user of the terminal can perform instant messaging with users of other terminals by means of the instant messaging application and the server thereof.
Referring to fig. 2, fig. 2 is a schematic flow chart of an information correction method according to an embodiment of the present invention, where the flow chart may include:
in step S101, character information to be sent in an instant messaging application interactive interface is obtained, where the character information includes a plurality of characters.
For example, as the degree of intelligence of the terminal increases, the tasks that the terminal can perform become more and more extensive. For example, the terminal may perform wrong word detection on the text information and prompt the user to view the detected wrong word to remind the user that an error exists in the text information input by the user. However, in the related art, the terminal cannot correct the detected erroneous word.
In step S101 of the embodiment of the present invention, for example, when a user uses an instant messaging application and a friend to perform instant messaging, a terminal may first obtain character information to be sent in an interactive interface of the instant messaging application, where the character information may include a plurality of characters.
In step S102, it is detected whether the character information includes an error word.
In step S103, if it is detected that the character information includes an error character, chat history information of the instant messaging application is acquired.
In step S104, the correct character corresponding to the incorrect character is predicted based on the chat history information.
For example, steps S102, S103, and S104 may include:
after the character information to be sent in the instant messaging application interactive interface is obtained, the terminal can detect whether the character information contains wrong characters.
If it is detected that the character information does not include the erroneous character, the terminal may perform another operation, i.e., step S106.
If the character information is detected to contain wrong characters, the terminal can acquire the chat record information of the instant messaging application.
Then, the terminal can predict the correct character corresponding to the incorrect character according to the chatting record information.
For example, the terminal predicts that the correct character corresponding to the incorrect character "attached" is "near" from the chat history information of the instant messaging application.
In step S105, the error character is corrected in accordance with the correct character.
For example, after determining the correct character corresponding to the incorrect character, the terminal may correct the incorrect character according to the correct character.
It will be appreciated that in instant messaging, users often type at a fast rate, and therefore the wrong text often exists in the message that the user sends to the opposite party. In some situations, these wrong words can easily cause misunderstanding of the other party.
In the embodiment of the invention, the terminal can detect the wrong characters of the character information to be sent in the instant messaging interactive interface, predict the correct characters corresponding to the wrong characters, and then correct the detected wrong characters according to the predicted correct characters. Therefore, the embodiment of the invention can reduce the error characters in the information sent by the terminal, thereby improving the accuracy of the information sent by the terminal.
Meanwhile, because strong context association exists between character information input by a user before and after instant messaging, the embodiment of the invention can predict the correct characters corresponding to the wrong characters according to the previous chat records after the wrong characters are detected, and correct the wrong characters according to the correct characters. In this way, the terminal can improve the accuracy of correction of the error word.
In the embodiment of the invention, the terminal can acquire the character information to be sent in the interactive interface of the instant messaging application, wherein the character information comprises a plurality of characters. Then, the terminal can detect whether the character information contains wrong words. If yes, the terminal can obtain the chat record information of the instant messaging application. Then, the terminal can predict the correct character corresponding to the wrong character according to the chat history information, and correct the wrong character according to the correct character. Therefore, the embodiment of the invention can improve the accuracy of the information sent by the terminal.
Referring to fig. 3, fig. 3 is another schematic flow chart of an information correction method according to an embodiment of the present invention, where the flow chart may include:
in step S201, the terminal obtains character information to be sent in the instant messaging application interactive interface, where the character information includes a plurality of characters.
For example, when the user uses the instant messaging application and the friend to perform instant messaging, the terminal may first obtain character information that is input by the user and that has not been sent out in the instant messaging application interactive interface, where the character information may include a plurality of characters.
After the character information to be sent is acquired, the terminal can detect whether the character information contains wrong characters.
In one embodiment, the terminal may detect whether the character information contains wrong words through a third-party application. For example, the third party application may be misword detection software embedded in an instant messaging application.
If it is detected that the character information does not include the erroneous character, the terminal may perform other operations.
If it is detected that the character information includes an erroneous character, the process proceeds to step S202.
In step S202, if it is detected that the character information includes an error word, the terminal obtains to-be-selected chat log information generated by the instant messaging application within a preset time range, and a generation time corresponding to each to-be-selected chat log information.
For example, the terminal detects that the character information to be sent in the instant messaging application interactive interface contains wrong characters. In this case, the terminal may obtain the chat history information generated by the instant messaging application within the preset time range, that is, the chat history information to be selected. It will be appreciated that the candidate chat log information is also the instant message previously sent by the user to the buddy and the received instant message (sent by the buddy).
In addition, the terminal can also obtain the generation time corresponding to each piece of chat record information to be selected.
For example, when it is detected that the character information to be sent in the instant messaging application interactive interface includes an error character, the terminal may obtain preset chat record information (to-be-selected chat record information) generated within 2 minutes or 3 minutes, and the generation time corresponding to each piece of to-be-selected chat record information.
For example, the chat history information to be selected, which is acquired by the terminal and generated in the last 2 minutes, includes A, B, C, D, E, F, where the generation time of a is latest; b was generated 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 is generation time earlier than D, but later than F; the generation time of F is the earliest.
In step S203, the terminal arranges the chat log information to be selected according to the sequence of the generation time from the last to the first, so as to obtain a sequence of the chat log information to be selected.
In step S204, the terminal determines the to-be-selected chat history information ranked in the preset ordinal of the sequence as the target chat history information.
For example, steps S203 and S204 may include:
after the information of the chat records to be selected and the generation time corresponding to each piece of the information of the chat records to be selected are obtained, the terminal can arrange all the information of the chat records to be selected according to the sequence of the generation time from the back to the first, so that a sequence related to the information of the chat records to be selected is obtained. That is, in the sequence, the one to be selected that is ranked first at the latest generation time and the one to be selected that is ranked last four at the earliest generation time in the sequence.
After obtaining the sequence of the information about the selected chat records, the terminal may determine the information about the selected chat records ranked in the preset ranking as the target chat record information.
For example, after obtaining the candidate chat log information A, B, C, D, E, F and their respective generation times, the terminal may arrange the six candidate chat log information in order of generation time from back to front to obtain a sequence. For example, because A was generated at the latest time; b was generated 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 is generation time earlier than D, but later than F; the generation time of F is the earliest. Thus, the resulting sequence was (A, B, C, D, E, F).
Then, the terminal may determine the candidate chat history information ranked in the preset first to third places in the sequence as the target chat history information. For example, the terminal determines that the target chat history information is A, B, C.
In step S205, the terminal extracts at least one keyword from the target chat history information.
In step S206, the terminal obtains the pinyin corresponding to the error word, and obtains a plurality of words to be selected according to the pinyin.
In step S207, the terminal selects a target word matching the keyword from the candidate words, and predicts the target word as a correct word corresponding to the incorrect word.
For example, steps S205, S206, and S207 may include:
after obtaining the target chat history information, the terminal may extract at least one keyword from the target chat history information.
Then, the terminal can obtain the pinyin corresponding to the previously detected wrong characters, and obtain a plurality of characters to be selected according to the pinyin. For example, in one embodiment, the pinyin for the plurality of candidate words and the error word are consistent. That is, the terminal can obtain a plurality of characters to be selected, the pinyin of which is consistent with the pinyin of the wrong character, according to the pinyin of the wrong character.
After obtaining the characters to be selected, the terminal may select one character, which is a target character, from the plurality of characters to be selected, where the character is matched with the keyword extracted in step S205. Then, the terminal can predict the target character as a correct character corresponding to the error character.
For example, the target chat history information C is "where we go to eat at night? "the target chat history information B is" Yes, you decide local bar ". "the target chat history information a is" how do we go to XX restaurant in the temple? ", the terminal may extract keywords from the three pieces of target chat history information. For example, the terminal may analyze and process the three pieces of chat history information through a certain learning algorithm, and extract keywords "evening", "dining", "car temple", and "XX restaurant".
For example, in step S201, the character information input by the user in the instant messaging application interactive interface is "ok, i am just about to go to work in the temple in the afternoon. "where the wrong text detected by the terminal is" append ". Then, the terminal may obtain the "appended" pinyin "fujin". Then, the terminal can obtain a plurality of characters to be selected according to the pinyin "fujin", and the pinyin of the characters to be selected is "fujin". For example, the candidate characters acquired by the terminal include "nearby", "Fujin", and "Fujin".
Then, the terminal can select a target character matched with the keywords of night, meal, vehicle temple and XX restaurant from the characters to be selected of 'nearby', 'Fujin' and 'Fujin'. For example, after matching the characters to be selected including "nearby", "rich", "good luck", and keywords "evening", "eating", "car temple", and "XX restaurant" one by one through a certain learning algorithm, the terminal detects that the character matching the keywords "car temple" and "XX restaurant" and having pinyin of "fujin" is "nearby". Then the terminal may determine "nearby" as the target word.
In step S208, the terminal corrects the incorrect character according to the correct character.
For example, after predicting the correct character, the terminal may correct the incorrect character according to the correct character.
For example, after determining the correct word "nearby," the terminal may correct the incorrect word "attach" in accordance with the correct word. That is, the character information input by the user is changed from' am, i just done in the temple in the afternoon. "modified" may be that i transacted in my morning right near the car temple. ".
For example, in one embodiment, the step of the terminal correcting the incorrect word according to the correct word in step S208 may include:
the terminal determines the position of the error character in the character information;
and according to the position, the terminal corrects the wrong characters by adopting the correct characters and highlights the correct characters.
For example, after determining the correct character, the terminal may determine the position of the incorrect character in the character information, and then the terminal may delete the correct character from the character information and insert the correct character at the original position of the incorrect character, thereby completing the correction of the correct character. The terminal can then highlight the correct text, thereby alerting the user that the terminal has corrected the incorrect text.
For example, after determining the correct word "nearby," the terminal may determine that the wrong word "attach to" in character information, "i transacted in the morning right in the afternoon. "position in. For example, the terminal determines that the wrong text "attach" to the character information "i am just attaching to work in the car temple in the afternoon. "the positions of words 13 and 14.
Then, the terminal can attach the error word "attach" to the slave character information, i just attach to work in the car temple in the afternoon. The correct characters are deleted and the characters near the correct characters are inserted into the character information after the wrong characters are deleted, and I transact in the temple in the afternoon. "position of 13 th and 14 th characters, corrected character information" may be obtained, i transact work right in the vicinity of the car temple in the afternoon. ".
It can be understood that when the character information is changed from "ok, i am just before the registration in the temple in the afternoon. The 'correction is' enough, i transact work just near the car temple in the afternoon. And then, the accuracy of the information sent by the terminal is improved.
In one implementation, after detecting that a punctuation mark or a space mark is input by a user, the embodiment of the present invention may acquire character information that is input before the punctuation mark or the space mark and has not been detected by an erroneous character, and detect whether the character information includes the erroneous character.
For example, if the user inputs a first sentence "xxxxxx," on the instant messaging application interactive interface, when it is detected that the user inputs a first punctuation mark, "and then, the terminal may acquire character information" xxxxxx "input before the first comma, and detect whether error text is included in the character information" xxxxxx ". Next, the user enters a second sentence "". Then, when the terminal detects that the user inputs the second comma, the terminal may acquire character information "× × entered before the second comma and not detected by the erroneous text, and detect whether the erroneous text is included therein.
In one embodiment, after the user sees the highlighted correct text, if the terminal is not authorized to correct the incorrect text with the correct text, the terminal may also click on the highlighted correct text, thereby triggering the terminal to revert to the previous text, i.e., undo the correction of the incorrect text.
Referring to fig. 4A to 4E, fig. 4A to 4E are schematic views of a scene of an information correction method according to an embodiment of the present invention.
For example, as shown in fig. 4A, the user is performing instant messaging with a friend leaflet, and the character "may be entered in the instant messaging application interaction interface, i just go to work in the car temple in the afternoon. ", but this message has not yet been sent out.
The terminal can acquire the characters to be sent, and I just go into work in the car temple in the afternoon. ", and detecting whether error text is contained therein. For example, the terminal detects that the error word "attach" is included therein.
In this case, the terminal may obtain the to-be-selected chat log information generated within preset 2 minutes, and the generation time corresponding to each to-be-selected chat log information. For example, the chat history information to be selected, which is acquired by the terminal and generated in the last 2 minutes, includes A, B, C, D, E, F, where the generation time of a is latest; b was generated 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 is generation time earlier than D, but later than F; the generation time of F is the earliest.
After obtaining the candidate chat history information A, B, C, D, E, F and their respective generation times, the terminal may arrange the six candidate chat history information in order of generation time from back to front to obtain a sequence. For example, because A was generated at the latest time; b was generated 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 is generation time earlier than D, but later than F; the generation time of F is the earliest. Thus, the resulting sequence was (A, B, C, D, E, F).
The terminal may determine the candidate chat history information ranked in the preset first to third digits in the sequence as the target chat history information. For example, the terminal determines that the target chat history information is A, B, C.
For example, as shown in fig. 4B, the target chat history information C is "where we go to eat at night? "the target chat history information B is" Yes, you decide local bar ". "the target chat history information a is" how do we go to XX restaurant in the temple? ", the terminal may extract keywords from the three pieces of target chat history information. For example, the terminal may analyze and process the three pieces of chat history information through a certain learning algorithm, and extract keywords "evening", "dining", "car temple", and "XX restaurant".
Then, the terminal can acquire the pinyin fujin of the wrong word "appended". Then, the terminal can obtain a plurality of characters to be selected according to the pinyin "fujin", and the pinyin of the characters to be selected is "fujin". For example, the candidate characters acquired by the terminal include "nearby", "Fujin", and "Fujin".
Then, the terminal can select a target character matched with the keywords of night, meal, vehicle temple and XX restaurant from the characters to be selected of 'nearby', 'Fujin' and 'Fujin'. For example, after matching the characters to be selected including "nearby", "rich", "good luck", and keywords "evening", "eating", "car temple", and "XX restaurant" one by one through a certain learning algorithm, the terminal detects that the character matching the keywords "car temple" and "XX restaurant" and having pinyin of "fujin" is "nearby". Then, the terminal may determine "nearby" as the target word and predict the target word "nearby" as the correct word corresponding to the wrong word "appended".
After predicting the correct word "nearby", the terminal may correct the incorrect word "attach" according to the correct word. That is, the character information input by the user is changed from' am, i just done in the temple in the afternoon. "modified" may be that i transacted in my morning right near the car temple. ", as shown in fig. 4C.
Thereafter, as shown in FIG. 4D, the user clicks the "send" button to send the message. After sending out the information, the interactive interface of the instant messaging application of the terminal may be as shown in fig. 4E.
Referring to fig. 5, fig. 5 is a schematic structural diagram of an information correction apparatus according to 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.
The first obtaining module 301 is configured to obtain character information to be sent in an instant messaging application interactive interface, where the character information includes a plurality of characters.
For example, when the user uses the instant messaging application and a friend to perform instant messaging, the first obtaining module 301 may first obtain character information to be sent, which is input by the user in the instant messaging application interactive interface. A plurality of letters may be included in the character information.
The detecting module 302 is configured to detect whether the character information includes an error word.
For example, after the first obtaining module 301 obtains the character information to be sent in the instant messaging application interactive interface, the detecting module 302 may detect whether the character information contains error words.
If it is detected that the character information does not include the erroneous character, the terminal may perform other operations.
A second obtaining module 303, configured to obtain chat record information of the instant messaging application if it is detected that the character information includes an error word.
And the prediction module 304 is configured to predict, according to the chat history information, a correct character corresponding to the incorrect character.
For example, if the detection module 302 detects that the character information to be sent in the instant messaging interactive interface includes an error word, the second obtaining module 303 may obtain the chat history information of the instant messaging application.
Then, the prediction module 304 can predict the correct text corresponding to the incorrect text according to the chat history information.
For example, the prediction module 304 predicts that the correct word corresponding to the incorrect word "append" is "nearby".
And a correcting module 305, configured to correct the incorrect word according to the correct word.
For example, after predicting the correct word corresponding to the incorrect word, the correction module 305 may correct the incorrect word according to the correct word.
In one embodiment, the prediction module 304 may be configured to:
at least one keyword is extracted from the chat history information.
And acquiring pinyin corresponding to the wrong characters, and acquiring a plurality of characters to be selected according to the pinyin.
And selecting target characters matched with the keywords from the characters to be selected, and predicting the target characters as correct characters corresponding to the wrong characters.
For example, after the second obtaining module 303 obtains the chat history information of the instant messaging application, the predicting module 304 may extract at least one keyword from the chat history information. Then, the prediction module 304 may obtain the pinyin corresponding to the error word, obtain a plurality of candidate words according to the pinyin, select a target word matching the keyword from the plurality of candidate words, and predict the target word as a correct word corresponding to the error word.
In one embodiment, the modification module 305 may be configured to:
determining the position of the error word in the character information;
and correcting the error characters by adopting the correct characters according to the positions, and highlighting the correct characters.
For example, after predicting the correct word, the correcting module 305 may determine the position of the incorrect word in the character information, and then the correcting module 305 may delete the incorrect word from the character information and insert the corresponding correct word into the original position of the incorrect word, thereby completing the correction of the incorrect word. The terminal may then highlight the correct text, thereby alerting the user that the terminal has corrected the detected incorrect text.
For example, after predicting the correct word "nearby," the correction module 305 may determine that the incorrect word "attach" to the character information "i am working in the immediate vicinity of the car temple in the afternoon. "position in. For example, the correction module 305 determines that the error word "attach" to the character information "may be that i have just attached to the office in the temple in the afternoon. "the positions of words 13 and 14.
The correction module 305 may then attach the error word "attach" from the character information "i am just attaching to work in the temple in the afternoon. The correct characters are deleted and the characters near the correct characters are inserted into the character information after the wrong characters are deleted, and I transact in the temple in the afternoon. "position of 13 th and 14 th characters, corrected character information" may be obtained, i transact work right in the vicinity of the car temple in the afternoon. ".
In one embodiment, the second obtaining module 303 may be configured to:
and obtaining the to-be-selected chat record information generated in the instant messaging application within a preset time range and the generation time corresponding to each to-be-selected chat record information.
And selecting target chat record information from the to-be-selected chat record information according to the generation time corresponding to each to-be-selected chat record information.
Then, the prediction module 304 may be configured to: and predicting the correct characters corresponding to the wrong characters according to the target chat record information.
For example, the second obtaining module 303 may obtain the to-be-selected chat record information generated by the instant messaging application within 2 minutes or 3 minutes preset, and the generation time corresponding to each to-be-selected chat record information.
Then, the second obtaining module 303 may select the target chat history information from all the to-be-selected chat history information according to the generation time corresponding to each to-be-selected chat history information.
Then, after obtaining the target chat history information, the prediction module 304 may predict the correct text corresponding to the incorrect text according to the target chat history information.
For example, in one embodiment, the second obtaining module 303 may be configured to:
and arranging the chatting record information to be selected according to the sequence of the generation time from the back to the first to obtain a sequence of the chatting record information to be selected.
And determining the to-be-selected chat record information arranged in the preset sequence position of the sequence as target chat record information.
For example, after obtaining the candidate chat history information A, B, C, D, E, F and the respective generation times thereof, the second obtaining module 303 may arrange the six candidate chat history information in order from the generation time to the generation time, so as to obtain a sequence. For example, because A was generated at the latest time; b was generated 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 is generation time earlier than D, but later than F; the generation time of F is the earliest. Thus, the resulting sequence was (A, B, C, D, E, F).
Then, the second obtaining module 303 may determine the candidate chat history information ranked in the preset first to third places in the sequence as the target chat history information. For example, the target chat history information determined by the second obtaining module 303 is A, B, C.
Embodiments of the present invention provide a computer-readable storage medium on which a computer program is stored, which, when executed on a computer, causes the computer to perform an information correction method as provided by embodiments of the present invention.
The embodiment of the invention also provides electronic equipment which comprises a memory and a processor, wherein the processor is used for executing the information correction method provided by the embodiment of the invention by calling the computer program stored in the memory.
For example, the electronic device may be a mobile terminal such as a tablet computer or a smart phone. Referring to fig. 6, fig. 6 is a schematic structural diagram of a mobile terminal according to an embodiment of the present invention.
The mobile terminal 400 may include a communication unit 401, memory 402, processor 403, and the like. Those skilled in the art will appreciate that the mobile terminal architecture shown in fig. 6 is not intended to be limiting of mobile terminals and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The communication unit 401 may be used for transmitting and receiving information, or receiving and transmitting signals during a call, for example, receiving downlink information and then delivering the received downlink information to one or more processors 403 for processing; in addition, data relating to the uplink is transmitted.
The memory 402 may be used to store applications and data. The memory 402 stores applications containing executable code. The application programs may constitute various functional modules. The processor 403 executes various functional applications and data processing by running an application program stored in the memory 402.
The processor 403 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by running or executing an application program stored in the memory 402 and calling data stored in the memory 402, thereby performing overall monitoring of the mobile terminal.
In the present embodiment, the processor 403 is configured to execute the following steps by calling the computer program stored in the memory 402:
the processor 403 obtains character information to be sent in the instant messaging application interactive interface, where the character information includes a plurality of characters.
The processor 403 detects whether the character information contains error words.
If it is detected that the character information contains wrong characters, the processor 403 obtains chat record information of the instant messaging application.
Based on the chat history information, processor 403 predicts the correct text corresponding to the incorrect text.
The processor 403 corrects the erroneous word according to the correct word.
Referring to fig. 7, in another embodiment, 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.
The communication unit 501 may be used for transmitting and receiving information, or receiving and transmitting signals during a call, for example, receiving downlink information and then delivering the received downlink information to one or more processors 503 for processing; in addition, data relating to the uplink is transmitted.
The memory 502 may be used to store applications and data. Memory 502 stores applications containing executable code. The application programs may constitute various functional modules. The processor 503 executes various functional applications and data processing by running an application program stored in the memory 502.
The processor 503 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by running or executing an application program stored in the memory 502 and calling data stored in the memory 502, thereby performing overall monitoring of the mobile terminal.
The input unit 504 may be used to receive input numbers, character information, or user characteristic information (such as a fingerprint), and to generate keyboard, mouse, joystick, optical, or trackball signal inputs 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. Touch sensitive surfaces, also known as touch display screens or touch pads.
The output unit 505 may be used to display information input by or provided to a user and various graphic user interfaces of the mobile terminal, which may be configured by graphics, text, icons, video, and any combination thereof. The output unit may include a display panel.
In this embodiment, the processor 503 is configured to execute the following steps by calling a computer program stored in the memory 502:
the processor 503 obtains character information to be sent in an instant messaging application interactive interface, where the character information includes a plurality of characters.
The processor 503 detects whether the character information contains error words.
If it is detected that the character information contains wrong characters, the processor 503 obtains the chat history information of the instant messaging application.
Based on the chat history information, the processor 503 predicts the correct text corresponding to the incorrect text.
The processor 503 corrects the erroneous word according to the correct word.
In one embodiment, when the processor 503 executes the step of predicting the correct text corresponding to the incorrect text according to the chat history information, it may execute: the processor 503 extracts at least one keyword from the chat history information. The processor 503 obtains the pinyin corresponding to the incorrect word, and obtains a plurality of words to be selected according to the pinyin. From the candidate characters, the processor 503 selects a target character matched with the keyword, and predicts the target character as a correct character corresponding to the incorrect character.
In one embodiment, when the processor 503 executes the step of correcting the error word according to the correct word, it may execute: the processor 503 determines the position of the erroneous text in the character information. According to the position, the processor 503 corrects the incorrect word with the correct word and highlights the correct word.
In one embodiment, 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 to-be-selected chat log information generated within the preset time range of the instant messaging application, and the generation time corresponding to each to-be-selected chat log information. The processor 503 selects the target chat history information from the to-be-selected chat history information according to the generation time corresponding to each to-be-selected chat history information.
Then, when the processor 503 executes the step of predicting the correct text corresponding to the incorrect text according to the chat history information, it may execute: based on the target chat history information, the processor 503 predicts the correct text corresponding to the incorrect text.
In one embodiment, when the processor 503 executes the step of selecting the target chat history information from the candidate chat history information according to the generation time corresponding to each piece of chat history information, it may execute: and arranging the chatting record information to be selected according to the sequence of the generation time from the back to the first to obtain a sequence of the chatting record information to be selected. And determining the to-be-selected chat record information arranged in the preset sequence position of the sequence as target chat record information.
In the above embodiments, the descriptions of the embodiments have respective emphasis, and parts that are not described in detail in a certain embodiment may refer to the above detailed description of the information correction method, and are not described herein again.
The information correction device provided in the embodiment of the present invention and the information correction method in the above embodiment belong to the same concept, and any method provided in the embodiment of the information correction method may be operated on the information correction device, and a specific implementation process thereof is described in detail in the embodiment of the information correction method, and is not described herein again.
It should be noted that, for the information correction method according to the embodiment of the present invention, it can be understood by those skilled in the art that all or part of the process of implementing the information correction method according to the embodiment of the present invention can be completed by controlling the relevant hardware through a computer program, where the computer program can be stored in a computer-readable storage medium, such as a memory, and executed by at least one processor, and during the execution, the process of implementing the information correction method according to the embodiment of the present invention can be included. The storage medium may be a magnetic disk, an optical disk, a Read Only Memory (ROM), a Random Access Memory (RAM), or the like.
In the information correction apparatus according to the embodiment of the present invention, each functional module may be integrated into one processing chip, or each module may exist alone physically, or two or more modules may be integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium, such as a read-only memory, a magnetic or optical disk, or the like.
The above detailed description is provided for an information modification method, an information modification apparatus, a storage medium, and an electronic device according to embodiments of the present invention, and a specific example is applied in the present disclosure to explain the principle and the implementation of the present invention, and the description of the above embodiments is only used to help understanding the method and the core idea of the present invention; meanwhile, for those skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (8)

1. An information correction method, characterized in that the method comprises:
acquiring character information to be sent in an instant messaging application interactive interface, wherein the character information comprises a plurality of characters;
detecting whether the character information contains error characters or not;
if the character information is detected to contain wrong characters, chat record information of the instant messaging application is obtained;
predicting the correct characters corresponding to the wrong characters according to the chat record information, wherein the prediction comprises the following steps: extracting at least one keyword from the chat history information; obtaining pinyin corresponding to the error characters, and obtaining a plurality of characters to be selected according to the pinyin; selecting target characters matched with the keywords from the characters to be selected, and predicting the target characters as correct characters corresponding to the wrong characters;
and correcting the error characters according to the correct characters.
2. The information correction method according to claim 1, wherein said correcting the erroneous character according to the correct character includes:
determining the position of the error word in the character information;
and correcting the error characters by adopting the correct characters according to the positions, and highlighting the correct characters.
3. The information correction method according to claim 1, wherein the acquiring of the chat history information of the instant messaging application comprises:
obtaining to-be-selected chat record information generated within a preset time range of the instant messaging application and generation time corresponding to each to-be-selected chat record information;
selecting target chat record information from the to-be-selected chat record information according to the corresponding generation time of each to-be-selected chat record information;
the predicting the correct characters corresponding to the wrong characters according to the chat record information comprises: and predicting the correct characters corresponding to the wrong characters according to the target chat record information.
4. The information correction method according to claim 3, wherein the selecting target chat history information from the to-be-selected chat history information according to the generation time corresponding to each to-be-selected chat history information includes:
arranging the chat record information to be selected according to the sequence of the generation time from the back to the first to obtain a sequence of the chat record information to be selected;
and determining the to-be-selected chat record information arranged in the preset sequence position of the sequence as target chat record information.
5. An information correction apparatus, characterized in that the apparatus comprises:
the first acquisition module is used for acquiring character information to be sent in an instant messaging application interactive interface, wherein the character information comprises a plurality of characters;
the detection module is used for detecting whether the character information contains wrong characters or not;
the second obtaining module is used for obtaining the chat record information of the instant messaging application if the character information is detected to contain wrong characters;
a prediction module, configured to predict, according to the chat history information, a correct character corresponding to the incorrect character, where the prediction module includes: extracting at least one keyword from the chat history information; obtaining pinyin corresponding to the error characters, and obtaining a plurality of characters to be selected according to the pinyin; selecting target characters matched with the keywords from the characters to be selected, and predicting the target characters as correct characters corresponding to the wrong characters;
and the correcting module is used for correcting the error characters according to the correct characters.
6. The information correction apparatus according to claim 5, wherein the correction module is configured to:
determining the position of the error word in the character information;
and correcting the error characters by adopting the correct characters according to the positions, and highlighting the correct characters.
7. A storage medium having stored thereon a computer program, characterized in that when the computer program is executed on a computer, it causes the computer to execute an information correction method according to any one of claims 1 to 4.
8. An electronic device comprising a memory, a processor, wherein the processor is configured to execute the information correction method according to any one of claims 1 to 4 by calling a computer program stored in the memory.
CN201710526231.XA 2017-06-30 2017-06-30 Information correction method, information correction device, storage medium and electronic equipment Active CN107291698B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710526231.XA CN107291698B (en) 2017-06-30 2017-06-30 Information correction method, information correction device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710526231.XA CN107291698B (en) 2017-06-30 2017-06-30 Information correction method, information correction device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN107291698A CN107291698A (en) 2017-10-24
CN107291698B true CN107291698B (en) 2020-08-04

Family

ID=60098448

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710526231.XA Active CN107291698B (en) 2017-06-30 2017-06-30 Information correction method, information correction device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN107291698B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108009136B (en) * 2017-10-31 2021-09-21 努比亚技术有限公司 Message correction method, mobile terminal and computer readable storage medium

Family Cites Families (9)

* Cited by examiner, † Cited by third party
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
KR101332757B1 (en) * 2013-05-16 2013-11-25 주식회사 큐키 Type correction method for word or letters without deletion input and device for implementing the method
KR20150005354A (en) * 2013-07-05 2015-01-14 삼성전자주식회사 Method for inputting characters in electronic device
CN104036047B (en) * 2014-07-02 2017-05-17 上海携程商务有限公司 Method and system for automatically correcting character strings
US10101822B2 (en) * 2015-06-05 2018-10-16 Apple Inc. Language input correction
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

Also Published As

Publication number Publication date
CN107291698A (en) 2017-10-24

Similar Documents

Publication Publication Date Title
US10140014B2 (en) Method and terminal for activating application based on handwriting input
TW201804372A (en) QR-code identification method and device, and mobile terminal
CN104808983B (en) A kind of method for pushing and server of application program
CN106383721B (en) Display control method and device of electronic equipment and electronic equipment
CN105389173B (en) Interface switching display method and device based on long connection task
KR20180004552A (en) Method for controlling user interface according to handwriting input and electronic device for the same
CN106470110B (en) Method and device for sending messages to multiple users in user list in group mode
CN104077014A (en) Information processing method and equipment
CN115174733A (en) Interface display method, device and equipment
CN105068726B (en) Information processing method and terminal
US20180268515A1 (en) Information processing method and client
CN107066188A (en) A kind of method and terminal for sending screenshot picture
JP2020181584A (en) System and method for transmitting response in messaging application
CN110022399B (en) Message display method and device, user terminal and readable storage medium
CN108668241B (en) Information reminding method and device, storage medium and electronic equipment
CN104537051A (en) Terminal and searching method based on touch operation
CN113127432A (en) Operation execution method, device, electronic equipment and medium
CN113992615B (en) Method and device for displaying withdrawal message, electronic equipment and storage medium
CN109521889B (en) Input method and device, terminal and storage medium
CN105246057A (en) Short message processing method and user terminal
CN107291698B (en) Information correction method, information correction device, storage medium and electronic equipment
CN107977127B (en) Method, device and terminal for updating page
KR20170060148A (en) Information processing method and device
CN116126197A (en) Application program recommendation method
CN114416264A (en) Message display method and device

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
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