Text processing methods, apparatus and computer equipment, storage media and software products

By adding a second virtual keyboard with stroke information to the input method editor, the problem of inputting special texts whose pronunciation is unknown is solved, and the effect of quickly inputting special texts is achieved.

CN117555470BActive Publication Date: 2026-11-17TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202210934089.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-04
Publication Date
2026-11-17
Estimated Expiration
2042-08-04

AI Technical Summary

Technical Problem

Existing input method editors struggle to quickly input special texts whose pronunciation is unknown, resulting in a poor text input experience.

Method used

A text processing method is provided, which displays a second virtual keyboard in the text input panel. The second virtual keyboard adds stroke information on the basis of the first virtual keyboard, and supports input of special text in the form of pinyin, stroke, or a combination of pinyin and stroke.

Benefits of technology

It enables quick and convenient input of special text, improving the text input experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117555470B_ABST
    Figure CN117555470B_ABST
Patent Text Reader

Abstract

This application provides a text processing method, apparatus, computer device, storage medium, and program product. The text processing method includes: displaying a text input panel, which includes a first virtual keyboard; when the text input panel is in a special text mode, displaying a second virtual keyboard on the text input panel, the second virtual keyboard adding stroke information to the first virtual keyboard; performing an input operation through the second virtual keyboard; and displaying special text corresponding to the input operation, the special text being uncommon text. Using this application embodiment, special text can be entered conveniently and quickly, improving the text input experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular, to a text processing method, a text processing apparatus, a computer device, a computer readable storage medium, and a computer program product. Background Art

[0002] As a text input tool, input method editors are widely used in various text input scenarios, and text input can be performed in a terminal installed with an input method editor through the input method editor. Currently, input method editors can support the input of most commonly used texts. However, for some less commonly used texts (which may also be referred to as special texts), existing input method editors do not support the input of these special texts, which results in extremely poor text input experience in some text input scenarios. For example, for some special texts whose pronunciation is unknown (such as special texts like "淼", "夔", "佾", etc.), it becomes very difficult to query their pronunciation by inputting the special texts. Therefore, how to conveniently and quickly input special texts to improve the text input experience has become a current research hotspot in text input scenarios. Summary of the Invention

[0003] Embodiments of the present application provide a text processing method, apparatus, computer device, storage medium, and program product, which can conveniently and quickly input special texts and improve the text input experience.

[0004] In one aspect, an embodiment of the present application provides a text processing method, where the text processing method includes:

[0005] displaying a text input panel, where the text input panel includes a first virtual keyboard;

[0006] when the text input panel is in a special text mode, displaying a second virtual keyboard in the text input panel, where the second virtual keyboard is obtained by transforming the first virtual keyboard, and stroke information is added to the second virtual keyboard on the basis of the first virtual keyboard;

[0007] performing an input operation through the second virtual keyboard; and displaying a special text corresponding to the input operation, where the special text is a less commonly used text.

[0008] In another aspect, an embodiment of the present application provides a text processing apparatus, where the text processing apparatus includes:

[0009] a display unit, configured to display a text input panel, where the text input panel includes a first virtual keyboard;

[0010] the display unit is further configured to, when the text input panel is in a special text mode, display a second virtual keyboard in the text input panel, where stroke information is added to the second virtual keyboard on the basis of the first virtual keyboard;

[0011] The display unit is also used to perform input operations via a second virtual keyboard; and to display special text corresponding to the input operation, wherein the special text is uncommon text.

[0012] In one implementation, the display unit is also used to perform the following steps:

[0013] Perform character input operations using the first virtual keyboard;

[0014] If the character entered through the first virtual keyboard is a mode switching character, the special text mode switch will be displayed.

[0015] If the special text mode switch is turned on, the text input panel is in special text mode.

[0016] In one implementation, the display unit is also used to perform the following steps:

[0017] Display a mode switching area in the text input panel, which includes special text mode options;

[0018] If the special text mode option is triggered, it will determine that the text input panel is in special text mode.

[0019] In one implementation, the display unit is also used to perform the following steps:

[0020] Voice input is performed via the first virtual keyboard; if the voice input information performed via the first virtual keyboard is special text mode voice, then the text input panel is determined to be in special text mode.

[0021] Alternatively, a gesture input operation can be performed via the first virtual keyboard; if the gesture input operation performed via the first virtual keyboard is a special text mode gesture, then the text input panel is determined to be in special text mode.

[0022] In one implementation, the first virtual keyboard includes multiple character input keys for inputting characters; the process of adding stroke information includes:

[0023] Add stroke information to the target character input key among multiple character input keys to obtain a second virtual keyboard;

[0024] The target character input button, after adding stroke information, is used to input characters or stroke information.

[0025] In one implementation, the first virtual keyboard includes multiple character input keys for inputting characters; the process of adding stroke information includes:

[0026] Add stroke input buttons to the first virtual keyboard to obtain the second virtual keyboard. The stroke input buttons include stroke information and are used to input stroke information.

[0027] In one implementation, the display unit, when performing an input operation via the second virtual keyboard, specifically performs the following steps:

[0028] Character input is performed via a second virtual keyboard, wherein a string is entered via the second virtual keyboard and the displayed special text matches the string entered via the second virtual keyboard; or, voice input is performed via the second virtual keyboard, wherein voice information is entered via the second virtual keyboard and the displayed special text matches the voice information entered via the second virtual keyboard.

[0029] In one implementation, the special text includes multiple sub-items. When a character input operation is performed via the second virtual keyboard, the input string includes a substring corresponding to each of the multiple sub-items. The display unit is used to perform any of the following steps when a character input operation is performed via the second virtual keyboard:

[0030] Input multiple substrings using Pinyin on the second virtual keyboard;

[0031] Multiple substrings can be input using stroke input on the second virtual keyboard;

[0032] Multiple substrings can be input using a combination of pinyin and stroke input on the second virtual keyboard.

[0033] In one implementation, a target split item exists in the special text, and the target split item is matched with the corresponding substring of the target split item in the string by the pictographic text corresponding to the target split item.

[0034] In one implementation, the input operation performed via the second virtual keyboard is a character input operation. The character input operation via the second virtual keyboard inputs a string. The display unit is also used to perform the following steps:

[0035] When there is an input error in the string, the corresponding error correction string is displayed, and the special text displayed matches the error correction string.

[0036] In one implementation, the display unit is also used to perform the following steps:

[0037] Output special text as an image.

[0038] In one implementation, the input operation performed via the second virtual keyboard is a character input operation, and the character input operation performed via the second virtual keyboard inputs a string; the text processing device further includes a processing unit, which is used to perform the following steps:

[0039] The keyboard layout of the second virtual keyboard is determined. The keyboard layout includes at least the first keyboard layout and the second keyboard layout. Different keyboard layouts correspond to different matching rules.

[0040] According to the matching rules corresponding to the determined keyboard layout, obtain the special text that matches the string.

[0041] In one implementation, the keyboard layout is a first keyboard layout; the processing unit, when obtaining special text that matches the string according to the matching rules corresponding to the determined keyboard layout, specifically performs the following steps:

[0042] Perform stroke matching on strings using a stroke database;

[0043] If stroke matching of the string fails, then the corresponding pinyin string in the pinyin library will be matched for pinyin.

[0044] If the pinyin matching of the string is successful, the text matched by the pinyin will be identified as the special text.

[0045] In one implementation, the keyboard layout is a second keyboard layout; the processing unit, when obtaining special text that matches the string according to the matching rules corresponding to the determined keyboard layout, specifically performs the following steps:

[0046] Perform stroke matching on strings using a stroke database;

[0047] If stroke matching of the string fails, then pinyin matching of the string is performed in the pinyin library;

[0048] If the pinyin matching of the string fails, the string will be matched using a combination of pinyin and strokes in the pinyin and stroke matching library.

[0049] If a mixed match of strings is successful, the matched text will be identified as special text.

[0050] In one implementation, the pinyin-stroke mixing library includes multiple texts to be matched and multiple split items for each text; the processing unit, when performing mixed matching of strings in the pinyin-stroke mixing library, specifically performs the following steps:

[0051] Retrieve the current text to be matched from the Pinyin-stroke mixing library;

[0052] Match each of the multiple splits in the current text to be matched with its corresponding substring in the string;

[0053] If each of the multiple split items of the current text to be matched successfully matches its corresponding substring in the string, then the string is determined to match the current text to be matched successfully, and the current text to be matched is determined to be the text of the mixed match;

[0054] If a matched text exists in the Pinyin-stroke mixing library, then the string matching is considered successful.

[0055] In one implementation, the matching process between any split item in the current text to be matched and its corresponding substring in the string includes:

[0056] Perform stroke matching between the split items and their corresponding substrings;

[0057] If stroke matching between the split item and its corresponding substring fails, then pinyin matching between the split item and its corresponding substring is performed.

[0058] If the pinyin matching of the split item and its corresponding substring fails, then the split item and its corresponding substring will be split and matched.

[0059] If the splitting of the split item and its corresponding substring fails to be matched, then the split item and its corresponding substring are matched as a whole.

[0060] If the overall matching of the split item and its corresponding substring is successful, then the split item and its corresponding substring are considered to be successfully matched.

[0061] In one implementation, the processing unit, when performing pinyin matching between the split item and its corresponding substring, specifically executes the following steps:

[0062] Get the pinyin string of the pictographic text corresponding to the split item;

[0063] Match the substrings corresponding to the split items with the pinyin strings of the pictographic text.

[0064] In one implementation, the processing unit is further configured to perform the following steps:

[0065] If no special text matching the string is obtained, the string is corrected to obtain multiple corrected strings and the priority of each corrected string.

[0066] Prune multiple error correction strings according to their priority order;

[0067] Get the special text that matches the correction string after pruning.

[0068] Accordingly, embodiments of this application provide a computer device, which includes:

[0069] A processor is a tool for implementing computer programs.

[0070] A computer-readable storage medium storing a computer program adapted to be loaded by a processor and executed by the text processing method described above.

[0071] Accordingly, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when read and executed by a processor of a computer device, causes the computer device to perform the aforementioned text processing method.

[0072] Accordingly, embodiments of this application provide a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the aforementioned text processing method.

[0073] In this embodiment, a text input panel including a first virtual keyboard can be displayed. When the text input panel is in special text mode, a second virtual keyboard can be displayed on the text input panel. The second virtual keyboard adds stroke information on the basis of the first virtual keyboard. By performing an input operation on the second virtual keyboard, the special text corresponding to the input operation can be displayed. The special text is uncommon text. In other words, when the text input panel is in special text mode, special text can be entered conveniently and quickly, which can improve the text input experience. Attached Figure Description

[0074] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0075] Figure 1a This is a schematic diagram of the interface of an input method editor provided in an embodiment of this application;

[0076] Figure 1bThis is a schematic diagram of a virtual keyboard layout provided in an embodiment of this application;

[0077] Figure 2 This is a flowchart illustrating a text processing method provided in an embodiment of this application;

[0078] Figure 3a This is an interface diagram illustrating a special text mode triggering method provided in an embodiment of this application;

[0079] Figure 3b This is an interface diagram illustrating another special text mode triggering method provided in this application embodiment;

[0080] Figure 3c This is an interface diagram illustrating another special text mode triggering method provided in this application embodiment;

[0081] Figure 3d This is an interface diagram illustrating another special text mode triggering method provided in this application embodiment;

[0082] Figure 3e This is an interface diagram illustrating another special text mode triggering method provided in this application embodiment;

[0083] Figure 4a This is a schematic diagram of the interface for the transformation process of a virtual keyboard provided in an embodiment of this application;

[0084] Figure 4b This is a schematic diagram of an interface that highlights stroke information according to an embodiment of this application;

[0085] Figure 4c This is a schematic diagram of the interface for another virtual keyboard transformation process provided in an embodiment of this application;

[0086] Figure 4d This is a schematic diagram of an interface that highlights stroke input buttons according to an embodiment of this application;

[0087] Figure 5a This is a schematic diagram of an interface for inputting special text using characters, provided in an embodiment of this application.

[0088] Figure 5b This is a schematic diagram of another interface for inputting special text using characters, provided in an embodiment of this application;

[0089] Figure 5c This is a schematic diagram of another interface for inputting special text using characters, provided in an embodiment of this application;

[0090] Figure 6 This is a schematic diagram of an interface for voice input of special text provided in an embodiment of this application;

[0091] Figure 7 This is a schematic diagram of an interface illustrating a special text display method provided in an embodiment of this application;

[0092] Figure 8a This is a schematic diagram of a string correction interface provided in an embodiment of this application;

[0093] Figure 8b This is a schematic diagram of another string correction interface provided in an embodiment of this application;

[0094] Figure 9 This is a schematic diagram of an interface for fuzzy matching of special text provided in an embodiment of this application;

[0095] Figure 10 This is a schematic diagram of an interface for outputting special text from an image, provided in an embodiment of this application;

[0096] Figure 11 This is a flowchart illustrating another text processing method provided in an embodiment of this application;

[0097] Figure 12 This is a schematic diagram illustrating a string-to-special-text matching process provided in an embodiment of this application;

[0098] Figure 13 This is a schematic diagram of a Pinyin network provided in an embodiment of this application;

[0099] Figure 14 This is a schematic diagram of another string-to-special text matching process provided in an embodiment of this application;

[0100] Figure 15 This is a schematic diagram of another string-to-special text matching process provided in an embodiment of this application;

[0101] Figure 16 This is a schematic diagram of the structure of a text processing device provided in an embodiment of this application;

[0102] Figure 17 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0103] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0104] To better understand the technical solutions provided in the embodiments of this application, the key terms involved in the embodiments of this application will be introduced first:

[0105] (1) Input method editor. An input method editor is a text input tool based on an input method for text input. For example, input method software, input method platform, input method application, input method system, etc. can all be considered as input method editors. Among them, input method refers to the encoding method used to input various symbols into the terminal. For example, input method can include, but is not limited to, Pinyin input method and Wubi input method, etc.

[0106] Normally, such as Figure 1a As shown, the input method editor can be presented as a text input panel 10. The text input panel 10 may include a virtual keyboard 101, and corresponding text can be entered by performing input operations on the virtual keyboard 101. The virtual keyboard, in contrast to the physical keyboard, refers to a keyboard that exists virtually in the terminal. The virtual keyboard may include multiple character input keys (e.g., ...). Figure 1a The character input keys (such as the character "s" and the character ".") are used to input characters. The input keys are the input operations performed on the virtual keyboard, that is, the triggering operations of the character input keys on the virtual keyboard.

[0107] Virtual keyboards can have various layouts. A keyboard layout specifically refers to the arrangement of character input keys and their corresponding characters. Common keyboard layouts include at least 9-key and 26-key layouts, such as... Figure 1b As shown, the virtual keyboard 101 included in the text input panel 10 on the left has a 26-key layout, while the virtual keyboard 101 included in the text input panel 10 on the right has a 9-key layout.

[0108] (2) Special texts. Special texts are texts that are not commonly used in daily life, such as rare or obscure characters. Special texts can be divided into two categories: one is special texts whose pronunciation is unknown, and the other is special texts whose pronunciation is known. For the first type of special texts, existing input method editors based on pinyin input methods cannot input this type of special text. For the second type of special texts, after inputting the pinyin of this type of special text through an input method editor based on pinyin input methods, the displayed text is usually common characters with the same pinyin. The special text is ranked low in the text with the same pinyin, requiring a lot of time to search for it.

[0109] Based on the relevant descriptions of the above key terms, the embodiments of the present application provide a text processing solution that can input special texts conveniently and quickly. In this text processing solution, when the text input panel is in the special text mode, the corresponding special text can be input conveniently and quickly by performing an input operation on the virtual keyboard corresponding to the special text mode, which improves the text input experience. Moreover, the input principle of the special text in the embodiments of the present application is a splitting principle, that is, the special text is split into several simple split items (for example, splitting the special text "Miao" into the split item "Shui", the split item "Shui" and the split item "Shui"), and the corresponding special text can be input by inputting these split items through a pinyin method, a stroke method, a pinyin-stroke hybrid method, a voice method or the like.

[0110] It should be noted that the text processing solution provided in the embodiments of the present application may be executed by a computer device, and the computer device may be a terminal. The terminal mentioned in the embodiments of the present application may be a smart phone, a tablet computer, a notebook computer, a desktop computer, an intelligent voice interaction device, a smart watch, a vehicle-mounted terminal, a smart home appliance, an aircraft, a wearable device, etc., but is not limited thereto.

[0111] The text processing solution provided in the embodiments of the present application will be described in more detail below with reference to the accompanying drawings.

[0112] The embodiments of the present application provide a text processing method, which mainly includes: a triggering mode of a special text mode, an input mode of a special text, and that the special text supports image output and other contents. The text processing method may be executed by a computer device, and the computer device may be a terminal device, such as Figure 2 As shown in the figure, the text processing method may include the following steps S201 to S204:

[0113] S201: Display a text input panel, where the text input panel includes a first virtual keyboard.

[0114] When there is a text input requirement, the text input panel may be displayed. The text input panel may include a first virtual keyboard, which is a virtual keyboard commonly used in daily life, for example, a 26-key pinyin virtual keyboard, a 9-key pinyin virtual keyboard, and so on; the first virtual keyboard corresponds to a normal text mode, which refers to a text input mode commonly used in daily life, for example, a text input mode for inputting text by inputting the pronunciation of the text; moreover, in the normal text mode, input of special texts with unknown pronunciations is not supported, and for some special texts with known pronunciations, a large amount of time is wasted searching among texts with the same pronunciation during input.

[0115] S202: When the text input panel is in a special text mode, display a second virtual keyboard in the text input panel.

[0116] When the text input panel is in special text mode, a second virtual keyboard can be displayed in the text input panel. This can be understood as the second virtual keyboard being the virtual keyboard displayed in the text input panel when the text input panel is in special text mode. In other words, the second virtual keyboard corresponds to special text mode, which refers to a text input mode that supports inputting special text. It can also refer to a text input mode that supports inputting special text by splitting it into multiple sub-items. In other words, special text can be input by performing input operations on the second virtual keyboard.

[0117] Special text modes can be triggered in the text input panel, and the triggering methods for special text modes can include, but are not limited to, any one or more of the following:

[0118] (1) Triggered by a special text mode switch. Specifically, character input operations can be performed through the first virtual keyboard. If the character input performed through the first virtual keyboard is a mode switching character, that is, if the character input key corresponding to the mode switching character in the first virtual keyboard is triggered, the special text mode switch can be displayed. If the special text mode switch is turned on, it can be determined that the text input panel is in special text mode. The mode switching character can be the character corresponding to any character input key in the first virtual keyboard; or, the mode switching character can be the character corresponding to a specified character input key in the first virtual keyboard. For example, the mode switching character can be the character "U", the character "V" or the character "i", etc. These characters are difficult to match with relevant text when input alone, which helps to quickly confirm the existence of special text input requirements; this application embodiment does not limit this.

[0119] It is worth noting that the method of switching characters via the first virtual keyboard input mode is related to the keyboard layout of the first virtual keyboard. The keyboard layout of the first virtual keyboard can include at least one of the following: a first keyboard layout (i.e., a 9-key layout) or a second keyboard layout (i.e., a 26-key layout). In the 9-key layout, there may be cases where multiple characters correspond to the same character input key. Therefore, it is necessary to first trigger the character input key corresponding to the combined characters before selecting the actual character to be input; for example... Figure 3aAs shown, the mode switching character can be the character "U". The first virtual keyboard 301 included in the text input panel 30 has a 9-key layout. When the character input key 3011 corresponding to the combined character "TUV" in the first virtual keyboard 301 of the text input panel 30 is triggered, the character input key corresponding to each individual character in the combined character "TUV" can be displayed in the first virtual keyboard 301. If the character input key 3012 corresponding to the individual character "U" is triggered, the special text mode switch 302 can be displayed in the text input panel. Turning on the special text mode switch 302 will put the text input panel 30 into special text mode. In the 26-key layout, each character corresponds to a different character input key. Therefore, the character input key corresponding to the mode switching character can be directly triggered; for example... Figure 3b As shown, the mode switching character can be the "U" character. The keyboard arrangement of the first virtual keyboard 301 contained in the text input panel 30 is the second keyboard arrangement (i.e., 26-key arrangement). When the character input key 3012 corresponding to the "U" character in the first virtual keyboard 301 contained in the text input panel 30 is triggered, the special text mode switch 302 can be displayed in the text input panel. Turning on the special text mode switch 302 will put the text input panel 30 into special text mode.

[0120] It should be noted that the special text mode switch can be displayed immediately after the character input key corresponding to the mode switching character in the first virtual keyboard is triggered. This can speed up the entry into the special text input mode. Alternatively, the special text mode switch can be displayed if no other character input key in the first virtual keyboard is detected within the target time period after the character input key corresponding to the mode switching character in the first virtual keyboard is triggered. This can prevent accidental input of the mode switching character or input of the mode switching character that is not intended to trigger the special text mode.

[0121] (2) Triggered by a special text mode option. Specifically, a mode switching area can be displayed in the text input panel, which may include a special text mode option. If the special text mode option is triggered, it indicates that the text input panel is in special text mode. For example... Figure 3c As shown, the text input panel 30 may include a mode switching control 303. The mode switching area 304 may be displayed by triggering the mode switching control 303. The mode switching area 304 may include one or more text mode options. The special text mode option 3041 belongs to one or more text mode options. Triggering the special text mode option 3041 will put the text input panel 30 into special text mode.

[0122] (3) Triggered by voice input in special text mode. Specifically, voice input can be performed via the first virtual keyboard. If the voice input performed via the first virtual keyboard is in special text mode, then the text input panel is in special text mode. Figure 3d As shown, the first virtual keyboard 301 may include voice input characters 3013. Voice input operations can be performed through the voice input characters 3013 in the first virtual keyboard 301. If the voice information input by performing the voice input operation through the voice input characters 3013 in the first virtual keyboard 301 is a special text mode voice (such as "enter special text mode", "turn on special text mode", "I want to input special text", "I want to input rare characters", etc.), then the text input panel 30 can be put into special text mode.

[0123] Furthermore, if the voice input performed via the first virtual keyboard is a special text mode voice, a special text mode switch can be displayed. If the special text mode switch is turned on, it can be determined that the text input panel is in special text mode. In other words, after detecting a special text mode voice, the special text mode switch can be output again to determine whether the special text mode needs to be turned on. This can avoid the situation where special text mode voice is accidentally input, or where the input of special text mode voice is not intended to trigger the special text mode.

[0124] (4) Triggered by special text mode gestures. Specifically, gesture input operations can be performed through the first virtual keyboard. If the gesture input operation performed through the first virtual keyboard is a special text mode gesture, then it can be determined that the text input panel is in special text mode. For example... Figure 3e As shown, performing a gesture input operation through the first virtual keyboard 301 can be understood as adopting a target gesture (e.g., ...) on the first virtual keyboard 301. Figure 3e The gesture can be a single finger gesture to draw a graphic. The special text mode gesture can be a "U" graphic drawn using the target gesture. In other words, drawing a "U" graphic using the target gesture in the first virtual keyboard 301 can put the text input panel 30 into a special text mode.

[0125] Furthermore, if the gesture input operation performed through the first virtual keyboard is a special text mode gesture, a special text mode switch can be displayed. If the special text mode switch is turned on, it can be determined that the text input panel is in special text mode. In other words, after detecting the input of a special text mode gesture, it can be determined again whether the special text mode needs to be turned on by outputting the special text mode switch. This can avoid the situation where a special text mode gesture is accidentally input, or where the input of a special text mode gesture is not intended to trigger the special text mode.

[0126] It is easy to see from the four ways of triggering special text modes described above that the embodiments of this application can support a wide variety of ways to trigger special text modes. The appropriate way to trigger special text modes can be selected according to different text input needs, which greatly improves the text input experience.

[0127] After the text input panel is activated in special text mode, it can be switched back to normal text mode. Similar to the activation method for special text mode, the activation method for normal text mode can include, but is not limited to, any one or more of the following: First, it can be triggered by the special text mode switch; turning off the special text mode switch will put the text input panel in normal text mode. Second, it can be triggered by the normal text mode options; one or more text mode options in the mode switching area may also include a normal text mode option (e.g., ...). Figure 3cThe embodiments shown include the "Chinese 9-key" option or the "Chinese 26-key" option, which triggers the regular text mode option to put the text input panel into regular text mode; thirdly, it can be triggered by voice input in regular text mode, that is, if the voice input operation performed through the second virtual keyboard is a regular text mode voice (e.g., "Enter regular text mode", "Enable regular text mode", "I want to input regular text", etc.), the text input panel can be put into regular text mode; fourthly, it can be triggered by gesture input in regular text mode, that is, if the gesture input operation performed through the second virtual keyboard is a regular text mode gesture (e.g., drawing an "I" shape using a target gesture), the text input panel can be put into regular text mode. Therefore, the embodiments of this application can support a variety of triggering methods for switching back to regular text mode from special text modes, allowing for the selection of appropriate methods to trigger regular text mode according to different text input needs, greatly improving the text input experience. Furthermore, the various triggering methods of special text mode can be arbitrarily combined with the various triggering methods of regular text mode. For example, when triggering special text mode through the special text mode switch, it is not necessary to trigger regular text mode through the special text mode switch. Regular text mode can be triggered through the regular text mode option, or it can be triggered through regular text mode voice. This application embodiment does not limit this.

[0128] The above content of step S202 focuses on the triggering method of the special text mode. When the trigger text input panel is in the special text mode, a second virtual keyboard can be displayed in the text input panel. The second virtual keyboard can be obtained by transforming the first virtual keyboard. Specifically, the transformation can refer to adding stroke information to the second virtual keyboard based on the first virtual keyboard. The following content of step S202 will focus on the transformation process of the virtual keyboard:

[0129] In one implementation, the first virtual keyboard may include multiple character input keys. These keys can be used to input characters, and stroke information can be added to the existing character input keys in the first virtual keyboard. That is, stroke information can be added to a target character input key among the multiple character input keys included in the first virtual keyboard. In this implementation, the target character input key with added stroke information can be used to input characters or stroke information. For example... Figure 4aThe first image shows a schematic diagram of the transformation of the first virtual keyboard in a 26-key layout into the second virtual keyboard. Specifically, refer to the character input keys within the dotted box. You can add the stroke information "horizontal" to the character input key corresponding to the character "D" in the first virtual keyboard, the stroke information "vertical" to the character input key corresponding to the character "F", the stroke information "left-falling stroke" to the character input key corresponding to the character "G", the stroke information "right-falling stroke" to the character input key corresponding to the character "H", and the stroke information "turning stroke" to the character input key corresponding to the character "J". For example... Figure 4a The second image shows a schematic diagram of transforming the first virtual keyboard with a 9-key layout into the second virtual keyboard. Specifically, refer to the character input keys within the dotted box. You can add the stroke information "horizontal" to the character input key corresponding to the character "1" in the first virtual keyboard; "vertical" to the character input key corresponding to the combined characters "ABC"; "left-falling stroke" to the character input key corresponding to the combined characters "DEF"; "right-falling stroke" to the character input key corresponding to the character combined characters "GHI"; and "folding stroke" to the character input key corresponding to the character combined characters "JKL". This virtual keyboard transformation method maintains the original layout of the virtual keyboard.

[0130] In this implementation, the target character input keys can be multiple character input keys distributed in a specified manner on the first virtual keyboard. The specified distribution manner can be, for example, a continuous arrangement or a two-sided arrangement. A continuous arrangement can mean that the target character input keys are multiple character input keys arranged horizontally or vertically in the first virtual keyboard, as described above. Figure 4a In the first image, the character input keys corresponding to the characters "D", "F", "G", "H", and "J" are arranged horizontally and continuously in the first virtual keyboard. A two-sided arrangement can refer to multiple character input keys distributed on the left and right sides or top and bottom sides of the first virtual keyboard, as shown above. Figure 4a In the first image, the character input keys corresponding to the characters "Q", "A", "Z", "P", and "L" are distributed on the left and right sides of the first virtual keyboard. Alternatively, the target character input keys can be multiple character input keys randomly distributed in the first virtual keyboard; this application embodiment does not limit this.

[0131] In this implementation, the stroke information added to the target character input key can be highlighted. This highlighting can include, but is not limited to, any of the following: the display color of the stroke information is different from the display color of the character on the target character input key, for example... Figure 4b In the virtual keyboard shown, the stroke information added to the target character input key is displayed in a first color (e.g., gray), and the character in the target character input key is displayed in a second color (e.g., black). The display transparency of the stroke information is different from the display transparency of the character in the target character input key. For example, the display transparency of the stroke information added to the target character input key is lower than the display transparency of the character in the target character input key. This application embodiment does not limit this.

[0132] In another implementation, the first virtual keyboard may include multiple character input keys. These keys can be used to input characters, and stroke information can be added to these newly added stroke input keys. In other words, stroke input keys can be added to the first virtual keyboard, and these keys can include stroke information. In this implementation, the stroke input keys can be used to input stroke information. Figure 4c The first image shows a schematic diagram of the transformation of the first virtual keyboard (26-key layout) into the second virtual keyboard. For details, please refer to the stroke input keys within the dotted box. Stroke input keys can be added to the upper part of the first virtual keyboard; for example... Figure 4b The second image shows a schematic diagram of the transformation from the first virtual keyboard with a 9-key layout to the second virtual keyboard. Specifically, refer to the stroke input keys within the dotted box. Stroke input keys can be added to the left side of the first virtual keyboard. This transformation of the virtual keyboard distinguishes between the keys for inputting stroke information and the keys for inputting characters, making it easier to input accurate information.

[0133] In this implementation, the stroke input keys can be highlighted. Highlighting the stroke input keys can include, but is not limited to, any of the following: the fill color of the stroke input keys is different from the fill color of the character input keys, for example... Figure 4d In the virtual keyboard on the left side of the first row, the fill color of the stroke input keys is the first color (e.g., gray), and the fill color of the character input keys is the second color (e.g., white). The fill transparency of the stroke input keys is different from that of the character input keys. Figure 4d In the virtual keyboard on the right side of the first row, the fill opacity of the stroke input keys is lower than that of the character input keys; the shape of the stroke input keys is different from that of the character input keys, for example... Figure 4dIn the virtual keyboard on the second line, the key shape of the stroke input key is a first shape (for example, an ellipse), and the filling color of the character input key is a second shape (for example, a rounded rectangle).

[0134] In S203, an input operation is performed through the second virtual keyboard.

[0135] In S204, the special text corresponding to the input operation is displayed.

[0136] In steps S203 to S204, after the text input panel is in the special text mode, an input operation can be performed through the second virtual keyboard, and the special text corresponding to the input operation can be displayed. The embodiments of the present application may support inputting the corresponding special text by inputting characters, or may support inputting the corresponding special text by inputting voice. These two input manners are introduced respectively as follows:

[0137] ① Inputting the corresponding special text by inputting characters. Specifically, a character input operation can be performed through the second virtual keyboard, and the character string input by the character input operation can be displayed. In this manner, the displayed special text matches the character string input by the character input operation performed through the second virtual keyboard. As can be seen from the foregoing content, the input principle of the special text in the embodiments of the present application is a splitting principle, that is, the special text is split into some simple split items. In other words, the special text may include a plurality of split items, and correspondingly, the input character string may include a sub-character string corresponding to each of the plurality of split items; the sub-character string corresponding to any split item in the special text refers to a partial character string in the input character string that matches the split item, and the sub-character strings corresponding to the respective split items included in the special text are arranged in the arrangement order of the respective split items in the special text, so as to form a character string matching the special text. Any sub-character string may be input in a pinyin manner or a stroke manner. For a sub-character string input in a pinyin manner, the meaning represented by the sub-character string is the pinyin of the split item, for example, the sub-character string "tu" input in a pinyin manner represents the pinyin "tu" of the split item "tu (earth)"; for a sub-character string input in a stroke manner, the meaning represented by the sub-character string is the strokes of the split item, for example, the sub-character string "dfd" input in a stroke manner represents the strokes "horizontal, vertical, horizontal" of the split item "tu (earth)".

[0138] From an overall perspective, the sub-character strings corresponding to the respective split items in the plurality of split items (that is, the plurality of sub-character strings) may be input in the second virtual keyboard in a pinyin manner, or may be input in the second virtual keyboard in a stroke manner, or may be input in the second virtual keyboard in a mixed pinyin and stroke manner. Wherein:

[0139] Inputting a plurality of substrings in a pinyin manner means that each of the plurality of substrings is input in pinyin, for example Figure 5a as shown, if the special text to be input is "垚", the special text "垚" may include three split parts, which are the split part "土", the split part "土" and the split part "土" respectively, and the character string input in the pinyin manner may be "tututu". Inputting a plurality of substrings in a stroke manner means that each of the plurality of substrings is input in strokes, for example Figure 5b as shown, taking the special text "垚" as an example, the character string input in the stroke manner may be "dfddfddfd", which represents "horizontal, vertical, horizontal, horizontal, vertical, horizontal, horizontal, vertical, horizontal". Inputting a plurality of substrings in a pinyin-stroke mixed manner means that part of the plurality of substrings is input in pinyin, and the other part of the substrings is input in strokes. Generally, a split part whose pronunciation is known may be input in the pinyin manner, and a split part whose pronunciation is unknown may be input in the stroke manner, for example Figure 5c as shown, taking the special text "垚" as an example, the character string input in the pinyin-stroke mixed manner may be "tudfddfd", which represents "tu, horizontal, vertical, horizontal, horizontal, vertical, horizontal". Inputting the corresponding special text by means of inputting characters can adopt any one of the pinyin manner, the stroke manner, or the pinyin-stroke mixed manner to describe the split parts of the special text more accurately, which is beneficial to more accurately matching the special text intended to be input, and improving the input experience of the special text.

[0140] ② Inputting the corresponding special text by means of voice input. Specifically, a voice input operation may be performed through a second virtual keyboard, and a translated text of the voice information input by the voice input operation may be displayed. In this manner, the displayed special text matches the voice information input by the voice input operation of the second virtual keyboard. For example Figure 6 as shown, if the special text to be input is "垚", the special text "垚" may include three split parts, which are the split part "土", the split part "土" and the split part "土" respectively, and the three split parts may be described by voice, for example, the voice is "three tu", "a Chinese character composed of three tu", and so on. Inputting the corresponding special text by means of voice input can describe the split parts of the special text more conveniently and quickly, which is beneficial to more quickly matching the special text intended to be input, and improving the input experience of the special text.

[0141] It should be noted that the special text may be displayed in a text input panel, for example, Figures 5a-5c in the text input panel as shown, the character string input by the character input operation performed through the second virtual keyboard and the special text matched with the character string are both displayed in the text input panel, for another example, Figure 6In the text input panel shown, the translated text of the voice information entered via the second virtual keyboard, as well as the special text matching the voice information, are both displayed in the text input panel; alternatively, the special text can be displayed in a text input window independent of the text input panel. The text input window being independent of the text input panel can be understood as the text input window and the text input panel being two independent interfaces, such as... Figure 7 The document editing page 70 shown has a special text input requirement. The string entered via the second virtual keyboard and the special text matching the string are both displayed in the text input window 701. This is very convenient for special text input scenarios where the actual input position of the special text is far from the text input panel. Furthermore, the special text can be displayed in the text input panel or in a separate text display window, which can be switched according to different scenario needs to meet the special text input requirements in different situations. In addition, this embodiment can also support displaying the pronunciation of the special text; see details below. Figures 5a-7 The diagram shown helps in understanding the pronunciation of special texts without needing to look up the pronunciation of special texts separately.

[0142] The above steps S203-S204 focus on the input method for special text. During the input of special text, there may be issues such as incorrectly input strings (e.g., incorrect pinyin input, incorrect stroke input, etc.) failing to match the corresponding special text, uncommon partial components of the special text, and inability to input special text not supported by the system. The following steps S203-S204 will focus on the solutions to these problems in the embodiments of this application:

[0143] To address the first problem mentioned above (i.e., the inability to match the corresponding special text with an incorrectly entered string), embodiments of this application can support error correction processing for incorrectly entered strings. Specifically, when an input error exists in a string, the corresponding error correction string can be displayed, along with the special text that matches the error correction string.

[0144] For erroneous strings entered using Pinyin (e.g., due to repeated input of a character, forgetting to input a character, or inputting a different character than the intended one), the system can comprehensively consider the adjacency relationship between character input keys and the actual pronunciation of the substrings corresponding to each split item to correct the erroneous string, displaying the corrected string and special text matching the corrected string; for example... Figure 8aIn the text input panel shown in the left figure, the actually input error string 801 is "tutuyu", which cannot be matched to the corresponding special text. Considering that on the virtual keyboard with 26-key layout, the character input key corresponding to the character "y" is adjacent to the character input key corresponding to the character "t", the input error string 801 can be corrected, the corrected string 802 "tututu" obtained by correction is displayed, and the special text 803 matching the corrected string 802 is also displayed; for example Figure 8a In the text input panel shown in the right figure, the actually input error string 801 is "shuishuishhui", which cannot be matched to the corresponding special text. Considering that there is no pronunciation like "shhui" and the correct pronunciation may be "shui", the input error string 801 can be corrected, the corrected string 802 "shuishuishui" obtained by correction is displayed, and the special text 803 matching the corrected string 802 is also displayed.

[0145] For an error string input by means of stroke input (for example, an error string generated due to repeated input of a certain stroke, missing input of a certain stroke, input of a stroke that is actually needed as another stroke, wrong input of stroke order, etc.), a correct string can be corrected and obtained, so as to display the corrected string corresponding to the error string, and display the special text matching the corrected string. Taking wrong stroke order input as an example, when the actually input stroke order is inconsistent with the correct stroke order, the desired special text to be input cannot be matched. By performing fault-tolerant processing on the stroke order, the correct stroke order can be restored, and the corresponding special text can be matched; for example Figure 8b In the text input panel shown, if the special text to be input is "Lin", and the actually input error string 801 is "dfhgdfhg", which represents "horizontal, vertical, right-falling, left-falling, horizontal, vertical, right-falling, left-falling", the error string 801 cannot be matched to the desired special text. The input error string 801 can be corrected, the corrected string 802 "dfghdfgh" obtained by correction is displayed, which represents "horizontal, vertical, left-falling, right-falling, horizontal, vertical, left-falling, right-falling", and the special text 803 matching the corrected string 802 is also displayed.

[0146] With respect to the second problem above (i.e., the problem that some split elements of a special text are uncommon), the embodiments of the present application may support performing fuzzy matching. Specifically, when a target split element exists in the split elements of the special text, the target split element is uncommon, and its pronunciation cannot be input in a pinyin manner, the pictographic text corresponding to the target split element may be matched with the substring corresponding to the target split element in the character string. That is to say, the fuzzy matching refers to: not matching the pronunciation of the target split element with the substring corresponding to the target split element in the character string, but matching the pronunciation of the pictographic text of the target split element with the substring corresponding to the target split element in the character string, where the pictographic text of the target split element refers to a common text that is similar in shape to the target split element. For example, as shown in Figure 9 the text input panel, if the special text to be input is "佾", the special text includes two split elements, which are the split element "亻" and the split element " ", the pronunciation of the split element "亻" cannot be input, the pronunciation "ren" of the pictographic text "人" of the split element "亻" may be input, and the split element " " whose pronunciation is unfamiliar, the split element " " whose pictographic text is "肖" may have its pronunciation "xiao" input, that is, the special text "佾" may be matched by inputting the fuzzy string 804 "renxiao".

[0147] With respect to the third problem above (i.e., the problem that special texts not supported by the system cannot be input), the embodiments of the present application may support outputting special texts that are not supported for display by the system in the form of images. Specifically, for some special texts not supported by the system, a special text font package may be added to the input method editor, so that the input method editor can support inputting and displaying these special texts, and these special texts can be output in the form of images. Taking Figure 10 the social conversation scenario shown as an example, referring to Figure 10 the left figure in, the social conversation interface of the social conversation application does not support outputting special texts. When there is a demand for outputting the special text displayed in the text input panel in the social conversation interface 100 to the social conversation interface 100, an image containing the special text may be generated, and the image containing the special text is output to the social conversation interface 100; further, when there are a plurality of special texts, an image may be generated according to each of the plurality of special texts, or one image may be generated according to a special text string formed by combining the plurality of special texts, which is not limited in the embodiments of the present application. In addition, when the text that needs to be output to the social conversation interface 100 includes both special texts and regular texts, in order to maintain the integrity and aesthetics of the output, referring to Figure 10 the right figure in, one image may be generated for output according to a text string composed of the special texts and the regular texts.

[0148] In this embodiment, after the text input panel is in special text mode, special text can be entered conveniently and quickly, thus improving the input experience. Furthermore, this embodiment supports a wide variety of triggering methods for both special and regular text modes, allowing users to choose the appropriate method to trigger either mode according to different text input needs, further enhancing the text input experience. In addition, this embodiment supports special text input using full pinyin, full strokes, a combination of pinyin and strokes, or voice, meeting diverse special text input requirements. Moreover, during special text input, this embodiment supports input error correction, fuzzy matching, and special text not supported by the image output system, effectively avoiding common problems during special text input.

[0149] In the above Figure 2 Based on the illustrated embodiments, this application provides a text processing method, which mainly includes: a special text matching process when inputting special text using a virtual keyboard with different keyboard arrangements, a special text matching method for Pinyin input, a special text matching method for stroke input, a special text matching method for mixed Pinyin and stroke input, error correction logic, and fuzzy matching logic, etc. This text processing method can be executed by a computer device, which can be a terminal device, such as... Figure 11 As shown, the text processing method may include the following steps S1101-S1106:

[0150] S1101, Display a text input panel, which includes a first virtual keyboard.

[0151] The execution process of step S1101 in this embodiment is the same as described above. Figure 2 The execution process of step S201 in the illustrated embodiment is the same; for details, please refer to the above. Figure 2 The description of step S201 in the illustrated embodiment will not be repeated here.

[0152] S1102, When the text input panel is in special text mode, a second virtual keyboard is displayed in the text input panel.

[0153] The execution process of step S1102 in this embodiment is the same as described above. Figure 2 The execution process of step S202 in the illustrated embodiment is the same; for details, please refer to the above. Figure 2 The description of step S202 in the illustrated embodiment will not be repeated here.

[0154] S1103, an input operation is performed through the second virtual keyboard, and a string is input through the input operation performed through the second virtual keyboard.

[0155] The execution process of step S1103 in this embodiment is the same as described above. Figure 2 The execution process of step S203 regarding character input via the second virtual keyboard in the illustrated embodiment is the same; for details, please refer to the above. Figure 2 The description of step S201 in the illustrated embodiment will not be repeated here.

[0156] S1104, Determine the keyboard layout of the second virtual keyboard.

[0157] As mentioned above, the keyboard layout of a virtual keyboard can include at least a first keyboard layout (i.e., a 9-key layout) and a second keyboard layout (i.e., a 26-key layout). In other words, the keyboard layout of the second virtual keyboard can include at least the first keyboard layout and the second keyboard layout. The first keyboard layout can support input of special text using Pinyin or stroke input, while the second keyboard layout can support input of special text using Pinyin, stroke input, or a combination of Pinyin and stroke input. Different input methods allow different keyboard layouts to correspond to different matching rules. Matching rules refer to the rules for matching the input string with the special text.

[0158] S1105, according to the matching rules corresponding to the determined keyboard layout, obtain the special text that matches the string.

[0159] After determining the keyboard layout of the second virtual keyboard, the matching rules corresponding to the determined keyboard layout can be used to obtain special text that matches the string. The first keyboard layout supports inputting special text using either pinyin or stroke order; therefore, the matching rules for the first keyboard layout can include pinyin matching rules and stroke order matching rules. The second keyboard layout supports inputting special text using pinyin, stroke order, or a combination of pinyin and stroke order; therefore, the matching rules for the second keyboard layout can include pinyin matching rules, stroke order matching rules, and a combination of pinyin and stroke order matching rules. The following section will focus on the matching process between the input string and special text when the second virtual keyboard layout is both the first and second keyboard layout:

[0160] (1) Matching process between strings and special text input in the first keyboard layout:

[0161] like Figure 12The matching process shown can perform stroke matching on the string in the stroke library. If the stroke matching is successful, the text matched by the strokes can be identified as special text. Otherwise, a pinyin network can be generated based on the string, and the pinyin string corresponding to the string can be obtained based on the pinyin network. Pinyin matching is then performed on the pinyin string corresponding to the string in the pinyin library. If the pinyin matching is successful, the text matched by the pinyin can be identified as the special text. Otherwise, a matching failure result is output.

[0162] In other words, we can initially assume the string is input using stroke-based input. We can then perform stroke matching in a stroke-based input database. If the stroke matching is successful, the matched text can be identified as special text. If the stroke matching fails, it indicates the string wasn't input using stroke-based input; it might have been input using pinyin. In this case, we can perform pinyin matching in a pinyin database. Because multiple characters in the first keyboard layout correspond to the same input key, we need to expand the input string into a pinyin network and retrieve valid pinyin strings from this network for matching in the pinyin database. A valid pinyin string is one that can correctly spell the text. For example, the string could be input by triggering the input keys corresponding to the combined characters "MNO", "TUV", and "TUV". The string can be expanded as follows: Figure 13 The Pinyin network shown can be used to obtain valid Pinyin strings such as "nvnv", "ouou", "nunu", "mumu", etc., and these Pinyin strings can all be used to correctly spell text.

[0163] (2) Matching process between strings and special text input in the second keyboard layout:

[0164] like Figure 14 The matching process shown can perform stroke matching on the string in the stroke library. If the stroke matching is successful, the matched text can be identified as special text. Otherwise, it can perform pinyin matching on the string in the pinyin library. If the pinyin matching is successful, the matched text can be identified as special text. Otherwise, it can perform mixed matching on the string in the mixed pinyin and stroke library. If the mixed matching is successful, the matched text can be identified as the special text. Otherwise, the matching failure result is output.

[0165] In other words, we can first assume that the string was input using stroke-based matching. Then, we can perform stroke-based matching on the string using a stroke-based matching library. If the stroke-based matching is successful, the matched text can be identified as special text. If the stroke-based matching fails, it means the string was not input using stroke-based matching; it might have been input using pinyin. In this case, we can perform pinyin matching on the string using a pinyin library. If the pinyin matching is successful, the matched text can be identified as special text. If the pinyin matching fails, it means the string was not input using pinyin; it might have been input using a combination of pinyin and stroke-based matching. In this case, we can perform mixed matching on the string using a mixed pinyin and stroke-based matching library.

[0166] The matching process under the first keyboard layout mentioned above involves stroke matching rules and pinyin matching rules. The matching process under the second keyboard layout mentioned above involves stroke matching rules, pinyin matching rules, and pinyin-stroke mixed matching rules. The stroke matching rules, pinyin matching rules, and pinyin-stroke mixed matching rules are described below:

[0167] ① Stroke matching rules: The stroke database can include multiple texts to be matched and the stroke string corresponding to each text. Starting from the first text to be matched in the stroke database, the string is matched against the stroke string of the text to be matched in the stroke database. If the string successfully matches the stroke string of the current text to be matched in the stroke database, the current text to be matched is determined as the text with stroke matching. Then, the string can be matched against the stroke string of the next text to be matched in the stroke database. If the string fails to match the stroke string of the current text to be matched in the stroke database, the string can be matched against the stroke string of the next text to be matched in the stroke database, until all texts to be matched in the stroke database have been matched. If there is text with stroke matching in the stroke database, it can be determined that the stroke matching of the string is successful, and all texts with stroke matching can be determined as special texts. If there is no text with stroke matching in the stroke database, it can be determined that the stroke matching of the string is unsuccessful, and the string can be matched against the pinyin database.

[0168] In this process, matching a string with the stroke strings of the text to be matched in the stroke database can be done using inclusion matching. Inclusion matching means that if the stroke string of the text to be matched contains the string, then the string is considered to have matched the stroke string of the text to be matched successfully. For example, if the string is "dfddfd", which means "horizontal vertical horizontal horizontal horizontal vertical horizontal", and the stroke string of the text to be matched is "dgdfddfd", which means "horizontal left-falling horizontal vertical horizontal horizontal horizontal vertical horizontal", then the string is considered to have matched the stroke string of the text to be matched in the stroke database successfully. Furthermore, matching the string with the stroke string of the text to be matched can be done using prefix matching within the inclusion matching method. Prefix matching means that if the string is a prefix of the stroke string of the text to be matched, then the string is considered to have successfully matched the stroke string of the text to be matched. For example, if the string is "dfghdfgh", which means "horizontal, vertical, left-falling stroke, right-falling stroke, horizontal, vertical, left-falling stroke, right-falling stroke", and the stroke string of the text to be matched is "dfghdfgh", then the string is a prefix of the stroke string of the text to be matched, and the string is the same as the stroke string of the text to be matched, then the string is considered to have successfully matched the stroke string of the text to be matched. As another example, if the string is "dfghdfgh", which means "horizontal, vertical, left-falling stroke, right-falling stroke, horizontal, vertical, left-falling stroke, right-falling stroke", and the stroke string of the text to be matched is "dfghdfghhh", which means "horizontal, vertical, left-falling stroke, right-falling stroke, horizontal, vertical, left-falling stroke, right-falling stroke, horizontal, horizontal", then the string is a prefix of the stroke string of the text to be matched, then the string is considered to have successfully matched the stroke string of the text to be matched.

[0169] ② Pinyin Matching Rules: The matching process for pinyin strings is the same as that for regular strings. Here, we'll use string matching as an example. The pinyin database can contain multiple texts to be matched and their corresponding pinyin strings. Starting with the first text to be matched in the database, the string is matched against the pinyin strings of the texts to be matched in the database. If the string successfully matches the pinyin string of the current text to be matched in the database, then the current text to be matched is determined as the pinyin-matched text. Then, the string can be matched against the pinyin string of the next text to be matched in the database. If the string fails to match the pinyin string of the current text to be matched in the database, then the string... The string is matched against the pinyin string of the next text to be matched in the pinyin library until all text to be matched in the pinyin library has been matched. If there is text in the pinyin library that has a matching pinyin, it can be determined that the pinyin matching of the string is successful, and all text that has a matching pinyin can be identified as special text. If there is no text in the pinyin library that has a matching pinyin, for the string input in the first keyboard layout mode, it can be determined that the pinyin matching of the string has failed, and the matching failure result can be output. For the string input in the second keyboard layout mode, it can be determined that the pinyin matching of the string has failed, and the string can be matched in the pinyin-stroke mixed library.

[0170] Similar to stroke-based matching, matching a string with the pinyin string of the text to be matched in the pinyin library can be done using inclusion matching. Inclusion matching means that if the pinyin string of the text to be matched contains the string, then the string can be determined to be a successful match. For example, if the string is "ttt" and the pinyin string of the text to be matched is "tututu", then the string in the pinyin string of the text to be matched contains the string, and therefore the string can be determined to be a successful match. Furthermore, to match the string with the pinyin string of the text to be matched in the pinyin library, prefix matching can be used. Prefix matching means that if the string is a prefix of the pinyin string of the text to be matched, then the string is considered to have matched the pinyin string of the text to be matched. For example, if the string is "tututu" and the pinyin string of the text to be matched is also "tututu", then the string is a prefix of the pinyin string of the text to be matched and the string is the same as the pinyin string of the text to be matched. Similarly, if the string is "tutut" and the pinyin string of the text to be matched is "tututu", then the string is a prefix of the pinyin string of the text to be matched and the string is the same as the pinyin string of the text to be matched.

[0171] ③ Pinyin stroke matching rules: such as Figure 15The illustrated pinyin-stroke mixed matching process involves a pinyin-stroke mixed matching library that can include multiple texts to be matched and multiple sub-items of each text. The process starts with the first text to be matched in the library and matches the string against all texts in the library. If the string successfully matches the current text in the library, it is identified as a matched text, and the string is then matched against the next text in the library. If the string fails to match the current text, the string is matched against the next text in the library, and so on, until all texts in the library have been matched. If a matched text exists in the library, the string is considered successfully matched, and all matched texts are identified as special texts. If no matched text exists in the library, the string is considered unmatched, and the matching failure result is output.

[0172] In the process of matching the string with the current text to be matched, each of the multiple split items of the current text to be matched is matched with its corresponding substring in the string. If each of the multiple split items of the current text to be matched is successfully matched with its corresponding substring in the string, it can be determined that the string and the current text to be matched are successfully matched. If there is a split item among the multiple split items of the current text to be matched that does not match its corresponding substring, it can be determined that the string and the current text to be matched are not matched.

[0173] Taking any split item in the current text to be matched from the mixed pinyin and stroke library as an example, such as Figure 15As shown, the matching process between the split item and its corresponding substring in the string can include: performing stroke matching on the split item and its corresponding substring; if the stroke matching is successful, it can be determined that the split item and its corresponding substring are successfully matched, and the next split item can be matched with its corresponding substring in the string; otherwise, performing pinyin matching on the split item and its corresponding substring; if the pinyin matching is successful, it can be determined that the split item and its corresponding substring are successfully matched, and the next split item can be matched with its corresponding substring in the string. If a sub-item is matched with its corresponding substring in the string, the next sub-item is matched with its corresponding substring. Otherwise, the sub-item and its corresponding substring are matched separately. If the sub-item and its corresponding substring are matched separately, the sub-item and its corresponding substring are considered to be matched successfully, and the next sub-item is matched with its corresponding substring in the string. Otherwise, the sub-item and its corresponding substring are matched as a whole. If the sub-item and its corresponding substring are matched as a whole, the sub-item and its corresponding substring are considered to be matched successfully; otherwise, the sub-item and its corresponding substring are considered to be matched unsuccessfully.

[0174] In other words, the matching process between any split item and its corresponding substring can include at least one of stroke matching, pinyin matching, split matching, or whole matching. The stroke matching process between a split item and its corresponding substring is similar to the stroke matching process between a string and the corresponding stroke string of the text to be matched mentioned above. For details, please refer to the stroke matching process between a string and the corresponding stroke string of the text to be matched, which will not be repeated here. The pinyin matching process between a split item and its corresponding substring is similar to the pinyin matching process between a string and the corresponding pinyin string of the text to be matched mentioned above. For details, please refer to the pinyin matching process between a string and the corresponding pinyin string of the text to be matched, which will not be repeated here. Split matching means that the current split item can be further split into split sub-items, and the split sub-items are matched with their corresponding substrings. Whole matching means that the split item is stored as a whole text, not as a stroke string. In this case, the whole text needs to be converted into a stroke string for matching.

[0175] For example, the special text to be input is "翼", the character string input by adopting the pinyin-stroke mixed input method is "xixitiandffdgh", which represents "xi(习)xi(习)tian(田)dffdgh(horizontal, vertical, vertical, horizontal, left-falling, right-falling, 共)", and the split items of the to-be-matched text corresponding to this special text in the pinyin-stroke mixed library are the first split item "羽", the second split item "田" and the third split item "共"; if both the pinyin matching and the stroke matching between the first split item and the substring corresponding to the first split item fail, split matching can be performed on the first split item, that is, the first split item is further split into the first split sub-item "习" and the second split sub-item "习", and these two split sub-items are successfully matched with the corresponding substrings respectively through the pinyin matching method; the second split item can be successfully matched with the substring corresponding to the second split item through the pinyin method, and the third split item can be successfully matched with the substring corresponding to the third split item through the stroke method. Therefore, the character string "xixitiandffdgh" can match the special text "翼" by adopting the pinyin-stroke mixed matching method.

[0176] It should be noted that the substring corresponding to any split item in the to-be-matched text mentioned in the embodiments of the present application refers to a partial character string in the input character string that matches the split item, and the substring corresponding to the split item is related to the matching mode of the split item; different matching modes of the split item lead to different substrings corresponding to the split item in the to-be-matched text. For example, the to-be-matched text "翼" includes a first split item "羽", a second split item "田" and a third split item "共", and the input character string is "yutiandffdgh". For the stroke matching mode of the split item, the first split item "羽" includes 6 strokes, so the substring corresponding to the first split item should include 6 characters, that is, the substring corresponding to the first split item is "yutian"; while for the pinyin-stroke mode of the split item, the pinyin of the first split item "羽" includes 2 characters, so the substring corresponding to the first split item should include 2 characters, that is, the substring corresponding to the first split item is "yu".

[0177] The above content of step S1105 focuses on introducing the matching process between the character string and the special text, and the following content of step S1105 will focus on introducing the technical implementation of error correction processing and fuzzy matching on the character string:

[0178] The technical implementation of error correction processing: If special text matching the string cannot be obtained, error correction processing can be performed on the string to obtain multiple error correction strings corresponding to the string, as well as the priority of each error correction string. The priority of the error correction string can be used to indicate the probability that the error correction string is the same as the actual correct string to be input. The higher the priority, the higher the probability that the error correction string is the same as the actual correct string to be input, and vice versa. Then, the multiple error correction strings can be pruned according to the priority order of each error correction string. Specifically, pruning can refer to filtering out error correction strings with higher priority and deleting strings with lower priority. Thus, special text matching the pruned error correction string can be obtained.

[0179] Specifically, string error correction can be implemented using language models and positional models. The language analysis model can analyze each character in the string, performing operations such as adding, deleting, or modifying around the current character to obtain multiple corrected strings. The positional analysis model can analyze the coordinates of the input keys corresponding to each character in the corrected strings on the virtual keyboard, calculate Gaussian distributions, and thus determine the priority of each corrected string.

[0180] It should be noted that the error correction process can be triggered after either stroke matching or pinyin matching fails, or both. That is, after a stroke matching failure, the error correction process can be triggered to perform stroke matching on the string to be corrected. If the stroke matching is successful, the matched text is identified as special text. If the stroke matching fails, pinyin matching is then performed. Similarly, after a pinyin matching failure, the error correction process can be triggered to perform pinyin matching on the string to be corrected. If the pinyin matching is successful, the matched text is identified as special text. If the pinyin matching fails, for strings entered using the first keyboard layout, a pinyin matching failure is confirmed, and the failure result is output. For strings entered using the second keyboard layout, a pinyin matching failure is confirmed, and a mixed pinyin-stroke matching can be performed using the pinyin-stroke mixed matching library.

[0181] Taking the error correction process after stroke matching failure as an example, if the special text that is actually intended to be input is "Lin" (whose corresponding correct stroke string is "dfghdfgh"), and the input is mistakenly entered as strings such as "dfghfdgh", "dfghffdgh", "dfghdgh" during input, the erroneously input string can be corrected to the correct string "dfghdfgh" through error correction processing, so as to match the desired special text.

[0182] Technical implementation of fuzzy matching: For some uncommon split items whose pronunciation cannot be input by means of Pinyin, the pronunciation of the hieroglyphic text corresponding to the split item can be used to represent the pronunciation of the split item, and the strokes of the split item can adopt the real strokes of the split item, so as to perform Pinyin matching between the split item and the sub-string corresponding to the split item, which specifically may refer to matching the sub-string corresponding to the split item with the Pinyin string of the hieroglyphic text corresponding to the split item.

[0183] Further, if there is a hieroglyphic text for a split item of a to-be-matched text in the Pinyin library, the part corresponding to the split item in the Pinyin string of the to-be-matched text in the Pinyin library can be replaced with the Pinyin of the hieroglyphic text corresponding to the split item. If there is a hieroglyphic text for a split item of a to-be-matched text in the stroke library, the part corresponding to the split item in the stroke string of the to-be-matched text in the stroke library can still be represented by the real strokes of the split item. If there is a hieroglyphic text for a split item of a to-be-matched text in the Pinyin-stroke mixed library, the Pinyin string corresponding to the split item in the Pinyin-stroke mixed library can be replaced with the Pinyin string of the hieroglyphic text of the split item, and the stroke string corresponding to the split item can still be represented by the real strokes of the split item.

[0184] For example, if the special text to be input is the Chinese character "肦", the special text can be split into two split items, which are the first split item "月 (hieroglyphic text)" and the second split item "fen", so that inputting the string "yue (Pinyin of the hieroglyphic text "月")fen" can match the special text "肦", and inputting the string "gjhdfen" can also match the special text "肦".

[0185] S1106: Display the special text corresponding to the input operation.

[0186] In the embodiment of the present application, the execution process of step S1106 is the same as the execution process of step S204 in the above Figure 2 shown embodiment, and for the specific execution process, reference may be made to the description of step S204 in the above Figure 2 shown embodiment, which will not be repeated herein.

[0187] In this embodiment, different special text matching rules are set for different keyboard layouts of the second virtual keyboard, and different special text matching methods are set for different input methods of special text. This facilitates more accurate matching of special text and improves the input experience of special text. In addition, by correcting erroneous strings, the desired special text can be matched without re-entering the correct string, which is very convenient. Through fuzzy matching, unfamiliar split items are input using their pictographic text, reducing the difficulty of inputting special text and further improving the input experience of special text.

[0188] The methods of the embodiments of this application have been described in detail above. In order to facilitate better implementation of the above solutions of the embodiments of this application, the apparatus of the embodiments of this application is provided below.

[0189] Please see Figure 16 , Figure 16 This is a schematic diagram of the structure of a text processing device provided in an embodiment of this application. The text processing device can be installed in a computer device provided in the embodiment of this application. The computer device can be the terminal mentioned in the above method embodiment. Figure 16 The text processing device shown can be a computer program (including program code) running on a computer device, which can be used to execute... Figure 2 or Figure 11 Some or all of the steps in the method embodiments shown. Please refer to [link / reference]. Figure 16 The text processing device may include the following units:

[0190] Display unit 1601 is used to display a text input panel, which includes a first virtual keyboard;

[0191] The display unit 1601 is also used to display a second virtual keyboard in the text input panel when the text input panel is in a special text mode. The second virtual keyboard adds stroke information on the basis of the first virtual keyboard.

[0192] The display unit 1601 is also used to perform input operations via a second virtual keyboard; and to display special text corresponding to the input operation, wherein the special text is uncommon text.

[0193] In one implementation, the display unit 1601 is further configured to perform the following steps:

[0194] Perform character input operations using the first virtual keyboard;

[0195] If the character entered through the first virtual keyboard is a mode switching character, the special text mode switch will be displayed.

[0196] If the special text mode switch is turned on, the text input panel is in special text mode.

[0197] In one implementation, the display unit 1601 is further configured to perform the following steps:

[0198] Display a mode switching area in the text input panel, which includes special text mode options;

[0199] If the special text mode option is triggered, it will determine that the text input panel is in special text mode.

[0200] In one implementation, the display unit 1601 is further configured to perform the following steps:

[0201] Voice input is performed via the first virtual keyboard; if the voice input information performed via the first virtual keyboard is special text mode voice, then the text input panel is determined to be in special text mode.

[0202] Alternatively, a gesture input operation can be performed via the first virtual keyboard; if the gesture input operation performed via the first virtual keyboard is a special text mode gesture, then the text input panel is determined to be in special text mode.

[0203] In one implementation, the first virtual keyboard includes multiple character input keys for inputting characters; the process of adding stroke information includes:

[0204] Add stroke information to the target character input key among multiple character input keys to obtain a second virtual keyboard;

[0205] The target character input button, after adding stroke information, is used to input characters or stroke information.

[0206] In one implementation, the first virtual keyboard includes multiple character input keys for inputting characters; the process of adding stroke information includes:

[0207] Add stroke input buttons to the first virtual keyboard to obtain the second virtual keyboard. The stroke input buttons include stroke information and are used to input stroke information.

[0208] In one implementation, when the display unit 1601 performs an input operation via the second virtual keyboard, it specifically performs the following steps:

[0209] Character input is performed via a second virtual keyboard, wherein a string is entered via the second virtual keyboard and the displayed special text matches the string entered via the second virtual keyboard; or, voice input is performed via the second virtual keyboard, wherein voice information is entered via the second virtual keyboard and the displayed special text matches the voice information entered via the second virtual keyboard.

[0210] In one implementation, the special text includes multiple sub-items. When a character input operation is performed via the second virtual keyboard, the input string includes a substring corresponding to each of the multiple sub-items. The display unit 1601 is used to perform any of the following steps when a character input operation is performed via the second virtual keyboard:

[0211] Input multiple substrings using Pinyin on the second virtual keyboard;

[0212] Multiple substrings can be input using stroke input on the second virtual keyboard;

[0213] Multiple substrings can be input using a combination of pinyin and stroke input on the second virtual keyboard.

[0214] In one implementation, a target split item exists in the special text, and the target split item is matched with the corresponding substring of the target split item in the string by the pictographic text corresponding to the target split item.

[0215] In one implementation, the input operation performed via the second virtual keyboard is a character input operation. Since the character input operation via the second virtual keyboard inputs a string, the display unit 1601 is also used to perform the following steps:

[0216] When there is an input error in the string, the corresponding error correction string is displayed, and the special text displayed matches the error correction string.

[0217] In one implementation, the display unit 1601 is further configured to perform the following steps:

[0218] Output special text as an image.

[0219] In one implementation, the input operation performed via the second virtual keyboard is a character input operation, and the character input operation performed via the second virtual keyboard inputs a string; the text processing device further includes a processing unit 1602, which is used to perform the following steps:

[0220] The keyboard layout of the second virtual keyboard is determined. The keyboard layout includes at least the first keyboard layout and the second keyboard layout. Different keyboard layouts correspond to different matching rules.

[0221] According to the matching rules corresponding to the determined keyboard layout, obtain the special text that matches the string.

[0222] In one implementation, the keyboard layout is a first keyboard layout; the processing unit 1602, when obtaining special text that matches the string according to the matching rules corresponding to the determined keyboard layout, specifically performs the following steps:

[0223] Perform stroke matching on strings using a stroke database;

[0224] If stroke matching of the string fails, a pinyin network is generated based on the string, and the pinyin string corresponding to the string is obtained based on the pinyin network. Then, pinyin matching is performed on the pinyin string corresponding to the string in the pinyin library.

[0225] If the pinyin matching of the string is successful, the text matched by the pinyin will be identified as the special text.

[0226] In one implementation, the keyboard layout is a second keyboard layout; the processing unit 1602, when obtaining special text that matches the string according to the matching rules corresponding to the determined keyboard layout, specifically performs the following steps:

[0227] Perform stroke matching on strings using a stroke database;

[0228] If stroke matching of the string fails, then pinyin matching of the string is performed in the pinyin library;

[0229] If the pinyin matching of the string fails, the string will be matched using a combination of pinyin and strokes in the pinyin and stroke matching library.

[0230] If a mixed match of strings is successful, the matched text will be identified as special text.

[0231] In one implementation, the pinyin-stroke mixing library includes multiple texts to be matched and multiple split items for each text to be matched; the processing unit 1602, when performing mixed matching of strings in the pinyin-stroke mixing library, specifically performs the following steps:

[0232] Retrieve the current text to be matched from the Pinyin-stroke mixing library;

[0233] Match each of the multiple splits in the current text to be matched with its corresponding substring in the string;

[0234] If each of the multiple split items of the current text to be matched successfully matches its corresponding substring in the string, then the string is determined to match the current text to be matched successfully, and the current text to be matched is determined to be the text of the mixed match;

[0235] If a matched text exists in the Pinyin-stroke mixing library, then the string matching is considered successful.

[0236] In one implementation, the matching process between any split item in the current text to be matched and its corresponding substring in the string includes:

[0237] Perform stroke matching between the split items and their corresponding substrings;

[0238] If stroke matching between the split item and its corresponding substring fails, then pinyin matching between the split item and its corresponding substring is performed.

[0239] If the pinyin matching of the split item and its corresponding substring fails, then the split item and its corresponding substring will be split and matched.

[0240] If the splitting of the split item and its corresponding substring fails to be matched, then the split item and its corresponding substring are matched as a whole.

[0241] If the overall matching of the split item and its corresponding substring is successful, then the split item and its corresponding substring are considered to be successfully matched.

[0242] In one implementation, the processing unit 1602, when performing pinyin matching between the split item and its corresponding substring, specifically executes the following steps:

[0243] Get the pinyin string of the pictographic text corresponding to the split item;

[0244] Match the substrings corresponding to the split items with the pinyin strings of the pictographic text.

[0245] In one implementation, the processing unit 1602 is further configured to perform the following steps:

[0246] If no special text matching the string is obtained, the string is corrected to obtain multiple corrected strings and the priority of each corrected string.

[0247] Prune multiple error correction strings according to their priority order;

[0248] Get the special text that matches the correction string after pruning.

[0249] According to another embodiment of this application, Figure 16 The text processing apparatus shown can be constructed by combining the various units into one or more other units, or one or more of the units can be further divided into multiple functionally smaller units. This achieves the same operation without affecting the technical effects of the embodiments of this application. The above-mentioned units are based on logical function division. In practical applications, the function of one unit can be implemented by multiple units, or the function of multiple units can be implemented by one unit. In other embodiments of this application, the text processing apparatus may also include other units. In practical applications, these functions can also be implemented with the assistance of other units, and can be implemented collaboratively by multiple units.

[0250] According to another embodiment of this application, the following can be achieved by running on a general-purpose computing device, such as a computer, which includes processing elements and storage elements such as a central processing unit (CPU), random access memory (RAM), and read-only memory (ROM), a device capable of performing operations such as... Figure 2 or Figure 11 The computer program (including program code) for each step involved in some or all of the methods shown, to construct such... Figure 16 The text processing apparatus shown herein, and the text processing method for implementing the embodiments of this application, are described. A computer program may be recorded on, for example, a computer-readable storage medium, loaded onto the aforementioned computing device via the computer-readable storage medium, and executed therein.

[0251] In this embodiment, a text input panel including a first virtual keyboard can be displayed. When the text input panel is in a special text mode, a second virtual keyboard can be displayed on the text input panel. The second virtual keyboard is obtained by transforming the first virtual keyboard. By performing an input operation on the second virtual keyboard, the special text corresponding to the input operation can be displayed. In other words, when the text input panel is in a special text mode, special text can be entered conveniently and quickly, which can improve the text input experience.

[0252] Based on the above methods and apparatus embodiments, this application provides a computer device, which may be the aforementioned terminal. Please refer to... Figure 17 , Figure 17 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Figure 17 The computer device shown includes at least a processor 1701, an input interface 1702, an output interface 1703, and a computer-readable storage medium 1704. The processor 1701, input interface 1702, output interface 1703, and computer-readable storage medium 1704 can be connected via a bus or other means.

[0253] Computer-readable storage medium 1704 can be stored in the memory of a computer device. Computer-readable storage medium 1704 is used to store computer programs, including computer instructions. Processor 1701 is used to execute the program instructions stored in computer-readable storage medium 1704. Processor 1701 (or CPU (Central Processing Unit)) is the computing and control core of the computer device. It is adapted to implement one or more computer instructions, specifically to load and execute one or more computer instructions to achieve corresponding method flows or corresponding functions.

[0254] This application also provides a computer-readable storage medium (Memory), which is a memory device in a computer device used to store programs and data. It is understood that the computer-readable storage medium here can include both built-in storage media in the computer device and extended storage media supported by the computer device. The computer-readable storage medium provides storage space that stores the operating system of the computer device. Furthermore, the storage space also stores one or more computer instructions suitable for loading and execution by a processor. These computer instructions can be one or more computer programs (including program code). It should be noted that the computer-readable storage medium here can be high-speed RAM or non-volatile memory, such as at least one disk storage device; optionally, it can also be at least one computer-readable storage medium located remotely from the aforementioned processor.

[0255] In some embodiments, the processor 1701 may load and execute one or more computer instructions stored in the computer-readable storage medium 1704 to implement the aforementioned related... Figure 2 or Figure 11 The corresponding steps of the text processing method shown are as follows. In a specific implementation, the computer instructions in the computer-readable storage medium 1704 are loaded by the processor 1701 and executed as follows:

[0256] Display a text input panel, which includes a first virtual keyboard;

[0257] When the text input panel is in special text mode, a second virtual keyboard is displayed in the text input panel. The second virtual keyboard adds stroke information on the basis of the first virtual keyboard.

[0258] Perform input operations via a second virtual keyboard; and display special text corresponding to the input operation, which is uncommon text.

[0259] In one implementation, the computer instructions in the computer-readable storage medium 1704 are loaded by the processor 1701 and are also used to perform the following steps:

[0260] Perform character input operations using the first virtual keyboard;

[0261] If the character entered through the first virtual keyboard is a mode switching character, the special text mode switch will be displayed.

[0262] If the special text mode switch is turned on, the text input panel is in special text mode.

[0263] In one implementation, the computer instructions in the computer-readable storage medium 1704 are loaded by the processor 1701 and are also used to perform the following steps:

[0264] Display a mode switching area in the text input panel, which includes special text mode options;

[0265] If the special text mode option is triggered, it will determine that the text input panel is in special text mode.

[0266] In one implementation, the computer instructions in the computer-readable storage medium 1704 are loaded by the processor 1701 and are also used to perform the following steps:

[0267] Voice input is performed via the first virtual keyboard; if the voice input information performed via the first virtual keyboard is special text mode voice, then the text input panel is determined to be in special text mode.

[0268] Alternatively, a gesture input operation can be performed via the first virtual keyboard; if the gesture input operation performed via the first virtual keyboard is a special text mode gesture, then the text input panel is determined to be in special text mode.

[0269] In one implementation, the first virtual keyboard includes multiple character input keys for inputting characters; the process of adding stroke information includes:

[0270] Add stroke information to the target character input key among multiple character input keys to obtain a second virtual keyboard;

[0271] The target character input button, after adding stroke information, is used to input characters or stroke information.

[0272] In one implementation, the first virtual keyboard includes multiple character input keys for inputting characters; the process of adding stroke information includes:

[0273] Add stroke input buttons to the first virtual keyboard to obtain the second virtual keyboard. The stroke input buttons include stroke information and are used to input stroke information.

[0274] In one implementation, when the computer instructions in the computer-readable storage medium 1704 are loaded and executed by the processor 1701, and an input operation is performed via the second virtual keyboard, the instructions specifically perform the following steps:

[0275] Character input is performed via a second virtual keyboard, wherein a string is entered via the second virtual keyboard and the displayed special text matches the string entered via the second virtual keyboard; or, voice input is performed via the second virtual keyboard, wherein voice information is entered via the second virtual keyboard and the displayed special text matches the voice information entered via the second virtual keyboard.

[0276] In one implementation, the special text includes multiple sub-items. When a character input operation is performed via the second virtual keyboard, the input string includes a substring corresponding to each of the multiple sub-items. The computer instructions in the computer-readable storage medium 1704 are loaded and executed by the processor 1701. When a character input operation is performed via the second virtual keyboard, the instructions are specifically used to perform any of the following steps:

[0277] Input multiple substrings using Pinyin on the second virtual keyboard;

[0278] Multiple substrings can be input using stroke input on the second virtual keyboard;

[0279] Multiple substrings can be input using a combination of pinyin and stroke input on the second virtual keyboard.

[0280] In one implementation, a target split item exists in the special text, and the target split item is matched with the corresponding substring of the target split item in the string by the pictographic text corresponding to the target split item.

[0281] In one implementation, the input operation performed via the second virtual keyboard is a character input operation. The character input operation via the second virtual keyboard inputs a string. The computer instructions in the computer-readable storage medium 1704 are loaded by the processor 1701 and are also used to perform the following steps:

[0282] When there is an input error in the string, the corresponding error correction string is displayed, and the special text displayed matches the error correction string.

[0283] In one implementation, the computer instructions in the computer-readable storage medium 1704 are loaded by the processor 1701 and are also used to perform the following steps:

[0284] Output special text as an image.

[0285] In one implementation, the input operation performed via the second virtual keyboard is a character input operation, and the character input operation performed via the second virtual keyboard inputs a string; the text processing device further includes a processing unit, wherein computer instructions in the computer-readable storage medium 1704 are loaded by the processor 1701 and executed as follows:

[0286] The keyboard layout of the second virtual keyboard is determined. The keyboard layout includes at least the first keyboard layout and the second keyboard layout. Different keyboard layouts correspond to different matching rules.

[0287] According to the matching rules corresponding to the determined keyboard layout, obtain the special text that matches the string.

[0288] In one implementation, the keyboard layout is a first keyboard layout; when the computer instructions in the computer-readable storage medium 1704 are loaded and executed by the processor 1701 to obtain special text matching the string according to the matching rules corresponding to the determined keyboard layout, they are specifically used to perform the following steps:

[0289] Perform stroke matching on strings using a stroke database;

[0290] If stroke matching of the string fails, a pinyin network is generated based on the string, and the pinyin string corresponding to the string is obtained based on the pinyin network. Then, pinyin matching is performed on the pinyin string corresponding to the string in the pinyin library.

[0291] If the pinyin matching of the string is successful, the text matched by the pinyin will be identified as the special text.

[0292] In one implementation, the keyboard layout is a second keyboard layout; when the computer instructions in the computer-readable storage medium 1704 are loaded and executed by the processor 1701 to obtain special text matching the string according to the matching rules corresponding to the determined keyboard layout, they are specifically used to perform the following steps:

[0293] Perform stroke matching on strings using a stroke database;

[0294] If stroke matching of the string fails, then pinyin matching of the string is performed in the pinyin library;

[0295] If the pinyin matching of the string fails, the string will be matched using a combination of pinyin and strokes in the pinyin and stroke matching library.

[0296] If a mixed match of strings is successful, the matched text will be identified as special text.

[0297] In one implementation, the pinyin-stroke mixing library includes multiple texts to be matched and multiple split items for each text to be matched; the computer instructions in the computer-readable storage medium 1704 are loaded and executed by the processor 1701 when performing mixed matching of strings in the pinyin-stroke mixing library, specifically for performing the following steps:

[0298] Retrieve the current text to be matched from the Pinyin-stroke mixing library;

[0299] Match each of the multiple splits in the current text to be matched with its corresponding substring in the string;

[0300] If each of the multiple split items of the current text to be matched successfully matches its corresponding substring in the string, then the string is determined to match the current text to be matched successfully, and the current text to be matched is determined to be the text of the mixed match;

[0301] If a matched text exists in the Pinyin-stroke mixing library, then the string matching is considered successful.

[0302] In one implementation, the matching process between any split item in the current text to be matched and its corresponding substring in the string includes:

[0303] Perform stroke matching between the split items and their corresponding substrings;

[0304] If stroke matching between the split item and its corresponding substring fails, then pinyin matching between the split item and its corresponding substring is performed.

[0305] If the pinyin matching of the split item and its corresponding substring fails, then the split item and its corresponding substring will be split and matched.

[0306] If the splitting of the split item and its corresponding substring fails to be matched, then the split item and its corresponding substring are matched as a whole.

[0307] If the overall matching of the split item and its corresponding substring is successful, then the split item and its corresponding substring are considered to be successfully matched.

[0308] In one implementation, when the computer instructions in the computer-readable storage medium 1704 are loaded and executed by the processor 1701 to perform pinyin matching between the split item and its corresponding substring, they are specifically used to perform the following steps:

[0309] Get the pinyin string of the pictographic text corresponding to the split item;

[0310] Match the substrings corresponding to the split items with the pinyin strings of the pictographic text.

[0311] In one implementation, the computer instructions in the computer-readable storage medium 1704 are loaded by the processor 1701 and are also used to perform the following steps:

[0312] If no special text matching the string is obtained, the string is corrected to obtain multiple corrected strings and the priority of each corrected string.

[0313] Prune multiple error correction strings according to their priority order;

[0314] Get the special text that matches the correction string after pruning.

[0315] In this embodiment, a text input panel including a first virtual keyboard can be displayed. When the text input panel is in a special text mode, a second virtual keyboard can be displayed on the text input panel. The second virtual keyboard is obtained by transforming the first virtual keyboard. By performing an input operation on the second virtual keyboard, the special text corresponding to the input operation can be displayed. In other words, when the text input panel is in a special text mode, special text can be entered conveniently and quickly, which can improve the text input experience.

[0316] According to one aspect of this application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the text processing methods provided in the various alternative embodiments described above.

[0317] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A text processing method characterized by, The method includes: Display a text input panel, which includes a first virtual keyboard; When the text input panel is in a special text mode, a second virtual keyboard is displayed in the text input panel. The second virtual keyboard adds stroke information to the first virtual keyboard. Perform input operations using the second virtual keyboard; and, The input operation is displayed along with the pronunciation of the special text, which is a non-common text. Specifically, when the input operation includes a character input operation, a string is input through the second virtual keyboard, and the special text matches the string; the special text includes multiple split items, and the string includes a substring corresponding to each of the multiple split items, and the special text is determined by matching the substrings corresponding to each of the multiple split items in the string.

2. The method as described in claim 1, characterized in that, The method further includes: Perform character input operations using the first virtual keyboard; If the character input performed through the first virtual keyboard is a mode switching character, then the special text mode switch is displayed; If the special text mode switch is turned on, it is determined that the text input panel is in special text mode.

3. The method as described in claim 1, characterized in that, The method further includes: The text input panel displays a mode switching area, which includes special text mode options; If the special text mode option is triggered, it is determined that the text input panel is in special text mode.

4. The method as described in claim 1, characterized in that, The method further includes: Voice input is performed via the first virtual keyboard; if the voice input information performed via the first virtual keyboard is special text mode voice, then the text input panel is determined to be in special text mode; or... Gesture input is performed via the first virtual keyboard; if the gesture input information performed via the first virtual keyboard is a special text mode gesture, then the text input panel is determined to be in special text mode.

5. The method as described in claim 1, characterized in that, The first virtual keyboard includes multiple character input keys, which are used to input characters; the process of adding stroke information includes: Stroke information is added to the target character input key among the plurality of character input keys to obtain the second virtual keyboard; The target character input button, after adding stroke information, is used to input characters or the stroke information.

6. The method as described in claim 1, characterized in that, The first virtual keyboard includes multiple character input keys, which are used to input characters; the process of adding stroke information includes: A stroke input button is added to the first virtual keyboard to obtain the second virtual keyboard. The stroke input button includes stroke information and is used to input the stroke information.

7. The method as described in claim 1, characterized in that, When the input operation includes a voice input operation, voice information is input through the second virtual keyboard, and the displayed special text matches the voice information input through the second virtual keyboard.

8. The method as described in claim 1, characterized in that, The character input operation performed via the second virtual keyboard includes any of the following: Multiple substrings are input using Pinyin on the second virtual keyboard; Multiple substrings are input using a stroke-based method on the second virtual keyboard; Multiple substrings are input using a combination of pinyin and stroke input on the second virtual keyboard.

9. The method as described in claim 8, characterized in that, The special text contains a target split item, and the target split item is matched with the substring corresponding to the target split item in the string through the pictographic text corresponding to the target split item.

10. The method as described in claim 1, characterized in that, The method further includes: When there is an input error in the string, the corresponding error correction string is displayed, and the displayed special text matches the error correction string.

11. The method as described in claim 1, characterized in that, The method further includes: The special text is output as an image.

12. The method as described in claim 1, characterized in that, The method further includes: The keyboard layout of the second virtual keyboard is determined, and the keyboard layout includes at least a first keyboard layout and a second keyboard layout, with different keyboard layouts corresponding to different matching rules; According to the matching rules corresponding to the determined keyboard layout, obtain the special text that matches the string.

13. The method as described in claim 12, characterized in that, The keyboard layout is a first keyboard layout; obtaining the special text that matches the string according to the matching rules corresponding to the determined keyboard layout includes: Perform stroke matching on the string in the stroke library; If stroke matching of the string fails, a pinyin network is generated based on the string, and the pinyin string corresponding to the string is obtained based on the pinyin network. Then, pinyin matching is performed on the pinyin string corresponding to the string in the pinyin library. If the pinyin matching of the string is successful, the text matched by the pinyin will be identified as the special text.

14. The method as described in claim 12, characterized in that, The keyboard layout is a second keyboard layout; obtaining the special text that matches the string according to the matching rules corresponding to the determined keyboard layout includes: Perform stroke matching on the string in the stroke library; If stroke matching of the string fails, then pinyin matching of the string is performed in the pinyin library; If the pinyin matching of the string fails, the string will be matched using a combination of pinyin and strokes in the pinyin-stroke mixing library. If the mixed matching of the string is successful, the text that is matched is determined as the special text.

15. The method as described in claim 14, characterized in that, The Pinyin-stroke mixing library includes multiple texts to be matched and multiple split items for each text to be matched; The step of performing mixed matching on the string in the Pinyin stroke mixing library includes: Retrieve the current text to be matched from the Pinyin-stroke mixing library; Each of the multiple split items of the current text to be matched is matched with its corresponding substring in the string; If each of the multiple split items of the current text to be matched successfully matches its corresponding substring in the string, then the string is determined to match the current text to be matched successfully, and the current text to be matched is determined to be the text that was matched by the mixed match. If the matched text exists in the Pinyin-stroke mixing library, then the string is determined to have been successfully matched.

16. The method as described in claim 15, characterized in that, The matching process between any split item in the current text to be matched and the corresponding substring of the split item in the string includes: Perform stroke matching on the split item and the substring corresponding to the split item; If the stroke matching between the split item and the substring corresponding to the split item fails, then the pinyin matching between the split item and the substring corresponding to the split item is performed. If the pinyin matching of the split item and the substring corresponding to the split item fails, then the split item and the substring corresponding to the split item are split and matched. If the splitting and matching of the splitting item and the substring corresponding to the splitting item fails, then the splitting item and the substring corresponding to the splitting item are matched as a whole. If the split item and its corresponding substring are successfully matched as a whole, then the split item and its corresponding substring are determined to be a successful match.

17. The method as described in claim 16, characterized in that, The step of performing pinyin matching between the split item and the corresponding substring includes: Obtain the pinyin string of the pictographic text corresponding to the split item; Match the substring corresponding to the split item with the pinyin string of the pictographic text.

18. The method as described in claim 12, characterized in that, The method further includes: If no special text matching the string is obtained, the string is corrected to obtain multiple corrected strings corresponding to the string, and the priority of each corrected string; The multiple error correction strings are pruned according to their priority order. Obtain the special text that matches the corrected string after pruning.

19. A text processing device, characterized in that, The device includes: A display unit is used to display a text input panel, the text input panel including a first virtual keyboard; The display unit is also used to display a second virtual keyboard in the text input panel when the text input panel is in a special text mode. The second virtual keyboard adds stroke information to the first virtual keyboard. The display unit is further configured to perform an input operation via the second virtual keyboard; and to display special text corresponding to the input operation and the pronunciation of the special text, wherein the special text is uncommon text; Specifically, when the input operation includes a character input operation, a string is input through the second virtual keyboard, and the special text matches the string; the special text includes multiple split items, and the string includes a substring corresponding to each of the multiple split items, and the special text is determined by matching the substrings corresponding to each of the multiple split items in the string.

20. A computer device, characterized in that, The computer device includes: A processor is a tool for implementing computer programs. A computer-readable storage medium storing a computer program adapted to be loaded by the processor and executed as described in any one of claims 1-18.

21. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program adapted to be loaded by a processor and executed as described in any one of claims 1-18.

22. A computer program product, characterized in that, The computer program product includes computer instructions that, when executed by a processor, implement the text processing method as described in any one of claims 1-18.

Citation Information

Patent Citations

  • A method for processing Chinese character information and a method for splitting and storing Chinese characters.

    CN102262683A

  • Virtual keyboard, input methods and related storage media

    CN102279698A

  • Chinese character input method for dynamic Chinese character combination of strokes

    CN104834392A

  • Font information fusion-based medicine-taking bill recognition result error correction method

    CN112613522A