Processing method, terminal device, and storage medium

CN122655751APending Publication Date: 2026-08-28上海小传科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610851426.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-11
Publication Date
2026-08-28

AI Technical Summary

Technical Problem

[0003]相关技术中,终端设备对用户输入信息进行纠错的方法,存在纠错结果不准确的问题

Benefits of technology

[0029]As described above, the processing method of this application includes the following steps: generating multiple candidate words that match the input word based on the context text of the input word; and displaying at least one candidate word among the multiple candidate words based on the multi-dimensional correlation between the input word and the multiple candidate words. This technical solution can solve the problem of insufficient semantic error correction caused by relying solely on physical input features, thereby improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122655751A_ABST
    Figure CN122655751A_ABST
Patent Text Reader

Abstract

The application provides a processing method, a terminal device and a storage medium. The processing method comprises the following steps: generating a plurality of candidate words matched with an input word according to context text of the input word; and displaying at least one candidate word in the plurality of candidate words based on the correlation between the input word and the plurality of candidate words in multiple dimensions. The expression intention is obtained through the context text, the candidate word generation is performed, the correlation in multiple dimensions is introduced, the plurality of candidate words are screened and displayed, and thus the problem of insufficient semantic error correction caused by the physical input feature is solved, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, specifically to a processing method, terminal device, and storage medium. Background Technology

[0002] Currently, when users interact through terminal devices, the terminal can correct the information entered by the user and display the correction results.

[0003] In related technologies, the methods used by terminal devices to correct user input information have the problem of inaccurate correction results. Summary of the Invention

[0004] To address the aforementioned technical problems, this application provides a processing method, terminal device, and storage medium, enabling users to obtain more accurate error correction results during information input, thereby improving the user's input experience and making user operations simpler and more convenient.

[0005] To solve the above-mentioned technical problems, this application provides a processing method, including:

[0006] Based on the context text of the input word, generate multiple candidate words that match the input word;

[0007] Based on the correlation between the input word and multiple candidate words across multiple dimensions, at least one candidate word from among the multiple candidate words is displayed.

[0008] Optionally, at least one candidate word includes at least one of the following: punctuation, capitalization, or correction.

[0009] Optionally, the method further includes:

[0010] In response to a preset operation, retrieve the input words and context text from the input information.

[0011] Optionally, based on the context text of the input word, multiple candidate words matching the input word are generated, including:

[0012] The context text is segmented into words, and the word vector representation of each word is extracted.

[0013] Based on word vector representation, determine the contextual dependencies between words;

[0014] Based on contextual dependencies, generate multiple candidate words that match the input word.

[0015] Optionally, based on contextual dependencies, multiple candidate words matching the input word are generated, including:

[0016] Multiple initial candidate words are generated based on the input word and multiple preset vocabulary filtering indicators, wherein the filtering indicators include at least one of edit distance, word frequency and character similarity;

[0017] Based on contextual dependencies, determine the probability distribution of multiple initial candidate words;

[0018] Based on the probability distribution of multiple initial candidate words, generate multiple candidate words that match the input word.

[0019] Optionally, based on the relevance of the input word to multiple candidate words across multiple dimensions, at least one candidate word from the multiple candidate words is displayed, including:

[0020] Determine multiple relevance indicators and their weights in a multi-dimensional relevance framework. The relevance indicators include at least two of the following: edit distance score, character similarity score, word frequency score, and context matching score.

[0021] The relevance indicators and their weights are weighted and summed to determine the scores of multiple candidate words.

[0022] Based on the scores of multiple candidate words, at least one candidate word is displayed in sequence.

[0023] Optionally, the relevance index and the weight of the relevance index in the multiple dimensions of relevance are determined based on the error correction type of the input word;

[0024] The weights of the relevance indicators differ depending on the type of error correction.

[0025] Optionally, the method further includes:

[0026] In response to an operation on the target candidate word among at least one of the displayed candidate words, the input word is replaced with the target candidate word.

[0027] This application also provides a terminal device, including: a memory and a processor, wherein the terminal device includes a memory and a processor, the memory stores a processing program of the terminal device, and when the processing program of the terminal device is executed by the processor, it implements the steps of the method described above.

[0028] This application also provides a readable storage medium storing a computer program that, when executed by a processor, implements the steps of the method described above.

[0029] As described above, the processing method of this application includes the following steps: generating multiple candidate words that match the input word based on the context text of the input word; and displaying at least one candidate word among the multiple candidate words based on the multi-dimensional correlation between the input word and the multiple candidate words. This technical solution can solve the problem of insufficient semantic error correction caused by relying solely on physical input features, thereby improving the user experience. Attached Figure Description

[0030] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, those skilled in the art can obtain other drawings based on these drawings without any creative effort.

[0031] Figure 1 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application;

[0032] Figure 2 A communication network system architecture diagram provided for an embodiment of this application;

[0033] Figure 3 Flowchart of the processing method provided in the embodiments of this application Figure 1 ;

[0034] Figure 4 A schematic diagram of the terminal device display interface provided in the embodiments of this application. Figure 1 ;

[0035] Figure 5 Flowchart of the processing method provided in the embodiments of this application Figure 2 ;

[0036] Figure 6 Flowchart of the processing method provided in the embodiments of this application Figure 3 ;

[0037] Figure 7 Flowchart of the processing method provided in the embodiments of this application Figure 4 ;

[0038] Figure 8 A schematic diagram of the terminal device display interface provided in the embodiments of this application. Figure 2 ;

[0039] Figure 9 This is a schematic diagram of the processing system provided in the embodiments of this application;

[0040] Figure 10A schematic diagram of the terminal device display interface provided in the embodiments of this application. Figure 3 .

[0041] The realization of the objectives, functional features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. The accompanying drawings have illustrated specific embodiments of this application, which will be described in more detail below. These drawings and textual descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concepts of this application to those skilled in the art through reference to specific embodiments. Detailed Implementation

[0042] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0043] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, components, features, and elements with the same names in different embodiments of this application may have the same meaning or different meanings, the specific meaning of which must be determined by its interpretation in that specific embodiment or further in conjunction with the context of that specific embodiment.

[0044] It should be understood that although the terms first, second, third, etc., may be used herein to describe various information, such information should not be limited to these terms. The terms "or," "and / or," "including at least one of the following," etc., as used in this application, can be interpreted as inclusive, or mean any one or any combination thereof. For example, "including at least one of the following: A, B, C" means "any one of the following: A; B; C; A and B; A and C; B and C; A and B and C," and similarly, "A, B, or C" or "A, B, and / or C" means "any one of the following: A; B; C; A and B; A and C; B and C; A and B and C." Exceptions to this definition will only occur when combinations of elements, functions, steps, or operations are inherently mutually exclusive in some way.

[0045] It should be understood that although the steps in the flowcharts of this application's embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some of the steps in the figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least a portion of the sub-steps or stages of other steps.

[0046] Depending on the context, the words “if” or “suppose” as used here can be interpreted as “when” or “in response to determination” or “in response to detection.” Similarly, depending on the context, the phrases “if determination” or “if detection (of the stated condition or event)” can be interpreted as “when determination” or “in response to determination” or “when detection (of the stated condition or event)” or “in response to detection (of the stated condition or event).”

[0047] It should be noted that step designations such as S10 and S20 are used in this document for the purpose of more clearly and concisely describing the corresponding content, and do not constitute a substantial limitation on the order. In specific implementation, those skilled in the art may execute S20 first and then S10, etc., but these should all be within the protection scope of this application.

[0048] It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.

[0049] In the following description, the use of suffixes such as "module," "part," or "unit" to denote elements is solely for the purpose of illustrative purposes and has no specific meaning in itself. Therefore, "module," "part," or "unit" may be used interchangeably.

[0050] Terminal devices can be implemented in various forms. For example, the terminal devices described in this application may include terminal devices such as mobile phones, tablets, laptops, handheld computers, personal digital assistants (PDAs), portable media players (PMPs), navigation devices, wearable devices, smart bracelets, pedometers, and fixed terminals such as digital TVs and desktop computers.

[0051] The following description will use a mobile terminal as an example. Those skilled in the art will understand that, apart from elements specifically designed for mobile purposes, the construction according to the embodiments of this application can also be applied to fixed-type terminals.

[0052] Please see Figure 1 This is a schematic diagram of the hardware structure of a mobile terminal implementing various embodiments of this application. The mobile terminal 100 may include: an RF (Radio Frequency) unit 101, a WiFi module 102, an audio output unit 103, an A / V (Audio / Video) input unit 104, a sensor 105, a display unit 106, a user input unit 107, an interface unit 108, a memory 109, a processor 110, and a power supply 111, etc. Those skilled in the art will understand that... Figure 1 The mobile terminal structure shown does not constitute a limitation on the mobile terminal. The mobile terminal may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0053] The following is combined with Figure 1 A detailed introduction to each component of the mobile terminal:

[0054] The radio frequency unit 101 can be used for receiving and transmitting signals during information transmission or calls. Specifically, it receives downlink information from the base station and processes it with the processor 110; additionally, it transmits uplink data to the base station. Typically, the radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low-noise amplifier, and a duplexer. Furthermore, the radio frequency unit 101 can also communicate wirelessly with networks and other devices. The aforementioned wireless communications may use any communication standard or protocol, including but not limited to GSM (Global System of Mobile communication), GPRS (General Packet Radio Service), CDMA2000 (Code Division Multiple Access 2000), WCDMA (Wideband Code Division Multiple Access), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access), FDD-LTE (Frequency Division Duplexing-Long Term Evolution), TDD-LTE (Time Division Duplexing-Long Term Evolution), and 5G, etc.

[0055] WiFi is a short-range wireless transmission technology. Mobile terminals, through the WiFi module 102, can help users send and receive emails, browse web pages, and access streaming media, providing users with wireless broadband internet access. Although Figure 1 WiFi module 102 is shown, but it is understood that it is not a necessary component of a mobile terminal and can be omitted as needed without changing the nature of the invention.

[0056] The audio output unit 103 can convert audio data received by the radio frequency unit 101 or the WiFi module 102 or stored in the memory 109 into audio signals and output them as sound when the mobile terminal 100 is in call signal receiving mode, call mode, recording mode, voice recognition mode, broadcast receiving mode, etc. Furthermore, the audio output unit 103 can also provide audio output related to specific functions performed by the mobile terminal 100 (e.g., call signal receiving sound, message receiving sound, etc.). The audio output unit 103 may include a speaker, a buzzer, etc.

[0057] The A / V input unit 104 is used to receive audio or video signals. The A / V input unit 104 may include a graphics processing unit (GPU) 1041 and a microphone 1042. The GPU 1041 processes image data of still images or videos acquired by an image capture device (such as a camera) in video capture mode or image capture mode. The processed image frames can be displayed on the display unit 106. The image frames processed by the GPU 1041 can be stored in the memory 109 (or other storage media) or transmitted via the radio frequency unit 101 or the WiFi module 102. The microphone 1042 can receive sound (audio data) in operating modes such as telephone call mode, recording mode, and voice recognition mode, and can process such sound into audio data. The processed audio (voice) data can be converted into a format that can be transmitted to a mobile communication base station via the radio frequency unit 101 in telephone call mode. The microphone 1042 can implement various types of noise cancellation (or suppression) algorithms to eliminate (or suppress) noise or interference generated during the reception and transmission of audio signals.

[0058] The mobile terminal 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Optionally, the light sensor includes an ambient light sensor and a proximity sensor. Optionally, the ambient light sensor can adjust the brightness of the display panel 1061 according to the ambient light level, and the proximity sensor can turn off the display panel 1061 and / or backlight when the mobile terminal 100 is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in various directions (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that recognize the phone's posture (such as landscape / portrait switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc. Other sensors that may be configured in the phone, such as fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, and infrared sensors, will not be described in detail here.

[0059] The display unit 106 is used to display information input by the user or information provided to the user. The display unit 106 may include a display panel 1061, which may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.

[0060] User input unit 107 can be used to receive input numerical or character information, and generate key signal inputs related to user settings and function control of the mobile terminal. Optionally, user input unit 107 may include touch panel 1071 and other input devices 1072. Touch panel 1071, also known as a touch screen, can collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near touch panel 1071), and control corresponding connection devices according to a pre-set program. Touch panel 1071 may include two parts: a touch detection device and a touch controller. Optionally, the touch detection device detects the user's touch position and the signal generated by the touch operation, and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, sends it to processor 110, and can receive and execute commands sent by processor 110. In addition, touch panel 1071 can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 1071, the user input unit 107 may also include other input devices 1072. Optionally, other input devices 1072 may include, but are not limited to, one or more of the following: physical keyboard, function keys (such as volume control buttons, power buttons, etc.), trackball, mouse, joystick, etc., without being specifically limited here.

[0061] Optionally, the touch panel 1071 may cover the display panel 1061. When the touch panel 1071 detects a touch operation on or near it, it transmits the information to the processor 110 to determine the type of touch event. Subsequently, the processor 110 provides corresponding visual output on the display panel 1061 based on the type of touch event. Although in Figure 1 In this embodiment, the touch panel 1071 and the display panel 1061 are two independent components to realize the input and output functions of the mobile terminal. However, in some embodiments, the touch panel 1071 and the display panel 1061 can be integrated to realize the input and output functions of the mobile terminal. The specific implementation is not limited here.

[0062] Interface unit 108 serves as an interface through which at least one external device can connect to mobile terminal 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, an audio input / output (I / O) port, a video I / O port, a headphone port, and so on. Interface unit 108 may be used to receive input (e.g., data, power, etc.) from the external device and transmit the received input to one or more elements within mobile terminal 100, or it may be used to transmit data between mobile terminal 100 and the external device.

[0063] The memory 109 can be used to store software programs and various data. The memory 109 may primarily include a program storage area and a data storage area. Optionally, the program storage area may store the operating system, applications required for at least one function (such as sound playback, image playback, etc.), etc.; the data storage area may store data created based on the use of the mobile phone (such as audio data, phonebook, etc.). Furthermore, the memory 109 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0064] The processor 110 is the control center of the mobile terminal. It connects various parts of the mobile terminal via various interfaces and lines. By running or executing software programs and / or modules stored in the memory 109, and by calling data stored in the memory 109, it performs various functions and processes data of the mobile terminal, thereby providing overall monitoring of the mobile terminal. The processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor and a modem processor. Optionally, the application processor mainly handles the operating system, user interface, and applications, while the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 110.

[0065] The mobile terminal 100 may also include a power supply 111 (such as a battery) that supplies power to various components. Preferably, the power supply 111 can be logically connected to the processor 110 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system.

[0066] although Figure 1 As not shown, the mobile terminal 100 may also include a Bluetooth module, etc., which will not be described in detail here.

[0067] To facilitate understanding of the embodiments of this application, the communication network system on which the mobile terminal of this application is based is described below.

[0068] Please see Figure 2 , Figure 2 This application provides a communication network system architecture diagram. The communication network system is an LTE system based on the universal mobile communication technology. The LTE system includes a UE (User Equipment) 201, an E-UTRAN (Evolved UMTS Terrestrial Radio Access Network) 202, an EPC (Evolved Packet Core) 203, and an operator's IP service 204, which are connected in sequence.

[0069] Optionally, UE201 can be the aforementioned terminal 100, which will not be described in detail here.

[0070] E-UTRAN202 includes eNodeB2021 and other eNodeB2022s. Optionally, eNodeB2021 can connect to other eNodeB2022s via backhaul (e.g., X2 interface). eNodeB2021 connects to EPC203 and can provide UE201 with access to EPC203.

[0071] EPC203 may include an MME (Mobility Management Entity) 2031, an HSS (Home Subscriber Server) 2032, other MMEs 2033, an SGW (Serving Gateway) 2034, a PGW (Packet Data Network Gateway) 2035, and a PCRF (Policy and Charging Rules Function) 2036, etc. Optionally, MME2031 is the control node that handles signaling between UE201 and EPC203, providing bearer and connection management. HSS2032 is used to provide registers to manage functions such as the Home Location Register (not shown in the figure) and stores user-specific information such as service characteristics and data rates. All user data can be sent through SGW2034. PGW2035 can provide UE 201 IP address allocation and other functions. PCRF2036 is the policy and charging control decision point for service data flow and IP bearer resources. It selects and provides available policy and charging control decisions for the policy and charging enforcement function unit (not shown in the figure).

[0072] IP services 204 may include the Internet, intranet, IMS (IP Multimedia Subsystem), or other IP services.

[0073] Although the above description uses the LTE system as an example, those skilled in the art should understand that this application is not only applicable to the LTE system, but also to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA, and future new network systems (such as 5G), etc., without limitation.

[0074] Based on the above-described mobile terminal hardware structure and communication network system, various embodiments of this application are proposed.

[0075] Figure 3 Flowchart of the processing method provided in the embodiments of this application Figure 1 ,like Figure 3 As shown, the method includes the following steps:

[0076] S20. Generate multiple candidate words that match the input word based on the context text of the input word.

[0077] Optionally, input words and contextual text can refer to input information entered by the user through a terminal device. Input information can refer to the stream of character sequences entered by the user into the application through an input device (such as a virtual keyboard, physical keyboard, speech-to-text, etc.) when interacting with the terminal device. This includes, but is not limited to, languages ​​based on letter spelling such as English, Pinyin, French, and German. Input information can be represented as a continuous string of letters, which can be separated by spaces, punctuation marks, or the Enter key as semantic boundaries.

[0078] The input word can refer to a spelling unit in the input information that is located at the current cursor position and has not yet been confirmed (i.e., not defined by spaces or punctuation). This spelling unit can be a complete word spelling string or pinyin string, or it can be a word spelling string or pinyin string that has not yet been entered.

[0079] Contextual text refers to the text content within a certain range before and after the input word that has already been selected for display. In languages ​​like English that use spaces for word segmentation, contextual text can be segmented and extracted word by word. It can include not only immediately preceding words but also earlier sentence fragments.

[0080] For example, if a user has already typed the English sentence "I am going to buy a newpho" in the mobile chat interface, and then continues to type the letter string "pho" through the virtual keyboard, but has not yet pressed the space bar to confirm, the "pho" that is being edited and may have spelling omissions is the input word. Meanwhile, the "I am going to buy a new" that has already appeared on the screen and serves as semantic background constitutes the context text. Or, if the user stops typing after typing the English sentence "I am going to buy a new phone", "phone" can also be the input word.

[0081] For example, if a user has already typed the English sentence "I am going to buy a new pho" in a mobile chat interface, and then adjusts the cursor position to "going" to make adjustments, the "going" being edited is the input word, while "I am" and "to buy a new pho" constitute the context text.

[0082] Multiple candidate words can refer to a set of multiple candidate words that match the input word, generated by the terminal device based on the context text of the input word after the user inputs information. These multiple candidate words can be saved in the form of a list.

[0083] In one implementation, a generative language model can be used to semantically model the context text and generate multiple candidate words. Here, the generative language model can refer to a deep learning-based model, whose core capability is learning linguistic patterns, grammatical structures, and semantic relationships from massive amounts of text data. In input error correction scenarios, this model can treat the input word as the next word to be predicted, and generate text content that conforms to the contextual logic by calculating its joint probability distribution with the context text. For example, a Llama model based on the Transformer architecture can be used to infer the most likely word by understanding the semantic intent of the preceding text.

[0084] Semantic modeling refers to the process of quantifying and expressing the meaning of text using mathematical vector spaces. In this application, the generative language model transforms the contextual text into a high-dimensional dense vector representation (Embedding), thereby capturing the deep grammatical dependencies and semantic connections between words. This allows for understanding the underlying intent of the text, judging the rationality of the "input word" in a specific context, and providing a logical basis for generating accurate candidate words.

[0085] After completing semantic reasoning, generative language models can rank multiple candidate words from high to low according to predicted probability or comprehensive score. Each of the multiple candidate words can include a specific word spelling (such as "I'll"), and can also be accompanied by quantitative indicators reflecting its credibility, such as the probability score predicted by the model (such as 0.95) and / or a similarity score calculated based on edit distance (such as 0.8).

[0086] S30. Based on the correlation between the input word and multiple candidate words in multiple dimensions, display at least one candidate word among the multiple candidate words.

[0087] Optionally, the relevance of multiple dimensions can refer to multiple quantitative dimensions used to comprehensively evaluate the degree of match between candidate words and user intent. In some embodiments, the relevance of multiple dimensions includes at least one of the following relevance metrics, but not limited to: edit distance score, character similarity score, word frequency, or contextual matching degree.

[0088] When filtering and ranking multiple candidate words using relevance across multiple dimensions, the similarity between each candidate word and the input word in terms of glyphs can be calculated (e.g., judging spelling errors by Levenstein distance). The semantic confidence output by the generative language model (i.e., the logical reasonableness of the word appearing in the context) can also be combined with the scores of these different dimensions through a weighted algorithm or ranking model (such as Learning to Rank) to integrate them into a comprehensive relevance score, thereby determining at least one candidate word among multiple candidate words.

[0089] For example, when considering relevance across multiple dimensions, including edit distance score, character similarity score, term frequency, and contextual matching, the overall relevance score can be equal to the edit distance score. Weight 1 + character similarity score Weight 2 + word frequency Weight 3+ Context Matching Weight 4.

[0090] At least one candidate word among multiple candidate words can refer to at least one candidate word that matches the user's current input intent after filtering and sorting multiple candidate words based on their relevance across multiple dimensions. For example, when a user mistakenly inputs "recieve", the multiple candidate words could include "relieve", "receipt", and "receive". After filtering and sorting the multiple candidate words based on their relevance across multiple dimensions, at least one candidate word is determined to be "receive", and "receive" is displayed on the desktop of the terminal device.

[0091] In one implementation, at least one candidate word includes at least one of the following: punctuation, capitalization, or correction.

[0092] Punctuation marks can refer to missing punctuation marks (such as periods, commas, question marks, etc.) inferred from the grammatical structure, contextual logic, or language habits of the input words and the surrounding text, or to the replacement and correction of misused punctuation marks.

[0093] Case sensitivity refers to the generation of candidate words with the first letter capitalized or all capitalized, based on specific writing conventions and the position of the input word in the context text. This can include the first word of an English sentence, proper nouns such as names of people, places, and organizations, as well as specific abbreviations.

[0094] Correction can refer to identifying and fixing spelling errors, typos, misuse of homophones, or grammatical inconsistencies in input words based on built-in dictionaries, language models, or contextual semantic analysis. For example, correcting "recieve" to "receive," or replacing words that do not fit the current context with more accurate expressions.

[0095] In some embodiments, Figure 4 A schematic diagram of the terminal device display interface provided in the embodiments of this application. Figure 1 ,like Figure 4 As shown, the interface displays an input area and a display area. The input area displays the user's current input information, "Africa beautiful". The display area displays multiple candidate words and / or at least one candidate word from multiple candidate words. For example, the display area can display at least three candidate words, including "beautiful", "beautiful", and "beautiful".

[0096] Therefore, by capturing the deep semantics in the context text, multiple candidate words matching the input word are generated. Then, by combining the correlation between the input word and multiple candidate words in multiple dimensions, the multiple candidate words are sorted so that the candidate words most likely to meet the user's intent can be presented in real time on the terminal device. This improves the accuracy of error correction, the relevance of completion, and the input efficiency, especially in dealing with spelling errors, incomplete input, and low-frequency word scenarios.

[0097] Optionally, the method further includes:

[0098] S10. In response to a preset operation, obtain the input word and context text from the input information.

[0099] Optionally, the preset operation may refer to the operation of the terminal device receiving input information. This operation may include interactive operations where the user inputs input information into the terminal device, or operations where other devices transmit input information to the terminal device.

[0100] After receiving input information, the terminal device parses the input information to obtain the input words and context text. Specifically, during the parsing of user input, the input method engine can listen to the terminal device's general input interface events (which can include virtual keyboard touch, physical keyboard keystrokes, or speech-to-text data streams). It dynamically locks consecutive letter sequences that the user has entered but not yet confirmed (e.g., before triggering space, punctuation, or enter commands) as input words. Simultaneously, it calls the text interface to read previously confirmed historical text and uses space or word segmentation algorithms to extract word sequences of a preset length, thereby constructing context text to aid semantic judgment.

[0101] Figure 5 Flowchart of the processing method provided in the embodiments of this application Figure 2 ,like Figure 5 As shown, based on the context text of the input word, multiple candidate words matching the input word are generated, including:

[0102] S21. Perform word segmentation on the context text and extract the word vector representation of each word;

[0103] S22. Determine the contextual dependencies between words based on word vector representation;

[0104] S23. Generate multiple candidate words that match the input word based on contextual dependencies.

[0105] Optionally, word segmentation can refer to the process of using natural language processing algorithms (such as WordPiece or Byte PairEncoding) to break down continuous contextual text into the smallest semantic units that the model can recognize. For example, “I'll goto the park” can be segmented into [“I'll”, “go”, “to”, “the”, “park”].

[0106] Word vector representation refers to mapping words into high-dimensional vectors to represent their semantic information. Through pre-trained models (such as Word2Vec or Transformer), each discrete word is transformed into a dense numerical vector, making semantically similar words closer together in the vector space; for example, using a Word2Vec or Transformer model to generate the vector representation of "go".

[0107] Contextual dependencies refer to the semantic and grammatical associations between words. For example, the subject-verb relationship between "I'll" and "go". In one implementation, a self-attention mechanism can be used to calculate the contextual dependencies between words in the word vector representation. This self-attention mechanism calculates the association weights between words, capturing long-distance dependencies.

[0108] For example, when a user inputs the contextual text "I like to play", word segmentation is performed to break it down into ["I", "like", "to", "play"] and convert it into corresponding high-dimensional word vectors. Then, a self-attention mechanism is used to calculate the association weights between these word vectors, accurately capturing the strong grammatical and semantic dependencies between "play" as a verb and the subject "I" and the infinitive marker "to". Based on this deep contextual dependency, multiple candidate words that highly match the current context are predicted and generated in the lexical space (such as "basketball", "football", or "games"), thus completing the complete generation process from text parsing to semantic prediction.

[0109] In one implementation, prediction can be performed using a generative language model. The training process of the generative language model can be as follows: natural language text is segmented according to byte pair encoding to obtain a segmented sequence; training samples and corresponding sample labels are constructed based on the segmented sequence, wherein the training samples are represented as prefix subsequences and the sample labels are represented as the next segment of the prefix subsequence; the model to be trained is adjusted based on the training samples and sample labels to obtain the generative language model.

[0110] Among them, byte pair encoding can refer to a word segmentation algorithm that can construct a fixed-size vocabulary by statistically analyzing the frequency of occurrence of adjacent byte pairs in the text, iteratively merging high-frequency pairs, and inferring the input text into known word units from left to right according to this rule. If an unregistered character is encountered, it will fall back to the UTF-8 byte level representation, thereby achieving robust encoding for any natural language text.

[0111] Natural language text refers to raw text data composed of languages ​​used by users in their daily lives (such as Chinese, English, etc.), including sentences, paragraphs, or documents. It can originate from unstructured corpora such as web pages, books, and social media, serving as the basic input for language modeling training. In the embodiments of this application, natural language text can originate from input data generated by all users during software use. By collecting and de-identifying this data to construct training corpora, not only can it closely resemble real-world application scenarios, but it can also effectively improve the model's generalization ability. At the same time, due to the high relevance and practicality of the data, the total number of training samples required can be reduced while ensuring performance, thereby supporting the training of smaller and more efficient models, and enabling successful quantization compression and terminal deployment in the format of a lightweight edge machine learning inference framework.

[0112] A word segmentation sequence can refer to a discrete token sequence obtained by processing natural language text through byte-pair encoding (BPE), where each token is a sub-word unit or byte in the vocabulary and is used as the input representation of a neural network model.

[0113] Training samples can refer to prefix subsequences extracted from the word segmentation sequence, serving as the input context for the model. Training samples can be represented as prefix subsequences, which are continuous subsequences from the starting position to a certain intermediate position in the word segmentation sequence. These prefix subsequences are used as the input context for the autoregressive language model, and while their length is variable, they never contain future information, ensuring unidirectional causal modeling. For example, for the word segmentation sequence [a1,a2,a3,a4], training samples could be [a1], [a1,a2], [a1,a2,a3], etc., used to predict its subsequent content.

[0114] The sample label can refer to the supervision signal corresponding to the training sample. The next word of the prefix subsequence can be the next token of the prefix subsequence in the original word segmentation sequence; for example, when the training sample is [a1,a2], its sample label is a3.

[0115] Therefore, by using word segmentation and word vector modeling, self-attention mechanism to deeply capture contextual semantics, and candidate generation strategy oriented towards input words, it can accurately understand the user's input intent, thereby generating a semantically coherent and context-sensitive candidate word list, which can improve the accuracy, fluency and response speed of input.

[0116] Optionally, based on contextual dependencies, multiple candidate words matching the input word are generated, including:

[0117] Multiple initial candidate words are generated based on the input word and multiple preset vocabulary filtering indicators, wherein the filtering indicators include at least one of edit distance, word frequency and character similarity;

[0118] Based on contextual dependencies, determine the probability distribution of multiple initial candidate words;

[0119] Based on the probability distribution of multiple initial candidate words, generate multiple candidate words that match the input word.

[0120] The initial candidate words can refer to words selected from multiple preset vocabulary based on literal matching rules that meet the screening criteria. The preset vocabulary can refer to words in a basic vocabulary library pre-built and stored on a local device or cloud server. This serves as the foundational database for generating the initial candidate words, aiming to improve user input efficiency and accuracy by pre-setting a massive number of vocabulary entries. In some embodiments, the preset vocabulary can include various types of entries such as common words, phrases, place names, and personal names.

[0121] Screening metrics can refer to quantitative standards used to measure the literal or statistical similarity between input words and preset vocabulary. These metrics can be used as filtering conditions in the first stage to eliminate obviously irrelevant words before semantic analysis, ensuring that the initial candidate words obtained can both contain words that the user may intend to input and not affect processing efficiency due to an excessive number of words.

[0122] In this application embodiment, the screening index includes at least one of edit distance, word frequency, or character similarity, wherein:

[0123] Edit distance can refer to a metric used to measure the degree of difference between two strings, that is, the minimum number of single-character editing operations (including insertion, deletion, or replacement) required to convert one string into another. In the embodiments of this application, the smaller the edit distance, the closer the user's input word is to the preset vocabulary in spelling, and the greater the probability that the preset vocabulary is the result of the user's spelling correction.

[0124] Word frequency refers to the absolute number of times or relative frequency of a specific word in a large-scale corpus or user historical input data. Among them, high-frequency words usually represent more common expressions and are given a higher basic weight during the filtering process to prioritize the display of commonly used words that users are most likely to use.

[0125] Character similarity can refer to a numerical ratio calculated based on the structural features of a character sequence (such as the number of shared characters, character order, or proximity of physical positions on a keyboard). It focuses on describing the degree of overlap between two words in terms of visual form or components; for example, it can be determined that "phon" and "phone" have a very high degree of character overlap.

[0126] The probability distribution of initial candidate words refers to the set of numerical values ​​representing the likelihood of each initial candidate word appearing as a target word matching the input word within the context. This distribution can be calculated based on deep semantic analysis. For example, the Softmax function can be used to transform the logistic values ​​output by the model into normalized probability values ​​(summing to 1), thereby quantifying the reasonableness or confidence of each initial candidate word in the current context. The higher the probability distribution value of an initial candidate word, the higher its semantic and grammatical fit with the context, and the greater the likelihood that it is the user's expected input.

[0127] After identifying multiple initial candidate words, their probability distribution can be determined based on contextual dependencies. Then, based on this probability distribution, multiple candidate words matching the input word are generated.

[0128] Therefore, the probability distribution-based reordering mechanism can improve the intelligence level of input methods, evolving them from literal matching to intent understanding. This allows for the precise placement of words that fit the current context (e.g., "play basketball" instead of "play lanqiu") when a user inputs pinyin or fuzzy characters. Furthermore, since it involves the probability distribution of multiple initial candidate words, this solution can be deployed in lightweight on-device scenarios. By running a miniaturized generation model that has undergone quantization or distillation locally on the terminal device, complex semantic reasoning and probability calculations can be performed in real-time using the device's computing power without relying on cloud networks. This not only significantly reduces input latency and achieves smooth response but also effectively avoids the risk of leakage caused by uploading user privacy data (such as chat logs and search history) to the cloud. While ensuring user privacy and security, it greatly improves the input experience and energy efficiency in offline states.

[0129] Figure 6 Flowchart of the processing method provided in the embodiments of this application Figure 3 ,like Figure 6 As shown, based on the correlation between the input word and multiple candidate words across multiple dimensions, at least one candidate word from among the multiple candidate words is displayed, including:

[0130] S31. Determine multiple relevance indicators and their weights in the multiple dimensions of relevance, wherein the relevance indicators include at least two of the following: edit distance score, character similarity score, word frequency score, and context matching score.

[0131] S32. Perform a weighted summation of the relevance indicators and their weights to determine the scores of multiple candidate words.

[0132] S33. Based on the scores of multiple candidate words, display at least one candidate word in order.

[0133] Optionally, the weight of the relevance indicator can refer to the importance coefficient of different relevance indicators to determine the influence of each relevance indicator relative to the candidate words in the candidate word list.

[0134] Edit distance score is a quantitative metric calculated based on the Levenshtein distance algorithm, used to measure the degree of difference in spelling between the current input string and candidate words. This score is defined by calculating the minimum number of single-character editing operations (including insertion, deletion, and replacement) required to transform one string into another. A lower score (or a higher normalized similarity) means that the user's input characters are more similar to the candidate words in spelling.

[0135] Character similarity score is a numerical metric that focuses on analyzing the degree of overlap between input text and candidate words in terms of visual morphology, character composition, or keyboard physical layout. This metric can be calculated using algorithms such as Jaccard similarity or cosine similarity to determine the proportion of shared characters (or N-gram segments) between two strings.

[0136] Term frequency score refers to a statistical indicator that reflects the frequency of occurrence of candidate words, based on the term frequency of candidate words. It can be calculated by combining term frequency (TF) and inverse document frequency (IDF).

[0137] Context matching score refers to a numerical value calculated using natural language processing models (such as N-gram or Transformer architecture) that represents the degree of semantic and grammatical fit between candidate words and the context text.

[0138] After determining the relevance metrics and their weights for candidate words, a weighted sum of the relevance metrics and their weights can be performed to obtain the candidate word's score. In some embodiments, the candidate word score can satisfy:

[0139]

[0140] Here, correlation index a to correlation index n are different correlation indices, and wa to wn are the weights corresponding to correlation index a to correlation index n.

[0141] After obtaining the scores of the candidate words, the candidate words can be sorted in descending order based on their scores, and a preset number of the top-ranked candidate words can be selected. Their display position in the input method candidate bar can then be determined according to their score order.

[0142] Therefore, by dynamically selecting and weighting the correlation of multiple dimensions such as edit distance, character similarity, word frequency and context matching, candidate words can be finely scored and sorted. This not only takes into account the error tolerance of the input form and the rationality of the language semantics, but also adaptively adjusts preferences for different error correction scenarios. As a result, the candidate words that best match the user's intent and their optimal arrangement order are accurately and efficiently displayed on the terminal interface, improving input accuracy, interaction efficiency and user experience.

[0143] Optionally, the relevance index and the weight of the relevance index in the multiple dimensions of relevance are determined based on the error correction type of the input word;

[0144] The weights of the relevance indicators differ depending on the type of error correction.

[0145] Optionally, the error correction type for input words can include input error and incomplete input. Input error can refer to the user's word choice error caused by accidental keystrokes, character confusion, misselection, etc., such as writing "I'll" as "Ill". Incomplete input can refer to the user not having entered a complete word and being in a truncated state in the middle or at the end of the word, such as "beautifu", which corresponds to the incomplete "beautiful".

[0146] By identifying the error correction type of the input word (e.g., input error or incomplete input), the appropriate relevance metrics can be dynamically selected and their weights adjusted. For example, when a spelling error is detected (e.g., the user inputs "teh" but intends to input "the"), the weights of relevance metrics such as edit distance and character similarity are prioritized and increased to effectively recall correct candidate words that are similar in form to the incorrect input. When the input is determined to be incomplete (e.g., the user only inputs "app"), more emphasis is placed on relevance metrics such as word frequency, prefix matching, and the probability generated by the language model, and these are given higher weights to recommend high-frequency, semantically coherent, and context-consistent complete words (e.g., "apple"). This improves the accuracy of error correction and completion, making candidate words more closely match the user's true input intent.

[0147] Optionally, the generative language model is a lightweight model deployed on a terminal device in the format of a lightweight edge machine learning inference framework.

[0148] Optionally, a generative language model can refer to a lightweight model deployed on a terminal device after being quantized in the format of a lightweight edge machine learning inference framework. This involves the original large model undergoing weight quantization (e.g., int8), operator optimization, and format conversion to generate a small, computationally efficient .tflite file that runs locally on the device without relying on cloud services. In practice, this deployment method reduces the model's requirements for storage, memory, and computing power, enabling generative AI to run in real-time on resource-constrained terminal devices such as smartphones and tablets. It also ensures user data privacy (text is not uploaded to the cloud), reduces network latency, and improves response speed and availability. Thus, while maintaining high language understanding and generation quality, it achieves a smooth, private, and offline intelligent input experience.

[0149] Figure 7 Flowchart of the processing method provided in the embodiments of this application Figure 4 ,like Figure 7 As shown, after step S30, the following steps are included:

[0150] S40. In response to an operation on the target candidate word among at least one of the displayed candidate words, replace the input word with the target candidate word.

[0151] Optionally, when a user performs a selection operation (such as clicking, swiping, or confirming with a number key) on the display interface of the terminal device, the system responds to the operation and automatically replaces the incomplete or erroneous input words in the current input box with the selected candidate words, thereby completing the error correction or completion, making the input more accurate and fluent, and updating the interface in real time to reflect the modification results.

[0152] Figure 8 A schematic diagram of the terminal device display interface provided in the embodiments of this application. Figure 2 ,like Figure 8 As shown, the interface displays an input area and a display area. The input area displays the user's input word: "ill". The display area displays candidate words. There are three target candidate words in the display area, including "ill", "i'll", and "I'll". After the user clicks "I'll" in the display area, "ill" in the input area is changed to "I'll".

[0153] Therefore, when a user clicks or confirms a candidate word on the terminal device interface, the input content can be instantly and accurately replaced. The input words (such as misspelled words or incomplete segments) are seamlessly updated to candidate words. This not only achieves efficient error correction and intelligent completion, but also improves input fluency, reduces manual editing, and enhances the naturalness and responsiveness of human-computer interaction.

[0154] Optionally, Figure 9 This is a schematic diagram of the modules of the processing system provided in the embodiments of this application, such as... Figure 9 As shown, this module may include: a user interaction module, an input method vocabulary module, a language model module, and a post-processing module, wherein,

[0155] The user interaction module captures and parses user input in input boxes, distinguishing the current input word from the existing context text. This module provides foundational data support for subsequent processing and is a key entry point for achieving an efficient input experience.

[0156] The input method vocabulary module is a core component of the input method system used to store all words and their related information, aiming to improve the user's input efficiency and accuracy. The vocabulary (i.e., preset words) in the input method vocabulary module can contain various types of entries, such as commonly used words, phrases, place names, and personal names. By introducing filtering indicators such as edit distance, word frequency, and character similarity, the input method can effectively generate candidate words that match the input words, further optimizing error correction and the input experience.

[0157] The language model module includes a text encoder and a generative language model. The text encoder is responsible for converting natural language into feature vectors; then, the generative language model, based on a deep neural network, predicts the most likely subsequent content by analyzing the semantic features of the context, given an input or context.

[0158] During the training phase, generative language models receive massive amounts of text data and continuously adjust their internal parameters by repeatedly predicting the next word (or subword, character) to accurately model the generative language model.

[0159] The post-processing module consists of three stages: filtering, sorting, and outputting the final result. The filtering stage selects candidate words through a similarity threshold to ensure that they are sufficiently similar in form to the user's input word. This effectively eliminates semantically reasonable but visually irrelevant interference items when the input word is short.

[0160] In the sorting process, based on the filtered candidate words, a weighted scoring function is constructed by combining multiple dimensions such as edit distance score, character similarity score, word frequency and context matching degree. A comprehensive score is calculated for each candidate word, and the words are re-sorted from high to low scores.

[0161] The output stage converts the sorted Top-K candidate word list into structured data for display on the front-end interface and user interaction. In some embodiments, all algorithms in this application can be implemented using Java 8 for the user interaction module and post-processing module; and the input method vocabulary module and language model module can be implemented using the C++14 standard and the Clang compiler. The hardware device uses a Tecno Spark Go 2024 (BG6s) with 64GB of storage, 4GB of RAM, and an 8-core UMS9230 chipset, running Android 13.

[0162] 1. The input method vocabulary (preset vocabulary) in the input method vocabulary module can be sourced from the internet. It can be a high-frequency vocabulary list constructed based on massive crawling and statistical analysis of English internet text, covering multiple fields such as social media, blogs, news reports, and technical reports, possessing broad representativeness and real-world language usage value. The construction process includes word segmentation, cleaning, and standardization of the original corpus (such as unifying capitalization and removing punctuation), followed by using a word frequency statistics algorithm to sort the frequency of each word, ultimately generating a vocabulary list arranged in descending order of frequency. The top 70,000 high-frequency words selected in this application are used as the core experimental vocabulary.

[0163] 2. Generative language models can use the Llama model based on the Transformer network as the base model. The model design uses a 6-layer Transformer network, with 6 heads in each layer, a feature depth of 288, and a maximum vocabulary length of 64 for each input sample. Specifically:

[0164] A. Dataset construction: The training set for the language model uses 800 everyday dialogues.

[0165] B. Model Training: This model was trained in an environment equipped with an NVIDIA GeForce RTX 3090 graphics card. Before training, the text was first encoded using the BPE (Byte Pair Encoding) algorithm based on the training corpus. The generated encoded vocabulary contained 36,000 terms, of which 25,000 came from the core vocabulary and the remaining 11,000 were obtained through statistical analysis of the corpus. The model adopted a generative training paradigm, with the training task being unidirectional prediction of the next word, thus achieving formal alignment between the training and inference phases. The trained language model was converted into a lightweight edge machine learning inference framework format, which can meet the needs of inference acceleration on mobile devices, IoT devices, and edge devices.

[0166] C. Model Inference: In this application, the purpose of model prediction is to provide the probability distribution of candidate words. Therefore, during the inference stage, a greedy algorithm is used for text encoding of candidate words, that is, to find the best consecutive token pairs in the vocabulary and merge them into a new token if they exist. If a UTF-8 character is not found in the vocabulary, the algorithm will fall back to the byte-by-byte encoding mechanism. In this process, the algorithm gradually generates the final text representation by continuously merging the optimal word pairs to optimize encoding efficiency. Finally, the probability distribution of all candidate words is calculated based on the merged token sequence to obtain the output result that best fits the contextual semantics.

[0167] 3. Post-processing module. Its filtering stage sets the following conditions: candidate words do not start with the user input substring; in this case, it should be considered completion rather than error correction; the edit distance between the candidate word and the user input word is no greater than 2; the character similarity between the candidate word and the user input word is no less than 80%. The ranking stage sorts the words according to the probability distribution obtained from model inference, requiring the probability score to be greater than or equal to the score of the 256th word in the model's full vocabulary.

[0168] 4. Experimental Data. The evaluation was conducted on a dataset of 500 everyday English conversations, with an average word count of 10 per sample.

[0169] Based on this, the comparison results between the edit distance-based method and the generative language model-based method are shown in the table:

[0170]

[0171] Figure 10 A schematic diagram of the terminal device display interface provided in the embodiments of this application. Figure 3 Among them, the error correction behavior triggered by input spelling errors (such as: extra letters, missing letters, missing symbols, etc.) is as follows: Figure 10 As shown in 'a', the error correction behavior triggered by semantic errors is as follows: Figure 10 As shown in b, although the input word (ill) is objectively correct, the language model believes that "i'll" is more likely to appear at the beginning of a sentence in natural human language, thus triggering the error correction mechanism. Error correction behavior involving capitalization is as follows: Figure 10 As shown in c, when the word being corrected is a proper noun or a typical abbreviation, the correction behavior of this application will also include the ability to correct for capitalization. Therefore, this application can:

[0172] 1. Improve the accuracy of semantic error correction: By integrating generative language models, it is possible to fully understand the contextual semantics, identify errors at the grammatical and semantic levels, and significantly improve the intelligence and accuracy of input method error correction.

[0173] 2. Reduced reliance on the cloud: By converting the language model into a lightweight edge machine learning inference framework format and performing inference on mobile and edge devices, reliance on cloud computing is reduced, response speed is improved, and privacy protection is enhanced.

[0174] 3. Improve user input experience: Through intelligent candidate word sorting and similarity filtering, more accurate and context-appropriate candidate words can be provided to users, optimizing error correction and input efficiency during the input process and improving the overall user experience.

[0175] 4. Wide adaptability: This application uses a large-scale text corpus and multi-domain language models, which enables it to perform well in a variety of application scenarios, especially suitable for mobile devices, the Internet of Things and edge computing scenarios.

[0176] 5. Lower input cost: Compared with traditional input method systems, this application improves the error correction recall rate and reduces the input cost, enabling users to perform text input and error correction more efficiently in practical applications.

[0177] This application also provides a terminal device, which includes a memory and a processor. The memory stores a processing program, and when the processing program is executed by the processor, it implements the steps of the processing method in any of the above embodiments.

[0178] This application also provides a computer-readable storage medium storing a processing program, which, when executed by a processor, implements the steps of the processing method in any of the above embodiments.

[0179] In the embodiments of the terminal device and computer-readable storage medium provided in this application, all the technical features of any of the above-described processing method embodiments may be included. The extended and explanatory content of the specification is basically the same as that of the embodiments of the above methods, and will not be repeated here.

[0180] This application also provides a computer program product, which includes computer program code. When the computer program code is run on a computer, it causes the computer to perform the methods described in the various possible implementations above.

[0181] This application also provides a chip, including a memory and a processor. The memory is used to store a computer program, and the processor is used to call and run the computer program from the memory, so that a device with the chip installed performs the methods described in the various possible implementations above.

[0182] It is understood that the above scenarios are merely examples and do not constitute a limitation on the application scenarios of the technical solutions provided in the embodiments of this application. The technical solutions of this application can also be applied to other scenarios. For example, as those skilled in the art will know, with the evolution of system architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.

[0183] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0184] The steps in the method of this application embodiment can be adjusted, combined, or deleted according to actual needs.

[0185] The units in the device of this application embodiment can be merged, divided, and deleted according to actual needs.

[0186] In this application, the same or similar terms, concepts, technical solutions and / or application scenario descriptions are generally described in detail only when they appear for the first time. When they appear again, they are generally not repeated for the sake of brevity. When understanding the technical solutions and other contents of this application, the same or similar terms, concepts, technical solutions and / or application scenario descriptions that are not described in detail later can be referred to their previous relevant detailed descriptions.

[0187] In this application, the descriptions of the various embodiments have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0188] The technical features of the present application can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of the present application.

[0189] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, controlled terminal, or network device, etc.) to execute the methods of each embodiment of this application.

[0190] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, storage disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium, such as a solid-state disk (SSD).

[0191] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. A processing method, characterized in that, The method includes: Based on the context text of the input word, generate multiple candidate words that match the input word; Based on the correlation between the input word and the plurality of candidate words across multiple dimensions, at least one candidate word from the plurality of candidate words is displayed.

2. The method according to claim 1, characterized in that, The at least one candidate word includes at least one of the following: punctuation, capitalization, or correction.

3. The method according to claim 1 or 2, characterized in that, The method further includes: In response to a preset operation, the input word and the context text in the input information are obtained.

4. The method according to claim 1, characterized in that, The step of generating multiple candidate words that match the input word based on the context text of the input word includes: The context text is segmented into words, and the word vector representation of each word is extracted. Based on the word vector representation, the contextual dependencies between words are determined; Based on the contextual dependencies, the plurality of candidate words that match the input word are generated.

5. The method according to claim 4, characterized in that, The step of generating the plurality of candidate words matching the input word based on the context dependency relationship includes: Multiple initial candidate words are generated based on the input word and multiple preset vocabulary filtering indicators, wherein the filtering indicators include at least one of edit distance, word frequency and character similarity; Based on the contextual dependencies, determine the probability distribution of the plurality of initial candidate words; Based on the probability distribution of the plurality of initial candidate words, the plurality of candidate words that match the input word are generated.

6. The method according to claim 1, characterized in that, The method of displaying at least one candidate word from the plurality of candidate words based on the correlation between the input word and the plurality of candidate words across multiple dimensions includes: Determine multiple relevance indicators and their weights among the multiple dimensions of relevance, wherein the relevance indicators include at least two of edit distance score, character similarity score, word frequency score, and context matching score; The relevance index and its weight are weighted and summed to determine the scores of the multiple candidate words. Based on the scores of the plurality of candidate words, at least one candidate word is displayed in sequence.

7. The method according to claim 6, characterized in that, The correlation index and the weight of the correlation index in the multiple dimensions are determined based on the error correction type of the input word; The weights of the correlation indicators differ depending on the type of error correction.

8. The method according to any one of claims 1 to 7, characterized in that, The method further includes: In response to an operation on the target candidate word among the at least one candidate words displayed, the input word is replaced with the target candidate word.

9. A terminal device, characterized in that, The terminal device includes a memory and a processor. The memory stores a processing program for the terminal device. When the processing program is executed by the processor, it implements the processing method of the terminal device as described in any one of claims 1 to 8.

10. A readable storage medium, characterized in that, The readable storage medium stores a computer program that, when executed by a processor, implements the processing method of the terminal device as described in any one of claims 1 to 8.