WO2022233275A1 - Input correction method and apparatus - Google Patents

Input correction method and apparatus Download PDF

Info

Publication number
WO2022233275A1
WO2022233275A1 PCT/CN2022/090305 CN2022090305W WO2022233275A1 WO 2022233275 A1 WO2022233275 A1 WO 2022233275A1 CN 2022090305 W CN2022090305 W CN 2022090305W WO 2022233275 A1 WO2022233275 A1 WO 2022233275A1
Authority
WO
WIPO (PCT)
Prior art keywords
character string
input
corrected
user
string
Prior art date
Application number
PCT/CN2022/090305
Other languages
French (fr)
Chinese (zh)
Inventor
陈虎
沈松杰
Original Assignee
维沃移动通信(杭州)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 维沃移动通信(杭州)有限公司 filed Critical 维沃移动通信(杭州)有限公司
Publication of WO2022233275A1 publication Critical patent/WO2022233275A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/02Input arrangements using manually operated switches, e.g. using keyboards or dials
    • G06F3/023Arrangements for converting discrete items of information into a coded form, e.g. arrangements for interpreting keyboard generated codes as alphanumeric codes, operand codes or instruction codes
    • G06F3/0233Character input methods
    • 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

Definitions

  • the present application belongs to the field of communication technologies, and in particular relates to an input correction method and device.
  • the purpose of the embodiments of the present application is to provide an input correction method and device, which can solve the problem that character correction takes a long time in the input process.
  • an input correction method comprising:
  • the second character string is included in the first character string
  • a third character string input by the user is received, at least one character string associated with the second character string in the first character string
  • the string to be corrected is marked;
  • the target character string to be corrected in the at least one character string to be corrected is replaced with the third character string.
  • an input correction device comprising:
  • a first receiving module configured to receive the second character string input by the user when the first character string has been input in the current input method interface
  • the first marking module is configured to, in the case that the first character string includes the second character string, if a third character string input by the user is received, compare the first character string with the third character string. Mark at least one string to be corrected associated with the two strings;
  • a replacement module configured to replace the target character string to be corrected in the at least one character string to be corrected with the third character string.
  • embodiments of the present application provide an electronic device, the electronic device includes a processor, a memory, and a program or instruction stored on the memory and executable on the processor, the program or instruction being The processor implements the steps of the method according to the first aspect when executed.
  • an embodiment of the present application provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or instruction is executed by a processor, the steps of the method according to the first aspect are implemented .
  • an embodiment of the present application provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction, and implement the first aspect the method described.
  • embodiments of the present application provide a computer program product, wherein the computer program product is stored in a non-transitory storage medium, and the computer program product is executed by at least one processor to implement the first aspect the steps of the method.
  • an embodiment of the present application provides a communication device configured to perform the steps of the method described in the first aspect.
  • the second character string input by the user in the case that the first character string has been input in the current input method interface, the second character string input by the user can be received, and in the case that the second character string is included in the first character string, If the third character string input by the user is received, at least one character string to be corrected associated with the second character string in the first character string can be marked for correction, and then at least one character string to be corrected in the at least one character string to be corrected can be marked.
  • the target string to be corrected is replaced with the third string.
  • the user can continue to input the corrected third character string, and subsequently mark at least one character string to be corrected, and the at least one character string to be corrected
  • the target string to be corrected can be replaced with a third string to realize input correction. It is not necessary to move the cursor to the position of the string to be corrected to delete one by one, and then re-enter the correct string, which can reduce the time-consuming of character correction during the input process. , to improve the user experience.
  • Fig. 1 is one of the flow charts of the input correction method provided by the embodiment of the present application.
  • Fig. 2 is the second flow chart of the input correction method provided by the embodiment of the present application.
  • 3 is one of the display interfaces of the electronic device provided by the embodiment of the present application.
  • FIG. 4 is the second display interface of the electronic device provided by the embodiment of the present application.
  • FIG. 5 is the third display interface of the electronic device provided by the embodiment of the present application.
  • FIG. 6 is the fourth display interface of the electronic device provided by the embodiment of the present application.
  • FIG. 7 is a schematic diagram of an input correction device provided by an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • FIG. 9 is a schematic diagram of a hardware structure of an electronic device provided by an embodiment of the present application.
  • first, second and the like in the description and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It is to be understood that the data so used are interchangeable under appropriate circumstances so that the embodiments of the present application can be practiced in sequences other than those illustrated or described herein, and distinguish between “first”, “second”, etc.
  • the objects are usually of one type, and the number of objects is not limited.
  • the first object may be one or more than one.
  • “and/or” in the description and claims indicates at least one of the connected objects, and the character “/" generally indicates that the associated objects are in an "or” relationship.
  • the present application provides an input correction method according to an embodiment, and the method includes:
  • Step 101 In the case that the first character string has been input in the current input method interface, receive the second character string input by the user.
  • the user can input content through an input method such as the Pinyin input method.
  • the text matched according to the pinyin is displayed.
  • the user can select the desired text from the matched text to realize text input and so on.
  • the user in the current input method interface, the user has input the first character string, but there may be wrong characters in the first character string due to misinput in the inputted first character string, and it is necessary to correct the input
  • the user can input a second character string based on the first character string.
  • the second character string is the last character in the first character string.
  • the first character string and the second character string each include at least one character.
  • the pinyin input method is used for input, the character strings in the embodiments of the present application are all pinyin character strings.
  • Step 102 In the case where the first character string includes the second character string, if the third character string input by the user is received, perform at least one character string to be corrected associated with the second character string in the first character string. mark.
  • the second character string After receiving the second character string input by the user, the second character string can be compared with the inputted first character string to determine whether the first character string includes the second character string. It should be noted that the first character string is determined here. In the process of whether the character string includes the second character string, the second character string is detected as a whole in the first character string.
  • the second character string is included in the first character string, it means that the second character string has been input.
  • the correction mode can be entered. If the third character string (including at least one character) input by the user is subsequently accepted, The third string can be used as a replacement string, which can be used to replace the string that needs to be corrected.
  • the third character string input by the user is received, at least one character to be corrected associated with the second character string in the first character string can be checked.
  • the first character string may include at least one second character string, and there may be more than one character string to be corrected associated with the second character string in the first character string.
  • At least one string to be corrected associated with the two strings is marked. It can be understood that the correctable character string in the first character string is associated with the second character string in the first character string, that is, at least one correctable character string in the first character string can be determined through the second character string Strings to be corrected, any string to be corrected includes at least one character.
  • Step 103 Replace the target character string to be corrected in the at least one character string to be corrected with a third character string.
  • correction can be performed, and the target character string to be corrected in the at least one character string to be corrected is replaced with a third character string, so as to correct the target character string to be corrected in the first character string is the third string, that is, to realize input correction.
  • the second character string input by the user in the case that the first character string has been input in the current input method interface, the second character string input by the user can be received, and in the case that the second character string is included in the first character string, If the third character string input by the user is received, at least one character string to be corrected associated with the second character string in the first character string can be marked for correction, and then at least one character string to be corrected in the at least one character string to be corrected can be marked.
  • the target string to be corrected is replaced with the third string.
  • the user can continue to input the corrected third character string, and subsequently mark at least one character string to be corrected, and the at least one character string to be corrected
  • the target string to be corrected can be replaced with a third string to realize input correction. It is not necessary to move the cursor to the position of the string to be corrected to delete one by one, and then re-enter the correct string, which can reduce the time-consuming of character correction during the input process. , to improve the user experience.
  • the method after receiving the second character string input by the user, the method further includes:
  • the method further includes:
  • the text information corresponding to the second character string is deleted from the first text information.
  • the first text information includes the text information corresponding to the first character string and the text information corresponding to the second character string.
  • the text information corresponding to the first character string can be displayed, and the second character string can also be displayed after inputting the second character string.
  • the text information corresponding to the two character strings can display the first character information corresponding to the first character string and the second character string. In this way, it is convenient for the user to view the text information corresponding to the character string and to find input errors.
  • text information corresponding to the third character string may be displayed on the input method interface, and after replacing the target character string to be corrected in the at least one character string to be corrected with the third character string, the text information corresponding to the third character string may be displayed on the input method interface.
  • the text information corresponding to the third character string in the input method interface is deleted, that is, the text information corresponding to the third character string is not displayed, so as not to occupy the display space of the input method interface.
  • the inputted second character string is used for correction prompt or correction trigger, not normal input.
  • the text information corresponding to the second character string in the first text information can be deleted to reduce the misleading of the text information to the user, and prevent the user from checking the text information of the second character string to determine whether the input is correct or not. error, improve the accuracy of input, and at the same time, the input method interface can have more display space to display other content.
  • the first character string and the second character string are characters input in the input box of the input method interface, and after receiving the second character string input by the user, the method further includes:
  • the text information corresponding to the first character string is displayed on the input method interface, wherein the text information corresponding to the second character string is not displayed.
  • the second character string after receiving the first character string, if the second character string satisfies the preset condition, it can be understood that the second character string satisfies the condition for the correction prompt or correction trigger function, and the text of the second character string is not required.
  • the text information corresponding to the first character string can be displayed in the input method interface, and the text information corresponding to the second character string is not displayed, so as to avoid occupying the display space of the input method interface and facilitate the user to view other input contents.
  • the foregoing preset conditions may include, but are not limited to, at least one of the following:
  • the input time interval between characters in the second character string is greater than the third preset time period.
  • the target character string to be corrected in at least one character string to be corrected is replaced with a third character string, including:
  • the target string to be corrected in the at least one string to be corrected is replaced with a third string , where the target time is the input end time of the third string.
  • a character string to be corrected can be selected from at least one character string to be corrected.
  • the first input is performed on the mark of the character string to be corrected, and the target character string to be corrected in at least one character string to be corrected is replaced with a third character string to realize input correction.
  • the method when the first character string includes the second character string, the method further includes:
  • the mark of the character string to be corrected may be deleted, and the mark of the second character string may also be deleted.
  • At least one character string to be corrected includes:
  • At least one character string in the first character string that is associated with the position of the second character string and matches the similarity of the third character string.
  • the positional association may include positional proximity, may be after the second string position or before the second string position, etc.
  • the similarity between two strings can be determined by two characters.
  • the number of identical characters between strings is divided by the number of characters in any one of the two strings, and the similarity with the third string can be understood as the same as the number of characters in the third string and the same as the third string.
  • the number of difference characters between them is less than the first preset number.
  • the first preset number can be selected as 2 and so on.
  • the character position order it is compared with each character of the third string to see if it is the same, that is, the characters in the same position are compared.
  • the third string is "guai", which is to be compared.
  • the string is "huai”, the characters in the first position are g and h respectively, and the result is different.
  • the characters in the second position are u and u, respectively, and the result is the same, the third position is the same.
  • the characters are a and a, and the result is the same.
  • the characters in the fourth position are i and i, respectively, and the result is the same, that is, the number of characters with a difference is 1.
  • the number of the first character string can be at least one, and for the target second character string (any second character string) in at least one second character string, if the character string associated with the position of the target second character string is , does not match the third string, the mark of the target second string can be deleted.
  • marking at least one character string to be corrected associated with the second character string in the first character string includes at least one of the following:
  • At least one character string to be corrected is marked by the mark button, and the mark button is located in the display area of the character string to be corrected in the input box of the input method interface.
  • the number of the first marking patterns may be the same as the number of character strings to be corrected, each character string to be corrected corresponds to a first marking pattern, and one character string to be corrected is located in a corresponding first marking pattern.
  • the first mark graphic may be a mark frame, such as an oval frame, a rectangular frame, a circular frame, a polygonal frame, and the like.
  • the colors of the color highlight marks of at least one character string to be corrected may be the same or different.
  • a mark button can also be displayed in the display area of the character string to be corrected in the input box of the input method interface, and the mark button can be used to realize at least one character to be corrected. Strings are marked.
  • the above-mentioned first input may be an input to a mark button, for example, a click input or the like.
  • the process of the above input correction method will be described in detail below with a specific embodiment.
  • the embodiment of the present application provides a text input solution based on intelligent matching for fast correction of misspellings without interruption.
  • the input process by re-entering the previous string of the misspelled string and the correct spelling of the string, intelligently match and mark the corresponding input, and click the corresponding mark to realize quick replacement and correction.
  • the process of entering the correction method is as follows:
  • Step 201 In a user chatting scenario or other scenarios, use the Pinyin input method to input a first character string on the current input method interface, and display the text information corresponding to the first character string.
  • Step 202 The user independently judges whether there is a part of the wrong pinyin spelling input in the first character string, if there is, then go to step 203, otherwise go to step 209 directly.
  • Step 203 The user does not need to click to move the cursor to the wrong pinyin input position when judging that there is a wrong pinyin input, and only needs to input the previous pinyin string of the wrong pinyin spelling, such as inputting "tashinajiagongsideyeshiguairen" in the input interface 210 as planned, and the result is input as "tashinajiagongsideyeshihuairen", as shown in Figure 3, that is, "guai” is wrongly input "huai", the user does not need to move the cursor, just continue to input the previous string "shi” (that is, corresponding to the second string), As shown in Figure 4.
  • Step 204 The system will automatically match all strings in the currently inputted first string that are the same as the re-input pinyin spelling, that is, the second string, and mark them with color highlighting.
  • the system can enter the correction mode, and the steps For example, 203 will highlight the color of "shi" of "shihuairen” and “shi” of "shinajia", as shown in Figure 4.
  • Step 205 Continue to input the correct pinyin spelling. Taking step 204 as an example, continue to input "guairen", which corresponds to the third character string, as shown in FIG. 5 .
  • Step 206 The system continues to perform similarity checking according to the third character string input by re-pinyin spelling and the character string associated with the original marked spelling, i.e. the second character string position, to determine at least one character string to be corrected and mark it, for example, if If the similarity is greater than a certain threshold, the highlight mark will be expanded, otherwise the original highlight mark will be canceled.
  • step 205 re-enter "guairen"
  • the system matches it with "huairen” and "najiago”, and finds that the similarity of "huairen” reaches 85.7% (6 of the 7 characters are the same, The result of dividing 6 by 7 is 85.7%), and the similarity of "najiago” is only 14.3%, so “huairen” can be marked, and the expanded highlight mark is "shihuairen", canceling the "shi” of the original "shinajia” Highlight the mark, "huairen” is the target string to be corrected.
  • the preset threshold of similarity can be taken as 50%, that is, the similarity between the string to be corrected and the third string should be greater than the preset threshold. With the increase of frequency of use, the system will continue to match and learn, and the training generation will be more reasonable. the threshold value.
  • Step 207 The system determines whether the highlighted mark of the target string to be corrected is clicked within the first preset time period, for example, whether the user clicks the highlighted mark within 5s, if so, go to step 208, otherwise go to step 209 directly.
  • Step 208 The system replaces the highlighted target character string to be corrected with the third character string that was re-spelled and entered, and can delete the second character string and the third character string, that is, delete the subsequent re-entered "shiguairen", as shown in the figure. 6 shown.
  • Step 209 The user continues the current input without interruption.
  • the user can quickly replace and correct the wrong input by clicking on the intelligently matched mark without interrupting the current input without affecting the continuity of the user input, which greatly improves the user input speed and input experience.
  • an input correction device 700 As shown in FIG. 7, an input correction device 700 according to an embodiment is provided, and the device 700 includes:
  • the first receiving module 701 is configured to receive the second character string input by the user when the first character string has been input in the current input method interface;
  • the first marking module 702 is configured to, in the case that the first character string includes the second character string, if a third character string input by the user is received, at least one character string associated with the second character string in the first character string The string to be corrected is marked;
  • the replacement module 703 is configured to replace the target character string to be corrected in the at least one character string to be corrected with a third character string.
  • the apparatus further includes:
  • the first display module is configured to display the first text information corresponding to the first character string and the second character string on the input method interface after receiving the second character string input by the user;
  • the deletion module is used to delete the corresponding character string corresponding to the second character string in the first text information after receiving the third character string input by the user or replacing the target character string to be corrected in at least one character string to be corrected with the third character string. text information.
  • the first character string and the second character string are characters entered in an input box of an input method interface
  • the device also includes:
  • the second display module is configured to, after receiving the second character string input by the user, display the text information corresponding to the first character string on the input method interface under the condition that the second character string input by the user satisfies the preset condition, wherein no Display the text information corresponding to the second character string.
  • the target character string to be corrected in at least one character string to be corrected is replaced with a third character string, including:
  • the target string to be corrected in the at least one string to be corrected is replaced with a third string , where the target time is the input end time of the third string.
  • the apparatus further includes:
  • the second marking module is configured to mark the second character string in the first character string when the first character string includes the second character string.
  • At least one character string to be corrected includes:
  • At least one character string in the first character string that is associated with the position of the second character string and matches the similarity of the third character string.
  • marking at least one character string to be corrected associated with the second character string in the first character string includes at least one of the following:
  • At least one character string to be corrected is marked by the mark button, and the mark button is located in the display area of the character string to be corrected in the input box of the input method interface.
  • the input correction device in this embodiment of the present application may be a device, or may be a component, an integrated circuit, or a chip in a terminal.
  • the apparatus may be a mobile electronic device or a non-mobile electronic device.
  • the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palmtop computer, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (personal digital assistant).
  • UMPC ultra-mobile personal computer
  • netbook or a personal digital assistant
  • the non-mobile electronic device may be a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., the embodiment of the present application There is no specific limitation.
  • Network Attached Storage NAS
  • personal computer personal computer, PC
  • television television
  • teller machine a self-service machine
  • the input correction device in the embodiment of the present application may be a device with an operating system.
  • the operating system may be an Android (Android) operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiments of the present application.
  • the input correction device provided in the embodiments of the present application can implement various processes implemented by the above-mentioned input correction method embodiments, for example, can implement various processes implemented by the method embodiments in FIG. 1 and FIG. 5 .
  • an embodiment of the present application further provides an electronic device 800, including a processor 801, a memory 802, a program or instruction stored in the memory 802 and executable on the processor 801,
  • an electronic device 800 including a processor 801, a memory 802, a program or instruction stored in the memory 802 and executable on the processor 801,
  • the program or instruction is executed by the processor 801
  • each process of the above-mentioned input correction method embodiment can be realized, and the same technical effect can be achieved. To avoid repetition, details are not described here.
  • the electronic devices in the embodiments of the present application include the aforementioned mobile electronic devices and non-mobile electronic devices.
  • FIG. 9 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
  • the electronic device 900 includes but is not limited to: a radio frequency unit 901, a network module 902, an audio output unit 903, an input unit 904, a sensor 905, a display unit 906, a user input unit 907, an interface unit 908, a memory 909, and a processor 910, etc. part.
  • the electronic device 900 may also include a power supply (such as a battery) for supplying power to various components, and the power supply may be logically connected to the processor 910 through a power management system, so that the power management system can manage charging, discharging, and power management. consumption management and other functions.
  • a power supply such as a battery
  • the structure of the electronic device shown in FIG. 9 does not constitute a limitation to the electronic device.
  • the electronic device may include more or less components than the one shown, or combine some components, or arrange different components, which will not be repeated here. .
  • the user input unit 907 is configured to receive the second character string input by the user when the first character string has been input in the current input method interface;
  • the processor 910 is configured to, in the case where the first character string includes the second character string, if a third character string input by the user is received, at least one of the first character strings associated with the second character string to be corrected String to mark;
  • the processor 910 is configured to replace the target character string to be corrected in the at least one character string to be corrected with a third character string.
  • the display unit 906 is configured to display the first character information corresponding to the first character string and the second character string on the input method interface after receiving the second character string input by the user;
  • the processor 910 is configured to, after receiving the third character string input by the user or replacing the target character string to be corrected in the at least one character string to be corrected with the third character string, delete the corresponding character string corresponding to the second character string in the first text information. text information.
  • the first character string and the second character string are characters entered in an input box of an input method interface
  • the display unit 906 is configured to, after receiving the second character string input by the user, display the text information corresponding to the first character string on the input method interface under the condition that the second character string input by the user satisfies the preset condition. Text information corresponding to the second character string.
  • the target character string to be corrected in at least one character string to be corrected is replaced with a third character string, including:
  • the target string to be corrected in the at least one string to be corrected is replaced with a third string , where the target time is the input end time of the third string.
  • the processor 910 is configured to mark the second character string in the first character string when the second character string is included in the first character string.
  • At least one character string to be corrected includes:
  • At least one character string in the first character string that is associated with the position of the second character string and matches the similarity of the third character string.
  • marking at least one character string to be corrected associated with the second character string in the first character string includes at least one of the following:
  • At least one character string to be corrected is marked by the mark button, and the mark button is located in the display area of the character string to be corrected in the input box of the input method interface.
  • the input unit 904 may include a graphics processor (Graphics Processing Unit, GPU) 9041 and a microphone 9042. Such as camera) to obtain still pictures or video image data for processing.
  • the display unit 906 may include a display panel 9061, which may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like.
  • the user input unit 907 includes a touch panel 9071 and other input devices 9072 .
  • the touch panel 9071 is also called a touch screen.
  • the touch panel 9071 may include two parts, a touch detection device and a touch controller.
  • Other input devices 9072 may include, but are not limited to, physical keyboards, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, and joysticks, which will not be repeated here.
  • Memory 909 may be used to store software programs as well as various data, including but not limited to application programs and operating systems.
  • the processor 910 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and an application program, and the like, and the modem processor mainly processes wireless communication. It can be understood that, the above-mentioned modulation and demodulation processor may not be integrated into the processor 910.
  • the embodiments of the present application further provide a readable storage medium, the readable storage medium may be non-volatile or volatile, and a program or an instruction is stored on the readable storage medium, and the program or instruction is stored in the readable storage medium.
  • the processor executes, each process of the above-mentioned input correction method embodiment is implemented, and the same technical effect can be achieved. In order to avoid repetition, details are not described here.
  • the processor is the processor in the electronic device described in the foregoing embodiments.
  • the readable storage medium includes a computer-readable storage medium, such as a computer read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, and the like.
  • An embodiment of the present application further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction to implement the input correction method embodiments described above.
  • the chip includes a processor and a communication interface
  • the communication interface is coupled to the processor
  • the processor is configured to run a program or an instruction to implement the input correction method embodiments described above.
  • the chip mentioned in the embodiments of the present application may also be referred to as a system-on-chip, a system-on-chip, a system-on-a-chip, or a system-on-a-chip, or the like.
  • An embodiment of the present application further provides a computer program product, wherein the computer program product is stored in a non-transitory readable storage medium, and the computer program product is executed by at least one processor to implement the above input correction method
  • the computer program product is stored in a non-transitory readable storage medium, and the computer program product is executed by at least one processor to implement the above input correction method

Landscapes

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

Abstract

The present application belongs to the technical field of communications, and discloses an input correction method and apparatus. The method comprises: when a first character string has been input in a current input method interface, receiving a second character string inputted by a user; when the second character string is comprised in the first character string, if a third character string inputted by the user is received, marking at least one character string to be corrected that is associated with the second character string in the first character string; and replacing a target character string to be corrected in the at least one character string with the third character string.

Description

输入矫正方法和装置Input correction method and device
相关申请的交叉引用CROSS-REFERENCE TO RELATED APPLICATIONS
本申请主张在2021年05月06日在中国提交的中国专利申请No.202110491536.8的优先权,其全部内容通过引用包含于此。This application claims priority to Chinese Patent Application No. 202110491536.8 filed in China on May 06, 2021, the entire contents of which are hereby incorporated by reference.
技术领域technical field
本申请属于通信技术领域,具体涉及一种输入矫正方法和装置。The present application belongs to the field of communication technologies, and in particular relates to an input correction method and device.
背景技术Background technique
随着智能电子设备的不断普及,使用电子设备进行交流沟通已经成为一种常用习惯,系统为用户提供了多种沟通交流形式,如文字、语音、视频等,其中最常用的一般是文字方式沟通,为了更好的满足用户需求,各种输入法应运而生。With the continuous popularization of intelligent electronic devices, the use of electronic devices for communication has become a common habit. The system provides users with a variety of communication forms, such as text, voice, video, etc., of which the most commonly used is text communication. , in order to better meet the needs of users, various input methods came into being.
但是,目前现有各类输入法的输入方案普遍存在的一个问题是,用户在输入时不可避免的存在输错的情况,在输入一句完整字符串的时候,由于打字过快等原因,误触键盘,导致字符串中出现错误字符,如果用户需要修改这个错的字符,需要点击光标到错的字符之后的位置处,然后删除错的字符之后重新输入正确字符,后续再将光标重新点击到字符串最后一个字符之后的位置即字符串末尾进行重新输入等,操作繁琐,导致在输入矫正过程中耗时过长,用户体验差。However, a common problem in the current input schemes of various input methods is that users inevitably make mistakes when inputting. When inputting a complete string, the user may accidentally touch the keyboard, resulting in wrong characters in the string. If the user needs to modify the wrong character, he needs to click the cursor to the position after the wrong character, then delete the wrong character and re-enter the correct character, and then click the cursor again to the character The position after the last character of the string, that is, the end of the string, is re-entered, etc. The operation is cumbersome, resulting in a long time-consuming process of input correction and poor user experience.
发明内容SUMMARY OF THE INVENTION
本申请实施例的目的是提供一种输入矫正方法和装置,能够解决输入过程中字符矫正耗时长的问题。The purpose of the embodiments of the present application is to provide an input correction method and device, which can solve the problem that character correction takes a long time in the input process.
第一方面,本申请实施例提供了一种输入矫正方法,所述方法包括:In a first aspect, an embodiment of the present application provides an input correction method, the method comprising:
在当前输入法界面已输入第一字符串的情况下,接收用户输入的第二字符串;In the case that the first character string has been input in the current input method interface, receive the second character string input by the user;
在所述第一字符串中包括所述第二字符串的情况下,若接收到用户输入的第三字符串,则对所述第一字符串中与所述第二字符串关联的至少一个待矫正字符串进行标记;In the case that the second character string is included in the first character string, if a third character string input by the user is received, at least one character string associated with the second character string in the first character string The string to be corrected is marked;
将所述至少一个待矫正字符串中的目标待矫正字符串替换为所述第三字符串。The target character string to be corrected in the at least one character string to be corrected is replaced with the third character string.
第二方面,本申请实施例提供了一种输入矫正装置,所述装置包括:In a second aspect, an embodiment of the present application provides an input correction device, the device comprising:
第一接收模块,用于在当前输入法界面已输入第一字符串的情况下,接收用户输入的第二字符串;a first receiving module, configured to receive the second character string input by the user when the first character string has been input in the current input method interface;
第一标记模块,用于在所述第一字符串中包括所述第二字符串的情况下,若接收到用户输入的第三字符串,则对所述第一字符串中与所述第二字符串关联的至少一个待矫正字符串进行标记;The first marking module is configured to, in the case that the first character string includes the second character string, if a third character string input by the user is received, compare the first character string with the third character string. Mark at least one string to be corrected associated with the two strings;
替换模块,用于将所述至少一个待矫正字符串中的目标待矫正字符串替换为所述第三字符串。A replacement module, configured to replace the target character string to be corrected in the at least one character string to be corrected with the third character string.
第三方面,本申请实施例提供了一种电子设备,该电子设备包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如第一方面所述的方法的步骤。In a third aspect, embodiments of the present application provide an electronic device, the electronic device includes a processor, a memory, and a program or instruction stored on the memory and executable on the processor, the program or instruction being The processor implements the steps of the method according to the first aspect when executed.
第四方面,本申请实施例提供了一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如第一方面所述的方法的步骤。In a fourth aspect, an embodiment of the present application provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or instruction is executed by a processor, the steps of the method according to the first aspect are implemented .
第五方面,本申请实施例提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如第一方面所述的方法。In a fifth aspect, an embodiment of the present application provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction, and implement the first aspect the method described.
第六方面,本申请实施例提供了一种计算机程序产品,其中,所述计算机程序产品存储在非瞬态的存储介质中,所述计算机程序产品被至少一个处理器执行以实现如第一方面所述方法的步骤。In a sixth aspect, embodiments of the present application provide a computer program product, wherein the computer program product is stored in a non-transitory storage medium, and the computer program product is executed by at least one processor to implement the first aspect the steps of the method.
第七方面,本申请实施例提供了一种通信设备,被配置为执行如第一方面所述的方法的步骤。In a seventh aspect, an embodiment of the present application provides a communication device configured to perform the steps of the method described in the first aspect.
本申请实施例的输入矫正方法中,在当前输入法界面已输入第一字符串的情况下,可接收用户输入的第二字符串,在第一字符串中包括第二字符串的情况下,若接收到用户输入的第三字符串,即可对第一字符串中与第二字符串关联的至少一个待矫正字符串进行标记,以便进行矫正,后续可将至少一个待矫正字符串中的目标待矫正字符串替换为第三字符串。也即是,在第一字符串中包括第二字符串的情况下,用户继续输入矫正后的第三字符串即可,后续标记至少一个待矫正字符串,将至少一个待矫正字符串中的目标待矫正字符串替换为第三字符串即可,实现输入矫正,无需将光标移动到待矫正字符串位置处进行逐一删除,再重新输入正确的字符串,可减少输入过程中字符矫正耗时,提高用户体验。In the input correction method of the embodiment of the present application, in the case that the first character string has been input in the current input method interface, the second character string input by the user can be received, and in the case that the second character string is included in the first character string, If the third character string input by the user is received, at least one character string to be corrected associated with the second character string in the first character string can be marked for correction, and then at least one character string to be corrected in the at least one character string to be corrected can be marked. The target string to be corrected is replaced with the third string. That is, in the case where the first character string includes the second character string, the user can continue to input the corrected third character string, and subsequently mark at least one character string to be corrected, and the at least one character string to be corrected The target string to be corrected can be replaced with a third string to realize input correction. It is not necessary to move the cursor to the position of the string to be corrected to delete one by one, and then re-enter the correct string, which can reduce the time-consuming of character correction during the input process. , to improve the user experience.
附图说明Description of drawings
图1是本申请实施例提供的输入矫正方法的流程图之一;Fig. 1 is one of the flow charts of the input correction method provided by the embodiment of the present application;
图2是本申请实施例提供的输入矫正方法的流程图之二;Fig. 2 is the second flow chart of the input correction method provided by the embodiment of the present application;
图3是本申请实施例提供的电子设备的显示界面之一;3 is one of the display interfaces of the electronic device provided by the embodiment of the present application;
图4是本申请实施例提供的电子设备的显示界面之二;FIG. 4 is the second display interface of the electronic device provided by the embodiment of the present application;
图5是本申请实施例提供的电子设备的显示界面之三;FIG. 5 is the third display interface of the electronic device provided by the embodiment of the present application;
图6是本申请实施例提供的电子设备的显示界面之四;FIG. 6 is the fourth display interface of the electronic device provided by the embodiment of the present application;
图7是本申请实施例提供的输入矫正装置的示意图;7 is a schematic diagram of an input correction device provided by an embodiment of the present application;
图8是本申请实施例提供的电子设备的结构示意图FIG. 8 is a schematic structural diagram of an electronic device provided by an embodiment of the present application
图9是本申请实施例提供的电子设备的硬件结构示意图。FIG. 9 is a schematic diagram of a hardware structure of an electronic device provided by an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art fall within the protection scope of this application.
本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施,且“第一”、“第二”等所区分的对象通常为一类,并不限定对象的个数,例如第一对象可以是一个,也可以是多个。此外,说明书以及权利要求中“和/或”表示所连接对象的至少其中之一,字符“/”,一般表示前后关联对象是一种“或”的关系。The terms "first", "second" and the like in the description and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It is to be understood that the data so used are interchangeable under appropriate circumstances so that the embodiments of the present application can be practiced in sequences other than those illustrated or described herein, and distinguish between "first", "second", etc. The objects are usually of one type, and the number of objects is not limited. For example, the first object may be one or more than one. In addition, "and/or" in the description and claims indicates at least one of the connected objects, and the character "/" generally indicates that the associated objects are in an "or" relationship.
下面结合附图,通过具体的实施例及其应用场景对本申请实施例提供的输入矫正方法进行详细地说明。The input correction method provided by the embodiments of the present application will be described in detail below with reference to the accompanying drawings through specific embodiments and application scenarios thereof.
如图1所示,本申请提供一种实施例的输入矫正方法,该方法包括:As shown in FIG. 1 , the present application provides an input correction method according to an embodiment, and the method includes:
步骤101:在当前输入法界面已输入第一字符串的情况下,接收用户输入的第二字符串。Step 101: In the case that the first character string has been input in the current input method interface, receive the second character string input by the user.
在用户聊天场景或需要输入内容的其他场景下,用户可通过输入法例如拼音输入法等输入内容,作为一个示例,在通过拼音输入法输入内容的过程中,不但会显示输入的拼音,而且会显示根据拼音匹配出的文本,如此,用户可在匹配处的文本中选择需要的文本,实现文本输入等。在本实施例中,在当前输入法界面,用户已输入第一字符串,但在已输入的第一字符串中可能因为误输入导致第一字符串中存在错误的字符,则需要矫正已输入的第一字符串中错误的字符,在矫正过程中,用户可在第一字符串的基础上输入第二字符串,需要说明的是,第二字符串为在第一字符串的最后一个字符之后输入的字符串。其中,第一字符串和第二字符串均分别包括至少一个字符,作为一个示例,若采用拼音输入法输入,本申请实施例中的字符串均为拼音字符串。In a user chatting scenario or other scenarios where input content is required, the user can input content through an input method such as the Pinyin input method. The text matched according to the pinyin is displayed. In this way, the user can select the desired text from the matched text to realize text input and so on. In this embodiment, in the current input method interface, the user has input the first character string, but there may be wrong characters in the first character string due to misinput in the inputted first character string, and it is necessary to correct the input In the correction process, the user can input a second character string based on the first character string. It should be noted that the second character string is the last character in the first character string. The string to be entered after. The first character string and the second character string each include at least one character. As an example, if the pinyin input method is used for input, the character strings in the embodiments of the present application are all pinyin character strings.
步骤102:在第一字符串中包括第二字符串的情况下,若接收到用户输入的第三字符串,则对第一字符串中与第二字符串关联的至少一个待矫正字符串进行标记。Step 102: In the case where the first character string includes the second character string, if the third character string input by the user is received, perform at least one character string to be corrected associated with the second character string in the first character string. mark.
接收用户输入的第二字符串之后,可将第二字符串与已输入的第一字符 串进行比较,确定第一字符串中是否包括第二字符串,需要说明的是,此处确定第一字符串中是否包括第二字符串的过程中,是将第二字符串作为一个整体在第一字符串中进行检测。After receiving the second character string input by the user, the second character string can be compared with the inputted first character string to determine whether the first character string includes the second character string. It should be noted that the first character string is determined here. In the process of whether the character string includes the second character string, the second character string is detected as a whole in the first character string.
在第一字符串中包括第二字符串的情况下,表示在已输入过第二字符串,此时,可进入矫正模式,若后续接受用户输入的第三字符串(包括至少一个字符),可以将第三字符串当作替换字符串,可用以替换需要矫正的字符串。为便于用户查看可矫正的字符串,以便矫正,提高矫正效率,可在接收到用户输入的第三字符串的情况下,对第一字符串中与第二字符串关联的至少一个待矫正字符串进行标记,第一字符串中可能包括至少一个第二字符串,则第一字符串中与第二字符串关联的待矫正字符串可能不止一个,如此,可对第一字符串中与第二字符串关联的至少一个待矫正字符串进行标记。可以理解,第一字符串中可进行矫正的字符串是与第一字符串中的第二字符串相关联的,也即是通过第二字符串可确定第一字符串中可矫正的至少一个待矫正字符串,任一个待矫正字符串包括至少一个字符。In the case where the second character string is included in the first character string, it means that the second character string has been input. At this time, the correction mode can be entered. If the third character string (including at least one character) input by the user is subsequently accepted, The third string can be used as a replacement string, which can be used to replace the string that needs to be corrected. In order to facilitate the user to view the correctable character string, so as to correct and improve the correction efficiency, when the third character string input by the user is received, at least one character to be corrected associated with the second character string in the first character string can be checked. The first character string may include at least one second character string, and there may be more than one character string to be corrected associated with the second character string in the first character string. At least one string to be corrected associated with the two strings is marked. It can be understood that the correctable character string in the first character string is associated with the second character string in the first character string, that is, at least one correctable character string in the first character string can be determined through the second character string Strings to be corrected, any string to be corrected includes at least one character.
步骤103:将至少一个待矫正字符串中的目标待矫正字符串替换为第三字符串。Step 103: Replace the target character string to be corrected in the at least one character string to be corrected with a third character string.
在对至少一个待矫正字符串进行标记后,可以进行矫正,将至少一个待矫正字符串中的目标待矫正字符串替换为第三字符串,实现对第一字符串中目标待矫正字符串矫正为第三字符串,即实现输入矫正。After the at least one character string to be corrected is marked, correction can be performed, and the target character string to be corrected in the at least one character string to be corrected is replaced with a third character string, so as to correct the target character string to be corrected in the first character string is the third string, that is, to realize input correction.
本申请实施例的输入矫正方法中,在当前输入法界面已输入第一字符串的情况下,可接收用户输入的第二字符串,在第一字符串中包括第二字符串的情况下,若接收到用户输入的第三字符串,即可对第一字符串中与第二字符串关联的至少一个待矫正字符串进行标记,以便进行矫正,后续可将至少一个待矫正字符串中的目标待矫正字符串替换为第三字符串。也即是,在第一字符串中包括第二字符串的情况下,用户继续输入矫正后的第三字符串即可,后续标记至少一个待矫正字符串,将至少一个待矫正字符串中的目标待矫正字符串替换为第三字符串即可,实现输入矫正,无需将光标移动到待矫 正字符串位置处进行逐一删除,再重新输入正确的字符串,可减少输入过程中字符矫正耗时,提高用户体验。In the input correction method of the embodiment of the present application, in the case that the first character string has been input in the current input method interface, the second character string input by the user can be received, and in the case that the second character string is included in the first character string, If the third character string input by the user is received, at least one character string to be corrected associated with the second character string in the first character string can be marked for correction, and then at least one character string to be corrected in the at least one character string to be corrected can be marked. The target string to be corrected is replaced with the third string. That is, in the case where the first character string includes the second character string, the user can continue to input the corrected third character string, and subsequently mark at least one character string to be corrected, and the at least one character string to be corrected The target string to be corrected can be replaced with a third string to realize input correction. It is not necessary to move the cursor to the position of the string to be corrected to delete one by one, and then re-enter the correct string, which can reduce the time-consuming of character correction during the input process. , to improve the user experience.
在一个实施例中,接收用户输入的第二字符串之后,方法还包括:In one embodiment, after receiving the second character string input by the user, the method further includes:
在输入法界面显示第一字符串和第二字符串对应的第一文字信息;Display the first text information corresponding to the first character string and the second character string on the input method interface;
在接收到用户输入的第三字符串或者将至少一个待矫正字符串中的目标待矫正字符串替换为第三字符串之后,方法还包括:After receiving the third character string input by the user or replacing the target character string to be corrected in the at least one character string to be corrected with the third character string, the method further includes:
在第一文字信息中删除第二字符串对应的文字信息。The text information corresponding to the second character string is deleted from the first text information.
第一文字信息即包括第一字符串对应的文字信息和第二字符串对应的文字信息,输入第一字符串后可显示第一字符串对应的文字信息,输入第二字符串后也可显示第二字符串对应的文字信息,如此,在接收第二字符串后,当前输入法界面中可显示第一字符串和第二字符串对应的第一文字信息。如此,便于用户查看字符串对应的文字信息以及便于发现输入错误等。The first text information includes the text information corresponding to the first character string and the text information corresponding to the second character string. After the first character string is input, the text information corresponding to the first character string can be displayed, and the second character string can also be displayed after inputting the second character string. The text information corresponding to the two character strings. In this way, after receiving the second character string, the current input method interface can display the first character information corresponding to the first character string and the second character string. In this way, it is convenient for the user to view the text information corresponding to the character string and to find input errors.
作为一个示例,接收第三字符串之后,可在输入法界面显示第三字符串对应的文字信息,在将至少一个待矫正字符串中的目标待矫正字符串替换为第三字符串之后,可将输入法界面中的第三字符串对应的文字信息删除,即不显示第三字符串对应的文字信息,以免占用输入法界面的显示空间。As an example, after receiving the third character string, text information corresponding to the third character string may be displayed on the input method interface, and after replacing the target character string to be corrected in the at least one character string to be corrected with the third character string, the text information corresponding to the third character string may be displayed on the input method interface. The text information corresponding to the third character string in the input method interface is deleted, that is, the text information corresponding to the third character string is not displayed, so as not to occupy the display space of the input method interface.
若第一字符串包括第二字符串,且后续用户继续输入字符,接收用户输入的第三字符串或者将至少一个待矫正字符串中的目标待矫正字符串替换为第三字符串,可以理解为,输入的第二字符串是用以矫正提示或矫正触发,并非正常的输入,如此,在接收到用户输入的第三字符串或者将至少一个待矫正字符串中的目标待矫正字符串替换为第三字符串之后,可将第一文字信息中的第二字符串对应的文字信息删除,以减少其文字信息对用户的误导,避免用户通过查看第二字符串的文字信息来确定输入是否有误,提高输入的准确性,同时,可使输入法界面有更多的显示空间来显示其他内容。If the first character string includes the second character string, and the subsequent user continues to input characters, the third character string input by the user is received, or the target character string to be corrected in at least one character string to be corrected is replaced with the third character string, it is understandable Therefore, the inputted second character string is used for correction prompt or correction trigger, not normal input. In this way, after receiving the third character string input by the user or replacing the target to-be-corrected character string in at least one to-be-corrected character string After it is the third character string, the text information corresponding to the second character string in the first text information can be deleted to reduce the misleading of the text information to the user, and prevent the user from checking the text information of the second character string to determine whether the input is correct or not. error, improve the accuracy of input, and at the same time, the input method interface can have more display space to display other content.
在一个实施例中,第一字符串和第二字符串为在输入法界面的输入框中输入的字符,接收用户输入的第二字符串之后,方法还包括:In one embodiment, the first character string and the second character string are characters input in the input box of the input method interface, and after receiving the second character string input by the user, the method further includes:
在用户输入的第二字符串满足预设条件的情况下,在输入法界面显示第 一字符串对应的文字信息,其中,不显示第二字符串对应的文字信息。When the second character string input by the user satisfies the preset condition, the text information corresponding to the first character string is displayed on the input method interface, wherein the text information corresponding to the second character string is not displayed.
即在本实施例中,接收第一字符串后,若第二字符串的满足预设条件,可以理解表示第二字符串满足作为矫正提示或矫正触发作用的条件,无需第二字符串的文字信息,在输入法界面中显示第一字符串对应的文字信息即可,不显示第二字符串对应的文字信息,避免占用输入法界面的显示空间,以及便于用户查看其它输入内容等。That is, in this embodiment, after receiving the first character string, if the second character string satisfies the preset condition, it can be understood that the second character string satisfies the condition for the correction prompt or correction trigger function, and the text of the second character string is not required. The text information corresponding to the first character string can be displayed in the input method interface, and the text information corresponding to the second character string is not displayed, so as to avoid occupying the display space of the input method interface and facilitate the user to view other input contents.
作为一个示例,上述预设条件可以包括但不限于以下至少一项:As an example, the foregoing preset conditions may include, but are not limited to, at least one of the following:
在第二字符串的输入结束时间之后的第二预设时长内未接收到字符输入;No character input is received within a second preset time period after the input end time of the second character string;
第二字符串中字符之间的输入时间间隔大于第三预设时长。The input time interval between characters in the second character string is greater than the third preset time period.
在一个实施例中,将至少一个待矫正字符串中的目标待矫正字符串替换为第三字符串,包括:In one embodiment, the target character string to be corrected in at least one character string to be corrected is replaced with a third character string, including:
在目标时间之后的第一预设时长内接收到用户对目标待矫正字符串的标记的第一输入的情况下,将至少一个待矫正字符串中的目标待矫正字符串替换为第三字符串,其中,目标时间为第三字符串的输入结束时间。In the case where the user's first input of the mark of the target string to be corrected is received within the first preset time period after the target time, the target string to be corrected in the at least one string to be corrected is replaced with a third string , where the target time is the input end time of the third string.
在本实施例中,可在至少一个待矫正字符串中选择需要矫正的字符串,为减少矫正时间,提高矫正效率,可通过在第三字符串输入结束后的第一预设时长内对目标待矫正字符串的标记进行第一输入,将至少一个待矫正字符串中的目标待矫正字符串替换为第三字符串,实现输入矫正。In this embodiment, a character string to be corrected can be selected from at least one character string to be corrected. In order to reduce the correction time and improve the correction efficiency, the The first input is performed on the mark of the character string to be corrected, and the target character string to be corrected in at least one character string to be corrected is replaced with a third character string to realize input correction.
在一个实施例中,在第一字符串中包括第二字符串的情况下,方法还包括:In one embodiment, when the first character string includes the second character string, the method further includes:
对第一字符串中的第二字符串进行标记。Tokenize the second string within the first string.
也即是不但要对待矫正字符串进行标记,还需要对第一字符串中的第二字符串进行标记,有利于提示第二字符串,以便定位第二字符串,如此,也有利于对第二字符串周围的字符的提示。需要说明的是,在将至少一个待矫正字符串中的目标待矫正字符串替换为第三字符串之后,可删除待矫正字符串的标记,另外,还可删除第二字符串的标记。That is not only to mark the string to be corrected, but also to mark the second string in the first string, which is helpful for prompting the second string so as to locate the second string. A hint for the characters surrounding the second string. It should be noted that, after replacing the target character string to be corrected in at least one character string to be corrected with a third character string, the mark of the character string to be corrected may be deleted, and the mark of the second character string may also be deleted.
在一个实施例中,至少一个待矫正字符串包括:In one embodiment, at least one character string to be corrected includes:
第一字符串中与第二字符串位置关联,且与第三字符串相似度匹配的至少一个字符串。At least one character string in the first character string that is associated with the position of the second character string and matches the similarity of the third character string.
位置关联可以包括位置相邻,可以在第二字符串位置之后或在第二字符串位置之前等。两个字符串之间差异字符数量越小,字符串之间越相似,相似度越大,反之差异越大越不相似,相似度越小,两个字符串之间的相似度可以通过两个字符串之间相同字符的数量除以两个字符串中任意一个字符串的字符数量,与第三字符串相似度匹配,可以理解为与第三字符串的字符数量相同且与第三字符串之间的差异字符数量小于第一预设数量。例如,第一预设数量可以选择2等。需要说明的是,是按照字符位置顺序,与第三字符串的每个字符进行是否相同的比较,也即是同一位置的字符进行比较,例如,第三字符串为“guai”,待比较的字符串为“huai”,第一个位置的字符分别为g和h,进行比较,结果为不同,第二个位置的字符分别为u和u,进行比较,结果为相同,第三个位置的字符分别为a和a,进行比较,结果为相同,第四个位置的字符分别为i和i,进行比较,结果为相同,也即是,存在差异的字符数量为1。The positional association may include positional proximity, may be after the second string position or before the second string position, etc. The smaller the number of different characters between the two strings, the more similar the strings are, and the greater the similarity. On the contrary, the greater the difference, the less similar, and the smaller the similarity. The similarity between two strings can be determined by two characters. The number of identical characters between strings is divided by the number of characters in any one of the two strings, and the similarity with the third string can be understood as the same as the number of characters in the third string and the same as the third string. The number of difference characters between them is less than the first preset number. For example, the first preset number can be selected as 2 and so on. It should be noted that, according to the character position order, it is compared with each character of the third string to see if it is the same, that is, the characters in the same position are compared. For example, the third string is "guai", which is to be compared. The string is "huai", the characters in the first position are g and h respectively, and the result is different. The characters in the second position are u and u, respectively, and the result is the same, the third position is the same. The characters are a and a, and the result is the same. The characters in the fourth position are i and i, respectively, and the result is the same, that is, the number of characters with a difference is 1.
需要说明的是,第一字符串的数量可以至少一个,对于至少一个第二字符串中的目标第二字符串(任一第二字符串),若与目标第二字符串位置关联的字符串,与第三字符串不匹配,则该目标第二字符串的标记可删除。It should be noted that the number of the first character string can be at least one, and for the target second character string (any second character string) in at least one second character string, if the character string associated with the position of the target second character string is , does not match the third string, the mark of the target second string can be deleted.
在一个实施例中,对第一字符串中与第二字符串关联的至少一个待矫正字符串进行标记,包括以下至少一项:In one embodiment, marking at least one character string to be corrected associated with the second character string in the first character string includes at least one of the following:
对至少一个待矫正字符串进行颜色高亮标记;Color highlighting at least one character string to be corrected;
通过第一标记图形,对至少一个待矫正字符串进行标记,待矫正字符串位于第一标记图形内;Mark at least one character string to be corrected by using the first marking pattern, and the character string to be corrected is located in the first marking pattern;
通过标记按钮,对至少一个待矫正字符串进行标记,标记按钮位于输入法界面的输入框中待矫正字符串的显示区域中。At least one character string to be corrected is marked by the mark button, and the mark button is located in the display area of the character string to be corrected in the input box of the input method interface.
需要说明的是,第一标记图形的数量可以与待矫正字符串的数量相同,每个待矫正字符串对应一个第一标记图形,一个待矫正字符串位于对应的一 个第一标记图形中。例如,第一标记图形可以是标记框,比如,可以是椭圆框、矩形框、圆形框,多边形框等。另外,至少一个待矫正字符串的颜色高亮标记的颜色可以相同或不同。除通过颜色高亮标记和通过第一标记图形进行比较的方式外,还可在输入法界面的输入框中待矫正字符串的显示区域中显示标记按钮,通过标记按钮实现对至少一个待矫正字符串进行标记。上述第一输入可以是对标记按钮的输入,例如,点击输入等。It should be noted that the number of the first marking patterns may be the same as the number of character strings to be corrected, each character string to be corrected corresponds to a first marking pattern, and one character string to be corrected is located in a corresponding first marking pattern. For example, the first mark graphic may be a mark frame, such as an oval frame, a rectangular frame, a circular frame, a polygonal frame, and the like. In addition, the colors of the color highlight marks of at least one character string to be corrected may be the same or different. In addition to the method of highlighting the mark by color and comparing by the first mark graph, a mark button can also be displayed in the display area of the character string to be corrected in the input box of the input method interface, and the mark button can be used to realize at least one character to be corrected. Strings are marked. The above-mentioned first input may be an input to a mark button, for example, a click input or the like.
下面以一个具体实施例对上述输入矫正方法的过程加以详细说明。本申请实施例提供了一种基于智能匹配的无中断快速进行错误拼写矫正的文本输入方案。输入过程中通过重新输入拼写有误字符串的前一个字符串以及正确字符串拼写,智能匹配并标记对应的输入,点击对应标记实现快速替换矫正,以拼音输入法,字符串为拼音字符串为例,如图2所示,输入矫正方法的过程如下:The process of the above input correction method will be described in detail below with a specific embodiment. The embodiment of the present application provides a text input solution based on intelligent matching for fast correction of misspellings without interruption. During the input process, by re-entering the previous string of the misspelled string and the correct spelling of the string, intelligently match and mark the corresponding input, and click the corresponding mark to realize quick replacement and correction. For example, as shown in Figure 2, the process of entering the correction method is as follows:
步骤201.用户聊天场景或者其他场景,使用拼音输入法在当前输入法界面输入第一字符串,显示第一字符串对应的文本信息。 Step 201. In a user chatting scenario or other scenarios, use the Pinyin input method to input a first character string on the current input method interface, and display the text information corresponding to the first character string.
步骤202.用户自主判断第一字符串中是否存在部分错误的拼音拼写输入,存在接着进入步骤203,否则直接进入步骤209。 Step 202. The user independently judges whether there is a part of the wrong pinyin spelling input in the first character string, if there is, then go to step 203, otherwise go to step 209 directly.
步骤203.用户判断存在错误拼音输入时不需要点击移动光标至错误拼音输入位置,只需要接着输入错误拼音拼写的前一个拼音字符串,如计划在输入界面210中输入“tashinajiagongsideyeshiguairen”,结果输成“tashinajiagongsideyeshihuairen”,如图3所示,即把“guai”错误输入了“huai”,用户无需移动光标,只需要继续输入其前一个字符串“shi”(即对应第二字符串)即可,如图4所示。 Step 203. The user does not need to click to move the cursor to the wrong pinyin input position when judging that there is a wrong pinyin input, and only needs to input the previous pinyin string of the wrong pinyin spelling, such as inputting "tashinajiagongsideyeshiguairen" in the input interface 210 as planned, and the result is input as "tashinajiagongsideyeshihuairen", as shown in Figure 3, that is, "guai" is wrongly input "huai", the user does not need to move the cursor, just continue to input the previous string "shi" (that is, corresponding to the second string), As shown in Figure 4.
步骤204.系统会自动匹配当前已输入的第一字符串中所有与重新输入的拼音拼写即第二字符串相同的字符串,并将其进行颜色高亮标记,系统可以进入矫正模式,以步骤203为例会将其中的“shihuairen”的“shi”以及“shinajia”的“shi”颜色高亮标记,如图4所示。 Step 204. The system will automatically match all strings in the currently inputted first string that are the same as the re-input pinyin spelling, that is, the second string, and mark them with color highlighting. The system can enter the correction mode, and the steps For example, 203 will highlight the color of "shi" of "shihuairen" and "shi" of "shinajia", as shown in Figure 4.
步骤205.继续输入正确的拼音拼写,以步骤204为例,继续输入“guairen”, 即对应第三字符串,如图5所示。 Step 205. Continue to input the correct pinyin spelling. Taking step 204 as an example, continue to input "guairen", which corresponds to the third character string, as shown in FIG. 5 .
步骤206.系统继续根据重新拼音拼写输入的第三字符串和与原来标记的拼写即第二字符串位置关联字符串,进行相似度校验,确定至少一个待矫正字符串并标记,例如,如果相似度大于某个阈值则扩展高亮标记,否则取消原本的高亮标记。继续以步骤205为例,重新输入“guairen”,系统将其和“huairen”以及“najiago”进行相似度匹配,发现“huairen”的相似度达到85.7%(7个字符中有6个字符相同,6除以7的结果取85.7%),而“najiago”的相似度仅为14.3%,因此可标记“huairen”,则扩展高亮标记为“shihuairen”,取消原本的“shinajia”的“shi”高亮标记,“huairen”即为目标待矫正字符串。相似度的预设阈值可以取50%,即待矫正字符串与第三字符串之间的相似度应大于预设阈值,后续随着使用频率的增加,系统不断匹配并学习,训练生成更加合理的阈值。 Step 206. The system continues to perform similarity checking according to the third character string input by re-pinyin spelling and the character string associated with the original marked spelling, i.e. the second character string position, to determine at least one character string to be corrected and mark it, for example, if If the similarity is greater than a certain threshold, the highlight mark will be expanded, otherwise the original highlight mark will be canceled. Continue to take step 205 as an example, re-enter "guairen", the system matches it with "huairen" and "najiago", and finds that the similarity of "huairen" reaches 85.7% (6 of the 7 characters are the same, The result of dividing 6 by 7 is 85.7%), and the similarity of "najiago" is only 14.3%, so "huairen" can be marked, and the expanded highlight mark is "shihuairen", canceling the "shi" of the original "shinajia" Highlight the mark, "huairen" is the target string to be corrected. The preset threshold of similarity can be taken as 50%, that is, the similarity between the string to be corrected and the third string should be greater than the preset threshold. With the increase of frequency of use, the system will continue to match and learn, and the training generation will be more reasonable. the threshold value.
步骤207.系统判断第一预设时长内是否点击目标待矫正字符串的高亮标记,如5s内用户是否点击高亮标记,如果点击了进入步骤208,否则直接进入步骤209。 Step 207. The system determines whether the highlighted mark of the target string to be corrected is clicked within the first preset time period, for example, whether the user clicks the highlighted mark within 5s, if so, go to step 208, otherwise go to step 209 directly.
步骤208.系统将高亮标记的目标待矫正字符串替换成重新拼写输入的第三字符串,并可删除第二字符串和第三字符串,即删除后续重新输入的“shiguairen”,如图6所示。 Step 208. The system replaces the highlighted target character string to be corrected with the third character string that was re-spelled and entered, and can delete the second character string and the third character string, that is, delete the subsequent re-entered "shiguairen", as shown in the figure. 6 shown.
步骤209.用户无须中断继续当前输入。 Step 209. The user continues the current input without interruption.
通过本申请实施例的输入矫正方法,用户可以在不中断当前输入的前提下,通过点击智能匹配出的标记快速替换矫正错误输入且不影响用户输入的连贯性,很好的提升了用户输入速度和输入体验。With the input correction method of the embodiment of the present application, the user can quickly replace and correct the wrong input by clicking on the intelligently matched mark without interrupting the current input without affecting the continuity of the user input, which greatly improves the user input speed and input experience.
如图7所示,提供一种实施例的输入矫正装置700,装置700包括:As shown in FIG. 7, an input correction device 700 according to an embodiment is provided, and the device 700 includes:
第一接收模块701,用于在当前输入法界面已输入第一字符串的情况下,接收用户输入的第二字符串;The first receiving module 701 is configured to receive the second character string input by the user when the first character string has been input in the current input method interface;
第一标记模块702,用于在第一字符串中包括第二字符串的情况下,若接收到用户输入的第三字符串,则对第一字符串中与第二字符串关联的至少 一个待矫正字符串进行标记;The first marking module 702 is configured to, in the case that the first character string includes the second character string, if a third character string input by the user is received, at least one character string associated with the second character string in the first character string The string to be corrected is marked;
替换模块703,用于将至少一个待矫正字符串中的目标待矫正字符串替换为第三字符串。The replacement module 703 is configured to replace the target character string to be corrected in the at least one character string to be corrected with a third character string.
在一个实施例中,装置还包括:In one embodiment, the apparatus further includes:
第一显示模块,用于接收用户输入的第二字符串之后,在输入法界面显示第一字符串和第二字符串对应的第一文字信息;The first display module is configured to display the first text information corresponding to the first character string and the second character string on the input method interface after receiving the second character string input by the user;
删除模块,用于在接收到用户输入的第三字符串或者将至少一个待矫正字符串中的目标待矫正字符串替换为第三字符串之后,在第一文字信息中删除第二字符串对应的文字信息。The deletion module is used to delete the corresponding character string corresponding to the second character string in the first text information after receiving the third character string input by the user or replacing the target character string to be corrected in at least one character string to be corrected with the third character string. text information.
在一个实施例中,第一字符串和第二字符串为在输入法界面的输入框中输入的字符;In one embodiment, the first character string and the second character string are characters entered in an input box of an input method interface;
装置还包括:The device also includes:
第二显示模块,用于接收用户输入的第二字符串之后,在用户输入的第二字符串满足预设条件的情况下,在输入法界面显示第一字符串对应的文字信息,其中,不显示第二字符串对应的文字信息。The second display module is configured to, after receiving the second character string input by the user, display the text information corresponding to the first character string on the input method interface under the condition that the second character string input by the user satisfies the preset condition, wherein no Display the text information corresponding to the second character string.
在一个实施例中,将至少一个待矫正字符串中的目标待矫正字符串替换为第三字符串,包括:In one embodiment, the target character string to be corrected in at least one character string to be corrected is replaced with a third character string, including:
在目标时间之后的第一预设时长内接收到用户对目标待矫正字符串的标记的第一输入的情况下,将至少一个待矫正字符串中的目标待矫正字符串替换为第三字符串,其中,目标时间为第三字符串的输入结束时间。In the case where the user's first input of the mark of the target string to be corrected is received within the first preset time period after the target time, the target string to be corrected in the at least one string to be corrected is replaced with a third string , where the target time is the input end time of the third string.
在一个实施例中,装置还包括:In one embodiment, the apparatus further includes:
第二标记模块,用于在第一字符串中包括第二字符串的情况下,对第一字符串中的第二字符串进行标记。The second marking module is configured to mark the second character string in the first character string when the first character string includes the second character string.
在一个实施例中,至少一个待矫正字符串包括:In one embodiment, at least one character string to be corrected includes:
第一字符串中与第二字符串位置关联,且与第三字符串相似度匹配的至少一个字符串。At least one character string in the first character string that is associated with the position of the second character string and matches the similarity of the third character string.
在一个实施例中,对所述第一字符串中与所述第二字符串关联的至少一 个待矫正字符串进行标记,包括以下至少一项:In one embodiment, marking at least one character string to be corrected associated with the second character string in the first character string includes at least one of the following:
对至少一个待矫正字符串进行颜色高亮标记;Color highlighting at least one character string to be corrected;
通过第一标记图形,对至少一个待矫正字符串进行标记,待矫正字符串位于第一标记图形内;Mark at least one character string to be corrected by using the first marking pattern, and the character string to be corrected is located in the first marking pattern;
通过标记按钮,对至少一个待矫正字符串进行标记,标记按钮位于输入法界面的输入框中待矫正字符串的显示区域中。At least one character string to be corrected is marked by the mark button, and the mark button is located in the display area of the character string to be corrected in the input box of the input method interface.
本申请实施例中的输入矫正装置可以是装置,也可以是终端中的部件、集成电路、或芯片。该装置可以是移动电子设备,也可以为非移动电子设备。示例性的,移动电子设备可以为手机、平板电脑、笔记本电脑、掌上电脑、车载电子设备、可穿戴设备、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本或者个人数字助理(personal digital assistant,PDA)等,非移动电子设备可以为网络附属存储器(Network Attached Storage,NAS)、个人计算机(personal computer,PC)、电视机(television,TV)、柜员机或者自助机等,本申请实施例不作具体限定。The input correction device in this embodiment of the present application may be a device, or may be a component, an integrated circuit, or a chip in a terminal. The apparatus may be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palmtop computer, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (personal digital assistant). assistant, PDA), etc., the non-mobile electronic device may be a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., the embodiment of the present application There is no specific limitation.
本申请实施例中的输入矫正装置可以为具有操作系统的装置。该操作系统可以为安卓(Android)操作系统,可以为iOS操作系统,还可以为其他可能的操作系统,本申请实施例不作具体限定。The input correction device in the embodiment of the present application may be a device with an operating system. The operating system may be an Android (Android) operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiments of the present application.
本申请实施例提供的输入矫正装置能够实现上述输入矫正方法实施例实现的各个过程,例如,能够实现图1和图5的方法实施例实现的各个过程,为避免重复,这里不再赘述。The input correction device provided in the embodiments of the present application can implement various processes implemented by the above-mentioned input correction method embodiments, for example, can implement various processes implemented by the method embodiments in FIG. 1 and FIG. 5 .
可选地,如图8所示,本申请实施例还提供一种电子设备800,包括处理器801,存储器802,存储在存储器802上并可在所述处理器801上运行的程序或指令,该程序或指令被处理器801执行时实现上述输入矫正方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Optionally, as shown in FIG. 8 , an embodiment of the present application further provides an electronic device 800, including a processor 801, a memory 802, a program or instruction stored in the memory 802 and executable on the processor 801, When the program or instruction is executed by the processor 801, each process of the above-mentioned input correction method embodiment can be realized, and the same technical effect can be achieved. To avoid repetition, details are not described here.
需要说明的是,本申请实施例中的电子设备包括上述所述的移动电子设备和非移动电子设备。It should be noted that the electronic devices in the embodiments of the present application include the aforementioned mobile electronic devices and non-mobile electronic devices.
图9为实现本申请实施例的一种电子设备的硬件结构示意图。FIG. 9 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
该电子设备900包括但不限于:射频单元901、网络模块902、音频输出单元903、输入单元904、传感器905、显示单元906、用户输入单元907、接口单元908、存储器909、以及处理器910等部件。The electronic device 900 includes but is not limited to: a radio frequency unit 901, a network module 902, an audio output unit 903, an input unit 904, a sensor 905, a display unit 906, a user input unit 907, an interface unit 908, a memory 909, and a processor 910, etc. part.
本领域技术人员可以理解,电子设备900还可以包括给各个部件供电的电源(比如电池),电源可以通过电源管理系统与处理器910逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。图9中示出的电子设备结构并不构成对电子设备的限定,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置,在此不再赘述。Those skilled in the art can understand that the electronic device 900 may also include a power supply (such as a battery) for supplying power to various components, and the power supply may be logically connected to the processor 910 through a power management system, so that the power management system can manage charging, discharging, and power management. consumption management and other functions. The structure of the electronic device shown in FIG. 9 does not constitute a limitation to the electronic device. The electronic device may include more or less components than the one shown, or combine some components, or arrange different components, which will not be repeated here. .
其中,用户输入单元907,用于在当前输入法界面已输入第一字符串的情况下,接收用户输入的第二字符串;Wherein, the user input unit 907 is configured to receive the second character string input by the user when the first character string has been input in the current input method interface;
处理器910,用于在第一字符串中包括第二字符串的情况下,若接收到用户输入的第三字符串,则对第一字符串中与第二字符串关联的至少一个待矫正字符串进行标记;The processor 910 is configured to, in the case where the first character string includes the second character string, if a third character string input by the user is received, at least one of the first character strings associated with the second character string to be corrected String to mark;
处理器910,用于将至少一个待矫正字符串中的目标待矫正字符串替换为第三字符串。The processor 910 is configured to replace the target character string to be corrected in the at least one character string to be corrected with a third character string.
在一个实施例中,显示单元906,用于接收用户输入的第二字符串之后,在输入法界面显示第一字符串和第二字符串对应的第一文字信息;In one embodiment, the display unit 906 is configured to display the first character information corresponding to the first character string and the second character string on the input method interface after receiving the second character string input by the user;
处理器910,用于在接收到用户输入的第三字符串或者将至少一个待矫正字符串中的目标待矫正字符串替换为第三字符串之后,在第一文字信息中删除第二字符串对应的文字信息。The processor 910 is configured to, after receiving the third character string input by the user or replacing the target character string to be corrected in the at least one character string to be corrected with the third character string, delete the corresponding character string corresponding to the second character string in the first text information. text information.
在一个实施例中,第一字符串和第二字符串为在输入法界面的输入框中输入的字符;In one embodiment, the first character string and the second character string are characters entered in an input box of an input method interface;
显示单元906,用于接收用户输入的第二字符串之后,在用户输入的第二字符串满足预设条件的情况下,在输入法界面显示第一字符串对应的文字信息,其中,不显示第二字符串对应的文字信息。The display unit 906 is configured to, after receiving the second character string input by the user, display the text information corresponding to the first character string on the input method interface under the condition that the second character string input by the user satisfies the preset condition. Text information corresponding to the second character string.
在一个实施例中,将至少一个待矫正字符串中的目标待矫正字符串替换为第三字符串,包括:In one embodiment, the target character string to be corrected in at least one character string to be corrected is replaced with a third character string, including:
在目标时间之后的第一预设时长内接收到用户对目标待矫正字符串的标记的第一输入的情况下,将至少一个待矫正字符串中的目标待矫正字符串替换为第三字符串,其中,目标时间为第三字符串的输入结束时间。In the case where the user's first input of the mark of the target string to be corrected is received within the first preset time period after the target time, the target string to be corrected in the at least one string to be corrected is replaced with a third string , where the target time is the input end time of the third string.
在一个实施例中,处理器910,用于在第一字符串中包括第二字符串的情况下,对第一字符串中的第二字符串进行标记。In one embodiment, the processor 910 is configured to mark the second character string in the first character string when the second character string is included in the first character string.
在一个实施例中,至少一个待矫正字符串包括:In one embodiment, at least one character string to be corrected includes:
第一字符串中与第二字符串位置关联,且与第三字符串相似度匹配的至少一个字符串。At least one character string in the first character string that is associated with the position of the second character string and matches the similarity of the third character string.
在一个实施例中,对所述第一字符串中与所述第二字符串关联的至少一个待矫正字符串进行标记,包括以下至少一项:In one embodiment, marking at least one character string to be corrected associated with the second character string in the first character string includes at least one of the following:
对至少一个待矫正字符串进行颜色高亮标记;Color highlighting at least one character string to be corrected;
通过第一标记图形,对至少一个待矫正字符串进行标记,待矫正字符串位于第一标记图形内;Mark at least one character string to be corrected by using the first marking pattern, and the character string to be corrected is located in the first marking pattern;
通过标记按钮,对至少一个待矫正字符串进行标记,标记按钮位于输入法界面的输入框中待矫正字符串的显示区域中。At least one character string to be corrected is marked by the mark button, and the mark button is located in the display area of the character string to be corrected in the input box of the input method interface.
应理解的是,本申请实施例中,输入单元904可以包括图形处理器(Graphics Processing Unit,GPU)9041和麦克风9042,图形处理器9041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。显示单元906可包括显示面板9061,可以采用液晶显示器、有机发光二极管等形式来配置显示面板9061。用户输入单元907包括触控面板9071以及其他输入设备9072。触控面板9071,也称为触摸屏。触控面板9071可包括触摸检测装置和触摸控制器两个部分。其他输入设备9072可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。存储器909可用于存储软件程序以及各种数据,包括但不限于应用程序和操作系统。处理器910可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是, 上述调制解调处理器也可以不集成到处理器910中。It should be understood that, in this embodiment of the present application, the input unit 904 may include a graphics processor (Graphics Processing Unit, GPU) 9041 and a microphone 9042. Such as camera) to obtain still pictures or video image data for processing. The display unit 906 may include a display panel 9061, which may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 907 includes a touch panel 9071 and other input devices 9072 . The touch panel 9071 is also called a touch screen. The touch panel 9071 may include two parts, a touch detection device and a touch controller. Other input devices 9072 may include, but are not limited to, physical keyboards, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, and joysticks, which will not be repeated here. Memory 909 may be used to store software programs as well as various data, including but not limited to application programs and operating systems. The processor 910 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and an application program, and the like, and the modem processor mainly processes wireless communication. It can be understood that, the above-mentioned modulation and demodulation processor may not be integrated into the processor 910.
本申请实施例还提供一种可读存储介质,所述可读存储介质可以是非易失的,也可以是易失的,所述可读存储介质上存储有程序或指令,该程序或指令被处理器执行时实现上述输入矫正方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。The embodiments of the present application further provide a readable storage medium, the readable storage medium may be non-volatile or volatile, and a program or an instruction is stored on the readable storage medium, and the program or instruction is stored in the readable storage medium. When the processor executes, each process of the above-mentioned input correction method embodiment is implemented, and the same technical effect can be achieved. In order to avoid repetition, details are not described here.
其中,所述处理器为上述实施例中所述的电子设备中的处理器。所述可读存储介质,包括计算机可读存储介质,如计算机只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等。Wherein, the processor is the processor in the electronic device described in the foregoing embodiments. The readable storage medium includes a computer-readable storage medium, such as a computer read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, and the like.
本申请实施例另提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现上述输入矫正方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。An embodiment of the present application further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction to implement the input correction method embodiments described above. Each process can achieve the same technical effect. In order to avoid repetition, it will not be repeated here.
应理解,本申请实施例提到的芯片还可以称为系统级芯片、系统芯片、芯片系统或片上系统芯片等。It should be understood that the chip mentioned in the embodiments of the present application may also be referred to as a system-on-chip, a system-on-chip, a system-on-a-chip, or a system-on-a-chip, or the like.
本申请实施例另提供了一种计算机程序产品,其中,所述计算机程序产品被存储在非瞬态的可读存储介质中,所述计算机程序产品被至少一个处理器执行以实现上述输入矫正方法实施例中的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。An embodiment of the present application further provides a computer program product, wherein the computer program product is stored in a non-transitory readable storage medium, and the computer program product is executed by at least one processor to implement the above input correction method Each process in the embodiment can achieve the same technical effect, and in order to avoid repetition, it will not be repeated here.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。此外,需要指出的是,本申请实施方式中的方法和装置的范围不限按示出或讨论的顺序来执行功能,还可包括根据所涉及的功能按基本同时的方式或按相反的顺序来执行功能,例如, 可以按不同于所描述的次序来执行所描述的方法,并且还可以添加、省去、或组合各种步骤。另外,参照某些示例所描述的特征可在其他示例中被组合。It should be noted that, herein, the terms "comprising", "comprising" or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements, It also includes other elements not expressly listed or inherent to such a process, method, article or apparatus. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in a process, method, article or apparatus that includes the element. Furthermore, it should be noted that the scope of the methods and apparatus in the embodiments of the present application is not limited to performing the functions in the order shown or discussed, but may also include performing the functions in a substantially simultaneous manner or in the reverse order depending on the functions involved. To perform functions, for example, the described methods may be performed in an order different from that described, and various steps may also be added, omitted, or combined. Additionally, features described with reference to some examples may be combined in other examples.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以计算机软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法。From the description of the above embodiments, those skilled in the art can clearly understand that the method of the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is better implementation. Based on this understanding, the technical solutions of the present application can be embodied in the form of computer software products that are essentially or contribute to the prior art, and the computer software products are stored in a storage medium (such as ROM/RAM, magnetic disk , CD), including several instructions to make a terminal (which may be a mobile phone, a computer, a server, or a network device, etc.) execute the methods described in the various embodiments of the present application.
上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。The embodiments of the present application have been described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific embodiments, which are merely illustrative rather than restrictive. Under the inspiration of this application, without departing from the scope of protection of the purpose of this application and the claims, many forms can be made, which all fall within the protection of this application.

Claims (17)

  1. 一种输入矫正方法,所述方法包括:An input correction method, the method comprises:
    在当前输入法界面已输入第一字符串的情况下,接收用户输入的第二字符串;In the case that the first character string has been input in the current input method interface, receive the second character string input by the user;
    在所述第一字符串中包括所述第二字符串的情况下,若接收到用户输入的第三字符串,则对所述第一字符串中与所述第二字符串关联的至少一个待矫正字符串进行标记;In the case that the second character string is included in the first character string, if a third character string input by the user is received, at least one character string associated with the second character string in the first character string The string to be corrected is marked;
    将所述至少一个待矫正字符串中的目标待矫正字符串替换为所述第三字符串。The target character string to be corrected in the at least one character string to be corrected is replaced with the third character string.
  2. 根据权利要求1所述的方法,其中,所述接收用户输入的第二字符串之后,所述方法还包括:The method according to claim 1, wherein after receiving the second character string input by the user, the method further comprises:
    在所述输入法界面显示所述第一字符串和所述第二字符串对应的第一文字信息;Displaying first text information corresponding to the first character string and the second character string on the input method interface;
    在所述接收到用户输入的第三字符串或者将所述至少一个待矫正字符串中的目标待矫正字符串替换为所述第三字符串之后,所述方法还包括:After the third character string input by the user is received or the target character string to be corrected in the at least one character string to be corrected is replaced with the third character string, the method further includes:
    在所述第一文字信息中删除所述第二字符串对应的文字信息。The text information corresponding to the second character string is deleted from the first text information.
  3. 根据权利要求1所述的方法,其中,所述第一字符串和所述第二字符串为在输入法界面的输入框中输入的字符,所述接收用户输入的第二字符串之后,所述方法还包括:The method according to claim 1, wherein the first character string and the second character string are characters input in an input box of an input method interface, and after receiving the second character string input by the user, the The method also includes:
    在所述用户输入的第二字符串满足预设条件的情况下,在输入法界面显示所述第一字符串对应的文字信息,其中,不显示所述第二字符串对应的文字信息。When the second character string input by the user satisfies the preset condition, the text information corresponding to the first character string is displayed on the input method interface, wherein the text information corresponding to the second character string is not displayed.
  4. 根据权利要求1所述的方法,其中,所述将所述至少一个待矫正字符串中的目标待矫正字符串替换为所述第三字符串,包括:The method according to claim 1, wherein the replacing the target character string to be corrected in the at least one character string to be corrected with the third character string comprises:
    在目标时间之后的第一预设时长内接收到用户对所述目标待矫正字符串的标记的第一输入的情况下,将所述至少一个待矫正字符串中的目标待矫正 字符串替换为所述第三字符串,其中,所述目标时间为所述第三字符串的输入结束时间。In the case where the user's first input of the mark of the target character string to be corrected is received within a first preset time period after the target time, the target character string to be corrected in the at least one character string to be corrected is replaced with The third character string, wherein the target time is the input end time of the third character string.
  5. 根据权利要求1所述的方法,其中,在所述第一字符串中包括所述第二字符串的情况下,所述方法还包括:The method of claim 1, wherein, in the case that the second character string is included in the first character string, the method further comprises:
    对所述第一字符串中的所述第二字符串进行标记。marking the second character string in the first character string.
  6. 根据权利要求1所述的方法,其中,所述至少一个待矫正字符串包括:The method of claim 1, wherein the at least one character string to be corrected comprises:
    所述第一字符串中与所述第二字符串位置关联,且与所述第三字符串相似度匹配的至少一个字符串。At least one character string in the first character string that is associated with the position of the second character string and matches the similarity of the third character string.
  7. 一种输入矫正装置,所述装置包括:An input correction device, the device comprises:
    第一接收模块,用于在当前输入法界面已输入第一字符串的情况下,接收用户输入的第二字符串;a first receiving module, configured to receive the second character string input by the user when the first character string has been input in the current input method interface;
    第一标记模块,用于在所述第一字符串中包括所述第二字符串的情况下,若接收到用户输入的第三字符串,则对所述第一字符串中与所述第二字符串关联的至少一个待矫正字符串进行标记;The first marking module is configured to, in the case that the first character string includes the second character string, if a third character string input by the user is received, compare the first character string with the third character string. Mark at least one string to be corrected associated with the two strings;
    替换模块,用于将所述至少一个待矫正字符串中的目标待矫正字符串替换为所述第三字符串。A replacement module, configured to replace the target character string to be corrected in the at least one character string to be corrected with the third character string.
  8. 根据权利要求7所述的装置,其中,所述装置还包括:The apparatus of claim 7, wherein the apparatus further comprises:
    第一显示模块,用于所述接收用户输入的第二字符串之后,在所述输入法界面显示所述第一字符串和所述第二字符串对应的第一文字信息;a first display module, configured to display the first text information corresponding to the first character string and the second character string on the input method interface after receiving the second character string input by the user;
    删除模块,用于在所述接收到用户输入的第三字符串或者将所述至少一个待矫正字符串中的目标待矫正字符串替换为所述第三字符串之后,在所述第一文字信息中删除所述第二字符串对应的文字信息。A deletion module, configured to, after receiving the third character string input by the user or replacing the target character string to be corrected in the at least one character string to be corrected with the third character string, the first text message Delete the text information corresponding to the second character string.
  9. 根据权利要求7所述的装置,其中,所述第一字符串和所述第二字符串为在输入法界面的输入框中输入的字符;The device according to claim 7, wherein the first character string and the second character string are characters input in an input box of an input method interface;
    所述装置还包括:The device also includes:
    第二显示模块,用于所述接收用户输入的第二字符串之后,在所述用户输入的第二字符串满足预设条件的情况下,在输入法界面显示所述第一字符 串对应的文字信息,其中,不显示所述第二字符串对应的文字信息。The second display module is configured to, after receiving the second character string input by the user, in the case that the second character string input by the user satisfies the preset condition, display the corresponding character string corresponding to the first character string on the input method interface Text information, wherein the text information corresponding to the second character string is not displayed.
  10. 根据权利要求7所述的装置,其中,所述将所述至少一个待矫正字符串中的目标待矫正字符串替换为所述第三字符串,包括:The device according to claim 7, wherein the replacing the target character string to be corrected in the at least one character string to be corrected with the third character string comprises:
    在目标时间之后的第一预设时长内接收到用户对所述目标待矫正字符串的标记的第一输入的情况下,将所述至少一个待矫正字符串中的目标待矫正字符串替换为所述第三字符串,其中,所述目标时间为所述第三字符串的输入结束时间。In the case where the user's first input of the mark of the target character string to be corrected is received within a first preset time period after the target time, the target character string to be corrected in the at least one character string to be corrected is replaced with The third character string, wherein the target time is the input end time of the third character string.
  11. 根据权利要求7所述的装置,其中,所述装置还包括:The apparatus of claim 7, wherein the apparatus further comprises:
    第二标记模块,用于在所述第一字符串中包括所述第二字符串的情况下,对所述第一字符串中的所述第二字符串进行标记。A second marking module, configured to mark the second character string in the first character string when the first character string includes the second character string.
  12. 根据权利要求7所述的装置,其中,所述至少一个待矫正字符串包括:The apparatus of claim 7, wherein the at least one character string to be corrected comprises:
    所述第一字符串中与所述第二字符串位置关联,且与所述第三字符串相似度匹配的至少一个字符串。At least one character string in the first character string that is associated with the position of the second character string and matches the similarity of the third character string.
  13. 一种电子设备,包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的程序或指令,其中,所述程序或指令被所述处理器执行时实现如权利要求1至6中任一项所述的输入矫正方法的步骤。An electronic device, comprising a processor, a memory, and a program or instruction stored on the memory and executable on the processor, wherein the program or instruction is executed by the processor to implement the method as claimed in claim 1 Steps of the input correction method described in any one of to 6.
  14. 一种可读存储介质,所述可读存储介质上存储程序或指令,其中,所述程序或指令被处理器执行时实现如权利要求1至6中任一项所述的输入矫正方法的步骤。A readable storage medium on which a program or an instruction is stored, wherein, when the program or instruction is executed by a processor, the steps of the input correction method according to any one of claims 1 to 6 are realized .
  15. 一种芯片,所述芯片包括处理器和通信接口,其中,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如权利要求1至6中任一项所述的输入矫正方法的步骤。A chip comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or an instruction to implement the method described in any one of claims 1 to 6 The steps of the input correction method.
  16. 一种计算机程序产品,其中,所述计算机程序产品存储在非瞬态的存储介质中,所述计算机程序产品被至少一个处理器执行以实现如权利要求1至6中任一项所述的输入矫正方法的步骤。A computer program product, wherein the computer program product is stored in a non-transitory storage medium, the computer program product being executed by at least one processor to implement an input as claimed in any one of claims 1 to 6 The steps of the corrective method.
  17. 一种通信设备,被配置为执行如权利要求1至6中任一项所述的输入矫正方法的步骤。A communication device configured to perform the steps of an input correction method as claimed in any one of claims 1 to 6.
PCT/CN2022/090305 2021-05-06 2022-04-29 Input correction method and apparatus WO2022233275A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110491536.8 2021-05-06
CN202110491536.8A CN113190125A (en) 2021-05-06 2021-05-06 Input correction method and device

Publications (1)

Publication Number Publication Date
WO2022233275A1 true WO2022233275A1 (en) 2022-11-10

Family

ID=76983954

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/090305 WO2022233275A1 (en) 2021-05-06 2022-04-29 Input correction method and apparatus

Country Status (2)

Country Link
CN (1) CN113190125A (en)
WO (1) WO2022233275A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113190125A (en) * 2021-05-06 2021-07-30 维沃移动通信(杭州)有限公司 Input correction method and device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101710262A (en) * 2009-12-11 2010-05-19 北京搜狗科技发展有限公司 Error correction method and error correction device of characters
CN105247446A (en) * 2013-05-16 2016-01-13 株式会社酷凯 Type error correction method and device implementing the same method
CN107688399A (en) * 2016-08-05 2018-02-13 北京搜狗科技发展有限公司 A kind of input method and device, a kind of device for being used to input
US20190196712A1 (en) * 2014-10-28 2019-06-27 Farzan Fallah Systems and Methods for Facilitating Data Entry into Small Screen Electronic Devices
CN109948122A (en) * 2017-12-21 2019-06-28 北京金山安全软件有限公司 Error correction method and device for input text and electronic equipment
CN113190125A (en) * 2021-05-06 2021-07-30 维沃移动通信(杭州)有限公司 Input correction method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101710262A (en) * 2009-12-11 2010-05-19 北京搜狗科技发展有限公司 Error correction method and error correction device of characters
CN105247446A (en) * 2013-05-16 2016-01-13 株式会社酷凯 Type error correction method and device implementing the same method
US20190196712A1 (en) * 2014-10-28 2019-06-27 Farzan Fallah Systems and Methods for Facilitating Data Entry into Small Screen Electronic Devices
CN107688399A (en) * 2016-08-05 2018-02-13 北京搜狗科技发展有限公司 A kind of input method and device, a kind of device for being used to input
CN109948122A (en) * 2017-12-21 2019-06-28 北京金山安全软件有限公司 Error correction method and device for input text and electronic equipment
CN113190125A (en) * 2021-05-06 2021-07-30 维沃移动通信(杭州)有限公司 Input correction method and device

Also Published As

Publication number Publication date
CN113190125A (en) 2021-07-30

Similar Documents

Publication Publication Date Title
JP6151381B2 (en) Virtual keyboard input for international languages
US9977779B2 (en) Automatic supplementation of word correction dictionaries
US9152323B2 (en) Virtual keyboard providing an indication of received input
US8612213B1 (en) Correction of errors in character strings that include a word delimiter
JP2013238936A (en) Character input device, electronic apparatus, control method, control program and recording medium
CN113518026B (en) Message processing method and device and electronic equipment
EP2909702B1 (en) Contextually-specific automatic separators
WO2022135474A1 (en) Information recommendation method and apparatus, and electronic device
CN109002183B (en) Information input method and device
WO2022247789A1 (en) Candidate word update method and apparatus, and electronic device
WO2022233275A1 (en) Input correction method and apparatus
WO2022105754A1 (en) Character input method and apparatus, and electronic device
WO2022143341A1 (en) Input method candidate word display method and apparatus, and electronic device
CN112764734B (en) Auxiliary method and device for code editing and electronic equipment
WO2022135294A1 (en) Candidate word display method and apparatus, and electronic device
WO2023036115A1 (en) Text content selection method and apparatus
WO2023045920A1 (en) Text display method and text display apparatus
WO2022143523A1 (en) Vocabulary display method and apparatus, and electronic device
WO2022100622A1 (en) Candidate word display method and apparatus, and electronic device
WO2022194207A1 (en) Input method and apparatus, electronic device and readable storage medium
WO2022247814A1 (en) Method and apparatus for selecting target character, electronic device, and storage medium
WO2022156817A1 (en) Content extraction method and apparatus
WO2016107611A1 (en) Method and device for text search for mobile terminal
CN114356113A (en) Input method and input device
CN103123572A (en) Character input method and electronic device

Legal Events

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

Ref document number: 22798616

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 22798616

Country of ref document: EP

Kind code of ref document: A1