Keyboard input method mode switching method and system, medium and product

By acquiring the translated and original texts, the system automatically determines and switches the keyboard input method mode, solving the problem of users frequently having to manually switch modes during multilingual translation, thus improving translation efficiency and convenience.

CN121541791APending Publication Date: 2026-02-17DONGGUAN COUSO TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511647211.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-11
Publication Date
2026-02-17

AI Technical Summary

Technical Problem

In existing technologies, users frequently switch keyboard input modes manually during multilingual translation, increasing the operational burden. This is especially true when dealing with specific words such as brand names, personal names, and place names, where frequent switching between the original text input mode and the translation input mode is required, resulting in low operational efficiency.

Method used

By acquiring the translated and original texts, responding to user modification operations, automatically determining whether there are proper nouns in the preset vocabulary database, and automatically switching the keyboard input method mode when necessary, reducing manual operation by the user.

Benefits of technology

It enables automatic switching of input method modes without requiring users to manually operate shortcut keys or click the status bar, improving the convenience and accuracy of multilingual input, reducing the operational burden, and improving translation efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121541791A_ABST
    Figure CN121541791A_ABST
Patent Text Reader

Abstract

The invention provides a keyboard input method mode switching method and system, a medium and a product. In the method, a keyboard input method mode switching system firstly obtains a translated text and an original text, and defines different input method modes corresponding to the translated text and the original text; and when the user modifies in the translation frame, the keyboard input method mode switching system determines to-be-modified content, and finds target content in the original text according to the corresponding relationship between the translation text and the original text. If the target content is the special vocabulary in the preset vocabulary library, it is indicated that the user possibly needs to input the original text content, and at the moment, the input method mode of the translation frame is automatically switched into the input method mode corresponding to the original text. According to the method, the user does not need to manually operate a shortcut key or click a status bar, so that the operation of frequently switching the input method in translation and editing by the user is reduced, the operation burden is relieved, and the convenience of multi-language input 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 equipment technology, and in particular to a keyboard input method mode switching method, system, medium and product. Background Technology

[0002] With the development of computer technology, multilingual input has become a basic requirement for users in their daily work. When translating documents, users often need to switch between the original text and the translation for editing and modification. To improve input efficiency, keyboard input methods typically offer multiple language input modes for users to choose from.

[0003] Currently, the common method for switching keyboard input mode is to switch between different languages ​​by using shortcut keys or clicking the input method status bar.

[0004] However, in actual translation work, machine translation results often require manual modification and optimization. Especially for specific terms such as brand names, personal names, and place names, translators need to restore them to their original form. Simultaneously, for content with less than ideal translation quality, translators also need to optimize it. This leads to users frequently switching between source and target input modes during the editing process. Each switch requires manually using shortcut keys or clicking the status bar. For example, when translating technical or business documents, brand names or organization names such as "iPhone 15 Pro" or "OpenAI" usually need to be preserved in their original form. Translators must repeatedly switch between Chinese and English input methods, and this repetitive operation increases the user's workload. Summary of the Invention

[0005] This application provides a keyboard input method mode switching method, system, medium, and product to alleviate the technical problem that frequent manual switching of language input modes increases the user's operational burden, and improves the convenience of text input and language switching in a multilingual environment.

[0006] Firstly, this application provides a keyboard input method mode switching method, applied to a keyboard input method mode switching system. The method includes: acquiring the translated text in the translation box and the original text in the original text box after automatic translation, wherein the translation box corresponds to a first keyboard input method mode and the original text box corresponds to a second keyboard input method mode, and the first keyboard input method mode and the second keyboard input method mode are keyboard input method modes corresponding to different languages; responding to the user's modification operation in the translation box, determining the text content to be modified in the translation text; acquiring the translation correspondence between the translation text and the original text, and determining the target text content corresponding to the text content to be modified in the original text; determining whether there is a proper vocabulary corresponding to the target text content in a preset vocabulary library; if there is a proper vocabulary corresponding to the target text content in the preset vocabulary library, then switching the first keyboard input method mode of the translation box to the second keyboard input method mode.

[0007] By adopting the above technical solution, the keyboard input method mode switching system first acquires the translated and original texts, identifying the corresponding input method modes. When the user makes modifications in the translation box, the system determines the content to be modified and finds the target content in the original text based on the translation correspondence. If the target content is a proprietary term in a preset vocabulary library, it indicates that the user may need to input the original text. In this case, the system automatically switches the input method mode of the translation box to the mode corresponding to the original text. This process eliminates the need for users to manually operate shortcut keys or click the status bar, reducing the frequency of switching input methods during translation editing, alleviating the operational burden, and improving the convenience of multilingual input.

[0008] In conjunction with some embodiments of the first aspect, in some embodiments, in response to a user's modification operation in the translation box, determining the text content to be modified in the translation text includes: responding to a user's modification operation in the translation box, the modification operation including a click operation and a selection operation; if the modification operation is a click operation, obtaining the cursor position in the translation box, and obtaining candidate content centered on the cursor position within a preset character count threshold range, the preset character count threshold limiting the length of the candidate content; obtaining the text content to be modified in the translation text by performing semantic analysis on the candidate content; if the modification operation is a selection operation, determining the selected content in the translation box as the text content to be modified.

[0009] By adopting the above technical solution, the keyboard input method mode switching system uses different methods to determine the text to be modified based on different modification operations (click or selection) performed by the user within the translation box. For click operations, the system acquires candidate content centered on the cursor and analyzes the meaning of the candidate content to determine the text to be modified; for selection operations, the system uses the selected content as the text to be modified. This differentiated processing method can accurately capture the user's modification intent, ensuring the accuracy of the text to be modified, thereby achieving automatic switching more effectively and improving the user experience.

[0010] In conjunction with some embodiments of the first aspect, in some embodiments, the text content to be modified in the translated text is obtained by performing semantic analysis on the candidate content. Specifically, this includes: performing semantic analysis on the candidate content to determine whether the candidate content constitutes a basic vocabulary, where the basic vocabulary is a vocabulary with complete grammatical boundaries; if the candidate content does not constitute a basic vocabulary, then based on the length of the candidate content and with a character extension length threshold as the step size, iteratively expanding the number of characters contained in the candidate content to obtain expanded candidate content; repeatedly performing semantic analysis on the expanded candidate content until the expanded candidate content constitutes a basic vocabulary, and determining the basic vocabulary as the text content to be modified in the translated text.

[0011] By adopting the above technical solution, when the candidate content does not constitute basic vocabulary, the keyboard input method mode switching system iteratively expands the number of characters at a preset step size until basic vocabulary is formed. This process ensures that the text content to be modified is grammatically complete vocabulary, avoids subsequent translation correspondence matching errors caused by incomplete content, ensures accurate location of the corresponding target text content in the original text, and improves the accuracy of keyboard input method mode switching.

[0012] In conjunction with some embodiments of the first aspect, in some embodiments, after determining the basic vocabulary as the text content to be modified in the translated text, the method further includes: based on the text content to be modified, extending the preset character length in both forward and backward directions to obtain optimized candidate content; performing semantic analysis on the optimized candidate content to determine whether there is supplementary content to the text content to be modified in the optimized candidate content; if there is supplementary content to the text content to be modified in the optimized candidate content, merging the supplementary content with the text content to be modified, and using the merged content as the updated text content to be modified in the translated text; if there is no supplementary content to the text content to be modified in the optimized candidate content, then determining the text content to be modified as the updated text content to be modified in the translated text.

[0013] By adopting the above technical solution, the keyboard input method mode switching system, after identifying the basic vocabulary as the text to be modified, further expands the character length to obtain optimized candidate content and analyzes whether there is supplementary content. If so, the text to be modified and the supplementary content are merged to make the text to be modified more complete. This method can more comprehensively capture the content that the user actually needs to modify, avoid missing related parts, and thus more accurately find the corresponding target text content, ensuring the timeliness and accuracy of input method mode switching and better meeting the user's modification needs.

[0014] In conjunction with some embodiments of the first aspect, in some embodiments, semantic analysis is performed on the optimization candidate content to determine whether there is supplementary content for the text content to be modified in the optimization candidate content. Specifically, this includes: performing semantic analysis on the optimization candidate content to obtain semantic analysis results; calculating the semantic relevance score between the word vector of each word in the semantic analysis results and the text content to be modified, and comparing the semantic relevance score with the semantic relevance threshold; if the semantic relevance score is higher than the semantic relevance threshold, it is determined that there is supplementary content for the text content to be modified in the optimization candidate content; if the semantic relevance score is not higher than the semantic relevance threshold, it is determined that there is no supplementary content for the text content to be modified in the optimization candidate content.

[0015] By employing the aforementioned technical solution, the keyboard input method mode switching system performs semantic analysis on the optimization candidate content, calculates the semantic relevance between each word in the candidate content and the text to be modified, and compares the semantic relevance with a semantic relevance threshold to determine whether supplementary content is needed. This semantic relevance-based judgment method determines supplementary content based on evidence, avoids errors in subjective judgment, ensures that the merged text to be modified better matches the user's modification intention, thereby improving the accuracy of subsequent target text content matching and ensuring the effectiveness of input method mode switching.

[0016] In conjunction with some embodiments of the first aspect, in some embodiments, after the step of switching the first keyboard input method mode of the translation box to the second keyboard input method mode if a proprietary word corresponding to the target text content exists in the preset vocabulary library, the method further includes: obtaining a preset backlight color corresponding to the second keyboard input method mode; sending a backlight switching command to the keyboard to switch the backlight color of the language area at the keyboard keycaps corresponding to the second keyboard input method mode to the preset backlight color, so as to indicate that the input method mode has been switched.

[0017] By adopting the above technical solution, after switching input method modes, the keyboard input method mode switching system switches the backlight of the corresponding language area of ​​the keyboard to a preset color. This visual cue allows users to intuitively understand the current input method mode, avoiding input errors caused by unclear modes, enhancing users' perception of the input method status, and further improving the convenience and accuracy of multilingual input.

[0018] In conjunction with some embodiments of the first aspect, in some embodiments, the preset backlight color specifically includes: establishing a correspondence table between keyboard input method modes and backlight colors, where different keyboard input method modes correspond to different backlight color features; storing backlight colors that correspond one-to-one with different keyboard input method modes in the correspondence table, or setting different intensity values ​​of the same backlight color, and storing the different intensity values ​​in the correspondence table after corresponding them one-to-one with different keyboard input method modes.

[0019] By adopting the above technical solution, the keyboard input method mode switching system establishes a correspondence table between input method modes and backlight colors, so that different modes correspond to different backlight features (color or intensity). Using this method, the uniqueness and clarity of backlight prompts are ensured, allowing users to quickly identify the current input method mode through different backlight features. This reduces the time cost of mode recognition, improves operational efficiency, and enhances the user experience in multilingual input environments.

[0020] In a second aspect, this application provides a keyboard input method mode switching system, including one or more processors and a memory; the memory is coupled to the one or more processors, and the memory is used to store computer program code, the computer program code including computer instructions, and the one or more processors call the computer instructions to cause the keyboard input method mode switching system to perform the method described in the first aspect and any possible implementation thereof.

[0021] Thirdly, this application provides a computer-readable storage medium including instructions that, when executed on a keyboard input method mode switching system, cause the keyboard input method mode switching system to perform the method described in the first aspect and any possible implementation thereof.

[0022] Fourthly, this application provides a computer program product that, when run on a keyboard input method mode switching system, causes the keyboard input method mode switching system to perform the method described in the first aspect and any possible implementation thereof.

[0023] One or more technical solutions provided in the embodiments of this application have at least the following technical effects or advantages: 1. By adopting the technical means of obtaining the translation and the original text, determining the content to be modified when the user modifies the translation and matching the corresponding target content in the original text, and automatically switching the input method mode when the target content is a proprietary word in the preset vocabulary, the technical problem of frequent manual switching of language input mode in the existing technology increases the user's operational burden. Thus, the technical effect of reducing user switching operations and improving the convenience of multilingual input is achieved.

[0024] 2. By employing two modification operations—clicking and selecting within the translation box—and determining the text to be modified by analyzing word meanings through cursor position and directly selecting the selected content, respectively, the technology effectively solves the technical problem in existing technologies that makes it difficult to accurately capture the user's modification intent, thus affecting switching efficiency. This achieves the technical effect of accurately determining the content to be modified, providing a reliable basis for automatic switching, and improving the user experience.

[0025] 3. By employing a technical approach that iteratively expands the number of characters with a preset step size until basic vocabulary is formed when candidate content does not constitute basic vocabulary, the technical problem of incomplete content to be modified leading to subsequent matching errors affecting the accuracy of switching in existing technologies is effectively solved. This achieves the technical effect of ensuring the grammatical integrity of the content to be modified and improving the matching accuracy of the target text content to guarantee the accuracy of mode switching. Attached Figure Description

[0026] Figure 1 This is a flowchart illustrating a keyboard input method mode switching method in an embodiment of this application. Figure 2 This is another flowchart illustrating the keyboard input method mode switching method in this application embodiment; Figure 3 This is a schematic diagram of the hardware structure of the keyboard input method mode switching system in an embodiment of this application. Detailed Implementation

[0027] The terminology used in the following embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. As used in the specification and appended claims of this application, the singular expressions “a,” “an,” “the,” “the,” “the,” and “this” are intended to include the plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in this application refers to any or all possible combinations including one or more of the listed items.

[0028] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.

[0029] For ease of understanding, the method provided in this implementation is described in process below. Please refer to [link / reference]. Figure 1 This is a flowchart illustrating a keyboard input method mode switching method in an embodiment of this application.

[0030] 101. Obtain the translated text in the translation box and the original text in the original text box after automatic translation. The translation box corresponds to the first keyboard input method mode, and the original text box corresponds to the second keyboard input method mode. The first keyboard input method mode and the second keyboard input method mode are keyboard input method modes corresponding to different languages.

[0031] The translation box represents the text input area used to display the translated text, the source box represents the text input area used to display the text to be translated, the translation text represents the target language text obtained after automatic translation, and the source text represents the source language text that needs to be translated.

[0032] Specifically, the keyboard input method mode switching system first locates the translation box and the original text box in the interface, and obtains the text through two main methods: one is to call the system's standard text control API (such as the GetWindowText function in Windows and the value property in the web) to directly read the automatically translated translation text and the original text to be translated within the control; the other is, if it is a non-standard text control (such as a custom drawing area), it uses OCR technology to first capture the ROI region images of the translation box and the original text box, and after binarization and noise reduction preprocessing, it calls an OCR engine such as Tesseract (loading the corresponding language pack) to recognize the text. After obtaining the text, the keyboard input method mode switching system reads the preset configuration, confirms the first keyboard input method mode bound to the translation box and the second keyboard input method mode bound to the original text box, and ensures that they are different national language modes.

[0033] 102. In response to the user's modification operation in the translation box, determine the text content to be modified in the translation text.

[0034] The "Edit" operation refers to the user's editing behavior on the text in the translation box, and the text to be modified refers to the translated text segment that the user has selected or specified through the "Edit" operation.

[0035] Specifically, the keyboard input method mode switching system monitors the user's operation behavior in the translation box in real time. When it detects that the user is modifying the text, the keyboard input method mode switching system will capture this modification event, locate the position of the text content to be modified, and obtain the text content to be modified.

[0036] 103. Obtain the translation correspondence between the translated text and the original text, and determine the target text content corresponding to the text content to be modified in the original text.

[0037] Translation correspondence refers to the mapping relationship between words or phrases in the source text and the corresponding translated content in the target text. Target text content refers to the text segment in the source text that corresponds to the text content to be modified.

[0038] Specifically, the keyboard input method mode switching system first acquires word alignment information generated by the translation engine during the automatic translation stage, which records the correspondence between words or phrases in the original text and the translated text. This word alignment information is the translation correspondence. Next, the system performs semantic analysis on the text to be modified, extracting its core semantic features. For example, for the text "Apple Inc.", it extracts semantic features such as "company name," "technology field," and "derived from the English 'Apple Inc.'." It then searches the translation correspondence for translated fragment records that match the semantic features of the text to be modified and locates the corresponding original text fragment based on these records. Finally, the system extracts the corresponding text content from the original text based on the original text fragment location; this is the target text content. If the text to be modified has multiple possible corresponding original text fragments (e.g., the translated "run" may correspond to the original "run" in different contexts, corresponding to the scenarios of "program running" and "running"), the keyboard input method mode switching system can combine the context of the text to be modified and select the one with the highest context matching score as the final target text content by calculating the context matching score of different candidate target text content, so as to ensure the accuracy of the mapping.

[0039] In some embodiments, the acquisition of translation correspondences and the determination of target text content can be achieved in multiple ways: Optionally, the keyboard input method mode switching system can establish a word alignment table between the original text and the target text during the translation process, recording the correspondence and position information of each word. When a correspondence needs to be found, the target text content is located by querying this alignment table, while handling possible one-to-many or many-to-one translation situations. Optionally, the keyboard input method mode switching system can use a text similarity matching algorithm to search for text segments in the original text that are semantically related to the content to be modified, determine the most matching target text content by calculating the similarity score, and store the matching result in a correspondence cache. It is understood that other methods can also be used to acquire translation correspondences and determine target text content, which are not limited here.

[0040] 104. Determine whether there are any proprietary terms in the preset vocabulary database that correspond to the target text content.

[0041] The preset vocabulary database refers to a database of special words that the system has built in advance, including proper nouns, terms, fixed collocations, etc. Proper nouns refer to words with specific meanings or usage scenarios, such as professional terms, personal names, place names, organization names, etc. In some embodiments, the preset vocabulary database may also include text patterns that should not be translated according to preset rules, such as URL links, code snippets, or identifiers with specific formats.

[0042] Specifically, the keyboard input method mode switching system needs to match and compare the identified target text content with entries stored in a preset vocabulary database. The system uses either exact or fuzzy matching to check if the target text content belongs to any proprietary words included in the preset vocabulary database. During the matching process, the system considers various possible representations of the words, such as variant forms, capitalization variations, and abbreviations, to ensure accurate identification of proprietary words.

[0043] 105. If there are proprietary words in the preset vocabulary that correspond to the target text content, the first keyboard input method mode of the translation box will be switched to the second keyboard input method mode.

[0044] Keyboard input method mode switching refers to the process of switching the text input method from one language input method to another.

[0045] Specifically, the keyboard input method mode switching system triggers an automatic input method mode switching mechanism after confirming the existence of proprietary words matching the target text content in the preset vocabulary. The system switches the currently used first keyboard input method mode (the input method corresponding to the target language) to the second keyboard input method mode (the input method corresponding to the source language). This switching is designed to allow users to directly use the source language's input method to input proprietary words, improving input efficiency and accuracy. The system ensures a smooth switching process to avoid impacting the user's input experience. When users need to manually switch to their desired language, they can do so via keyboard shortcuts or by clicking the input method status bar.

[0046] If there are no proper words in the preset vocabulary that correspond to the target text content, the first keyboard input mode of the translation box will not be switched.

[0047] The keyboard input method mode switching method in this embodiment first acquires the text of the translation box (corresponding to the first input method mode) and the original text box (corresponding to the second input method mode), then responds to the translation box modification operation to determine the content to be modified, then locates the target content in the original text based on the translation correspondence, and finally determines the proper nouns based on the preset vocabulary database and triggers the input method switch, thus realizing intelligent automatic switching of input method modes in multilingual translation scenarios. This process does not require users to manually operate shortcut keys or click the status bar, which not only avoids the operational burden caused by frequent manual switching, but also accurately matches the modification needs of proper nouns, allowing users to directly use the original text input method when editing proper nouns in the translation, reducing input errors and significantly improving the convenience and efficiency of multilingual text editing.

[0048] Based on the above, the following is a more detailed description of the process provided in this implementation. Please refer to [link / reference]. Figure 2 This is another flowchart illustrating the keyboard input method mode switching method in this application embodiment.

[0049] 201. Obtain the translated text in the translation box and the original text in the original text box after automatic translation. The translation box corresponds to the first keyboard input method mode, and the original text box corresponds to the second keyboard input method mode. The first keyboard input method mode and the second keyboard input method mode are keyboard input method modes corresponding to different languages. (This step has been explained in 101 and will not be repeated here.) 202. Respond to user editing operations within the translation box, including click and selection operations.

[0050] A click operation refers to a user clicking to locate text within the translation box using a mouse or touch device, while a selection operation refers to a user selecting text content within the translation box by dragging, double-clicking, or other similar methods.

[0051] Specifically, the keyboard input method mode switching system monitors all user actions within the translation box in real time, classifying these actions as clicks or selections. For clicks, the system needs to accurately capture the specific location of the click; for selections, it needs to record both the start and end positions of the selected area. The system also needs to differentiate between different types of clicks, such as single and double clicks, and different types of selections, such as drag-and-drop selection and shortcut key selection.

[0052] 203. If the modification operation is a click operation, then obtain the cursor position in the translation box, and obtain the candidate content within a preset character count threshold centered on the cursor position. The preset character count threshold limits the length of the candidate content.

[0053] The cursor position indicates the specific location of the text input symbol in the translation box after the user clicks. The candidate content indicates the text content obtained by expanding forward and backward within a certain range centered on the cursor position. The preset character number threshold indicates the maximum number of characters of the candidate content preset by the system.

[0054] Specifically, the keyboard input method mode switching system first obtains the precise position of the cursor in the text after a click. Then, using this position as the center point, it expands forward and backward by a preset number of characters, extracting the text within this range as candidate content. The keyboard input method mode switching system needs to handle special cases such as the cursor position being at the beginning or end of the text, ensuring that candidate content is correctly obtained even in these situations.

[0055] In some embodiments, the cursor position can be obtained and candidate content extracted in several ways: Optionally, the keyboard input method mode switching system can obtain the character index of the current cursor through the cursor position interface of the text box, then calculate the character range to be extended forward and backward, and obtain candidate content through string truncation operations, while handling text boundary cases and the counting of special characters; Optionally, the keyboard input method mode switching system can maintain a text buffer to record the character position information and segmentation information of the text. When candidate content needs to be obtained, the text content of the target range can be quickly located and extracted through the position index of the buffer. It is understood that other methods can also be used to determine the cursor position and obtain candidate content, which are not limited here.

[0056] 204. Perform semantic analysis on the candidate content to determine whether the candidate content constitutes basic vocabulary. Basic vocabulary consists of words with complete grammatical boundaries.

[0057] Lexical analysis refers to the semantic analysis and understanding of text content, while basic vocabulary refers to the smallest word unit that is complete in both grammar and semantics.

[0058] Specifically, the keyboard input method mode switching system needs to perform in-depth semantic analysis on the acquired candidate content. First, the system needs to identify word boundaries within the candidate content to determine whether the text constitutes a complete grammatical unit. The system considers the grammatical rules of different languages, including word form changes, part-of-speech collocation, and contextual relationships, to comprehensively determine whether the candidate content is a semantically complete basic vocabulary.

[0059] 205. If the candidate content does not constitute the basic vocabulary, then based on the length of the candidate content and with the character extension length threshold as the step size, iteratively extend the number of characters contained in the candidate content to obtain the extended candidate content.

[0060] The character extension length threshold represents the number of characters added during each extension, and the extension candidate content represents the new text content obtained after iterative extension.

[0061] Specifically, the keyboard input method mode switching system uses an iterative expansion approach to gradually increase the range of candidate content. Starting with the length of the current candidate content, the system expands by a preset number of characters in both forward and backward directions each time. The expansion process must consider the text's boundary conditions to ensure it does not exceed the actual text range. The system also needs to control the maximum number of expansions to avoid performance issues caused by over-expansion.

[0062] In some embodiments, the iterative expansion of candidate content can be implemented in several ways: Optionally, the keyboard input method mode switching system can implement an expansion controller that calculates the new expansion range in each iteration according to a set step size parameter, extracts the corresponding content from the text, and records the historical state of the expansion for easy backtracking and optimization; Optionally, the keyboard input method mode switching system can use dynamic programming to pre-calculate candidate content of different expansion lengths and retrieve it directly from the cache when expansion is needed, improving expansion efficiency. It is understood that other methods can also be used to implement the iterative expansion process of candidate content, which are not limited here.

[0063] 206. Repeatedly perform semantic analysis on the expanded candidate content until the expanded candidate content constitutes a basic vocabulary, and determine the basic vocabulary as the text content to be modified in the translated text.

[0064] Specifically, the keyboard input method mode switching system performs semantic analysis on the content after each expansion to check whether a complete basic vocabulary has been formed. The keyboard input method mode switching system repeats the processes of expansion and analysis until a basic vocabulary that meets the requirements is found. When a suitable basic vocabulary is found, the keyboard input method mode switching system marks it as the text content to be modified to prepare for subsequent processing. The keyboard input method mode switching system needs to ensure that the found basic vocabulary conforms to both grammar rules and has complete semantics.

[0065] Functions of the expansion scheme in steps 204 to 206: When the user clicks on the translation box, the candidate content initially obtained by the keyboard input method mode switching system is often fragmented text such as "apple", which does not form a basic vocabulary with complete grammar. If this step is omitted, the fragmented content will cause a deviation between the translation and the original text. For example, it is difficult to accurately correspond "apple" to the original text, resulting in inaccurate subsequent judgments of proper nouns and input method switching. This method expands iteratively to form a basic vocabulary, solving the problem that fragmented text cannot meet semantic recognition and matching.

[0066] 207. Based on the text content to be modified, expand a preset character length in both the forward and backward directions to obtain optimized candidate content.

[0067] The optimized candidate content represents a larger range of text content further expanded based on the text content to be modified.

[0068] Specifically, the keyboard input method mode switching system performs additional expansion on both sides of the determined basic vocabulary to obtain more context information. This expansion is to capture potentially larger semantic units or obtain context information helpful for subsequent processing. The keyboard input method mode switching system needs to set a suitable expansion length according to the characteristics of different languages to ensure meaningful context information is obtained.

[0069] 208. Perform semantic analysis on the optimized candidate content to determine whether there is supplementary content for the text content to be modified in the optimized candidate content.

[0070] Step 208 specifically includes steps 2081 to 2084, which are not shown in the figure.

[0071] 2081. Perform semantic analysis on the optimized candidate content to obtain the semantic analysis result.

[0072] Specifically, the keyboard input method mode switching system performs in-depth semantic analysis on the expanded optimization candidate content. This system needs to identify semantic units in the text, including different levels of language structure such as phrases and word groups, and analyze the semantic relationships between these units. The analysis process needs to consider factors such as the diversity of word meanings and contextual dependencies to ensure an accurate understanding of the text's semantic structure.

[0073] In some embodiments, semantic analysis can be implemented in multiple ways: Optionally, the keyboard input method mode switching system can use a natural language processing model to perform semantic parsing, identify semantic roles and relationships in the text, and generate a structured semantic representation; alternatively, the keyboard input method mode switching system can establish a semantic knowledge graph, analyze the semantic structure of the text through graph matching, and identify the associations between semantic units. It is understood that other methods can also be used to implement semantic analysis of optimized candidate content, which are not limited here.

[0074] 2082. Calculate the semantic relevance score between the word vector of each word in the semantic analysis results and the text content to be modified, and compare the semantic relevance score with the semantic relevance threshold.

[0075] Word vectors represent the conversion of text content into numerical vectors. Semantic relevance values ​​represent the numerical measure of semantic similarity between two text units. Semantic relevance thresholds represent the standard values ​​preset by the system for judging the degree of semantic relevance.

[0076] This step is performed after the keyboard input method mode switching system obtains the optimization candidate content and performs semantic analysis to obtain the semantic analysis results. The purpose is to determine whether there are any parts in the optimization candidate content that can supplement the text content to be modified, so as to ensure the integrity of the text content to be modified. This is common in scenarios where the text content to be modified may have contextual supplementary information. For example, if the text content to be modified is "apple" and the optimization candidate content is "Apple Inc.", the keyboard input method mode switching system needs to determine whether "companies" is supplementary content to "apple". Specifically, the keyboard input method mode switching system first retrieves the semantic relevance score and a preset semantic relevance threshold. Then, it compares each semantic relevance score with the threshold one by one, strictly adhering to numerical comparison logic. If a semantic relevance score is higher than the threshold, the system further analyzes the semantic logical relationship between the corresponding optimization candidate content and the text to be modified. This confirms whether the optimization candidate content can supplement the semantics of the text to be modified. For example, a semantic relevance score of 0.8 is higher than the threshold of 0.7, and the corresponding phrase "technology company" clearly indicates the corporate attribute of "Huawei," forming a complete corporate name semantic. After logical confirmation, the system ultimately determines that there is supplementary content for the text to be modified among the optimization candidate content and records the location and specific content of this supplementary content, providing a basis for subsequent merging of supplementary content and updating the text to be modified. If multiple semantic relevance scores are higher than the threshold, the system analyzes them sequentially from highest to lowest score to ensure that all possible supplementary content is accurately identified.

[0077] 2083. If the semantic relevance score is higher than the semantic relevance threshold, then it is determined that there is supplementary content in the candidate content to be optimized that is text content to be modified.

[0078] Specifically, when the keyboard input method mode switching system detects that certain text fragments have a high semantic relevance to the content to be modified, it marks these fragments as supplementary content. This supplementary content may be modifiers, qualifiers, or other semantically related components of the content to be modified, and it is of great value for understanding and processing the content to be modified. For example, "apple" and "Apple Inc." have completely different meanings, and "industry" is supplementary content for "apple".

[0079] 2084. If the semantic relevance score is not higher than the semantic relevance threshold, then it is determined that there is no supplementary content for the text to be modified in the optimization candidate content.

[0080] Specifically, when the keyboard input method mode switching system detects that a text fragment has a low semantic relevance to the content to be modified, it determines that these fragments do not constitute valid supplementary content. This indicates that these text fragments may be independent semantic units and do not have a close semantic connection with the content to be modified.

[0081] In some embodiments, semantic relevance can be calculated and judged in multiple ways: Optionally, the keyboard input method mode switching system can use multiple metrics such as cosine similarity and Euclidean distance to calculate the similarity between word vectors, and select the most suitable calculation method according to the actual application scenario; Optionally, the keyboard input method mode switching system can establish a dynamic threshold mechanism to adaptively adjust the semantic relevance threshold according to factors such as text type and language characteristics, thereby improving the accuracy of the judgment. It is understood that other methods can also be used to calculate semantic relevance and judge supplementary content, which are not limited here.

[0082] 209. If there is supplementary content to the text to be modified in the candidate optimization content, the supplementary content will be merged with the text to be modified, and the merged content will be used as the updated text to be modified in the translation text.

[0083] Supplementary content refers to text fragments that are semantically related to the text content to be modified in the optimization candidate content. Merging means combining the supplementary content and the text content to be modified into a more complete language unit according to grammatical rules and semantic relationships. The updated text content to be modified refers to the new text content obtained after merging the supplementary content.

[0084] Specifically, the keyboard input method mode switching system first needs to determine the positional relationship between the supplementary content and the text to be modified, identifying whether the supplementary content is a pre-modifier or a post-modifier. The system then determines the merging method and order based on the grammatical rules of different languages. During the merging process, the system handles issues such as word form changes and grammatical consistency to ensure the merged content conforms to language norms. Finally, the system verifies the semantic integrity of the merged result to avoid semantic ambiguity or incoherence caused by the merging process.

[0085] In some embodiments, the merging of supplementary content can be achieved in several ways: Optionally, the keyboard input method mode switching system can establish a grammar rule base, first analyze the grammatical functions and positional features of the supplementary content, then determine the specific merging method based on the merging template in the rule base, then execute the merging operation, and finally perform grammatical checks and optimizations on the merging result; Optionally, the keyboard input method mode switching system can use a semantic combination model, first construct the semantic representations of the content to be modified and the supplementary content, then calculate the combination relationship between them, then generate a merging strategy based on the combination relationship, and finally execute the merging operation according to the strategy and verify the rationality of the merging result. It is understood that other methods can also be used to merge the supplementary content and the text content to be modified, which are not limited here.

[0086] 210. If there is no supplementary content for the text to be modified in the candidate optimization content, then the text to be modified shall be determined as the updated text to be modified in the translated text.

[0087] Specifically, the keyboard input method mode switching system will directly use the existing text content to be modified as the final result, without any additional merging or processing. The keyboard input method mode switching system needs to ensure the integrity and independence of the text content to be modified, verifying whether it can be used as an independent language unit.

[0088] The further expansion in steps 207 to 210 serves the purpose of addressing the issue that while basic vocabulary (such as "apple") may be grammatically complete, its semantics may be incomplete. For instance, in "Apple released a new phone," "apple" should actually refer to "Apple Inc." If this step is omitted, the keyboard input method mode switching system may match the wrong original text, missing the opportunity to switch input methods. This method mines supplementary content, solving the problem of narrow semantics in basic vocabulary and difficulty in matching complete, specialized vocabulary in the original text.

[0089] 211. If the modification operation is a selection operation, then the selected content in the translation box will be determined as the text to be modified.

[0090] The selected content represents the text range marked by the user in the translation box, which represents the interface area where the user can edit and modify the text.

[0091] Specifically, the keyboard input method mode switching system obtains the start and end positions of the selected text range and extracts all text content within that range. The system needs to handle different types of selection operations, including drag-and-drop selection, double-click selection, and triple-click selection, and correctly handle special cases such as multi-line selection and partial selection. Furthermore, the system must ensure the integrity of the selected content and prevent text truncation due to improper selection operations.

[0092] In some embodiments, the selection of content can be determined in several ways: Optionally, the keyboard input method mode switching system can implement a selection content manager, first capturing the specific type and parameters of the selection operation, then calculating the precise boundary of the selection range, then extracting the text content within the range, and finally verifying the integrity of the extracted content; Optionally, the keyboard input method mode switching system can establish a text selection caching mechanism, first recording the real-time state of the selection operation, then analyzing the change process of the selection range, then optimizing the method of determining the selection range, and finally saving the determined selection content to the cache. It is understood that other methods can also be used to determine the selection of content within the translation box, which are not limited here.

[0093] 212. Obtain the translation correspondence between the translated text and the original text, and identify the target text content corresponding to the text to be modified in the original text. (This step has been explained in 103 and will not be repeated here.) 213. Determine if there are any proper nouns in the preset vocabulary database that correspond to the target text content. (This step has been explained in 104 and will not be repeated here.) 214. If the preset vocabulary contains proper nouns corresponding to the target text content, switch the first keyboard input method mode of the translation box to the second keyboard input method mode. (This step has been explained in 105 and will not be repeated here.) 215. Obtain the preset backlight color corresponding to the second keyboard input method mode.

[0094] The preset backlight color indicates the specific backlight display color that the system has pre-set for different input method modes. The backlight color indicates the color displayed by the light-emitting elements at the keycaps of the keyboard.

[0095] Specifically, the keyboard input method mode switching system searches for matching backlight color information from a preset correspondence table based on the determined second keyboard input method mode. The system needs to ensure it accurately finds the corresponding backlight color and verifies the validity of this color information. Furthermore, the system must consider the backlight color support of different keyboard hardware to ensure the selected backlight color is correctly displayed on the actual hardware.

[0096] The preset backlight color specifically includes steps 2151 to 2152, which are not shown in the figure.

[0097] 2151. Establish a correspondence table between keyboard input method modes and backlight colors. Different keyboard input method modes correspond to different backlight color characteristics.

[0098] The mapping table represents a data structure that stores the mapping relationship between keyboard input method modes and backlight colors. The backlight color feature represents complete backlight display feature information including parameters such as color value, brightness, and saturation.

[0099] Specifically, the keyboard input method mode switching system creates a data structure to store the mapping relationship between input method modes and backlight colors. The system needs to design unique backlight color features for each input method mode to ensure sufficient color differentiation between different modes. The system also needs to consider the aesthetics and recognizability of the color scheme.

[0100] In some embodiments, the mapping table can be established in several ways: Optionally, the keyboard input method mode switching system can implement a mapping table builder, first defining the table structure and field types, then designing a color encoding scheme, then assigning a unique color code to each input method mode, and finally storing the mapping relationship in a data structure; Optionally, the keyboard input method mode switching system can establish a dynamic configuration system, first loading a default color configuration template, then making personalized adjustments based on user habits and preferences, then verifying the validity of the adjusted configuration, and finally generating the final mapping table. It is understood that other methods can also be used to establish the mapping table between keyboard input method modes and backlight colors, which is not limited here.

[0101] 2152. Store the backlight colors that correspond one-to-one with different keyboard input method modes in the correspondence table, or set different intensity values ​​of the same backlight color, and store the different intensity values ​​in the correspondence table after corresponding them with different keyboard input method modes.

[0102] Intensity values ​​represent the magnitude of parameters such as brightness or saturation of the backlight color.

[0103] Specifically, the keyboard input method mode switching system writes the backlight color information corresponding to each input method mode into a corresponding relationship table. The system can choose to use different colors, or it can differentiate between different input method modes by adjusting the intensity value of the same color. The system must ensure that the stored color information is in the correct format and can be correctly parsed and displayed by the keyboard hardware.

[0104] In some embodiments, color information can be stored in multiple ways: Optionally, the keyboard input method mode switching system can implement a color data manager, first converting the color information into a standard data format, then generating a unique identifier for each color, followed by writing the color data and identifier into storage space, and finally creating an index to improve query efficiency; Optionally, the keyboard input method mode switching system can establish a hierarchical storage mechanism, first classifying and storing the color data, then establishing version control for color parameters, then implementing data backup and recovery functions, and finally optimizing the utilization efficiency of storage space. It is understood that other methods can also be used to store backlight color information, which are not limited here.

[0105] 216. Send a backlight switching command to the keyboard to switch the backlight color of the language area corresponding to the second keyboard input method mode to the preset backlight color to indicate that the input method mode has been switched.

[0106] Backlight switching command refers to the control command used to control the change of keyboard backlight color, language region refers to the range of keycaps on the keyboard marked with specific language characters, and prompt indicates the status information of input method mode switching to the user through the change of backlight color.

[0107] Specifically, the keyboard input method mode switching system generates control commands containing target backlight color information and sends these commands to the keyboard device through the system's interface. The system must ensure that the command format conforms to the keyboard device's protocol requirements and accurately specifies the range of keycaps whose backlight color needs to be changed. Furthermore, the system needs to monitor the command execution status to ensure successful backlight color switching.

[0108] In some embodiments, the sending and execution of backlight switching commands can be implemented in several ways: Optionally, the keyboard input method mode switching system can implement a command controller, which first generates a standard format control command based on a preset backlight color, then determines the specific keycap range whose backlight needs to be changed, then sends the command through a device driver interface, and finally monitors and confirms the command execution result; Optionally, the keyboard input method mode switching system can establish a gradient switching mechanism, first calculating the transition sequence between the current backlight color and the target color, then generating a series of gradient control commands, then sending these commands sequentially at time intervals, and finally verifying the completion status of the entire switching process. It is understood that other methods can also be used to implement keyboard backlight color switching control, which are not limited here.

[0109] The keyboard input method mode switching method described in this application accurately locates the content to be modified by distinguishing between click and selection operations. During a click operation, candidate content is extracted centered on the cursor, and semantic analysis and iterative expansion determine the complete basic vocabulary. During a selection operation, the selected content is directly locked. Furthermore, the system can expand and optimize candidate content and determine supplementary content based on semantic relevance to improve the text to be modified. After switching the input method, the system can send a command to switch the backlight of the corresponding language area of ​​the keyboard based on a preset correspondence between the input method mode and the backlight color. This method achieves accurate identification of the content to be modified and intelligent switching of the input method mode in multilingual translation and editing scenarios. Simultaneously, the backlight prompts clearly indicate the mode switching status, avoiding the tedious operation caused by manually switching input methods, ensuring the completeness and accuracy of the content to be modified, reducing input errors, and allowing users to monitor the input method status in real time, further improving the convenience and user experience of multilingual text editing.

[0110] The method provided in the above embodiments can be executed by a keyboard input method mode switching system. The keyboard input method mode switching system in the embodiments of this invention is described below from a hardware processing perspective. Please refer to [link to relevant documentation]. Figure 3 This is a schematic diagram of the physical device structure of a keyboard input method mode switching system in an embodiment of this application.

[0111] It should be noted that, Figure 3 The structure of the keyboard input method mode switching system shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.

[0112] like Figure 3 As shown, the keyboard input method mode switching system includes a Central Processing Unit (CPU) 301, which can perform various appropriate actions and processes based on programs stored in Read-Only Memory (ROM) 302 or programs loaded from storage section 308 into Random Access Memory (RAM) 303, such as performing the methods described in the above embodiments. The RAM 303 also stores various programs and data required for system operation. The CPU 301, ROM 302, and RAM 303 are interconnected via a bus 304. An Input / Output (I / O) interface 305 is also connected to the bus 304.

[0113] The following components are connected to I / O interface 305: input section 306 including audio input devices, push-button switches, etc.; output section 307 including a liquid crystal display (LCD) and audio output devices, indicator lights, etc.; storage section 308 including a hard disk, etc.; and communication section 309 including a network interface card such as a LAN (Local Area Network) card, modem, etc. Communication section 309 performs communication processing via a network such as the Internet. Drive 310 is also connected to I / O interface 305 as needed. Removable media 311, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 310 as needed so that computer programs read from them can be installed into storage section 308 as needed.

[0114] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing computer programs for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 309, and / or installed from removable medium 311. When the computer program is executed by central processing unit (CPU) 301, it performs the various functions defined in the present invention.

[0115] It should be noted that specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0116] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. Each block in a flowchart or block diagram may represent a module, program segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those shown in the drawings.

[0117] Specifically, the keyboard input method mode switching system of this embodiment includes a processor and a memory. The memory stores a computer program. When the computer program is executed by the processor, it implements the keyboard input method mode switching system provided in the above embodiment.

[0118] In another aspect, the present invention also provides a computer-readable storage medium, which may be included in the keyboard input method mode switching system described in the above embodiments; or it may exist independently and not assembled into the keyboard input method mode switching system. The storage medium carries one or more computer programs, which, when executed by a processor of the keyboard input method mode switching system, cause the keyboard input method mode switching system to implement the keyboard input method mode switching system provided in the above embodiments.

[0119] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

[0120] As used in the above embodiments, depending on the context, the term "when..." can be interpreted as meaning "if...", "after...", "in response to determining...", or "in response to detecting...". Similarly, depending on the context, the phrase "when determining..." or "if (the stated condition or event) is interpreted as meaning "if determining...", "in response to determining...", "when (the stated condition or event) is detected", or "in response to detecting (the stated condition or event)".

[0121] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The 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 processes or functions described in the embodiments of this application are 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, the 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, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive), etc.

[0122] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.

Claims

1. A method for switching keyboard input method modes, characterized in that, The method is applied to a keyboard input method mode switching system, and the method comprises the following steps: obtaining translated text in a translated text box and original text in an original text box, the translated text box corresponding to a first keyboard input method mode, the original text box corresponding to a second keyboard input method mode, the first keyboard input method mode and the second keyboard input method mode being keyboard input method modes corresponding to different languages; in response to a modification operation of a user in the translated text box, determining text content to be modified in the translated text in the modification operation; obtaining a translation corresponding relationship between the translated text and the original text, and determining target text content corresponding to the text content to be modified in the original text; judging whether a special vocabulary corresponding to the target text content exists in a preset vocabulary library; if the special vocabulary corresponding to the target text content exists in the preset vocabulary library, switching the first keyboard input method mode of the translated text box to the second keyboard input method mode.

2. The method of claim 1, wherein, The step of determining the text content to be modified in the translated text in the modification operation of the user in the translated text box specifically comprises the following steps: in response to the modification operation of the user in the translated text box, the modification operation comprising a click operation and a selection operation; if the modification operation is the click operation, obtaining a cursor position in the translated text box and candidate content within a preset character number threshold range centered on the cursor position, the preset character number threshold limiting the length of the candidate content; obtaining the text content to be modified in the translated text by performing semantic analysis on the candidate content; if the modification operation is the selection operation, determining the selected content in the translated text box as the text content to be modified.

3. The method of claim 2, wherein, The step of obtaining the text content to be modified in the translated text by performing semantic analysis on the candidate content specifically comprises the following steps: performing semantic analysis on the candidate content to judge whether the candidate content constitutes a basic vocabulary, the basic vocabulary being a vocabulary with complete grammatical boundaries; if the candidate content does not constitute the basic vocabulary, iteratively expanding the number of characters contained in the candidate content by taking the length of the candidate content as a basis and a character expansion length threshold as a step length to obtain expanded candidate content; repeatedly performing semantic analysis on the expanded candidate content until the expanded candidate content constitutes a basic vocabulary, and determining the basic vocabulary as the text content to be modified in the translated text.

4. The method of claim 3, wherein, After the step of determining the basic vocabulary as the text content to be modified in the translated text, the method further comprises the following steps: respectively expanding a preset character length in the forward and backward directions based on the text content to be modified to obtain optimized candidate content; performing semantic analysis on the optimized candidate content to judge whether supplementary content of the text content to be modified exists in the optimized candidate content; if the supplementary content of the text content to be modified exists in the optimized candidate content, merging the supplementary content and the text content to be modified, and taking the merged content as updated text content to be modified in the translated text; If the supplement content of the text content to be modified does not exist in the optimization candidate content, the text content to be modified is determined as the updated text content to be modified in the translation text.

5. The method of claim 4, wherein, The optimization candidate content is subjected to semantic analysis to determine whether the supplement content of the text content to be modified exists in the optimization candidate content, specifically including: The optimization candidate content is subjected to semantic analysis to obtain a semantic analysis result; A semantic correlation degree value between each word vector in the semantic analysis result and the text content to be modified is calculated, and the semantic correlation degree value is compared with a semantic correlation degree threshold value; If the semantic correlation degree value is higher than the semantic correlation degree threshold value, it is determined that the supplement content of the text content to be modified exists in the optimization candidate content; If the semantic correlation degree value is not higher than the semantic correlation degree threshold value, it is determined that the supplement content of the text content to be modified does not exist in the optimization candidate content.

6. The method of claim 1, wherein, After the step of switching the first keyboard input method mode of the translation text box to the second keyboard input method mode if the specific vocabulary corresponding to the target text content exists in the preset vocabulary library, the method further includes: Obtaining a preset backlight color corresponding to the second keyboard input method mode; Sending a backlight switching instruction to the keyboard to switch the backlight color of the language area corresponding to the second keyboard input method mode at the keyboard keycap to the preset backlight color, so as to prompt that the input method mode has been switched.

7. The method of claim 6, wherein, The preset backlight color specifically includes: Establishing a correspondence table of keyboard input method modes and backlight colors, different keyboard input method modes corresponding to different backlight color characteristics; Storing the backlight colors corresponding to the different keyboard input method modes one by one in the correspondence table, or setting different intensity values of the same backlight color, and storing the different intensity values corresponding to the different keyboard input method modes one by one in the correspondence table.

8. A keyboard input method mode switching system, characterized by, comprises one or more processors and a memory; The memory is coupled to the one or more processors, and the memory is configured to store computer program code, the computer program code comprising computer instructions, and the one or more processors are configured to invoke the computer instructions to cause the keyboard input method mode switching system to perform the method of any one of claims 1-7.

9. A computer-readable storage medium comprising instructions, characterized in that, When the instructions are run on the keyboard input method mode switching system, the keyboard input method mode switching system is caused to perform the method of any one of claims 1-7.

10. A computer program product, characterised in that, When the computer program product is run on the keyboard input method mode switching system, the keyboard input method mode switching system is caused to perform the method of any one of claims 1-7.